/* Cold SMS Console — Tier1-style dark theme
   ink #0A0A0B · brand #22D3EE / deep #1FA8E8 · bone #F8F8F9
   chart series: #0891B2 #8B5CF6 #D97706 #2563EB (validated dark)
   status: healthy #059669 · degraded #D97706 · blocked #E11D48 · untested/no_number gray */
:root {
  --ink: #0A0A0B;
  --surface: #141417;
  --surface2: #1B1B20;
  --line: rgba(255, 255, 255, .08);
  --line2: rgba(255, 255, 255, .14);
  --bone: #F8F8F9;
  --text2: #9CA3AF;
  --muted: #6B7280;
  --brand: #22D3EE;
  --brand-deep: #1FA8E8;
  --blue: #3B82F6;
  --c1: #0891B2; --c2: #8B5CF6; --c3: #D97706; --c4: #2563EB;
  --good: #059669; --warn: #D97706; --serious: #E11D48;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--bone);
  font-family: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}
.mono { font-family: "Geist Mono", ui-monospace, SFMono-Regular, monospace; }

/* ambient glow */
.glow {
  position: fixed; pointer-events: none; z-index: 0;
  width: 640px; height: 640px; border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, .13), transparent 65%);
  filter: blur(64px);
  top: -260px; right: -160px;
}
.glow.b { top: auto; right: auto; bottom: -300px; left: -200px; background: radial-gradient(circle, rgba(37, 99, 235, .10), transparent 65%); }

/* layout */
.shell { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: 0 24px 80px; }
header.top {
  display: flex; align-items: center; gap: 20px;
  padding: 18px 0; margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -.02em; }
.logo .dot { width: 10px; height: 10px; border-radius: 3px; background: linear-gradient(135deg, var(--brand), var(--brand-deep)); box-shadow: 0 0 14px rgba(34, 211, 238, .6); }
nav.tabs { display: flex; gap: 4px; margin-left: 12px; }
nav.tabs a {
  color: var(--text2); text-decoration: none; padding: 7px 14px; border-radius: 9px;
  font-weight: 500; transition: all .15s;
}
nav.tabs a:hover { color: var(--bone); background: rgba(255, 255, 255, .05); }
nav.tabs a.active { color: var(--ink); background: var(--brand); font-weight: 600; }
.spacer { flex: 1; }

/* notification bell */
.bell { position: relative; }
.bell > button {
  background: var(--surface); border: 1px solid var(--line2); color: var(--bone);
  width: 38px; height: 38px; border-radius: 11px; cursor: pointer; font-size: 16px;
}
.bell > button:hover { border-color: var(--brand); }
.badge {
  position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--serious); color: #fff; border-radius: 9px;
  font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.notif-panel {
  position: absolute; right: 0; top: 48px; width: 400px; max-height: 480px; overflow-y: auto;
  background: var(--surface2); border: 1px solid var(--line2); border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6); z-index: 50; display: none;
}
.notif-panel.open { display: block; }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface2); }
.notif-item { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; }
.notif-item.unread { background: rgba(34, 211, 238, .04); }
.notif-item .sev { flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; }
.sev.info { background: var(--brand); } .sev.warning { background: var(--warn); } .sev.critical { background: var(--serious); }
.notif-item h4 { font-size: 13px; font-weight: 600; }
.notif-item p { font-size: 12px; color: var(--text2); margin-top: 2px; }
.notif-item time { font-size: 11px; color: var(--muted); }

/* cards & grid */
.grid { display: grid; gap: 14px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g31 { grid-template-columns: 2fr 1fr; }
@media (max-width: 900px) { .g4 { grid-template-columns: repeat(2, 1fr); } .g2, .g31 { grid-template-columns: 1fr; } }
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .012));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  backdrop-filter: blur(12px);
}
.card h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text2); font-weight: 600; margin-bottom: 10px; }
section.block { margin-top: 22px; }

/* stat tiles */
.tile .big { font-size: 32px; font-weight: 700; letter-spacing: -.03em; font-family: "Geist Mono", monospace; }
.tile .sub { font-size: 12px; color: var(--text2); margin-top: 2px; }
.tile .delta-good { color: var(--good); } .tile .delta-bad { color: var(--serious); }

/* buttons & forms */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--brand); color: var(--ink); border: none;
  font-weight: 600; font-size: 14px; font-family: inherit; padding: 10px 18px; border-radius: 10px;
  transition: all .15s;
}
.btn:hover { background: #5EE5FB; box-shadow: 0 0 24px rgba(34, 211, 238, .35); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--bone); border: 1px solid var(--line2); }
.btn.ghost:hover { border-color: var(--brand); box-shadow: none; color: var(--brand); }
.btn.danger { background: transparent; border: 1px solid var(--serious); color: var(--serious); }
label.f { display: block; font-size: 12px; color: var(--text2); font-weight: 500; margin-bottom: 5px; }
input.f, select.f, textarea.f {
  width: 100%; background: var(--ink); color: var(--bone); border: 1px solid var(--line2);
  border-radius: 10px; padding: 9px 12px; font-size: 14px; font-family: inherit; outline: none;
}
input.f:focus, textarea.f:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(34, 211, 238, .15); }
.frow { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 14px; }

/* progress */
.progress { height: 10px; background: rgba(255, 255, 255, .07); border-radius: 5px; overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--brand-deep), var(--brand)); border-radius: 5px; transition: width .6s; }

/* status pills */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.healthy { color: #34D399; background: rgba(5, 150, 105, .13); }
.pill.degraded { color: #FBBF24; background: rgba(217, 119, 6, .13); }
.pill.blocked { color: #FB7185; background: rgba(225, 29, 72, .13); }
.pill.untested, .pill.no_number { color: var(--text2); background: rgba(255, 255, 255, .07); }
.pill.untested::before, .pill.no_number::before { border-radius: 1px; } /* shape, not just color */

/* tables */
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; color: var(--text2); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 8px 10px; border-bottom: 1px solid var(--line2); cursor: pointer; user-select: none; white-space: nowrap; }
table.t td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
table.t tr:hover td { background: rgba(255, 255, 255, .025); }
.num { font-family: "Geist Mono", monospace; text-align: right; }
th.num { text-align: right; }
.scroll-x { overflow-x: auto; }

/* charts */
.chart-wrap { position: relative; }
svg text { font-family: "Geist", sans-serif; }
.tooltip {
  position: fixed; z-index: 100; pointer-events: none; display: none;
  background: var(--surface2); border: 1px solid var(--line2); border-radius: 10px;
  padding: 8px 12px; font-size: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); max-width: 280px;
}
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--text2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* tutorial */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.step { border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.step .n { width: 26px; height: 26px; border-radius: 8px; background: rgba(34, 211, 238, .14); color: var(--brand); font-weight: 700; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; font-family: "Geist Mono", monospace; font-size: 13px; }
.step h4 { font-size: 13px; margin-bottom: 4px; }
.step p { font-size: 12px; color: var(--text2); }

/* filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { background: transparent; border: 1px solid var(--line2); color: var(--text2); padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 500; cursor: pointer; font-family: inherit; }
.chip.active { background: rgba(34, 211, 238, .13); border-color: var(--brand); color: var(--brand); }

.toast { position: fixed; bottom: 24px; right: 24px; background: var(--surface2); border: 1px solid var(--line2); border-left: 3px solid var(--brand); border-radius: 10px; padding: 12px 18px; z-index: 200; box-shadow: 0 16px 40px rgba(0,0,0,.5); display: none; }
.keybar { display: none; gap: 8px; align-items: center; background: rgba(225,29,72,.08); border: 1px solid rgba(225,29,72,.35); padding: 10px 14px; border-radius: 10px; margin-top: 14px; }
.keybar.show { display: flex; }
h2.page { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin: 24px 0 4px; }
p.pagesub { color: var(--text2); margin-bottom: 6px; }
.empty { color: var(--muted); text-align: center; padding: 30px 0; font-size: 13px; }
a.link { color: var(--brand); text-decoration: none; }
