:root {
  --bg: #f5f7fa;
  --paper: #ffffff;
  --ink: #1a2433;
  --muted: rgba(26, 36, 51, 0.62);
  --soft: rgba(26, 36, 51, 0.4);
  --rule: rgba(26, 36, 51, 0.1);
  --rule-strong: rgba(26, 36, 51, 0.2);
  --primary: #1f4d8c;
  --primary-deep: #0e3160;
  --primary-hover: #173a6a;
  --gold: #c69531;
  --danger: #9c2a35;
  --success: #2e7d4f;
  --ff-body: 'IBM Plex Sans', system-ui, sans-serif;
  --ff-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--ff-body);
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }

/* === Login screen === */
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(180deg, #f5f7fa 0%, #e9eef4 100%);
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--paper);
  border-radius: 8px;
  padding: 36px 32px;
  box-shadow: 0 10px 40px rgba(14, 49, 96, 0.1);
}
.login-card h1 {
  font-family: var(--ff-body);
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 6px;
  color: var(--primary-deep);
}
.login-card p { color: var(--muted); font-size: 13px; margin: 0 0 28px; }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-form label { display: flex; flex-direction: column; gap: 6px; }
.login-form span {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.login-form input {
  padding: 11px 14px;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.login-form input:focus {
  outline: 0;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 77, 140, 0.12);
}
.login-form button {
  margin-top: 6px;
  padding: 12px 16px;
  background: var(--primary);
  color: #fff;
  border: 0;
  border-radius: 4px;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: background 0.15s;
}
.login-form button:hover { background: var(--primary-hover); }
.login-error {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--danger);
  background: rgba(156, 42, 53, 0.06);
  border-left: 3px solid var(--danger);
  padding: 8px 12px;
  border-radius: 0 3px 3px 0;
}

/* === App shell === */
.app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: var(--primary-deep);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.sidebar-nav { overflow-y: auto; }
.sidebar-brand {
  padding: 22px 22px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.sidebar-brand b {
  font-size: 17px;
  font-weight: 600;
  display: block;
}
.sidebar-brand small {
  display: block;
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 4px;
}
.sidebar-nav { padding: 14px 0; flex: 1; }
.sidebar-nav button {
  width: 100%;
  background: transparent;
  border: 0;
  text-align: left;
  padding: 10px 22px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.12s, color 0.12s;
}
.sidebar-nav button:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.sidebar-nav button.on {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 500;
  border-left: 3px solid var(--gold);
  padding-left: 19px;
}
.sidebar-nav .count {
  background: rgba(255, 255, 255, 0.1);
  font-family: var(--ff-mono);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 3px;
}
.sidebar-foot {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 22px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.7);
}
.sidebar-foot b { display: block; color: #fff; font-weight: 500; }
.sidebar-foot button {
  margin-top: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 6px 12px;
  border-radius: 3px;
  font-size: 12px;
}
.sidebar-foot button:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

.main { padding: 28px 36px; overflow-x: auto; }
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 22px;
  gap: 16px;
}
.page-head h1 {
  font-size: 24px;
  font-weight: 500;
  margin: 0;
  color: var(--ink);
}
.page-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13.5px;
}
.btn {
  background: var(--primary);
  color: #fff;
  border: 0;
  padding: 9px 16px;
  border-radius: 3px;
  font-size: 13.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
}
.btn:hover { background: var(--primary-hover); }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule-strong);
}
.btn.ghost:hover { background: var(--bg); border-color: var(--primary); color: var(--primary); }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #7e1f29; }

/* === Tables === */
.table-card {
  background: var(--paper);
  border-radius: 6px;
  border: 1px solid var(--rule);
  overflow: hidden;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
table.data th, table.data td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
table.data thead th {
  background: var(--bg);
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 1px solid var(--rule-strong);
}
table.data tbody tr:hover { background: rgba(31, 77, 140, 0.03); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data .row-title { font-weight: 500; color: var(--ink); }
table.data .row-meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
table.data .row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}
table.data .row-actions button {
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 12.5px;
}
table.data .row-actions button:hover { background: var(--bg); color: var(--primary); }
table.data .row-actions button.danger:hover { background: rgba(156, 42, 53, 0.08); color: var(--danger); }
.empty {
  padding: 50px 22px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
}
.tag {
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  font-weight: 600;
}
.tag.pub { background: rgba(46, 125, 79, 0.1); color: var(--success); }
.tag.draft { background: rgba(26, 36, 51, 0.08); color: var(--muted); }
.tag.gold { background: rgba(198, 149, 49, 0.1); color: var(--gold); border: 1px solid rgba(198, 149, 49, 0.3); }
.tag.role-admin { background: rgba(31, 77, 140, 0.1); color: var(--primary); }
.tag.role-user { background: rgba(26, 36, 51, 0.06); color: var(--muted); }
.tag.unread { background: rgba(156, 42, 53, 0.08); color: var(--danger); }

/* === Modal === */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(14, 49, 96, 0.45);
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 100;
  animation: fade 0.15s;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--paper);
  border-radius: 6px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow: auto;
  padding: 24px 28px;
  box-shadow: 0 24px 64px rgba(14, 49, 96, 0.25);
}
.modal h2 {
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}
.modal-form { display: flex; flex-direction: column; gap: 14px; }
.modal-form label { display: flex; flex-direction: column; gap: 5px; }
.modal-form span {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.modal-form input,
.modal-form select,
.modal-form textarea {
  padding: 9px 12px;
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.modal-form input:focus,
.modal-form select:focus,
.modal-form textarea:focus {
  outline: 0;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 77, 140, 0.12);
}
.modal-form textarea { resize: vertical; min-height: 100px; font-family: inherit; }
.modal-form .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-form .row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.modal-form input[type='checkbox'] { width: auto; margin: 0; }
.modal-form .check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-direction: row !important;
  cursor: pointer;
}
.modal-form .check span { letter-spacing: 0.04em; text-transform: none; font-family: inherit; font-size: 13px; color: var(--ink); font-weight: 400; }
.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}
.modal-error {
  font-size: 13px;
  color: var(--danger);
  background: rgba(156, 42, 53, 0.06);
  border-left: 3px solid var(--danger);
  padding: 8px 12px;
  border-radius: 0 3px 3px 0;
}

.loading {
  padding: 60px 22px;
  text-align: center;
  color: var(--muted);
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.modal-label-small {
  display: block;
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 4px;
}
.detail-val {
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
}
.long-text {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 300px;
  overflow-y: auto;
}

@media (max-width: 800px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    flex-direction: row;
    overflow-x: auto;
    padding: 6px;
  }
  .sidebar-brand, .sidebar-foot { display: none; }
  .sidebar-nav {
    display: flex;
    padding: 0;
    gap: 4px;
  }
  .sidebar-nav button {
    padding: 8px 14px;
    white-space: nowrap;
    border-left: 0 !important;
  }
  .sidebar-nav button.on {
    border-bottom: 3px solid var(--gold);
    padding-left: 14px;
  }
  .main { padding: 18px 16px; }
  .page-head { flex-direction: column; align-items: stretch; }
  table.data { font-size: 12.5px; }
  table.data th, table.data td { padding: 9px 10px; }
  .modal-form .row-2, .modal-form .row-3 { grid-template-columns: 1fr; }
}

/* ============================================================
   Site Images (Funcțional) — swap public site images
   ============================================================ */
.site-images { display: flex; flex-direction: column; gap: 36px; }
.si-group h2 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}
.si-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.si-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color .18s, box-shadow .18s, transform .15s;
}
.si-card:hover {
  border-color: var(--rule-strong);
  box-shadow: 0 6px 20px rgba(14, 49, 96, 0.06);
  transform: translateY(-1px);
}
.si-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #f3f5f9;
  overflow: hidden;
}
.si-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.si-body { padding: 12px 14px 6px; flex: 1; }
.si-label { font-weight: 600; font-size: 14px; color: var(--ink); margin-bottom: 4px; line-height: 1.3; }
.si-path { font-family: var(--ff-mono, ui-monospace, monospace); font-size: 11px; color: var(--muted); word-break: break-all; }
.si-actions { padding: 8px 14px 14px; }
.si-actions .btn { width: 100%; justify-content: center; padding: 8px 12px; font-size: 13px; }
.si-group-count { font-weight: 400; color: var(--muted); margin-left: 6px; }

/* ============================================================
   Service galleries section (under Funcțional)
   ============================================================ */
.sg-section { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--rule-strong); }
.sg-section-head { margin-bottom: 24px; }
.sg-section-head h2 { font-size: 18px; font-weight: 600; margin: 0 0 6px; color: var(--ink); }
.sg-section-head p { color: var(--muted); font-size: 13.5px; max-width: 720px; margin: 0; line-height: 1.5; }

.sg-list { display: flex; flex-direction: column; gap: 20px; }
.sg-service {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 18px;
}
.sg-service-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.sg-service-head h3 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.sg-hint { font-family: var(--ff-mono, ui-monospace, monospace); font-size: 11.5px; color: var(--muted); letter-spacing: .02em; }
.sg-empty {
  padding: 24px;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 13px;
  color: var(--muted);
}
.sg-empty code {
  background: rgba(0,0,0,0.05);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
}
.sg-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.sg-photo {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 5px;
  overflow: hidden;
  background: #f0f2f5;
}
.sg-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sg-photo-del {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 0;
  background: rgba(0,0,0,0.65);
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background .15s;
}
.sg-photo-del:hover { background: rgba(220, 38, 38, 0.9); }

/* ============================================================
   Service gallery modal (opened from Funcțional → + button)
   ============================================================ */
.sg-modal { display: flex; flex-direction: column; gap: 16px; }
.sg-modal-lead { color: var(--muted); font-size: 13.5px; margin: 0; line-height: 1.5; }
.sg-modal-field { display: flex; flex-direction: column; gap: 6px; }
.sg-modal-field span { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.sg-modal-field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  background: #fff;
  color: var(--ink);
}
.sg-modal-hint {
  background: #eef4fb;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 12.5px;
  color: var(--primary-deep);
}
.sg-modal-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  min-height: 50px;
}

/* Jump-to-site arrows */
.si-jump {
  display: inline-block;
  margin-left: 10px;
  color: var(--primary);
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s, color .15s;
  vertical-align: middle;
}
.si-jump:hover { color: var(--primary-deep); transform: translateX(3px); }

/* per-image card arrow removed by user request 2026-06-14 */

/* Jump button in row actions (open PDF on public site) */
.row-actions .jump-btn {
  background: transparent;
  color: var(--primary);
  border: 0;
  padding: 4px 8px;
  font-size: 16px;
  font-weight: 600;
}
.row-actions .jump-btn:hover {
  color: var(--primary-deep);
  background: transparent;
}

/* Empty state centered in modal */
.sg-modal-photos-empty { display: flex; align-items: center; justify-content: center; min-height: 120px; }
.sg-empty-center {
  text-align: center;
  background: transparent;
  padding: 18px;
  font-size: 15px;
  color: var(--muted);
  font-style: italic;
}

/* Upload zone replaces the empty state */
.sg-upload-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  width: 100%;
  border: 2px dashed var(--rule-strong);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: border-color .15s, background .15s, color .15s;
}
.sg-upload-zone:hover:not(:disabled) {
  border-color: var(--primary);
  background: #eff5fc;
  color: var(--primary);
}
.sg-upload-zone:disabled { cursor: default; opacity: 0.6; }

.modal-actions-single { justify-content: flex-end; }

/* ============================================================
   Servicii inline section in Funcțional — stacked galleries
   ============================================================ */
.svc-inline-wrap { margin-top: 56px; padding-top: 36px; border-top: 1px solid var(--rule-strong); }
.svc-inline-head h2 { font-family: var(--ff-display, serif); font-size: 32px; font-weight: 500; margin: 0 0 8px; letter-spacing: -.01em; color: var(--ink); }
.svc-inline-head p { color: var(--muted); font-size: 13.5px; max-width: 720px; margin: 0 0 28px; line-height: 1.5; }
.svc-inline-list { display: flex; flex-direction: column; gap: 36px; }
.svc-block {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 22px 22px 24px;
}
.svc-block-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.svc-block-title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}
.svc-block-hint {
  font-family: var(--ff-mono, ui-monospace, monospace);
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: .02em;
}
.svc-photos {
  display: grid;
  gap: 10px;
}
.svc-photos-c1 { grid-template-columns: 1fr; }
.svc-photos-c2 { grid-template-columns: repeat(2, 1fr); }
.svc-photos-c3 { grid-template-columns: repeat(3, 1fr); }
.svc-photos-c4 { grid-template-columns: repeat(4, 1fr); }
.svc-photo {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  overflow: hidden;
  background: #f0f2f5;
}
.svc-photos-c1 .svc-photo { aspect-ratio: 16 / 9; }
.svc-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 880px) {
  .svc-photos-c3, .svc-photos-c4 { grid-template-columns: repeat(2, 1fr); }
}

/* Stacked layout for the SERVICII category (one row per service: title big above + photo big below) */
.si-stack { display: flex; flex-direction: column; gap: 24px; }
.si-stack-row {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
}
.si-stack-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--rule);
}
.si-stack-title {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
}
.si-stack-photo {
  width: 100%;
  aspect-ratio: 16 / 7;
  background: #f0f2f5;
  overflow: hidden;
}
.si-stack-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 880px) {
  .si-stack-photo { aspect-ratio: 16 / 9; }
}

/* Label as link to the public site location */
.si-label-link {
  display: block;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: color .15s;
}
.si-label-link:hover {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: var(--gold, #c69531);
  text-underline-offset: 3px;
}

/* Visibility toggle on gallery cards */
.si-vis-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-family: var(--ff-mono, ui-monospace, monospace);
  letter-spacing: .04em;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: 8px;
  user-select: none;
}
.si-vis-toggle input { margin: 0; }
.si-vis-toggle:has(input:checked) { color: var(--success, #16a34a); }
.si-vis-toggle:has(input:not(:checked)) { color: var(--signal, #9c2a35); }

/* Site image preview when picked in modal (replace mode) */
.sg-current-preview {
  display: flex;
  gap: 14px;
  padding: 14px;
  background: #f8fafc;
  border-radius: 6px;
  align-items: center;
}
.sg-current-preview img {
  width: 110px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}
.sg-current-info { flex: 1; min-width: 0; }
.sg-current-label { font-weight: 600; font-size: 14px; color: var(--ink); margin-bottom: 4px; }
.sg-current-path { font-family: var(--ff-mono, ui-monospace, monospace); font-size: 11.5px; color: var(--muted); word-break: break-all; }

/* Visibility switch — pill-style toggle visible on every photo card */
.si-vis-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 10px 4px 6px;
  border-radius: 999px;
  font-size: 11.5px;
  font-family: var(--ff-mono, ui-monospace, monospace);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: background .15s, color .15s;
  user-select: none;
  margin-bottom: 8px;
}
.si-vis-switch input { display: none; }
.si-vis-knob {
  width: 30px;
  height: 16px;
  background: var(--rule-strong);
  border-radius: 999px;
  position: relative;
  transition: background .2s;
  flex-shrink: 0;
}
.si-vis-knob::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
}
.si-vis-switch.on { background: rgba(46, 125, 79, .1); color: var(--success); }
.si-vis-switch.on .si-vis-knob { background: var(--success); }
.si-vis-switch.on .si-vis-knob::after { transform: translateX(14px); }
.si-vis-switch.off { background: rgba(156, 42, 53, .08); color: var(--danger); }
.si-vis-switch.off .si-vis-knob { background: rgba(156, 42, 53, .35); }
.si-vis-switch:hover { filter: brightness(0.97); }

/* Dim invisible cards so it's obvious */
.si-card:has(.si-vis-switch.off) .si-thumb img { opacity: 0.45; filter: grayscale(0.6); }
