/* =========================================================
   Company Gateway · Admin Console — Design System v2
   Modern UI: gradients, soft shadows, clean typography,
   light/dark/system theme via data-theme on <html>
   ========================================================= */

/* ---------- Theme Tokens (QuickSchools green accents, neutral canvas) ---------- */
:root,
:root[data-theme="light"] {
  --bg:            #f6f8fb;
  --bg-grad:       radial-gradient(1200px 600px at 10% -10%, #e0e7ff 0%, transparent 60%),
                   radial-gradient(900px 500px at 110% 10%, #dbeafe 0%, transparent 55%),
                   linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  --surface:       #ffffff;
  --surface-1:     #ffffff;
  --surface-2:     #f8fafc;
  --surface-3:     #f1f5f9;
  --border:        #e2e8f0;
  --border-strong: #cbd5e1;
  --fg:            #0f172a;
  --fg-muted:      #64748b;
  --fg-subtle:     #94a3b8;
  --primary:       #2f7d32;
  --primary-600:   #235d26;
  --primary-hover: #235d26;
  --primary-soft:  #e0f2e2;
  --primary-fg:    #ffffff;
  --danger:        #c53030;
  --danger-600:    #9b2323;
  --danger-hover:  #9b2323;
  --danger-soft:   #fde5e5;
  --danger-fg:     #ffffff;
  --danger-btn-fg: #ffffff;
  --success:       #15803d;
  --success-600:   #166534;
  --success-soft:  #dcfce7;
  --warning:       #b45309;
  --warning-soft:  #fef3c7;
  --shadow-sm:     0 1px 2px rgba(15,23,42,0.06), 0 1px 3px rgba(15,23,42,0.04);
  --shadow-md:     0 4px 10px rgba(15,23,42,0.06), 0 2px 4px rgba(15,23,42,0.04);
  --shadow-lg:     0 20px 40px -12px rgba(15,23,42,0.18), 0 8px 16px -8px rgba(15,23,42,0.08);
  --shadow-xl:     0 30px 60px -15px rgba(15,23,42,0.25);
  --radius-sm:     8px;
  --radius-md:     12px;
  --radius-lg:     16px;
  --radius-xl:     20px;
  --radius-pill:   999px;
  --ring:          0 0 0 4px rgba(47,125,50,0.18);
  --chip-admin-bg:    #fde68a;
  --chip-admin-fg:    #713f12;
  --chip-user-bg:     var(--primary-soft);
  --chip-user-fg:     var(--primary-hover);
  --chip-enabled-bg:  var(--success-soft);
  --chip-enabled-fg:  #166534;
  --chip-disabled-bg: #fee2e2;
  --chip-disabled-fg: #b91c1c;
  --scroll-thumb:    #cbd5e1;
  --scroll-track:    transparent;
}

:root[data-theme="dark"] {
  --bg:            #07080b;
  --bg-grad:       radial-gradient(1200px 600px at 10% -10%, #141414 0%, transparent 60%),
                   radial-gradient(900px 500px at 110% 10%, #1a1a1a 0%, transparent 55%),
                   linear-gradient(180deg, #0a0a0a 0%, #050505 100%);
  --surface:       #111111;
  --surface-1:     #111111;
  --surface-2:     #0d0d0d;
  --surface-3:     #1a1a1a;
  --border:        #262626;
  --border-strong: #3a3a3a;
  --fg:            #e5e5e5;
  --fg-muted:      #a3a3a3;
  --fg-subtle:     #737373;
  --primary:       #34d399;
  --primary-600:   #10b981;
  --primary-hover: #6ee7b7;
  --primary-soft:  #064e3b;
  --primary-fg:    #052e16;
  --danger:        #f87171;
  --danger-600:    #ef4444;
  --danger-hover:  #fca5a5;
  --danger-soft:   #450a0a;
  --danger-fg:     #0b1020;
  --danger-btn-fg: #ffffff;
  --success:       #4ade80;
  --success-600:   #16a34a;
  --success-soft:  #052e16;
  --warning:       #fbbf24;
  --warning-soft:  #451a03;
  --shadow-sm:     0 1px 2px rgba(0,0,0,0.4), 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md:     0 6px 16px rgba(0,0,0,0.35), 0 2px 4px rgba(0,0,0,0.25);
  --shadow-lg:     0 24px 48px -14px rgba(0,0,0,0.6), 0 10px 20px -10px rgba(0,0,0,0.4);
  --shadow-xl:     0 40px 80px -20px rgba(0,0,0,0.7);
  --radius-sm:     8px;
  --radius-md:     12px;
  --radius-lg:     16px;
  --radius-xl:     20px;
  --radius-pill:   999px;
  --ring:          0 0 0 4px rgba(52,211,153,0.22);
  --chip-admin-bg:    #713f12;
  --chip-admin-fg:    #fcd34d;
  --chip-user-bg:     var(--primary-soft);
  --chip-user-fg:     #6ee7b7;
  --chip-enabled-bg:  var(--success-soft);
  --chip-enabled-fg:  #86efac;
  --chip-disabled-bg: #7f1d1d;
  --chip-disabled-fg: #fecaca;
  --scroll-thumb:    #3a3a3a;
  --scroll-track:    transparent;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", sans-serif;
  font-size: 14px; line-height: 1.55;
  color: var(--fg); background: var(--bg);
  background-image: var(--bg-grad); background-attachment: fixed;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--primary-soft); color: var(--primary-hover); }
a, button.link {
  background: none; border: 0; color: var(--primary);
  cursor: pointer; font: inherit; text-decoration: none;
}
a:hover, button.link:hover { text-decoration: underline; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--scroll-track); }
::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--border-strong); background-clip: padding-box;
  border: 2px solid transparent;
}

/* ---------- Login 2-column layout (v14.4.2 baseline) ---------- */
/* ---------- Login 2-column layout (Auth screen base) ---------- */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 24px;
}
.login-grid {
  width: 100%;
  max-width: 1080px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 0;
  background: var(--surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
}
.login-brand {
  padding: 40px 36px 34px;
  color: #fff;
  background:
    radial-gradient(900px 420px at 0% 0%, rgba(255,255,255,0.18) 0%, transparent 55%),
    linear-gradient(155deg, #0f5132 0%, #2f7d32 42%, #3f9d45 100%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}
.login-brand::after {
  content: "";
  position: absolute; right: -80px; bottom: -80px;
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.14) 0%, transparent 62%);
  pointer-events: none;
}
.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 6px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(6px);
  align-self: flex-start;
}
.brand-logo {
  display: inline-grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 999px;
  background: #fff;
  color: #2f7d32;
  font-weight: 900;
  font-size: 15px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(47,125,50,0.25);
}
.brand-title {
  margin-top: 6px;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.brand-tag {
  margin: 0;
  font-size: 14px;
  color: rgba(255,255,255,0.88);
  line-height: 1.5;
}
.brand-features {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.brand-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: rgba(255,255,255,0.92);
  font-size: 13.5px;
}
.brand-features li::before {
  content: "✓";
  flex-shrink: 0;
  width: 18px; height: 18px;
  display: inline-grid; place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  margin-top: 2px;
}
.brand-footer {
  margin-top: auto;
  font-size: 12px;
  color: rgba(255,255,255,0.74);
}
.login-form-panel {
  position: relative;
  padding: 30px 36px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}
.theme-toggle-wrap {
  position: absolute;
  top: 18px;
  right: 20px;
  z-index: 2;
}
.login-form-head {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.login-form-head h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}
.login-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
}
.login-form label input {
  padding: 13px 14px;
  font-size: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--fg);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.login-form label input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--ring);
  background: var(--surface);
}
.login-form label input::placeholder { color: var(--fg-subtle); }
.login-form button[type="submit"] {
  margin-top: 4px;
  min-height: 44px;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.login-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2px;
  font-size: 12.5px;
}
@media (max-width: 860px) {
  .login-grid { grid-template-columns: 1fr; }
  .login-brand::after { display: none; }
}

/* ---------- Surface / Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  box-shadow: var(--shadow-md); backdrop-filter: saturate(140%);
}

/* ---------- Typography ---------- */
h1 { margin: 0 0 6px; font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.005em; }
h3 { margin: 0; font-size: 16px; font-weight: 600; }
.muted { color: var(--fg-muted); font-size: 13px; }
.subtle { color: var(--fg-subtle); }
.error { color: var(--danger); min-height: 1.2em; font-size: 13px; margin-top: 10px; }

/* ---------- Buttons ---------- */
button {
  font: inherit; font-weight: 600; padding: 9px 16px;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  cursor: pointer; background: var(--surface); color: var(--fg);
  transition: transform .08s ease, background-color .15s ease,
              border-color .15s ease, color .15s ease, box-shadow .15s ease, opacity .15s ease;
  box-shadow: var(--shadow-sm); user-select: none;
}
button:hover:not(:disabled) { border-color: var(--border-strong); }
button:active:not(:disabled) { transform: translateY(1px); }
button:focus-visible { outline: none; box-shadow: var(--ring); border-color: var(--primary); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-600) 100%);
  color: var(--primary-fg); border-color: transparent;
  box-shadow: 0 6px 18px -6px var(--primary);
}
button.primary:hover:not(:disabled) { filter: brightness(1.05); }
button.danger {
  background: linear-gradient(135deg, var(--danger) 0%, var(--danger-600) 100%);
  color: var(--danger-btn-fg, #ffffff); border-color: transparent;
  box-shadow: 0 6px 18px -6px var(--danger);
}
button.danger:hover:not(:disabled) { filter: brightness(1.05); }
button.ghost {
  background: transparent; border-color: transparent;
  box-shadow: none; color: var(--fg-muted);
}
button.ghost:hover:not(:disabled) {
  background: var(--surface-2); color: var(--fg);
  border-color: transparent; box-shadow: none;
}
.icon-btn {
  width: 36px; height: 36px; padding: 0;
  display: inline-grid; place-items: center;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface); color: var(--fg-muted); box-shadow: none;
}
.icon-btn:hover:not(:disabled) { color: var(--fg); }

/* ---------- Inputs / selects / textareas ---------- */
input, select, textarea {
  font: inherit; padding: 10px 12px; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: var(--surface-2); color: var(--fg);
  width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: var(--ring); background: var(--surface);
}
input::placeholder, textarea::placeholder { color: var(--fg-subtle); }
input[type="search"] { -webkit-appearance: none; -moz-appearance: none; appearance: none; }
input[type="radio"], input[type="checkbox"] {
  width: auto; padding: 0; margin: 0; accent-color: var(--primary);
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 28px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
}
.topbar-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-pill {
  width: 32px; height: 32px; display: inline-grid; place-items: center;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
  color: #fff; font-weight: 900; font-size: 15px;
  box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--primary) 70%, transparent);
}
.topbar .right {
  display: flex; align-items: center; gap: 10px;
  min-width: 0; flex: 1; justify-content: flex-end; flex-wrap: nowrap;
}
.topbar nav[aria-label="Admin navigation"] {
  display: flex; align-items: center; gap: 4px; padding: 4px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-pill); box-shadow: var(--shadow-sm);
}
nav button.tab {
  border: 0; background: transparent; color: var(--fg-muted);
  padding: 7px 14px; font-size: 13px; font-weight: 600;
  border-radius: var(--radius-pill); box-shadow: none; letter-spacing: 0.01em;
}
nav button.tab:hover:not(.active) { color: var(--fg); background: var(--surface-3); }
nav button.tab.active {
  background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm);
}

/* ---------- Avatar & user dropdown ---------- */
.user-menu { position: relative; }
.avatar-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px 3px 3px; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: var(--surface); cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  color: var(--fg-muted); font-size: 12px; font-weight: 600; line-height: 1;
}
.avatar-btn:hover,
.avatar-btn[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent);
  color: var(--fg);
}
.avatar-btn .chev { transition: transform .15s ease; display: inline-block; }
.avatar-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.avatar {
  width: 30px; height: 30px; display: inline-grid; place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
  color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .01em;
  user-select: none;
  box-shadow: 0 4px 10px -4px color-mix(in srgb, var(--primary) 70%, transparent);
}
.avatar.big {
  width: 42px; height: 42px; font-size: 16px;
  box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--primary) 75%, transparent);
}
.dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 320px; max-width: 380px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px -16px rgba(15, 23, 42, .28), 0 2px 6px -2px rgba(15, 23, 42, .10);
  padding: 8px;
  opacity: 0; transform: translateY(-6px) scale(.98);
  transform-origin: top right; pointer-events: none;
  transition: opacity .14s ease, transform .14s ease; z-index: 90;
}
.dropdown[data-open="true"],
.user-menu[data-open="true"] .dropdown {
  opacity: 1; transform: translateY(0) scale(1); pointer-events: auto;
}
.dropdown-head {
  display: flex; align-items: center; gap: 12px; padding: 10px 10px 12px 10px;
}
.dropdown-name {
  font-weight: 700; font-size: 14px; color: var(--fg);
  line-height: 1.25; word-break: break-word;
}
.dropdown-email { font-size: 12px; margin-top: 2px; word-break: break-all; }
.dropdown-roles {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 0 10px 12px 10px;
}
.role-chip {
  display: inline-flex; align-items: center; padding: 3px 9px;
  font-size: 11px; font-weight: 700; line-height: 1.4;
  border-radius: var(--radius-pill); letter-spacing: .02em; white-space: nowrap;
}
.role-chip.admin,
.role-chip.super_admin,
.role-chip[data-role="admin"],
.role-chip[data-role="super_admin"] {
  background: color-mix(in srgb, var(--primary) 16%, transparent);
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 28%, transparent);
}
.role-chip.user {
  background: color-mix(in srgb, #64748b 14%, transparent);
  color: #475569;
  border: 1px solid color-mix(in srgb, #64748b 22%, transparent);
}
.role-chip.other {
  background: var(--surface-3); color: var(--fg); border: 1px solid var(--border);
}

/* Dropdown IP Whitelist toggle row (BUG3a) */
.dropdown-ip-toggle {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 10px 12px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border);
  margin: 2px 6px 10px;
}
.dropdown-ip-toggle .ipwl-left { min-width: 0; flex: 1; }
.dropdown-ip-toggle .ipwl-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--fg); line-height: 1.25;
}
.dropdown-ip-toggle .ipwl-title .di-ico { font-size: 14px; }
.dropdown-ip-toggle .ipwl-sub {
  font-size: 11.5px; color: var(--fg-muted); margin-top: 2px; line-height: 1.35;
}
.dropdown-ip-toggle .ipwl-switch-row {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.dropdown-ip-toggle .switch-wrap {
  padding: 0; background: transparent; border: 0; box-shadow: none;
}
.dropdown-ip-toggle .switch-wrap .chip { padding: 2px 10px; font-size: 10.5px; }

.dropdown-sep {
  height: 1px; margin: 6px 2px; background: var(--border);
}
.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 10px; border: 0;
  background: transparent; color: var(--fg);
  font-size: 13px; font-weight: 500; line-height: 1.25;
  border-radius: 10px; cursor: pointer;
  transition: background .12s ease, color .12s ease; text-align: left;
}
.dropdown-item:hover { background: var(--surface-3); color: var(--fg); }
.dropdown-item .di-ico {
  width: 18px; display: inline-grid; place-items: center; font-size: 14px;
}
.dropdown-item .di-ico svg {
  width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.dropdown-item.danger {
  background: linear-gradient(135deg, var(--danger) 0%, var(--danger-600) 100%);
  color: var(--danger-btn-fg, #ffffff);
  box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--danger) 55%, transparent);
  font-weight: 600;
}
.dropdown-item.danger:hover {
  filter: brightness(1.06);
  color: var(--danger-btn-fg, #ffffff);
  background: linear-gradient(135deg, var(--danger) 0%, var(--danger-600) 100%);
}

/* ---------- Layout ---------- */
main { padding: 28px 28px 40px; max-width: 1400px; margin: 0 auto; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* BUG4 fix: page-head + filters + table + cards + pager share one max-width */
main > .tab-panel > .page-head,
main > .tab-panel > .filters,
main > .tab-panel > table.data,
main > .tab-panel > .card,
main > .tab-panel > .pager {
  max-width: 1344px;
  width: 100% !important;
  box-sizing: border-box;
  margin-left: 0;
  margin-right: 0;
}

.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.row.center { justify-content: center; }
.page-head { margin-bottom: 18px; min-height: 44px; }
.page-head h2 { color: var(--fg); }
.page-head > button.primary,
.page-head > button.danger { min-height: 42px; }

/* ---------- Filters bar ---------- */
.filters {
  margin: 0 0 18px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  gap: 10px;
}
.filters input, .filters select { padding: 9px 12px; }
.filters input[type="search"] { flex: 1 1 280px; }
.filters select { flex: 0 0 160px; max-width: 180px; }

/* ---------- TABLE ---------- */
table.data {
  width: 100% !important;
  max-width: 1344px;
  table-layout: fixed;
  border-collapse: separate; border-spacing: 0;
  background: var(--surface); border-radius: var(--radius-lg);
  overflow: hidden; border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); margin: 0;
}
table.data col.c-user    { width: 22%; }
table.data col.c-role    { width: 6%;  }
table.data col.c-assigned{ width: 12%; }
table.data col.c-ip      { width: 11%; }
table.data col.c-status  { width: 8%;  }
table.data col.c-last    { width: 11%; }
table.data col.c-created { width: 11%; }
table.data col.c-actions { width: 19%; }
table.data th, table.data td {
  padding: 12px 14px; text-align: left;
  vertical-align: middle; font-size: 13.5px;
  display: table-cell !important;
}

.cell-flex { width: 100%; min-width: 0; height: 100%; }
.cell-flex.user {
  display: flex; align-items: center; gap: 12px;
  padding-left: 0 !important;
}
.cell-flex.chips {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
}
.cell-flex.actions {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 8px; flex-wrap: nowrap; width: 100%;
}
.cell-flex.time {
  display: flex; flex-direction: column; justify-content: center; gap: 3px;
}
.cell-flex.status {
  display: flex; align-items: center;
}
table.data thead th {
  background: var(--surface-2); color: var(--fg-muted);
  font-weight: 700; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}
table.data tbody tr {
  min-height: 76px;
  background-image: linear-gradient(
    180deg,
    transparent calc(100% - 1px),
    color-mix(in srgb, var(--border) 92%, transparent) calc(100% - 1px)
  );
  background-repeat: no-repeat;
  background-size: 100% 100%;
  transition: background-color .12s ease, filter .12s ease;
}
table.data tbody > tr:last-child { background-image: none; }
table.data tbody > tr > td { border-bottom: 0; height: 76px; min-height: 76px; }
table.data tbody > tr:last-child > td { border-bottom: 0; }
table.data tbody tr:hover { background-color: color-mix(in srgb, var(--surface-2) 90%, transparent); }
table.data.inline { margin: 0; }
table.data.inline td { padding: 8px 10px; font-size: 13px; }

.cell-user {
  padding-left: 16px !important;
}
.avatar-table {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 999px;
  display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff;
  background: linear-gradient(135deg, #2f7d32 0%, #65a30d 100%);
  box-shadow: inset 0 0 0 2px var(--surface);
}
.avatar-table.color-alt-1 { background: linear-gradient(135deg, #16a34a 0%, #4ade80 100%); }
.avatar-table.color-alt-2 { background: linear-gradient(135deg, #a3e635 0%, #facc15 100%); color: #365314; }
.avatar-table.color-alt-3 { background: linear-gradient(135deg, #ea580c 0%, #f59e0b 100%); }
.avatar-table.color-alt-4 { background: linear-gradient(135deg, #be123c 0%, #f43f5e 100%); }
.avatar-table.color-alt-5 { background: linear-gradient(135deg, #a21caf 0%, #ec4899 100%); }
.cell-user-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cell-user .name-line {
  font-weight: 600; color: var(--fg); font-size: 14px;
  line-height: 1.2; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 280px;
}
.cell-user .sub-line {
  font-size: 12.5px; color: var(--fg-muted); line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px;
}

.cell-assigned-roles {
  /* display flex lives inside .cell-flex.chips wrapper now */
}
.cell-assigned-roles .role-chip {
  font-size: 11px; padding: 3px 9px; line-height: 1.35;
  white-space: nowrap; min-height: 20px;
}
.cell-assigned-roles .empty-placeholder-chip {
  font-size: 11px; padding: 3px 9px; line-height: 1.35;
  min-height: 20px; border-radius: var(--radius-pill);
  color: var(--fg-muted); background: transparent;
  border: 1px dashed color-mix(in srgb, var(--border) 90%, transparent);
  opacity: 0.92;
}

/* IP Whitelist column (BUG3b) */
.cell-ip-wl {
  /* wrapper: .cell-flex.chips inside */
}
.cell-ip-wl .chip-ip-count {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
  padding: 3px 10px; border-radius: var(--radius-pill);
  line-height: 1.35; min-height: 20px;
}
.cell-ip-wl .chip-ip-count.blue {
  background: color-mix(in srgb, #3b82f6 14%, transparent);
  color: #1d4ed8;
  border: 1px solid color-mix(in srgb, #3b82f6 26%, transparent);
}
.cell-ip-wl .chip-ip-count.bypass {
  background: color-mix(in srgb, #8b5cf6 16%, transparent);
  color: #6d28d9;
  border: 1px solid color-mix(in srgb, #8b5cf6 30%, transparent);
}
.cell-ip-wl .chip-ip-count.danger {
  background: var(--danger-soft);
  color: var(--danger-600);
  border: 1px solid color-mix(in srgb, var(--danger) 28%, transparent);
}

.cell-time { min-width: 150px; }
.time-primary { font-weight: 600; font-size: 13.5px; color: var(--fg); line-height: 1.2; }
.time-secondary { margin-top: 3px; font-size: 11.5px; line-height: 1.3; letter-spacing: .005em; }

.cell-actions {
  padding-right: 16px !important;
}
#tbl-users th.actions {
  width: 144px;
  text-align: center;
}
.cell-actions .actions {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; flex-wrap: nowrap; width: 100%;
}
.cell-actions button.icon-btn {
  width: 34px; height: 34px; padding: 0; flex: 0 0 34px;
  display: inline-grid; place-items: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface); color: var(--fg-muted); box-shadow: none;
  font-size: 16px; font-weight: 400; line-height: 1;
}
.cell-actions button.icon-btn:hover:not(:disabled) {
  color: var(--fg); border-color: var(--border-strong); background: var(--surface-2);
}
.cell-actions button.icon-btn.danger {
  background: transparent; color: var(--danger); border-color: var(--border);
  box-shadow: none;
}
.cell-actions button.icon-btn.primary {
  background: transparent; color: var(--primary); border-color: var(--border);
  box-shadow: none;
}
.cell-actions button.icon-btn.danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.cell-actions button.icon-btn.primary:hover { background: var(--primary-soft); border-color: var(--primary); }
.cell-actions button.icon-btn svg {
  width: 18px; height: 18px; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}

.empty-cell { font-size: 13px; color: var(--fg-muted); opacity: 0.8; }
td.actions { white-space: nowrap; text-align: right; padding-right: 16px !important; }
td.actions button {
  margin-left: 0; height: 32px; padding: 0 12px;
  font-size: 12.5px; font-weight: 600; box-shadow: none;
}

/* ---------- CHIPS ---------- */
.chip {
  display: inline-flex; align-items: center;
  padding: 4px 12px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 700; letter-spacing: 0.01em;
}
.chip.role-admin   { background: var(--chip-admin-bg);    color: var(--chip-admin-fg); }
.chip.role-user    { background: var(--chip-user-bg);     color: var(--chip-user-fg); }
.chip.status-enabled  { background: var(--chip-enabled-bg);  color: var(--chip-enabled-fg); }
.chip.status-disabled { background: var(--chip-disabled-bg); color: var(--chip-disabled-fg); }
.chip-dot { width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; display: inline-block; }
.chip.status-enabled  .chip-dot { background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 20%, transparent); }
.chip.status-disabled .chip-dot { background: currentColor; opacity: 0.6; }

/* ---------- PAGER ---------- */
.pager {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; padding: 10px 4px;
  color: var(--fg-muted); font-size: 13px; font-weight: 500;
}
.pager button { padding: 7px 14px; box-shadow: none; }

/* =========================================================
   MODAL (BUG1 fix — theme vars everywhere)
   ========================================================= */
.modal {
  position: fixed; inset: 0;
  background: color-mix(in srgb, var(--fg) 44%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 24px;
  animation: fadeIn .16s ease both;
}
.modal.hidden { display: none; }
.modal-card {
  width: min(600px, 100%); max-height: 90vh; overflow: auto;
  padding: 0; background: var(--surface); color: var(--fg);
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  animation: popIn .2s cubic-bezier(.2,.7,.2,1) both;
  box-shadow: var(--shadow-xl);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 14px 22px;
  border-bottom: 1px solid var(--border);
  background: transparent;
}
.modal-header h3 { font-size: 16.5px; color: var(--fg); font-weight: 700; letter-spacing: -0.005em; }
.modal-header button.link {
  width: 34px; height: 34px; display: inline-grid; place-items: center;
  border-radius: var(--radius-pill); color: var(--fg-muted);
  font-size: 22px; line-height: 1; border: 1px solid transparent; padding: 0;
}
.modal-header button.link:hover {
  background: var(--surface-2); color: var(--fg);
  border-color: var(--border); text-decoration: none;
}
.modal-body { padding: 20px 22px 6px; }
.modal-body .form { display: flex; flex-direction: column; gap: 14px; }
.modal-body .form label {
  font-size: 12.5px; font-weight: 600; color: var(--fg); letter-spacing: 0.005em;
  display: flex; flex-direction: column; gap: 6px; line-height: 1.25;
}
.modal-body .form label input,
.modal-body .form label select,
.modal-body .form label textarea {
  background: var(--surface-2); color: var(--fg);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 11px 14px; font-size: 14px;
}
.modal-body .form label input:focus,
.modal-body .form label select:focus,
.modal-body .form label textarea:focus {
  background: var(--surface); border-color: var(--primary); box-shadow: var(--ring);
}

.edit-section-title { font-size: 14px; font-weight: 700; margin: 0; }
.assigned-roles-section {
  margin-top: 6px; padding-top: 20px; border-top: 1px solid var(--border);
}
.role-help, .role-context {
  color: var(--fg-muted); font-size: 12px; font-weight: 400; line-height: 1.55;
  margin: 6px 0 12px;
}
.role-context {
  padding: 10px 12px; background: var(--surface-2); border-radius: 8px;
  border-left: 2px solid var(--primary);
}
.assigned-role-list { display: grid; gap: 8px; }
.modal-body .form label.assigned-role-card {
  flex-direction: row; align-items: flex-start; gap: 12px; padding: 14px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface-2); cursor: pointer;
}
.modal-body .form label.assigned-role-card:hover { border-color: var(--primary); }
.modal-body .form label.assigned-role-card.is-selected {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 6%, var(--surface));
}
.modal-body .form label.assigned-role-card.is-disabled { opacity: .6; cursor: not-allowed; }
.modal-body .form label.assigned-role-card input {
  width: 18px; height: 18px; flex: 0 0 18px; padding: 0; margin: 2px 0 0;
}
.assigned-role-content { flex: 1; min-width: 0; }
.assigned-role-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.assigned-role-heading b { font-size: 14px; }
.assignment-state {
  margin-left: auto; font-size: 11px; font-weight: 500; padding: 3px 8px;
  border-radius: 5px; background: var(--surface-3); color: var(--fg-muted);
}
.is-selected .assignment-state { color: var(--primary); background: var(--primary-soft); }
.role-description {
  display: block; margin-top: 6px; font-size: 12px; font-weight: 400;
  color: var(--fg-muted); line-height: 1.55;
}
.modal-body .form label.io-radio { flex-direction: row; align-items: flex-start; gap: 10px; }
.modal-body .form label.io-radio input { flex: 0 0 auto; padding: 0; margin-top: 3px; }

/* Confirm modal (BUG2) */
.confirm-body { padding: 22px 22px 8px; }
.confirm-message {
  font-size: 14px; color: var(--fg); line-height: 1.55; margin: 4px 0 0;
}
.confirm-message .danger-quip {
  display: block; margin-top: 8px;
  padding: 10px 12px; border-radius: var(--radius-md);
  background: var(--danger-soft); color: var(--danger-600);
  border: 1px solid color-mix(in srgb, var(--danger) 20%, transparent);
  font-weight: 500; font-size: 13px;
}

/* Edit User IP Whitelist Override section (BUG3c) */
.ip-override-section {
  margin-top: 10px; padding-top: 14px;
  border-top: 1px dashed var(--border);
  display: flex; flex-direction: column; gap: 12px;
}
.ip-override-section .io-title {
  font-size: 12.5px; font-weight: 700; color: var(--fg);
  letter-spacing: 0.01em; text-transform: uppercase;
}
.ip-override-section .io-sub {
  font-size: 12px; color: var(--fg-muted); line-height: 1.5; margin-top: -4px;
}
.ip-override-radios { display: grid; grid-template-columns: 1fr; gap: 8px; }
.io-radio {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: var(--surface-2); cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
}
.io-radio:hover { border-color: var(--border-strong); }
.io-radio.checked {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
  background: color-mix(in srgb, var(--primary) 6%, var(--surface-2));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 10%, transparent);
}
.io-radio input { margin-top: 3px; }
.io-radio .io-radio-label { font-size: 13px; font-weight: 600; color: var(--fg); }
.io-radio .io-radio-desc { font-size: 12px; color: var(--fg-muted); margin-top: 2px; line-height: 1.45; }
.ip-ips-input-wrap { display: flex; flex-direction: column; gap: 6px; }
.ip-ips-input-wrap textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; min-height: 72px; padding: 10px 12px; resize: vertical;
}

p.row-actions {
  margin: 18px 0 0;
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 0 22px 20px;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- TOAST ---------- */
.toast {
  position: fixed; bottom: 28px; right: 28px;
  padding: 12px 16px; border-radius: var(--radius-md);
  color: #fff; background: linear-gradient(135deg, #0f172a, #1e293b);
  box-shadow: var(--shadow-lg); z-index: 200;
  max-width: 440px; font-weight: 500; font-size: 13.5px;
  border: 1px solid rgba(255,255,255,0.06);
  animation: toastIn .25s ease both;
}
.toast.err { background: linear-gradient(135deg, var(--danger), var(--danger-hover)); border-color: transparent; }
.toast.ok  { background: linear-gradient(135deg, var(--success), #10b981); border-color: transparent; }
.toast.hidden { display: none; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Empty / loading rows ---------- */
.loading-row td {
  color: var(--fg-muted); text-align: center;
  padding: 24px !important; font-weight: 500;
}

/* ---------- Password strength checklist ---------- */
.pw-checklist-wrap { margin: -4px 0 8px 0; }
.pw-checklist {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 10px 12px;
}
.pw-bar {
  height: 6px; background: var(--surface-3);
  border-radius: var(--radius-pill); overflow: hidden; margin-bottom: 10px;
}
.pw-bar-fill {
  height: 100%; width: 0%;
  background: var(--border-strong); border-radius: var(--radius-pill);
  transition: width 0.2s ease, background-color 0.2s ease;
}
.pw-bar-fill.weak   { width: 40%; background: var(--danger); }
.pw-bar-fill.strong { width: 100%; background: var(--success); }
.pw-rule { font-size: 12.5px; line-height: 1.6; color: var(--fg-muted); }
.pw-rule.ok  { color: var(--success); font-weight: 500; }
.pw-rule.bad { color: var(--danger); }

/* ---------- Cards, spacing, helpers ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.card.role-detail { margin-top: 20px; }
.card .modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--border);
  background: transparent;
}
.card .modal-header h3 { margin: 0; }
.reset-result { margin-top: 16px; }
.mb16 { margin-bottom: 16px; }
.mt16 { margin-top: 16px; }
.ml8  { margin-left: 8px; }
.row.items-center { align-items: center; }
.hidden { display: none !important; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }

/* ---------- Sub-tabs (Audit) ---------- */
.subtabs {
  display: flex; gap: 4px; border-bottom: 1px solid var(--border);
  margin-bottom: 14px; padding: 0;
}
.subtabs .subtab {
  padding: 9px 14px; border: 0; background: transparent;
  color: var(--fg-muted); font-weight: 600; font-size: 13px;
  border-bottom: 2px solid transparent;
  border-radius: 0; margin-bottom: -1px; box-shadow: none;
}
.subtabs .subtab:hover:not(.active) { color: var(--fg); }
.subtabs .subtab.active {
  color: var(--primary); border-bottom-color: var(--primary);
}
.subtab-panel { display: none; }
.subtab-panel.active { display: block; }

/* ---------- IP Whitelist Settings tab ---------- */
#tab-settings { max-width: 1180px; margin: 0 auto; }
.settings-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 8px 0 10px; }
.settings-eyebrow { color: var(--fg-muted); font-size: 10px; letter-spacing: .14em; font-weight: 700; margin-bottom: 8px; }
.settings-heading h2 { font-size: 26px; }
.settings-heading p { margin: 6px 0 0; }
.settings-default { color: var(--fg-muted); border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; font-size: 12px; white-space: nowrap; }
#tab-settings .card { padding: 24px; box-shadow: none; border-radius: 14px; }
.settings-access { margin-bottom: 22px; }
.settings-card-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
.settings-card-head > div { flex: 1; min-width: 0; }
.settings-card-head p { margin: 6px 0 0; line-height: 1.6; }
.settings-symbol { display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; color: var(--primary); background: var(--primary-soft); border-radius: 12px; }
.settings-symbol svg { width: 24px; height: 24px; }
.settings-switch { position: relative; align-self: center; flex-shrink: 0; }
#tab-settings .settings-switch input { right: 0; top: 0; width: 44px; height: 24px; margin: 0; z-index: 1; cursor: pointer; }
.settings-access-note { padding: 16px 18px; border-left: 3px solid var(--primary); background: var(--surface-2); border-radius: 0 8px 8px 0; color: var(--fg); font-size: 13px; line-height: 1.7; }
.settings-enable-options { margin-top: 20px; max-width: 620px; }
.settings-enable-options p { margin: 8px 0 0; }
.settings-save-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--border); margin-top: 20px; padding-top: 16px; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 22px; align-items: start; }
#tab-settings label:not(.switch-wrap) { display: block; font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.settings-input-row { display: flex; gap: 10px; margin-bottom: 18px; }
#tab-settings input:not([type="checkbox"]), #tab-settings select, #tab-settings textarea { width: 100%; min-width: 0; font-size: 13px; }
.settings-input-row input { flex: 1; }
.settings-input-row button { flex-shrink: 0; white-space: nowrap; }
#tab-settings button { box-shadow: none; font-size: 12px; border-radius: 8px; }
#tab-settings button.primary { background: var(--primary); }
#tab-settings button.primary:hover:not(:disabled) { background: var(--primary-600); filter: none; color: #fff; }
#tab-settings button:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.settings-count { display: inline-block; margin-left: 5px; padding: 1px 7px; border-radius: 6px; color: var(--fg-muted); background: var(--surface-3); font-size: 11px; vertical-align: middle; }
.settings-table-wrap { overflow-x: auto; }
#tbl-globalwl { box-shadow: none; margin: 0; table-layout: auto; }
#tbl-globalwl th { padding: 11px 12px; font-size: 10px; }
#tbl-globalwl td { padding: 12px; overflow-wrap: anywhere; }
#tbl-globalwl th.actions { width: 75px; }
#tbl-globalwl button.danger { background: var(--danger-soft); color: var(--chip-disabled-fg); box-shadow: none; }
.settings-empty td { text-align: center; height: 136px; }
.settings-empty strong { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.settings-empty span { display: block; max-width: 290px; margin: auto; font-size: 12px; color: var(--fg-muted); line-height: 1.7; }
.settings-hint { font-size: 12px; line-height: 1.7; margin: 0; }
#user-ov-card { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
#user-ov-card table { table-layout: auto; }
.switch-wrap input:focus-visible + .slider { outline: 2px solid var(--primary); outline-offset: 4px; }
.switch-wrap input:disabled + .slider { opacity: .5; cursor: not-allowed; }
@media (max-width: 900px) {
  .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .settings-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
}
@media (max-width: 520px) {
  #tab-settings .card { padding: 18px; }
  .settings-symbol { display: none; }
  .settings-card-head { flex-wrap: wrap; }
  .settings-input-row { flex-wrap: wrap; }
  .settings-input-row input { flex-basis: 100%; }
  .settings-save-row { align-items: flex-start; flex-direction: column; }
}
.hc-output {
  margin-top: 12px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 14px 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px; line-height: 1.55; color: var(--fg);
  white-space: pre-wrap; max-height: 240px; overflow: auto;
}
.hc-output.hidden { display: none; }

/* ---------- Switch (used in settings tab + dropdown) ---------- */
.switch-wrap {
  display: inline-flex; align-items: center; gap: 10px;
  cursor: pointer;
  padding: 0; background: transparent; border: 0; box-shadow: none;
}
.switch-wrap input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-wrap .slider {
  position: relative; display: inline-block;
  width: 44px; height: 24px;
  background: var(--border-strong); border-radius: var(--radius-pill);
  transition: background-color .18s ease;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.08);
}
.switch-wrap .slider::before {
  content: ""; position: absolute; left: 2px; top: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff;
  transition: transform .18s cubic-bezier(.2,.7,.2,1), box-shadow .15s ease;
  box-shadow: 0 2px 6px rgba(15,23,42,0.18);
}
.switch-wrap input:checked + .slider { background: var(--primary); }
.switch-wrap input:checked + .slider::before { transform: translateX(22px); box-shadow: 0 2px 6px rgba(15,23,42,0.22); }
.switch-wrap .chip { margin: 0; }
