/* Dark neutral surfaces. Brand and status colors come from style.css. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111;
  --theme-surface: #1a1a1a;
  --theme-subtle: #222;
  --ink: #f1edf3;
  --muted: #bdb5c2;
  --line: #3a363c;
  --theme-muted: var(--muted);
  --theme-line: var(--line);
  --theme-link: #d9aff2;
}

:root[data-theme="dark"] :is(
  .topbar .breadcrumbs, .topbar .user-role, .topbar .icon-btn,
  .topbar .user-menu button, .date-control button, .date-control input,
  .btn.outline:not(.active, .selected), .activity-card button, .form-field input:not([readonly]),
  .form-field select, .form-field textarea
) {
  color: var(--ink);
  border-color: var(--line);
}

:root[data-theme="dark"] :is(
  .stat:not(.highlight, .tls-yield-card, .closures-card) .stat-top,
  .stat:not(.highlight, .tls-yield-card, .closures-card) .stat-value small,
  .stat:not(.highlight, .tls-yield-card, .closures-card) .stat-foot,
  .panel-sub, .modal p, .payroll-calendar-weekdays, .payroll-calendar-legend
) {
  color: var(--muted);
  border-color: var(--line);
}

:root[data-theme="dark"] :is(
  .calendar-person-total strong, .row-edit, .performance-number, .queue-edit,
  .analytics-person, .calendar-person-link, .calendar-presence-details > summary,
  .day-session-head h3, .content .reporting-kicker,
  .teleselling-page-head .teleselling-kicker, .monthly-hours-values strong
):not(.mine *) {
  color: var(--theme-link);
}

.theme-toggle {
  flex-shrink: 0;
}
.theme-auth {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 30;
  background: var(--primary-soft);
}
