/* Skopi admin design system — ported from the Claude Design export.
   Self-contained, framework-agnostic class system. Pair with Tailwind CDN
   for utility classes in markup. */
:root {
  --font-ui: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --ink: #052f2e;
  --bg: #f4f8f7; --surface: #ffffff; --surface-2: #f0f5f4; --surface-3: #e9f1ef;
  --border: #e2ebe9; --border-strong: #d2dedb;
  --text: #0c211f; --text-muted: #4d635f; --text-faint: #8ba09c;
  --primary: #137d73; --ok-fg: #0c7a5d;
  --crit-fg: #b42318; --crit-bg: #fef3f2; --crit-dot: #e5484d;
  --warn-fg: #a85806; --warn-bg: #fff7e8; --warn-dot: #e1971b;
  --info-fg: #1f5bc4; --info-bg: #eef4ff; --info-dot: #3b82f6;
  --sb-text: #b6cfc9; --sb-text-faint: #6f928c; --sb-active-bg: rgba(95,234,213,0.12); --sb-active-fg: #d8fbf2;
  --shadow-card: 0 1px 2px rgba(5,47,46,0.04), 0 1px 3px rgba(5,47,46,0.06);
  --shadow-pop: 0 12px 40px -8px rgba(5,30,29,0.28);
  --row-py: 11px; --kpi-pad: 18px;
}
[data-theme="dark"] {
  --ink: #07211f;
  --bg: #061b1a; --surface: #0b2725; --surface-2: #103230; --surface-3: #15403d;
  --border: #18403c; --border-strong: #235450;
  --text: #e7f3f0; --text-muted: #a0b9b5; --text-faint: #688581;
  --primary: #5fead5; --ok-fg: #5fead5;
  --crit-fg: #ff9092; --crit-bg: rgba(229,72,77,0.16); --crit-dot: #f15b60;
  --warn-fg: #f6c662; --warn-bg: rgba(245,166,35,0.15); --warn-dot: #f3ad34;
  --info-fg: #8db4ff; --info-bg: rgba(59,130,246,0.18); --info-dot: #5b9bff;
  --sb-text: #9dbab4; --sb-text-faint: #5f817c; --sb-active-bg: rgba(95,234,213,0.16); --sb-active-fg: #c8f8ee;
  --shadow-card: 0 1px 2px rgba(0,0,0,0.3); --shadow-pop: 0 16px 48px -8px rgba(0,0,0,0.6);
}
[data-density="compact"] { --row-py: 6.5px; --kpi-pad: 14px; }

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--font-ui); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
.font-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
::selection { background: color-mix(in srgb, var(--primary) 30%, transparent); }
a { color: inherit; text-decoration: none; }

/* ===== App shell ===== */
.skopi-app { display: flex; height: 100vh; overflow: hidden; }
.skopi-content { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.skopi-main { flex: 1; overflow-y: auto; overflow-x: hidden; }

/* ===== Sidebar ===== */
.skopi-sidebar { width: 248px; flex-shrink: 0; background: var(--ink); display: flex; flex-direction: column;
  border-right: 1px solid color-mix(in srgb, var(--ink) 70%, #fff 8%); }
.sb-brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; position: relative; }
.sb-logo { width: 30px; height: 30px; object-fit: contain; border-radius: 7px; flex-shrink: 0; }
.sb-word { display: flex; align-items: baseline; gap: 1px; }
.sb-name { font-size: 20px; font-weight: 700; color: #f1fdfb; letter-spacing: -0.03em; }
.sb-tld { font-size: 13px; font-weight: 600; color: #5fead5; }
.sb-nav { flex: 1; overflow-y: auto; padding: 6px 12px; }
.sb-group { margin-bottom: 14px; }
.sb-section { font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sb-text-faint); padding: 8px 10px 5px; }
.sb-item { display: flex; align-items: center; gap: 11px; width: 100%; padding: 8px 10px; border: 0; background: none; cursor: pointer;
  color: var(--sb-text); border-radius: 8px; font-size: 13.5px; font-weight: 500; font-family: inherit; text-align: left; margin-bottom: 1px; transition: background .12s, color .12s; }
.sb-item:hover { background: rgba(255,255,255,0.05); color: var(--sb-active-fg); }
.sb-item.is-active { background: var(--sb-active-bg); color: var(--sb-active-fg); font-weight: 600; }
.sb-item.is-active .sb-item-icon { color: #5fead5; }
.sb-item-icon { flex-shrink: 0; color: var(--sb-text-faint); display: grid; place-items: center; }
.sb-item-label { flex: 1; white-space: nowrap; overflow: hidden; }
.sb-badge { background: var(--crit-dot); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.sb-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,0.06); }
.sb-user { display: flex; align-items: center; gap: 10px; }
.sb-avatar { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, #137d73, #5fead5); color: #04211f; font-weight: 700; font-size: 12px; display: grid; place-items: center; flex-shrink: 0; }
.sb-user-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sb-user-name { font-size: 13px; font-weight: 600; color: #e7f3f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-role { font-size: 11px; color: var(--sb-text-faint); }
.sb-user-logout { background: none; border: 0; color: var(--sb-text-faint); cursor: pointer; padding: 6px; border-radius: 6px; display: grid; place-items: center; }
.sb-user-logout:hover { color: var(--sb-active-fg); background: var(--sb-active-bg); }

/* ===== Topbar ===== */
.skopi-topbar { display: flex; align-items: center; gap: 16px; padding: 0 20px; height: 60px; flex-shrink: 0;
  background: var(--surface); border-bottom: 1px solid var(--border); }
.org-trigger { display: flex; align-items: center; gap: 9px; padding: 6px 10px 6px 7px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-family: inherit; min-width: 210px; }
.org-trigger:hover { background: var(--surface-2); border-color: var(--border-strong); }
.org-mark { width: 26px; height: 26px; border-radius: 7px; color: #fff; font-weight: 700; font-size: 13px; display: grid; place-items: center; flex-shrink: 0; text-transform: uppercase; background: var(--primary); }
.org-mark.sm { width: 20px; height: 20px; font-size: 11px; border-radius: 5px; }
.org-trigger-text { display: flex; flex-direction: column; align-items: flex-start; flex: 1; min-width: 0; }
.org-trigger-label { font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); }
.org-trigger-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.tb-search { flex: 1; max-width: 440px; position: relative; display: flex; align-items: center; }
.tb-search-icon { position: absolute; left: 11px; color: var(--text-faint); pointer-events: none; display: grid; place-items: center; }
.tb-search-input { width: 100%; padding: 8px 12px 8px 34px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface-2); font-family: inherit; font-size: 13px; color: var(--text); }
.tb-search-input::placeholder { color: var(--text-faint); }
.tb-search-input:focus { outline: none; border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent); }
.tb-range { display: flex; background: var(--surface-2); border-radius: 8px; padding: 2px; border: 1px solid var(--border); }
.tb-range-opt { border: 0; background: none; cursor: pointer; font-family: inherit; font-size: 12px; font-weight: 600; color: var(--text-faint); padding: 4px 9px; border-radius: 6px; }
.tb-range-opt.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-card); }
.tb-live { display: flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); font-family: inherit; font-size: 12px; font-weight: 600; color: var(--ok-fg); border-color: color-mix(in srgb, var(--ok-fg) 30%, var(--border)); }
.tb-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok-fg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok-fg) 22%, transparent); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.tb-divider { width: 1px; height: 24px; background: var(--border); margin: 0 2px; }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; border: 1px solid transparent; background: none; cursor: pointer; color: var(--text-muted); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* ===== Page scaffolding ===== */
.page { padding: 22px 24px 60px; max-width: 1500px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.page-title { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); margin: 0; }
.page-sub { font-size: 13px; color: var(--text-faint); margin: 3px 0 0; }
.page-actions { display: flex; align-items: center; gap: 8px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi-card { background: var(--surface); border: 1px solid var(--border); border-radius: 13px; padding: var(--kpi-pad); box-shadow: var(--shadow-card); }
.kpi-top { display: flex; align-items: flex-start; justify-content: space-between; }
.kpi-label { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-faint); }
.kpi-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: color-mix(in srgb, currentColor 12%, transparent); }
.kpi-value { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); margin-top: 10px; font-variant-numeric: tabular-nums; }
.kpi-value .kpi-unit { font-size: 15px; font-weight: 600; color: var(--text-faint); margin-left: 4px; }
.kpi-sub { font-size: 12px; color: var(--text-faint); margin-top: 4px; }
.kpi-delta { font-size: 12px; font-weight: 700; }
.kpi-delta.up { color: var(--ok-fg); }
.kpi-delta.down { color: var(--crit-fg); }

.grid-12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; align-items: start; }
.col-span-8 { grid-column: span 8 / span 8; }
.col-span-4 { grid-column: span 4 / span 4; }
.col-span-12 { grid-column: span 12 / span 12; }
.surface-card { background: var(--surface); border: 1px solid var(--border); border-radius: 13px; box-shadow: var(--shadow-card); overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.card-title { font-size: 14px; font-weight: 700; color: var(--text); margin: 0; }
.card-sub { font-size: 12px; color: var(--text-faint); margin: 2px 0 0; }
.card-pad { padding: 16px; }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; gap: 6px; border-radius: 8px; font-family: inherit; font-weight: 600; cursor: pointer; border: 1px solid transparent; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn-md { padding: 8px 14px; font-size: 13px; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }
.btn-primary { background: var(--primary); color: #fff; }
[data-theme="dark"] .btn-primary { color: #04211f; }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; color: var(--text-muted); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-subtle { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-subtle:hover { background: var(--surface-3); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ===== Tables ===== */
.skopi-table { border-collapse: collapse; font-size: 13px; width: 100%; }
.skopi-table th { text-align: left; font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-faint);
  padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.skopi-table td { padding: var(--row-py) 16px; border-bottom: 1px solid var(--border); color: var(--text-muted); vertical-align: middle; }
.skopi-table tbody tr:last-child td { border-bottom: 0; }
.skopi-table tbody tr.row-clickable { cursor: pointer; }
.skopi-table tbody tr.row-clickable:hover { background: var(--surface-2); }
.td-right { text-align: right; }
.link-cell { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 500; color: var(--text); padding: 0; }
.link-cell:hover { color: var(--primary); }
.cell-strong { color: var(--text); font-weight: 500; }
.cell-faint { color: var(--text-faint); font-size: 12px; }

/* ===== Pills / badges ===== */
.sev-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; padding: 3px 9px 3px 8px; border-radius: 999px; white-space: nowrap; text-transform: uppercase; letter-spacing: 0.03em; }
.sev-badge .lc-dot { width: 7px; height: 7px; border-radius: 50%; }
.sev-critical { color: var(--crit-fg); background: var(--crit-bg); }
.sev-critical .lc-dot { background: var(--crit-dot); }
.sev-warning { color: var(--warn-fg); background: var(--warn-bg); }
.sev-warning .lc-dot { background: var(--warn-dot); }
.sev-info { color: var(--info-fg); background: var(--info-bg); }
.sev-info .lc-dot { background: var(--info-dot); }

.lc-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 3px 9px 3px 8px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.lc-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.lc-online, .lc-active { color: var(--ok-fg); background: color-mix(in srgb, var(--ok-fg) 12%, transparent); }
.lc-online .lc-dot, .lc-active .lc-dot { background: var(--ok-fg); }
.lc-prov, .lc-claim_pending { color: var(--info-fg); background: var(--info-bg); }
.lc-prov .lc-dot, .lc-claim_pending .lc-dot { background: var(--info-dot); }
.lc-maint, .lc-unclaimed, .lc-manufactured { color: var(--warn-fg); background: var(--warn-bg); }
.lc-maint .lc-dot, .lc-unclaimed .lc-dot, .lc-manufactured .lc-dot { background: var(--warn-dot); }
.lc-fault, .lc-suspended { color: var(--crit-fg); background: var(--crit-bg); }
.lc-fault .lc-dot, .lc-suspended .lc-dot { background: var(--crit-dot); }
.lc-off, .lc-offline, .lc-retired { color: var(--text-faint); background: var(--surface-3); }
.lc-off .lc-dot, .lc-offline .lc-dot, .lc-retired .lc-dot { background: var(--text-faint); }

.type-chip { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--surface-3); color: var(--text-muted); text-transform: capitalize; letter-spacing: 0.01em; border: 1px solid var(--border); }

.val-cell { display: inline-flex; align-items: baseline; gap: 3px; justify-content: flex-end; }
.val-unit { font-size: 11px; color: var(--text-faint); font-weight: 500; }
.ack-yes { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: color-mix(in srgb, var(--ok-fg) 14%, transparent); color: var(--ok-fg); }
.ack-no { font-size: 11px; font-weight: 700; color: var(--crit-fg); }
.state-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.state-pill.resolved { color: var(--ok-fg); background: color-mix(in srgb, var(--ok-fg) 12%, transparent); }
.state-pill.acked { color: var(--text-muted); background: var(--surface-3); }
.state-pill.new { color: var(--crit-fg); background: var(--crit-bg); }

/* ===== Rollup widgets ===== */
.sev-row { display: flex; align-items: center; gap: 12px; }
.sev-bar-track { flex: 1; height: 7px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.sev-bar-fill { height: 100%; border-radius: 999px; transition: width .4s ease; }
.sev-foot { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--text-faint); border-top: 1px solid var(--border); padding-top: 12px; margin-top: 16px; }
.dot-row { display: flex; align-items: center; justify-content: space-between; }

/* ===== Forms ===== */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--text); }
.field-req { color: var(--crit-fg); margin-left: 2px; }
.field-hint { font-size: 11.5px; color: var(--text-faint); }
.input { width: 100%; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface-2); font-family: inherit; font-size: 13px; color: var(--text); }
.input:focus { outline: none; border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent); }
select.input { cursor: pointer; }

/* ===== Empty state ===== */
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 48px 16px; text-align: center; }
.empty-glyph { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--surface-2); color: var(--text-faint); }
.empty-title { font-size: 14px; font-weight: 600; color: var(--text); }
.empty-body { font-size: 12.5px; color: var(--text-faint); max-width: 320px; }

/* ===== Login ===== */
.login-wrap { min-height: 100vh; display: grid; place-items: center; background:
  radial-gradient(1200px 600px at 50% -10%, color-mix(in srgb, var(--primary) 10%, transparent), transparent), var(--bg); padding: 24px; }
.login-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-pop); padding: 28px; }
.login-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 6px; }
.login-brand .sb-logo { width: 34px; height: 34px; }
.login-brand .sb-name { color: var(--text); font-size: 24px; }
.login-brand .sb-tld { color: var(--primary); font-size: 15px; }
.login-sub { text-align: center; font-size: 13px; color: var(--text-faint); margin: 0 0 22px; }
.login-error { background: var(--crit-bg); color: var(--crit-fg); border: 1px solid color-mix(in srgb, var(--crit-dot) 35%, transparent); border-radius: 9px; padding: 9px 12px; font-size: 12.5px; font-weight: 500; margin-bottom: 16px; }

/* ===== RBAC: roles + permission matrix ===== */
.lvl-none { background: var(--surface-3); }
.lvl-read { background: var(--info-dot); }
.lvl-write { background: var(--primary); }
.lvl-admin { background: #7c3aed; }
[data-theme="dark"] .lvl-admin { background: #a98bff; }

.fp-row { display: inline-flex; gap: 2px; align-items: center; }
.fp-cell { width: 13px; height: 8px; border-radius: 2px; display: inline-block; }
.fp-cell.sm { width: 10px; height: 10px; border-radius: 3px; }
.fp-leg { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-faint); margin-left: 10px; }

.role-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.role-dot.sm { width: 8px; height: 8px; }
.role-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  color: var(--rc, var(--text-muted)); background: color-mix(in srgb, var(--rc, var(--text-faint)) 13%, transparent); }

.rbac-note { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 9px; padding: 9px 12px; margin-bottom: 16px; }
.rbac-note.warn { background: var(--warn-bg); color: var(--warn-fg); border-color: color-mix(in srgb, var(--warn-dot) 30%, var(--border)); }

.perm-matrix { display: flex; flex-direction: column; gap: 16px; }
.perm-bulk { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-bottom: 6px; }
.perm-bulk-label { font-size: 12px; font-weight: 600; color: var(--text-faint); }
.perm-group-head { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); margin: 0 0 4px; }
.perm-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.perm-group .perm-line:last-child { border-bottom: 0; }
.perm-line-name { display: flex; flex-direction: column; gap: 1px; }
.perm-line-key { font-size: 11px; color: var(--text-faint); }
.perm-control { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 2px; gap: 2px; }
.perm-opt { position: relative; display: inline-flex; align-items: center; cursor: pointer; font-size: 12px; font-weight: 600;
  color: var(--text-faint); padding: 5px 13px; border-radius: 6px; user-select: none; }
.perm-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.perm-opt:hover { color: var(--text); }
.perm-opt[data-level="none"]:has(input:checked) { background: var(--surface); color: var(--text-muted); box-shadow: var(--shadow-card); }
.perm-opt[data-level="read"]:has(input:checked) { background: var(--info-bg); color: var(--info-fg); }
.perm-opt[data-level="write"]:has(input:checked) { background: color-mix(in srgb, var(--primary) 16%, transparent); color: var(--primary); }
.perm-opt[data-level="admin"]:has(input:checked) { background: color-mix(in srgb, #7c3aed 16%, transparent); color: #7c3aed; }
[data-theme="dark"] .perm-opt[data-level="admin"]:has(input:checked) { color: #c4b0ff; background: color-mix(in srgb, #a98bff 18%, transparent); }

.swatch-row { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch { position: relative; width: 24px; height: 24px; border-radius: 7px; border: 2px solid transparent; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.swatch:has(input:checked) { border-color: var(--text); }

.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 2px; gap: 2px; }
.seg-opt { position: relative; cursor: pointer; font-family: inherit; font-size: 12px; font-weight: 600; color: var(--text-faint); padding: 6px 13px; border-radius: 6px; }
.seg-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg-opt:has(input:checked) { background: var(--surface); color: var(--text); box-shadow: var(--shadow-card); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.ustat { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.ustat .ustat-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ustat.active { color: var(--ok-fg); background: color-mix(in srgb, var(--ok-fg) 12%, transparent); }
.ustat.suspended { color: var(--crit-fg); background: var(--crit-bg); }

/* Per-user reach picker (account-admin + org memberships) */
.reach-global { display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface-2); cursor: pointer; margin-bottom: 14px; }
.reach-global input { margin-top: 2px; }
.reach-global-text { display: flex; flex-direction: column; gap: 2px; }
.reach-global-title { font-size: 13px; font-weight: 600; color: var(--text); }
.reach-matrix { display: flex; flex-direction: column; gap: 10px; }
.reach-group { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.reach-opt { display: flex; align-items: center; gap: 9px; padding: 9px 13px; cursor: pointer; font-size: 13px; color: var(--text); }
.reach-opt:hover { background: var(--surface-2); }
.reach-opt-name { font-weight: 500; }
.reach-account { background: var(--surface-2); border-bottom: 1px solid var(--border); }
.reach-account .reach-opt-name { font-weight: 600; }
.reach-tag { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--text-faint);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px; }
.reach-orgs { display: flex; flex-direction: column; padding: 3px 0 5px 26px; }
.reach-orgs .reach-opt { padding: 6px 13px; font-size: 12.5px; }

/* Inline row actions (Edit / Delete) on config list tables */
.row-actions { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; }
.row-actions form { display: inline; }
.btn-danger { color: var(--crit-fg); }
.btn-danger:hover { background: var(--crit-bg); }

::-webkit-scrollbar { width: 10px; }
.skopi-main::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; border: 3px solid var(--bg); }
.sb-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 8px; }
