/* Cube Workspace brand theme — black / charcoal grounds, Cube Yellow accent.
   Rule: yellow is BRAND + INTERACTIVE only; warnings are orange so a degraded
   state never looks like a button. Uplink-blue on port maps stays semantic. */
:root {
  --bg: #131311;
  --bg-2: #0c0c0b;
  --panel: #1c1c19;
  --panel-2: #242421;
  --border: #34342d;
  --text: #f2f1ea;
  --muted: #a5a49a;
  --muted-2: #7a7970;
  --brand: #ffdc00;
  --brand-2: #ffdc00;
  --brand-ink: #0f0f0f;   /* ink on yellow */
  --info: #6aa9ff;
  --ok: #3ecf8e;
  --warn: #ff8f2d;
  --bad: #f47171;
  --pill-data: #6b3aa0;
  --pill-role: #2b5d44;
  --pill-role-text: #6fe3a1;
  --disp: 'Poppins', 'Segoe UI', system-ui, sans-serif;
}

@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/poppins-400.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/poppins-600.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/poppins-700.woff2') format('woff2'); }

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* Layout */
.app {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 18px 0 12px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 14px;
  border-bottom: 1px solid var(--border);
}
.sidebar-title {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--muted);
  font-weight: 700;
}
.sidebar-collapse {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}
.nav {
  display: flex;
  flex-direction: column;
  padding: 10px 10px;
  gap: 2px;
  flex: 1;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: var(--panel); color: var(--text); }
.nav-item.active {
  background: rgba(255,220,0,0.10);
  color: var(--brand-2);
}
.nav-icon { display: inline-flex; }
.sidebar-footer {
  font-size: 11px;
  color: var(--muted-2);
  padding: 10px 20px 0;
  border-top: 1px solid var(--border);
}

/* Collapsible group (Technical, Help Desk, Reports, Setup) — stack normally.
   Only the LAST visible group is pushed to the bottom of the sidebar via the
   :last-of-type rule below. */
.nav-group {
  display: flex;
  flex-direction: column;
}
.nav > .nav-group:last-of-type { margin-top: auto; }
.nav-toggle {
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.nav-toggle:hover { background: var(--panel); color: var(--text); }
.nav-group.expanded .nav-toggle {
  background: rgba(255,220,0,0.10);
  color: var(--brand-2);
}
.nav-chevron {
  margin-left: auto;
  display: inline-flex;
  transition: transform 0.2s ease;
}
.nav-group.expanded .nav-chevron { transform: rotate(180deg); }
.nav-sub {
  display: none;
  flex-direction: column;
  padding: 4px 0 8px;
  gap: 1px;
}
.nav-group.expanded .nav-sub { display: flex; }
.nav-sub-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 12px 8px 26px;     /* slight indent vs parent toggle */
  font-size: 13px;
  color: var(--muted);
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
}
.nav-sub-item:hover { background: var(--panel); color: var(--text); }
.nav-sub-item.active { color: var(--brand-2); background: rgba(255,220,0,0.07); }
.nav-sub-item .nav-icon {
  display: inline-flex;
  opacity: 0.75;
  width: 16px;
  height: 16px;
}
.nav-sub-item:hover .nav-icon,
.nav-sub-item.active .nav-icon { opacity: 1; }
.nav-sub-item .nav-icon svg { width: 16px; height: 16px; }
.nav-sub-item.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.nav-sub-item .nav-soon {
  margin-left: auto;
  font-size: 9px;
  letter-spacing: 1px;
  font-weight: 600;
  color: var(--muted-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 5px;
  background: rgba(255,255,255,0.04);
}

.app.collapsed .nav-sub,
.app.collapsed .nav-chevron { display: none; }
.app.collapsed .nav-toggle { justify-content: center; padding: 10px; }

/* Main */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Topbar — Cube black bar with the yellow brand keyline */
.topbar {
  background: #0f0f0f;
  color: white;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 3px solid var(--brand);
}
.topbar-toggle {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: inline-flex;
}
.topbar-toggle:hover { background: rgba(255,255,255,0.12); }
.topbar-brand {
  font-family: var(--disp);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  background: transparent;
  color: var(--brand);
}
.brand-logo {
  height: 21px;
  width: auto;
  display: block;
  filter: invert(1);           /* black wordmark -> white on the black topbar */
}
.brand-divider {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.28);
}
.brand-sub {
  font-family: var(--disp);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand);
  transform: translateY(1px);
}
.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.user { font-size: 13px; opacity: 0.95; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.pill-data { background: var(--pill-data); color: #e7d7ff; }
.pill-role { background: var(--pill-role); color: var(--pill-role-text); }
.icon-btn {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: inline-flex;
}
.icon-btn:hover { background: rgba(255,255,255,0.12); }

/* Views */
.view {
  display: none;
  padding: 28px 28px 40px;
  flex: 1;
}
.view.active { display: block; }

.view-head { margin-bottom: 22px; }
.view-head h2 {
  margin: 0 0 4px;
  font-size: 26px;
  font-weight: 600;
}
.muted { color: var(--muted); }

/* Stat cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
}
.stat-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1px;
  font-weight: 600;
  margin-bottom: 8px;
}
.stat-value {
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
}
.stat-foot {
  font-size: 12px;
  color: var(--muted);
}
.ok { color: var(--ok); }
.warn { color: var(--warn); }
.bad { color: var(--bad); }
.muted-foot { color: var(--muted); }

/* Panel */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 20px;
  overflow: hidden;
}
.panel-head {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.panel-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.link { color: var(--brand-2); font-size: 13px; }
.link:hover { color: var(--text); }

/* Table */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th, .table td {
  text-align: left;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}
.table tr:last-child td { border-bottom: none; }
.table th {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--muted);
  font-weight: 600;
  background: var(--panel-2);
}
.table tbody tr:hover { background: rgba(255,220,0,0.04); }
.src { display: inline-flex; align-items: center; gap: 8px; }

/* Tags */
.tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  background: var(--panel-2);
  color: var(--muted);
  text-transform: lowercase;
}
.tag-ok { background: rgba(52,211,153,0.15); color: var(--ok); }
.tag-warn { background: rgba(251,191,36,0.18); color: var(--warn); }
.tag-bad { background: rgba(248,113,113,0.18); color: var(--bad); }
.tag-info { background: rgba(96,165,250,0.18); color: var(--info); }
.tag-role-super { background: rgba(248,113,113,0.18); color: var(--bad); }
.tag-role-tech { background: rgba(96,165,250,0.18); color: var(--info); }
.tag-role-mgmt   { background: rgba(52,211,153,0.15); color: var(--ok); }
.tag-role-client { background: rgba(167,139,250,0.20); color: #a78bfa; }
.tag-role-ops    { background: rgba(255,220,0,0.16); color: var(--brand); }

/* IP chip with unban button */
.ip-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 4px 3px 9px;
  background: rgba(248,113,113,0.16);
  color: var(--bad);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  margin: 2px 4px 2px 0;
}
.ip-unban {
  background: rgba(248,113,113,0.28);
  border: none;
  color: var(--bad);
  width: 18px;
  height: 18px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s;
}
.ip-unban:hover { background: var(--bad); color: white; }
.ip-unban:disabled { opacity: 0.5; cursor: wait; }

/* Login screen */
.login-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 28px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}
.login-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 22px;
}
.login-logo {
  height: 26px;
  width: auto;
  display: block;
  filter: invert(1);           /* black wordmark -> white on the charcoal card */
}
.login-brand-sub {
  font-family: var(--disp);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brand);
}
.login-brand-icon {
  width: 22px;
  height: 22px;
}
.login-title {
  margin: 0 0 4px;
  font-size: 24px;
  font-weight: 600;
}
.login-sub { margin: 0 0 22px; font-size: 13px; }
.login-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 500;
}
.login-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 8px;
  font: inherit;
  outline: none;
  margin-bottom: 14px;
  transition: border-color 0.15s, background 0.15s;
}
.login-input:focus {
  border-color: var(--brand-2);
  background: var(--panel-2);
}
.login-btn { width: 100%; padding: 11px 18px; margin-top: 4px; }
.login-btn:disabled { opacity: 0.6; cursor: wait; }
/* Push-to-approve waiting panel + approve screen */
.login-push { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 6px 0 8px;
  border: 1px solid var(--border); border-radius: 8px; background: rgba(255,255,255,0.02); }
.login-push-spin { width: 20px; height: 20px; flex: 0 0 20px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--brand); animation: login-push-spin 0.8s linear infinite; }
@keyframes login-push-spin { to { transform: rotate(360deg); } }
.login-push-msg { font-size: 13px; }
.login-push-num { font-size: 12px; color: var(--muted); margin-top: 2px; }
.login-push-num b { color: var(--brand); font-size: 15px; letter-spacing: 1px; }
.login-error {
  color: var(--bad);
  font-size: 13px;
  min-height: 18px;
  margin-bottom: 8px;
}

/* Users form gets a 5-col grid when password is included */
.form-users   { grid-template-columns: 1.2fr 1.4fr 1.4fr 0.9fr auto; }
.form-pw      { grid-template-columns: 1fr 1fr 1fr auto; }
.form-clients { grid-template-columns: repeat(3, 1fr); }
.form-clients button[type="submit"] {
  grid-column: 1 / -1;
  justify-self: end;
  padding: 9px 22px;
}
@media (max-width: 720px) {
  .form-users, .form-pw, .form-clients { grid-template-columns: 1fr; }
  .form-clients button[type="submit"] { justify-self: stretch; }
}

/* Per-row icon actions */
.row-actions {
  display: inline-flex;
  gap: 2px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
}
.icon-action {
  background: transparent;
  border: none;
  padding: 6px 9px;
  border-radius: 5px;
  cursor: pointer;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s;
}
.icon-action:hover { background: var(--panel-2); color: var(--text); }
.icon-action.icon-key:hover   { background: rgba(96,165,250,0.18); color: var(--info); }
.icon-action.icon-trash       { color: var(--bad); }
.icon-action.icon-trash:hover { background: rgba(248,113,113,0.18); color: var(--bad); }

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 22, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 24px;
  backdrop-filter: blur(4px);
}
.modal-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 24px 18px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
}
.modal-title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 600;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}
.reset-pw-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

/* 2FA shield inline marker */
.shield {
  display: inline-flex;
  vertical-align: -3px;
  margin-left: 6px;
  color: var(--muted-2);
}
.shield.on { color: var(--ok); }
.shield[title] { cursor: help; }

/* Action tag colours */
.tag-evt-ok   { background: rgba(52,211,153,0.15); color: var(--ok); }
.tag-evt-bad  { background: rgba(248,113,113,0.18); color: var(--bad); }
.tag-evt-warn { background: rgba(251,191,36,0.18); color: var(--warn); }
.tag-evt-info { background: rgba(96,165,250,0.18); color: var(--info); }
.tag-evt-mute { background: var(--panel-2); color: var(--muted); }

/* Network site cards */
.network-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.site-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.08s;
}
.site-card:hover { border-color: var(--brand-2); }
.site-card:active { transform: translateY(1px); }
.site-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 15px;
}
.site-card-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.site-card-status.online  { background: var(--ok); }
.site-card-status.offline { background: var(--bad); }
.site-card-meta {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.site-card-error {
  font-size: 12px;
  color: var(--bad);
  margin-top: 6px;
}
.site-card-skeleton {
  height: 60px;
  background: linear-gradient(90deg, var(--panel) 0%, var(--panel-2) 50%, var(--panel) 100%);
  background-size: 200% 100%;
  border-radius: 6px;
  animation: shimmer 1.4s infinite linear;
}

/* Client home — welcome + tile grid */
.welcome-block { margin-bottom: 26px; }
.welcome-block h2 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.welcome-block p { margin: 0; font-size: 14px; }

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.tile {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: border-color 0.15s, transform 0.16s, background 0.15s, box-shadow 0.16s;
}
.tile:hover { border-color: var(--brand-2); background: var(--panel-2); transform: translateY(-3px); box-shadow: 0 10px 28px rgba(0,0,0,.4); }
.tile:active { transform: translateY(0); }
.tile.disabled:hover { transform: none; box-shadow: none; }
.tile-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 6px;
  color: var(--brand-2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tile h3 { margin: 0; font-size: 17px; font-weight: 600; }
.tile p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.tile.disabled { cursor: default; opacity: 0.55; }
.tile.disabled:hover { border-color: var(--border); background: var(--panel); }
.tile-badge {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--muted-2);
  font-weight: 700;
  background: var(--panel-2);
  padding: 3px 8px;
  border-radius: 4px;
}

/* API Connections — service card grid */
.api-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 14px;
}
.api-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 22px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s, background 0.15s, transform 0.08s;
}
.api-card:hover  { border-color: var(--brand-2); background: var(--panel-2); }
.api-card:active { transform: translateY(1px); }
.api-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.api-card-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.api-card-icon svg { width: 100%; height: 100%; }
.api-card-name {
  font-size: 17px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.api-card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  min-height: 60px;
}
.api-card-meta {
  font-size: 11px;
  color: var(--muted-2);
  font-family: ui-monospace, Consolas, monospace;
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}
.status-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: lowercase;
}
.status-badge.connected { background: rgba(52,211,153,0.18); color: var(--ok); }
.status-badge.error     { background: rgba(248,113,113,0.20); color: var(--bad); }
.status-badge.untested  { background: var(--panel-2); color: var(--muted); }
.status-badge.configured { background: rgba(96,165,250,0.18); color: var(--info); }

/* Tab strip — filters the API Connections grid by integration */
.tab-strip {
  display: flex;
  gap: 2px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  padding-bottom: 0;
}
.tab-strip .tab {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 10px 16px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.tab-strip .tab.active {
  color: var(--brand-2);
  border-bottom-color: var(--brand-2);
}
.tab-strip .tab:hover:not(.active) { color: var(--text); }
.tab-strip > div { padding-bottom: 6px; }

/* Integration groups (sections per service) */
.integration-group {
  margin-bottom: 26px;
}
.integration-group-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px 10px 0 0;
  border-bottom: none;
}
.integration-group-head .api-card-icon { width: 36px; height: 36px; }
.integration-group-head .api-card-name { font-size: 18px; margin: 0; }
.integration-group-head .integration-desc {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.integration-add-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.integration-add-btn:hover {
  border-color: var(--brand-2);
  color: var(--brand-2);
  background: var(--panel);
}
.integration-group-body {
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 10px 10px;
}
.integration-group-body .api-grid {
  gap: 12px;
}
.integration-group-body .api-card {
  padding: 16px 18px;
}

/* Client dashboard view */
.network-dashboard {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dash-section-head {
  margin: 14px 2px 0;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.dash-section-head:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.dash-section-head h3 {
  margin: 0 0 2px;
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-2);
  letter-spacing: 0.3px;
}
.dash-section-head p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.branch-hero {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px 24px;
  position: relative;
}
.branch-hero-status {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}
.branch-hero-status.online  { background: var(--ok);  color: var(--ok); }
.branch-hero-status.offline { background: var(--bad); color: var(--bad); }
.branch-hero-name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: 0.3px;
}
.branch-hero-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}
.branch-hero-meta {
  font-size: 13px;
  color: var(--muted-2);
  font-family: ui-monospace, Consolas, monospace;
}

/* Device pills inside the device-breakdown table */
.device-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  margin: 2px 4px 2px 0;
  background: var(--panel-2);
  color: var(--muted);
}
.device-pill.ok  { color: var(--ok); }
.device-pill.bad { color: var(--bad); }

/* Internet activity — multi-series chart */
.activity-chart-wrap {
  padding: 8px 18px 0;
  background: var(--bg);
}
.activity-chart {
  width: 100%;
  height: 280px;
  display: block;
}
.legend-row {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.legend-chip {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
.internet-header {
  flex-wrap: wrap;
  gap: 10px 14px;
}

.series-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.series-toggle input[type="checkbox"] {
  margin: 0;
  accent-color: var(--brand-2);
  cursor: pointer;
}
.series-dot {
  display: inline-block;
  width: 18px;
  height: 2px;
  border-radius: 1px;
}

.activity-chart-wrap { position: relative; }
.hover-region { cursor: crosshair; }

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(15, 22, 38, 0.96);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  min-width: 240px;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  font-size: 12px;
}
.tt-head {
  color: var(--text);
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 12px;
}
.tt-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
  color: var(--muted);
  font-size: 12px;
}
.tt-dot {
  width: 10px;
  height: 2px;
  border-radius: 1px;
  flex-shrink: 0;
}
.tt-dot.dashed {
  background-image: linear-gradient(90deg, currentColor 50%, transparent 50%);
  background-size: 4px 2px;
}
.tt-val {
  margin-left: auto;
  color: var(--text);
  font-family: ui-monospace, Consolas, monospace;
  font-weight: 600;
}
.range-group {
  display: inline-flex;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px;
  margin-left: 4px;
}
.range-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.range-btn.active {
  background: var(--brand);
  color: var(--brand-ink);
}
.range-btn:hover:not(.active) { color: var(--text); }

.wan-status {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px 14px;
}
.wan-isp {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--muted);
  min-width: 110px;
}
.wan-bar {
  flex: 1;
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.wan-bar-inner { position: relative; height: 100%; }
.wan-seg {
  position: absolute;
  top: 0;
  bottom: 0;
}

/* Internet performance panel */
.internet-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--border);
  padding: 1px;
}
.internet-stat {
  background: var(--panel);
  padding: 14px 18px;
}
.internet-stat-label {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 6px;
}
.internet-stat-value {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 4px;
}
.internet-stat-sub {
  font-size: 11px;
  color: var(--muted-2);
}
.sparkline-wrap { padding: 14px 18px 18px; }
.sparkline-caption {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 8px;
}
.sparkline {
  width: 100%;
  height: 90px;
  display: block;
  background: var(--bg);
  border-radius: 6px;
}
.sparkline-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}
.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}

/* Top-devices row bar */
.usage-bar-wrap {
  position: relative;
  background: var(--bg);
  border-radius: 5px;
  height: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.usage-bar {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, rgba(96,165,250,0.55), rgba(96,165,250,0.85));
  border-radius: 5px;
}
.usage-bar-label {
  position: relative;
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  padding: 2px 9px;
  line-height: 18px;
  font-family: ui-monospace, Consolas, monospace;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Connections multi-select for Client users */
.conn-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: -8px 0 12px;
  max-height: 160px;
  overflow-y: auto;
}
.conn-picker label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--panel-2);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.conn-picker label:has(input:checked) {
  background: rgba(96,165,250,0.18);
  color: var(--info);
}
.conn-picker input { margin: 0; }

/* Site detail modal */
.site-detail-card {
  max-width: 880px;
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding-top: 22px;
  position: relative;
}
.site-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
}
.site-modal-close:hover { color: var(--text); background: var(--panel-2); }
.site-detail-head { margin-bottom: 16px; padding-right: 30px; }
.site-detail-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.site-detail-tab {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 8px 14px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.site-detail-tab:hover { color: var(--text); }
.site-detail-tab.active {
  color: var(--brand-2);
  border-bottom-color: var(--brand-2);
}
.site-detail-body {
  overflow-y: auto;
  flex: 1;
  min-height: 200px;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.detail-item {
  background: var(--bg);
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.detail-item-label {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 600;
}
.detail-item-value {
  font-size: 15px;
  font-weight: 500;
  word-break: break-word;
}

/* Forms */
.form {
  display: grid;
  grid-template-columns: 1.4fr 1.6fr 1fr auto;
  gap: 12px;
  padding: 16px 18px;
}
.form input, .form select {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 8px;
  font: inherit;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.form input:focus, .form select:focus {
  border-color: var(--brand-2);
  background: var(--panel-2);
}
.form input::placeholder { color: var(--muted-2); }
.btn {
  background: var(--brand);
  color: var(--brand-ink);
  border: none;
  padding: 9px 18px;
  border-radius: 8px;
  font: inherit;
  font-family: var(--disp);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn:hover { background: #ffe84d; }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 5px 10px;
  border-radius: 6px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.btn-ghost:hover { color: var(--bad); border-color: var(--bad); }

@media (max-width: 720px) {
  .form { grid-template-columns: 1fr; }
}

/* Activity list */
.activity {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}
.activity li {
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.activity li:last-child { border-bottom: none; }
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}
.dot.ok { background: var(--ok); }
.dot.warn { background: var(--warn); }
.dot.bad { background: var(--bad); }

/* Topbar Setup dropdown */
.topbar-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  min-width: 200px;
  padding: 6px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  z-index: 200;
}
.dropdown-section-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--muted);
  font-weight: 600;
  padding: 8px 12px 6px;
}
.dropdown-item {
  display: block;
  padding: 9px 12px;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.dropdown-item:hover {
  background: var(--panel-2);
  color: var(--brand-2);
}
.topbar-brand { cursor: pointer; user-select: none; }

/* Back-to-Dashboard pill (visible to clients on inner views) */
.back-bar {
  padding: 18px 28px 0;
}
.back-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 7px 14px 7px 11px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: border-color 0.15s, color 0.15s, background 0.15s, transform 0.06s;
}
.back-btn:hover {
  border-color: var(--brand-2);
  color: var(--brand-2);
  background: var(--panel);
}
.back-btn:active { transform: translateY(1px); }

/* Client view — sidebar fully hidden, single-column layout */
.app.no-sidebar { grid-template-columns: 1fr; }
.app.no-sidebar .sidebar { display: none; }
.app.no-sidebar .topbar-toggle { display: none; }

/* Collapsed sidebar */
.app.collapsed { grid-template-columns: 64px 1fr; }
.app.collapsed .nav-label,
.app.collapsed .sidebar-title,
.app.collapsed .sidebar-footer { display: none; }
.app.collapsed .sidebar-header { justify-content: center; padding: 0 0 14px; }
.app.collapsed .nav-item { justify-content: center; padding: 10px; }

/* Responsive */
@media (max-width: 800px) {
  .app { grid-template-columns: 1fr; }
  .topbar-right .user { display: none; }

  /* Sidebar becomes an off-canvas drawer, opened by the hamburger (nav-open) */
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 1200;
    width: 264px; max-width: 84vw; height: 100vh;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: 2px 0 22px rgba(0,0,0,.55);
  }
  .app.nav-open .sidebar { transform: translateX(0); }
  .app.nav-open::before {
    content: ""; position: fixed; inset: 0; z-index: 1150;
    background: rgba(0,0,0,.55);
  }
  /* Neutralise the desktop "collapsed" rail styling on mobile — the drawer is full-width */
  .app.collapsed { grid-template-columns: 1fr; }
  .app.collapsed .nav-label,
  .app.collapsed .sidebar-title,
  .app.collapsed .sidebar-footer,
  .app.collapsed .nav-sub,
  .app.collapsed .nav-chevron { display: revert; }
  .app.collapsed .nav-item,
  .app.collapsed .nav-toggle { justify-content: flex-start; padding: 10px 18px; }

  /* Wide tables scroll horizontally instead of blowing out the page width */
  .panel table, .report-page table, .tbl, table.data {
    display: block; overflow-x: auto; -webkit-overflow-scrolling: touch;
    white-space: nowrap; max-width: 100%;
  }
}

/* ============ Telephone Report — screen + print ============ */
.report-page {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  margin-top: 14px;
}
.report-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}
.report-section {
  font-size: 13px;
  font-weight: 600;
  margin: 18px 0 8px;
}
.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.report-table th,
.report-table td {
  border: 1px solid var(--border);
  padding: 4px 8px;
  vertical-align: top;
}
.report-table thead th {
  background: rgba(255,255,255,0.05);
  font-weight: 600;
  text-align: left;
}
.report-table td.num { text-align: right; font-family: ui-monospace, Consolas, monospace; }
.report-total td { font-weight: 600; background: rgba(255,255,255,0.04); }
.report-grandtotal td { border-top: 2px solid var(--text, #e6e9ee); background: rgba(255,255,255,0.07); }
.report-table td.netrep-down { color: var(--bad, #ff5a5a); font-weight: 600; }

/* UniFi-style device cards (Daily Network Report + live client view) */
/* Fixed-width columns keep the cards in a tidy aligned grid; ports sized so a
   full 48-port switch fits without a scrollbar. */
.udm-cards { display: grid; grid-template-columns: repeat(auto-fill, 360px); gap: 12px; margin-top: 8px; justify-content: start; }
.udm-card {
  background: #171714; border: 1px solid #2c2c26; border-radius: 8px;
  padding: 10px 12px; color: var(--text); display: flex; flex-direction: column;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.udm-card-offline { opacity: 0.5; }
.udm-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.udm-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.udm-badge { font-size: 11px; color: var(--brand); font-weight: 600; white-space: nowrap; flex: 0 0 auto; }
.udm-ports { display: flex; gap: 10px; align-items: center; background: #0d0d0b; border-radius: 6px; padding: 8px; min-height: 34px; overflow-x: auto; }
.udm-portgrid { display: inline-grid; grid-template-rows: repeat(2, 1fr); grid-auto-flow: column; gap: 2px; }
.udm-sfp { margin-left: auto; }
.udm-port {
  width: 10px; height: 10px; border-radius: 2px; background: #3a3a31; flex: 0 0 auto;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
/* Ports coloured by negotiated link speed (real heatmap, not decoration) */
.udm-port.off { background: #1d1d19; }
.udm-port.up { background: #3fb950; }                    /* up, speed unknown → green */
.udm-port.up.s1g   { background: #3fb950; }              /* 1G   green */
.udm-port.up.s100m { background: #e6c34c; }              /* 100M amber */
.udm-port.up.s10g  { background: #3ec6e6; }              /* 2.5G+ cyan */
.udm-port.uplink   { background: #4ea1ff; }              /* uplink blue */
.udm-port.sfp { border-radius: 50%; }
.udm-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 8px; font-size: 12px; color: #a3a299; }
.udm-foot-stats { display: flex; gap: 12px; }

/* Network devices — master/detail (client Network Status) */
.netdev-split { display: flex; gap: 16px; padding: 0 16px 16px; align-items: flex-start; }
.netdev-list { flex: 0 0 280px; max-height: 460px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.netdev-item {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  background: transparent; border: 1px solid var(--border); border-radius: 6px;
  padding: 8px 10px; color: var(--text, #e6e9ee); cursor: pointer; font-size: 13px;
  transition: background 120ms ease, border-color 120ms ease;
}
.netdev-item:hover { background: rgba(255,255,255,0.04); }
.netdev-item.sel { background: rgba(255,220,0,0.10); border-color: var(--brand); }
.netdev-item-name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.netdev-item-badge { flex: 0 0 auto; font-size: 10px; color: #7fa8d8; font-weight: 600; }
.netdev-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: #6b7785; }
.netdev-dot.on { background: #3fb950; }
.netdev-dot.off { background: #ff5a5a; }
.netdev-detail {
  flex: 1 1 auto; min-width: 0; background: #171714; border: 1px solid #2c2c26;
  border-radius: 8px; padding: 14px 16px;
}
.netdev-detail-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.netdev-detail-name { font-weight: 600; font-size: 15px; }
.netdev-detail-ports { margin-bottom: 10px; }
.netdev-detail-ports .udm-port { width: 13px; height: 13px; }
.netdev-legend { display: flex; gap: 16px; font-size: 11px; color: #a3a299; margin-bottom: 14px; }
.netdev-legend span { display: inline-flex; align-items: center; gap: 5px; }
.netdev-lg { width: 11px; height: 11px; border-radius: 2px; display: inline-block; background: #3a3a31; }
.netdev-lg.up, .netdev-lg.s1g { background: #3fb950; }
.netdev-lg.s100m { background: #e6c34c; }
.netdev-lg.s10g { background: #3ec6e6; }
.netdev-lg.uplink { background: #4ea1ff; }
.netdev-lg.down { background: #3a3a31; }
.netdev-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px 18px; }
.netdev-stat-l { font-size: 11px; color: #a3a299; text-transform: uppercase; letter-spacing: 0.04em; }
.netdev-stat-v { font-size: 15px; font-weight: 600; margin-top: 2px; }
@media (max-width: 720px) {
  .netdev-split { flex-direction: column; }
  .netdev-list { flex: 1 1 auto; width: 100%; max-height: 220px; }
}

/* ---- Dashboard insights band (SLA · failover · occupancy) ---- */
.dins-band { margin-top: 16px; }
.dins-load { padding: 16px 4px; font-size: 12px; }
.dins-eyebrow { font-family: var(--disp); font-weight: 600; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 10px; }
.dins-eyebrow .muted { text-transform: none; letter-spacing: 0; font-weight: 400; }
.dins-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 12px; }
.dins-kpi { position: relative; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.dins-kpi.nw { border-color: #4a4527; }
.dins-new { position: absolute; top: 8px; right: 9px; font-size: 8px; font-weight: 700; letter-spacing: .06em; color: var(--brand-ink); background: var(--brand); border-radius: 3px; padding: 1px 4px; }
.dins-kpi-l { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 3px; }
.dins-kpi-v { font-family: var(--disp); font-weight: 700; font-size: 22px; }
.dins-kpi-v small { font-size: 13px; font-weight: 600; color: var(--muted); }
.dins-kpi-v .brand { color: var(--brand); }
.dins-kpi-v.warn { color: var(--warn); }
.dins-kpi-v.bad { color: var(--bad); }
.dins-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.dins-card { background: var(--panel); border: 1px solid var(--border); border-radius: 11px; padding: 14px 15px; min-width: 0; }
.dins-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.dins-h h4 { margin: 0; font-family: var(--disp); font-weight: 600; font-size: 14px; }
.dins-h .dins-sub { font-size: 11px; color: var(--muted-2); margin-left: auto; }
.dins-blist { display: flex; flex-direction: column; gap: 9px; }
.dins-brow { display: grid; grid-template-columns: 72px 1fr 46px auto; gap: 9px; align-items: center; font-size: 12.5px; }
.dins-brow .dins-pill { justify-self: end; padding: 2px 6px; min-width: 26px; text-align: center; }
.dins-nm { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dins-bar { height: 8px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 5px; overflow: hidden; }
.dins-bar i { display: block; height: 100%; border-radius: 4px; }
.dins-vv { font-family: var(--disp); font-weight: 600; font-variant-numeric: tabular-nums; font-size: 12px; text-align: right; }
.dins-tab { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.dins-tab td { padding: 6px 2px; border-bottom: 1px solid var(--border); }
.dins-tab tr:last-child td { border-bottom: none; }
.dins-tab .r { text-align: right; }
.dins-pill { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 4px; letter-spacing: .02em; }
.dins-pill.ok { background: rgba(62,207,142,.14); color: var(--ok); }
.dins-pill.warn { background: rgba(255,143,45,.15); color: var(--warn); }
.dins-pill.bad { background: rgba(244,113,113,.16); color: var(--bad); }
.dins-pill.mute { background: rgba(255,255,255,.05); color: var(--muted-2); }
.dins-spark { display: block; }
@media (max-width: 900px) { .dins-grid { grid-template-columns: 1fr; } }

/* ---- CCTV recorder inventory ---- */
.cctv-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; padding: 4px 16px 8px; }
.cctv-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.cctv-field > span { color: var(--muted); font-size: 11px; letter-spacing: .03em; }
.cctv-field-wide { grid-column: 1 / -1; }
.cctv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; padding: 0 16px 16px; }
.cctv-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: 11px; padding: 13px 15px; display: flex; flex-direction: column; gap: 8px; }
.cctv-card-head { display: flex; align-items: center; gap: 9px; }
.cctv-kind { font-family: var(--disp); font-weight: 700; font-size: 9.5px; letter-spacing: .05em; padding: 2px 7px; border-radius: 4px; }
.cctv-kind.nvr { background: rgba(106,169,255,.15); color: var(--info); }
.cctv-kind.dvr { background: rgba(255,143,45,.15); color: var(--warn); }
.cctv-kind.acc-server { background: rgba(106,169,255,.15); color: var(--info); }
.cctv-kind.acc-controller { background: rgba(180,140,255,.15); color: #b48cff; }
.cctv-kind.acc-reader { background: rgba(92,196,139,.15); color: var(--good, #5cc48b); }

/* ---- Access — People ---- */
.acp-agent { margin: 2px 0 14px; }
.acp-agent-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border); font-size: 13px; }
.acp-agent-bar.on { background: rgba(92,196,139,.07); }
.acp-agent-bar.off { background: rgba(255,143,45,.07); }
.acp-dot { width: 9px; height: 9px; border-radius: 50%; }
.acp-dot.on { background: var(--good, #5cc48b); box-shadow: 0 0 7px rgba(92,196,139,.7); }
.acp-dot.off { background: var(--warn); }
.acp-key { display: inline-block; font-family: var(--mono, ui-monospace, monospace); font-size: 13px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; word-break: break-all; color: var(--brand); }
.acp-tablewrap { overflow-x: auto; }
.acp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.acp-table th { text-align: left; font-family: var(--disp); font-size: 11px; letter-spacing: .04em; color: var(--muted); padding: 10px 16px; border-bottom: 1px solid var(--border); }
.acp-table td { padding: 9px 16px; border-bottom: 1px solid rgba(255,255,255,.05); }
.acp-table tbody tr:hover { background: rgba(255,255,255,.02); }
.acp-badge { font-family: var(--disp); font-size: 10px; font-weight: 700; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; }
.acp-badge.on { background: rgba(92,196,139,.15); color: var(--good, #5cc48b); }
.acp-badge.off { background: rgba(255,107,107,.15); color: var(--bad, #ff6b6b); }
.acp-warn:hover { border-color: var(--warn); color: var(--warn); }
.acp-danger { color: var(--bad, #ff6b6b); }
.acp-danger:hover { border-color: var(--bad, #ff6b6b); background: rgba(255,107,107,.12); }
.acp-write { font-family: var(--disp); font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 2px 9px; border-radius: 999px; }
.acp-write.live { background: rgba(92,196,139,.16); color: var(--good, #5cc48b); }
.acp-write.dry { background: rgba(255,143,45,.14); color: var(--warn); }
/* Manage-doors modal */
.acp-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 16px; }
.acp-modal { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; width: min(460px, 100%); max-height: 86vh; overflow-y: auto; box-shadow: 0 18px 50px rgba(0,0,0,.5); }
.acp-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-family: var(--disp); font-size: 15px; }
.acp-modal-x { background: none; border: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px; }
.acp-modal-x:hover { color: var(--text); }
.acp-door-list { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--border); border-radius: 8px; padding: 6px; max-height: 44vh; overflow-y: auto; }
.acp-door-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 6px; font-size: 13px; cursor: pointer; }
.acp-door-row:hover { background: rgba(255,255,255,.04); }
.acp-door-row input { accent-color: var(--brand); width: 15px; height: 15px; }
/* Access level quick-pick chips */
.acp-lv-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 8px; }
.acp-lv-chip { font-size: 11.5px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); background: rgba(255,255,255,.03); color: var(--text); cursor: pointer; font-family: inherit; }
.acp-lv-chip:hover { border-color: var(--brand); color: var(--brand); }
/* Access Control — branches landing */
.acb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.acb-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.acb-card.active { border-color: rgba(255,220,0,.4); cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.acb-card.active:hover { border-color: rgba(255,220,0,.75); }
.acb-card.sel { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.acb-hint { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
/* A branch's existing Access views (Readers / People / Activity) are hosted inside its
   detail panel — hide their page titles there, keep their controls. */
#acb-hosted .view-head h2, #acb-hosted .view-head p { display: none; }
#acb-hosted .view-head > div:not([id]) { display: none; }
#acb-hosted .view-head { margin: 0 0 10px; justify-content: flex-end !important; }
/* Activity filters sit in one compact row inside the panel (door · search · refresh). */
#acb-hosted #acev-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
#acb-hosted #acev-controls .login-input { width: auto; margin: 0 !important; }
#acb-hosted #acev-controls .btn-ghost { margin: 0 !important; }
.acb-head { display: flex; align-items: center; gap: 8px; font-family: var(--disp); font-size: 15px; flex-wrap: wrap; }
.acb-sys { margin-left: auto; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; padding: 2px 8px; border-radius: 999px; background: rgba(255,220,0,.14); color: var(--brand); }
.acb-dot { width: 9px; height: 9px; border-radius: 50%; }
.acb-dot.on { background: var(--good, #5cc48b); box-shadow: 0 0 7px rgba(92,196,139,.7); }
.acb-dot.warn { background: var(--warn); }
.acb-dot.off { background: var(--muted); opacity: .5; }
.acb-meta { font-size: 12.5px; margin: 8px 0 6px; }
.acb-links { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.acb-links a, .acb-link-btn { color: var(--brand); font-size: 12.5px; text-decoration: none; background: none; border: none; cursor: pointer; padding: 0; font-family: inherit; }
.acb-links a:hover, .acb-link-btn:hover { text-decoration: underline; }
.cctv-kind.acc-server { background: rgba(146,227,169,.15); color: var(--good, #5cc48b); }
.cctv-kind.acc-controller { background: rgba(106,169,255,.15); color: var(--info); }
.cctv-kind.acc-reader { background: rgba(255,220,0,.14); color: var(--brand); }
.cctv-name { font-family: var(--disp); font-weight: 600; font-size: 14px; }
.cctv-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: var(--muted); }
.cctv-notes { font-size: 11.5px; line-height: 1.45; }
.cctv-cred { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; padding: 6px 8px; margin-top: 2px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); border-radius: 6px; }
.cctv-cred-key { font-size: 12px; }
.cctv-cred-user { font-weight: 600; }
.cctv-cred-pw { font-family: var(--mono, ui-monospace, monospace); letter-spacing: .5px; color: var(--brand); }
.cctv-actions { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.05); }
.cctv-open { font-family: var(--disp); font-weight: 600; font-size: 12px; color: var(--brand); text-decoration: none; }
.cctv-open:hover { text-decoration: underline; }
.cctv-mini { font-size: 11px; padding: 3px 9px; }

/* ---- CCTV live wall ---- */
.ccw-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 4px 0 16px; }
.ccw-kpi { background: var(--bg-2); border: 1px solid var(--border); border-radius: 11px; padding: 12px 16px; }
.ccw-kpi-label { font-family: var(--disp); font-size: 10px; letter-spacing: .08em; color: var(--muted); }
.ccw-kpi-val { font-family: var(--disp); font-weight: 700; font-size: 26px; line-height: 1.15; margin-top: 3px; font-variant-numeric: tabular-nums; }
.ccw-kpi-val small { font-size: 14px; color: var(--muted); font-weight: 600; }
.ccw-kpi.good .ccw-kpi-val { color: var(--good, #5cc48b); }
.ccw-kpi.bad .ccw-kpi-val { color: var(--bad, #ff6b6b); }
.ccw-branch { margin-bottom: 18px; }
.ccw-branch-head { display: flex; align-items: baseline; gap: 10px; margin: 0 2px 9px; }
.ccw-branch-head h3 { font-family: var(--disp); font-size: 15px; margin: 0; }
.ccw-branch-meta { font-size: 12px; color: var(--muted); }
.ccw-branch-down { color: var(--bad, #ff6b6b); font-weight: 600; }
.ccw-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.ccw-tile { position: relative; background: #14140f; border: 1px solid var(--border); border-radius: 12px; padding: 13px 14px 11px; display: flex; flex-direction: column; gap: 7px; overflow: hidden; }
.ccw-tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--muted); }
.ccw-tile.ccw-up::before { background: var(--good, #5cc48b); }
.ccw-tile.ccw-down::before { background: var(--bad, #ff6b6b); }
.ccw-tile.ccw-unknown::before { background: #7c7c72; }
.ccw-tile-top { display: flex; align-items: center; gap: 8px; }
.ccw-led { width: 9px; height: 9px; border-radius: 50%; background: #7c7c72; flex: none; box-shadow: 0 0 0 0 rgba(0,0,0,0); }
.ccw-up .ccw-led { background: var(--good, #5cc48b); box-shadow: 0 0 7px rgba(92,196,139,.7); }
.ccw-down .ccw-led { background: var(--bad, #ff6b6b); animation: ccwPulse 1.3s infinite; }
@keyframes ccwPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,107,107,.7); } 50% { box-shadow: 0 0 0 6px rgba(255,107,107,0); } }
.ccw-ch { margin-left: auto; font-family: var(--disp); font-weight: 700; font-size: 19px; line-height: 1; font-variant-numeric: tabular-nums; }
.ccw-ch small { font-size: 10px; font-weight: 600; color: var(--muted); margin-left: 1px; }
.ccw-name { font-family: var(--disp); font-weight: 600; font-size: 14px; }
.ccw-sub { display: flex; flex-wrap: wrap; gap: 4px 11px; font-size: 11.5px; color: var(--muted); }
.ccw-state { font-family: var(--disp); font-weight: 700; font-size: 10px; letter-spacing: .05em; }
.ccw-state-up { color: var(--good, #5cc48b); }
.ccw-state-down { color: var(--bad, #ff6b6b); }
.ccw-state-unknown { color: var(--muted); }
.ccw-cred { background: rgba(255,255,255,.02); margin-top: 1px; }
.ccw-tile-actions { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.05); }

/* ---- CCTV video wall ---- */
.ccw-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ccw-live { display: inline-flex; align-items: center; gap: 6px; font-family: var(--disp); font-size: 12px; font-weight: 600; color: var(--muted); }
.ccw-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good, #5cc48b); box-shadow: 0 0 7px rgba(92,196,139,.7); animation: ccwPulse 2s infinite; }
.ccw-sel { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); text-transform: none; }
.ccw-sel select { background: var(--bg-2); color: var(--text); border: 1px solid var(--border); border-radius: 7px; padding: 5px 8px; font-size: 12px; }
.ccw-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 16px; }
.ccw-tab { display: inline-flex; align-items: center; gap: 7px; background: var(--bg-2); border: 1px solid var(--border); color: var(--muted); border-radius: 999px; padding: 6px 14px; font-family: var(--disp); font-size: 12px; font-weight: 600; cursor: pointer; }
.ccw-tab:hover { color: var(--text); }
.ccw-tab.active { background: var(--brand); border-color: var(--brand); color: #1a1a12; }
.ccw-tab-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good, #5cc48b); }
.ccw-tab-dot.bad { background: var(--bad, #ff6b6b); }
.ccw-tab.active .ccw-tab-dot { box-shadow: 0 0 0 2px rgba(0,0,0,.15); }
.ccw-rec { background: #0f0f0b; border: 1px solid var(--border); border-radius: 13px; padding: 12px 14px 14px; margin-bottom: 16px; }
.ccw-rec-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 11px; }
.ccw-rec-name { font-family: var(--disp); font-size: 14px; }
.ccw-rec-count { font-size: 11.5px; color: var(--muted); }
.ccw-rec-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.ccw-chip { min-width: 22px; height: 20px; padding: 0 5px; font-size: 10.5px; font-weight: 600; font-family: var(--disp); color: var(--muted); background: rgba(255,255,255,.05); border: 1px solid var(--border); border-radius: 5px; cursor: pointer; }
.ccw-chip:hover { color: var(--text); border-color: var(--brand); }
.ccw-rec-open { margin-left: auto; font-family: var(--disp); font-weight: 700; font-size: 11px; letter-spacing: .04em; color: var(--brand); text-decoration: none; padding: 4px 10px; border: 1px solid var(--border); border-radius: 6px; }
.ccw-rec-open:hover { border-color: var(--brand); }
.ccw-led-wait { background: #d0a53c !important; animation: ccwPulse 1.3s infinite; }
.ccw-led-up { background: var(--good, #5cc48b) !important; box-shadow: 0 0 7px rgba(92,196,139,.7); }
.ccw-led-down { background: var(--bad, #ff6b6b) !important; }
.ccw-cams { display: grid; gap: 8px; }
.ccw-cam { position: relative; aspect-ratio: 16 / 9; background: #000; border: 1px solid #1e1e18; border-radius: 8px; overflow: hidden; }
.ccw-cam-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--disp); font-size: 10.5px; letter-spacing: .12em; color: #4a4a44; }
.ccw-cam-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.ccw-cam.live .ccw-cam-img { opacity: 1; }
.ccw-cam.live .ccw-cam-ph { display: none; }
.ccw-cam-label { position: absolute; top: 5px; left: 6px; font-family: var(--disp); font-size: 10px; font-weight: 700; letter-spacing: .05em; color: #fff; background: rgba(0,0,0,.55); padding: 1px 6px; border-radius: 4px; }
.ccw-cam-time { position: absolute; bottom: 5px; right: 7px; font-size: 10px; color: #e6e6c8; text-shadow: 0 1px 2px rgba(0,0,0,.9); font-variant-numeric: tabular-nums; }
.ccw-cams-off { display: block; }
.ccw-unreach { padding: 14px 16px; font-size: 12.5px; line-height: 1.5; color: var(--muted); background: rgba(255,255,255,.02); border: 1px dashed var(--border); border-radius: 8px; }

/* ---- Client landing v2 — hero, live strip, live tiles ---- */
.ch2-skel { display: inline-block; height: 14px; border-radius: 5px;
  background: linear-gradient(90deg, #24241f 25%, #2e2e28 50%, #24241f 75%);
  background-size: 200% 100%; animation: ch2shimmer 1.4s infinite; }
.ch2-skel-ring { width: 120px; height: 120px; border-radius: 50%; }
@keyframes ch2shimmer { to { background-position: -200% 0; } }
.ch2-hero { display: grid; grid-template-columns: 1fr auto; gap: 26px; align-items: center;
  background: linear-gradient(135deg, var(--panel) 0%, var(--panel-2) 78%, #2b2a1d 100%);
  border: 1px solid var(--border); border-radius: 18px; padding: 26px 30px 20px;
  position: relative; overflow: hidden; margin-bottom: 14px; }
.ch2-hero::before { content: ''; position: absolute; right: -90px; top: -120px; width: 340px; height: 340px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,220,0,.07) 0%, transparent 65%); pointer-events: none; }
.ch2-eyebrow { font-family: var(--disp); font-weight: 600; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 6px; }
.ch2-h1 { margin: 0; font-family: var(--disp); font-weight: 700; font-size: 27px; line-height: 1.15; }
.ch2-h1 b { color: var(--brand); }
.ch2-sub { color: var(--muted); font-size: 13px; margin-top: 6px; }
.ch2-pills { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 15px; min-height: 30px; }
.ch2-pill { display: inline-flex; align-items: center; gap: 7px; font-family: var(--disp); font-weight: 600; font-size: 12px;
  padding: 5px 12px; border-radius: 20px; background: rgba(255,255,255,.04); border: 1px solid var(--border); }
.ch2-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); }
.ch2-pill.ok { color: var(--ok); }
.ch2-pill.ok .dot { background: var(--ok); box-shadow: 0 0 8px rgba(62,207,142,.8); animation: ch2pulse 2.4s infinite; }
.ch2-pill.bad { color: var(--bad); }
.ch2-pill.bad .dot { background: var(--bad); animation: ch2pulse 1.2s infinite; }
.ch2-pill.plain { color: var(--muted); }
@keyframes ch2pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.ch2-score { display: flex; flex-direction: column; align-items: center; gap: 5px; z-index: 1; min-width: 132px; }
.ch2-ring { color: var(--muted); }
.ch2-ok .ch2-ring   { color: var(--ok); }
.ch2-good .ch2-ring { color: #46c58a; }
.ch2-warn .ch2-ring { color: var(--warn); }
.ch2-bad .ch2-ring  { color: var(--bad); }
.ch2-ring-num { font-family: var(--disp); font-weight: 700; font-size: 36px; fill: var(--text); }
.ch2-ring-den { font-family: var(--disp); font-size: 9px; letter-spacing: .1em; fill: var(--muted-2); }
.ch2-grade { font-family: var(--disp); font-weight: 600; font-size: 13px; }
.ch2-ok .ch2-grade { color: var(--ok); } .ch2-good .ch2-grade { color: #46c58a; }
.ch2-warn .ch2-grade { color: var(--warn); } .ch2-bad .ch2-grade { color: var(--bad); } .ch2-mute .ch2-grade { color: var(--muted); }
.ch2-updots { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px;
  border-top: 1px solid rgba(255,255,255,.06); margin-top: 14px; padding-top: 14px; }
.ch2-updots-label { font-family: var(--disp); font-weight: 600; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); white-space: nowrap; }
.ch2-dots { display: flex; gap: 4px; flex: 1; }
.ch2-dots i { flex: 1; height: 17px; border-radius: 3px; background: var(--ok); opacity: .85; }
.ch2-dots i.w { background: var(--warn); }
.ch2-dots i.b { background: var(--bad); }
.ch2-dots i.na { background: #2a2a25; }
.ch2-dots i:hover { outline: 1px solid var(--text); opacity: 1; }
.ch2-updots-val { font-family: var(--disp); font-weight: 600; font-size: 12.5px; color: var(--ok); white-space: nowrap; }
.ch2-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 8px; }
.ch2-stat { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px 17px; position: relative; }
.ch2-stat-l { font-family: var(--disp); font-weight: 600; font-size: 10px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 4px; }
.ch2-stat-v { font-family: var(--disp); font-weight: 700; font-size: 22px; min-height: 28px; }
.ch2-stat-v small { font-weight: 600; font-size: 12px; color: var(--muted); }
.ch2-stat-s { font-size: 11px; color: var(--muted-2); margin-top: 2px; }
.ch2-live { position: absolute; top: 11px; right: 13px; font-family: var(--disp); font-weight: 600; font-size: 9px; letter-spacing: .08em; color: var(--ok); display: flex; align-items: center; gap: 4px; }
.ch2-live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); animation: ch2pulse 2.4s infinite; }
.ch2-sect { font-family: var(--disp); font-weight: 600; font-size: 11px; letter-spacing: .15em; text-transform: uppercase; color: var(--muted-2); margin: 20px 2px 10px; }
.tile-prev { border-top: 1px solid rgba(255,255,255,.06); margin-top: auto; padding-top: 10px;
  display: flex; align-items: flex-end; gap: 12px; justify-content: space-between; min-height: 42px; width: 100%; }
.tp-big { font-family: var(--disp); font-weight: 700; font-size: 19px; color: var(--text); }
.tp-big small { font-weight: 600; font-size: 11px; color: var(--muted); }
.tp-sub { font-size: 11px; color: var(--muted-2); }
.tp-tag { font-family: var(--disp); font-weight: 600; font-size: 10px; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.tp-tag.ok { background: rgba(62,207,142,.13); color: var(--ok); }
.tp-tag.warn { background: rgba(255,143,45,.13); color: var(--warn); }
.ch2-soonrow { display: flex; gap: 12px; }
.ch2-soon { flex: 1; display: flex; align-items: center; gap: 12px; background: var(--bg-2);
  border: 1px dashed #3a392f; border-radius: 12px; padding: 12px 17px; color: var(--muted-2); font-size: 13px; }
.ch2-soon b { color: var(--muted); font-family: var(--disp); font-weight: 600; font-size: 13px; }
.ch2-soon-badge { margin-left: auto; font-family: var(--disp); font-weight: 600; font-size: 9px; letter-spacing: .1em;
  background: rgba(255,220,0,.1); color: var(--brand); padding: 3px 8px; border-radius: 4px; white-space: nowrap; }
.ch2-support { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: linear-gradient(135deg, var(--panel), #26251c); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px 22px; margin-top: 20px; }
.ch2-support p { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; max-width: 64ch; }
.ch2-support-big { font-family: var(--disp); font-weight: 600; font-size: 16px; }
.ch2-btn { flex: 0 0 auto; background: var(--brand); color: var(--brand-ink); font-family: var(--disp); font-weight: 600;
  font-size: 13px; padding: 10px 20px; border-radius: 8px; text-decoration: none; }
.ch2-btn:hover { filter: brightness(1.08); }
@media (prefers-reduced-motion: reduce) {
  .ch2-skel, .ch2-pill .dot, .ch2-live::before { animation: none; }
  .ch2-ring circle { transition: none !important; }
}
@media (max-width: 860px) { .ch2-strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .ch2-hero { grid-template-columns: 1fr; }
  .ch2-score { align-self: center; }
  .ch2-soonrow { flex-direction: column; }
}

/* ---- Speed Test — live path animation while a test runs ---- */
.st-packets circle { opacity: 0; }
#st-diagram.st-flowing .st-packets circle { animation: st-flow 1.5s linear infinite; }
#st-diagram.st-flowing .st-packets circle:nth-child(2) { animation-delay: .37s; }
#st-diagram.st-flowing .st-packets circle:nth-child(3) { animation-delay: .75s; }
#st-diagram.st-flowing .st-packets circle:nth-child(4) { animation-delay: 1.12s; }
#st-diagram.st-flowing.st-rev .st-packets circle { animation-direction: reverse; }
@keyframes st-flow {
  0%   { transform: translateX(0);     opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateX(740px); opacity: 0; }
}
#st-diagram .st-hop { transition: stroke-opacity .3s; }
#st-diagram.st-flowing .st-hop { stroke-opacity: .8; animation: st-march .5s linear infinite; }
#st-diagram.st-flowing.st-rev .st-hop { animation-direction: reverse; }
@keyframes st-march { to { stroke-dashoffset: -8; } }
#st-diagram #st-bar, #st-diagram #st-bar-label { transition: fill .5s, stroke .5s, fill-opacity .5s; }
#st-diagram.st-flowing #st-bar { animation: st-barpulse 1.3s ease-in-out infinite; }
@keyframes st-barpulse { 0%, 100% { fill-opacity: .12; } 50% { fill-opacity: .28; } }
@media (prefers-reduced-motion: reduce) {
  #st-diagram .st-packets circle { animation: none !important; }
  #st-diagram.st-flowing .st-hop { animation: none !important; }
  #st-diagram.st-flowing #st-bar { animation: none !important; }
}

@media print {
  /* Hide everything that isn't part of the printable report */
  body * { visibility: hidden; }
  .report-page,
  .report-page * { visibility: visible; }
  .report-page {
    position: absolute;
    left: 0; top: 0;
    width: 100%;
    background: #fff;
    border: none;
    border-radius: 0;
    padding: 16px 24px;
    color: #000;
  }
  .report-page .report-table th,
  .report-page .report-table td {
    border: 1px solid #999;
    color: #000;
  }
  .report-page .report-table thead th { background: #f0f0f0; }
  .report-page .report-total td { background: #fafafa; }
  .report-page .report-grandtotal td { border-top: 2px solid #000; background: #f0f0f0; }
  /* Avoid duplicate sidebars/headers leaking through positioning */
  .no-print, .sidebar, .topbar, .view-head { display: none !important; }
  .print-only { display: block !important; }
  @page { margin: 12mm; size: A4; }
}

/* ============ Dashboard donut grid ============ */
.donut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.donut-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.donut-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #e6e9ee);
}
.donut-svg {
  width: 100%;
  max-width: 180px;
  align-self: center;
  margin: 4px 0;
}
.donut-legend {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}

/* Donut card — clickable variant */
.donut-card[data-donut] {
  cursor: pointer;
  transition: border-color 0.15s, transform 0.06s, box-shadow 0.15s;
}
.donut-card[data-donut]:hover {
  border-color: var(--brand-2);
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}
.donut-card[data-donut]:active { transform: translateY(1px); }
.donut-card[data-donut]:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 2px;
}
.donut-cta {
  font-size: 11px;
  text-align: center;
  letter-spacing: 0.5px;
  padding-top: 6px;
  opacity: 0.65;
}
.donut-card[data-donut]:hover .donut-cta { opacity: 1; color: var(--brand-2); }

/* Branch Internet detail modal — clickable rows */
tr.branch-row:hover { background: rgba(96,165,250,0.06); }
tr.branch-row:hover .branch-chev { color: var(--brand-2); }

/* Dashboard manual refresh button */
#dash-refresh-btn:hover { color: var(--brand-2); border-color: var(--brand-2); }
#dash-refresh-btn:disabled { opacity: 0.6; }
#dash-refresh-btn.refreshing svg { animation: dash-spin 0.8s linear infinite; }
@keyframes dash-spin { to { transform: rotate(360deg); } }

/* ===== Cube Workspace brand: display typography ===== */
.view-head h2, .panel-head h3, .tile h3, .login-title, .login-brand,
.sidebar-title, .report-title { font-family: var(--disp); }

/* ===== Report brand bar (client-facing PDFs — screen + print) ===== */
.report-brandbar {
  display: flex; justify-content: space-between; align-items: center;
  background: #0f0f0f; color: #ffffff; padding: 10px 14px;
  border-bottom: 3px solid #ffdc00; margin-bottom: 16px;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.report-brandbar .rb-word {
  font-family: var(--disp); font-weight: 700; font-size: 14px;
  letter-spacing: 0.14em; text-transform: uppercase;
  display: flex; align-items: center; gap: 9px; color: #ffffff;
}
.report-brandbar .rb-word::before { content: ""; width: 10px; height: 10px; background: #ffdc00; }
.report-brandbar .rb-sub { font-size: 11px; color: #bdbcb2; letter-spacing: 0.06em; }

/* ===== Branch Command Center ===== */
.cc-kpis {
  display: flex; flex-wrap: wrap;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--panel); margin-bottom: 16px; overflow: hidden;
}
.cc-kpi { flex: 1 1 130px; min-width: 125px; padding: 13px 18px; border-right: 1px solid var(--border); }
.cc-kpi:last-child { border-right: 0; }
.cc-kpi .l { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 3px; }
.cc-kpi .v { font-family: var(--disp); font-weight: 700; font-size: 22px; font-variant-numeric: tabular-nums; }
.cc-kpi .v small { font-size: 13px; font-weight: 600; color: var(--muted); }
.cc-kpi.warn .v { color: var(--warn); }
.cc-kpi.alert .v { color: var(--brand); }

.cc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.cc-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 16px 12px; cursor: pointer; outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.cc-card:hover, .cc-card:focus-visible { border-color: var(--brand); }
.cc-card.sel { border-color: var(--brand); background: var(--panel-2); }
.cc-card-down { opacity: 0.65; }
.cc-card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.cc-card-name { font-family: var(--disp); font-weight: 600; font-size: 15px; }
.cc-card-mid { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 10px; }
.cc-stats { display: flex; gap: 16px; flex-wrap: wrap; }
.cc-stat .l { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); }
.cc-stat .v { font-family: var(--disp); font-weight: 600; font-size: 16px; font-variant-numeric: tabular-nums; }
.cc-stat .v .dim { color: var(--muted-2); font-weight: 400; }
.cc-stat .v.warn { color: var(--warn); }
.cc-spark { display: block; flex: 0 0 auto; }
.cc-spark line { stroke: var(--border); stroke-width: 1; }
.cc-spark polyline { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.cc-spark rect.end { fill: var(--brand); }
.cc-spark-empty { font-size: 11px; color: var(--muted-2); align-self: center; }
.cc-card-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  border-top: 1px solid var(--border); padding-top: 9px;
  font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.cc-badge {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--brand-ink); background: var(--brand); padding: 2px 7px; border-radius: 3px;
}
.cc-detail-panel { margin-top: 14px; border-color: var(--brand); }
.cc-meta { font-size: 12px; margin-top: 14px; }

/* ===== Command Center — Phase 3 toolbox ===== */
.cc-tools {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 14px; padding: 10px 14px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
}
.cc-tools-label {
  font-family: var(--disp); font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted-2);
}
.cc-tool-btn {
  background: transparent; border: 1px solid var(--border); color: var(--muted);
  padding: 6px 14px; border-radius: 7px; font: inherit; font-size: 13px;
  font-weight: 600; cursor: pointer; transition: border-color 0.15s, color 0.15s;
}
.cc-tool-btn:hover { border-color: var(--brand); color: var(--text); }
.cc-tool-btn.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.cc-tabs { display: flex; gap: 4px; padding: 0 16px 12px; }
.cc-tab {
  background: transparent; border: none; border-bottom: 2px solid transparent;
  color: var(--muted); padding: 6px 12px; font: inherit; font-size: 13px;
  font-weight: 600; cursor: pointer;
}
.cc-tab:hover { color: var(--text); }
.cc-tab.on { color: var(--brand); border-bottom-color: var(--brand); }
.fw-chip {
  display: inline-block; font-size: 12px; font-variant-numeric: tabular-nums;
  border: 1px solid var(--border); border-radius: 5px; padding: 2px 8px;
  margin: 1px 2px 1px 0; color: var(--text); cursor: default;
}
.fw-chip.behind { border-color: var(--warn); color: var(--warn); }
.cc-band-h {
  font-family: var(--disp); font-size: 14px; font-weight: 600;
  margin: 16px 0 8px; display: flex; align-items: baseline; gap: 10px;
}
.cc-issue-list { list-style: none; margin: 0; padding: 0; }
.cc-issue-list li {
  position: relative; padding: 7px 0 7px 18px; font-size: 13px;
  color: var(--muted); border-bottom: 1px dashed var(--border);
}
.cc-issue-list li::before {
  content: ""; position: absolute; left: 2px; top: 13px; width: 7px; height: 7px;
}
.cc-issue-list li.warn::before { background: var(--warn); }
.cc-issue-list li.bad::before { background: var(--bad); }
.cc-issue-list li b { color: var(--text); }
.cc-meter {
  display: inline-block; vertical-align: middle; width: 74px; height: 7px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 4px;
  overflow: hidden;
}
.cc-meter i {
  display: block; height: 100%;
}
.cc-meter i.ok { background: var(--ok); }
.cc-meter i.warn { background: var(--warn); }
.cc-meter i.bad { background: var(--bad); }

/* ===== AP cards in Command Center drill-down ===== */
.ap-card .ap-radios {
  display: flex; flex-direction: column; gap: 4px;
  background: #0d0d0b; border-radius: 6px; padding: 8px; min-height: 34px;
  margin-bottom: 8px;
}
.ap-radio {
  display: grid; grid-template-columns: 34px 52px 1fr auto; gap: 8px;
  align-items: center; font-size: 12px; color: var(--muted);
}
.ap-band { font-family: var(--disp); font-weight: 600; color: var(--text); font-size: 11px; }
.ap-util { text-align: right; color: var(--muted); }
.ap-radio.warm .ap-util { color: var(--warn); font-weight: 600; }
.ap-radio.hot .ap-util { color: var(--bad); font-weight: 600; }
.ap-cl { text-align: right; color: var(--muted-2); }

/* ===== WiFi optimizer — apply buttons ===== */
.cc-find-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  flex-wrap: wrap; padding: 9px 0 9px 18px;
}
.cc-find-msg { flex: 1 1 320px; min-width: 260px; }
.cc-find-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.cc-apply-btn {
  background: var(--brand); color: var(--brand-ink); border: 1px solid var(--brand);
  font: inherit; font-size: 12px; font-weight: 600; padding: 5px 11px;
  border-radius: 6px; cursor: pointer; white-space: nowrap;
}
.cc-apply-btn:hover:not(:disabled) { background: #ffe84d; }
.cc-apply-btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.cc-apply-btn.ghost:hover:not(:disabled) { border-color: var(--brand); }
.cc-apply-btn:disabled { opacity: 0.5; cursor: default; }
.cc-find-list li.applied { background: rgba(62,207,142,0.06); }

/* ===== Internet capacity panel ===== */
.cap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.cap-card { background: var(--panel-2); border: 1px solid var(--border); border-radius: 9px; padding: 12px 14px; }
.cap-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cap-branch { font-family: var(--disp); font-weight: 600; font-size: 15px; }
.cap-line { border-top: 1px solid var(--border); padding: 9px 0 3px; }
.cap-line:first-of-type { border-top: none; }
.cap-line.active { }
.cap-line-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.cap-kind { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); font-weight: 600; }
.cap-prov { font-size: 13px; color: var(--muted); margin-left: auto; }
.cap-prov b { color: var(--text); }
/* ISP brand chip — colour + mark per provider (no logo assets) */
.isp-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 16px; padding: 0 5px; border-radius: 4px;
  font-family: var(--disp); font-weight: 700; font-size: 8.5px; letter-spacing: .06em;
  vertical-align: text-bottom; -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.cap-row { display: flex; align-items: center; gap: 8px; margin: 4px 0; font-size: 12px; }
.cap-lbl { color: var(--muted-2); width: 68px; flex: 0 0 auto; font-size: 11px; }
.cap-val { color: var(--muted); }
.cap-val .dim { color: var(--muted-2); }
.cap-meter { flex: 1 1 auto; max-width: 120px; height: 7px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.cap-meter i { display: block; height: 100%; background: var(--brand); }
.cap-meter i.ok { background: var(--ok); }
.cap-meter i.warn { background: var(--warn); }
.cap-meter i.bad { background: var(--bad); }
.cap-editing { border-color: var(--brand); }
.cap-edit-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.cap-edit-kind { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); width: 58px; flex: 0 0 auto; }
.cap-edit-line input { font-size: 13px; }

/* ===== Capacity speed-test row ===== */
.cap-speed {
  border-top: 1px solid var(--border); margin-top: 8px; padding-top: 9px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px;
}
.cap-st-res { color: var(--muted); }
.cap-st-res b { color: var(--text); }
.cap-pct.ok { color: var(--ok); }
.cap-pct.warn { color: var(--warn); }
.cap-pct.bad { color: var(--bad); }

/* ===== WAN panel (Stage A) ===== */
.wan-path {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 14px; font-size: 13px; color: var(--muted); margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.wan-path b { color: var(--text); }
.wan-line { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; }
.wan-line.active { border-color: var(--brand); }
.wan-line-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.wan-label { font-family: var(--disp); font-weight: 600; font-size: 14px; }
.wan-prov { margin-left: auto; font-size: 13px; color: var(--muted); }
.wan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
/* Live-ticking VPN uptime — brand yellow, monospaced digits so it doesn't jitter. */
.vpn-uptime { color: var(--brand); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Device Monitor — morning IP scan board */
.dm-kpis { display: flex; align-items: center; gap: 20px; padding: 12px 16px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.dm-kpi { display: flex; flex-direction: column; line-height: 1.15; }
.dm-kpi b { font-size: 22px; font-family: var(--disp); }
.dm-kpi span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.dm-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.dm-group { border: 1px solid var(--border); border-radius: 10px; background: var(--panel); padding: 12px 14px; }
.dm-group-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.dm-count { font-size: 12px; font-weight: 600; }
.dm-count.ok { color: var(--ok); }
.dm-count.warn { color: var(--warn); }
.dm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dm-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-variant-numeric: tabular-nums; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--border); background: rgba(255,255,255,.02); }
.dm-chip.online { border-color: rgba(52,199,120,.35); }
.dm-chip.offline { border-color: rgba(244,113,113,.4); }
.dm-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dm-dot.up { background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.dm-dot.down { background: var(--bad); }
.dm-dot.unk { background: #8a897e; }

/* Daily-report recipient chips */
.dh-recip-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dh-chip-email { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 4px 6px 4px 11px; border-radius: 999px; border: 1px solid var(--border); background: rgba(255,255,255,.03); color: var(--text); }
.dh-chip-email button { border: none; background: rgba(255,255,255,.07); color: var(--muted); width: 18px; height: 18px; border-radius: 50%; cursor: pointer; font-size: 13px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.dh-chip-email button:hover { background: var(--bad); color: #fff; }

/* Command Center — network Map tab */
.nmap-wrap { display: flex; gap: 0; min-height: 520px; }
.nmap-canvas { flex: 1; position: relative; min-width: 0; background: #0f0f0a; border: 1px solid var(--border); border-radius: 10px; }
.nmap-canvas svg { width: 100%; height: 520px; display: block; }
.nmap-edge { fill: none; stroke-width: 1.6; opacity: .55; transition: opacity .12s; }
.nmap-edge.dim { opacity: .07; }
.nmap-el { font-family: ui-monospace, Consolas, monospace; font-size: 9.5px; fill: var(--muted); }
.nmap-el.dim { opacity: 0; }
.nmap-node { cursor: pointer; }
.nmap-node .nmap-ring { fill: #1c1b12; stroke-width: 2; }
.nmap-lbl { font-size: 11px; font-weight: 600; fill: var(--text); text-anchor: middle; }
.nmap-meta { font-family: ui-monospace, Consolas, monospace; font-size: 9px; fill: var(--muted); text-anchor: middle; }
.nmap-node.dim { opacity: .22; }
.nmap-node.sel .nmap-ring { stroke: var(--brand) !important; filter: drop-shadow(0 0 6px rgba(255,220,0,.5)); }
.nmap-legend { position: absolute; right: 12px; bottom: 12px; background: rgba(15,15,10,.92); border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; font-size: 11px; }
.nmap-lr { display: flex; align-items: center; gap: 7px; margin: 3px 0; color: var(--text); }
.nmap-pd { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.nmap-sw { width: 20px; border-top: 2px solid; flex: none; }
.nmap-panel { width: 280px; flex: none; padding: 4px 4px 4px 18px; }
/* ---- Fleet map: animated links, draggable nodes, richer info ---- */
.fleet-edge { fill: none; stroke-width: 1.8; opacity: .6; stroke-dasharray: 5 7; animation: fleetdash 1.1s linear infinite; }
.fleet-edge.warn { animation-duration: 2.4s; opacity: .7; }
.fleet-edge.bad { animation: none; stroke-dasharray: none; opacity: .5; }
@keyframes fleetdash { to { stroke-dashoffset: -24; } }
.fleet-node { cursor: grab; touch-action: none; }
.fleet-node.dragging { cursor: grabbing; }
.fleet-node.dragging .nmap-ring { filter: drop-shadow(0 0 7px rgba(255,220,0,.55)); }
.fleet-node-info { font-family: ui-monospace, Consolas, monospace; font-size: 8.5px; fill: var(--muted); text-anchor: middle; }
.fleet-lag-ok { fill: #3ecf8e; } .fleet-lag-warn { fill: #ffb02e; } .fleet-lag-bad { fill: #f47171; }
@media (prefers-reduced-motion: reduce) { .fleet-edge { animation: none; } }
.nmap-hint { color: var(--muted); font-size: 13px; line-height: 1.6; padding: 24px 8px; text-align: center; }
.nmap-ph { display: flex; align-items: center; gap: 10px; }
.nmap-badge { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: #1c1b12; border: 1px solid var(--border); }
.nmap-panel h3 { margin: 0; font-size: 16px; }
.nmap-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.nmap-st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; margin-top: 12px; padding: 4px 10px; border-radius: 20px; border: 1px solid var(--border); }
.nmap-kv-wrap { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 10px; }
.nmap-kr { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 13px; }
.nmap-kk { color: var(--muted); }
.nmap-kvv { font-family: ui-monospace, Consolas, monospace; text-align: right; }
@media (max-width: 820px) { .nmap-wrap { flex-direction: column; } .nmap-panel { width: auto; padding: 14px 4px 0; } }
.wan-k { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 3px; }
.wan-v { font-size: 15px; }
.wan-stageb {
  margin-top: 6px; padding: 12px 14px; border: 1px dashed var(--border);
  border-radius: 8px; background: rgba(255,255,255,0.02);
}
.wan-stageb button { margin-top: 10px; }

/* ===== WAN failover active state ===== */
.wan-fo-active { border-color: var(--warn); border-style: solid; background: rgba(255,143,45,0.06); }

/* ===== Failover Ops ===== */
.fo-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
@media (max-width: 820px) { .fo-kpis { grid-template-columns: repeat(2, 1fr); } }
.fo-kpi { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 13px 15px; }
.fo-kpi b { font-family: var(--disp); font-weight: 700; font-size: 22px; line-height: 1.1; display: block; }
.fo-kpi span { font-size: 11px; color: var(--muted); margin-top: 3px; display: block; }
.fo-safety { display: flex; align-items: center; gap: 10px; background: rgba(255,143,45,0.08); border: 1px solid rgba(255,143,45,0.34); border-radius: 12px; padding: 11px 15px; margin-bottom: 16px; font-size: 12.5px; }
.fo-safety b { color: var(--warn); }
.fo-table td { vertical-align: middle; }
.fo-active { border: 1px solid rgba(248,113,113,0.4); background: linear-gradient(90deg, rgba(248,113,113,0.05), transparent); padding: 16px 18px; margin-bottom: 16px; }
.fo-active-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.fo-live { font-size: 10px; font-weight: 700; letter-spacing: .06em; color: var(--bad); background: rgba(248,113,113,0.14); padding: 3px 9px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; }
.fo-bl { width: 7px; height: 7px; border-radius: 50%; background: var(--bad); animation: fo-pulse 1.1s infinite; }
@keyframes fo-pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
.fo-steps { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.fo-step { display: flex; gap: 11px; padding: 6px 0; }
.fo-mk { width: 20px; height: 20px; border-radius: 50%; flex: 0 0 20px; display: grid; place-items: center; font-size: 11px; }
.fo-mk.done { background: var(--ok); color: #0b2a1c; }
.fo-mk.active { background: var(--brand); color: var(--brand-ink); }
.fo-mk.todo { background: rgba(255,255,255,0.06); color: var(--muted); border: 1px solid var(--border); }
.fo-bd .fo-h { font-size: 12.5px; font-weight: 600; }
.fo-step.active .fo-bd .fo-h { color: var(--brand); }
.fo-bd .fo-d { font-size: 11px; color: var(--muted); margin-top: 1px; }
.fo-metrics { display: flex; justify-content: space-around; padding: 12px 0 4px; border-top: 1px solid var(--border); margin-top: 6px; }
.fo-metric { text-align: center; }
.fo-metric b { font-family: var(--disp); font-weight: 700; font-size: 18px; display: block; }
.fo-metric span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.fo-abort { margin-top: 10px; width: 100%; }
.fo-section-title { font-family: var(--disp); font-size: 13px; font-weight: 600; margin: 20px 2px 10px; display: flex; align-items: center; }
.fo-toolbar { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 10px; }
.fo-sched { padding: 14px 16px; margin-bottom: 16px; }
.fo-sched-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.fo-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.fo-switch input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }
.fo-sched-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; font-size: 12.5px; }
.fo-sched-row input[type=number] { width: 58px; background: var(--panel-2); border: 1px solid var(--border); color: var(--text); border-radius: 7px; padding: 6px 8px; font-size: 12.5px; }
.fo-sched-row select { background: var(--panel-2); border: 1px solid var(--border); color: var(--text); border-radius: 7px; padding: 6px 8px; font-size: 12.5px; }
.fo-sched-row .btn { margin-left: auto; }

/* ===== QR sign-in ===== */
.qr-canvas { background: #fff; padding: 12px; border-radius: 12px; display: inline-block; line-height: 0; box-shadow: 0 2px 12px rgba(0,0,0,.4); }
.qr-canvas svg { width: 208px; height: 208px; display: block; }

/* ===== Service Status ===== */
#status-content { max-width: 720px; }
.st-overall { display: flex; align-items: center; gap: 14px; border-radius: 14px; padding: 14px 16px; margin-bottom: 18px; border: 1px solid var(--border); background: var(--panel); }
.st-overall.st-ov-ok   { background: rgba(62,207,142,.10);  border-color: rgba(62,207,142,.38); }
.st-overall.st-ov-warn { background: rgba(255,143,45,.10);  border-color: rgba(255,143,45,.40); }
.st-overall.st-ov-bad  { background: rgba(248,113,113,.10); border-color: rgba(248,113,113,.42); }
.st-overall.st-ov-info { background: rgba(106,169,255,.10); border-color: rgba(106,169,255,.38); }
.st-ov-ic { width: 38px; height: 38px; border-radius: 50%; flex: 0 0 38px; display: grid; place-items: center; }
.st-ov-ic svg { width: 21px; height: 21px; }
.st-ov-ok   .st-ov-ic { background: rgba(62,207,142,.18);  color: var(--ok); }
.st-ov-warn .st-ov-ic { background: rgba(255,143,45,.18);  color: var(--warn); }
.st-ov-bad  .st-ov-ic { background: rgba(248,113,113,.18); color: var(--bad); }
.st-ov-info .st-ov-ic { background: rgba(106,169,255,.18); color: var(--info); }
.st-ov-txt { flex: 1; min-width: 0; }
.st-ov-t { font-family: var(--disp); font-weight: 700; font-size: 15px; color: var(--text); }
.st-ov-s { font-size: 12px; color: var(--muted); margin-top: 1px; }
.st-refresh { background: none; border: 1px solid var(--border); color: var(--muted); width: 32px; height: 32px; border-radius: 9px; font-size: 16px; cursor: pointer; flex: 0 0 auto; transition: color .15s, border-color .15s; }
.st-refresh:hover { color: var(--brand); border-color: var(--brand); }
.st-grp { font-family: var(--disp); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #77766d; font-weight: 700; margin: 18px 4px 9px; }
.st-card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.st-row { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border-top: 1px solid #26261f; }
.st-row:first-child { border-top: 0; }
.st-ico { width: 32px; height: 32px; border-radius: 9px; flex: 0 0 32px; display: grid; place-items: center; }
.st-ico svg { width: 17px; height: 17px; }
.st-ico-net   { background: rgba(255,220,0,.12);  color: var(--brand); }
.st-ico-voip  { background: rgba(62,207,142,.13); color: var(--ok); }
.st-ico-cctv  { background: rgba(248,113,113,.12); color: var(--bad); }
.st-ico-cloud { background: rgba(106,169,255,.13); color: var(--info); }
.st-nm { flex: 1; min-width: 0; }
.st-nm b { font-size: 13.5px; font-weight: 600; color: var(--text); display: block; }
.st-nm span { font-size: 11.5px; color: var(--muted); display: block; margin-top: 1px; }
.st-pill { font-size: 10.5px; font-weight: 700; padding: 4px 10px; border-radius: 20px; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.st-dot { width: 6px; height: 6px; border-radius: 50%; }
.st-pill.st-ok   { background: rgba(62,207,142,.14);  color: var(--ok); }   .st-pill.st-ok   .st-dot { background: var(--ok); }
.st-pill.st-warn { background: rgba(255,143,45,.14);  color: var(--warn); } .st-pill.st-warn .st-dot { background: var(--warn); }
.st-pill.st-bad  { background: rgba(248,113,113,.14); color: var(--bad); }  .st-pill.st-bad  .st-dot { background: var(--bad); }
.st-pill.st-info { background: rgba(106,169,255,.14); color: var(--info); } .st-pill.st-info .st-dot { background: var(--info); }
.st-sublist { padding: 2px 15px 10px 59px; border-top: 1px solid #201f1a; background: rgba(0,0,0,.12); }
.st-sub { display: flex; align-items: center; gap: 9px; padding: 5px 0; font-size: 11.5px; }
.st-sub-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; }
.st-sub-dot.st-ok { background: var(--ok); } .st-sub-dot.st-warn { background: var(--warn); } .st-sub-dot.st-bad { background: var(--bad); } .st-sub-dot.st-info { background: var(--info); }
.st-sub-n { color: var(--text); font-weight: 500; }
.st-sub-d { color: var(--muted); margin-left: auto; }
.st-foot { text-align: center; color: #55554e; font-size: 10.5px; margin-top: 16px; }
.st-hist { font-size: 11px; font-weight: 700; color: var(--brand); text-decoration: none; border: 1px solid rgba(255,220,0,.4); border-radius: 9px; padding: 6px 11px; flex: 0 0 auto; }
.st-hist:hover { background: rgba(255,220,0,.1); }
@media (max-width: 560px) {
  .st-sublist { padding-left: 15px; }
  .st-nm b { font-size: 13px; }
}

/* ===== Service History ===== */
#status-history-content { max-width: 760px; }
.sh-sec { font-family: var(--disp); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #77766d; font-weight: 700; margin: 20px 4px 9px; }
.sh-seg { display: inline-flex; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.sh-seg button { background: none; border: 0; color: var(--muted); font-size: 12px; font-weight: 600; padding: 7px 13px; cursor: pointer; font-family: inherit; }
.sh-seg button.on { background: var(--brand); color: var(--ink); }
.sh-upd { color: var(--muted); font-size: 11px; margin-left: auto; }
.sh-date { background: var(--panel); border: 1px solid var(--border); color: var(--text); border-radius: 9px; padding: 6px 10px; font-size: 12px; font-family: inherit; }
.sh-up { display: grid; grid-template-columns: 170px 1fr 66px; align-items: center; gap: 14px; padding: 12px 16px; border-top: 1px solid #26261f; }
.sh-up:first-child { border-top: 0; }
.sh-upn { display: flex; align-items: center; gap: 9px; min-width: 0; }
.sh-upn b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-bars { display: flex; gap: 3px; height: 30px; }
.sh-bars i { flex: 1; min-width: 3px; border-radius: 3px; background: var(--ok); }
.sh-b-ok { background: var(--ok); } .sh-b-warn { background: var(--warn); } .sh-b-bad { background: var(--bad); } .sh-b-none { background: #2f2f2a; }
.sh-bars i:hover { outline: 2px solid rgba(255,255,255,.3); }
.sh-pct { text-align: right; font-family: var(--disp); font-weight: 700; font-size: 14px; }
.sh-pct small { display: block; font-weight: 500; font-size: 9px; color: var(--muted); }
.sh-legend { display: flex; gap: 16px; padding: 11px 16px; border-top: 1px solid #26261f; font-size: 11px; color: var(--muted); }
.sh-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sh-dot { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.sh-empty { padding: 24px 16px; text-align: center; color: var(--muted); font-size: 12.5px; }
.sh-dayhdr { font-family: var(--disp); font-size: 11px; font-weight: 700; color: #8a897e; letter-spacing: .04em; padding: 11px 16px 5px; text-transform: uppercase; }
.sh-inc { display: flex; align-items: flex-start; gap: 12px; padding: 11px 16px; border-top: 1px solid #26261f; }
.sh-log .sh-dayhdr:first-child { border-top: 0; }
.sh-inc-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex: 0 0 9px; }
.sh-inc-dot.st-bad { background: var(--bad); } .sh-inc-dot.st-warn { background: var(--warn); }
.sh-inc-main { flex: 1; min-width: 0; }
.sh-inc-t { font-size: 13px; font-weight: 600; }
.sh-scope { color: var(--muted); font-weight: 500; }
.sh-inc-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.sh-inc-sub.sh-ext { color: var(--info); }
.sh-inc-r { text-align: right; flex: 0 0 auto; }
.sh-inc-win { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sh-inc-dur { font-size: 11px; color: var(--muted); margin-top: 2px; }
.sh-day-head { font-family: var(--disp); font-size: 12.5px; font-weight: 600; padding: 13px 16px 4px; }
.sh-drow { padding: 16px 16px 10px; }
.sh-drl { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; margin-bottom: 18px; }
.sh-track { position: relative; height: 28px; background: var(--ok); border-radius: 7px; overflow: visible; margin-bottom: 5px; }
.sh-track-ok { background: var(--ok); }
.sh-track .sh-seg2 { position: absolute; top: 0; bottom: 0; border-radius: 2px; }
.sh-seg2.st-bad { background: var(--bad); } .sh-seg2.st-warn { background: var(--warn); }
.sh-seglbl { position: absolute; top: -17px; font-size: 9.5px; color: var(--text); transform: translateX(-50%); white-space: nowrap; }
.sh-axis { display: flex; justify-content: space-between; font-size: 9.5px; color: #6f6e64; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
  .sh-up { grid-template-columns: 116px 1fr 50px; gap: 9px; }
  .sh-upn b { font-size: 11px; }
  .sh-seglbl { font-size: 8.5px; }
}

/* ===== Tickets — Kanban (board) view ===== */
.ticket-mode-toggle { display: flex; gap: 6px; margin-bottom: 12px; }
.kanban-hint { font-size: 12px; margin: -4px 0 12px; }
.kanban {
  display: flex; gap: 14px; align-items: flex-start;
  overflow-x: auto; padding-bottom: 10px;
}
.kanban-col {
  flex: 1 1 0; min-width: 290px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  display: flex; flex-direction: column;
  max-height: calc(100vh - 250px);
  transition: outline-color .12s ease;
}
.kanban-col.drop-target { outline: 2px dashed var(--brand); outline-offset: -4px; }
.kanban-col-head {
  padding: 12px 14px; font-weight: 600; font-size: 13px;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--border);
}
.kanban-col-count {
  color: var(--muted); font-size: 12px;
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 20px; padding: 1px 9px; min-width: 22px; text-align: center;
}
.kanban-col-body {
  padding: 10px; overflow-y: auto; flex: 1;
  display: flex; flex-direction: column; gap: 8px; min-height: 70px;
}
.kanban-card {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 9px;
  padding: 10px 11px; cursor: pointer;
}
.kanban-card[draggable="true"] { cursor: grab; }
.kanban-card[draggable="true"]:active { cursor: grabbing; }
.kanban-card:hover { border-color: var(--brand); }
.kanban-card.dragging { opacity: .4; }
.kanban-card-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.kanban-card-top b { font-size: 13px; line-height: 1.3; }
.kanban-card-id { font-family: ui-monospace, Consolas, monospace; font-size: 11px; white-space: nowrap; }
.kanban-card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.kanban-card-foot {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 11px; margin-top: 7px;
}
.kanban-card-contact { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kanban-empty { font-size: 12px; text-align: center; padding: 16px 0; }
.kanban-more { font-size: 11px; text-align: center; padding: 8px 2px; }
/* ===== Ticket runbook checklist ===== */
.rb-step {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px;
  cursor: pointer; background: var(--panel-2);
}
.rb-step:hover { border-color: var(--brand); }
.rb-step-label { flex: 1; font-size: 13px; }
.rb-step.rb-done { border-color: var(--ok); }
.rb-step.rb-done .rb-step-label { text-decoration: line-through; color: var(--muted); }
.rb-run { font-size: 12px; padding: 4px 10px; white-space: nowrap; }

.kanban-head-controls { display: flex; align-items: center; gap: 8px; }
.kanban-year {
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 7px;
  padding: 3px 7px; font-size: 12px; cursor: pointer;
}

/* ===== Tickets — latest comment column, board line and detail thread ===== */
.ticket-mode-toggle { align-items: center; }
.ticket-sort { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 12px; }
.ticket-sort select { width: auto; padding: 6px 10px; font-size: 12px; }
.tk-cmt { font-size: 12px; min-width: 200px; max-width: 320px; }
.tk-cmt-head { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-cmt-text {
  font-size: 11px; margin-top: 2px; line-height: 1.4; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
/* "New comment" markers: yellow pill, tab counter, highlighted row and thread entry */
.tk-new {
  display: inline-block; background: var(--brand); color: #14140f; font-weight: 700;
  font-size: 10px; line-height: 1; padding: 3px 7px; border-radius: 999px;
  margin-right: 6px; vertical-align: 1px; white-space: nowrap;
}
.tk-new-tab { margin: 0 0 0 7px; min-width: 18px; text-align: center; }
tr.tk-row-new > td { background: rgba(255, 220, 0, 0.05); }
tr.tk-row-new > td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.td-cmt.td-cmt-new { border-color: var(--brand); }
.tk-mark-read { padding: 3px 9px; font-size: 11px; }
.kanban-card-cmt { font-size: 11px; margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--border); }
/* Ticket detail: sizes to its content up to the window; one themed scroll area; the
   request and conversation on the left, the facts and actions on the right. */
.td-card { max-width: none; width: min(1080px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column; }
.td-card .modal-title { font-size: 18px; line-height: 1.3; }
.td-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-right: 6px;
  scrollbar-width: thin; scrollbar-color: #4a4a40 transparent;
}
.td-body::-webkit-scrollbar { width: 8px; }
.td-body::-webkit-scrollbar-track { background: transparent; }
.td-body::-webkit-scrollbar-thumb { background: #4a4a40; border-radius: 8px; }
.td-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.td-main { min-width: 0; }
.td-side { position: sticky; top: 0; min-width: 0; }
.td-section { margin-bottom: 18px; }
.td-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.td-text { white-space: pre-wrap; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.td-fields { border-bottom: 1px solid var(--border); }
.td-field {
  display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 4px 12px;
  padding: 6px 0; font-size: 13px; border-top: 1px solid var(--border);
}
.td-field > span:last-child { overflow-wrap: anywhere; }
.td-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.td-check-btn { padding: 9px 14px; font-size: 13px; }
.td-check { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--panel-2); font-size: 13px; line-height: 1.5; }
.td-check > b { display: block; margin-bottom: 2px; }
.td-check .muted { font-size: 12px; }
.td-check-ok { border-color: var(--ok); }
.td-check-warn { border-color: var(--warn); }
.td-check-bad { border-color: var(--bad); color: var(--bad); }
.td-check-row { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 4px 10px; padding: 5px 0; border-top: 1px solid var(--border); margin-top: 5px; }
.td-check-row > span:last-child { overflow-wrap: anywhere; }
.td-check-row .tag { margin: 0 2px 3px 0; }
.td-check-cand { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-top: 1px solid var(--border); margin-top: 5px; }
.td-check-foot { margin-top: 8px; }
.td-update { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.td-update .td-label { margin-bottom: 0; }
.td-update .login-input { padding: 8px 10px; font-size: 13px; }
.td-update .btn { align-self: flex-end; padding: 8px 16px; font-size: 13px; }
.td-update #td-update-result { font-size: 12px; min-height: 0; }
@media (max-width: 860px) {
  .td-grid { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .td-side { position: static; }
}
.td-cmt-list { display: flex; flex-direction: column; gap: 8px; }
#td-comments { margin-bottom: 10px; }
.td-compose textarea { width: 100%; resize: vertical; min-height: 64px; padding: 9px 11px; font-size: 13px; line-height: 1.5; font-family: inherit; }
.td-compose-box { position: relative; }
.td-mention-list {
  position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; z-index: 5;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 9px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.5); overflow: hidden; scroll-margin: 8px;
}
.td-mention-opt { display: flex; justify-content: space-between; gap: 12px; padding: 7px 11px; font-size: 13px; cursor: pointer; }
.td-mention-opt .muted { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-mention-opt.active, .td-mention-opt:hover { background: rgba(255, 220, 0, 0.12); }
.td-compose-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.td-compose-foot .muted, .td-compose-foot > span { font-size: 11px; overflow-wrap: anywhere; }
.td-compose-foot .btn { padding: 8px 16px; font-size: 13px; white-space: nowrap; }
.td-cmt { border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px; background: var(--panel-2); }
.td-cmt-head { font-size: 12px; }
.td-cmt-text { font-size: 13px; line-height: 1.5; white-space: pre-wrap; margin-top: 3px; overflow-wrap: anywhere; }

/* Tickets — what the ticket looks like + the automatic line check */
.tk-chips { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 4px; }
.tk-kind { font-size: 10.5px; white-space: normal; text-transform: none; }
.tk-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; flex: 0 0 8px; background: var(--muted); }
.tk-dot-ok { background: var(--ok); }
.tk-dot-warn { background: var(--warn); }
.tk-dot-bad { background: var(--bad); }
.tk-dot-mute { background: var(--muted); opacity: .6; }
.td-check-plain { color: var(--text); }
.td-line-rows { margin-top: 8px; border-top: 1px solid var(--border); padding-top: 6px; }
.td-line-row { display: flex; align-items: baseline; padding: 3px 0; font-size: 12.5px; }
.td-line-row .muted { font-size: 12px; }
.td-line-phones { margin-top: 6px; }
.td-line-phones .td-check-cand { font-size: 12.5px; align-items: baseline; }
.td-line-phone { display: grid; grid-template-columns: 15px minmax(0, 1fr) auto; align-items: baseline; gap: 0 2px; padding: 6px 0; border-top: 1px solid var(--border); font-size: 12.5px; }
.td-line-phone .tk-dot { margin-right: 0; }
.td-line-phone-main { min-width: 0; overflow-wrap: anywhere; }
.td-line-phone-main .muted { font-size: 11px; font-family: ui-monospace, Consolas, monospace; }
.td-line-phone-seen { white-space: nowrap; padding-left: 10px; }
.td-line-phone-hit { background: rgba(255, 220, 0, 0.06); margin: 0 -6px; padding-left: 6px; padding-right: 6px; border-radius: 6px; }
.td-line-phones .tk-new { margin: 0 0 0 6px; }
.td-line-related { margin-top: 8px; padding: 7px 9px; border-radius: 7px; background: rgba(251,191,36,0.12); color: var(--warn); font-size: 12px; }
.td-compose-btns { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.td-compose-btns .td-check-btn { padding: 8px 12px; font-size: 12.5px; white-space: nowrap; }

/* Service Status — SIP monitor */
.sipm-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.sipm-tools { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; text-transform: none; letter-spacing: 0; }
.sipm-edit { padding: 6px 11px; font-size: 12px; }
.sipm-card { padding: 14px 16px; margin-bottom: 10px; }
.sipm-t { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sipm-t b { font-size: 15px; }
.sipm-t .muted { font-size: 12px; font-family: ui-monospace, Consolas, monospace; }
.sipm-pair { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.sipm-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.sipm-facts { font-size: 13px; margin: 6px 0 8px; color: var(--text); }
.sipm-bad { color: var(--bad); }
.sipm-chart { display: block; width: 100%; height: 58px; background: var(--panel-2); border-radius: 6px; }
.sipm-bar { fill: var(--ok); opacity: .85; }
.sipm-lost { fill: var(--bad); }
.sipm-axis { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.sipm-drops { margin-top: 10px; }
.sipm-drop { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; padding: 5px 0; border-top: 1px solid var(--border); }
.sipm-drop > span:last-child { color: var(--muted); text-align: right; }
.sipm-drop-live > span { color: var(--bad) !important; font-weight: 600; }
.sipm-none { font-size: 12px; margin-top: 8px; }
.sipm-foot { text-align: left; line-height: 1.5; }
.sipm-edit-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; font-size: 12px; }

/* Log a fault — guided intake */
.lf-panel { max-width: 860px; padding: 22px 24px 24px; }
.lf-steps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; font-size: 12px; color: var(--muted); }
.lf-steps span { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 6px; border-radius: 999px; border: 1px solid var(--border); }
.lf-steps i { font-style: normal; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--panel-2); font-size: 11px; font-weight: 700; }
.lf-steps .on { color: var(--text); border-color: var(--brand); }
.lf-steps .on i { background: var(--brand); color: var(--brand-ink); }
.lf-steps .done i { background: var(--ok); color: #0f0f0f; }
.lf-q { font-family: var(--disp); font-size: 19px; font-weight: 600; margin-bottom: 14px; }
.lf-lead { margin: -8px 0 14px; font-size: 13px; }
.lf-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.lf-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 16px; border-radius: 12px; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text); font-family: inherit; transition: border-color .12s, transform .12s; }
.lf-tile:hover, .lf-tile:focus-visible { border-color: var(--brand); transform: translateY(-1px); outline: none; }
.lf-tile b { font-size: 15px; }
.lf-tile > span:last-child { font-size: 12.5px; color: var(--muted); }
.lf-ic { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: rgba(255, 220, 0, 0.12); color: var(--brand); margin-bottom: 6px; }
.lf-ic svg { width: 20px; height: 20px; }
.lf-known { border: 1px solid var(--warn); background: rgba(251, 191, 36, 0.1); border-radius: 10px; padding: 12px 14px; margin-bottom: 18px; font-size: 13.5px; line-height: 1.5; }
.lf-known b { display: block; color: var(--warn); margin-bottom: 2px; }
.lf-known .muted { font-size: 12.5px; margin-top: 4px; }
.lf-checks { display: flex; flex-direction: column; gap: 8px; }
.lf-check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel-2); cursor: pointer; font-size: 14px; line-height: 1.45; }
.lf-check.on { border-color: var(--ok); }
.lf-check input, .lf-urgent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); flex: 0 0 auto; }
.lf-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.lf-actions .btn, .lf-actions .btn-ghost { padding: 10px 18px; font-size: 14px; }
.lf-center { justify-content: center; }
.lf-fixed { border-color: var(--ok); color: var(--ok); }
.lf-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.lf-wide { grid-column: 1 / -1; }
.lf-field > label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.lf-field > label em { color: var(--brand); font-style: normal; margin-left: 3px; }
.lf-field > label .muted { font-weight: 400; }
.lf-field .login-input { width: 100%; }
.lf-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.lf-opt { display: inline-flex; align-items: center; padding: 8px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--panel-2); font-size: 13px; cursor: pointer; }
.lf-opt input { position: absolute; opacity: 0; pointer-events: none; }
.lf-opt.on { border-color: var(--brand); background: rgba(255, 220, 0, 0.12); }
.lf-opt:focus-within { outline: 2px solid var(--brand); outline-offset: 1px; }
.lf-file { font-size: 13px; color: var(--muted); }
.lf-fixedval { padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); font-size: 14px; }
.lf-sep { font-family: var(--disp); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--border); }
.lf-urgent { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; font-size: 13.5px; cursor: pointer; }
.lf-error { margin-top: 14px; padding: 10px 12px; border: 1px solid var(--bad); border-radius: 8px; color: var(--bad); font-size: 13.5px; }
.lf-done { text-align: center; padding: 20px 0 6px; }
.lf-done-ic { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--ok); color: #0f0f0f; font-size: 26px; font-weight: 700; margin-bottom: 14px; }
.lf-done p { margin: 4px 0; }
@media (max-width: 640px) { .lf-form { grid-template-columns: 1fr; } .lf-panel { padding: 16px; } .lf-actions { flex-direction: column-reverse; align-items: stretch; } .lf-actions > span { display: flex; flex-direction: column; gap: 8px; } }

/* Log a ticket (staff taxonomy) */
.lt-cat b { font-size: 15px; }
.lt-issues { display: flex; flex-direction: column; gap: 10px; }
.lt-issue { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 14px 16px; border-radius: 11px; cursor: pointer;
  border: 1px solid var(--border); background: var(--panel-2); transition: border-color .12s, transform .12s; }
.lt-issue:hover, .lt-issue:focus-visible { border-color: var(--brand); transform: translateY(-1px); outline: none; }
.lt-issue b { font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.lt-issue > span { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.lt-ho { font-family: var(--disp); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: #0f0f0f; background: var(--warn); border-radius: 5px; padding: 2px 6px; }
.lt-formtag { color: var(--brand) !important; font-weight: 600; }
.lt-forms { display: flex; flex-direction: column; gap: 10px; }
.lt-forms-lead { margin: 2px 0 0; }
.lt-form { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel-2); }
.lt-form label b { font-size: 13.5px; }
.lt-form input[type="file"] { grid-column: 1 / -1; }
.lt-file-state { grid-column: 1 / -1; font-size: 12.5px; color: var(--ok); min-height: 0; }
.lt-file-state:empty { display: none; }
.lt-out { color: var(--warn); font-size: 13px; margin: 4px 0; }

/* Operations (Workspace Coordinator) home */
.ops-hero { padding: 8px 2px 20px; }
.ops-eyebrow { font-family: var(--disp); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.ops-h1 { font-family: var(--disp); font-size: 30px; margin: 4px 0 2px; font-weight: 600; }
.ops-h1 b { color: var(--brand); }
.ops-sub { color: var(--muted); font-size: 14px; }
.ops-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.ops-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 20px; border-radius: 14px; cursor: pointer;
  border: 1px solid var(--border); background: var(--panel); transition: border-color .12s, transform .12s; }
.ops-tile:hover:not(:disabled), .ops-tile:focus-visible { border-color: var(--brand); transform: translateY(-2px); outline: none; }
.ops-tile:disabled, .ops-tile.ops-soon { cursor: default; opacity: .6; }
.ops-ic { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--panel-2); color: var(--brand); }
.ops-ic svg { width: 22px; height: 22px; }
.ops-tile b { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.ops-blurb { font-size: 13px; color: var(--muted); line-height: 1.5; }
.ops-soon-tag { font-family: var(--disp); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: #0f0f0f; background: var(--muted); border-radius: 5px; padding: 2px 6px; }

/* Operations: My branch's tickets */
.ot-panel { max-width: 820px; }
.ot-seg { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.ot-seg button { padding: 7px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text); cursor: pointer; font-size: 13px; }
.ot-seg button.on { border-color: var(--brand); color: var(--brand); }
.ot-seg .ot-refresh { margin-left: auto; width: 34px; padding: 7px 0; font-size: 15px; }
.ot-list { display: flex; flex-direction: column; }
.ot-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-top: 1px solid var(--border); }
.ot-row:first-child { border-top: none; }
.ot-main { flex: 1; min-width: 0; }
.ot-main b { font-size: 14px; }
.ot-id { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.ot-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ot-status { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.ot-status.ot-open { background: rgba(255,220,0,0.14); color: var(--brand); }
.ot-status.ot-prog { background: rgba(96,165,250,0.16); color: var(--info); }
.ot-status.ot-done { background: rgba(52,211,153,0.14); color: var(--ok); }
.ot-foot { font-size: 11.5px; margin-top: 12px; }

/* Operations: Access tag lookup */
.al-panel { max-width: 720px; }
.al-search { display: flex; gap: 10px; margin-bottom: 14px; }
.al-search .login-input { flex: 1; }
.al-list { display: flex; flex-direction: column; }
.al-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-top: 1px solid var(--border); }
.al-row:first-child { border-top: none; }
.al-main { flex: 1; min-width: 0; }
.al-main b { font-size: 14px; }
.al-dept { font-size: 12px; color: var(--muted); }
.al-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.al-badge { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.al-badge.al-on { background: rgba(52,211,153,0.14); color: var(--ok); }
.al-badge.al-off { background: rgba(248,113,113,0.16); color: var(--bad); }
.al-note, .al-foot { font-size: 11.5px; }
.al-note { margin-bottom: 8px; }
.al-foot { margin-top: 12px; }

/* Tickets — suspension authorisation */
.td-auth { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 18px; font-size: 13.5px; line-height: 1.5; }
.td-auth > b { display: block; font-size: 15px; margin-bottom: 2px; }
.td-auth .muted { font-size: 12px; margin-top: 6px; }
.td-auth a { color: var(--brand); }
.td-auth-ok { border-color: var(--ok); background: rgba(52, 211, 153, 0.08); }
.td-auth-ok > b { color: var(--ok); }
.td-auth-bad { border-color: var(--bad); background: rgba(248, 113, 113, 0.09); }
.td-auth-bad > b { color: var(--bad); }
.td-auth-warn { border-color: var(--warn); background: rgba(251, 191, 36, 0.09); }
.td-auth-warn > b { color: var(--warn); }
.td-auth-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.td-auth-foot .muted { margin-top: 0; }

/* Tickets — suspension checklist */
.td-susp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.td-susp-head .muted { font-size: 12px; }
.td-susp-head a, .td-susp-done a { color: var(--brand); }
.td-susp-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 11px 0; border-top: 1px solid var(--border); }
.td-susp-row.is-extra { opacity: .6; }
.td-susp-main { min-width: 0; flex: 1 1 auto; }
.td-susp-name { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.td-susp-name .tk-dot { margin-right: 0; }
.td-susp-name .muted { font-size: 12px; }
.td-susp-detail { font-size: 12.5px; margin-top: 3px; line-height: 1.45; overflow-wrap: anywhere; }
.td-susp-items { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.td-susp-items .tag { text-transform: none; font-size: 11px; }
.td-susp-act { flex: 0 0 auto; text-align: right; }
.td-susp-act .td-check-btn { padding: 7px 12px; font-size: 12.5px; white-space: nowrap; }
.td-susp-done { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 12px; }
.td-susp-done b { color: var(--ok); font-size: 13px; }
.td-susp-row.is-done .td-susp-name b { text-decoration: line-through; text-decoration-color: var(--muted); }
.td-susp-foot { font-size: 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); line-height: 1.5; }
.td-susp-btns { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.td-susp-stop { padding: 8px 14px; font-size: 13px; white-space: nowrap; background: var(--bad); color: #fff; }
.td-susp-stop:disabled { opacity: .45; cursor: not-allowed; }
.td-susp-alt { font-size: 11.5px; color: var(--muted); }
.td-susp-alt.is-off { opacity: .45; pointer-events: none; }

/* Suspension checklist — keep the service text readable when the action text is long; access pick-list */
.td-susp-row { flex-wrap: wrap; }
.td-susp-main { flex: 1 1 58%; min-width: 220px; }
.td-susp-act { flex: 0 1 auto; max-width: 40%; }
.td-susp-done span { text-align: right; overflow-wrap: anywhere; }
.td-susp-row.has-pick .td-susp-act { display: none; }
.td-acc-pick { flex: 1 1 100%; margin-top: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel-2); }
.td-acc-head b { display: block; font-size: 13.5px; }
.td-acc-head .muted { font-size: 12px; }
.td-acc-p { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-top: 1px solid var(--border); margin-top: 7px; font-size: 13px; cursor: pointer; }
.td-acc-p input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--brand); flex: 0 0 auto; }
.td-acc-p .muted { font-size: 12px; }
.td-acc-p.is-off { opacity: .55; cursor: default; }
.td-acc-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.td-acc-foot .muted { font-size: 12px; flex: 1 1 200px; }
.td-acc-foot .btn, .td-acc-foot .btn-ghost { padding: 8px 14px; font-size: 13px; }
/* A stopped service shows its record on a line of its own, under the description */
.td-susp-row.is-done .td-susp-act { flex: 1 1 100%; max-width: none; text-align: left; }
.td-susp-row.is-done .td-susp-done { flex-direction: row; flex-wrap: wrap; align-items: baseline; justify-content: flex-start; gap: 3px 10px; padding: 7px 10px; border-radius: 8px; background: rgba(52, 211, 153, 0.07); }
.td-susp-row.is-done .td-susp-done span { text-align: left; flex: 1 1 260px; }

/* Reader diagnosis card (Access → Live readers → Diagnose) */
.acc-diag { border: 1px solid var(--border); }
.acc-diag-ok   { border-left: 3px solid var(--ok); }
.acc-diag-warn { border-left: 3px solid var(--warn); }
.acc-diag-bad  { border-left: 3px solid var(--bad); }
.acc-diag-verdict { font-size: 13px; line-height: 1.5; border-radius: 8px; padding: 11px 13px; }
.acc-diag-v-ok   { background: rgba(62, 207, 142, 0.10); }
.acc-diag-v-warn { background: rgba(255, 143, 45, 0.10); }
.acc-diag-v-bad  { background: rgba(248, 113, 113, 0.10); }
.acc-diag-steps { margin: 2px 0 0; padding-left: 20px; font-size: 12.5px; line-height: 1.6; color: var(--text); }
.acc-diag-steps li { margin: 2px 0; }

/* Ticket attachments ("Associated files" from SharePoint) */
.td-att-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.td-att-img, .td-att-file { display: flex; flex-direction: column; text-decoration: none; color: var(--text); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--panel); transition: border-color .15s; }
.td-att-img:hover, .td-att-file:hover { border-color: var(--brand); }
.td-att-img { width: 132px; }
.td-att-img img { width: 132px; height: 100px; object-fit: cover; display: block; background: rgba(255,255,255,0.03); }
.td-att-name { font-size: 11px; padding: 6px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 132px; }
.td-att-file { width: 132px; }
.td-att-ext { display: flex; align-items: center; justify-content: center; height: 100px; font-size: 20px; font-weight: 700; letter-spacing: .5px; color: var(--muted); background: rgba(255,255,255,0.03); }

/* What's New & Roadmap */
.rm-add .rm-form { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; }
.rm-form-row { display: flex; gap: 10px; flex-wrap: wrap; }
.rm-form-row .login-input { flex: 0 1 200px; }
.rm-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rm-form-foot .muted { font-size: 12px; flex: 1 1 200px; }

.rm-wn-list { padding: 6px 4px; }
.rm-wn { display: flex; gap: 16px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.rm-wn:last-child { border-bottom: 0; }
.rm-wn-date { flex: 0 0 110px; font-size: 12px; color: var(--muted); padding-top: 2px; }
.rm-wn-title { font-weight: 600; font-size: 14px; }
.rm-wn-text { font-size: 13px; color: var(--text); margin-top: 3px; line-height: 1.5; white-space: pre-wrap; }
.rm-meta { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.rm-meta a { color: var(--muted); text-decoration: underline; }
.rm-meta a:hover { color: var(--bad); }
.rm-meta .rm-move { background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 6px; font-size: 11px; padding: 1px 4px; }

.rm-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 14px 16px; }
.rm-col { display: flex; flex-direction: column; min-width: 0; }
.rm-col-head { font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; padding: 7px 10px; border-radius: 8px 8px 0 0; display: flex; align-items: center; gap: 8px; }
.rm-head-planned { background: rgba(148,163,184,0.12); color: var(--muted); }
.rm-head-in-progress { background: rgba(255,143,45,0.12); color: var(--warn); }
.rm-head-live { background: rgba(62,207,142,0.12); color: var(--ok); }
.rm-count { font-size: 11px; opacity: .8; font-weight: 600; }
.rm-col-body { display: flex; flex-direction: column; gap: 8px; padding: 10px; background: rgba(255,255,255,0.015); border-radius: 0 0 8px 8px; min-height: 48px; }
.rm-card { border: 1px solid var(--border); border-left: 3px solid var(--border); border-radius: 8px; padding: 10px 12px; background: var(--panel); }
.rm-card.rm-planned { border-left-color: var(--muted); }
.rm-card.rm-in-progress { border-left-color: var(--warn); }
.rm-card.rm-live { border-left-color: var(--ok); }
.rm-card-title { font-weight: 600; font-size: 13.5px; }
.rm-card-text { font-size: 12.5px; color: var(--text); margin-top: 3px; line-height: 1.5; white-space: pre-wrap; }
.rm-empty { padding: 8px 2px; font-size: 12px; }
@media (max-width: 760px) { .rm-board { grid-template-columns: 1fr; } .rm-wn-date { flex-basis: 84px; } }

/* Enrol-prep worksheet (ZKAccess enrolment from a ticket) */
.ep-head { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 12px 14px; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 12px; }
.ep-head > div { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.ep-head .muted { font-size: 11px; }
.ep-head-wide { flex: 1 1 100%; }
.ep-steps { margin: 0 0 12px; padding-left: 20px; font-size: 12.5px; line-height: 1.6; color: var(--text); }
.ep-steps li { margin: 2px 0; }
.ep-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ep-table th, .ep-table td { text-align: left; padding: 7px 9px; border-bottom: 1px solid var(--border); }
.ep-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 600; }
.ep-table td.ep-card { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 600; color: var(--brand); }

/* Enrol-prep photos */
.ep-photo-cell { width: 56px; }
.ep-photo { display: inline-block; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; line-height: 0; }
.ep-photo:hover { border-color: var(--brand); }
.ep-photo img { width: 48px; height: 48px; object-fit: cover; display: block; background: rgba(255,255,255,0.03); }
.ep-photo.lg { display: flex; flex-direction: column; width: 96px; }
.ep-photo.lg img { width: 96px; height: 96px; }
.ep-gname { font-size: 10px; padding: 4px 6px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 96px; }
.ep-gallery-grid { display: flex; flex-wrap: wrap; gap: 8px; }
