/* Dashboard style */
:root{
  --bg: #0b1220;
  --panel: rgba(255,255,255,.06);
  --border: rgba(255,255,255,.10);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.70);
  --muted2: rgba(255,255,255,.55);
  --shadow: 0 14px 40px rgba(0,0,0,.35);
  --radius: 16px;
}
*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Noto Sans", Arial, sans-serif;
  background:
    radial-gradient(1200px 800px at 10% 0%, rgba(90,160,255,.15), transparent 60%),
    radial-gradient(900px 700px at 90% 10%, rgba(140,80,255,.12), transparent 55%),
    radial-gradient(1000px 700px at 50% 100%, rgba(0,255,190,.08), transparent 60%),
    var(--bg);
  color: var(--text);
}
.container{ width:min(1180px, calc(100% - 32px)); margin: 0 auto; }

.topbar{
  position: sticky; top:0; z-index:10;
  background: linear-gradient(180deg, rgba(11,18,32,.92), rgba(11,18,32,.70));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar__inner{ display:flex; align-items:center; justify-content:space-between; gap:18px; padding: 14px 0; flex-wrap:wrap; }
.brand__title{ font-weight: 750; letter-spacing:.2px; font-size:18px; }
.brand__subtitle{ color: var(--muted); font-size:12px; margin-top:2px; }

.controls{ display:flex; align-items:flex-end; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.field{ display:flex; flex-direction:column; gap:6px; font-size:12px; color: var(--muted); }
.field input, .field select{
  width: 160px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.06);
  color: var(--text);
  outline:none;
}
.btn{
  height:40px; padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.08);
  color: var(--text);
  cursor:pointer;
}
.btn:hover{ background: rgba(255,255,255,.11); }
.status{ height:40px; display:flex; align-items:center; padding: 0 10px; color: var(--muted); font-size:12px; }

.grid{ display:grid; gap:14px; }
.kpis{ margin-top: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.charts{ margin-top: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bottom{ margin: 14px 0 26px; grid-template-columns: 1.05fr .95fr; }
@media (max-width: 980px){
  .kpis{ grid-template-columns: 1fr; }
  .charts{ grid-template-columns: 1fr; }
  .bottom{ grid-template-columns: 1fr; }
}

.card{
  background: linear-gradient(180deg, var(--panel), rgba(255,255,255,.04));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.card__header{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding: 14px 16px 10px 16px; border-bottom: 1px solid rgba(255,255,255,.07); }
.card__title{ font-weight: 700; }
.card__hint{ margin-top:4px; font-size:12px; color: var(--muted2); }

.kpi{ padding: 16px; }
.kpi__label{ color: var(--muted); font-size:12px; }
.kpi__value{ margin-top:10px; font-size:40px; font-weight:800; letter-spacing:-0.6px; display:flex; align-items:baseline; gap:8px; }
.kpi__unit{ font-size:14px; color: var(--muted); font-weight:650; }
.kpi__value--small{ font-size:18px; font-weight:750; }
.kpi__meta{ margin-top:8px; color: var(--muted2); font-size:12px; }

.chartWrap{ padding: 8px 14px 16px 14px; height: 320px; }
.chartWrap canvas{ width: 100% !important; height: 100% !important; }

.tableWrap{ padding: 0 16px 14px 16px; overflow:auto; max-height: 420px; }
.table{ width:100%; border-collapse: collapse; font-size: 13px; }
.table th{
  text-align:left; font-size:12px; color: var(--muted); font-weight:650;
  padding:10px 8px; border-bottom: 1px solid rgba(255,255,255,.08);
  position: sticky; top:0;
  background: rgba(11,18,32,.85); backdrop-filter: blur(8px);
}
.table td{ padding:10px 8px; border-bottom: 1px solid rgba(255,255,255,.06); color: rgba(255,255,255,.85); white-space: nowrap; }

.timeline{ padding: 8px 16px 16px 16px; max-height: 420px; overflow:auto; }
.tlItem{ display:grid; grid-template-columns: 12px 1fr; gap: 12px; padding: 10px 0; position: relative; }
.tlDot{ width: 10px; height: 10px; border-radius: 999px; background: rgba(255,255,255,.85); margin-top: 6px; box-shadow: 0 0 0 4px rgba(255,255,255,.08); }
.tlItem::after{ content:""; position:absolute; left: 4.5px; top: 24px; bottom: -10px; width: 1px; background: rgba(255,255,255,.10); }
.tlItem:last-child::after{ display:none; }
.tlMain{ display:flex; align-items:baseline; justify-content:space-between; gap: 10px; }
.tlTitle{ font-weight: 700; color: rgba(255,255,255,.9); }
.tlMeta{ margin-top:4px; color: var(--muted2); font-size:12px; }
.badge{ display:inline-flex; align-items:center; gap: 6px; font-size: 12px; padding: 6px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: rgba(255,255,255,.88); white-space: nowrap; }

a.link{ color: rgba(255,255,255,.85); text-decoration: none; border-bottom: 1px dashed rgba(255,255,255,.25); }
a.link:hover{ border-bottom-color: rgba(255,255,255,.6); }
