:root {
  --bg: #08111f;
  --panel: #101b2d;
  --panel-2: #14233a;
  --text: #f4f8ff;
  --muted: #9fb0c7;
  --line: #253650;
  --brand: #00d8ff;
  --danger: #ff5570;
  --ok: #59d98e;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif; background: radial-gradient(circle at top, #10213a, var(--bg)); color: var(--text); }
.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 32px 0 64px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(28px, 5vw, 44px); }
h2 { margin-bottom: 16px; }
.eyebrow { margin-bottom: 4px; color: var(--brand); text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 800; }
.client-brand { display: inline-grid; gap: 4px; margin-bottom: 10px; }
.client-logo { display: block; width: 132px; max-width: 42vw; height: auto; object-fit: contain; border-radius: 6px; }
.client-brand span { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.card { background: rgba(16, 27, 45, .92); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.narrow { max-width: 460px; }
.stack { display: grid; gap: 14px; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: 380px 1fr; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 14px; }
input, select { width: 100%; padding: 12px 13px; background: #07101d; border: 1px solid var(--line); border-radius: 12px; color: var(--text); font: inherit; }
input:focus, select:focus { outline: 2px solid rgba(0,216,255,.35); border-color: var(--brand); }
.check { display: flex; align-items: center; gap: 10px; }
.check input { width: auto; }
button { border: 0; border-radius: 12px; padding: 12px 16px; background: var(--brand); color: #03101a; font-weight: 800; cursor: pointer; }
button:hover { filter: brightness(1.08); }
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
button.danger { color: #fff; border-color: rgba(255,85,112,.4); background: rgba(255,85,112,.18); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tab { background: var(--panel); color: var(--muted); border: 1px solid var(--line); }
.tab.active { color: #03101a; background: var(--brand); }
.panel { display: none; }
.panel.active { display: block; }
.list { display: grid; gap: 10px; }
.item { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--line); background: var(--panel-2); border-radius: 14px; }
.item-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.item-title { font-weight: 800; }
.item-meta { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { display: inline-flex; width: max-content; padding: 4px 8px; border-radius: 99px; font-size: 12px; font-weight: 800; background: rgba(159,176,199,.18); color: var(--muted); }
.badge.on { background: rgba(89,217,142,.15); color: var(--ok); }
.badge.off { background: rgba(255,85,112,.15); color: var(--danger); }
.toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 12px; }
.toast { position: fixed; right: 18px; bottom: 18px; padding: 13px 16px; background: #03101a; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.35); }
@media (max-width: 820px) { .grid.two { grid-template-columns: 1fr; } .topbar { align-items: flex-start; } }

.top-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; margin: 10px 0 0; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(7,16,29,.65); font-size: 13px; }
.status-pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 3px rgba(159,176,199,.12); }
.status-pill.ok { color: var(--ok); border-color: rgba(89,217,142,.35); }
.status-pill.ok::before { background: var(--ok); box-shadow: 0 0 0 3px rgba(89,217,142,.14); }
.status-pill.bad { color: var(--danger); border-color: rgba(255,85,112,.35); }
.status-pill.bad::before { background: var(--danger); box-shadow: 0 0 0 3px rgba(255,85,112,.14); }
.counter { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 28px; padding: 0 10px; border-radius: 999px; background: rgba(0,216,255,.12); color: var(--brand); font-size: 13px; font-weight: 900; }
.skeleton { min-height: 62px; border-radius: 14px; background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.1), rgba(255,255,255,.05)); background-size: 220% 100%; animation: shimmer 1.2s infinite linear; border: 1px solid var(--line); }
@keyframes shimmer { from { background-position: 220% 0; } to { background-position: -220% 0; } }
button:disabled { cursor: not-allowed; opacity: .58; filter: grayscale(.2); }
body.busy button, body.busy input, body.busy select { transition: opacity .15s ease; }
.toast.success { border-color: rgba(89,217,142,.5); }
.toast.error { border-color: rgba(255,85,112,.55); color: #ffdce3; }
.empty-state { padding: 18px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); background: rgba(7,16,29,.45); }
@media (max-width: 560px) {
  .shell { width: min(100% - 20px, 1180px); padding-top: 20px; }
  .topbar { display: grid; }
  .client-logo { width: 116px; }
  .top-actions { width: 100%; }
  .top-actions button { flex: 1; }
  .tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .toolbar { align-items: flex-start; }
  button { width: 100%; }
  .actions button { width: auto; }
}
