/* KashBoss super-admin panel — shared styling (HTML migration from Flutter). */
:root {
  --brand-1: #6366F1;
  --brand-2: #8B5CF6;
  --bg: #F8FAFC;
  --card: #FFFFFF;
  --text: #0F172A;
  --muted: #64748B;
  --border: #E2E8F0;
  --sidebar-bg: #1E293B;
  --sidebar-bg-hover: #283749;
  --sidebar-text: #CBD5E1;
  --sidebar-text-active: #FFFFFF;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #DC2626;
  --info: #3B82F6;
  --neutral: #64748B;
  --gold: #D9A227;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ====== Layout shell: sidebar + main ====== */
.shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}
.sidebar-logo {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-logo img {
  width: 36px; height: 36px;
  border-radius: 8px;
  object-fit: cover;
}
.sidebar-logo .brand {
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}
.sidebar-nav { padding: 8px 8px; flex: 1; }
.sidebar-nav .divider { height: 1px; background: rgba(255,255,255,.08); margin: 8px 4px; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--sidebar-text);
  font-size: 14px;
  margin-bottom: 2px;
}
.sidebar-nav a:hover { background: var(--sidebar-bg-hover); color: #fff; }
.sidebar-nav a.active {
  background: rgba(99, 102, 241, .15);
  border: 1px solid rgba(99, 102, 241, .3);
  color: #fff;
  font-weight: 600;
}
.sidebar-nav .nav-icon {
  width: 18px; height: 18px;
  display: inline-block;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 12px;
  color: rgba(255,255,255,.55);
}

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  background: #fff;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar .hamburger {
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  color: var(--text);
  display: inline-flex;
  align-items: center; justify-content: center;
  margin-left: 12px;
  flex-shrink: 0;
}
.topbar .hamburger:hover { background: #F1F5F9; }

.topbar .title { font-size: 20px; font-weight: 800; flex: 1; min-width: 0; }

/* Collapsed sidebar — toggled by the ☰ button in the topbar. */
.shell.sidebar-hidden .sidebar { display: none; }
.topbar .right { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; }
.topbar .pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(99,102,241,.12);
  color: var(--brand-1);
  font-weight: 600;
}

.content { padding: 20px; }

/* ====== Cards ====== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}
.card + .card { margin-top: 14px; }
.card h3 { margin: 0 0 12px; font-size: 14px; color: var(--muted); font-weight: 700; }

/* ====== Filters ====== */
.filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.filters-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.search-box {
  position: relative;
  flex: 1;
  min-width: 220px;
}
.search-box input {
  width: 100%;
  padding: 10px 38px 10px 14px;
  font-family: inherit;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}
.search-box input:focus {
  outline: none;
  border-color: var(--brand-1);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
.search-box::after {
  content: '🔍';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 14px;
}
.select, .date-input {
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  min-width: 140px;
}
.select:focus, .date-input:focus {
  outline: none;
  border-color: var(--brand-1);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}

.chip-group { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  transition: all .15s;
}
.chip:hover { background: #F1F5F9; }
.chip.active {
  background: var(--brand-1);
  color: #fff;
  border-color: var(--brand-1);
}
.chip.status-active.active   { background: var(--success); border-color: var(--success); }
.chip.status-trial.active    { background: var(--warning); border-color: var(--warning); }
.chip.status-expired.active  { background: var(--danger);  border-color: var(--danger); }
.chip.status-suspended.active{ background: var(--neutral); border-color: var(--neutral); }

.btn {
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn:hover { background: #F1F5F9; }
.btn-primary { background: var(--brand-1); color: #fff; border-color: var(--brand-1); }
.btn-primary:hover { background: #5558E3; }
.btn-ghost { border-color: transparent; color: var(--muted); }

/* ====== Table ====== */
.results-meta {
  font-size: 13px;
  color: var(--muted);
  margin: 14px 0 8px;
}
.table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: auto;
}
table.subs {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 1100px;
}
table.subs thead th {
  background: #F8FAFC;
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
  text-align: right;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1;
}
table.subs tbody td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.subs tbody tr { cursor: pointer; transition: background .12s; }
table.subs tbody tr:hover { background: #F8FAFC; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.badge-active   { background: rgba(16,185,129,.14); color: var(--success); }
.badge-trial    { background: rgba(245,158,11,.14); color: var(--warning); }
.badge-expired  { background: rgba(220,38,38,.14);  color: var(--danger); }
.badge-suspended{ background: rgba(100,116,139,.14);color: var(--neutral); }
.badge-cancelled{ background: rgba(100,116,139,.14);color: var(--neutral); }

.muted { color: var(--muted); }
.center { text-align: center; }
.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
}

/* ====== Pager ====== */
.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 14px 14px;
  margin-top: -1px;
}
.pager .pinfo { color: var(--muted); font-size: 13px; font-weight: 600; }

/* ====== Loader ====== */
.loader {
  text-align: center;
  padding: 40px;
  color: var(--muted);
}
.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--brand-1);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ====== Banner ====== */
.banner {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 12px;
}
.banner-error { background: rgba(220,38,38,.10); color: var(--danger); border: 1px solid rgba(220,38,38,.25); }
.banner-success { background: rgba(16,185,129,.10); color: #047857; border: 1px solid rgba(16,185,129,.25); }
.banner-info { background: rgba(59,130,246,.10); color: #1D4ED8; border: 1px solid rgba(59,130,246,.25); }
.banner-warning { background: rgba(245,158,11,.12); color: #92400E; border: 1px solid rgba(245,158,11,.30); }

/* ====== Row action menu (kebab) ====== */
.row-actions { position: relative; display: inline-block; }
.kebab {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.kebab:hover { background: #F1F5F9; color: var(--text); }
/* Singleton menu: position: fixed via JS using the kebab's bounding rect,
   so the table-wrap's `overflow: auto` can't clip it. */
.row-menu {
  position: fixed;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(15,23,42,.12);
  padding: 6px;
  z-index: 1500;
  display: none;
}
.row-menu.open { display: block; }
.row-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  border: none;
  background: transparent;
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  text-align: start;
}
.row-menu button:hover { background: #F1F5F9; }
.row-menu button.danger { color: var(--danger); }
.row-menu .divider { height: 1px; background: var(--border); margin: 4px 2px; }

/* ====== Modal ====== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.55);
  display: none;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow: auto;
  padding: 22px 22px 16px;
}
.modal h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
}
.modal .modal-sub {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 16px;
}
.field { margin-bottom: 12px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 4px;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brand-1);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
.field-row { display: flex; gap: 10px; }
.field-row > .field { flex: 1; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* ====== Toast ====== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px;
  z-index: 1100;
  box-shadow: 0 12px 28px rgba(15,23,42,.25);
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}
.toast.show { opacity: 1; }
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }

/* ====== Subscribers-specific ====== */
.icon-btn {
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center; justify-content: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 17px;
  cursor: pointer;
  color: var(--text);
}
.icon-btn:hover { background: #F1F5F9; }
.icon-btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn.success { color: var(--success); }
.icon-btn.danger { color: var(--danger); }
.icon-btn.warning { color: var(--warning); }
.icon-btn.brand { color: var(--brand-1); }

.provider-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
}
.provider-google { background: rgba(220,38,38,.10); color: var(--danger); }
.provider-email  { background: rgba(59,130,246,.10); color: var(--info); }

.bool-icon { font-size: 18px; }
.bool-icon.yes { color: var(--success); }
.bool-icon.no  { color: #CBD5E1; }
.bool-icon.activated { color: #7C3AED; }

.wa-btn {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center; justify-content: center;
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  border-radius: 8px;
  line-height: 1;
}
.wa-btn.unsent { color: var(--danger); }
.wa-btn.sent   { color: var(--success); }
.wa-btn:disabled { color: #CBD5E1; cursor: not-allowed; }
.wa-btn:hover:not(:disabled) { background: #F1F5F9; }

.activity-stats {
  display: inline-flex;
  gap: 10px;
  font-size: 12px;
}
.activity-stats span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--muted);
}
.activity-stats strong {
  color: var(--text);
  font-weight: 700;
}

.cell-business strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.cell-business .owner {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.cell-status-time { line-height: 1.4; }
.cell-status-time .sub {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.cell-status-time .sub.danger { color: var(--danger); }
.cell-status-time .sub.warning { color: var(--warning); }

/* ====== Banners (modals) ====== */
.amber-banner {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 10px;
  padding: 10px 12px;
  color: #92400E;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}
.green-banner {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  border-radius: 10px;
  padding: 10px 12px;
  color: #065F46;
  font-size: 13px;
  margin: 10px 0;
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}
.gray-banner {
  background: #F8FAFC;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  margin-bottom: 12px;
}
.gray-banner .row {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
  color: var(--muted);
}
.gray-banner .row .val { color: var(--text); font-weight: 600; }
.danger-banner {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 10px;
  padding: 10px 12px;
  color: #991B1B;
  font-size: 13px;
  margin-bottom: 12px;
}

/* Segmented pills used inside modals (days/cycle picker) */
.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.segmented .chip { font-size: 12px; padding: 5px 12px; }

/* Plan radio list inside modals */
.plan-list { display: flex; flex-direction: column; gap: 8px; }
.plan-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  background: #fff;
}
.plan-row:hover { background: #F8FAFC; }
.plan-row.selected {
  border-color: var(--brand-1);
  background: rgba(99,102,241,.06);
}
.plan-row .nm { font-weight: 700; font-size: 13px; }
.plan-row .pr { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* Details modal helpers */
.section-h {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  margin: 14px 0 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
}
.detail-row .lbl { color: var(--muted); }
.detail-row .val { font-weight: 600; }
.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn-danger:hover { background: #B91C1C; }
.btn-danger:disabled { background: #FECACA; border-color: #FECACA; color: #fff; cursor: not-allowed; }
.btn-success {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}
.btn-success:hover { background: #059669; }
.btn-warning {
  background: var(--warning);
  color: #fff;
  border-color: var(--warning);
}
.btn-warning:hover { background: #D97706; }
.modal-wide { max-width: 640px; }

/* ====== Per-business detail page ====== */
.biz-header {
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff;
  border-radius: 20px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 18px rgba(99,102,241,.25);
  margin-bottom: 12px;
}
.biz-header h1 { margin: 0; font-size: 22px; font-weight: 800; }
.biz-header .owner { color: rgba(255,255,255,.85); font-size: 14px; margin-top: 4px; }
.biz-header .last-login {
  display: flex; align-items: center; gap: 8px;
  margin-top: 12px;
  color: rgba(255,255,255,.9);
  font-size: 13px;
}
.biz-header .dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.4); }
.biz-header .dot.active { background: #22C55E; }
.biz-header .biz-info { flex: 1; min-width: 0; }
.biz-header .icon-btn {
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.25);
  color: #fff;
}
.biz-header .icon-btn:hover { background: rgba(255,255,255,.25); }

.feature-overrides-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: start;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  color: var(--text);
  margin-bottom: 24px;
  font-family: inherit;
}
.feature-overrides-btn:hover { background: #F8FAFC; }
.feature-overrides-btn .ico {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(99,102,241,.12);
  color: var(--brand-1);
  border-radius: 10px;
  font-size: 18px;
  flex-shrink: 0;
}
.feature-overrides-btn .text { flex: 1; min-width: 0; }
.feature-overrides-btn .text strong { display: block; font-size: 15px; font-weight: 700; }
.feature-overrides-btn .text span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.feature-overrides-btn .chev { color: #94A3B8; font-size: 22px; line-height: 1; }

.section-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin: 24px 0 12px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 4px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 4px 10px rgba(0,0,0,.03);
}
.stat-card .stat-icon {
  display: inline-flex;
  width: 36px; height: 36px;
  border-radius: 10px;
  align-items: center; justify-content: center;
  font-size: 18px;
}
.stat-card .stat-value {
  margin-top: 12px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}
.stat-card .stat-label {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.list-card {
  padding: 6px 16px;
}
.list-card .lrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid #F1F5F9;
}
.list-card .lrow:last-child { border-bottom: none; }
.list-card .dot {
  width: 10px; height: 10px; border-radius: 50%; background: #CBD5E1;
  flex-shrink: 0;
}
.list-card .dot.active { background: #22C55E; }
.list-card .lname { font-weight: 600; color: var(--text); font-size: 13px; }
.list-card .lmeta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.list-card .lend  { text-align: end; }
.list-card .lend .role { font-size: 12px; color: var(--brand-1); font-weight: 700; }
.list-card .lend .time { font-size: 11px; color: var(--muted); margin-top: 2px; }
.list-card .lflex { flex: 1; min-width: 0; }
.list-card .ltag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(99,102,241,.10);
  color: var(--brand-1);
  font-weight: 700;
  margin-inline-start: 6px;
}
.list-card .ltag.danger { background: rgba(220,38,38,.10); color: var(--danger); }

/* قفل المخزن من الإدارة — برتقالي، متميّز عن «موقوف» الأحمر (قرار العميل)
   وعن «رئيسي» البنفسجي. */
.list-card .ltag.lock-tag { background: rgba(245,158,11,.15); color: #B45309; }
.list-card .btn-lock {
  margin-inline-start: 8px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid rgba(245,158,11,.45);
  background: rgba(245,158,11,.10);
  color: #B45309;
  transition: background .15s, border-color .15s;
}
.list-card .btn-lock:hover:not(:disabled) { background: rgba(245,158,11,.20); }
.list-card .btn-lock.unlock {
  border-color: rgba(34,197,94,.45);
  background: rgba(34,197,94,.10);
  color: #15803D;
}
.list-card .btn-lock.unlock:hover:not(:disabled) { background: rgba(34,197,94,.20); }
.list-card .btn-lock:disabled { opacity: .55; cursor: default; }
.list-card .empty {
  padding: 30px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* Tristate segmented for feature-overrides modal */
.tristate {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  flex-shrink: 0;
}
.tristate button {
  padding: 6px 12px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
}
.tristate button.active { background: var(--brand-1); color: #fff; }
.tristate button + button { border-right: 1px solid var(--border); }
.tristate button.active + button { border-right: none; }

.ov-cat {
  margin-top: 14px;
  font-weight: 800;
  font-size: 14px;
  color: var(--text);
}
.ov-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #F1F5F9;
}
.ov-row:last-child { border-bottom: none; }
.ov-row .ind {
  width: 18px;
  text-align: center;
  font-size: 14px;
}
.ov-row .ind.yes { color: var(--success); }
.ov-row .ind.no  { color: var(--muted); }
.ov-row .lbl { flex: 1; font-size: 13px; }

/* ====== Print (Save-as-PDF) ====== */
@media print {
  .sidebar, .topbar, .filters, .pager, .row-menu, .modal-backdrop, .toast,
  th.col-actions, td.col-actions,
  th.col-wa, td.col-wa,
  #banner-slot,
  .results-meta { display: none !important; }
  body, .content, .main { background: #fff !important; }
  .card { border: none; padding: 0; }
  .table-wrap { border: none; overflow: visible; }
  table.subs { font-size: 10px; min-width: 0; }
  table.subs thead th { background: #fff !important; }
  table.subs tbody tr { cursor: default; }
}

/* ====== Responsive ====== */
@media (max-width: 900px) {
  .sidebar { width: 64px; }
  .sidebar-nav a span.label { display: none; }
  .sidebar-logo .brand { display: none; }
}
