/* Night appearance. Explicit choice on the dashboard, persisted per device. */
html[data-app-theme="dark"]{
  color-scheme:dark;
  --app-bg:#101713;
  --app-card:#1b2720;
  --app-ink:#f0f6ed;
  --app-muted:#b4c4b3;
  --app-line:#364b3e;
  --app-lime:#daf38c;
  --app-hero:#25362b;
}
html[data-app-theme="dark"] body{background:var(--app-bg)!important;color:var(--app-ink)}
html[data-app-theme="dark"] .tatmak-app-header{background:rgba(20,29,23,.78)}
html[data-app-theme="dark"] .tatmak-app-brand small{color:#a0b39d}
html[data-app-theme="dark"] .tatmak-notification-button{background:#273329;color:#e6f0db}
html[data-app-theme="dark"] .tatmak-app-avatar{color:#243521}
html[data-app-theme="dark"] .tatmak-bottom-nav{background:linear-gradient(180deg,rgba(21,29,23,.74),rgba(21,29,23,.84));box-shadow:0 -8px 24px #060e092b}
html[data-app-theme="dark"] .tatmak-bottom-nav>a{color:#9dad9c}
html[data-app-theme="dark"] .tatmak-bottom-nav a.is-active{color:#ecf9c4}
html[data-app-theme="dark"] .tatmak-bottom-nav a.is-active .tatmak-bottom-icon{color:#2a3c22}
html[data-app-theme="dark"] .tatmak-nav-unread{border-color:#1b261d}
html[data-app-theme="dark"] .tatmak-inbox,html[data-app-theme="dark"] .tatmak-live-toast{background:#1e2920;border-color:#455944;color:#e6f2dd}
html[data-app-theme="dark"] .tatmak-inbox-heading button{background:#344637;color:#e8f4da}
html[data-app-theme="dark"] .tatmak-inbox-item{background:#28372b;border-color:#425743;color:#ecf4e7}
html[data-app-theme="dark"] .tatmak-inbox-item.is-unread{background:#344b31;border-color:#86a65a}
html[data-app-theme="dark"] .tatmak-inbox-item-icon{background:#42573d}
html[data-app-theme="dark"] .tatmak-inbox-item-text small,html[data-app-theme="dark"] .tatmak-inbox-item-text time{color:#a9b8a5}
html[data-app-theme="dark"] .tatmak-inbox-footnote{border-color:#425441;color:#a9b4a2}
html[data-app-theme="dark"] .tatmak-live-toast-content{color:#e8f3dd}
html[data-app-theme="dark"] .tatmak-live-toast-content small{color:#acb9a9}
html[data-app-theme="dark"] .tatmak-live-toast-icon{background:#3b5435}
html[data-app-theme="dark"] .tatmak-live-toast-close{color:#d1dec8}

/* Homepage and employee dashboard. Accent cards deliberately retain contrast. */
html[data-app-theme="dark"] .hub-app-kicker,html[data-app-theme="dark"] .hub-app-intro p{color:#9eae9b}
html[data-app-theme="dark"] .hub-app-kicker i{box-shadow:0 0 0 4px #2a4231}
html[data-app-theme="dark"] .hub-app-section>span{color:#a1b19d}
html[data-app-theme="dark"] .hub-app-action:not(.lime):not(.peach),html[data-app-theme="dark"] .hub-app-checklist,html[data-app-theme="dark"] .hub-app-quiz{background:#1e2a20;border-color:#3b4f3b;color:#ebf2e7}
html[data-app-theme="dark"] .hub-app-action.peach{background:#543b32;border-color:#775245;color:#fff0e6}
html[data-app-theme="dark"] .hub-app-action.peach>small{color:#ebc9b5}
html[data-app-theme="dark"] .hub-app-action:not(.lime):not(.peach)>small,html[data-app-theme="dark"] .hub-app-checklist small,html[data-app-theme="dark"] .hub-app-quiz em{color:#a5b2a2}
html[data-app-theme="dark"] .hub-app-quiz small{color:#b3c3a6}
html[data-app-theme="dark"] .hub-app-footnote{color:#a3b29f}
html[data-app-theme="dark"] .hub-app-manager{background:#30442e;color:#e9f6dc}
html[data-app-theme="dark"] .hub-app-manager small{color:#b9caaa}

/* Conversations: dark bubbles and an accessible fixed composer. */
html[data-app-theme="dark"] .problem-inbox-head h2,html[data-app-theme="dark"] .problem-list-head.is-chat-list strong{color:#ecf6e7}
html[data-app-theme="dark"] .problem-inbox-head p,html[data-app-theme="dark"] .problem-thread-preview{color:#a8b6a3}
html[data-app-theme="dark"] .problem-inbox-kicker{color:#b5d88a}
html[data-app-theme="dark"] .problem-list-head.is-chat-list strong span{color:#b3c9a4}
html[data-app-theme="dark"] .problem-list-head.is-chat-list .problem-live-state{color:#a7c49b}
html[data-app-theme="dark"] .problem-list-head.is-chat-list .problem-reload{background:#26382a;border-color:#435b46;color:#d5e5cd}
html[data-app-theme="dark"] .problem-thread-row{background:#1e2b21;border-color:#3d513e;color:#f1f6eb}
html[data-app-theme="dark"] .problem-thread-row.has-unread{background:#2b422c;border-color:#729756}
html[data-app-theme="dark"] .problem-thread-icon{background:#385338;color:#d4e9bf}
html[data-app-theme="dark"] .problem-thread-preview b{color:#d2e2cc}
html[data-app-theme="dark"] .problem-thread-labels,html[data-app-theme="dark"] .problem-thread-row-title time{color:#a5b7a3}
html[data-app-theme="dark"] .problem-filters button,html[data-app-theme="dark"] .problem-reload{background:#243226;border-color:#435644;color:#e5f0df}
html[data-app-theme="dark"] .problem-filters button.selected{background:#d5ee89!important;border-color:#d5ee89!important;color:#263522!important}
html[data-app-theme="dark"] .problem-board .problem-filters button{background:#243226;border-color:#435644;color:#e5f0df}
html[data-app-theme="dark"] .problem-board .problem-filters button span{background:#3a4f3c;color:#dcebd4}
html[data-app-theme="dark"] .problem-board .problem-filters button.selected span{background:#466039;color:#f2ffd1}
html[data-app-theme="dark"] .problem-board.is-thread{background:#101712}
html[data-app-theme="dark"] .problem-thread-head{background:#1d2b20;border-color:#3b513e;color:#edf4e8}
html[data-app-theme="dark"] .problem-thread-back{background:#314734;border-color:#4d654c;color:#ebf5e5}
html[data-app-theme="dark"] .problem-thread-heading small{color:#a2bba0}
html[data-app-theme="dark"] .problem-board.is-thread .problem-thread-info{background:#1f2c22;border-color:#3c4f3d}
html[data-app-theme="dark"] .problem-board.is-thread .problem-thread-info>summary{color:#d0e6be}
html[data-app-theme="dark"] .problem-board.is-thread .problem-thread-info>summary small,html[data-app-theme="dark"] .problem-board.is-thread .problem-thread-info-more{color:#a2b5a1}
html[data-app-theme="dark"] .problem-board.is-thread .problem-thread-info-body{border-color:#3b4c3c}
html[data-app-theme="dark"] .problem-board.is-thread .problem-thread-info-date,html[data-app-theme="dark"] .problem-board.is-thread .problem-thread-description{color:#b5c5af}
html[data-app-theme="dark"] .problem-thread-info .problem-meta-author{color:#cad8c5}
html[data-app-theme="dark"] .problem-chat-wrap{background:#17221a;border-color:#3b4d3c}
html[data-app-theme="dark"] .problem-chat-caption,html[data-app-theme="dark"] .problem-chat-compose{background:#203023;border-color:#3a523b;color:#e9f3df}
html[data-app-theme="dark"] .problem-chat-caption>span{color:#afc1a8}
html[data-app-theme="dark"] .problem-chat-bubble{background:#293b2d;border-color:#435a43}
html[data-app-theme="dark"] .problem-chat-bubble strong{color:#c5e1b3}
html[data-app-theme="dark"] .problem-chat-bubble time{color:#aebfa9}
html[data-app-theme="dark"] .problem-chat-bubble p{color:#edf4e5}
html[data-app-theme="dark"] .problem-chat-message.is-mine .problem-chat-bubble{background:#455b36;border-color:#728a51}
html[data-app-theme="dark"] .problem-chat-message.is-mine .problem-chat-bubble p{color:#f5ffe9}
html[data-app-theme="dark"] .problem-chat-event{background:#304132;color:#d8e6ce}
html[data-app-theme="dark"] .problem-chat-event span{color:#b8c5b1}
html[data-app-theme="dark"] .problem-chat-origin{background:#344c36;color:#f0f8e7}
html[data-app-theme="dark"] .problem-chat-compose textarea{background:#18251b;border-color:#486048;color:#eef7e8}
html[data-app-theme="dark"] .problem-chat-compose textarea::placeholder{color:#a9baaa}
html[data-app-theme="dark"] .problem-chat-new{background:#3c5932;border-color:#749b54;color:#ecf8dc}
html[data-app-theme="dark"] .problem-form,html[data-app-theme="dark"] .problem-empty,html[data-app-theme="dark"] .problem-card,html[data-app-theme="dark"] .problem-message{background:#1e2b21!important;border-color:#41543f!important;color:#ebf2e6}
html[data-app-theme="dark"] .problem-form-title p,html[data-app-theme="dark"] .problem-empty p,html[data-app-theme="dark"] .problem-description{color:#acb9aa}
html[data-app-theme="dark"] .problem-form>label,html[data-app-theme="dark"] .problem-form legend{color:#e0edde}
html[data-app-theme="dark"] .problem-form input,html[data-app-theme="dark"] .problem-form textarea,html[data-app-theme="dark"] .problem-priority label,html[data-app-theme="dark"] .problem-visibility>label{background:#263628;color:#f1f7ee;border-color:#4b6249;color-scheme:dark}
html[data-app-theme="dark"] .problem-priority label.selected,html[data-app-theme="dark"] .problem-visibility>label.selected{background:#3a4f35;border-color:#88a460}
html[data-app-theme="dark"] .problem-form>label.problem-anonymous{background:#302c40;border-color:#635978}
html[data-app-theme="dark"] .problem-form input::placeholder,html[data-app-theme="dark"] .problem-form textarea::placeholder{color:#91a393}
html[data-app-theme="dark"] .problem-form .problem-visibility small,html[data-app-theme="dark"] .problem-form .problem-anonymous small{color:#bec7bb}
html[data-app-theme="dark"] .problem-manager-actions button{background:#344334;color:#edf4e9;border-color:#60715a}
html[data-app-theme="dark"] .problem-manager-actions button.resolve{background:#536b3d;color:#f4fbe8}
html[data-app-theme="dark"] .problem-photo-loading{background:#27372c;color:#e2e9dc}

/* Schedule, requests, management and personal profile. */
html[data-app-theme="dark"] .calendar-page{--c-ink:#eef5e7;--c-paper:#101713;background:radial-gradient(ellipse 58% 15% at 100% 0%,#22382a,transparent),#101713!important;color:#e9f3e5}
html[data-app-theme="dark"] .calendar-heading p,html[data-app-theme="dark"] .calendar-kicker{color:#a9bca6}
html[data-app-theme="dark"] .calendar-tabs{background:#243225!important}
html[data-app-theme="dark"] .calendar-tabs button{color:#bbcab5!important}
html[data-app-theme="dark"] .calendar-tabs button.selected{background:#455d40!important;color:#f2f8e9!important}
html[data-app-theme="dark"] .calendar-grid-card,html[data-app-theme="dark"] .calendar-day-panel,html[data-app-theme="dark"] .calendar-roster,html[data-app-theme="dark"] .calendar-request,html[data-app-theme="dark"] .calendar-swap-panel,html[data-app-theme="dark"] .calendar-access-gate,html[data-app-theme="dark"] .calendar-state{background:#202d22!important;border-color:#40543e!important;color:#edf5e8!important}
html[data-app-theme="dark"] .calendar-welcome{background:#354831!important;border-color:#57734a!important;color:#eaf4dd!important}
html[data-app-theme="dark"] .calendar-admin-menu>summary,html[data-app-theme="dark"] .calendar-section-back button{background:#2a3b2d;border-color:#50674d;color:#edf5e8}
html[data-app-theme="dark"] .calendar-admin-popup{background:#223326;border-color:#496047}
html[data-app-theme="dark"] .calendar-admin-popup button{color:#eff7eb}
html[data-app-theme="dark"] .calendar-admin-popup button:hover,html[data-app-theme="dark"] .calendar-admin-popup button:focus-visible{background:#354c37}
html[data-app-theme="dark"] .calendar-cover-quick{background:#2b3b2d!important;color:#eaf2e4!important}
html[data-app-theme="dark"] .calendar-cell.is-day{background:#476036;color:#eaf4dc}
html[data-app-theme="dark"] .calendar-cell.is-night{background:#3a4650;color:#f4f6f5}
/* Calendar surfaces and all text inside them must share the same dark palette. */
html[data-app-theme="dark"] .calendar-filter button{background:#273a2b;border-color:#526a4e;color:#e8f4e3}
html[data-app-theme="dark"] .calendar-filter button.active{background:#d9f28b;border-color:#d9f28b;color:#263826}
html[data-app-theme="dark"] .calendar-month-heading button,html[data-app-theme="dark"] .calendar-today-btn{background:#314633;border-color:#668061;color:#f5fbee}
html[data-app-theme="dark"] .calendar-month-heading button:hover,html[data-app-theme="dark"] .calendar-today-btn:hover{background:#415a40}
html[data-app-theme="dark"] .calendar-cell.is-off{background:#344037;color:#e1ebe0}
html[data-app-theme="dark"] .calendar-cell.is-unknown{background:repeating-linear-gradient(135deg,#2a372c,#2a372c 5px,#354238 5px,#354238 10px);color:#c3d0c0}
html[data-app-theme="dark"] .calendar-cell.is-selected{border-color:#d8ef89;box-shadow:inset 0 0 0 1px #243224,0 0 0 1px #d8ef89}
html[data-app-theme="dark"] .calendar-legend{color:#d1dec9}
html[data-app-theme="dark"] .calendar-legend i{border-color:#7b9573}
html[data-app-theme="dark"] .calendar-legend-off{background:#839085}
html[data-app-theme="dark"] .calendar-legend-both{color:#e9f4d7}
html[data-app-theme="dark"] .calendar-month-stats{border-color:#445a42}
html[data-app-theme="dark"] .calendar-month-stats-heading>div>span,html[data-app-theme="dark"] .calendar-month-stats-warning{color:#b7c9ae}
html[data-app-theme="dark"] .calendar-month-stats-heading strong{color:#f3faed}
html[data-app-theme="dark"] .calendar-month-stat{background:#2c3e30;border-color:#53694f;color:#eef7ea}
html[data-app-theme="dark"] .calendar-month-stat.total{background:#425c37;border-color:#789b5e}
html[data-app-theme="dark"] .calendar-month-stat strong{color:#f6ffed}
html[data-app-theme="dark"] .calendar-month-stat span{color:#d2e2ca}
html[data-app-theme="dark"] .calendar-counts>div{background:#2c3d30;border-color:#546c50;color:#d7e6d2}
html[data-app-theme="dark"] .calendar-counts strong{color:#f6ffef}
html[data-app-theme="dark"] .calendar-counts span{color:#bfd9b3}
html[data-app-theme="dark"] .calendar-roster h3{background:#445d37;color:#f3fce8}
html[data-app-theme="dark"] .calendar-roster.night h3{background:#394451;color:#f1f5fa}
html[data-app-theme="dark"] .calendar-worker{border-color:#40523f;color:#ecf5e9}
html[data-app-theme="dark"] .calendar-worker small,html[data-app-theme="dark"] .calendar-confidence,html[data-app-theme="dark"] .calendar-empty-shift{color:#b8c9b3}
html[data-app-theme="dark"] .calendar-worker-avatar{background:#384b37;color:#e4f3d9}
html[data-app-theme="dark"] .calendar-cashier-hours{background:#2b3b2e;border-color:#50664c;color:#e9f4e3}
html[data-app-theme="dark"] .calendar-cashier-hours>div span{background:#405638;color:#ebf8db}
html[data-app-theme="dark"] .calendar-cashier-hours small{color:#b6c8b0}
html[data-app-theme="dark"] .profile-stats>div,html[data-app-theme="dark"] .profile-section{background:#1f2b21;border-color:#40523e;color:#eff6e9}
html[data-app-theme="dark"] .profile-stats strong{color:#eff7e8}
html[data-app-theme="dark"] .profile-stats span,html[data-app-theme="dark"] .profile-stats small{color:#acbda9}
html[data-app-theme="dark"] .profile-section-head a,html[data-app-theme="dark"] .profile-empty,html[data-app-theme="dark"] .profile-learning,html[data-app-theme="dark"] .profile-footnote{color:#b1c3ae}
html[data-app-theme="dark"] .profile-shifts>div,html[data-app-theme="dark"] .profile-list>div{background:#2b3a2d}
html[data-app-theme="dark"] .profile-shifts b,html[data-app-theme="dark"] .profile-list span,html[data-app-theme="dark"] .profile-categories strong{color:#d3e4bd}
html[data-app-theme="dark"] .profile-shifts small{color:#aebca9}
html[data-app-theme="dark"] .profile-categories>div{border-color:#435641}

/* Night cashier checklist and its editing controls. */
html[data-app-theme="dark"] .night-checklist-day-picker,html[data-app-theme="dark"] .night-checklist-summary,html[data-app-theme="dark"] .night-checklist-group,html[data-app-theme="dark"] .night-checklist-admin-content,html[data-app-theme="dark"] .night-checklist-history,html[data-app-theme="dark"] .night-checklist-message{background:#202b22;border-color:#42523e;color:#eff5e9}
html[data-app-theme="dark"] .night-checklist-group h4{background:#394c35;border-color:#50634a}
html[data-app-theme="dark"] .night-checklist-task{border-color:#354735}
html[data-app-theme="dark"] .night-checklist-task-copy strong{color:#edf5e9}
html[data-app-theme="dark"] .night-checklist-task.is-done .night-checklist-task-copy strong{color:#a9b6a6}
html[data-app-theme="dark"] .night-checklist-summary p,html[data-app-theme="dark"] .night-checklist-day-picker label,html[data-app-theme="dark"] .night-checklist-progress small{color:#adbaa8}
html[data-app-theme="dark"] .night-checklist-day-picker input,html[data-app-theme="dark"] .night-checklist-new input,html[data-app-theme="dark"] .night-checklist-new select,html[data-app-theme="dark"] .night-checklist-edit input,html[data-app-theme="dark"] .night-checklist-edit select{background:#2d3e30;border-color:#50634f;color:#edf6e8;color-scheme:dark}
html[data-app-theme="dark"] .night-checklist-admin-toggle,html[data-app-theme="dark"] .night-checklist-history button,html[data-app-theme="dark"] .night-checklist-admin-row>button{background:#29382c;border-color:#465b47;color:#e9f1e5}
html[data-app-theme="dark"] .night-checklist-history button.selected{background:#415936}
html[data-app-theme="dark"] .night-checklist-admin-row{border-color:#40513c}

/* Training screens still work without forcing a light flash on navigation. */
html[data-app-theme="dark"] .page-shell,html[data-app-theme="dark"] .setup-page,html[data-app-theme="dark"] .records-page,html[data-app-theme="dark"] .catalog-page{color:#eef6e9}
html[data-app-theme="dark"] .mode-card,html[data-app-theme="dark"] .answer,html[data-app-theme="dark"] .catalog-card,html[data-app-theme="dark"] .record,html[data-app-theme="dark"] .empty,html[data-app-theme="dark"] .panel{background:#223027;color:#edf3e9;border-color:#40553f}
html[data-app-theme="dark"] .page-intro,html[data-app-theme="dark"] .leaderboard-caption{color:#b5c5b2}

/* Replacement offers and management views contain several independent panels. */
html[data-app-theme="dark"] .calendar-cover-form,html[data-app-theme="dark"] .calendar-cover-offer,html[data-app-theme="dark"] .calendar-cover-empty,html[data-app-theme="dark"] .calendar-cover-history,html[data-app-theme="dark"] .coverage-expand-panel{background:#202d23;border-color:#40543f;color:#e9f3e7;box-shadow:none}
html[data-app-theme="dark"] .calendar-cover-form label,html[data-app-theme="dark"] .calendar-cover-roles legend{color:#edf5e9}
html[data-app-theme="dark"] .calendar-cover-form input,html[data-app-theme="dark"] .calendar-cover-form select,html[data-app-theme="dark"] .coverage-people-search,html[data-app-theme="dark"] .coverage-expand-panel>input{background:#28392c;border-color:#526752;color:#eaf4e8;color-scheme:dark}
html[data-app-theme="dark"] .calendar-cover-roles{border-color:#435942}
html[data-app-theme="dark"] .calendar-cover-roles p,html[data-app-theme="dark"] .calendar-cover-offer small,html[data-app-theme="dark"] .calendar-cover-offer p,html[data-app-theme="dark"] .calendar-cover-disclaimer,html[data-app-theme="dark"] .coverage-expand-panel>p{color:#aebfad}
html[data-app-theme="dark"] .coverage-audience-toggle button,html[data-app-theme="dark"] .calendar-cover-checkboxes label,html[data-app-theme="dark"] .calendar-cover-offer-actions button{background:#2a3a2c;border-color:#4c614b;color:#e8f2e4}
html[data-app-theme="dark"] .coverage-audience-toggle button.selected,html[data-app-theme="dark"] .calendar-cover-checkboxes label.checked{background:#50663d;border-color:#9dbb6a;color:#f4ffe8}
html[data-app-theme="dark"] .coverage-people-list label.is-unavailable{background:#303731}
html[data-app-theme="dark"] .coverage-people-list label small{color:#b0beb0}
html[data-app-theme="dark"] .calendar-cover-offer.status-pending_admin{background:#40382b;border-color:#8a7647}
html[data-app-theme="dark"] .calendar-cover-offer.status-approved{background:#30432b;border-color:#689456}
html[data-app-theme="dark"] .calendar-cover-offer-actions button.calendar-cover-yes{background:#d8ee84;color:#283722}
html[data-app-theme="dark"] .calendar-cover-absent>span{background:#354c32;border-color:#698358;color:#f0f9df}
html[data-app-theme="dark"] .manager-stats>div,html[data-app-theme="dark"] .manager-day,html[data-app-theme="dark"] .manager-approval,html[data-app-theme="dark"] .manager-open-row,html[data-app-theme="dark"] .manager-status{background:#202d22;border-color:#415641;color:#ebf5e8;box-shadow:none}
html[data-app-theme="dark"] .manager-stats .manager-stat-alert{background:#473a28;border-color:#9f804c}
html[data-app-theme="dark"] .manager-stats span,html[data-app-theme="dark"] .manager-stats small,html[data-app-theme="dark"] .manager-section-head>small,html[data-app-theme="dark"] .manager-workers small,html[data-app-theme="dark"] .manager-approval p,html[data-app-theme="dark"] .manager-open-row small{color:#b1c0ab}
html[data-app-theme="dark"] .manager-day-head{background:#344435;border-color:#506751}
html[data-app-theme="dark"] .manager-shift{border-color:#455644}
html[data-app-theme="dark"] .manager-shift-title{background:#4a5e3d;color:#f5ffe9}
html[data-app-theme="dark"] .manager-workers li{border-color:#3d4c3c}
html[data-app-theme="dark"] .manager-avatar{background:#354635;color:#e4f2db}
html[data-app-theme="dark"] .manager-actions button{background:#354538;border-color:#627461;color:#e9f3e5}
html[data-app-theme="dark"] .manager-actions button.approve{background:#d8ef83;color:#263922}
html[data-app-theme="dark"] .manager-all-clear{background:#31492f}

/* Dark-theme polish: graphite forest surfaces, readable controls, and restrained lime accents. */
html[data-app-theme="dark"] .tatmak-app-header{background:rgba(20,30,24,.78);border-color:#304337}
html[data-app-theme="dark"] .tatmak-bottom-nav{background:linear-gradient(180deg,rgba(20,29,24,.74),rgba(20,29,24,.84));border-color:rgba(167,206,154,.17)}
html[data-app-theme="dark"] .calendar-grid-card,html[data-app-theme="dark"] .calendar-day-panel{background:#1d2a22!important;border:1px solid #394e40!important;box-shadow:none;border-radius:22px}
html[data-app-theme="dark"] .calendar-month-heading h2,html[data-app-theme="dark"] .calendar-day-top h2{color:#f2f8ef}
html[data-app-theme="dark"] .calendar-weekdays{color:#b6c8b7}
html[data-app-theme="dark"] .calendar-cell{border:1px solid #36483b;box-shadow:none}
html[data-app-theme="dark"] .calendar-cell.is-day{background:#3e5b39;color:#f0f8ed;border-color:#526f46}
html[data-app-theme="dark"] .calendar-cell.is-night{background:#354357;color:#f5f7ff;border-color:#44556e}
html[data-app-theme="dark"] .calendar-cell.is-off{background:#2a3830;color:#dfebe1;border-color:#34463a}
html[data-app-theme="dark"] .calendar-cell.is-both{background:#603b37;color:#ffece5;border-color:#b46f62}
html[data-app-theme="dark"] .calendar-cell.is-extra{border:2px solid #a177c4}
html[data-app-theme="dark"] .calendar-cell.is-selected{border:2px solid #d9f487;box-shadow:0 0 0 2px #30462a}
html[data-app-theme="dark"] .calendar-cell.is-extra.is-selected{outline:2px solid #b68ad8;outline-offset:1px}
html[data-app-theme="dark"] .calendar-legend-day{background:#7da966}
html[data-app-theme="dark"] .calendar-legend-night{background:#7c8fb1}
html[data-app-theme="dark"] .calendar-legend-off{background:#6c8373}
html[data-app-theme="dark"] .calendar-legend-both{color:#f2b5a5}
html[data-app-theme="dark"] .calendar-legend i{border-color:#8ba294}
html[data-app-theme="dark"] .calendar-month-extra-count{background:#41324f;color:#efd9ff}
html[data-app-theme="dark"] .calendar-roster{background:#202e25!important;border:1px solid #3b5141!important;box-shadow:none;border-radius:19px}
html[data-app-theme="dark"] .calendar-roster h3{background:#354f3c;color:#effbe7}
html[data-app-theme="dark"] .calendar-roster.night h3{background:#354356;color:#f3f7fc}
html[data-app-theme="dark"] .calendar-worker{border-top:1px solid #3b4e40}
html[data-app-theme="dark"] .calendar-worker-label{background:#4c432e;color:#f5e1a3}
html[data-app-theme="dark"] .calendar-worker-label.extra{background:#443453;color:#eed8ff}
html[data-app-theme="dark"] .calendar-worker-label.changed{background:#503c37;color:#ffd5c6}
html[data-app-theme="dark"] .calendar-worker-label.double{background:#6c4037;color:#ffe7dc}
html[data-app-theme="dark"] .calendar-day-actions .calendar-edit-day{background:#2c4132;color:#dcf1d2;border:1px solid #53735a}
html[data-app-theme="dark"] .calendar-day-actions .calendar-edit-day[aria-expanded="true"]{background:#445f3a;border-color:#8fb573;color:#f3ffe8}
html[data-app-theme="dark"] .calendar-person-filter{color:#e6f0e1}
html[data-app-theme="dark"] .calendar-person-filter select,html[data-app-theme="dark"] .calendar-form select{background:#293a2e;border-color:#536a56;color:#eff8eb;color-scheme:dark}
html[data-app-theme="dark"] .calendar-form{background:#223127;border-color:#415b46;color:#eff8eb}
html[data-app-theme="dark"] .calendar-form h3,html[data-app-theme="dark"] .calendar-form label{color:#f0f8ed}
html[data-app-theme="dark"] .calendar-form p{color:#b3c3b2}
html[data-app-theme="dark"] .calendar-request-list .calendar-no-requests,html[data-app-theme="dark"] .calendar-request{background:#1e2b23!important;border-color:#3c5342!important;color:#f0f7ec}
html[data-app-theme="dark"] .calendar-request small,html[data-app-theme="dark"] .calendar-request-status{color:#c0d0bb}
html[data-app-theme="dark"] .calendar-request-buttons button{background:#d6ef8b;color:#2c4227;border-color:#d6ef8b}
html[data-app-theme="dark"] .calendar-request-buttons button+button{background:#47342e;color:#f8d9cf;border-color:#795349}
html[data-app-theme="dark"] .calendar-swap-panel-top h2,html[data-app-theme="dark"] .calendar-swap-step-body>label,html[data-app-theme="dark"] .calendar-swap-step-body>strong{color:#f2f8ed}
html[data-app-theme="dark"] .calendar-swap-panel-top>button{background:#2d4032;border-color:#58715a;color:#f0f8eb}
html[data-app-theme="dark"] .calendar-swap-step{border-color:#415843}
html[data-app-theme="dark"] .calendar-swap-step-num{background:#304333;border-color:#5c7a58;color:#e0f5cd}
html[data-app-theme="dark"] .calendar-swap-step-body>p{color:#b6c6b4}
html[data-app-theme="dark"] .calendar-swap-step-body input[type="date"]{background:#27392e;color:#f0f8e9;border-color:#55735a;color-scheme:dark}
html[data-app-theme="dark"] .calendar-swap-people>button{background:#27372c;color:#f2f8ed;border-color:#435c48}
html[data-app-theme="dark"] .calendar-swap-people>button.chosen{background:#405a39;border-color:#a9cf7d;box-shadow:none}
html[data-app-theme="dark"] .calendar-swap-people small,html[data-app-theme="dark"] .calendar-swap-preview span{color:#b4c7b1}
html[data-app-theme="dark"] .calendar-swap-avatar{background:#3b513e;color:#f3faed}
html[data-app-theme="dark"] .calendar-swap-people>button.chosen .calendar-swap-avatar{background:#5a764a}
html[data-app-theme="dark"] .calendar-swap-empty,html[data-app-theme="dark"] .calendar-swap-preview>div{background:#26372c;border-color:#49614c;color:#deebdb}
html[data-app-theme="dark"] .calendar-swap-preview>div+div{background:#354b33}
html[data-app-theme="dark"] .calendar-swap-warning{background:#473b28;border-color:#8d7245;color:#fff1cb}
html[data-app-theme="dark"] .calendar-swap-warning button{color:#fce4ad}
html[data-app-theme="dark"] .calendar-access-request{background:#202f25;border-color:#415844}
html[data-app-theme="dark"] .calendar-access-person strong,html[data-app-theme="dark"] .calendar-access-request label{color:#f0f7ed}
html[data-app-theme="dark"] .calendar-access-person small,html[data-app-theme="dark"] .calendar-access-hint{color:#b3c5b5}
html[data-app-theme="dark"] .calendar-access-request select{background:#293b30;border-color:#536c58;color:#f1f9ed;color-scheme:dark}

/* Chat: neutral incoming bubbles, one rich outgoing accent, and a slim integrated composer. */
html[data-app-theme="dark"] .problem-board.is-thread{background:#101713}
html[data-app-theme="dark"] .problem-thread-head,html[data-app-theme="dark"] .problem-board.is-thread .problem-thread-info{background:#1d2a22;border-color:#354c3d}
html[data-app-theme="dark"] .problem-thread-heading h2{color:#f0f7ec}
html[data-app-theme="dark"] .problem-chat-wrap{background:#151f19;border-color:#344b3d;box-shadow:none}
html[data-app-theme="dark"] .problem-chat-caption{background:#1c2a21;border-color:#354a3c;color:#e9f3e5}
html[data-app-theme="dark"] .problem-chat-caption i{color:#9dc89a}
html[data-app-theme="dark"] .problem-chat-bubble{background:#26352d;border-color:#385141;box-shadow:0 2px 9px #050a0618}
html[data-app-theme="dark"] .problem-chat-bubble strong{color:#d9edcc}
html[data-app-theme="dark"] .problem-chat-bubble time{color:#b7c7b5}
html[data-app-theme="dark"] .problem-chat-message.is-mine .problem-chat-bubble{background:#405a37;border-color:#66834e}
html[data-app-theme="dark"] .problem-chat-message.is-mine .problem-chat-bubble strong{color:#f3ffe8}
html[data-app-theme="dark"] .problem-chat-event{background:#2c3f30;color:#e0efdc}
html[data-app-theme="dark"] .problem-chat-compose{background:#1c2a22;border-color:#354b3d}
html[data-app-theme="dark"] .problem-chat-compose textarea{background:#283b2e;border:1px solid #49654e;color:#f5fbf1;box-shadow:none;caret-color:#ddf59b;color-scheme:dark}
html[data-app-theme="dark"] .problem-chat-compose textarea::placeholder{color:#b2c4b2}
html[data-app-theme="dark"] .problem-chat-compose textarea:focus{border-color:#9ac077;box-shadow:0 0 0 1px #9ac07777}
html[data-app-theme="dark"] .problem-chat-compose>button{background:#daf38c;color:#263d26}
html[data-app-theme="dark"] .problem-chat-compose>button:disabled{background:#394a3c;color:#98ac97;opacity:1}
html[data-app-theme="dark"] .problem-chat-new{background:#385b37;border-color:#7aab62;color:#f0f8e6}

/* A compact personal dashboard with the same surfaces as the rest of the app. */
html[data-app-theme="dark"] .profile-hero{background:#222e26;border:1px solid #3a5141;box-shadow:none;color:#f2f8ed}
html[data-app-theme="dark"] .profile-hero p{color:#c5d1c2}
html[data-app-theme="dark"] .profile-stats>div,html[data-app-theme="dark"] .profile-section{background:#1d2a22;border:1px solid #3a5140}
html[data-app-theme="dark"] .profile-shifts>div,html[data-app-theme="dark"] .profile-list>div{background:#29392d}
html[data-app-theme="dark"] .profile-section-head a{color:#cbe79d}

/* Replacement hub uses the same restrained graphite / green dark surfaces. */
html[data-app-theme="dark"] .replacement-hub{color:#f0f6eb}
html[data-app-theme="dark"] .replacement-hub-head h2{color:#f2f8ef}
html[data-app-theme="dark"] .replacement-hub-head p{color:#b8c9b9}
html[data-app-theme="dark"] .replacement-hub-choices button{background:#1d2b22;border-color:#3b5141;color:#f0f6ed}
html[data-app-theme="dark"] .replacement-hub-choices button:hover{background:#273b2b;border-color:#79976a}
html[data-app-theme="dark"] .replacement-hub-choices button.is-selected{background:#304a30;border-color:#9ec878;box-shadow:inset 0 0 0 1px #59754c}
html[data-app-theme="dark"] .replacement-hub-choice-icon{background:#304634;color:#dff1cd}
html[data-app-theme="dark"] .replacement-hub-choices button.is-selected .replacement-hub-choice-icon{background:#537143;color:#f4ffe8}
html[data-app-theme="dark"] .replacement-hub-choices button small{color:#bfcebb}
html[data-app-theme="dark"] .replacement-hub-links button{background:#213227;border-color:#435b46;color:#d4e7cd}
html[data-app-theme="dark"] .replacement-hub-links button.is-selected{background:#395538;border-color:#a1ca79;color:#f1ffe7}
html[data-app-theme="dark"] .replacement-hub-links button span{background:#527447;color:#f6ffe9}
html[data-app-theme="dark"] .replacement-hub-links .replacement-hub-back{background:transparent;border-color:transparent;color:#c2d3bd}
html[data-app-theme="dark"] .replacement-hub-hint{background:#1d2a22;border:1px solid #344d3a;color:#bbceb7}
html[data-app-theme="dark"] .replacement-hub .calendar-swap-panel,html[data-app-theme="dark"] .replacement-hub .calendar-cover-form{background:#1d2a22!important;border-color:#3d5642!important;box-shadow:none!important;color:#f0f7ed}
html[data-app-theme="dark"] .replacement-hub-requests .calendar-cover-list-heading h3{color:#eef7e9}
html[data-app-theme="dark"] .replacement-hub-requests .calendar-cover-list-heading h3 span{background:#49643c;color:#f5ffe7}

/* Night-mode polish for the compact shell, leadership toolbar and approval chat. */
html[data-app-theme="dark"] .tatmak-app-title{color:#f0f8eb}
html[data-app-theme="dark"] .tatmak-app-title small{color:#a3b79e}
html[data-app-theme="dark"] .tatmak-theme-quick{background:#27392d;border-color:#46634b;color:#e6f3dd}
html[data-app-theme="dark"] .tatmak-theme-quick svg{color:#dcf08e}
html[data-app-theme="dark"] .tatmak-bottom-icon .staff-avatar.is-nav{background:#405440;border-color:#738c65}
html[data-app-theme="dark"] .tatmak-nav-unread-count{border-color:#19271d}
html[data-app-theme="dark"] .calendar-manager-entry{background:#304535;border-color:#5d795c;color:#e5f4db}
html[data-app-theme="dark"] .calendar-manager-alert{box-shadow:0 0 0 2px #304535}
html[data-app-theme="dark"] .manager-hero{background:#222e26;border-color:#405a43;color:#f3faed;box-shadow:none}
html[data-app-theme="dark"] .manager-shortcuts button{background:#253729;border-color:#476149;color:#e8f5e1}
html[data-app-theme="dark"] .problem-inbox-notices{background:#25372a;border-color:#435b46;color:#e9f4e1}
html[data-app-theme="dark"] .problem-thread-row.is-approval{background:#332e22;border-color:#735e3d;color:#f5f3e7}
html[data-app-theme="dark"] .problem-thread-icon.is-approval{background:#58482d;color:#f2da9b}
html[data-app-theme="dark"] .problem-approval-status{color:#f3ca8e}
html[data-app-theme="dark"] .approval-thread-pending{background:#50402a;color:#f3d79d}
html[data-app-theme="dark"] .approval-thread-message{background:#26362b;border-color:#49614c;color:#f0f7ec}
html[data-app-theme="dark"] .approval-thread-message.is-system{background:#354d36;border-color:#62845b}
html[data-app-theme="dark"] .approval-thread-message small{color:#bfd5ad}
html[data-app-theme="dark"] .approval-thread-message p{color:#c3d1bd}
html[data-app-theme="dark"] .approval-thread-event{background:#324735;color:#d9efcd}
html[data-app-theme="dark"] .approval-thread-controls{background:#1d2a22;border-color:#425a46}
html[data-app-theme="dark"] .approval-thread-actions .is-reject{background:#4b332f;border-color:#785249;color:#f8cabc}

/* Readable reply quotes and reply composer in night mode. */
html[data-app-theme="dark"] .problem-chat-bubble .problem-chat-quote{background:#354637;border-left-color:#92ba72;color:#e0ebd8}
html[data-app-theme="dark"] .problem-chat-message.is-mine .problem-chat-quote{background:#344b30;border-left-color:#b0d78a}
html[data-app-theme="dark"] .problem-chat-bubble .problem-chat-quote strong{color:#d1edbf}
html[data-app-theme="dark"] .problem-chat-bubble .problem-chat-quote span{color:#bacab4}
html[data-app-theme="dark"] .problem-chat-message-actions button{color:#bed4b1}
html[data-app-theme="dark"] .problem-chat-message-actions button:hover{color:#ecffdd}
html[data-app-theme="dark"] .problem-reply-context-copy strong{color:#d4edbf}
html[data-app-theme="dark"] .problem-reply-context-copy small{color:#b4c3ae}
html[data-app-theme="dark"] .problem-reply-context>button{background:#334b38;color:#e5f2da}
@media(pointer:coarse){html[data-app-theme="dark"] .problem-chat-bubble::before{background:#446346;color:#e9f7dc}
  html[data-app-theme="dark"] .problem-chat-bubble.is-reply-ready::before{background:#d9f486;color:#273e1e}}

/* Leadership: same quiet, high-contrast navigation in dark mode. */
html[data-app-theme="dark"] .manager-dashboard{color:#eef5ea}
html[data-app-theme="dark"] .manager-home-header h2,html[data-app-theme="dark"] .manager-subpage-header h2,html[data-app-theme="dark"] .manager-dashboard .manager-section-head h3{color:#f0f8eb}
html[data-app-theme="dark"] .manager-home-header .manager-eyebrow{color:#c0df89}
html[data-app-theme="dark"] .manager-home-header p,html[data-app-theme="dark"] .manager-subpage-header p,html[data-app-theme="dark"] .manager-dashboard .manager-caveat{color:#b6c7b3}
html[data-app-theme="dark"] .manager-home-header .manager-refresh{background:#23372a;border-color:#405a44;color:#d0ee95}
html[data-app-theme="dark"] .manager-today-summary{background:#1d2e23;border-color:#405642}
html[data-app-theme="dark"] .manager-today-heading>span{color:#a8be9c}
html[data-app-theme="dark"] .manager-today-heading>strong{color:#d6e8cd}
html[data-app-theme="dark"] .manager-today-counts>span{background:#293e2e;border-color:#3e5642;color:#d8e8d3}
html[data-app-theme="dark"] .manager-today-counts strong{color:#f0f9e8}
html[data-app-theme="dark"] .manager-task{background:#203127;border-color:#3f5943;color:#f1f8ed;box-shadow:none}
html[data-app-theme="dark"] .manager-task.is-primary{background:#3b5539;border-color:#829e61}
html[data-app-theme="dark"] .manager-task-icon{background:#304b36;color:#c7e7aa}
html[data-app-theme="dark"] .manager-task.is-primary .manager-task-icon{background:#d5ed8e;color:#2a4228}
html[data-app-theme="dark"] .manager-task-copy small{color:#b3c5ad}
html[data-app-theme="dark"] .manager-task.is-primary .manager-task-copy small{color:#d6e5cd}
html[data-app-theme="dark"] .manager-task-arrow{color:#a6bea0}
html[data-app-theme="dark"] .manager-task-count{background:#334c39;color:#dcebcf}
html[data-app-theme="dark"] .manager-task-count.needs-attention{background:#634330;color:#ffe0bb}
html[data-app-theme="dark"] .manager-access-link,html[data-app-theme="dark"] .manager-back{color:#b8d88c}
html[data-app-theme="dark"] .manager-segmented{background:#1e3025;border-color:#3e5844}
html[data-app-theme="dark"] .manager-segmented button{color:#b7cdb2}
html[data-app-theme="dark"] .manager-segmented button.is-selected{background:#d8ee90;border-color:#a8c879;color:#263d25}
html[data-app-theme="dark"] .manager-roster-label{color:#b8cbb2}
html[data-app-theme="dark"] .manager-roster-card{background:#1d2c22;border-color:#405642}
html[data-app-theme="dark"] .manager-roster-card-head{border-color:#3d5241}
html[data-app-theme="dark"] .manager-roster-card-head h3{color:#eef8e9}
html[data-app-theme="dark"] .manager-roster-card-head>span{background:#36513b;color:#e0f1ce}
html[data-app-theme="dark"] .manager-roster-card .manager-workers li{border-color:#344737}
html[data-app-theme="dark"] .manager-roster-card .manager-workers small{color:#b2c6af}
html[data-app-theme="dark"] .manager-roster-card .manager-avatar{background:#324d37;color:#d9efc7}
html[data-app-theme="dark"] .manager-secondary-action{background:#304d36;border-color:#6d9659;color:#e1f4d2}
html[data-app-theme="dark"] .manager-dashboard .manager-section-head .calendar-kicker{color:#b1c797}
html[data-app-theme="dark"] .manager-exit-link{color:#c0de96}
html[data-app-theme="dark"] .manager-today-counts>button{background:#293e2e;border-color:#3e5642;color:#d8e8d3}
html[data-app-theme="dark"] .manager-today-counts>button:active{background:#3b5736}
html[data-app-theme="dark"] .manager-today-counts>button strong{color:#f0f9e8}
html[data-app-theme="dark"] .manager-today-counts>button i,html[data-app-theme="dark"] .manager-today-hint{color:#bbd2b1}
html[data-app-theme="dark"] .manager-task-pin{background:#253a2b;border-color:#496247;color:#e8f3e2}
html[data-app-theme="dark"] .manager-pin-panel{background:#203127;border-color:#425c46;color:#eef6e9}
html[data-app-theme="dark"] .manager-pin-symbol{background:#34513a}
html[data-app-theme="dark"] .manager-pin-panel p{color:#c5d6c0}
html[data-app-theme="dark"] .manager-pin-panel p strong{color:#e6f7d7}
html[data-app-theme="dark"] .manager-pin-panel ul{background:#2b4331;color:#d6ead0}
html[data-app-theme="dark"] .manager-pin-feedback.is-success{background:#2f5433;border-color:#638e5e;color:#e0f6d4}
html[data-app-theme="dark"] .manager-pin-feedback.is-error{background:#57382f;border-color:#95645a;color:#f9d4c4}
html[data-app-theme="dark"][data-tg-fullscreen="true"] body::before{background:linear-gradient(180deg,rgba(16,23,19,.88),rgba(16,23,19,.64));border-bottom-color:rgba(195,226,183,.13);box-shadow:0 9px 24px rgba(0,0,0,.1)}

/* Calm, full-height conversation in dark mode; only the composer is glassy. */
html[data-app-theme="dark"] .problem-board.is-thread.is-chat .problem-thread-topbar{background:linear-gradient(130deg,rgba(33,49,37,.94),rgba(24,38,30,.87));border-color:rgba(153,186,137,.19);box-shadow:0 5px 22px rgba(0,0,0,.11)}
html[data-app-theme="dark"] .problem-board.is-thread.is-chat .problem-thread-head{background:transparent;border:0}
html[data-app-theme="dark"] .problem-board.is-thread.is-chat .problem-thread-back{background:rgba(67,94,68,.4);border-color:rgba(164,195,144,.2);color:#e9f5df}
html[data-app-theme="dark"] .problem-board.is-thread.is-chat .problem-thread-heading small{color:#a9c3a3}
html[data-app-theme="dark"] .problem-board.is-thread.is-chat .problem-thread-info{background:transparent;border:0}
html[data-app-theme="dark"] .problem-board.is-thread.is-chat .problem-thread-info>summary{border-top-color:rgba(162,190,148,.13);color:#c3deba}
html[data-app-theme="dark"] .problem-board.is-thread.is-chat .problem-thread-info-body{border-top-color:rgba(162,190,148,.13)}
html[data-app-theme="dark"] .problem-board.is-thread.is-chat .problem-chat-wrap{background:transparent;border:0}
html[data-app-theme="dark"] .problem-chat-day{background:rgba(58,83,61,.48);border-color:rgba(168,194,153,.1);color:#bbd5b2}
html[data-app-theme="dark"] .problem-board.is-thread.is-chat .problem-chat-origin{background:#1c3023;border-color:rgba(122,165,113,.15);color:#c5dac1}
html[data-app-theme="dark"] .problem-board.is-thread.is-chat .problem-chat-origin>span{color:#b9db99}
html[data-app-theme="dark"] .problem-board.is-thread.is-chat .problem-chat-origin p{color:#d2e2ce}
html[data-app-theme="dark"] .problem-board.is-thread.is-chat .problem-chat-origin small{color:#9fba98}
html[data-app-theme="dark"] .problem-board.is-thread.is-chat .problem-chat-bubble{background:#26372b;border-color:rgba(142,183,132,.14);box-shadow:0 3px 12px rgba(0,0,0,.1)}
html[data-app-theme="dark"] .problem-board.is-thread.is-chat .problem-chat-message.is-mine .problem-chat-bubble{background:#3b5535;border-color:rgba(173,215,138,.24);box-shadow:0 3px 12px rgba(0,0,0,.12)}
html[data-app-theme="dark"] .problem-board.is-thread.is-chat .problem-chat-meta time{color:#b9c9b5}
html[data-app-theme="dark"] .problem-board.is-thread.is-chat .problem-chat-compose{background:rgba(29,44,34,.82);border-color:rgba(164,195,147,.15);box-shadow:0 -5px 24px rgba(0,0,0,.11)}
html[data-app-theme="dark"] .problem-board.is-thread.is-chat .problem-chat-compose textarea{background:rgba(43,64,49,.83);border-color:rgba(161,193,147,.2);color:#f2f9ec}
html[data-app-theme="dark"] .problem-board.is-thread.is-chat .problem-chat-compose textarea:focus{border-color:#add481;box-shadow:0 0 0 2px rgba(173,212,129,.16)}
html[data-app-theme="dark"] .problem-board.is-thread.is-chat .problem-chat-compose>button{background:#d9f486;color:#283e21}

html[data-app-theme="dark"] .problem-board.is-thread.is-chat .problem-chat-wrap::before{background:linear-gradient(180deg,rgba(16,23,18,.98) 0%,rgba(16,23,18,0) 100%)}
html[data-app-theme="dark"] .problem-board.is-thread.is-chat .problem-chat-bubble{box-shadow:0 4px 14px rgba(0,0,0,.18)}
html[data-app-theme="dark"] .problem-board.is-thread.is-chat .problem-chat-message.is-mine .problem-chat-bubble{box-shadow:0 4px 14px rgba(0,0,0,.15)}
html[data-app-theme="dark"] .problem-board.is-thread.is-chat .problem-chat-message-actions button{background:rgba(161,194,141,.13);color:#c9e9b9}
html[data-app-theme="dark"] .problem-board.is-thread.is-chat .problem-chat-message-actions button:hover,html[data-app-theme="dark"] .problem-board.is-thread.is-chat .problem-chat-message-actions button:focus-visible{background:rgba(161,194,141,.24);color:#e6f9da}
