/* ─────────────────────────────────────────
   Duatetes Back Office — Styles
   ─────────────────────────────────────────

   DESIGN TOKENS
   All sizing, spacing, and colour comes from
   these variables. Nothing else is hardcoded.
───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:root {
  /* Colour */
  --bg:             #0f1117;
  --surface:        #1a1d27;
  --border:         #2a2d3a;
  --primary:        #6c63ff;
  --primary-hover:  #574fd6;
  --text:           #e2e8f0;
  --muted:          #6b7280;
  --success:        #10b981;
  --warning:        #f59e0b;
  --danger:         #ef4444;
  --wa:             #128C7E;
  --wa-hover:       #075E54;

  /* Spacing scale — use ONLY these, no arbitrary px */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 28px;
  --sp-8: 32px;

  /* Button height scale — buttons are sized by height, never by padding alone */
  --btn-h-sm: 32px;   /* table row actions */
  --btn-h-md: 36px;   /* form inline actions */
  --btn-h-lg: 40px;   /* section-level CTAs */

  /* Button font sizes tied to height */
  --btn-fs-sm: 0.78rem;
  --btn-fs-md: 0.875rem;
  --btn-fs-lg: 0.9rem;

  /* Button horizontal padding tied to height */
  --btn-px-sm: var(--sp-3);
  --btn-px-md: var(--sp-4);
  --btn-px-lg: var(--sp-5);

  /* Input height — matches btn-md so inline pairings align */
  --input-h: 36px;

  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Typography */
  --fs-xs:   0.75rem;
  --fs-sm:   0.8rem;
  --fs-base: 0.875rem;
  --fs-md:   0.95rem;
  --fs-lg:   1rem;
  --fs-xl:   1.1rem;
  --fs-2xl:  1.25rem;
}

/* ── Base ─────────────────────────────── */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: var(--fs-base);
  line-height: 1.5;
}

/* ── PIN Gate ─────────────────────────── */
.pin-gate {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.pin-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  text-align: center;
}

.pin-card__logo { font-size: 3rem; line-height: 1; }
.pin-card__title { font-size: var(--fs-2xl); font-weight: 700; margin-top: var(--sp-1); }
.pin-card__sub   { font-size: var(--fs-sm); color: var(--muted); }

.pin-dots {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
}

/* Each digit is a square box */
.pin-dot {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: var(--fs-2xl);
  font-weight: 700;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  outline: none;
  caret-color: transparent;
  transition: border-color 0.15s;
  /* hide the actual character, show a dot */
  -webkit-text-security: disc;
}
.pin-dot:focus { border-color: var(--primary); }
.pin-dot.filled { border-color: var(--primary); }
.pin-dot.error  { border-color: var(--danger) !important; }

.pin-error {
  color: var(--danger);
  font-size: var(--fs-sm);
  min-height: 20px;
}

/* Shake animation on wrong PIN */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-8px); }
  40%       { transform: translateX(8px); }
  60%       { transform: translateX(-6px); }
  80%       { transform: translateX(6px); }
}
.pin-dots.shake { animation: shake 0.4s ease; }

/* ── App shell ────────────────────────── */
body { overflow: hidden; }   /* sidebar layout: no body scroll */

#app {
  display: flex;
  height: 100vh;
}

/* ── Sidebar ──────────────────────────── */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: var(--sp-5) var(--sp-3);
  gap: var(--sp-6);
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 0 var(--sp-2);
}
.sidebar__logo { font-size: 1.4rem; line-height: 1; }
.sidebar__name { font-size: var(--fs-lg); font-weight: 700; letter-spacing: -0.3px; }

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

/* Nav buttons — full width, left-aligned, icon + label */
.nav__btn {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  height: var(--btn-h-lg);
  padding: 0 var(--sp-3);
  background: none;
  border: none;
  color: var(--muted);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: var(--fs-base);
  font-weight: 500;
  text-align: left;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.nav__btn:hover { background: var(--border); color: var(--text); }
.nav__btn--active { background: var(--primary); color: #fff; font-weight: 600; }
.nav__btn--active .nav__icon { opacity: 1; }

.nav__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.6;
}
.nav__btn--active .nav__icon,
.nav__btn:hover .nav__icon { opacity: 1; }

/* ── Main content area ────────────────── */
.main {
  flex: 1;
  overflow-y: auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

/* ── Sections ─────────────────────────── */
.section { padding: var(--sp-7) var(--sp-7); max-width: 1100px; }

/* Home fills full main area and centers content */
#section-home {
  flex: 1;
  max-width: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-7);
}

.section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-5);
  gap: var(--sp-3);
}
.section__header h2 { font-size: var(--fs-2xl); font-weight: 700; }

/* Search bar in section headers */
.search-input {
  height: var(--btn-h-md);
  padding: 0 var(--sp-3);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: var(--fs-sm);
  outline: none;
  width: 220px;
  flex-shrink: 0;
  transition: border-color 0.15s;
  margin-left: auto;   /* push to right, away from h2 */
}
.search-input:focus { border-color: var(--primary); }
/* clear button in search (webkit) */
.search-input::-webkit-search-cancel-button { cursor: pointer; }


/* ── Card ─────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5) var(--sp-6);
  margin-bottom: var(--sp-5);
}
.card h3 { font-size: var(--fs-md); font-weight: 600; margin-bottom: var(--sp-4); }

/* ── BUTTONS ──────────────────────────────────────────────────────
   RULE: height is fixed, padding only controls horizontal space.
   RULE: all modifiers stack on top of .btn base.
   RULE: --sm is for table rows, --md for forms, --lg for section CTAs.
──────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  height: var(--btn-h-lg);            /* default = lg */
  padding: 0 var(--btn-px-lg);
  border-radius: var(--radius-md);
  border: none;
  font-size: var(--btn-fs-lg);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;                     /* never let a button squish */
}

/* Size modifiers — override height + padding + font-size together */
.btn--sm {
  height: var(--btn-h-sm);
  padding: 0 var(--btn-px-sm);
  font-size: var(--btn-fs-sm);
  border-radius: var(--radius-sm);
}
.btn--md {
  height: var(--btn-h-md);
  padding: 0 var(--btn-px-md);
  font-size: var(--btn-fs-md);
}

/* Colour variants */
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-hover); }
.btn--ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn--ghost:hover { color: var(--text); border-color: var(--text); }
.btn--success { background: var(--success); color: #fff; }
.btn--success:hover { filter: brightness(1.1); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { filter: brightness(1.1); }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: var(--wa-hover); }

.btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

/* ── Table action cells ───────────────────
   RULE: every button inside .actions-cell
   is forced to --sm height. No exceptions.
──────────────────────────────────────────── */
.actions-cell {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.actions-cell .btn {
  height: var(--btn-h-sm) !important;
  padding: 0 var(--btn-px-sm) !important;
  font-size: var(--btn-fs-sm) !important;
  border-radius: var(--radius-sm) !important;
}

/* ── INPUTS ───────────────────────────────
   RULE: all text/number inputs share the
   same height as --btn-h-md so they line
   up when placed side-by-side with buttons.
──────────────────────────────────────────── */
input[type=text],
input[type=tel],
input[type=number],
input[type=email] {
  height: var(--input-h);
  padding: 0 var(--sp-3);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: var(--fs-base);
  outline: none;
  transition: border-color 0.15s;
}
input[type=text]:focus,
input[type=tel]:focus,
input[type=number]:focus { border-color: var(--primary); }

/* ── Modal ────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  backdrop-filter: blur(3px);
  padding: var(--sp-4);
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  width: 360px;
  height: 360px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
}
.modal h3 {
  font-size: var(--fs-lg);
  font-weight: 700;
  margin-bottom: 4px;
  text-align: center;
}
.modal-sub {
  color: var(--muted);
  font-size: var(--fs-xs);
  margin-bottom: 14px;
  line-height: 1.4;
  text-align: center;
}

/* Every step panel fills the modal height so margin-top:auto pins buttons to bottom */
#step-input, #step-success,
#redeem-step-input, #redeem-step-confirm, #redeem-step-done {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
}

/* Phone field */
.phone-field {
  display: flex;
  align-items: center;
  height: var(--input-h);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.15s;
}
.phone-field:focus-within { border-color: var(--primary); }
.phone-prefix {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 var(--sp-3);
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: 600;
  border-right: 1px solid var(--border);
  background: var(--surface);
  white-space: nowrap;
  flex-shrink: 0;
}
.phone-input {
  flex: 1;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  padding: 0 var(--sp-3);
  color: var(--text);
  font-size: var(--fs-base);
}

/* Reserved error line — always occupies space, visibility toggles */
.modal-reserved-error {
  color: var(--danger);
  font-size: var(--fs-xs);
  height: 16px;
  line-height: 16px;
  margin-top: 4px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
.modal-reserved-error.visible { opacity: 1; }

/* Fixed-height slot: name field OR badge — never shifts layout */
.modal-slot {
  position: relative;
  height: 80px;
  margin-top: 10px;
  flex-shrink: 0;
}
.slot-panel {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
}
.slot-panel.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Field label */
.field-label {
  font-size: var(--fs-xs);
  color: var(--muted);
  margin: 0;
  flex-shrink: 0;
}

/* Text input inside modal */
.modal-text-input { width: 100%; flex-shrink: 0; }

/* Customer badge */
.customer-badge {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0 var(--sp-3);
  background: #1a2e1a;
  border: 1px solid var(--success);
  border-radius: var(--radius-md);
  font-size: var(--fs-xs);
  color: var(--success);
  height: 34px;
  width: 100%;
  flex-shrink: 0;
}
.badge-clear {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  padding: 2px 4px;
  border-radius: 4px;
  line-height: 1;
  flex-shrink: 0;
}
.badge-clear:hover { color: var(--danger); }

/* ── Suggestions — position:fixed, floats above everything ───── */
.suggestions {
  position: fixed;
  z-index: 9999;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  overflow: hidden;
  max-height: 200px;
  overflow-y: auto;
}
.suggestion-item {
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background: var(--border); }
.suggestion-item__name  { font-size: var(--fs-sm); font-weight: 600; color: var(--text); }
.suggestion-item__phone { font-size: var(--fs-xs); color: var(--muted); font-family: 'SF Mono', monospace; margin-top: 1px; }

/* Modal actions — pinned to bottom, centered */
.modal-actions {
  display: flex;
  gap: var(--sp-2);
  margin-top: auto;
  padding-top: 12px;
  justify-content: center;
}
.modal-actions .btn { min-width: 120px; }

/* General field error (outside modal) */
.field-error { color: var(--danger); font-size: var(--fs-sm); }

/* Success step */
#step-success {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 12px;
  flex: 1;
  justify-content: center;
}
.success-icon { font-size: 2rem; line-height: 1; }
.coupon-code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #fff;
  background: var(--primary);
  border-radius: var(--radius-md);
  padding: 10px var(--sp-5);
  width: 100%;
  text-align: center;
}

/* Redeem step-done — centered column */
#redeem-step-done {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 12px; flex: 1; justify-content: center;
}

/* Prize highlight card */
.prize-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 12px 0 10px;
  padding: 18px 20px;
  background: linear-gradient(145deg, #0d2b18, #0a1f12);
  border: 1px solid var(--success);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 18px rgba(16,185,129,0.15);
}
.prize-card__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--success);
  text-transform: uppercase;
}
.prize-card__name {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  text-align: center;
  line-height: 1.3;
}

/* Customer info rows */
.redeem-who {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.redeem-who__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.redeem-who__icon {
  font-size: 13px;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
  line-height: 1;
}
.redeem-who__text {
  font-size: var(--fs-sm);
  color: var(--text);
  font-weight: 500;
}

/* ── Tables ───────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  max-width: 960px;
  margin: 0 auto;
}
table { width: 100%; border-collapse: collapse; }
thead { background: var(--surface); }
th {
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 7px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-family: 'SF Mono', monospace;
  vertical-align: middle;
}
td.normal { font-family: inherit; font-size: 12px; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface); }
.empty {
  color: var(--muted);
  text-align: center;
  padding: var(--sp-8) !important;
  font-family: inherit !important;
  font-size: var(--fs-sm) !important;
}

/* ── Pagination ───────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: var(--sp-4) 0 var(--sp-2);
  max-width: 960px;
  margin: 0 auto;
}
.pagination__info {
  font-size: var(--fs-xs);
  color: var(--muted);
  min-width: 140px;
  text-align: center;
}

/* ── Home page ────────────────────────── */
.home-header {
  margin-bottom: var(--sp-6);
  text-align: center;
}
.home-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: var(--sp-1);
}

.home-cards {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  width: 460px;
}

.home-card {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  width: 100%;
  padding: var(--sp-5) var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
  color: var(--text);
}
.home-card:hover {
  border-color: var(--primary);
  background: #1e2133;
  transform: translateX(4px);
}
.home-card:active { transform: translateX(2px); }

.home-card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.home-card__body {
  flex: 1;
  min-width: 0;
}
.home-card__body h3 {
  font-size: var(--fs-lg);
  font-weight: 600;
  margin-bottom: var(--sp-1);
}
.home-card__body p {
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.4;
}

.home-card__arrow {
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.15s, color 0.15s;
}
.home-card:hover .home-card__arrow {
  color: var(--primary);
  transform: translateX(3px);
}

/* ── Badges ───────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 var(--sp-2);
  border-radius: 20px;
  font-size: var(--fs-xs);
  font-weight: 600;
  font-family: inherit;
  white-space: nowrap;
}
.badge--pending  { background: #1e293b; color: var(--muted); }
.badge--won      { background: #1e3a5f; color: #60a5fa; }
.badge--redeemed { background: #064e3b; color: var(--success); }

/* ── Prize Add Form ───────────────────────
   RULE: all inline form elements align to
   the same height (--input-h / --btn-h-md).
──────────────────────────────────────────── */
.prize-add-form {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

/* Name input stretches, others are fixed-size */
.prize-add-form input[type=text] { flex: 1; min-width: 180px; }

/* Percentage spinner */
.pct-field {
  display: flex;
  align-items: center;
  height: var(--input-h);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg);
  flex-shrink: 0;
}
.pct-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 100%;
  background: var(--surface);
  border: none;
  color: var(--text);
  cursor: pointer;
  font-size: var(--fs-xs);
  user-select: none;
  transition: background 0.1s;
  flex-shrink: 0;
}
.pct-btn:hover { background: var(--border); }
.pct-field input[type=number] {
  width: 52px;
  height: 100%;
  text-align: center;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: var(--fs-base);
  padding: 0;
  -moz-appearance: textfield;
}
.pct-field input[type=number]::-webkit-inner-spin-button,
.pct-field input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; }
.pct-label { padding: 0 var(--sp-2) 0 0; color: var(--muted); font-size: var(--fs-sm); flex-shrink: 0; }

/* Inline prize edit row in table */
.prize-edit-row { display: flex; align-items: center; gap: var(--sp-2); }
.prize-name-input { width: 100%; }    /* inherits input height from global rule */

/* ── Emoji picker ─────────────────────── */
.icon-picker-wrap { position: relative; flex-shrink: 0; }
.emoji-trigger {
  width: var(--input-h);
  height: var(--input-h);
  font-size: 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s;
  line-height: 1;
  flex-shrink: 0;
}
.emoji-trigger:hover { border-color: var(--primary); }
.emoji-popover {
  position: absolute;
  top: calc(100% + var(--sp-2));
  left: 0;
  z-index: 200;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
emoji-picker {
  --background: #1a1d27;
  --border-color: #2a2d3a;
  --button-active-background: #2a2d3a;
  --button-hover-background: #2a2d3a;
  --emoji-size: 1.3rem;
  --input-border-color: #2a2d3a;
  --input-font-color: #e2e8f0;
  --input-placeholder-color: #6b7280;
  --outline-color: #6c63ff;
  --search-background: #0f1117;
  --indicator-color: #6c63ff;
  height: 340px;
  width: 310px;
}

/* Small icon cell in table rows */
.icon-input {
  width: 36px;
  height: 30px;
  text-align: center;
  font-size: 1.1rem;
  padding: 0;
  border-radius: var(--radius-sm);
}

/* ── Toggle switch ────────────────────── */
.toggle { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle__track {
  width: 36px; height: 20px;
  background: var(--border);
  border-radius: 20px;
  transition: background 0.2s;
  position: relative;
}
.toggle__track::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 14px; height: 14px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.toggle input:checked + .toggle__track { background: var(--success); }
.toggle input:checked + .toggle__track::after { transform: translateX(16px); }

/* Inactive row dimming */
.row--inactive td { opacity: 0.4; }

/* Hint text */
.hint { font-size: var(--fs-xs); color: var(--muted); }
