
:root{
  --bg:#0b1020;
  --panel:#101a33;
  --panel2:#0f1730;
  --text:#e9eeff;
  --muted:#a9b4d6;
  --accent:#6ee7ff;
  --good:#34d399;
  --warn:#fbbf24;
  --bad:#fb7185;
  --line:#22305d;
  --chip:#16224a;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 18px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--sans);
  background: radial-gradient(1200px 700px at 20% 0%, rgba(110,231,255,.18), transparent 60%),
              radial-gradient(900px 600px at 90% 20%, rgba(52,211,153,.12), transparent 55%),
              var(--bg);
  color:var(--text);
}
a{color:inherit; text-decoration:none}
.wrap{max-width:1200px;margin:0 auto;padding:24px}
header{
  display:flex; gap:14px; align-items:center; justify-content:space-between; margin-bottom:18px;
}
.brand{display:flex; align-items:center; gap:12px}
.logo{
  width:44px;height:44px;border-radius:14px;
  background: linear-gradient(135deg, rgba(110,231,255,.95), rgba(52,211,153,.9));
  box-shadow: var(--shadow);
  position:relative; overflow:hidden;
}
.logo:after{
  content:""; position:absolute; inset:-40% -40%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.55), transparent 40%);
  transform: rotate(10deg);
}
.title h1{margin:0;font-size:18px;letter-spacing:.4px}
.title p{margin:3px 0 0;color:var(--muted);font-size:12px}
.right{display:flex;gap:10px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.pill{
  display:inline-flex;gap:8px;align-items:center;
  background: rgba(16,26,51,.75);
  border:1px solid rgba(34,48,93,.9);
  padding:10px 12px;border-radius:999px;
  box-shadow: 0 8px 22px rgba(0,0,0,.18);
  backdrop-filter: blur(10px);
  font-size:12px;color:var(--muted);
}
.dot{width:9px;height:9px;border-radius:99px;background:var(--good);box-shadow:0 0 0 4px rgba(52,211,153,.12)}
.btn{
  cursor:pointer;
  border:1px solid rgba(34,48,93,.9);
  background: linear-gradient(180deg, rgba(22,34,74,.9), rgba(16,26,51,.9));
  color:var(--text);
  border-radius:12px;
  padding:10px 12px;
  font-size:12px;
  box-shadow: 0 10px 22px rgba(0,0,0,.2);
  transition: transform .08s ease, border-color .2s ease;
}
.btn:hover{transform:translateY(-1px); border-color: rgba(110,231,255,.55)}
.btn.primary{
  border-color: rgba(110,231,255,.55);
  background: linear-gradient(180deg, rgba(110,231,255,.25), rgba(16,26,51,.9));
}
.grid{display:grid;grid-template-columns: 1.2fr .8fr;gap:14px}
@media(max-width:980px){.grid{grid-template-columns:1fr}}
.card{
  background: linear-gradient(180deg, rgba(16,26,51,.88), rgba(15,23,48,.88));
  border:1px solid rgba(34,48,93,.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:14px;
  overflow:hidden;
}
.card h2{margin:0 0 10px;font-size:14px;letter-spacing:.3px}
.sub{margin:-6px 0 12px;font-size:12px;color:var(--muted)}
.kpis{display:grid;grid-template-columns: repeat(5, 1fr);gap:10px;margin-bottom:14px}
@media(max-width:980px){.kpis{grid-template-columns: repeat(2,1fr)}}
.kpi{
  background: rgba(12,18,40,.55);
  border:1px solid rgba(34,48,93,.8);
  border-radius: 16px;
  padding:12px;
  position:relative;
  overflow:hidden;
}
.kpi small{display:block;color:var(--muted);font-size:11px;margin-bottom:6px}
.kpi .val{font-size:20px;font-weight:700}
.kpi .trend{margin-top:6px;font-size:11px;color:var(--muted)}
.kpi:after{
  content:""; position:absolute; inset:-60% -30%;
  background: radial-gradient(circle at 30% 30%, rgba(110,231,255,.18), transparent 40%),
              radial-gradient(circle at 70% 60%, rgba(52,211,153,.12), transparent 45%);
  transform: rotate(12deg);
  pointer-events:none;
}
.filters{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-bottom:12px}
.input, select{
  background: rgba(12,18,40,.6);
  border:1px solid rgba(34,48,93,.85);
  border-radius: 12px;
  padding:10px 10px;
  color: var(--text);
  font-size:12px;
  outline:none;
  min-width: 160px;
}
.input::placeholder{color:rgba(169,180,214,.65)}
.chip{
  display:inline-flex;gap:8px;align-items:center;
  padding:8px 10px;border-radius:999px;
  border:1px solid rgba(34,48,93,.85);
  background: rgba(22,34,74,.55);
  color: var(--muted);
  font-size:12px; user-select:none;
}
.chip strong{color:var(--text);font-weight:600}
.sep{flex:1}
.table{width:100%;border-collapse:separate;border-spacing:0 8px;font-size:12px}
.table th{text-align:left;color:var(--muted);font-weight:600;padding:8px 10px;font-size:11px}
.row{background: rgba(12,18,40,.55);border:1px solid rgba(34,48,93,.75);border-radius:14px;overflow:hidden}
.table td{padding:10px 10px}
.badge{
  display:inline-flex;align-items:center;gap:7px;
  padding:6px 10px;border-radius:999px;
  border:1px solid rgba(34,48,93,.85);
  background: rgba(22,34,74,.55);
  font-size:11px;color:var(--muted);white-space:nowrap
}
.badge .bDot{width:8px;height:8px;border-radius:99px}
.mono{font-family:var(--mono)}
.muted{color:var(--muted)}
.scroll{max-height:360px;overflow:auto;padding-right:4px}
.scroll::-webkit-scrollbar{height:10px;width:10px}
.scroll::-webkit-scrollbar-thumb{background: rgba(34,48,93,.8); border-radius:999px}
.scroll::-webkit-scrollbar-track{background: transparent}
.sideGrid{display:grid;gap:14px}
.statusLine{display:flex;gap:10px;flex-wrap:wrap}
.mini{
  flex:1; min-width:160px;
  background: rgba(12,18,40,.55);
  border:1px solid rgba(34,48,93,.75);
  border-radius:16px;
  padding:12px;
}
.mini h3{margin:0 0 8px;font-size:12px}
.mini p{margin:0;font-size:12px;color:var(--muted);line-height:1.4}
.meter{
  margin-top:10px;height:10px;background: rgba(34,48,93,.35);
  border-radius:999px;overflow:hidden;border:1px solid rgba(34,48,93,.7)
}
.meter>div{height:100%;width:50%;background: linear-gradient(90deg, rgba(110,231,255,.95), rgba(52,211,153,.9))}
.chart{
  display:flex;gap:10px;align-items:flex-end;height:140px;
  padding:12px 8px 4px;border-radius:16px;
  background: rgba(12,18,40,.45);
  border:1px solid rgba(34,48,93,.75);
}
.bar{flex:1;min-width:10px;border-radius:10px 10px 6px 6px;background: linear-gradient(180deg, rgba(110,231,255,.9), rgba(52,211,153,.55));opacity:.92;position:relative}
.bar span{position:absolute;bottom:-20px;left:50%;transform:translateX(-50%);font-size:10px;color:var(--muted);white-space:nowrap}
.line{
  height:150px;background: rgba(12,18,40,.45);
  border:1px solid rgba(34,48,93,.75);
  border-radius:16px;padding:12px;position:relative;overflow:hidden
}
.svg{width:100%;height:100%}
.hint{font-size:11px;color:var(--muted);margin-top:8px}
.footerNote{margin-top:14px;color:rgba(169,180,214,.8);font-size:11px;line-height:1.5}
.nav{
  display:flex; gap:8px; flex-wrap:wrap; align-items:center;
  margin: 8px 0 0;
}
.nav a{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 10px; border-radius:12px;
  border:1px solid rgba(34,48,93,.85);
  background: rgba(12,18,40,.35);
  color: var(--muted);
  font-size:12px;
}
.nav a.active{
  color: var(--text);
  border-color: rgba(110,231,255,.55);
  background: rgba(110,231,255,.10);
}
.gridFull{display:grid; grid-template-columns: 1fr; gap:14px}
.toast{
  position:fixed; right:16px; bottom:16px; max-width: 520px;
  background: rgba(16,26,51,.92);
  border: 1px solid rgba(34,48,93,.9);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 12px 12px;
  display:none;
}
.toast.on{display:block}
.toast .t{font-weight:800; font-size:12px}
.toast .m{color:var(--muted); font-size:12px; margin-top:6px; line-height:1.45}
.loginWrap{
  max-width: 460px; margin: 0 auto; padding: 40px 24px;
}
.loginCard{
  background: linear-gradient(180deg, rgba(16,26,51,.88), rgba(15,23,48,.88));
  border:1px solid rgba(34,48,93,.9);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 16px;
}
.field{display:grid; gap:8px; margin-top:10px}
.label{font-size:12px; color:var(--muted)}
hr{border:0;border-top:1px solid rgba(34,48,93,.7); margin:14px 0}
.small{font-size:12px; color:var(--muted); line-height:1.45}


/* ---- Date range + modal additions (v3) ---- */
.dateRow{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.dateRow .input{ min-width:160px; }
.dateRow select{ min-width:140px; }

tr.row{ cursor:pointer; }

/* Modal */
.modal{ position:fixed; inset:0; display:none; z-index:60; }
.modal.on{ display:block; }
.modalBackdrop{ position:absolute; inset:0; background:rgba(0,0,0,.55); }
.modalCard{
  position:relative;
  width:min(920px, calc(100% - 28px));
  max-height:calc(100% - 28px);
  margin:14px auto;
  border-radius:18px;
  overflow:hidden;
  background:rgba(16,19,27,.96);
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 18px 50px rgba(0,0,0,.45);
}
.modalHeader{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 14px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.modalTitle{ font-weight:800; font-size:16px; }
.modalBody{ padding:14px; overflow:auto; max-height:calc(100vh - 120px); }
.pre{
  white-space:pre-wrap;
  word-break:break-word;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  padding:12px;
  font-size:12px;
}
