:root {
  --bg:#08111f;
  --bg-2:#0c172a;
  --bg-3:#111f37;
  --panel:#0e1a2d;
  --panel-2:#13233d;
  --line:rgba(173, 198, 255, .12);
  --line-strong:rgba(173, 198, 255, .22);
  --text:#e9f0ff;
  --muted:#96a8cc;
  --accent:#68a4ff;
  --accent-2:#8c7bff;
  --green:#2cd18b;
  --red:#ff6e86;
  --yellow:#ffc15d;
  --shadow:0 18px 60px rgba(0,0,0,.32);
  --radius:22px;
  --radius-sm:14px;
}
* { box-sizing:border-box; }
html, body { margin:0; min-height:100%; }
body {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at top left, rgba(104,164,255,.18), transparent 28%),
    radial-gradient(circle at top right, rgba(140,123,255,.15), transparent 24%),
    linear-gradient(180deg, #08111f 0%, #091423 48%, #07101d 100%);
}
button, input, select, textarea { font:inherit; }
code, pre { font-family: "Cascadia Code", Consolas, monospace; }
.app-shell {
  display:grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap:24px;
  padding:24px;
}
.sidebar {
  position:sticky;
  top:24px;
  align-self:start;
  display:flex;
  flex-direction:column;
  gap:18px;
}
.brand-card, .sidebar-panel, .section-card, .output-card, .metric-card {
  background:linear-gradient(180deg, rgba(19,35,61,.92), rgba(11,23,40,.92));
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.brand-card {
  padding:20px;
  display:flex;
  align-items:center;
  gap:14px;
}
.brand-card__logo {
  width:54px;
  height:54px;
  border-radius:18px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg, var(--accent), var(--accent-2));
  color:white;
  font-size:24px;
  font-weight:800;
}
.brand-card__title { font-size:24px; font-weight:800; letter-spacing:.02em; }
.brand-card__subtitle { color:var(--muted); margin-top:4px; }
.sidebar-section { padding:4px 2px; }
.sidebar-title, .eyebrow, .section-chip, .metric-card__label { text-transform:uppercase; letter-spacing:.08em; font-size:12px; color:#aac2f5; }
.nav-grid { display:grid; gap:10px; }
.nav-chip {
  appearance:none; border:1px solid var(--line);
  background:rgba(255,255,255,.03); color:var(--text);
  border-radius:16px; padding:13px 16px; text-align:left; cursor:pointer;
  transition:.18s ease;
}
.nav-chip:hover, .nav-chip.is-active { background:rgba(104,164,255,.14); border-color:rgba(104,164,255,.42); transform:translateY(-1px); }
.sidebar-panel { padding:18px; display:grid; gap:14px; }
.sidebar-panel--compact { gap:12px; }
.field { display:grid; gap:8px; }
.field span { color:#cbdaff; font-size:14px; }
input, select, textarea {
  width:100%;
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px 14px;
  color:var(--text);
  background:rgba(4,10,19,.58);
  outline:none;
}
input:focus, select:focus, textarea:focus {
  border-color:rgba(104,164,255,.6);
  box-shadow:0 0 0 4px rgba(104,164,255,.12);
}
textarea { resize:vertical; min-height:88px; }
.list-select { min-height:258px; }
.toggle-row {
  display:flex; gap:12px; align-items:flex-start;
  color:#d5e1ff; padding:10px 12px;
  border-radius:14px; border:1px solid var(--line);
  background:rgba(255,255,255,.03);
}
.toggle-row input { width:18px; height:18px; margin-top:2px; accent-color:var(--accent); }
.hint-box {
  font-size:13px; color:var(--muted);
  border:1px dashed var(--line-strong);
  background:rgba(255,255,255,.03);
  border-radius:14px; padding:12px 14px;
}
.pill-list { display:flex; flex-wrap:wrap; gap:8px; }
.mini-pill, .section-chip {
  display:inline-flex; align-items:center; gap:8px;
  padding:7px 11px; border-radius:999px;
  background:rgba(104,164,255,.12); border:1px solid rgba(104,164,255,.2);
}
.workspace { display:grid; gap:20px; min-width:0; }
.topbar {
  display:flex; justify-content:space-between; gap:18px; align-items:flex-start;
  padding:8px 4px 2px;
}
.topbar h1 { margin:6px 0 8px; font-size:38px; line-height:1.05; }
.topbar p { margin:0; color:var(--muted); max-width:860px; }
.status-cluster { display:grid; gap:12px; min-width:240px; }
.status-box {
  display:flex; align-items:center; gap:10px;
  padding:14px 16px; border-radius:18px;
  background:linear-gradient(180deg, rgba(15,26,45,.94), rgba(10,18,33,.94));
  border:1px solid var(--line);
}
.status-box--muted { justify-content:space-between; color:var(--muted); }
.status-box--muted strong { color:var(--text); }
.status-dot {
  width:11px; height:11px; border-radius:50%; background:var(--green);
  box-shadow:0 0 16px rgba(44,209,139,.9);
  transition:.18s ease;
}
.status-box.is-ready .status-dot {
  background:var(--green);
  box-shadow:0 0 16px rgba(44,209,139,.9);
}
.status-box.is-busy {
  border-color:rgba(255,110,134,.38);
}
.status-box.is-busy .status-dot {
  background:var(--red);
  box-shadow:0 0 18px rgba(255,110,134,.95);
}
.status-box.is-busy #statusText { color:#ffdce3; }
.overview-grid {
  display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:16px;
}
.metric-card { padding:18px; }
.metric-card__value { font-size:26px; font-weight:800; margin:8px 0 6px; }
.metric-card__sub { color:var(--muted); font-size:13px; }
.tab { display:none; gap:16px; }
.tab.is-active { display:grid; }
.section-card { padding:22px; }
.section-card--hero {
  display:flex; align-items:center; justify-content:space-between; gap:18px;
  background:
    radial-gradient(circle at right top, rgba(104,164,255,.12), transparent 25%),
    linear-gradient(180deg, rgba(19,35,61,.95), rgba(10,18,33,.96));
}
.section-card h2 { margin:10px 0 8px; font-size:28px; }
.section-card p { margin:0; color:var(--muted); max-width:860px; }
.section-actions { display:flex; flex-wrap:wrap; gap:10px; }
.control-grid { display:grid; gap:14px; }
.control-grid--2 { grid-template-columns:repeat(2, minmax(0, 1fr)); }
.control-grid--3 { grid-template-columns:repeat(3, minmax(0, 1fr)); }
.field--wide { grid-column:span 2; }
.split-box .stack-box { display:grid; gap:14px; }
.btn {
  appearance:none; cursor:pointer; border:none;
  background:#1a2947; color:var(--text);
  border-radius:16px; padding:12px 16px; font-weight:700;
  border:1px solid var(--line); transition:.18s ease;
}
.btn:hover { transform:translateY(-1px); border-color:var(--line-strong); }
.btn-primary { background:linear-gradient(135deg, var(--accent), var(--accent-2)); color:white; border:none; }
.btn-danger { background:linear-gradient(135deg, #ff6e86, #ff8e63); color:white; border:none; }
.btn-ghost { background:rgba(255,255,255,.04); }
.output-card { overflow:hidden; }
.output-head {
  display:flex; align-items:flex-start; justify-content:space-between; gap:16px;
  padding:22px 22px 14px; border-bottom:1px solid var(--line);
}
.output-head h3 { margin:10px 0 6px; font-size:24px; }
.muted { color:var(--muted); }
.segmented { display:flex; gap:8px; flex-wrap:wrap; }
.segmented__btn {
  appearance:none; cursor:pointer; border-radius:12px; padding:10px 12px;
  border:1px solid var(--line); background:#0d1830; color:#cfe0ff;
}
.segmented__btn.is-active { background:rgba(104,164,255,.14); border-color:rgba(104,164,255,.4); }
.output-body { padding:22px; }
.output-pane { display:none; }
.output-pane.is-active { display:block; }
pre {
  margin:0; white-space:pre-wrap; word-break:break-word;
  background:#081120; border:1px solid var(--line);
  border-radius:18px; padding:16px; color:#d7e8ff;
  max-height:620px; overflow:auto;
}
.friendly-zone { display:grid; gap:14px; min-width:0; }
.friendly-zone--cards, .stats-grid, .kv-list {
  display:grid; gap:14px; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
}
.stat-card, .kv-item, .notice, .table-card {
  border:1px solid var(--line); border-radius:18px; padding:16px;
  background:linear-gradient(180deg, rgba(17,31,55,.92), rgba(10,18,32,.92));
}
.stat-card__label, .kv-item__key { color:var(--muted); font-size:12px; text-transform:uppercase; letter-spacing:.08em; }
.stat-card__value, .kv-item__value { font-size:24px; font-weight:800; margin:8px 0 4px; word-break:break-word; }
.stat-card__sub { color:var(--muted); font-size:12px; }
.notice { color:#f0f5ff; }
.notice.ok { border-color:rgba(44,209,139,.35); background:rgba(44,209,139,.09); }
.notice.error { border-color:rgba(255,110,134,.32); background:rgba(255,110,134,.08); }
.table-wrap {
  overflow:auto; border:1px solid var(--line); border-radius:18px;
  background:#081120;
}
table { width:100%; border-collapse:collapse; min-width:780px; }
th, td { padding:12px 14px; border-bottom:1px solid rgba(255,255,255,.06); text-align:left; vertical-align:top; }
th {
  position:sticky; top:0; z-index:1;
  background:#0d1930; color:#bad0ff; text-transform:uppercase; letter-spacing:.06em; font-size:12px;
}
tr:hover td { background:rgba(104,164,255,.05); }
.pill {
  display:inline-flex; align-items:center; border-radius:999px; padding:8px 12px;
  border:1px solid rgba(104,164,255,.22); background:rgba(104,164,255,.1); color:#dbe8ff;
}
.section-gap { margin-top:8px; }

.table-wrap--manet table { min-width:980px; }
.manet-table td, .manet-table th { white-space:nowrap; }
.manet-row--bad td { background:rgba(255,110,134,.045); }
.manet-row--warn td { background:rgba(255,193,93,.045); }
.status-badge, .band-badge, .battery-badge {
  display:inline-flex; align-items:center; justify-content:center;
  min-width:34px; padding:5px 9px; border-radius:999px;
  font-size:12px; font-weight:800; letter-spacing:.04em;
  border:1px solid var(--line);
}
.status-badge--ok, .battery-badge--ok {
  color:#bff7df; border-color:rgba(44,209,139,.36); background:rgba(44,209,139,.10);
}
.status-badge--warn, .battery-badge--warn {
  color:#ffe2a8; border-color:rgba(255,193,93,.38); background:rgba(255,193,93,.10);
}
.status-badge--bad, .battery-badge--bad {
  color:#ffd2da; border-color:rgba(255,110,134,.38); background:rgba(255,110,134,.10);
}
.band-badge--s {
  color:#dbe8ff; border-color:rgba(104,164,255,.35); background:rgba(104,164,255,.10);
}
.band-badge--c {
  color:#eee5ff; border-color:rgba(140,123,255,.35); background:rgba(140,123,255,.12);
}
.band-badge--unknown {
  color:var(--muted); background:rgba(255,255,255,.04);
}
.manet-summary--compact { grid-template-columns:repeat(3, minmax(0, 1fr)); }
.table-wrap--throughput table { min-width:1180px; }
.throughput-table td, .throughput-table th { white-space:nowrap; }
.throughput-row--bad td { background:rgba(255,110,134,.045); }
.throughput-row--warn td { background:rgba(255,193,93,.045); }
.speed-badge {
  display:inline-flex; align-items:center; justify-content:center;
  min-width:78px; padding:5px 9px; border-radius:999px;
  font-size:12px; font-weight:800; letter-spacing:.03em;
  border:1px solid var(--line);
}
.speed-badge--ok {
  color:#bff7df; border-color:rgba(44,209,139,.36); background:rgba(44,209,139,.10);
}
.speed-badge--bad {
  color:#ffd2da; border-color:rgba(255,110,134,.38); background:rgba(255,110,134,.10);
}
.mini-muted { color:var(--muted); font-size:12px; margin-left:4px; }
.throughput-summary--compact { grid-template-columns:repeat(4, minmax(0, 1fr)); }
.groupget-summary--compact { grid-template-columns:repeat(4, minmax(0, 1fr)); }
.table-wrap--groupget table { min-width:1100px; }
.groupget-table td, .groupget-table th { white-space:nowrap; }
.groupget-value { white-space:normal; max-width:520px; }
.groupget-value code { white-space:pre-wrap; word-break:break-word; }
.groupget-row--bad td { background:rgba(255,110,134,.045); }
.groupget-row--warn td { background:rgba(255,193,93,.045); }
@media (max-width: 1280px) {
  .app-shell { grid-template-columns:1fr; }
  .sidebar { position:relative; top:0; }
  .overview-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .app-shell { padding:16px; gap:16px; }
  .topbar, .section-card--hero, .output-head { flex-direction:column; }
  .overview-grid, .control-grid--2, .control-grid--3 { grid-template-columns:1fr; }
  .field--wide { grid-column:span 1; }
  .topbar h1 { font-size:30px; }
}


.session-box {
  display: grid;
  gap: 10px;
}
.session-box__user {
  padding: 10px 12px;
  border: 1px solid rgba(132, 156, 255, 0.2);
  border-radius: 12px;
  background: rgba(10, 19, 45, 0.75);
  color: var(--text);
  font-weight: 600;
}
.btn-block {
  display: inline-flex;
  width: 100%;
  justify-content: center;
}
.login-body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 42%, rgba(31, 125, 255, 0.30), transparent 32%),
    radial-gradient(circle at 70% 18%, rgba(140, 123, 255, 0.18), transparent 28%),
    linear-gradient(135deg, #030814 0%, #071225 48%, #030814 100%);
}
.login-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.30;
  background-image:
    linear-gradient(rgba(104, 164, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(104, 164, 255, 0.12) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 46% 50%, #000 0%, transparent 72%);
}
.login-page {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 48px));
  min-height: min(720px, calc(100vh - 48px));
  display: grid;
  grid-template-columns: minmax(420px, 1.08fr) minmax(360px, 0.82fr);
  gap: clamp(28px, 5vw, 78px);
  align-items: center;
}
.login-hero {
  position: relative;
  min-height: 640px;
  display: grid;
  place-items: center;
}
.login-hero__backdrop {
  position: absolute;
  width: min(620px, 92%);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(66, 169, 255, 0.22), transparent 58%),
    repeating-radial-gradient(circle, rgba(104, 164, 255, 0.26) 0 1px, transparent 1px 64px);
  box-shadow: 0 0 80px rgba(35, 124, 255, 0.22);
}
.login-hero__backdrop::before,
.login-hero__backdrop::after {
  content: "";
  position: absolute;
  inset: 14%;
  border: 1px solid rgba(104, 164, 255, 0.22);
  border-radius: 50%;
}
.login-hero__backdrop::after {
  inset: 29%;
  border-color: rgba(104, 228, 255, 0.18);
}
.login-hero__image {
  position: relative;
  width: min(640px, 100%);
  max-height: 82vh;
  object-fit: contain;
  filter: drop-shadow(0 34px 40px rgba(0, 0, 0, 0.55));
}
.login-card {
  width: min(100%, 430px);
  justify-self: center;
  padding: clamp(28px, 4vw, 42px);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(16, 29, 58, 0.86), rgba(7, 14, 30, 0.92)),
    rgba(8, 16, 34, 0.78);
  border: 1px solid rgba(160, 190, 255, 0.22);
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
}
.login-card h1 {
  margin: 0 0 28px;
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}
.login-form {
  display: grid;
  gap: 16px;
}
.login-form .field span {
  color: #d9e5ff;
  font-weight: 650;
}
.login-form input {
  min-height: 56px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(10, 22, 46, 0.78);
  border-color: rgba(165, 192, 255, 0.20);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.login-form input::placeholder {
  color: rgba(222, 232, 255, 0.62);
}
.login-form .btn-primary {
  min-height: 58px;
  margin-top: 12px;
  border-radius: 18px;
  font-size: 16px;
  box-shadow: 0 16px 34px rgba(81, 115, 255, 0.24);
}
.login-card .notice {
  margin-bottom: 18px;
}

@media (max-width: 920px) {
  .login-page {
    width: min(100% - 32px, 520px);
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 34px 0;
  }
  .login-hero {
    min-height: 260px;
  }
  .login-hero__image {
    width: min(360px, 88%);
  }
  .login-hero__backdrop {
    width: min(390px, 92%);
  }
  .login-card {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .login-page {
    width: min(100% - 24px, 420px);
    padding: 24px 0;
  }
  .login-hero {
    min-height: 220px;
  }
  .login-hero__image {
    width: min(310px, 94%);
  }
  .login-card {
    padding: 24px;
    border-radius: 22px;
  }
  .login-card h1 {
    font-size: 30px;
  }
}
