/*
 * Dark theme for the FSTD Ops Manager, the Monitoring Center, TeoSlot and the
 * sign-in pages. WeSee, print pages and emails do not load this sheet.
 *
 * Everything is scoped to html[data-theme="dark"], set before first paint by
 * templates/includes/theme_head.html and switched by static/js/theme.js.
 * Order: tokens, shell, Tailwind utilities, CMC components, TeoSlot, auth.
 * Load it last, after every other stylesheet of the page.
 */

/* Tokens ----------------------------------------------------------------- */
html[data-theme="dark"] {
  color-scheme: dark;

  --ui-bg: #0a1120;
  --ui-surface: #111b2e;
  --ui-surface-2: #16223a;
  --ui-border: #233452;
  --ui-border-strong: #31466b;
  --ui-text: #e4ecf7;
  --ui-text-2: #a7b6cc;
  --ui-text-3: #7587a3;
  --ui-amber-soft: rgba(226, 163, 62, 0.14);
  --ui-sky-soft: rgba(14, 165, 233, 0.16);
  --ui-primary: #3b82f6;
  --ui-primary-hover: #2563eb;
  --ui-primary-soft: rgba(59, 130, 246, 0.16);
  --ui-focus: rgba(56, 189, 248, 0.55);
  --ui-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --ui-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 12px -2px rgba(0, 0, 0, 0.35);
  --ui-shadow-lg: 0 24px 64px -12px rgba(0, 0, 0, 0.7);

  --cmc-bg: #0a1120;
  --cmc-surface: #111b2e;
  --cmc-surface-2: #16223a;
  --cmc-border: #233452;
  --cmc-border-strong: #31466b;
  --cmc-text: #e4ecf7;
  --cmc-text-2: #a7b6cc;
  --cmc-text-3: #7d90ad;
  --cmc-muted: #7d90ad;
  --cmc-accent: #60a5fa;
  --cmc-red: #f2685c;
  --cmc-red-soft: rgba(242, 104, 92, 0.15);
  --cmc-red-strong: #ffb4ab;
  --cmc-yellow: #f2b84b;
  --cmc-yellow-soft: rgba(242, 184, 75, 0.14);
  --cmc-green: #4cc98a;
  --cmc-green-soft: rgba(76, 201, 138, 0.14);
  --cmc-blue: #60a5fa;
  --cmc-blue-soft: rgba(96, 165, 250, 0.15);
  --cmc-grey: #94a3b8;
  --cmc-grey-soft: rgba(148, 163, 184, 0.12);
  --cmc-plus-soft: rgba(242, 184, 75, 0.13);
  --cmc-plus-ink: #f2c46b;
  --cmc-purple-soft: rgba(167, 139, 250, 0.14);
  --cmc-amber-ink: #f2c46b;
  --cmc-blue-ink: #93c5fd;
  --cmc-bar: #4c95f0;
  --cmc-bar-below: #e8a640;
  --cmc-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.55);
  --cmc-shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.35), 0 18px 36px -14px rgba(0, 0, 0, 0.7);

  /* TeoSlot scheduler and booking palette (static/teoslot/scheduler.css) */
  --ink-900: #e4ecf7;
  --ink-700: #c3cfdf;
  --ink-500: #93a3ba;
  --ink-400: #6f819c;
  --paper: #0a1120;
  --paper-card: #111b2e;
  --panel-2: #16223a; /* rows inside cards: subjects, rooms, cart (booking.css falls back to #f8fafc) */
  --line: #233452;
  --line-strong: #31466b;
  --accent: #3b82f6;
  --accent-dark: #2563eb;
  --accent-soft: rgba(59, 130, 246, 0.18);
  --c-weekend: #31466b;
  --red-50: rgba(242, 104, 92, 0.13);
  --orange-50: rgba(251, 146, 60, 0.13);
  --yellow-50: rgba(242, 184, 75, 0.13);
  --yellow-700: #f2c46b;
  --green-50: rgba(76, 201, 138, 0.13);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.55);

  /* TeoSlot official examination (static/teoslot/official_exam.css; .oe-form redeclares them) */
  --oe-ink: #e4ecf7;
  --oe-muted: #93a3ba;
  --oe-line: #233452;
  --oe-line-strong: #31466b;
  --oe-paper: #16223a;
  --oe-accent: #60a5fa;
  --oe-accent-soft: rgba(96, 165, 250, 0.16);
  --oe-green: #4cc98a;
  --oe-green-soft: rgba(76, 201, 138, 0.12);
}

html[data-theme="dark"] .oe-form {
  --oe-ink: #e4ecf7;
  --oe-muted: #93a3ba;
  --oe-line: #233452;
  --oe-line-strong: #31466b;
  --oe-paper: #16223a;
  --oe-accent: #60a5fa;
  --oe-accent-soft: rgba(96, 165, 250, 0.16);
  --oe-green: #4cc98a;
  --oe-green-soft: rgba(76, 201, 138, 0.12);
}

html[data-theme="dark"] body { background-color: var(--ui-bg); color: var(--ui-text); }
html[data-theme="dark"] ::selection { background: rgba(56, 189, 248, 0.3); }

/* Shell ------------------------------------------------------------------ */
html[data-theme="dark"] .app-sidebar {
  background:
    radial-gradient(120% 50% at 0% 0%, rgba(14, 165, 233, 0.14), transparent 60%),
    radial-gradient(90% 40% at 100% 100%, rgba(29, 78, 216, 0.22), transparent 60%),
    linear-gradient(180deg, #0d1f40 0%, #081429 100%);
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.07), 0 18px 40px -16px rgba(0, 0, 0, 0.7);
}
html[data-theme="dark"] .app-topbar { background: rgba(10, 17, 32, 0.82); }
html[data-theme="dark"] .app-menu-btn,
html[data-theme="dark"] .app-ctl,
html[data-theme="dark"] .app-date-group,
html[data-theme="dark"] .app-user-btn,
html[data-theme="dark"] .app-chip,
html[data-theme="dark"] .app-user-panel { background: var(--ui-surface); border-color: var(--ui-border); box-shadow: none; }
html[data-theme="dark"] .app-ctl:hover,
html[data-theme="dark"] .app-menu-btn:hover,
html[data-theme="dark"] .app-user-btn:hover { background: var(--ui-surface-2); border-color: var(--ui-border-strong); color: #93c5fd; }
html[data-theme="dark"] .app-ctl:hover .ui-icon { color: #93c5fd; }
html[data-theme="dark"] .app-user-panel { box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.7); }
html[data-theme="dark"] .app-eyebrow { color: #7cb3ff; }
html[data-theme="dark"] .app-date-group input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.8); }
html[data-theme="dark"] .app-chip .warn { color: #f2c46b; }
html[data-theme="dark"] .app-date-group.is-fixed { border-color: #e2a33e; background: rgba(226, 163, 62, 0.14); box-shadow: 0 0 0 2px rgba(226, 163, 62, 0.22); }
html[data-theme="dark"] .app-date-flag { color: #f2c46b; }
html[data-theme="dark"] .app-date-group .app-date-today { background: #b97b1f; border-left-color: #b97b1f; color: #fff; }
html[data-theme="dark"] .app-flash { border-color: rgba(76, 201, 138, 0.35); background: rgba(76, 201, 138, 0.12); color: #9ee6bf; box-shadow: none; }
html[data-theme="dark"] .app-flash.is-error { border-color: rgba(242, 104, 92, 0.4); background: rgba(242, 104, 92, 0.13); color: #ffb4ab; }
html[data-theme="dark"] .app-flash.is-warning { border-color: rgba(242, 184, 75, 0.4); background: rgba(242, 184, 75, 0.12); color: #f7d58c; }

/* Theme switch (templates/includes/theme_toggle.html), both themes */
.theme-toggle { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0 !important; border-radius: 10px; cursor: pointer; }
.theme-toggle .ui-icon { width: 17px; height: 17px; }
.theme-toggle .theme-icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .theme-icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .theme-icon-moon { display: none; }
/* Same switch as a user-menu entry (CMC, phones only) */
.theme-menu-item .theme-icon-sun,
.theme-menu-item .theme-label-light { display: none; }
html[data-theme="dark"] .theme-menu-item .theme-icon-sun,
html[data-theme="dark"] .theme-menu-item .theme-label-light { display: inline; }
html[data-theme="dark"] .theme-menu-item .theme-icon-moon,
html[data-theme="dark"] .theme-menu-item .theme-label-dark { display: none; }
@media (min-width: 768px) { .app-user-panel .theme-menu-item { display: none !important; } }
@media (max-width: 767px) {
  .cmc-body .app-topbar-actions > .theme-toggle { display: none; }
  .fstd-body .app-topbar-actions > .theme-toggle { margin-left: auto; }
}

/* Modals ----------------------------------------------------------------- */
html[data-theme="dark"] .cmc-modal-overlay { background: rgba(2, 6, 14, 0.7); }
html[data-theme="dark"] .cmc-modal { border-color: var(--ui-border); background: var(--ui-surface); box-shadow: var(--ui-shadow-lg); }
html[data-theme="dark"] .modal-h { background: linear-gradient(180deg, #16223a, #111b2e); }

/* Native form controls --------------------------------------------------- */
html[data-theme="dark"] .fstd-body input[type="text"],
html[data-theme="dark"] .fstd-body input[type="email"],
html[data-theme="dark"] .fstd-body input[type="number"],
html[data-theme="dark"] .fstd-body input[type="password"],
html[data-theme="dark"] .fstd-body input[type="search"],
html[data-theme="dark"] .fstd-body input[type="url"],
html[data-theme="dark"] .fstd-body input[type="tel"],
html[data-theme="dark"] .fstd-body input[type="date"],
html[data-theme="dark"] .fstd-body input[type="datetime-local"],
html[data-theme="dark"] .fstd-body input[type="time"],
html[data-theme="dark"] .fstd-body input[type="file"],
html[data-theme="dark"] .fstd-body select,
html[data-theme="dark"] .fstd-body textarea,
html[data-theme="dark"] .cmc-page select,
html[data-theme="dark"] .cmc-page input[type="text"],
html[data-theme="dark"] .cmc-page input[type="search"],
html[data-theme="dark"] .cmc-page input[type="number"],
html[data-theme="dark"] .cmc-page input[type="date"],
html[data-theme="dark"] .cmc-page input[type="email"],
html[data-theme="dark"] .cmc-page input[type="month"],
html[data-theme="dark"] .cmc-page input[type="time"],
html[data-theme="dark"] .cmc-page input[type="password"],
html[data-theme="dark"] .cmc-page input[type="url"],
html[data-theme="dark"] .cmc-page input[type="file"],
html[data-theme="dark"] .cmc-page textarea,
html[data-theme="dark"] .cmc-page input:not([type]),
html[data-theme="dark"] .fstd-body input:not([type]),
html[data-theme="dark"] .tr-page input:not([type]),
html[data-theme="dark"] .cmc-modal select,
html[data-theme="dark"] .cmc-modal input[type="text"],
html[data-theme="dark"] .cmc-modal input[type="number"],
html[data-theme="dark"] .cmc-modal input[type="date"],
html[data-theme="dark"] .cmc-modal input[type="email"],
html[data-theme="dark"] .cmc-modal input[type="time"],
html[data-theme="dark"] .cmc-modal textarea,
html[data-theme="dark"] .cmc-input,
html[data-theme="dark"] .form-field input,
html[data-theme="dark"] .form-field select,
html[data-theme="dark"] .form-field textarea {
  border-color: var(--ui-border-strong);
  background-color: #0d1628;
  color: var(--ui-text);
  box-shadow: none;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color: #5f7290; }
html[data-theme="dark"] input:hover,
html[data-theme="dark"] select:hover,
html[data-theme="dark"] textarea:hover { border-color: #41598a; }
html[data-theme="dark"] input:disabled,
html[data-theme="dark"] select:disabled,
html[data-theme="dark"] textarea:disabled { background-color: #131d31; color: var(--ui-text-3); }
html[data-theme="dark"] .fstd-body select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237d90ad' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
html[data-theme="dark"] .fstd-body select[multiple] { background-image: none; }
html[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator,
html[data-theme="dark"] input[type="time"]::-webkit-calendar-picker-indicator,
html[data-theme="dark"] input[type="month"]::-webkit-calendar-picker-indicator,
html[data-theme="dark"] input[type="datetime-local"]::-webkit-calendar-picker-indicator { filter: invert(0.8); }

/* Tom Select (CDN widget used by CMC and FSTD multi-selects) */
html[data-theme="dark"] .ts-wrapper .ts-control,
html[data-theme="dark"] .ts-wrapper.multi .ts-control,
html[data-theme="dark"] .ts-wrapper.single .ts-control,
html[data-theme="dark"] .ts-control input { border-color: var(--ui-border-strong) !important; background: #0d1628 !important; color: var(--ui-text) !important; box-shadow: none !important; }
html[data-theme="dark"] .ts-wrapper.multi .ts-control > div { border-color: var(--ui-border-strong); background: var(--ui-surface-2); color: var(--ui-text); }
html[data-theme="dark"] .ts-dropdown { border-color: var(--ui-border-strong); background: var(--ui-surface); color: var(--ui-text); }
html[data-theme="dark"] .ts-dropdown .active { background: var(--ui-primary-soft); color: #fff; }
html[data-theme="dark"] .ts-dropdown .optgroup-header { background: var(--ui-surface-2); color: var(--ui-text-3); }

/* FSTD tables and cards (static/css/fstd.css) */
html[data-theme="dark"] .fstd-body .app-content thead th,
html[data-theme="dark"] .fstd-body .app-content thead.bg-slate-50 { background: var(--ui-surface); color: var(--ui-text-3); border-bottom-color: var(--ui-border); }
html[data-theme="dark"] .fstd-body .app-content tbody tr + tr td,
html[data-theme="dark"] .fstd-body .app-content tbody tr.border-t td { border-top-color: #1c2a44; }
html[data-theme="dark"] .fstd-body .app-content tbody tr:hover td { background: #15213a; }
html[data-theme="dark"] .fstd-body .app-content .rounded-xl.border.bg-white { border-color: var(--ui-border); box-shadow: var(--cmc-shadow); }
html[data-theme="dark"] .fstd-body .app-content a.rounded-xl.border:hover { border-color: var(--ui-border-strong); box-shadow: var(--cmc-shadow-hover); }
html[data-theme="dark"] .fstd-body label { color: var(--ui-text-2); }
html[data-theme="dark"] .fstd-body a.text-amber-700,
html[data-theme="dark"] .fstd-body a.text-amber,
html[data-theme="dark"] .fstd-body button.text-amber-700 { color: #7cb3ff; }
html[data-theme="dark"] .fstd-body a.text-amber-700:hover,
html[data-theme="dark"] .fstd-body a.text-amber:hover { color: #a5cbff; }

/* Maintenance board (fstd.css .mnt-*) */
html[data-theme="dark"] {
  --mnt-over: #ff8a80;  --mnt-over-bg: rgba(242, 104, 92, 0.14);
  --mnt-soon: #f2c46b;  --mnt-soon-bg: rgba(242, 184, 75, 0.14);
  --mnt-ok: #6ee0a4;    --mnt-ok-bg: rgba(76, 201, 138, 0.13);
  --mnt-none: #a7b6cc;  --mnt-none-bg: rgba(167, 182, 204, 0.12);
  --mnt-demand: #8fbcff; --mnt-demand-bg: rgba(125, 179, 255, 0.14);
  --mnt-rule: #1c2a44;
}
html[data-theme="dark"] .mnt-chip.is-active { color: #fff; }

/* Tailwind utilities (CDN in FSTD, compiled sheet in the CMC) ------------- */
html[data-theme="dark"] .bg-white { background-color: var(--ui-surface); }
html[data-theme="dark"] .bg-paper { background-color: var(--ui-bg); }
html[data-theme="dark"] .bg-slate-50,
html[data-theme="dark"] .hover\:bg-slate-50:hover { background-color: var(--ui-surface-2); }
html[data-theme="dark"] .bg-slate-100,
html[data-theme="dark"] .hover\:bg-slate-100:hover { background-color: #1b2843; }
html[data-theme="dark"] .bg-slate-900 { background-color: #050b16; }
html[data-theme="dark"] .bg-navy-900\/5 { background-color: rgba(125, 179, 255, 0.07); }
html[data-theme="dark"] .bg-red-50 { background-color: rgba(242, 104, 92, 0.12); }
html[data-theme="dark"] .bg-red-100 { background-color: rgba(242, 104, 92, 0.2); }
html[data-theme="dark"] .bg-emerald-50 { background-color: rgba(76, 201, 138, 0.12); }
html[data-theme="dark"] .bg-emerald-100 { background-color: rgba(76, 201, 138, 0.2); }
html[data-theme="dark"] .bg-amber-50 { background-color: rgba(242, 184, 75, 0.12); }
html[data-theme="dark"] .bg-amber-50\/30 { background-color: rgba(242, 184, 75, 0.06); }
html[data-theme="dark"] .bg-amber-100 { background-color: rgba(242, 184, 75, 0.2); }
html[data-theme="dark"] .bg-sky-50 { background-color: rgba(56, 189, 248, 0.12); }
html[data-theme="dark"] .bg-violet-100 { background-color: rgba(167, 139, 250, 0.2); }

html[data-theme="dark"] .text-slate-400 { color: #6f819c; }
html[data-theme="dark"] .text-slate-500 { color: #8a9bb4; }
html[data-theme="dark"] .text-slate-600 { color: #a7b6cc; }
html[data-theme="dark"] .text-slate-700 { color: #c3cfdf; }
html[data-theme="dark"] .text-navy-800,
html[data-theme="dark"] .text-navy-900,
html[data-theme="dark"] .text-navy-950,
html[data-theme="dark"] .hover\:text-navy-900:hover { color: var(--ui-text); }
html[data-theme="dark"] .text-red-600 { color: #ff8a80; }
html[data-theme="dark"] .text-red-700 { color: #ff9b91; }
html[data-theme="dark"] .text-red-800 { color: #ffb4ab; }
html[data-theme="dark"] .text-emerald-600,
html[data-theme="dark"] .text-emerald-700 { color: #5fd69a; }
html[data-theme="dark"] .text-emerald-800 { color: #8de3b6; }
html[data-theme="dark"] .text-amber-700 { color: #f2c46b; }
html[data-theme="dark"] .text-amber-800,
html[data-theme="dark"] .text-amber-900 { color: #f7d58c; }
html[data-theme="dark"] .text-sky-800 { color: #7dd3fc; }

html[data-theme="dark"] .border-slate-100 { border-color: #1c2a44; }
html[data-theme="dark"] .border-slate-200 { border-color: var(--ui-border); }
html[data-theme="dark"] .border-slate-300,
html[data-theme="dark"] .hover\:border-slate-300:hover { border-color: var(--ui-border-strong); }
html[data-theme="dark"] .border-red-200 { border-color: rgba(242, 104, 92, 0.4); }
html[data-theme="dark"] .border-amber-200 { border-color: rgba(242, 184, 75, 0.4); }
html[data-theme="dark"] .divide-slate-100 > :not([hidden]) ~ :not([hidden]) { border-color: #1c2a44; }

html[data-theme="dark"] .ring-slate-500\/15 { --tw-ring-color: rgba(148, 163, 184, 0.3); }
html[data-theme="dark"] .ring-emerald-600\/15 { --tw-ring-color: rgba(76, 201, 138, 0.35); }
html[data-theme="dark"] .ring-red-600\/15 { --tw-ring-color: rgba(242, 104, 92, 0.35); }
html[data-theme="dark"] .ring-amber-600\/20 { --tw-ring-color: rgba(242, 184, 75, 0.35); }
html[data-theme="dark"] .ring-sky-700\/15 { --tw-ring-color: rgba(56, 189, 248, 0.35); }
html[data-theme="dark"] .ring-navy-900\/10 { --tw-ring-color: rgba(125, 179, 255, 0.2); }

/* Dark navy chips (active segment, avatars) stay visible on a dark page */
html[data-theme="dark"] .bg-navy-950,
html[data-theme="dark"] .bg-navy-900 { background-color: #1e3a6e; }
html[data-theme="dark"] .hover\:bg-navy-800:hover,
html[data-theme="dark"] .hover\:bg-navy-900:hover { background-color: #27498a; }
html[data-theme="dark"] .fstd-body .app-content .inline-flex.rounded-lg.border.bg-white.p-0\.5 > a.bg-navy-950 { background: var(--ui-primary); }

/* Monitoring Center components (static/cmc/cmc.css) ---------------------- */
html[data-theme="dark"] .kpi.red { background: linear-gradient(180deg, var(--cmc-surface) 60%, rgba(242, 104, 92, 0.08) 100%); }
html[data-theme="dark"] .b-ok { background: rgba(96, 165, 250, 0.15); color: #93c5fd; }
html[data-theme="dark"] .warn0 { color: #fb9a4b; }
html[data-theme="dark"] .att-head.red { border-color: rgba(242, 104, 92, 0.4); }
html[data-theme="dark"] .att-head.yellow { border-color: rgba(242, 184, 75, 0.4); color: #f7d58c; }
html[data-theme="dark"] .att-head.green { border-color: rgba(76, 201, 138, 0.4); }
html[data-theme="dark"] .reason-pill-excluded,
html[data-theme="dark"] .reason-overdue-note { color: #f7d58c; }
html[data-theme="dark"] .cmc-table td,
html[data-theme="dark"] .list-rows li { border-top-color: #1c2a44; }
html[data-theme="dark"] .cmc-table tbody tr:hover td,
html[data-theme="dark"] .cmc-table tr.clickable:hover td { background: #15213a; }
html[data-theme="dark"] .table-wrap .cmc-table th { border-bottom-color: var(--cmc-border); color: var(--cmc-text-3); }
html[data-theme="dark"] .panel-h { border-bottom-color: var(--cmc-border); }
html[data-theme="dark"] .note-cell:hover { background: rgba(242, 184, 75, 0.1); outline-color: rgba(242, 184, 75, 0.45); }
html[data-theme="dark"] .btn { border-color: var(--ui-border-strong); background: var(--ui-surface-2); color: var(--ui-text); box-shadow: none; }
html[data-theme="dark"] .btn:hover { border-color: #41598a; background: #1b2843; color: #93c5fd; }
html[data-theme="dark"] .btn.primary { border-color: var(--ui-primary); background: var(--ui-primary); color: #fff; }
html[data-theme="dark"] .btn.primary:hover { border-color: var(--ui-primary-hover); background: var(--ui-primary-hover); color: #fff; }
html[data-theme="dark"] .btn.danger { border-color: var(--cmc-red); background: var(--cmc-red); color: #fff; }
html[data-theme="dark"] .chip.amber { color: #7dd3fc; }
html[data-theme="dark"] .pager a { color: #7cb3ff; }
html[data-theme="dark"] .icao-elp-pill.is-on { border-color: rgba(96, 165, 250, 0.4); background: rgba(96, 165, 250, 0.15); }
html[data-theme="dark"] .icao-elp-pill.is-off { border-color: var(--ui-border); background: var(--ui-surface-2); color: var(--ui-text-3); }
html[data-theme="dark"] .icao-elp-switch__track { background: #31466b; }
html[data-theme="dark"] .icao-elp-switch__thumb { background: #e4ecf7; }
html[data-theme="dark"] .avail .av-available.generic,
html[data-theme="dark"] .avail-strip-lg .bar.av-available.generic { background: rgba(76, 201, 138, 0.35); }
html[data-theme="dark"] .avail .av-unavailable,
html[data-theme="dark"] .avail-strip-lg .bar.av-unavailable { background: #4a5b75; }
html[data-theme="dark"] #vizTip { background: #22324f; box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.7); }
html[data-theme="dark"] .popover { border-color: var(--ui-border-strong); background: var(--ui-surface); color: var(--ui-text); box-shadow: var(--ui-shadow-lg); }
html[data-theme="dark"] .warn-card.RED { border-color: rgba(242, 104, 92, 0.4); }
html[data-theme="dark"] .warn-card.YELLOW { border-color: rgba(242, 184, 75, 0.4); }
html[data-theme="dark"] .warn-card.GREEN { border-color: rgba(76, 201, 138, 0.4); }
html[data-theme="dark"] .warn-card.OK { border-color: rgba(96, 165, 250, 0.35); }
html[data-theme="dark"] .maint-note textarea,
html[data-theme="dark"] .agenda-note-composer textarea,
html[data-theme="dark"] .agenda-inline-select { background-color: #0d1628; color: var(--ui-text); border-color: var(--ui-border-strong); }
html[data-theme="dark"] .maint-bookings-summary { background: var(--ui-surface); }
html[data-theme="dark"] .maint-bookings-chevron::before,
html[data-theme="dark"] .ba-collapse-chevron::before { border-color: #a7b6cc; }
html[data-theme="dark"] .maint-bookings-summary:hover .maint-bookings-chevron::before { border-color: #93c5fd; }
html[data-theme="dark"] .student-agenda-table tbody tr.agenda-priority-high:hover td { background: rgba(76, 201, 138, 0.22); }
html[data-theme="dark"] .student-agenda-table tbody tr.agenda-priority-medium:hover td { background: rgba(242, 184, 75, 0.22); }
html[data-theme="dark"] .student-agenda-table tbody tr.agenda-priority-low:hover td { background: rgba(242, 104, 92, 0.22); }
html[data-theme="dark"] .agenda-note-composer { background: var(--ui-surface-2); }
html[data-theme="dark"] .agenda-note-error { color: #ff9b91; }
html[data-theme="dark"] .agenda-notes thead th { background: #1b2843; color: var(--ui-text); }
html[data-theme="dark"] .agenda-notes tbody td { background: var(--ui-surface); }
html[data-theme="dark"] .agenda-notes tbody tr:hover td { background: #15213a; }
html[data-theme="dark"] .agenda-note-file { color: #7cb3ff; }
html[data-theme="dark"] .fg-add.pos,
html[data-theme="dark"] .fg-chip.pos.on { border-color: rgba(76, 201, 138, 0.5); }
html[data-theme="dark"] .fg-add.neg,
html[data-theme="dark"] .fg-chip.neg.on { border-color: rgba(242, 104, 92, 0.5); }
html[data-theme="dark"] .fg-chip.pos.on,
html[data-theme="dark"] .fg-p { color: #5fd69a; }
html[data-theme="dark"] .fg-chip.neg.on,
html[data-theme="dark"] .fg-n { color: #ff9b91; }
html[data-theme="dark"] .ctl-seg { border-right-color: var(--ui-surface); }
html[data-theme="dark"] .ctl-stu { background: var(--ui-surface); }
html[data-theme="dark"] .ctl-tick { background: #4a5b75; }
html[data-theme="dark"] .ctl-exam td { background: rgba(76, 201, 138, 0.07); }
html[data-theme="dark"] .ctl-cur { background: rgba(167, 139, 250, 0.1); }
html[data-theme="dark"] .dl.early { color: #7cb3ff; }
html[data-theme="dark"] .rs-c.pass { background: rgba(76, 201, 138, 0.16); color: #8de3b6; }
html[data-theme="dark"] .rs-c.fail { background: rgba(242, 104, 92, 0.16); color: #ffb4ab; }
html[data-theme="dark"] .rs-c.absent { background: rgba(242, 184, 75, 0.16); color: #f7d58c; }
html[data-theme="dark"] .ba-card { background: var(--ui-surface); }
html[data-theme="dark"] .ba-card-head { background: linear-gradient(180deg, #16223a 0%, #111b2e 100%); }
html[data-theme="dark"] .ba-collapse { background: #0e1729; }
html[data-theme="dark"] .ba-collapse-chevron,
html[data-theme="dark"] .ba-collapse-summary:hover .ba-collapse-chevron { background: var(--ui-surface-2); border-color: var(--ui-border-strong); }
html[data-theme="dark"] .ba-collapse-summary:hover { background: #15213a; }
html[data-theme="dark"] .ba-collapse-count { background: #1b2843; color: var(--ui-text-2); }
html[data-theme="dark"] .ba-callout { background: rgba(242, 184, 75, 0.1); }
html[data-theme="dark"] .ba-callout-title { color: #f2c46b; }
html[data-theme="dark"] .ba-pill-course { background: rgba(242, 104, 92, 0.16); color: #ffb4ab; }
html[data-theme="dark"] .ba-pill-phase { background: rgba(242, 184, 75, 0.16); color: #f7d58c; }
html[data-theme="dark"] .ba-pill-mission { background: rgba(251, 146, 60, 0.16); color: #fdba74; }
html[data-theme="dark"] .ba-duration-warn { color: #fbbf24; }
html[data-theme="dark"] .cmc-table tr.standby-reply-yes td { background: rgba(76, 201, 138, 0.1); }
html[data-theme="dark"] .cmc-table tr.standby-reply-no td { background: rgba(242, 104, 92, 0.1); }
html[data-theme="dark"] .cmc-table tr.standby-reply-pending td { background: rgba(148, 163, 184, 0.08); }
html[data-theme="dark"] .cmc-table tbody tr.standby-reply-yes:hover td { background: rgba(76, 201, 138, 0.18); }
html[data-theme="dark"] .cmc-table tbody tr.standby-reply-no:hover td { background: rgba(242, 104, 92, 0.18); }
html[data-theme="dark"] .cmc-table tbody tr.standby-reply-pending:hover td { background: rgba(148, 163, 184, 0.15); }

/* TeoSlot scheduler (static/teoslot/scheduler.css) ----------------------- */
html[data-theme="dark"] #teoslot-app #sidebar { background: #0d1f40; }
html[data-theme="dark"] #teoslot-app .tb-btn,
html[data-theme="dark"] #teoslot-app .btn { background: var(--ui-surface-2); color: var(--ui-text); border-color: var(--line-strong); }
html[data-theme="dark"] #teoslot-app .tb-btn:hover,
html[data-theme="dark"] #teoslot-app .btn:hover { background: #1b2843; border-color: #41598a; }
html[data-theme="dark"] #teoslot-app .tb-btn.primary,
html[data-theme="dark"] #teoslot-app .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
html[data-theme="dark"] #teoslot-app .btn.danger { background: transparent; border-color: rgba(242, 104, 92, 0.5); color: #ff8a80; }
html[data-theme="dark"] #teoslot-app .chip.locked { background: rgba(242, 184, 75, 0.16); color: #f7d58c; }
html[data-theme="dark"] #teoslot-app .modal,
html[data-theme="dark"] #teoslot-app .admin-card,
html[data-theme="dark"] #teoslot-app .admin-panel > table.data,
html[data-theme="dark"] #teoslot-app .admin-panel > form > table.data,
html[data-theme="dark"] #teoslot-app #gantt-wrap,
html[data-theme="dark"] #teoslot-app .gantt-scale,
html[data-theme="dark"] #teoslot-app .month-cell,
html[data-theme="dark"] #teoslot-app .year-month-card { background: var(--paper-card); }
html[data-theme="dark"] #teoslot-app .field input[type=text],
html[data-theme="dark"] #teoslot-app .field input[type=date],
html[data-theme="dark"] #teoslot-app .field input[type=number],
html[data-theme="dark"] #teoslot-app .field select,
html[data-theme="dark"] #teoslot-app .field textarea { background: #0d1628; color: var(--ui-text); border-color: var(--line-strong); }
html[data-theme="dark"] #teoslot-app table.data th { background: var(--ui-surface-2); }
html[data-theme="dark"] #teoslot-app #conflicts-drawer { background: var(--paper-card); box-shadow: -6px 0 24px rgba(0, 0, 0, 0.5); }
html[data-theme="dark"] #teoslot-app .ymini-cell { background: #0d1628; color: #6f819c; }
html[data-theme="dark"] #teoslot-app table.data td { border-bottom-color: #1c2a44; }
html[data-theme="dark"] #teoslot-app table.data tr:hover td { background: #15213a; }
html[data-theme="dark"] #teoslot-app .gd-cell { border-right-color: #1a2740; }
html[data-theme="dark"] #teoslot-app .gd-cell.weekend,
html[data-theme="dark"] #teoslot-app .gantt-bg-cell.weekend { background: #0e182b; }
html[data-theme="dark"] #teoslot-app .gd-cell.holiday { background: #18233a; }
html[data-theme="dark"] #teoslot-app .gantt-track { border-bottom-color: #18243b; }
html[data-theme="dark"] #teoslot-app .gantt-bg-cell { border-right-color: #152036; }
html[data-theme="dark"] #teoslot-app .gantt-bg-cell.holiday { background: repeating-linear-gradient(45deg, #16213a, #16213a 4px, #1c2944 4px, #1c2944 8px); }
html[data-theme="dark"] #teoslot-app .month-cell.weekend { background: #0e182b; }
html[data-theme="dark"] #teoslot-app .month-cell.holiday { background: rgba(167, 139, 250, 0.1); }
html[data-theme="dark"] #teoslot-app .month-cell .holname { color: #c4b5fd; }
html[data-theme="dark"] #teoslot-app .ymini-cell.weekend { background: #18233a; }
html[data-theme="dark"] #teoslot-app .ymini-cell.holiday { background: #31466b; color: var(--ui-text); }
html[data-theme="dark"] #teoslot-app .diff-add { background: rgba(76, 201, 138, 0.18); }
html[data-theme="dark"] #teoslot-app .diff-rem { background: rgba(242, 104, 92, 0.18); }
html[data-theme="dark"] #teoslot-app .diff-chg { background: rgba(242, 184, 75, 0.18); }

/* TeoSlot booking (static/teoslot/booking.css) --------------------------- */
html[data-theme="dark"] .tr-page input[type=text],
html[data-theme="dark"] .tr-page input[type=email],
html[data-theme="dark"] .tr-page input[type=password],
html[data-theme="dark"] .tr-page input[type=date],
html[data-theme="dark"] .tr-page input[type=time],
html[data-theme="dark"] .tr-page input[type=number],
html[data-theme="dark"] .tr-page input[type=file],
html[data-theme="dark"] .tr-page select,
html[data-theme="dark"] .tr-page textarea { background-color: #0d1628; color: var(--ui-text); border-color: var(--line-strong); }
html[data-theme="dark"] .tr-page .tr-btn.tr-ghost { background: var(--ui-surface-2); color: #93c5fd; border-color: var(--line-strong); }
html[data-theme="dark"] .tr-page .tr-btn.tr-ghost:hover { background: var(--accent-soft); border-color: #41598a; }
html[data-theme="dark"] .tr-page .tr-btn.tr-ghost.tr-danger { background: transparent; color: #ff8a80; border-color: rgba(242, 104, 92, 0.45); }
html[data-theme="dark"] .tr-page .tr-err { color: #ffb4ab; border-color: rgba(242, 104, 92, 0.4); }
html[data-theme="dark"] .tr-page .tr-ok { background: rgba(76, 201, 138, 0.12); color: #9ee6bf; border-color: rgba(76, 201, 138, 0.35); }
html[data-theme="dark"] .tr-page .tr-pill-COMPLETED,
html[data-theme="dark"] .tr-page .tr-online-badge { background: rgba(129, 140, 248, 0.18); color: #c7d2fe; }
html[data-theme="dark"] .tr-page .tr-tabs,
html[data-theme="dark"] .tr-page .tr-modal { background: var(--paper-card); }
html[data-theme="dark"] .who-seen b { color: #f2c14e; }
html[data-theme="dark"] .is-active .who-seen b { color: var(--cmc-green); }
html[data-theme="dark"] .tr-page th { background: var(--ui-surface-2); }
html[data-theme="dark"] .tr-page td { border-bottom-color: #1c2a44; }
html[data-theme="dark"] .tr-page tr:hover td { background: #15213a; }
html[data-theme="dark"] .tr-page .tr-block-row.FREE,
html[data-theme="dark"] .tr-page .tr-stat { background: var(--ui-surface-2); }
html[data-theme="dark"] .tr-page .tr-block-row.BREAK { background: rgba(251, 146, 60, 0.12); color: #fdba74; }
html[data-theme="dark"] .tr-page .tr-badge-disabled,
html[data-theme="dark"] .tr-page .tr-subjrow-status.INCART,
html[data-theme="dark"] .tr-page .tr-seat.tr-seat-taken { background: #1b2843; }
html[data-theme="dark"] .tr-page .tr-vmap { background: #0e1729; }
html[data-theme="dark"] .tr-page .tr-banner { color: #bfdbfe; border-color: rgba(96, 165, 250, 0.35); }
html[data-theme="dark"] .tr-page .tr-subjrow-status.MINE { background: rgba(96, 165, 250, 0.2); color: #bfdbfe; }
html[data-theme="dark"] .tr-page .tr-subjrow.tr-clickable:hover,
html[data-theme="dark"] .tr-page .tr-room-row:hover { filter: brightness(1.15); }
html[data-theme="dark"] .tr-page .tr-cal-cell.tr-cal-outside { background: #0c1424; border-color: #18243b; }
html[data-theme="dark"] .tr-page .tr-cal-cell.tr-cal-weekend:not(.tr-cal-outside):not(.tr-cal-open):not(.tr-cal-selected) { background: #121c30; }
html[data-theme="dark"] .tr-page .tr-cal-cell.tr-cal-open { background: rgba(59, 130, 246, 0.08); }
html[data-theme="dark"] .tr-page .tr-stat-n { color: var(--ink-900); }
html[data-theme="dark"] .tr-page .tr-stat.tr-stat-pass .tr-stat-n { color: #5fd69a; }
html[data-theme="dark"] .tr-page button.tr-btn.tr-btn-fl-schedule,
html[data-theme="dark"] .tr-page .tr-assigned,
html[data-theme="dark"] .tr-page .tr-assigned:hover { background: rgba(76, 201, 138, 0.16); color: #8de3b6; }
html[data-theme="dark"] .tr-page button.tr-btn.tr-btn-fl-schedule:hover { background: rgba(76, 201, 138, 0.26); color: #b4efcf; }
html[data-theme="dark"] .tr-page button.tr-btn.tr-btn-fl-schedule.tr-fl-marked-btn { background: #16a34a; color: #fff; }
html[data-theme="dark"] .tr-page td.tr-req-fl-marked-cell,
html[data-theme="dark"] .tr-page td.tr-req-group-student.tr-req-fl-marked-cell { background: rgba(76, 201, 138, 0.1); border-bottom-color: rgba(76, 201, 138, 0.3); }
html[data-theme="dark"] .tr-page tr:hover td.tr-req-fl-marked-cell,
html[data-theme="dark"] .tr-page tr:hover td.tr-req-group-student.tr-req-fl-marked-cell { background: rgba(76, 201, 138, 0.18); }
html[data-theme="dark"] .tr-page tr:hover td.tr-req-item-cell:not(.tr-req-fl-marked-cell) { background: #15213a; }
html[data-theme="dark"] .tr-page tr.tr-req-group-continued td.tr-req-item-cell { border-top-color: #233452; }
html[data-theme="dark"] .tr-page .tr-fl-conflict { background: rgba(242, 184, 75, 0.1); color: #f7d58c; }
html[data-theme="dark"] .ts-dropdown.tr-instructor-dd { background: var(--ui-surface); }

/* TeoSlot official examination (static/teoslot/official_exam.css) -------- */
html[data-theme="dark"] .oe-form .oe-field > .oe-label,
html[data-theme="dark"] .oe-form .oe-field > label,
html[data-theme="dark"] .oe-form .oe-field select:disabled,
html[data-theme="dark"] .oe-form .oe-chip,
html[data-theme="dark"] .oe-list .oe-chip { color: var(--ui-text-2); }
html[data-theme="dark"] .oe-form .oe-req { color: #ff8a80; }
html[data-theme="dark"] .oe-form .oe-field input,
html[data-theme="dark"] .oe-form .oe-field select,
html[data-theme="dark"] .oe-form .oe-field textarea,
html[data-theme="dark"] .oe-form .oe-file input[type="file"],
html[data-theme="dark"] .oe-form .oe-id-preview img { background: #0d1628; color: var(--ui-text); }
html[data-theme="dark"] .oe-form .oe-field input[readonly],
html[data-theme="dark"] .oe-form .oe-field select:disabled { background: var(--oe-paper); color: var(--ui-text-2); }
html[data-theme="dark"] .oe-form .oe-subject.is-disabled { background: var(--ui-surface-2); }
html[data-theme="dark"] .oe-form .oe-submit { background: #2563eb; }
html[data-theme="dark"] .oe-form .oe-submit:hover { background: #1d4ed8; }
html[data-theme="dark"] .oe-form .oe-subject,
html[data-theme="dark"] .oe-form .oe-sig-option,
html[data-theme="dark"] .oe-list .oe-row { background: var(--ui-surface); }
html[data-theme="dark"] .oe-form .oe-subject.is-on { background: rgba(96, 165, 250, 0.12); border-color: rgba(96, 165, 250, 0.5); }
html[data-theme="dark"] .oe-form .oe-subject.is-locked { border-color: rgba(76, 201, 138, 0.4); background: rgba(76, 201, 138, 0.08); }
html[data-theme="dark"] .oe-list .oe-row.is-booked { background: rgba(76, 201, 138, 0.07); }
html[data-theme="dark"] .oe-list .oe-rows,
html[data-theme="dark"] .oe-list .oe-row + .oe-row { border-color: var(--ui-border); }
html[data-theme="dark"] .oe-list .oe-app-who h3,
html[data-theme="dark"] .oe-list .oe-exam-name,
html[data-theme="dark"] .oe-list .oe-row-when { color: var(--ui-text); }
html[data-theme="dark"] .oe-list .oe-app-who p,
html[data-theme="dark"] .oe-list .oe-row-muted,
html[data-theme="dark"] .oe-list .oe-count,
html[data-theme="dark"] .oe-list .oe-howto .oe-lead { color: var(--ui-text-3); }
html[data-theme="dark"] .oe-list .oe-chip { background: var(--ui-surface-2); border-color: var(--ui-border); }
html[data-theme="dark"] .oe-list .oe-waiting,
html[data-theme="dark"] .oe-list .tr-pill-EMAIL_SENT { background: rgba(251, 146, 60, 0.12); border-color: rgba(251, 146, 60, 0.4); color: #fdba74; }
html[data-theme="dark"] .oe-list .oe-subject-code,
html[data-theme="dark"] .oe-list .oe-howto > summary,
html[data-theme="dark"] .oe-list .oe-howto .oe-lead a { color: #7cb3ff; }
html[data-theme="dark"] .oe-list .oe-result-save input { background: #0d1628; border-color: var(--ui-border); color: var(--ui-text); }
html[data-theme="dark"] .oe-list .oe-row-panel { border-color: rgba(96, 165, 250, 0.3); background: rgba(59, 130, 246, 0.06); }
html[data-theme="dark"] .oe-list .oe-booked-actions { border-color: rgba(96, 165, 250, 0.3); }
html[data-theme="dark"] .oe-list .tr-pill-SUBMITTED { background: rgba(96, 165, 250, 0.15); color: #93c5fd; }
html[data-theme="dark"] .oe-list .tr-pill-BOOKED { background: rgba(76, 201, 138, 0.15); color: #8de3b6; }

/* Sign-in, password reset, TeoSlot registration (static/css/auth.css) ----- */
html[data-theme="dark"] .auth-body { background: var(--ui-bg); color: var(--ui-text); }
html[data-theme="dark"] .auth-side { background:
    radial-gradient(90% 60% at 0% 0%, rgba(14, 165, 233, 0.2), transparent 60%),
    radial-gradient(70% 50% at 100% 100%, rgba(29, 78, 216, 0.3), transparent 60%),
    linear-gradient(160deg, #0d1f40 0%, #081429 100%); }
html[data-theme="dark"] .auth-card .auth-sub,
html[data-theme="dark"] .auth-card .auth-sub p { color: var(--ui-text-2); }
html[data-theme="dark"] .auth-panel { border-color: var(--ui-border); background: var(--ui-surface); box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.6); }
html[data-theme="dark"] .auth-panel label,
html[data-theme="dark"] .auth-panel .auth-label { color: var(--ui-text-2); }
html[data-theme="dark"] .auth-panel input[type="text"],
html[data-theme="dark"] .auth-panel input[type="email"],
html[data-theme="dark"] .auth-panel input[type="password"],
html[data-theme="dark"] .auth-panel select { border-color: var(--ui-border-strong); background: #0d1628; color: var(--ui-text); box-shadow: none; }
html[data-theme="dark"] .auth-btn { background: var(--ui-primary); }
html[data-theme="dark"] .auth-btn:hover { background: var(--ui-primary-hover); }
html[data-theme="dark"] .auth-links a { color: #7cb3ff; }
html[data-theme="dark"] .auth-links a:hover { color: #a5cbff; }
html[data-theme="dark"] .auth-alert { border-color: rgba(76, 201, 138, 0.35); background: rgba(76, 201, 138, 0.12); color: #9ee6bf; }
html[data-theme="dark"] .auth-alert.is-error { border-color: rgba(242, 104, 92, 0.4); background: rgba(242, 104, 92, 0.13); color: #ffb4ab; }
html[data-theme="dark"] .auth-error { color: #ff9b91; }
html[data-theme="dark"] .auth-foot { color: var(--ui-text-3); }
.auth-theme { position: fixed; top: 14px; right: 14px; z-index: 10; }
.auth-theme .theme-toggle { border: 1px solid #dfe7f1; background: #fff; color: #475a74; }
html[data-theme="dark"] .auth-theme .theme-toggle { border-color: var(--ui-border); background: var(--ui-surface); color: var(--ui-text-2); }

/* Sheets printed from a dark screen still print on white ------------------ */
@media print {
  html[data-theme="dark"] { color-scheme: light; }
  html[data-theme="dark"] body { background: #fff; color: #000; }
}

/* CMC polish layer (static/cmc/cmc.css, end of file) */
html[data-theme="dark"] {
  --cmc-row-alt: rgba(255, 255, 255, 0.02);
  --cmc-row-hover: #15213a;
  --cmc-head-bg: #121c31;
}
html[data-theme="dark"] .logic-box { background: rgba(96, 165, 250, 0.08); border-color: rgba(96, 165, 250, 0.22); border-left-color: #60a5fa; }
html[data-theme="dark"] .st.active { background: rgba(76, 201, 138, 0.14); color: #6ee7a8; }
html[data-theme="dark"] .cmc-table tbody tr:hover td,
html[data-theme="dark"] .cmc-table tr.clickable:hover td { background: var(--cmc-row-hover); }
html[data-theme="dark"] .tr-page .tr-pill-recovery { background: rgba(167, 139, 250, 0.18); color: #c4b5fd; }
html[data-theme="dark"] .tr-page .tr-recovery { background: rgba(167, 139, 250, 0.06); border-color: rgba(167, 139, 250, 0.4); }
html[data-theme="dark"] .tr-page .tr-recovery summary,
html[data-theme="dark"] .tr-page .tr-recovery-note { color: #c4b5fd; }
html[data-theme="dark"] .tr-page .tr-recovery-field { color: var(--ui-text-2, #a7b6cc); }
html[data-theme="dark"] .oe-list .oe-app.is-sent { background: linear-gradient(90deg, rgba(76, 201, 138, 0.14), rgba(76, 201, 138, 0.03) 60%), var(--ui-surface); border-color: rgba(76, 201, 138, 0.45); box-shadow: inset 4px 0 0 #4cc98a; }
html[data-theme="dark"] .oe-list .oe-sent-note { background: rgba(76, 201, 138, 0.16); color: #86efac; }
html[data-theme="dark"] .oe-list .oe-app .tr-btn.oe-sent-btn { background: transparent; color: #86efac; border-color: rgba(76, 201, 138, 0.5); }
html[data-theme="dark"] .oe-list .oe-app .tr-btn.oe-sent-btn.is-on { background: linear-gradient(180deg, #22c55e, #16a34a); color: #fff; }
html[data-theme="dark"] .oe-list .oe-app .tr-btn.oe-sent-btn:not(.is-on):hover { background: rgba(76, 201, 138, 0.12); color: #86efac; }
html[data-theme="dark"] .tr-page .tr-recovery-blocked { background: rgba(242, 184, 75, 0.12); color: #f7d58c; }
html[data-theme="dark"] .tr-page.tr-student-cal .tr-cal-sw-holiday { background: rgba(167, 139, 250, 0.1); border-color: rgba(167, 139, 250, 0.35); }
html[data-theme="dark"] .tr-page.tr-student-cal .tr-cal-legend-gantt .tr-cal-sw-holiday { background: repeating-linear-gradient(45deg, #16213a, #16213a 2px, #1c2944 2px, #1c2944 4px); border-color: var(--ui-border); }
html[data-theme="dark"] .tr-page .tr-nonrec .tr-btn.tr-nonrec-btn { background: transparent; color: #fca5a5; border-color: rgba(248, 113, 113, 0.5); }
html[data-theme="dark"] .tr-page .tr-nonrec .tr-btn.tr-nonrec-btn:hover { background: rgba(248, 113, 113, 0.1); color: #fecaca; }
html[data-theme="dark"] .tr-page .tr-nonrec-sent { color: #86efac; }
html[data-theme="dark"] .tr-page .tr-recovery-subjects { background: var(--ui-surface); border-color: var(--ui-border); }
html[data-theme="dark"] .tr-page .tr-recovery-subjects legend { color: var(--ui-text-2); }
html[data-theme="dark"] .tr-page .tr-recovery-subject { border-bottom-color: var(--ui-border); color: var(--ui-text); }
html[data-theme="dark"] .tr-page .tr-recovery-subject:has(input:checked) { background: rgba(167, 139, 250, 0.12); }
