:root {
  color-scheme: light;
  --paper-2: #f0f2ef;
}
.theme-toggle {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: none;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  font: 700 12px inherit;
}
.theme-toggle:hover {
  border-color: var(--forest-2);
}
.theme-toggle svg {
  width: 19px;
  height: 19px;
  flex: none;
}
.theme-toggle .theme-label {
  display: none;
}
.auth-theme {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 18px;
}
.auth-theme .theme-label {
  display: inline;
}
.page-heading h1 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --ink: #e7edf3;
  --ink-2: #c5d0db;
  --muted: #a3b1bf;
  --paper: #141b23;
  --paper-2: #25313c;
  --card: #1e2833;
  --line: #354351;
  --line-2: #4c5c6c;
  --forest: #147d80;
  --forest-2: #85d8cd;
  --mint: #203f40;
  --mint-2: #36625f;
  --coral: #ffac99;
  --coral-soft: #432c2d;
  --amber: #efc37f;
  --amber-soft: #3c3223;
  --blue: #9ac9e9;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
[data-theme='dark'] .sidebar,
[data-theme='dark'] .dialog-head,
[data-theme='dark'] .button.secondary,
[data-theme='dark'] .data-links a,
[data-theme='dark'] input,
[data-theme='dark'] textarea,
[data-theme='dark'] select,
[data-theme='dark'] .icon-button,
[data-theme='dark'] .chip:not([aria-pressed='true']),
[data-theme='dark'] .rating-option:not([aria-pressed='true']),
[data-theme='dark'] .check-button:not(.on) {
  background: var(--card);
  color: var(--ink);
}
[data-theme='dark'] .topbar,
[data-theme='dark'] .mobile-nav,
[data-theme='dark'] .dialog-foot {
  background: rgba(20, 27, 35, 0.97);
}
[data-theme='dark'] .auth-shell {
  background: #19242d;
}
[data-theme='dark'] .auth-story {
  color: var(--ink);
}
[data-theme='dark'] .auth-panel {
  background: var(--paper);
}
[data-theme='dark'] .side-nav button {
  color: var(--ink-2);
}
[data-theme='dark'] .side-nav button:hover,
[data-theme='dark'] .time-box,
[data-theme='dark'] .icon-button:hover,
[data-theme='dark'] .segmented,
[data-theme='dark'] .month-track,
[data-theme='dark'] code,
[data-theme='dark'] .dialog-close {
  background: var(--paper-2);
  color: var(--ink);
}
[data-theme='dark'] .side-nav button.on {
  background: var(--mint);
  color: var(--forest-2);
}
[data-theme='dark'] .segmented button.on {
  background: var(--card);
  color: var(--ink);
}
[data-theme='dark'] .demo-card {
  background: var(--mint);
  border-color: var(--mint-2);
}
[data-theme='dark'] .avatar,
[data-theme='dark'] .button.mint {
  color: var(--forest-2);
}
[data-theme='dark'] .button.primary:hover {
  background: #106568;
}
[data-theme='dark'] .button.danger,
[data-theme='dark'] .note.err,
[data-theme='dark'] .pill.owing,
[data-theme='dark'] .danger-text,
[data-theme='dark'] .ledger-amount.refund {
  color: #ffb8ac;
}
[data-theme='dark'] .pill.neutral {
  background: var(--paper-2);
  color: var(--ink-2);
}
[data-theme='dark'] .paid-pill {
  background: #24402f;
  color: #a3d7af;
}
[data-theme='dark'] .chip.warn[aria-pressed='true'] {
  background: #936020;
  border-color: #af7a36;
  color: white;
}
[data-theme='dark'] .chip.danger[aria-pressed='true'] {
  background: #a4473b;
  border-color: #bd6357;
  color: white;
}
[data-theme='dark'] .check-button.on {
  background: var(--forest);
  border-color: var(--forest-2);
}
[data-theme='dark'] .calendar-lesson {
  background: var(--card);
  color: var(--ink);
  border-color: var(--mint-2);
  border-left-color: var(--forest-2);
}
[data-theme='dark'] .calendar-lesson.done {
  background: var(--paper-2);
  border-color: var(--line-2);
  opacity: 1;
}
[data-theme='dark'] .day-column {
  background: var(--card);
}
[data-theme='dark'] .month-day {
  background: var(--card);
}
[data-theme='dark'] .month-day.outside {
  background: transparent;
}
[data-theme='dark'] .month-item.done {
  background: var(--paper-2);
}
[data-theme='dark'] .month-day.today,
[data-theme='dark'] .day-column.today {
  background: #203437;
}
[data-theme='dark'] .calendar-block b,
[data-theme='dark'] .calendar-block span {
  color: var(--amber);
}
[data-theme='dark'] .tax-export-panel,
[data-theme='dark'] .onboarding {
  background: #214943;
}
[data-theme='dark'] .tax-export-actions a:first-child {
  background: var(--mint);
  color: var(--forest-2);
}
[data-theme='dark'] .overlay {
  background: rgba(0, 0, 0, 0.65);
}
[data-theme='dark'] :focus-visible {
  outline-color: #85d8cd;
}
[data-theme='dark'] input:focus,
[data-theme='dark'] textarea:focus,
[data-theme='dark'] select:focus {
  border-color: #85d8cd;
  box-shadow: 0 0 0 3px rgba(133, 216, 205, 0.2);
}
@media (max-width: 760px) {
  .top-actions .theme-toggle {
    min-width: 40px;
    min-height: 40px;
    padding: 0 9px;
  }
}
@media print {
  .theme-toggle {
    display: none;
  }
}
