:root{
  --bg:#0b1220;
  --panel:#111b2e;
  --panel2:#0f1728;
  --border:rgba(255,255,255,.08);
  --text:#e9eefc;
  --muted:rgba(233,238,252,.7);
  --accent:#4f7cff;
  --accent2:#22c55e;
  --warn:#f59e0b;
  --danger:#ef4444;
  --shadow:0 10px 25px rgba(0,0,0,.35);
  --radius:14px;
  --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; }
body{
  margin:0;
  font-family:var(--sans);
  color:var(--text);
  background:linear-gradient(180deg, #071026 0%, #0b1220 60%, #070d1a 100%);
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 18px;
  border-bottom:1px solid var(--border);
  background:rgba(11,18,32,.85);
  position:sticky;
  top:0;
  backdrop-filter: blur(10px);
  z-index:10;
}

.brand{
  display:flex; gap:12px; align-items:center;
}
.logo{
  width:42px; height:42px; border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  background:rgba(79,124,255,.15);
  border:1px solid rgba(79,124,255,.3);
  font-weight:800;
}
.title .h1{ font-size:16px; font-weight:800; letter-spacing:.2px; }
.title .h2{ font-size:12px; color:var(--muted); margin-top:2px; }

.auth{ display:flex; align-items:center; gap:10px; }
.status{ font-size:12px; color:var(--muted); }

.container{ max-width:1280px; margin:0 auto; padding:18px; }

.panel{
  background:linear-gradient(180deg, rgba(17,27,46,.9) 0%, rgba(15,23,40,.9) 100%);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:14px;
  box-shadow: var(--shadow);
}

.row{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:flex-end;
  margin-bottom:12px;
}

.field{ display:flex; flex-direction:column; gap:6px; min-width:180px; }
.field.grow{ flex:1; min-width:260px; }
label{ font-size:12px; color:var(--muted); }
input,select{
  background:rgba(255,255,255,.04);
  border:1px solid var(--border);
  color:var(--text);
  padding:10px 10px;
  border-radius:12px;
  outline:none;
}
input:focus, select:focus{ border-color:rgba(79,124,255,.5); }

.btn{
  border:1px solid var(--border);
  background:rgba(255,255,255,.04);
  color:var(--text);
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
  transition:.15s ease;
  white-space:nowrap;
}
.btn:hover{ transform:translateY(-1px); border-color:rgba(255,255,255,.16); }
.btn.primary{
  background:rgba(79,124,255,.18);
  border-color:rgba(79,124,255,.5);
}
.btn.primary:hover{ border-color:rgba(79,124,255,.7); }
.btn.danger{ background:rgba(239,68,68,.15); border-color:rgba(239,68,68,.45); }

.indicators{ flex:1; min-width:520px; }
.checks{ display:flex; gap:14px; flex-wrap:wrap; align-items:center; }
.checks label{ display:flex; gap:8px; align-items:center; font-size:13px; color:var(--text); }
.checks input{ transform:translateY(1px); }

.dropdown{
  position:relative;
}
.dropdown .item{
  padding:8px 10px;
  border-bottom:1px solid rgba(255,255,255,.06);
  cursor:pointer;
}
.dropdown .item:hover{ background:rgba(255,255,255,.06); }
.dropdown{
  display:none;
  position:absolute;
  background:rgba(15,23,40,.98);
  border:1px solid var(--border);
  border-radius:12px;
  top:74px;
  width:100%;
  max-height:320px;
  overflow:auto;
  box-shadow: var(--shadow);
  z-index:20;
}

.grid{
  margin-top:16px;
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap:14px;
}
.card{
  background:rgba(17,27,46,.75);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.card-head{ padding:12px 12px 0 12px; }
.card-title{ font-weight:800; }
.card-sub{ font-size:12px; color:var(--muted); margin-top:4px; }

.span-12{ grid-column: span 12; }
.span-8{ grid-column: span 8; }
.span-4{ grid-column: span 4; }

.chart{
  height:520px;
  margin:10px 10px 12px 10px;
  border:1px solid rgba(255,255,255,.06);
  border-radius:12px;
}
.chart-small{ height:180px; }

.pre{
  margin:10px;
  padding:12px;
  background:rgba(0,0,0,.25);
  border:1px solid rgba(255,255,255,.06);
  border-radius:12px;
  font-family:var(--mono);
  font-size:12px;
  overflow:auto;
  max-height:520px;
  white-space:pre-wrap;
}

.tabs{ display:flex; gap:8px; padding:10px; border-top:1px solid rgba(255,255,255,.06); }
.tab{
  padding:8px 10px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.06);
  background:rgba(255,255,255,.03);
  color:var(--text);
  cursor:pointer;
}
.tab.active{ border-color:rgba(79,124,255,.6); background:rgba(79,124,255,.12); }

.tabbody{ display:none; padding-bottom:8px; }
.tabbody.active{ display:block; }

.tablewrap{ overflow:auto; }
table{
  width:100%;
  border-collapse:collapse;
  font-size:12px;
}
thead th{
  position:sticky; top:0;
  background:rgba(15,23,40,.98);
  z-index:2;
}
th, td{
  padding:8px 10px;
  border-bottom:1px solid rgba(255,255,255,.06);
  text-align:right;
}
th:first-child, td:first-child{ text-align:left; }

.modal{
  position:fixed; inset:0;
  background:rgba(0,0,0,.55);
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  z-index:50;
}
.modal[aria-hidden="false"]{ display:flex; }
.modal-card{
  width:min(820px, 100%);
  background:rgba(17,27,46,.98);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.modal-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 14px;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.modal-title{ font-weight:800; }
.iconbtn{
  width:36px; height:36px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.04);
  color:var(--text);
  cursor:pointer;
  font-size:18px;
}
.modal-body{ padding:14px; }
.hint{ font-size:12px; color:var(--muted); margin-top:6px; }

/* Options dashboard */
.checks{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.checks label{ display:flex; gap:8px; align-items:center; color:rgba(255,255,255,.85); }

.grid2{ display:grid; grid-template-columns: 1fr 1fr; gap:14px; margin-top:12px; }
@media (max-width: 960px){ .grid2{ grid-template-columns: 1fr; } }

.card.mini{ border:1px solid var(--border); background: var(--panel2); border-radius: 14px; padding: 12px; }
.pre.small{ max-height: 160px; overflow:auto; font-size: 12px; }

canvas{ width:100% !important; }
