:root {
  --navy: #0b2341;
  --navy-deep: #08182e;
  --navy-mid: #143056;
  --navy-active: #1b3f6c;
  --page: #eef1f6;
  --card: #ffffff;
  --ink: #1a2740;
  --muted: #6b7789;
  --subtle: #8b95a5;
  --line: #e4e8ee;
  --airtel: #e4002b;
  --online: #1f9d55;
  --online-soft: #e8f7ee;
  --offline: #c98412;
  --offline-soft: #fef4dc;
  --total-soft: #eef2f6;
  --danger: #c62828;
  --focus: #2a6fdb;
  --shadow: 0 0 0 1px rgba(15, 36, 64, 0.04), 0 1px 2px rgba(15, 36, 64, 0.04),
    0 8px 24px rgba(15, 36, 64, 0.05);
  --shadow-modal: 0 24px 64px rgba(8, 24, 46, 0.22);
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--page); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
button:not(:disabled), [role="button"] { cursor: pointer; }
button { font-family: inherit; }
input, select { font-family: inherit; }
h1, h2, h3 { text-wrap: balance; }
.app { min-height: 100dvh; }

.login-wash {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 420px at 80% -10%, rgba(228, 0, 43, 0.06), transparent 60%),
    radial-gradient(700px 380px at -10% 110%, rgba(11, 35, 65, 0.08), transparent 55%),
    var(--page);
}
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 20px 32px; }
.login-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.card { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); }
.login-card { width: min(420px, 100%); padding: 32px; }
.login-card h1 { margin: 0; font-size: 24px; letter-spacing: -0.03em; }
.login-card .sub { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
form.stack { display: grid; gap: 16px; margin-top: 24px; }
label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--navy); }
.field { width: 100%; height: 44px; border: 0; border-radius: 12px; padding: 0 14px; font-size: 14px; color: var(--ink); background: #fff; box-shadow: 0 0 0 1px rgba(15,36,64,.12); outline: none; }
.field:focus { box-shadow: 0 0 0 2px var(--focus); }
.pw-wrap { position: relative; }
.pw-wrap .field { padding-right: 48px; }
.icon-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: transparent; color: var(--muted); border-radius: 8px; }
.err { color: var(--danger); font-size: 12px; font-weight: 600; min-height: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 16px; border: 0; border-radius: 12px; font-size: 14px; font-weight: 600; color: #fff; background: var(--navy); transition: transform .15s ease, background .15s ease; }
.btn:hover { background: var(--navy-mid); }
.btn:active { transform: scale(0.96); }
.btn-lg { height: 48px; width: 100%; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #a51f1f; }
.btn-secondary { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px rgba(15,36,64,.1); }
.btn-secondary:hover { background: var(--total-soft); }
.foot { padding: 20px; text-align: center; color: var(--subtle); font-size: 12px; }

.shell { max-width: 1440px; margin: 0 auto; min-height: 100dvh; padding: 16px; display: flex; flex-direction: column; }
.header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 4px 8px 16px; }
.header h1 { margin: 0; text-align: center; font-size: 22px; letter-spacing: -0.03em; color: var(--navy); }
.header-right { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.noc { color: var(--muted); font-size: 14px; font-weight: 500; }
.body { display: flex; gap: 16px; flex: 1; min-height: 0; }
.aside { width: 212px; flex-shrink: 0; background: var(--navy); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: rgba(255,255,255,.7); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav a.active { background: var(--navy-active); color: #fff; }
.nav a:hover { color: #fff; }
.badge { margin-left: auto; background: var(--offline); color: var(--navy-deep); border-radius: 999px; padding: 2px 6px; font-size: 11px; font-weight: 700; }
.signout { margin-top: auto; background: transparent; border: 0; color: rgba(255,255,255,.55); text-align: left; padding: 10px 12px; border-radius: 12px; font-size: 14px; font-weight: 500; }
.signout:hover { background: rgba(255,255,255,.1); color: #fff; }
.main { flex: 1; min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.stat { display: flex; align-items: center; gap: 16px; background: var(--card); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); }
.stat-ico { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.stat-ico.total { background: var(--total-soft); color: var(--navy); }
.stat-ico.online { background: var(--online-soft); color: var(--online); }
.stat-ico.offline { background: var(--offline-soft); color: var(--offline); }
.stat p { margin: 0; }
.stat .lbl { font-size: 14px; font-weight: 500; color: var(--muted); }
.stat .val { font-size: 32px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.stat .val.online { color: var(--online); }
.stat .val.offline { color: var(--offline); }

.panel { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; gap: 12px; padding: 20px 20px 16px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; flex: 1; font-size: 18px; }
.toolbar { display: flex; gap: 8px; flex: 1; max-width: 420px; min-width: 220px; }
.search { position: relative; flex: 1; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--subtle); }
.search .field { padding-left: 36px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 720px; border-collapse: collapse; text-align: left; }
th { padding: 12px 20px; font-size: 13px; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); }
td { padding: 14px 20px; font-size: 14px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: 0.02em; }
.pill { display: inline-flex; min-width: 76px; justify-content: center; padding: 4px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; }
.pill.on { background: var(--online-soft); color: var(--online); }
.pill.off { background: var(--offline-soft); color: var(--offline); }
.del { width: 40px; height: 40px; border: 0; background: transparent; color: var(--muted); border-radius: 12px; }
.del:hover { background: #fef2f2; color: var(--danger); }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--total-soft); }
.details-modal { width: min(760px, 100%); max-height: calc(100vh - 2.5rem); overflow-y: auto; }
.details-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.details-head h3 { margin: 0; font-size: 18px; }
.details-meta { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.details-id { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 0 12px; background: var(--total-soft); border-radius: 12px; overflow: hidden; }
.details-id div { padding: 10px 12px; }
.details-id dt { font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.details-id dd { margin: 4px 0 0; font-size: 13px; font-weight: 500; word-break: break-all; }
.section-lbl { margin: 0 0 8px; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.details-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; }
.kpi { background: var(--total-soft); border-radius: 12px; padding: 10px 12px; }
.kpi-lbl { font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 0; }
.kpi-num { font-family: var(--mono); font-size: 18px; font-weight: 600; margin: 2px 0 0; color: var(--navy); }
.kpi-num.good { color: var(--online); }
.kpi-num.fair { color: var(--offline); }
.kpi-num.poor { color: var(--danger); }
.radio-meta { margin: 0 0 12px; font-size: 12px; color: var(--muted); }
.beat-wrap { overflow: hidden; border-radius: 12px; box-shadow: 0 0 0 1px var(--line); }
.beat-table { width: 100%; min-width: 0; border-collapse: collapse; text-align: left; }
.beat-table th { padding: 10px 12px; font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; background: var(--total-soft); border-bottom: 0; }
.beat-table td { padding: 8px 12px; font-size: 13px; border-bottom: 1px solid var(--line); }
.beat-table tr:last-child td { border-bottom: 0; }
.beat-table td.good { color: var(--online); font-weight: 600; }
.beat-table td.fair { color: var(--offline); font-weight: 600; }
.beat-table td.poor { color: var(--danger); font-weight: 600; }
.hint { padding: 16px 20px; font-size: 13px; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 40px 20px !important; }
.lockup { display: flex; align-items: center; gap: 12px; }
.lockup .meta { font-size: 11px; font-weight: 500; color: var(--muted); margin-top: 4px; letter-spacing: 0.02em; }
.menu-btn { display: none; width: 44px; height: 44px; border: 0; background: transparent; color: var(--navy); border-radius: 12px; }
.overlay { display: none; }
.airtel-logo { height: 32px; width: auto; display: block; }
.vida-logo { height: 22px; width: auto; display: block; }
.note { padding: 20px; color: var(--muted); font-size: 14px; }
.dl { display: grid; gap: 16px; padding: 0; margin: 24px 0 0; }
.dl div { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 500; }

.modal-bg { position: fixed; inset: 0; background: rgba(8,24,46,.45); z-index: 40; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { width: min(520px, 100%); background: #fff; border-radius: 18px; padding: 24px; box-shadow: var(--shadow-modal); }
.modal h3 { margin: 0; font-size: 18px; }
.modal p.desc { margin: 6px 0 16px; color: var(--muted); font-size: 14px; }
.grid2 { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.hidden { display: none !important; }

@media (max-width: 960px) {
  .header { grid-template-columns: auto 1fr auto; }
  .header h1 { display: none; }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .aside { display: none; }
  .aside.open { display: flex; position: fixed; z-index: 30; inset: 0 auto 0 0; width: min(280px, 86vw); border-radius: 0; }
  .overlay.open { display: block; position: fixed; inset: 0; background: rgba(8,24,46,.45); z-index: 20; }
  .stats { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .details-id, .details-kpis { grid-template-columns: 1fr 1fr; }
  .noc { display: none; }
}
