﻿:root{
  --bg:#0b1220;
  --panel:#0f1b33;
  --card:#101f3a;
  --muted:#a8b3cf;
  --text:#e9eefc;
  --line:rgba(255,255,255,.08);
  --brand:#7c5cff;
  --brand2:#2dd4bf;
  --danger:#ff5c7c;
  --shadow: 0 18px 40px rgba(0,0,0,.35);
  --radius: 18px;
  --radius2: 12px;
  --max: 1180px;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

html[data-theme="light"]{
  --bg:#f6f7fb;
  --panel:#ffffff;
  --card:#ffffff;
  --muted:#5c647b;
  --text:#0c1222;
  --line:rgba(10,14,24,.10);
  --brand:#5b5bff;
  --brand2:#0ea5a4;
  --danger:#e11d48;
  --shadow: 0 16px 30px rgba(10,14,24,.08);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--sans);
  color:var(--text);
  background:
    radial-gradient(1200px 600px at 10% 0%, rgba(124,92,255,.14), transparent 55%),
    radial-gradient(900px 500px at 100% 10%, rgba(45,212,191,.10), transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg));
}

a{color:inherit;text-decoration:none}
a:hover{opacity:.92}

.shell{
  display:flex;
  min-height:100vh;
}

.sidebar{
  width:270px;
  padding:18px 14px;
  border-right:1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  position:sticky;
  top:0;
  height:100vh;
}

.brand{
  display:flex; gap:12px; align-items:center;
  padding:12px 12px;
  border:1px solid var(--line);
  border-radius:16px;
  background: rgba(255,255,255,.03);
  box-shadow: var(--shadow);
}
.brand img{
  width:42px; height:42px; border-radius:14px; object-fit:cover;
}
.brand .title{font-weight:950; letter-spacing:.2px}
.brand .sub{color:var(--muted); font-size:12px; margin-top:2px}

.sideNav{margin-top:14px; display:flex; flex-direction:column; gap:8px}
.sideNav a{
  padding:11px 12px;
  border-radius:14px;
  border:1px solid transparent;
  background: rgba(255,255,255,.03);
  display:flex; gap:10px; align-items:center;
}
.sideNav a:hover{border-color: rgba(255,255,255,.10); background: rgba(255,255,255,.05)}
.sideNav a.active{
  border-color: rgba(124,92,255,.45);
  background: rgba(124,92,255,.14);
}

.sideTools{
  margin-top:14px;
  display:flex; gap:10px; flex-wrap:wrap;
}
.btn{
  cursor:pointer;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(124,92,255,.45);
  background: rgba(124,92,255,.14);
  color: var(--text);
  font-weight:900;
}
.btn2{
  cursor:pointer;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--text);
  font-weight:900;
}
.btnDanger{
  cursor:pointer;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,92,124,.45);
  background: rgba(255,92,124,.12);
  color: var(--text);
  font-weight:950;
}

.main{
  flex:1;
  padding:22px;
}

.topbar{
  max-width:var(--max);
  margin:0 auto 14px auto;
  display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap;
}
.h1{font-size:22px; font-weight:950; letter-spacing:.2px}
.muted{color:var(--muted); font-size:13px}
.tag{
  display:inline-flex; gap:8px; align-items:center;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  color:var(--muted);
  font-size:12px;
}
.dot{width:8px;height:8px;border-radius:999px;background:var(--brand2); display:inline-block}

.wrap{max-width:var(--max); margin:0 auto}

.grid2{display:grid; grid-template-columns:1fr 1fr; gap:14px}
.grid3{display:grid; grid-template-columns:1fr 1fr 1fr; gap:14px}
@media (max-width:1050px){ .grid3{grid-template-columns:1fr} .sidebar{position:relative;height:auto;width:100%} .shell{flex-direction:column} }
@media (max-width:900px){ .grid2{grid-template-columns:1fr} }

.card{
  border:1px solid var(--line);
  border-radius:var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.02));
  box-shadow: var(--shadow);
  padding:16px;
}
.kpi{font-size:30px; font-weight:980; margin-top:8px}
.hr{height:1px;background:var(--line); margin:12px 0}

input,select,textarea{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--text);
  outline:none;
}
input:focus,select:focus,textarea:focus{border-color: rgba(124,92,255,.55)}
label{display:block; margin:10px 0 6px; color:var(--muted); font-size:13px}

table{width:100%; border-collapse:collapse; font-size:13px}
th,td{padding:12px 10px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top}
th{color:rgba(233,238,252,.85); font-size:12px; text-transform:uppercase; letter-spacing:.9px}
html[data-theme="light"] th{color: rgba(12,18,34,.75)}
tr:hover td{background: rgba(255,255,255,.03)}

canvas{width:100%; height:260px; display:block}
.err{color:var(--danger); font-weight:900}
.ok{color:var(--brand2); font-weight:900}
.footer{margin-top:14px; color:rgba(168,179,207,.65); font-size:12px; text-align:center}


/* --- Licenses UI helpers --- */
.stack{ display:flex; flex-direction:column; gap:10px; }
.row{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:center;
  border:1px solid var(--line);
  background: rgba(255,255,255,.02);
  padding:12px 12px;
  border-radius: var(--radius2);
}
.pill{
  display:inline-flex;
  align-items:center;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  font-weight:900;
  font-size:12px;
  letter-spacing:.02em;
  text-transform:uppercase;
}
.pill.ok{ border-color: rgba(45,212,191,.5); background: rgba(45,212,191,.12); }
.pill.warn{ border-color: rgba(124,92,255,.6); background: rgba(124,92,255,.14); }
.pill.bad{ border-color: rgba(255,92,124,.55); background: rgba(255,92,124,.12); }

.btn.ok{ border-color: rgba(45,212,191,.55); background: rgba(45,212,191,.14); }
.btn.bad{ border-color: rgba(255,92,124,.55); background: rgba(255,92,124,.12); }
.btn:disabled{ opacity:.55; cursor:not-allowed; }
