/* Preserve the existing light palette and page geometry. */
:root { color-scheme: light; }
.sidebar { overflow-y: auto; }
.sidebar-bottom { margin-top: auto; padding-top: 20px; }
.sidebar-bottom .sidebar-account { margin-top: 18px; }
.theme-switch { display: flex; gap: 4px; padding: 4px; border: 1px solid #3b4b63; border-radius: 9px; background: #0d1729; }
.theme-option { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 7px 10px; border: 0; border-radius: 6px; color: #c7d5e8; background: transparent; font-size: 13px; font-weight: 600; }
.theme-option svg.lucide { width: 16px; height: 16px; }
.theme-option:hover { background: #25354e; }
.theme-option[aria-pressed="true"] { color: #13213a; background: #edf4ff; }

/* Option 2's graphite/amber colors, without its top-navigation redesign. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #181b1f;
  --ink: #f1eee6;
  --muted: #bec6ce;
  --line: #434a53;
  --blue: #e5b65c;
  --blue-dark: #f0c879;
  --blue-soft: #3b321f;
  --green: #9cddbb;
  --green-soft: #213c31;
  --amber: #f0ca7f;
  --amber-soft: #3c311e;
  --red: #ffafb7;
  --red-soft: #40282e;
  --slate: #d5dbe2;
}
[data-theme="dark"] .sidebar { background: #11161b; color: #dce1e7; }
[data-theme="dark"] .brand { color: #f5f1e8; }
[data-theme="dark"] .brand svg,
[data-theme="dark"] .sidebar-account svg { color: var(--blue); }
[data-theme="dark"] .brand-sub,
[data-theme="dark"] .sidebar-account a { color: #bcc6d2; }
[data-theme="dark"] .sidebar-account strong { color: var(--ink); }
[data-theme="dark"] .nav-link { color: #c7d0da; }
[data-theme="dark"] .nav-link:hover { color: var(--ink); background: #272d34; }
[data-theme="dark"] .nav-link.active { color: #ffe0a2; background: #3b321f; }
[data-theme="dark"] .nav-divider { background: var(--line); }
[data-theme="dark"] .sidebar-account { border-color: var(--line); }
[data-theme="dark"] .utility-bar,
[data-theme="dark"] .surface,
[data-theme="dark"] .card,
[data-theme="dark"] .prize-card,
[data-theme="dark"] .consolation-item,
[data-theme="dark"] .auth-card { background: #24282e; border-color: var(--line); }
[data-theme="dark"] .control,
[data-theme="dark"] .input,
[data-theme="dark"] .note-textarea,
[data-theme="dark"] textarea,
[data-theme="dark"] .button,
[data-theme="dark"] .btn,
[data-theme="dark"] .page-link,
[data-theme="dark"] .icon-button,
[data-theme="dark"] .bell-btn,
[data-theme="dark"] dialog { background: #242a31; border-color: #515a65; color: var(--ink); }
[data-theme="dark"] .control::placeholder,
[data-theme="dark"] .input::placeholder,
[data-theme="dark"] textarea::placeholder { color: #a9b2bd; }
[data-theme="dark"] .control:disabled { background: #20252b; color: var(--muted); }
[data-theme="dark"] :is(.control, .input, textarea):focus { border-color: var(--blue); }
[data-theme="dark"] .field-label,
[data-theme="dark"] .label,
[data-theme="dark"] label.field > span:first-child { color: #ccd3dc; }
[data-theme="dark"] .table th,
[data-theme="dark"] .tbl th { color: #d0d7df; background: #2c323a; border-color: var(--line); }
[data-theme="dark"] .table td,
[data-theme="dark"] .tbl td { color: var(--ink); border-color: #3b424b; }
[data-theme="dark"] .table tbody tr:hover,
[data-theme="dark"] .tbl tbody tr:hover,
[data-theme="dark"] .button:hover,
[data-theme="dark"] .btn:hover,
[data-theme="dark"] .page-link:hover { background: #303741; color: var(--ink); }
[data-theme="dark"] .button-primary,
[data-theme="dark"] .btn-primary { color: #1b1d20; background: var(--blue); border-color: var(--blue); }
[data-theme="dark"] .button-primary:hover,
[data-theme="dark"] .btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #1b1d20; }
[data-theme="dark"] .row-action { color: var(--blue); background: var(--blue-soft); border-color: #836c3d; }
[data-theme="dark"] .badge,
[data-theme="dark"] .status-badge { color: #d5dbe2; background: #36404c; }
[data-theme="dark"] :is(.badge-success, .status-active, .badge-green) { color: var(--green); background: var(--green-soft); }
[data-theme="dark"] :is(.badge-warning, .status-n2) { color: var(--amber); background: var(--amber-soft); }
[data-theme="dark"] :is(.badge-danger, .status-n3) { color: var(--red); background: var(--red-soft); }
[data-theme="dark"] :is(.badge-blue, .status-n1) { color: var(--blue); background: var(--blue-soft); }
[data-theme="dark"] .button-danger { color: var(--red); background: var(--red-soft); border-color: #87505c; }
[data-theme="dark"] .button-danger:hover { background: #57323b; }
[data-theme="dark"] .status-omg { color: #d2d7df; background: #363e49; }
[data-theme="dark"] .flash { color: #f4d292; background: #3a311f; border-color: #78623a; }
[data-theme="dark"] .notice { color: #f1d39c; background: var(--amber-soft); border-color: #806b41; }
[data-theme="dark"] .notice.error { color: var(--red); background: var(--red-soft); border-color: #87505c; }
[data-theme="dark"] .bell-btn.needs-action { color: var(--amber); background: var(--amber-soft); border-color: #806b41; }
[data-theme="dark"] .bell-btn.off { color: var(--muted); background: #20252b; }
[data-theme="dark"] .prize-card.first { background: #30291e; border-color: #8e703c; }
[data-theme="dark"] .message-preview { background: #20262d; border-color: var(--line); }
[data-theme="dark"] .code-output { background: var(--blue-soft); border-color: #836c3d; }
[data-theme="dark"] .theme-switch { background: #191e24; border-color: var(--line); }
[data-theme="dark"] .theme-option { color: #c7d0da; }
[data-theme="dark"] .theme-option:hover { background: #303741; }
[data-theme="dark"] .theme-option[aria-pressed="true"] { color: #1b1d20; background: var(--blue); }
[data-theme="dark"] :is(button, a, input, select, textarea):focus-visible { outline-color: var(--blue); }
[data-theme="dark"] dialog::backdrop { background: #0009; }

/* Draw Results is the only redesigned content layout. Customer numbers are not displayed. */
.draw-prize-ledger { display: grid; gap: 12px; }
.draw-prize-row { display: grid; grid-template-columns: 180px 150px minmax(160px, 1fr); gap: 24px; align-items: center; padding: 14px 24px; background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.draw-prize-row.first { padding-block: 20px; background: #fff9eb; border-color: #ceab66; }
.draw-prize-name { display: flex; align-items: center; gap: 12px; }
.draw-prize-name svg { color: var(--slate); width: 26px; height: 26px; }
.draw-prize-row.first .draw-prize-name svg { color: #9c660d; }
.draw-prize-amount { padding-left: 24px; border-left: 1px solid var(--line); font-size: 30px; line-height: 1.2; letter-spacing: -.03em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.draw-prize-row.first .draw-prize-amount { font-size: 36px; }
.draw-winning-code { min-width: 0; font-size: 24px; font-weight: 700; letter-spacing: .02em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.draw-consolation-section .section-head { padding-block: 14px; border-bottom: 0; }
.draw-consolation-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px 12px; margin: 0; padding: 0 20px 18px; list-style: none; }
.draw-consolation-row { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; }
.draw-position { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.draw-consolation-row .code { font-size: 16px; overflow-wrap: anywhere; white-space: normal; }
[data-theme="dark"] .draw-prize-row { background: #242a31; }
[data-theme="dark"] .draw-prize-row.first { background: #302a1e; border-color: #a38343; }
[data-theme="dark"] .draw-prize-row.first .draw-prize-name svg { color: var(--blue); }
@media (max-width: 1350px) {
  .draw-consolation-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .draw-prize-row { grid-template-columns: minmax(0, 1fr) auto; gap: 18px; }
  .draw-prize-amount { border: 0; padding-left: 0; text-align: right; }
  .draw-winning-code { grid-column: 1; }
}
@media (max-width: 680px) {
  .draw-prize-row { padding: 20px 16px; gap: 16px; }
  .draw-prize-amount { font-size: 27px; }
  .draw-winning-code { font-size: 21px; }
  .draw-prize-name h2 { font-size: 15px; }
  .draw-prize-name svg { width: 22px; height: 22px; }
  .draw-consolation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-inline: 12px; }
  .draw-consolation-row { gap: 8px; padding: 10px; }
}
@media (max-width: 360px) {
  .draw-consolation-grid { grid-template-columns: 1fr; }
}
