/* Light theme — milky surfaces, ink text, stronger field borders. Loaded always; active when html[data-theme="light"]. */

html[data-theme="light"] {
  color-scheme: light;
  background: #efe9df;
}

html[data-theme="light"] body {
  background-color: #efe9df !important;
  color: #1c1b19 !important;
}

/* —— Tailwind utility remaps —— */
html[data-theme="light"] .bg-ink-950,
html[data-theme="light"] .bg-ink-900,
html[data-theme="light"] .bg-ink-800,
html[data-theme="light"] .bg-\[\#0c0c0d\],
html[data-theme="light"] .bg-\[\#09090b\] {
  background-color: #efe9df !important;
}

html[data-theme="light"] .bg-black\/60 {
  background-color: rgba(28, 27, 25, 0.42) !important;
}

html[data-theme="light"] .text-white,
html[data-theme="light"] .text-zinc-100,
html[data-theme="light"] .text-zinc-200,
html[data-theme="light"] .text-zinc-300 {
  color: #1c1b19 !important;
}

html[data-theme="light"] .text-zinc-400 {
  color: #5c574e !important;
}

html[data-theme="light"] .text-zinc-500 {
  color: #6f695e !important;
}

html[data-theme="light"] .text-zinc-600 {
  color: #857e70 !important;
}

html[data-theme="light"] .text-zinc-700 {
  color: #9a9284 !important;
}

html[data-theme="light"] a.hover\:text-white:hover,
html[data-theme="light"] button.hover\:text-white:hover,
html[data-theme="light"] .hover\:text-white:hover {
  color: #0f0e0d !important;
}

html[data-theme="light"] .border-white\/10,
html[data-theme="light"] .border-white\/15,
html[data-theme="light"] .hover\:border-white\/30:hover {
  border-color: rgba(40, 35, 25, 0.22) !important;
}

html[data-theme="light"] .text-red-300 {
  color: #b42318 !important;
}

html[data-theme="light"] .border-red-400\/60 {
  border-color: rgba(180, 35, 24, 0.45) !important;
}

/* —— Shared chrome —— */
html[data-theme="light"] .hair {
  border-color: rgba(40, 35, 25, 0.16);
}

html[data-theme="light"] .glow:hover,
html[data-theme="light"] .glow:active {
  box-shadow: 0 0 40px rgba(40, 35, 25, 0.06);
}

html[data-theme="light"] .gold-line {
  opacity: 0.75;
}

html[data-theme="light"] #to-top {
  border-color: rgba(40, 35, 25, 0.18);
  background: #f7f2e8;
  color: #6f695e;
}

html[data-theme="light"] #to-top:hover,
html[data-theme="light"] #to-top:focus-visible {
  color: #b8860b;
  border-color: rgba(232, 155, 45, 0.55);
}

html[data-theme="light"] .off-card {
  border-color: rgba(40, 35, 25, 0.16);
  background: #f7f2e8;
}

html[data-theme="light"] .off-card:hover {
  border-color: rgba(40, 35, 25, 0.28);
}

html[data-theme="light"] .off-mark {
  border-color: rgba(40, 35, 25, 0.28);
}

html[data-theme="light"] .off-state {
  color: #857e70;
}

html[data-theme="light"] .off-banner {
  border-color: rgba(232, 155, 45, 0.4);
  background: #f7f2e8;
}

html[data-theme="light"] .mascot-bubble,
html[data-theme="light"] .mascot-bubble::after {
  background: #f7f2e8;
  color: #2a2824;
  border-color: rgba(232, 155, 45, 0.4);
}

html[data-theme="light"] .mascot-close {
  color: #857e70;
}

html[data-theme="light"] .mascot-close:hover,
html[data-theme="light"] .mascot-close:focus-visible {
  color: #2a2824;
}

/* —— Forms: milky fill + stronger contrast borders —— */
html[data-theme="light"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  background-color: #f7f2e8 !important;
  color: #1c1b19 !important;
  border-color: #9a8f7a !important;
  caret-color: #b8860b;
}

html[data-theme="light"] input:not([type="checkbox"]):not([type="radio"]):focus,
html[data-theme="light"] select:focus,
html[data-theme="light"] textarea:focus {
  border-color: #c9a227 !important;
  outline: none;
}

html[data-theme="light"] input:-webkit-autofill,
html[data-theme="light"] input:-webkit-autofill:hover,
html[data-theme="light"] input:-webkit-autofill:focus {
  -webkit-text-fill-color: #1c1b19;
  caret-color: #b8860b;
  box-shadow: 0 0 0 1000px #f7f2e8 inset;
  -webkit-box-shadow: 0 0 0 1000px #f7f2e8 inset;
}

/* Login password field — underline with milk plate */
html[data-theme="light"] #password,
html[data-theme="light"] input[name="password"] {
  background: #f7f2e8 !important;
  color: #1c1b19 !important;
  border-bottom-width: 2px !important;
  border-bottom-color: #8a7f6a !important;
  padding-left: 0.65rem;
  padding-right: 2.5rem;
}

html[data-theme="light"] #password:focus,
html[data-theme="light"] input[name="password"]:focus {
  border-bottom-color: #c9a227 !important;
}

html[data-theme="light"] #password-toggle {
  color: #6f695e;
}

html[data-theme="light"] #password-toggle:hover {
  color: #1c1b19;
}

/* —— Theme switch (login) —— */
.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
}

html[data-theme="light"] .theme-switch {
  border-color: rgba(40, 35, 25, 0.2);
  background: #f7f2e8;
}

.theme-switch button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #71717a;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

html[data-theme="light"] .theme-switch button {
  color: #857e70;
}

.theme-switch button[aria-pressed="true"] {
  color: #F5D000;
  background: rgba(245, 208, 0, 0.12);
}

html[data-theme="light"] .theme-switch button[aria-pressed="true"] {
  color: #b8860b;
  background: rgba(245, 208, 0, 0.28);
}

.theme-switch button:hover {
  color: #F5D000;
}

html[data-theme="light"] .theme-switch button:hover {
  color: #9a7209;
}

.theme-switch button:focus-visible {
  outline: 1px solid rgba(245, 208, 0, 0.55);
  outline-offset: 2px;
}

/* —— Login error pop —— */
html[data-theme="light"] #err-pop > div {
  background: #f7f2e8 !important;
  border-color: rgba(40, 35, 25, 0.2) !important;
  box-shadow: 0 18px 50px rgba(40, 35, 25, 0.12);
}

html[data-theme="light"] #err-close {
  background: #f7f2e8 !important;
  border-color: rgba(40, 35, 25, 0.22) !important;
  color: #6f695e !important;
}

html[data-theme="light"] #err-close:hover {
  border-color: rgba(40, 35, 25, 0.35) !important;
  color: #1c1b19 !important;
}

/* —— Dashboard attention —— */
html[data-theme="light"] .attn::before {
  background:
    radial-gradient(ellipse 70% 55% at 0% 0%, rgba(232, 155, 45, 0.12), transparent 55%),
    linear-gradient(180deg, rgba(40, 35, 25, 0.03), transparent 40%);
}

html[data-theme="light"] .attn-rail.is-calm {
  background: linear-gradient(180deg, rgba(40, 35, 25, 0.28), rgba(40, 35, 25, 0.06));
}

html[data-theme="light"] .attn-row {
  border-bottom-color: rgba(40, 35, 25, 0.12);
}

html[data-theme="light"] .attn-row:hover {
  background: linear-gradient(90deg, rgba(245, 208, 0, 0.12), transparent 55%);
}

html[data-theme="light"] .attn-empty,
html[data-theme="light"] .attn-modal {
  border-color: rgba(40, 35, 25, 0.16);
  background: #f7f2e8;
  box-shadow: 0 24px 80px rgba(40, 35, 25, 0.12);
}

/* Focus CTA / dismiss: zinc !important otherwise kills hover:text-gold / white */
html[data-theme="light"] .attn-x:hover,
html[data-theme="light"] .attn-x:focus-visible {
  color: #1c1b19 !important;
  border-color: rgba(201, 162, 39, 0.7) !important;
}

html[data-theme="light"] .attn-actions a:hover,
html[data-theme="light"] .attn-actions button:hover,
html[data-theme="light"] .attn-focus-actions a:hover,
html[data-theme="light"] .attn-focus-actions button:hover {
  color: #b8920a !important;
}

/* —— Account / plan / modes / faq page widgets —— */
html[data-theme="light"] .acc-chip {
  border-color: rgba(40, 35, 25, 0.16);
  color: #6f695e;
  background: #f7f2e8;
}

html[data-theme="light"] .acc-chip.is-on {
  color: #1c1b19;
  border-color: rgba(201, 162, 39, 0.65);
}

html[data-theme="light"] .acc-find {
  border-color: rgba(40, 35, 25, 0.18);
  color: #1c1b19;
}
html[data-theme="light"] .acc-find::placeholder {
  color: #857e70;
}
html[data-theme="light"] .acc-find:focus {
  border-color: rgba(201, 162, 39, 0.65);
}

html[data-theme="light"] .acc-pop {
  border-color: rgba(40, 35, 25, 0.18);
  background: #f7f2e8;
  box-shadow: 0 18px 50px rgba(40, 35, 25, 0.14);
}

html[data-theme="light"] .acc-slot-pop {
  border-color: rgba(40, 35, 25, 0.18);
  background: #f7f2e8;
  box-shadow: 0 16px 40px rgba(40, 35, 25, 0.14);
}
html[data-theme="light"] .acc-slot-pop-h { color: #6b6458; }
html[data-theme="light"] .acc-slot-pop-i { color: #2a261f; }
html[data-theme="light"] .acc-slot-pop-i:hover { color: #8a6d12; }
html[data-theme="light"] .acc-slot-pop-more { color: #9a9286; }

html[data-theme="light"] .team-mix-pop {
  border-color: rgba(40, 35, 25, 0.18);
  background: #f7f2e8;
  box-shadow: 0 18px 50px rgba(40, 35, 25, 0.14);
}
html[data-theme="light"] .team-mix-pop .pop-title { color: #6b6458; }
html[data-theme="light"] .team-mix-pop .pop-names { color: #2a261f; }
html[data-theme="light"] .team-mix-pop .pop-empty { color: #9a9286; }
html[data-theme="light"] .team-mix-bar {
  background: rgba(40, 35, 25, 0.08);
}

html[data-theme="light"] .rep-bar {
  background: rgba(40, 35, 25, 0.1);
}
html[data-theme="light"] .rep-bar .is-quiet {
  background: rgba(40, 35, 25, 0.18);
}
html[data-theme="light"] .rep-row {
  border-color: rgba(40, 35, 25, 0.16);
  background: #f7f2e8;
}
html[data-theme="light"] .rep-row:hover,
html[data-theme="light"] .rep-row.is-on {
  border-color: rgba(201, 162, 39, 0.55);
}
html[data-theme="light"] .rep-chip,
html[data-theme="light"] .rep-badge {
  border-color: rgba(40, 35, 25, 0.16);
  color: #6f695e;
  background: #f7f2e8;
}
html[data-theme="light"] .rep-chip.is-on {
  color: #1c1b19;
  border-color: rgba(201, 162, 39, 0.65);
}
html[data-theme="light"] .rep-hint > i {
  border-color: rgba(40, 35, 25, 0.22);
  color: #6f695e;
}
html[data-theme="light"] .rep-hint > span.rep-tip {
  background: #f7f2e8;
  border-color: rgba(40, 35, 25, 0.18);
  color: #5c574e;
}
html[data-theme="light"] .dash-board,
html[data-theme="light"] .dash-pm,
html[data-theme="light"] .dash-stats,
html[data-theme="light"] .dash-side .attn {
  border-color: rgba(40, 35, 25, 0.14);
}
html[data-theme="light"] .nav-sub {
  border-top-color: rgba(40, 35, 25, 0.14);
}
html[data-theme="light"] .nav-sub a { color: #857e70; }
html[data-theme="light"] .nav-sub a:hover,
html[data-theme="light"] .nav-sub a.is-on { color: #1c1b19; }

html[data-theme="light"] .acc-score-btn {
  border-color: rgba(40, 35, 25, 0.22);
  color: #5c574e;
  background: #faf6ef;
}

html[data-theme="light"] .acc-bar-h {
  background: rgba(40, 35, 25, 0.1);
}

html[data-theme="light"] .nt-pane,
html[data-theme="light"] .nt-card,
html[data-theme="light"] .nt-ex,
html[data-theme="light"] .nt-tab {
  border-color: rgba(40, 35, 25, 0.16);
}
html[data-theme="light"] .nt-pane,
html[data-theme="light"] .nt-card,
html[data-theme="light"] .nt-ex { background: #f7f2e8; }
html[data-theme="light"] .nt-tab.is-on {
  color: #1c1b19;
  border-color: rgba(201, 162, 39, 0.65);
}
html[data-theme="light"] .nt-ex select {
  background: #f7f2e8;
  border-color: rgba(40, 35, 25, 0.18);
  color: #1c1b19;
}

html[data-theme="light"] .faq-tab {
  border-color: rgba(40, 35, 25, 0.16);
  color: #6f695e;
  background: #f7f2e8;
}

html[data-theme="light"] .faq-tab.is-on {
  color: #1c1b19;
  border-color: rgba(201, 162, 39, 0.65);
}

html[data-theme="light"] .faq-pane h3,
html[data-theme="light"] .faq-pane p,
html[data-theme="light"] .faq-pane li {
  color: #5c574e;
}

html[data-theme="light"] .cal-cell {
  border-color: rgba(40, 35, 25, 0.16);
  background: #f7f2e8;
}

html[data-theme="light"] .cal-cell:hover {
  border-color: rgba(40, 35, 25, 0.35);
  color: #1c1b19;
}

html[data-theme="light"] .cal-dow {
  color: #857e70;
}

html[data-theme="light"] .plan-chart-pop,
html[data-theme="light"] .plan-nudge-box,
html[data-theme="light"] .plan-slot-pop,
html[data-theme="light"] .plan-modal-box,
html[data-theme="light"] .plan-bulk-box {
  background: #f7f2e8 !important;
  border-color: rgba(40, 35, 25, 0.18) !important;
  box-shadow: 0 18px 50px rgba(40, 35, 25, 0.12);
}

html[data-theme="light"] .plan-week-btn {
  border-color: rgba(40, 35, 25, 0.18);
  background: #f7f2e8;
  color: #5c574e;
}

html[data-theme="light"] .plan-days-head,
html[data-theme="light"] .plan-bulk-bak,
html[data-theme="light"] .plan-bulk-bak-row,
html[data-theme="light"] .plan-modal-list {
  border-color: rgba(40, 35, 25, 0.14);
}

html[data-theme="light"] .acc-slot.is-away,
html[data-theme="light"] .plan-slot.is-away {
  border-color: rgba(40, 35, 25, 0.35);
  background-color: #ebe4d8;
  background-image:
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 2px,
      rgba(40, 35, 25, 0.18) 2px,
      rgba(40, 35, 25, 0.18) 3px
    ),
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 2px,
      rgba(40, 35, 25, 0.12) 2px,
      rgba(40, 35, 25, 0.12) 3px
    );
  box-shadow: none;
}

html[data-theme="light"] .dx-ring {
  background:
    radial-gradient(circle at 50% 50%, #efe9df 58%, transparent 59%),
    conic-gradient(#c9a227 calc(var(--p) * 1%), rgba(40, 35, 25, 0.12) 0);
}
html[data-theme="light"] .dx-card,
html[data-theme="light"] .dx-empty {
  border-color: rgba(40, 35, 25, 0.16);
  background: #f7f2e8;
}
html[data-theme="light"] .dx-card.is-ok { border-color: rgba(201, 162, 39, 0.45); }
html[data-theme="light"] .dx-card.is-warn { border-color: rgba(201, 162, 39, 0.7); }
html[data-theme="light"] .dx-card.is-fail { border-color: rgba(180, 35, 24, 0.45); }
html[data-theme="light"] .dx-sync-bar { background: rgba(40, 35, 25, 0.1); }
html[data-theme="light"] .dx-col em { color: #857e70; }
html[data-theme="light"] .dx-col .is-fail { background: #b42318; }
