/* ═══════════════════════════════════════════════════════════════════════════
   Zopi Guard — UI stylesheet
   Design language: Zopi Phone 2 (design_handoff_zopi_phone). Theme tokens are
   copied verbatim from react-poc/src/tokens.css so both apps read as one family:
   40px titlebar · 52px icon rail · Syne titles · DM Mono figures and eyebrows ·
   2px cyan rule · 8px controls · hairline rows · dark and light themes.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Fonts are bundled so the app renders the same on an offline server. */
@font-face { font-family: 'DM Sans'; font-weight: 100 1000; font-display: swap; src: url('./fonts/dm-sans.woff2') format('woff2'); }
@font-face { font-family: 'Syne';    font-weight: 400 800;  font-display: swap; src: url('./fonts/syne.woff2') format('woff2'); }
@font-face { font-family: 'DM Mono'; font-weight: 400;      font-display: swap; src: url('./fonts/dm-mono-400.woff2') format('woff2'); }
@font-face { font-family: 'DM Mono'; font-weight: 500;      font-display: swap; src: url('./fonts/dm-mono-500.woff2') format('woff2'); }

:root {
  /* Brand core (shared with Zopi Phone 2) */
  --zp-navy: #0D1B2A;
  --zp-cyan: #00C2FF;
  --zp-cyan-600: #00A8E0;
  --zp-cyan-700: #008FBD;
  --zp-violet: #7B2FBE;
  --zp-green: #1FA971;
  --zp-green-press: #1B9464;
  --zp-amber: #E0941B;
  --zp-red: #E0414B;
  --zp-red-press: #C93840;

  --font-display: 'Syne', system-ui, sans-serif;
  --font-ui: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'DM Mono', ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark theme (default) */
:root, :root[data-theme="dark"] {
  --zp-page:      #071019;
  --zp-chrome:    #0A1420;
  --zp-bg:        #0D1B2A;
  --zp-surface:   #16273A;
  --zp-surface-2: #101F2E;
  --zp-raised:    #1B2E43;
  --zp-border:    #23374D;
  --zp-hairline:  #182839;
  --zp-text:      #FFFFFF;
  --zp-text-2:    #A9B7C7;
  --zp-muted:     #6E8098;
  --zp-shadow:    rgba(0,0,0,0.45);
  --zp-tint:      0.14;   /* status fill strength */
  color-scheme: dark;
}

:root[data-theme="light"] {
  --zp-page:      #E7ECF1;
  --zp-chrome:    #FFFFFF;
  --zp-bg:        #FFFFFF;
  --zp-surface:   #F4F6F8;
  --zp-surface-2: #FFFFFF;
  --zp-raised:    #EDF1F5;
  --zp-border:    #E2E8F0;
  --zp-hairline:  #E9EEF3;
  --zp-text:      #0D1B2A;
  --zp-text-2:    #2D3748;
  --zp-muted:     #8A9BB0;
  --zp-shadow:    rgba(13,27,42,0.16);
  --zp-tint:      0.10;
  color-scheme: light;
}

/* Aliases for inline styles written by app.js before this redesign */
:root {
  --tx: var(--zp-text); --tx2: var(--zp-text-2); --tx3: var(--zp-muted); --muted: var(--zp-muted);
  --border: var(--zp-hairline); --danger: var(--zp-red); --success: var(--zp-green); --font: var(--font-ui);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }   /* hidden always wins over component display rules */
html, body { height: 100%; overflow: hidden; }

body {
  background: var(--zp-bg);
  color: var(--zp-text);
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: var(--font-ui); color: inherit; }
:focus-visible { outline: 2px solid color-mix(in srgb, var(--zp-cyan) 60%, transparent); outline-offset: 2px; }

.ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.light-only { display: none !important; }
:root[data-theme="light"] .light-only { display: inline-block !important; }
:root[data-theme="light"] .dark-only  { display: none !important; }

/* ── Shell ──────────────────────────────────────────────────────────────── */
#app { display: flex; flex-direction: column; height: 100vh; }
.body { flex: 1; display: flex; min-height: 0; }

/* Titlebar — draggable; controls opt out */
.titlebar {
  height: 40px; flex: none;
  background: var(--zp-chrome);
  border-bottom: 1px solid var(--zp-hairline);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 8px 0 16px;
  -webkit-app-region: drag;
  user-select: none;
}
.brand { display: flex; align-items: center; gap: 8px; }
.wordmark { height: 17px; width: auto; display: block; -webkit-user-drag: none; }
.chip {
  font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.18em; color: var(--zp-cyan);
  border: 1px solid rgba(0,194,255,0.45); border-radius: 3px; padding: 2px 4px; line-height: 1.2;
}
.tb-right { display: flex; align-items: center; gap: 10px; }
.tb-right button, .tb-right #monitor-control { -webkit-app-region: no-drag; }

.wctrls { display: flex; gap: 2px; margin-left: 4px; }
.wbtn {
  width: 30px; height: 26px; border-radius: 5px; border: none; background: none;
  color: var(--zp-muted); cursor: pointer; display: grid; place-items: center;
  transition: background 120ms, color 120ms;
}
.wbtn svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.3; }
.wbtn:hover { background: var(--zp-surface); color: var(--zp-text); }
.wbtn.close:hover { background: var(--zp-red); color: #fff; }

/* Presence pill (protection state) */
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 9px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase;
  background: color-mix(in srgb, var(--zp-muted) 16%, transparent); color: var(--zp-text-2);
}
.status-pill.pill-green { background: rgba(31,169,113,var(--zp-tint)); color: var(--zp-green); }
.status-pill.pill-amber { background: rgba(224,148,27,var(--zp-tint)); color: var(--zp-amber); }
.status-pill.pill-red   { background: rgba(224,65,75,var(--zp-tint));  color: var(--zp-red); }
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pill-red .pill-dot, .pill-amber .pill-dot { animation: zp-dot 1.4s ease-in-out infinite; }
@keyframes zp-dot { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* In-process monitor (portable mode only) */
#monitor-control { display: none; align-items: center; gap: 8px; }
#monitor-control.visible { display: flex; }
#status-dot, #status-text { display: none; }   /* the presence pill carries the state */
.btn-start, .btn-stop {
  height: 24px; padding: 0 10px; border-radius: 6px; cursor: pointer;
  font-family: var(--font-ui); font-size: 11.5px; font-weight: 600; border: 1px solid transparent;
  transition: background 120ms;
}
.btn-start { background: var(--zp-green); color: #fff; }
.btn-start:hover { background: var(--zp-green-press); }
.btn-stop  { background: rgba(224,65,75,0.12); border-color: rgba(224,65,75,0.5); color: var(--zp-red); }
.btn-stop:hover { background: rgba(224,65,75,0.2); }
.dot-stopped, .dot-running, .dot-warning { width: 7px; height: 7px; border-radius: 50%; }

/* Rail */
.rail {
  width: 52px; flex: none;
  background: var(--zp-chrome);
  border-right: 1px solid var(--zp-hairline);
  padding: 12px 0 10px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.rail-item {
  position: relative;
  width: 40px; height: 40px; border-radius: 8px; border: none; background: transparent;
  display: grid; place-items: center; color: var(--zp-muted); cursor: pointer;
  transition: background 120ms, color 120ms;
}
.rail-item .ico { width: 19px; height: 19px; }
.rail-item:hover { background: var(--zp-surface); color: var(--zp-text-2); }
.rail-item.active { background: color-mix(in srgb, var(--zp-cyan) 16%, transparent); color: var(--zp-cyan); }
.rail-item.active::before {
  content: ''; position: absolute; left: -6px; top: 10px;
  width: 2px; height: 20px; border-radius: 2px; background: var(--zp-cyan);
}
/* Hover label — the rail is icon-only, as in Phone 2 */
.rail-item[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute; left: 48px; top: 50%; transform: translateY(-50%);
  white-space: nowrap; pointer-events: none; z-index: 50;
  background: var(--zp-raised); color: var(--zp-text); border: 1px solid var(--zp-border);
  font-size: 12px; font-weight: 500; padding: 4px 9px; border-radius: 6px;
  box-shadow: 0 8px 20px var(--zp-shadow);
}
.rail-spacer { flex: 1; }
#version-btn {
  margin-top: 4px; border: none; background: none; cursor: pointer;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.04em; color: var(--zp-muted);
  padding: 3px 4px; border-radius: 4px;
}
#version-btn:hover { color: var(--zp-cyan); }

/* ── Pages ──────────────────────────────────────────────────────────────── */
#content { flex: 1; min-width: 0; display: flex; background: var(--zp-bg); }
.page { display: none; flex: 1; min-width: 0; min-height: 0; flex-direction: column; }
.page.active { display: flex; }
.page.split.active { flex-direction: row; }

.page-header {
  flex: none;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--zp-hairline);
}
.page-header h1 { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -0.01em; line-height: 1.25; }
.page-sub { font-size: 12px; color: var(--zp-muted); margin-top: 3px; }
.header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.page-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 22px 22px; }
.page-body.flush { padding: 0; }

#status-bar {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--zp-text-2);
  max-width: 440px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px;
  border-radius: 999px; background: var(--zp-surface); border: 1px solid var(--zp-border);
}
#status-bar::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--zp-cyan); flex: none; }
#status-bar:empty { display: none; }

/* Eyebrow + cyan rule (brand devices) */
.eyebrow { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--zp-cyan-600); margin-bottom: 6px; }
.rule { width: 48px; height: 2px; background: var(--zp-cyan); margin: 12px 0 16px; }

/* ── Cards ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--zp-surface-2);
  border: 1px solid var(--zp-border);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 12px;
  min-width: 0;
}
:root[data-theme="dark"] .card { background: var(--zp-surface); }
.card.no-pad { padding: 0; overflow: hidden; }

.card-title {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 400;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--zp-muted);
  margin-bottom: 12px; min-height: 22px;
}
.card-meta { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.02em; text-transform: none; color: var(--zp-muted); opacity: 0.8; }

.dash-split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 12px; }
.dash-split .card { margin-bottom: 0; }
@media (max-width: 1150px) { .dash-split { grid-template-columns: 1fr; } .dash-split .card { margin-bottom: 12px; } }

/* Stat tiles — diagnostics metric style */
.stats-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.stat-card {
  display: flex; flex-direction: column-reverse; justify-content: flex-end;
  background: var(--zp-surface-2); border: 1px solid var(--zp-border); border-radius: 12px;
  padding: 12px 14px 14px;
}
:root[data-theme="dark"] .stat-card { background: var(--zp-surface); }
.stat-label {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--zp-muted);
}
.stat-label::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--zp-cyan); }
.stat-card.warning .stat-label::before { background: var(--zp-amber); }
.stat-card.danger  .stat-label::before { background: var(--zp-red); }
.stat-value {
  font-family: var(--font-mono); font-weight: 500; font-size: 24px; color: var(--zp-text);
  margin-top: 8px; line-height: 1.1; letter-spacing: -0.01em;
}
.stat-value::after { content: ''; display: block; width: 28px; height: 2px; margin-top: 10px; background: var(--zp-cyan); border-radius: 1px; }
.stat-card.warning .stat-value { color: var(--zp-amber); }
.stat-card.warning .stat-value::after { background: var(--zp-amber); }
.stat-card.danger  .stat-value { color: var(--zp-red); }
.stat-card.danger  .stat-value::after { background: var(--zp-red); }

#hourly-chart, #attack-map { display: block; width: 100%; }
#attack-map { border-radius: 8px; }

/* ── Event log ──────────────────────────────────────────────────────────── */
.event-log { max-height: 330px; overflow-y: auto; margin: 0 -18px -16px; }
.event-entry {
  display: grid; grid-template-columns: 64px 118px minmax(0, 1fr); align-items: center; gap: 10px;
  padding: 8px 18px; border-top: 1px solid var(--zp-hairline);
}
.event-entry:hover { background: color-mix(in srgb, var(--zp-raised) 60%, transparent); }
.event-ts { font-family: var(--font-mono); font-size: 11px; color: var(--zp-muted); }
.event-note { font-size: 12.5px; color: var(--zp-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline-events { max-height: 300px; overflow-y: auto; border-top: 1px solid var(--zp-hairline); }
.timeline-events .event-entry { padding: 8px 22px !important; }

/* Event type tags — mono, uppercase, tinted, like Phone 2's WATCH / OK */
.event-ip {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase;
  height: 20px; padding: 0 7px; border-radius: 4px; white-space: nowrap;
  color: var(--zp-text-2); background: color-mix(in srgb, var(--zp-muted) 14%, transparent);
}
.ev-attempt, .ev-task_created, .ev-task_modified
  { color: var(--zp-amber); background: rgba(224,148,27,var(--zp-tint)); }
.ev-temp_block, .ev-explicit_creds
  { color: var(--zp-cyan-600); background: rgba(0,194,255,var(--zp-tint)); }
.ev-perm_block, .ev-security_log_cleared, .ev-new_user_created, .ev-admin_group_change,
.ev-password_spray, .ev-service_installed, .ev-tor_blocked, .ev-vpn_blocked
  { color: var(--zp-red); background: rgba(224,65,75,var(--zp-tint)); }
.ev-unblock, .ev-rdp_logon
  { color: var(--zp-green); background: rgba(31,169,113,var(--zp-tint)); }
.ev-lockout
  { color: #B072E8; background: rgba(176,114,232,var(--zp-tint)); }

.empty-msg { color: var(--zp-muted); font-size: 12.5px; padding: 10px 0; }
.event-log .empty-msg { padding: 12px 18px; border-top: 1px solid var(--zp-hairline); }

/* ── Tables — Phone 2 history rows ──────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.data-table th {
  position: sticky; top: 0; z-index: 1;
  background: var(--zp-bg);
  padding: 12px 14px 8px; text-align: left; white-space: nowrap;
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--zp-muted); border-bottom: 1px solid var(--zp-hairline);
}
.data-table th:first-child, .data-table td:first-child { padding-left: 22px; }
.data-table th:last-child,  .data-table td:last-child  { padding-right: 22px; }
.data-table td {
  padding: 10px 14px; border-bottom: 1px solid var(--zp-hairline); vertical-align: middle; color: var(--zp-text-2);
}
.data-table tbody tr:hover td { background: var(--zp-surface); }
.data-table tr.row-flag td { background: rgba(31,169,113,0.05); }
/* Numbers and times in mono, like the Phone history list */
.data-table td:nth-child(3), .data-table td:nth-child(4), .data-table td:nth-child(5), .data-table td:nth-child(6) { font-variant-numeric: tabular-nums; }
#attempts-tbody td:nth-child(3), #attempts-tbody td:nth-child(5), #attempts-tbody td:nth-child(6),
#blocked-tbody  td:nth-child(4), #blocked-tbody  td:nth-child(5), #blocked-tbody  td:nth-child(6)
  { font-family: var(--font-mono); font-size: 12px; }
#attempts-tbody td:nth-child(5), #attempts-tbody td:nth-child(6), #blocked-tbody td:nth-child(5), #blocked-tbody td:nth-child(6) { color: var(--zp-muted); }
.data-table td:last-child { text-align: right; white-space: nowrap; }
.data-table td:last-child[style*="flex"] { justify-content: flex-end; }
.geo-cell { font-size: 12px !important; color: var(--zp-text-2) !important; }
.empty-cell { text-align: center !important; color: var(--zp-muted); padding: 48px !important; }

code {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--zp-text);
  background: none; padding: 0;
}
.data-table td:first-child code { font-size: 13.5px; }
.svc-info code, .sintro code { font-size: 12px; background: var(--zp-surface); border: 1px solid var(--zp-border); padding: 1px 5px; border-radius: 4px; }

/* ── Badges ─────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px; vertical-align: middle;
  height: 20px; padding: 0 7px; border-radius: 4px; white-space: nowrap;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase;
}
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-permanent { color: var(--zp-red);   background: rgba(224,65,75,var(--zp-tint)); }
.badge-temp      { color: var(--zp-amber); background: rgba(224,148,27,var(--zp-tint)); }
.badge-none      { color: var(--zp-muted); background: color-mix(in srgb, var(--zp-muted) 12%, transparent); }
.badge-success   { color: var(--zp-green); background: rgba(31,169,113,var(--zp-tint)); margin-left: 8px; cursor: help; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: 8px; white-space: nowrap; cursor: pointer;
  background: var(--zp-surface); border: 1px solid var(--zp-border); color: var(--zp-text-2);
  font-size: 12px; font-weight: 500;
  transition: background 120ms var(--ease), transform 120ms var(--ease), border-color 120ms;
}
.btn .ico { width: 14px; height: 14px; }
.btn:hover { background: var(--zp-raised); color: var(--zp-text); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: default; transform: none; }
.btn-primary { background: var(--zp-cyan); border-color: var(--zp-cyan); color: var(--zp-navy); font-weight: 600; }
.btn-primary:hover { background: var(--zp-cyan-600); border-color: var(--zp-cyan-600); color: var(--zp-navy); }
.btn-danger { background: rgba(224,65,75,0.12); border-color: rgba(224,65,75,0.5); color: var(--zp-red); }
.btn-danger:hover { background: rgba(224,65,75,0.2); color: var(--zp-red); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 11.5px; border-radius: 7px; }
.data-table .btn-sm, .sessions-table .btn-sm { height: 28px; }

.mini {
  width: 28px; height: 28px; border-radius: 8px; flex: none; display: grid; place-items: center; cursor: pointer;
  background: transparent; border: 1px solid var(--zp-border); color: var(--zp-text-2);
  transition: background 120ms;
}
.mini .ico { width: 14px; height: 14px; }
.mini:hover { background: var(--zp-raised); color: var(--zp-text); }

.fpill {
  height: 30px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  background: transparent; border: 1px solid var(--zp-border); color: var(--zp-text-2); font-size: 12.5px;
}
.fpill.on { background: color-mix(in srgb, var(--zp-cyan) 14%, transparent); color: var(--zp-cyan-600); border-color: rgba(0,194,255,0.45); }
.pillrow { display: flex; gap: 8px; }

/* ── Inputs ─────────────────────────────────────────────────────────────── */
.searchfield {
  display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 11px; min-width: 260px;
  border-radius: 8px; background: var(--zp-surface); border: 1.5px solid var(--zp-border); color: var(--zp-muted);
  transition: border-color 120ms;
}
.searchfield.sm { min-width: 150px; width: 150px; }
.searchfield:focus-within { border-color: var(--zp-cyan); }
.searchfield input { flex: 1; min-width: 0; background: transparent; border: none; outline: none; color: var(--zp-text); font-size: 12.5px; }
.searchfield.sm input { font-family: var(--font-mono); font-size: 12px; }
.searchfield input::placeholder { color: var(--zp-muted); font-family: var(--font-ui); }
.search-input { height: 32px; padding: 0 11px; border-radius: 8px; background: var(--zp-surface); border: 1.5px solid var(--zp-border); color: var(--zp-text); outline: none; }

/* ── Settings — Phone 2 split: snav + panel ─────────────────────────────── */
.snav {
  width: 210px; flex: none; overflow-y: auto;
  border-right: 1px solid var(--zp-hairline);
  padding: 18px 14px; display: flex; flex-direction: column; gap: 2px;
}
.snav-title { font-family: var(--font-display); font-weight: 700; font-size: 19px; padding: 0 12px 14px; }
.snav-row {
  height: 38px; flex: none; border-radius: 8px; padding: 0 12px; text-align: left; cursor: pointer;
  background: transparent; border: none; color: var(--zp-text-2); font-size: 13.5px;
  transition: background 120ms;
}
.snav-row:hover { background: var(--zp-surface); }
.snav-row.on { background: color-mix(in srgb, var(--zp-cyan) 14%, transparent); color: var(--zp-cyan-600); }

.spanel { flex: 1; min-width: 0; min-height: 0; overflow-y: auto; padding: 24px 28px 0; display: flex; flex-direction: column; }
.ssec { display: none; max-width: 720px; }
.ssec.on { display: block; }
.stitle { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.sintro { font-size: 13.5px; line-height: 1.65; color: var(--zp-text-2); margin-bottom: 18px; }

.form-group { margin-bottom: 16px; }
.form-group > label:not(.toggle) {
  display: block; margin-bottom: 6px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--zp-text-2);
}
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea,
.time-input {
  width: 100%; height: 42px; padding: 0 12px; border-radius: 8px; outline: none;
  background: var(--zp-surface); border: 1.5px solid var(--zp-border); color: var(--zp-text);
  font-family: var(--font-mono); font-size: 13.5px;
  transition: border-color 120ms;
}
.form-group textarea { height: auto; padding: 10px 12px; line-height: 1.6; resize: vertical; font-size: 13px; }
.form-group input:focus, .form-group textarea:focus, .time-input:focus { border-color: var(--zp-cyan); }
.time-input { width: 104px; height: 34px; flex: none; }
.form-hint, .fhelp { font-size: 12px; color: var(--zp-muted); margin-top: 6px; line-height: 1.5; }
.inline-action .fhelp { margin-top: 0; }
.form-row { display: flex; gap: 14px; }
.form-row .form-group { flex: 1; min-width: 0; }
.inline-action { display: flex; align-items: center; gap: 12px; margin: 4px 0 16px; flex-wrap: wrap; }

.toggle-row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--zp-hairline); }
.toggle-row.first { border-top: none; padding-top: 0; }
.toggle-copy { flex: 1; min-width: 0; }
.toggle-label { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toggle-help { font-size: 12.5px; color: var(--zp-muted); margin-top: 3px; line-height: 1.5; }

/* Switch — 40×24, cyan when on */
.toggle { position: relative; display: inline-block; width: 40px; height: 24px; flex: none; cursor: pointer; }
.toggle.tall { margin-top: 9px; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; border-radius: 999px; background: var(--zp-border); transition: background 150ms; }
.toggle-slider::before {
  content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; transition: transform 150ms var(--ease); box-shadow: 0 1px 2px rgba(13,27,42,0.25);
}
.toggle input:checked + .toggle-slider { background: var(--zp-cyan); }
.toggle input:checked + .toggle-slider::before { transform: translateX(16px); }
.toggle input:focus-visible + .toggle-slider { outline: 2px solid color-mix(in srgb, var(--zp-cyan) 60%, transparent); outline-offset: 2px; }

.settings-actions {
  position: sticky; bottom: 0; margin-top: auto;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0 18px; max-width: 720px;
  background: var(--zp-bg); border-top: 1px solid var(--zp-hairline);
}
#settings-msg { font-size: 12.5px; color: var(--zp-green); }

/* Service status callout */
.svc-status-line {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 14px; margin-bottom: 14px; border-radius: 8px; font-size: 13px;
  background: var(--zp-surface); border: 1px solid var(--zp-border); color: var(--zp-text-2);
}
.svc-ok   { background: rgba(31,169,113,var(--zp-tint)) !important; border-color: rgba(31,169,113,0.45) !important; color: var(--zp-green) !important; }
.svc-warn { background: rgba(224,148,27,var(--zp-tint)) !important; border-color: rgba(224,148,27,0.45) !important; color: var(--zp-amber) !important; }
.svc-btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.svc-info { font-size: 12.5px; color: var(--zp-muted); line-height: 1.65; }

.threat-count-badge {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.08em; font-weight: 400;
  color: var(--zp-cyan-600); background: rgba(0,194,255,0.1); border: 1px solid rgba(0,194,255,0.35);
  height: 20px; padding: 0 7px; border-radius: 4px; display: inline-flex; align-items: center;
}

/* Country chips */
.country-block-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.country-chip {
  display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 11.5px; cursor: pointer; user-select: none;
  background: transparent; border: 1px solid var(--zp-border); color: var(--zp-text-2);
  transition: background 120ms, border-color 120ms;
}
.country-chip input { display: none; }
.country-chip:hover { background: var(--zp-surface); }
.country-chip.active { background: rgba(224,65,75,var(--zp-tint)); border-color: rgba(224,65,75,0.5); color: var(--zp-red); }

/* ── Health ─────────────────────────────────────────────────────────────── */
.health-banner {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; margin-bottom: 14px; border-radius: 12px; font-size: 13.5px; font-weight: 600;
}
.health-banner-ok    { background: rgba(31,169,113,var(--zp-tint)); border: 1px solid rgba(31,169,113,0.45); color: var(--zp-green); }
.health-banner-warn  { background: rgba(224,148,27,var(--zp-tint)); border: 1px solid rgba(224,148,27,0.45); color: var(--zp-amber); }
.health-banner-error { background: rgba(224,65,75,var(--zp-tint));  border: 1px solid rgba(224,65,75,0.45);  color: var(--zp-red); }

.health-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.health-card { background: var(--zp-surface-2); border: 1px solid var(--zp-border); border-radius: 16px; padding: 16px 18px; }
:root[data-theme="dark"] .health-card { background: var(--zp-surface); }
.health-card-title {
  display: flex; align-items: center; gap: 7px; margin-bottom: 12px;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--zp-muted);
}
.health-card-title::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--zp-green); }
.health-card-warn  .health-card-title::before { background: var(--zp-amber); }
.health-card-error .health-card-title::before { background: var(--zp-red); }
.health-items { display: flex; flex-direction: column; }
.health-item { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-top: 1px solid var(--zp-hairline); font-size: 12.5px; }
.health-item:first-child { border-top: none; padding-top: 0; }
.health-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.health-dot-ok { background: var(--zp-green); } .health-dot-warn { background: var(--zp-amber); } .health-dot-error { background: var(--zp-red); }
.health-item-label { flex: 1; color: var(--zp-text-2); }
.health-item-value { font-family: var(--font-mono); font-size: 12px; color: var(--zp-text); text-align: right; }
.health-val-warn  { color: var(--zp-amber) !important; }
.health-val-error { color: var(--zp-red) !important; }
.health-tip {
  font-size: 12px; color: var(--zp-text-2); line-height: 1.5;
  margin: 0 0 8px 15px; padding: 7px 10px; border-radius: 8px;
  background: rgba(224,148,27,0.08); border: 1px solid rgba(224,148,27,0.3);
}

/* ── Logs ───────────────────────────────────────────────────────────────── */
.log-viewer {
  font-family: var(--font-mono); font-size: 11.5px; line-height: 1.7;
  max-height: 380px; overflow-y: auto; padding: 10px 12px; border-radius: 8px;
  background: var(--zp-bg); border: 1px solid var(--zp-hairline);
}
.log-line { padding: 0 4px; border-radius: 3px; white-space: pre-wrap; word-break: break-all; }
.log-line:hover { background: var(--zp-surface); }
.log-error { color: var(--zp-red); } .log-warn { color: var(--zp-amber); } .log-block { color: #E8743B; }
.log-info  { color: var(--zp-text-2); } .log-success { color: var(--zp-green); }
.log-ts, .log-level { font-size: 10.5px; margin-right: 6px; }
.log-ts { color: var(--zp-muted); } .log-level { font-weight: 500; }
.log-context { font-size: 10.5px; color: var(--zp-muted); margin-top: 2px; padding-left: 8px; border-left: 2px solid var(--zp-border); max-height: 60px; overflow: hidden; }

/* ── Sessions ───────────────────────────────────────────────────────────── */
#sessions-container { margin: 0 -18px -16px; }
#sessions-container .empty-msg { padding: 12px 18px; border-top: 1px solid var(--zp-hairline); }
.sessions-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.sessions-table th {
  padding: 0 10px 8px; text-align: left; font-family: var(--font-mono); font-size: 9px; font-weight: 400;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--zp-muted);
}
.sessions-table td { padding: 9px 10px; border-top: 1px solid var(--zp-hairline); vertical-align: middle; color: var(--zp-text-2); }
.sessions-table th:first-child, .sessions-table td:first-child { padding-left: 18px; }
.sessions-table th:last-child,  .sessions-table td:last-child  { padding-right: 18px; text-align: right; }
.sessions-table td:nth-child(5) { font-family: var(--font-mono); font-size: 11px !important; }
.sessions-table tr.session-current td { background: color-mix(in srgb, var(--zp-cyan) 6%, transparent); }
.session-user { font-weight: 600; color: var(--zp-text); }
.session-you-badge {
  margin-left: 6px; vertical-align: middle; height: 18px; padding: 0 6px; border-radius: 4px; display: inline-flex; align-items: center;
  font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--zp-cyan-600); background: rgba(0,194,255,0.12);
}
.session-state { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; }
.session-state-active  { color: var(--zp-green); background: rgba(31,169,113,var(--zp-tint)); }
.session-state-disc, .session-state-idle { color: var(--zp-amber); background: rgba(224,148,27,var(--zp-tint)); }
.session-state-unknown { color: var(--zp-muted); background: color-mix(in srgb, var(--zp-muted) 12%, transparent); }

/* ── Intel ──────────────────────────────────────────────────────────────── */
.map-legend { display: flex; gap: 14px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--zp-muted); }
.map-leg-item { display: flex; align-items: center; gap: 6px; }
.map-leg-item span { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

/* ── Modals ─────────────────────────────────────────────────────────────── */
.overlay { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; background: rgba(7,16,25,0.62); }
:root[data-theme="light"] .overlay { background: rgba(13,27,42,0.35); }
.overlay.hidden { display: none; }
.modal {
  width: 540px; max-width: calc(100vw - 40px); max-height: 82vh; display: flex; flex-direction: column;
  background: var(--zp-bg); border: 1px solid var(--zp-border); border-radius: 12px;
  box-shadow: 0 24px 60px var(--zp-shadow);
}
.modal.wide { width: 640px; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 22px 14px; border-bottom: 1px solid var(--zp-hairline); }
.modal-header h2 { font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.modal-header h2.mono-title { font-family: var(--font-mono); font-weight: 500; font-size: 17px; }
.modal-header .page-sub { margin-top: 2px; }
.modal-close { width: 28px; height: 28px; flex: none; border-radius: 8px; border: 1px solid var(--zp-border); background: transparent; color: var(--zp-text-2); cursor: pointer; font-size: 11px; }
.modal-close:hover { background: var(--zp-surface); color: var(--zp-text); }
.modal-body { flex: 1; overflow-y: auto; padding: 18px 22px; }
.modal-footer { display: flex; align-items: center; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--zp-hairline); }

.cl-version { margin-bottom: 22px; }
.cl-version:last-child { margin-bottom: 0; }
.cl-version-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.cl-version-num { font-family: var(--font-mono); font-weight: 500; font-size: 14px; color: var(--zp-text); }
.cl-version-date { font-family: var(--font-mono); font-size: 11px; color: var(--zp-muted); }
.cl-badge-latest { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--zp-cyan-600); background: rgba(0,194,255,0.12); padding: 3px 7px; border-radius: 4px; }
.cl-list { list-style: none; }
.cl-list li { position: relative; padding: 6px 0 6px 16px; border-top: 1px solid var(--zp-hairline); font-size: 12.5px; line-height: 1.55; color: var(--zp-text-2); }
.cl-list li::before { content: ''; position: absolute; left: 2px; top: 13px; width: 5px; height: 5px; border-radius: 50%; background: var(--zp-cyan); }

/* ── Scrollbars ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--zp-border); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--zp-muted); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Sessions sit in half a dashboard column — keep rows on one line */
.sessions-table td { white-space: nowrap; }
.sessions-table td:nth-child(2), .sessions-table th:nth-child(2) { display: none; }  /* session name — noise at this width */

/* ── World map ──────────────────────────────────────────────────────────── */
.map-card { position: relative; }
#attack-map { border-radius: 8px; }
.map-legend { align-items: center; }
.map-note { color: var(--zp-muted); }
.map-scale { display: inline-flex; align-items: center; gap: 6px; }
.map-scale i {
  display: inline-block; width: 72px; height: 6px; border-radius: 3px;
  background: linear-gradient(90deg, rgba(0,194,255,0.6), #E0941B, #E0414B);
}
.map-hint { font-size: 11.5px; color: var(--zp-muted); margin-top: 8px; }
.map-tip {
  position: absolute; z-index: 5; pointer-events: none; min-width: 140px;
  background: var(--zp-raised); border: 1px solid var(--zp-border); border-radius: 8px;
  box-shadow: 0 8px 24px var(--zp-shadow); padding: 8px 10px;
}
.map-tip-name { font-size: 12.5px; font-weight: 600; color: var(--zp-text); }
.map-tip-row { font-size: 11.5px; color: var(--zp-text-2); margin-top: 2px; }
.map-tip-row b { font-family: var(--font-mono); font-weight: 500; color: var(--zp-text); }

/* ── Updates ────────────────────────────────────────────────────────────── */
.upd-card { border: 1px solid var(--zp-border); border-radius: 12px; padding: 16px 18px 4px; margin-bottom: 8px; background: var(--zp-surface-2); }
:root[data-theme="dark"] .upd-card { background: var(--zp-surface); }
.upd-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.upd-label { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--zp-muted); }
.upd-version { font-family: var(--font-mono); font-size: 20px; font-weight: 500; color: var(--zp-text); margin-top: 4px; }
.upd-status { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap;
  background: color-mix(in srgb, var(--zp-muted) 14%, transparent); color: var(--zp-text-2); }
.upd-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.upd-status.ok   { background: rgba(31,169,113,var(--zp-tint)); color: var(--zp-green); }
.upd-status.info { background: rgba(0,194,255,var(--zp-tint));  color: var(--zp-cyan-600); }
.upd-status.warn { background: rgba(224,148,27,var(--zp-tint)); color: var(--zp-amber); }
.upd-status.bad  { background: rgba(224,65,75,var(--zp-tint));  color: var(--zp-red); }
.upd-available { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--zp-hairline); }
.upd-notes { font-size: 12.5px; color: var(--zp-text-2); line-height: 1.6; margin-top: 8px; white-space: pre-line; max-height: 160px; overflow-y: auto; }
.upd-progress { height: 4px; border-radius: 2px; background: var(--zp-border); margin-top: 12px; overflow: hidden; }
.upd-progress i { display: block; height: 100%; width: 0; background: var(--zp-cyan); transition: width 300ms var(--ease); }
.upd-card .inline-action { margin: 14px 0 12px; }
.ev-update_installed { color: var(--zp-green); background: rgba(31,169,113,var(--zp-tint)); }
.ev-update_failed    { color: var(--zp-red);   background: rgba(224,65,75,var(--zp-tint)); }

.ssub { font-family: var(--font-display); font-weight: 700; font-size: 15px; margin: 26px 0 6px; }
.ev-feed_blocked  { color: var(--zp-red);   background: rgba(224,65,75,var(--zp-tint)); }
.ev-feed_rejected { color: var(--zp-amber); background: rgba(224,148,27,var(--zp-tint)); }

.allow-grid .country-chip.active { background: rgba(31,169,113,var(--zp-tint)); border-color: rgba(31,169,113,0.5); color: var(--zp-green); }
.allow-grid { margin-bottom: 12px; }
.gf-warning { margin: 4px 0 12px; padding: 11px 14px; border-radius: 8px; font-size: 13px; line-height: 1.55;
  background: rgba(224,65,75,var(--zp-tint)); border: 1px solid rgba(224,65,75,0.45); color: var(--zp-text); }
.bi-targeted .bi-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--zp-hairline); font-size: 13px; }
.bi-targeted .bi-row:first-child { border-top: none; }
.bi-targeted .bi-name { font-family: var(--font-mono); font-weight: 500; color: var(--zp-text); min-width: 140px; }
.bi-targeted .bi-meta { color: var(--zp-text-2); }
.ev-breakin_suspected, .ev-new_location_login { color: var(--zp-red); background: rgba(224,65,75,var(--zp-tint)); }
.ev-targeted_account { color: var(--zp-amber); background: rgba(224,148,27,var(--zp-tint)); }

.ce-card { margin-bottom: 14px; }
.ce-head { font-size: 14px; font-weight: 600; color: var(--zp-text); padding: 10px 12px; border-radius: 8px; background: var(--zp-bg); border-left: 3px solid var(--zp-muted); }
.ce-head.ready { border-left-color: var(--zp-green); }
.ce-head.nearly { border-left-color: var(--zp-amber); }
.ce-head.not_ready { border-left-color: var(--zp-red); }
.ce-head small { display: block; font-family: var(--font-mono); font-size: 11px; font-weight: 400; color: var(--zp-muted); margin-top: 4px; }
.ce-controls { margin-top: 8px; }
.ce-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-top: 1px solid var(--zp-hairline); }
.ce-row:first-child { border-top: none; }
.ce-row .ce-name { flex: 1; font-size: 13.5px; font-weight: 600; color: var(--zp-text); }
.ce-row .ce-todo { font-size: 12.5px; font-weight: 400; color: var(--zp-text-2); margin-top: 3px; }
.ce-pill { flex: none; height: 20px; padding: 0 7px; border-radius: 4px; display: inline-flex; align-items: center; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; }
.ce-pill.pass { color: var(--zp-green); background: rgba(31,169,113,var(--zp-tint)); }
.ce-pill.attention { color: var(--zp-amber); background: rgba(224,148,27,var(--zp-tint)); }
.ce-pill.fail { color: var(--zp-red); background: rgba(224,65,75,var(--zp-tint)); }
.ev-report_sent { color: var(--zp-green); background: rgba(31,169,113,var(--zp-tint)); }
.ev-report_failed { color: var(--zp-red); background: rgba(224,65,75,var(--zp-tint)); }

.svc-list { border: 1px solid var(--zp-border); border-radius: 12px; overflow: hidden; }
.svc-row { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-top: 1px solid var(--zp-hairline); }
.svc-row:first-child { border-top: none; }
.svc-row .svc-name { flex: 1; font-size: 13.5px; font-weight: 600; color: var(--zp-text); }
.svc-row .svc-meta { font-family: var(--font-mono); font-size: 11px; color: var(--zp-muted); margin-top: 3px; font-weight: 400; }
.svc-found { flex: none; height: 20px; padding: 0 7px; border-radius: 4px; display: inline-flex; align-items: center; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; }
.svc-found.yes { color: var(--zp-green); background: rgba(31,169,113,var(--zp-tint)); }
.svc-found.no  { color: var(--zp-muted); background: color-mix(in srgb, var(--zp-muted) 12%, transparent); }
.svc-notes { margin: 6px 0 0 18px; font-size: 12.5px; color: var(--zp-text-2); line-height: 1.6; }
.svc-notes li { margin: 4px 0; }
.svc-tag { display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 3px; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--zp-text-2); background: color-mix(in srgb, var(--zp-muted) 16%, transparent); vertical-align: 1px; }

/* ── Dashboard: status strip, needs attention, recent logins ─────────────── */
.status-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.status-strip:empty { display: none; }
.st-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 11px; border-radius: 8px; cursor: default;
  background: var(--zp-surface-2); border: 1px solid var(--zp-border); font-size: 12px; color: var(--zp-text);
}
:root[data-theme="dark"] .st-chip { background: var(--zp-surface); }
button.st-chip { cursor: pointer; font-family: var(--font-ui); }
button.st-chip:hover { border-color: rgba(0,194,255,0.45); }
.st-chip .st-label { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--zp-muted); }
.st-chip .st-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--zp-muted); }
.st-chip.ok .st-dot { background: var(--zp-green); }
.st-chip.warn .st-dot { background: var(--zp-amber); }
.st-chip.bad .st-dot { background: var(--zp-red); }
.st-chip.bad { border-color: rgba(224,65,75,0.5); }

.attention-card { border-left: 3px solid var(--zp-amber); }
.attention-card.critical { border-left-color: var(--zp-red); }
.att-row { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; border-top: 1px solid var(--zp-hairline); }
.att-row:first-child { border-top: none; padding-top: 2px; }
.att-sev { flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: var(--zp-cyan); }
.att-sev.critical { background: var(--zp-red); }
.att-sev.warning { background: var(--zp-amber); }
.att-body { flex: 1; min-width: 0; }
.att-title { font-size: 13.5px; font-weight: 600; color: var(--zp-text); }
.att-detail { font-size: 12.5px; color: var(--zp-text-2); margin-top: 2px; overflow-wrap: anywhere; }
.att-when { font-family: var(--font-mono); font-size: 10.5px; color: var(--zp-muted); margin-top: 3px; }
.att-actions { flex: none; display: flex; gap: 6px; align-items: center; }
.attention-clear { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 10px 14px; border-radius: 10px; font-size: 13px; font-weight: 500;
  color: var(--zp-green); background: rgba(31,169,113,var(--zp-tint)); border: 1px solid rgba(31,169,113,0.35); }

.logins-list { margin: 0 -18px -16px; max-height: 330px; overflow-y: auto; }
.login-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 18px; border-top: 1px solid var(--zp-hairline); }
.login-row.flagged { background: rgba(224,65,75,0.07); }
.login-row .lr-time { font-family: var(--font-mono); font-size: 11px; color: var(--zp-muted); }
.login-row .lr-who { min-width: 0; }
.login-row .lr-user { font-size: 13px; font-weight: 600; color: var(--zp-text); }
.login-row .lr-from { font-size: 12px; color: var(--zp-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.login-row .lr-flag { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; height: 20px; padding: 0 7px; border-radius: 4px; display: inline-flex; align-items: center; white-space: nowrap; }
.lr-flag.breakin, .lr-flag.new_country { color: var(--zp-red); background: rgba(224,65,75,var(--zp-tint)); }
.lr-flag.ok { color: var(--zp-green); background: rgba(31,169,113,var(--zp-tint)); }
.sessions-card { margin-bottom: 12px; }
.sessions-table td .sess-from { font-size: 12px; color: var(--zp-text-2); }
.sessions-table td .sess-ip { font-family: var(--font-mono); font-size: 11px; color: var(--zp-muted); }
.health-item .btn-sm { margin-left: 8px; height: 24px; padding: 0 9px; }
.ev-fix_applied { color: var(--zp-green); background: rgba(31,169,113,var(--zp-tint)); }
.ev-fix_failed { color: var(--zp-red); background: rgba(224,65,75,var(--zp-tint)); }
.logins-list .empty-msg { padding: 12px 18px; border-top: 1px solid var(--zp-hairline); }

/* ── Licence ────────────────────────────────────────────────────────────── */
#content { flex-direction: column; }
.lic-banner {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: 9px 22px; font-size: 12.5px; font-weight: 500;
  border-bottom: 1px solid rgba(224,148,27,0.45);
  background: linear-gradient(90deg, rgba(224,148,27,0.18), rgba(224,148,27,0.04));
  color: var(--zp-text);
}
.lic-banner.red { border-bottom-color: rgba(224,65,75,0.5); background: linear-gradient(90deg, rgba(224,65,75,0.2), rgba(224,65,75,0.04)); }
.lic-banner-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--zp-amber); flex: none; animation: zp-dot 1.4s ease-in-out infinite; }
.lic-banner.red .lic-banner-dot { background: var(--zp-red); }
.lic-banner #licence-banner-text { flex: 1; }
.lic-headline { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--zp-text); margin-top: 4px; }
.lic-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px 18px; margin: 14px 0 14px; padding-top: 14px; border-top: 1px solid var(--zp-hairline); }
.lic-facts:empty { display: none; }
.lic-facts dt { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--zp-muted); }
.lic-facts dd { margin: 3px 0 0; font-size: 13px; color: var(--zp-text); }
.lic-facts dd.mono { font-family: var(--font-mono); font-size: 12.5px; }
.lic-messages { list-style: none; margin: 0 0 14px; padding: 10px 12px; border-radius: 8px; background: rgba(0,194,255,0.08); border: 1px solid rgba(0,194,255,0.3); font-size: 12.5px; color: var(--zp-text-2); }
.lic-entry { display: flex; gap: 8px; }
.lic-entry input { flex: 1; text-transform: uppercase; letter-spacing: 0.06em; }
.lic-entry .btn { height: 42px; padding: 0 18px; }
.lic-card { margin-bottom: 18px; padding-bottom: 2px; }
.ev-licence_stopped { color: var(--zp-red); background: rgba(224,65,75,var(--zp-tint)); }
.ev-licence_ok, .ev-licence_activated { color: var(--zp-green); background: rgba(31,169,113,var(--zp-tint)); }
.ev-licence_deactivated { color: var(--zp-amber); background: rgba(224,148,27,var(--zp-tint)); }
.lic-facts { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.lic-facts dd.mono { white-space: nowrap; }
