/* The existing palette is the default. Dark colors are opt-in on this browser. */
.app-header__tools{gap:10px}
.app-header__tools>.menu-search{flex:1 1 auto;min-width:0}
.app-header__tools>.menu-search input{box-sizing:border-box;width:100%;min-width:0}
.app-theme-toggle{box-sizing:border-box;display:inline-flex;flex:0 0 34px;align-items:center;justify-content:center;width:34px;height:34px;min-height:34px;margin:0;padding:0;border:1px solid var(--header-line,#e7e8ea);border-radius:9px;background:#f8f8fa;color:var(--header-ink,#20242a);font:inherit;cursor:pointer}
.app-theme-toggle:hover{border-color:var(--header-orange,#ed6b14);color:var(--header-orange,#ed6b14)}
.app-theme-toggle:focus-visible{outline:3px solid rgba(237,107,20,.45);outline-offset:3px}
.app-theme-toggle svg{display:block;width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.app-theme-toggle [data-theme-icon="sun"]{display:none}
html[data-insida-theme="dark"] .app-theme-toggle [data-theme-icon="moon"]{display:none}
html[data-insida-theme="dark"] .app-theme-toggle [data-theme-icon="sun"]{display:block}
@media(min-width:1701px){.app-header__tools>.menu-search{width:clamp(155px,14vw,225px)}}
@media(min-width:1251px) and (max-width:1700px){.app-header{grid-template-columns:clamp(155px,13vw,215px) minmax(0,1fr) clamp(238px,19vw,278px)}}
@media(max-width:1250px){
  .app-header.is-menu-open .app-header__tools{display:flex;gap:10px;align-items:center}
  .app-header.is-menu-open .app-header__tools>.menu-search{flex:1 1 0;width:auto;min-width:0}
  .app-header.is-menu-open .app-theme-toggle{flex-basis:42px;width:42px;height:42px;min-height:42px}
  .app-header.is-menu-open .app-theme-toggle svg{width:21px;height:21px}
}
@media(max-width:600px){.app-header.is-menu-open .app-header__tools{width:100vw;max-width:100vw}}

@media screen{
  html[data-insida-theme="dark"]{
    color-scheme:dark;
    --theme-bg:#13181f;
    --theme-surface:#1d252f;
    --theme-raised:#27323f;
    --theme-line:#3b4858;
    --theme-text:#eef1f5;
    --theme-muted:#b3bfce;
    --theme-orange:#ff954d;
    --theme-hover:#34302d;
    --theme-shadow:0 8px 24px rgba(0,0,0,.2);
    --ink:var(--theme-text);
    --muted:var(--theme-muted);
    --grey:var(--theme-muted);
    --line:var(--theme-line);
    --paper:var(--theme-surface);
    --soft:var(--theme-raised);
    --panel:var(--theme-raised);
    --header-ink:var(--theme-text);
    --header-muted:var(--theme-muted);
    --header-line:var(--theme-line);
    --mk-bg:var(--theme-bg);
    --mk-border:var(--theme-line);
    --mk-muted:var(--theme-muted);
    accent-color:#ed6b14;
    scrollbar-color:#657386 var(--theme-bg);
  }
  html[data-insida-theme="dark"] body{background:var(--theme-bg)!important;color:var(--theme-text)}
  html[data-insida-theme="dark"] :is(main,[class$="-shell"],.own-pages,.article-page,.customer-shell,.psc-shell,.project-directory){color:var(--theme-text)}
  html[data-insida-theme="dark"] ::selection{background:#825124;color:#fff}

  /* Navigation, search and footer keep the same layout and orange brand accents. */
  html[data-insida-theme="dark"] .app-header{background:rgba(29,37,47,.98);box-shadow:0 5px 18px rgba(0,0,0,.2)}
  html[data-insida-theme="dark"] .app-header__brand{border-color:var(--theme-line);background:var(--theme-surface)}
  html[data-insida-theme="dark"] :is(.app-nav__submenu,.menu-search__results,.user-menu__panel){background:var(--theme-surface);border-color:var(--theme-line);box-shadow:var(--theme-shadow)}
  html[data-insida-theme="dark"] .app-nav__item>a{border-bottom-color:var(--theme-line)}
  html[data-insida-theme="dark"] :is(.app-nav__item.is-active>a,.app-nav__item>a:hover){border-bottom-color:#ed6b14;color:var(--theme-orange)}
  html[data-insida-theme="dark"] :is(.app-nav__submenu .app-nav__item>a:hover,.menu-search__results a:hover,.user-menu__panel a:hover,.user-menu__panel form button:hover){background:var(--theme-hover);color:var(--theme-orange)}
  html[data-insida-theme="dark"] .app-nav__item.has-children>a>.chevron{background:#493425}
  html[data-insida-theme="dark"] .app-nav__item.has-children>a>.chevron:after{border-color:var(--theme-orange)}
  html[data-insida-theme="dark"] :is(.app-header__tools,.app-header.is-menu-open .app-header__tools){background:var(--theme-surface);border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .app-theme-toggle{border-color:var(--theme-line);background:var(--theme-raised);color:var(--theme-text)}
  html[data-insida-theme="dark"] .app-theme-toggle:hover{border-color:var(--theme-orange);color:var(--theme-orange)}
  html[data-insida-theme="dark"] .search-filters label{border-color:var(--theme-line);background:var(--theme-raised);color:var(--theme-muted)}
  html[data-insida-theme="dark"] .search-filters label:has(input:checked){border-color:#ad652d;background:#493425;color:#ffc899}
  html[data-insida-theme="dark"] .app-footer{border-color:var(--theme-line);background:rgba(29,37,47,.98);color:var(--theme-muted);box-shadow:0 -5px 18px rgba(0,0,0,.15)}

  /* Named surface components used across Insida. Left status borders are untouched. */
  html[data-insida-theme="dark"] :is(
    .status-card,.side-card,.recent-projects,.news-panel,.news-card,.report-summary,
    .project-card,.project-empty,.project-directory__card,.project-directory__pending,
    .project-status-panel,.project-price-panel,.project-doc-card,.project-contact-card,
    .customer-card,.customer-new-card,.customer-directory__panel,.contact-card,
    .contact-directory__panel,.contact-directory__search,.inventory-card,.inventory-form-card,.instrument-card,
    .instrument-tile,.personal-card,.personal-new-card,.person-card,.relative-card,
    .circlek-card,.car-panel,.phone-panel,.relatives-panel,.article-panel,
    .absence-card,.vacation-card,.sa-card,.pl-card,.sick-card,.daily-audit,.vac-filter-card,.vac-table-card,.mytime-card,
    .time-entry,.time-filter,.timecard-list,.admin-timecard-employee,.completed-work-card,
    .booking-detail-card,.bo-board,.own-card,.psc-card,.form-card,.fr-card,
    .faq-card,.faq-editor-card,.quote-card,.license-card,.permission-card,
    .expense-card,.receipt-card,.billing-card,.merge-card,.scanning-compare-card,.cert-person,.cert-confirm,
    .inactive-card,.stats-card,.log-card,.calc-card,.calc-box,.calc-result-card,
    .calc-table-card,.ba-form-card,.ba-list-card,.menu-form-card,.menu-list-card,
    .latlong-card,.scanner-card,.va-card,.explorer-card,.external-card,.password-card,
    .forgot-card,.verify-card,.rescue-card,.economy-delivery-card,
    .quality-tools,.quality-status article,.quality-lists>section,.summary-grid article,.customer-directory__search,.order-card,.id06-card,.pick-card,.risk-edit-card,
    .project-settings section,.project-new-form>section,.project-created,.project-new-message,.booking-editor>form,.booking-send-form,.booking-send-error,.risk-analysis,.economy-prices,.settings-card,
    .economy-summary article,.project-bookings,.project-booking-history,
    .dropbox-explorer,.dropbox-project-linking,.project-time-search
  ){
    background-color:var(--theme-surface);
    background-image:none;
    border-top-color:var(--theme-line);
    border-right-color:var(--theme-line);
    border-bottom-color:var(--theme-line);
    color:var(--theme-text);
    box-shadow:var(--theme-shadow);
  }
  html[data-insida-theme="dark"] :is(
    .project-card dl>div,.project-settings section>header,.news-panel__header,
    .news-search,.recent-projects li,.report-day.is-new-week,.absence-card header,
    .instrument-card>header,.completed-work-date,.completed-work-nav,
    .quality-lists header,.quality-list article,.project-tabs,.psc-nav,
    .price-row,.connection-row,.project-directory__search,.project-directory__row,
    .project-directory__heading,.psc-list a,.own-table-wrap th,.own-table-wrap td,
    .timecard-head,.timecard-row,.explorer-row,.explorer-path,.booking-day>h3,
    .booking-day+.booking-day,.bo-row,.bo-unplanned,.customer-directory__row,
    fieldset,details,.field-check,.instrument-files,.instrument-files>a,
    .risk-analysis>header,.economy-prices header,.project-bookings>header,
    .project-booking-history>header,.project-booking-list>a,.project-booking-history a,
    .dropbox-explorer>header,.db-row,.db-path,.project-time-search__table-wrap
  ){border-color:var(--theme-line)}
  html[data-insida-theme="dark"] :is(
    .check-row,.settings-check,.settings-readonly,.price-add,.quality-tool-grid article,
    .quality-lists header>span,.project-directory__row:nth-child(odd),
    .customer-directory__row:nth-child(odd),.timecard-head,.explorer-path,
    .explorer-row.deleted,.bo-row:nth-of-type(even),.psc-create,
    .absence-card dl div,.instrument-tile dl div,.day-strip,.month-nav .current,.reported-month strong,
    .day-strip .weekend,.own-type,.progress,.temperature-input,.risk-options label,
    .db-path,.db-selected-account,.economy-prices header>span
  ){background:var(--theme-raised);color:var(--theme-text);border-color:var(--theme-line)}

  /* Native form controls adapt too, including the calendar picker. */
  html[data-insida-theme="dark"] :is(
    input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="color"]):not([type="submit"]):not([type="button"]):not([type="reset"]),
    select,textarea
  ){background-color:var(--theme-bg)!important;border-color:#586779!important;color:var(--theme-text)!important;caret-color:var(--theme-text);color-scheme:dark}
  html[data-insida-theme="dark"] :is(input,textarea)::placeholder{color:#a4b0bf;opacity:1}
  html[data-insida-theme="dark"] :is(input,select,textarea):focus{border-color:var(--theme-orange)!important;outline-color:var(--theme-orange)}
  html[data-insida-theme="dark"] :is(input,select,textarea):disabled,
  html[data-insida-theme="dark"] :is(input,textarea)[readonly]{background-color:var(--theme-raised)!important;color:var(--theme-muted)!important}
  html[data-insida-theme="dark"] :is(select option,select optgroup){background:var(--theme-surface);color:var(--theme-text)}
  html[data-insida-theme="dark"] input[type="file"]::file-selector-button{border:1px solid var(--theme-line);border-radius:5px;background:var(--theme-raised);color:var(--theme-text);padding:7px 10px;margin-right:10px}
  html[data-insida-theme="dark"] .offer-card>header small,html[data-insida-theme="dark"] .offer-toolbar{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .offer-toolbar a,html[data-insida-theme="dark"] .offer-preview,html[data-insida-theme="dark"] .offer-actions button[value="save"]{background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .offer-toolbar code{background:var(--theme-raised);color:var(--theme-text)}
  html[data-insida-theme="dark"] label{color:var(--theme-text)}
  html[data-insida-theme="dark"] :is(.settings-check strong,.project-card a,.explorer-name>a,.explorer-name>span,.bo-person,.connection-row,.psc-list a,.completed-work-nav a,.project-tabs a,.customer-tabs a,.psc-nav a){color:var(--theme-text)}
  html[data-insida-theme="dark"] :is(
    .own-heading span,.psc-heading span,.customer-heading span,.explorer-heading span,
    .completed-work-heading span,.bo-heading span,.project-meta,.muted,.coordinates,
    .project-card dt,.news-card time,.news-card__footer,.news-card__text,.news-date-edit,
    .news-like,.news-empty,.side-card p,.side-card__icon,.quote-author,
    .greeting-card h2 small,.occupancy-row span,.occupancy-row--personal strong,
    .clock-card>span,.recent-projects li span,.recent-projects>p,.report-day em,
    .settings-check small,.settings-readonly small,.settings-readonly span,
    .quality-status small,.quality-tool-grid p,.quality-tool-grid article>span,
    .quality-list time,.quality-list small,.quality-list p,.quality-empty,
    .project-directory__name small,.project-directory__note,.project-directory__empty,
    .customer-delete-form span,.price-title small,.connection-row span,.connection-row small,
    .own-count,.own-empty,.own-protected,.own-table-wrap td small,
    .psc-card header span,.psc-list small,.psc-language-row summary small,.psc-help,
    .explorer-name small,.explorer-row time,.explorer-row>span,.explorer-columns,
    .completed-work-empty,.timecard-child-note,.empty,.booking-empty,.bo-free,
    .week-period,.card-heading p,.project-note small,.folder-result span,.folder-result small,
    .risk-options small,.risk-analysis>header>span,.risk-analysis fieldset>p,
    .economy-summary small,.economy-prices header div>small,.economy-prices td small,
    .economy-empty,.project-bookings>header>span,.project-booking-list time span,
    .project-booking-list>a>div>span,.project-bookings-empty,
    .project-booking-history>header>span,.project-booking-history time small,
    .project-booking-history a>span,.dropbox-explorer header small,.db-row>span,
    .db-row>time,.db-selected-account span,.db-selected-account small,
    .db-account-link-form>p,.db-account-empty p,.project-time-search__hint,
    .project-time-search__empty,.project-time-search__summary,.project-time-search__heading span
  ){color:var(--theme-muted)}
  html[data-insida-theme="dark"] :is(.report-day,.work-day,.day-strip a){color:var(--theme-text)}
  html[data-insida-theme="dark"] .today-report-bookings small{color:var(--theme-muted)!important}
  html[data-insida-theme="dark"] :is(.eyebrow,.panel-eyebrow,.project-heading>div>p,.project-empty>p,.own-heading p,.psc-heading p,.quality-tools>header p,.quality-lists header p,.project-settings section>header p,.quality-status span){color:var(--theme-orange)}

  /* Secondary actions retain their outline; filled orange/red/green actions stay filled. */
  html[data-insida-theme="dark"] :is(
    .news-action,.own-button,.own-danger,.article-button:not(.primary),
    .project-actions a:not(.primary),.project-actions span,.project-empty a,
    .explorer-toolbar a,.explorer-toolbar button,.explorer-actions a,.explorer-actions button,
    .project-directory__actions>a,.project-directory__actions button,
    .project-directory__search a,.timecard-actions a,.timecard-actions button,
    .settings-actions a,.settings-verification a,.booking-editor header a,
    .customer-tabs a,.bo-heading a:not(.bo-pdf),.bo-help kbd,.quality-toggle,
    .quality-tool-action button,.quality-tool-grid article>a,.project-secret button,
    .db-toolbar button,.db-toolbar a,.db-tools button,.db-tools a,
    .db-account-actions button.secondary,.project-time-search__heading>a,
    .project-time-search__clear,.project-time-search__open,.vac-overview-heading a,.vac-filter a,
    .psc-heading>a,.psc-shell button:not(.primary),.passkey-button,.salary-form>a,
    .cancel-edit,.work-day,.month-nav .current,.table-list article button
  ){background:var(--theme-raised)!important;border-color:var(--theme-line);color:var(--theme-text)!important}
  html[data-insida-theme="dark"] :is(.own-danger,.psc-shell button.danger,.explorer-actions .danger,.project-directory__actions button.danger,.table-list article button){color:#ffb3ad!important;border-color:#99605c}
  html[data-insida-theme="dark"] :is(.work-day.selected,.customer-tabs a.is-active,.timecard-row.owned,.project-tabs .active,.psc-list a.selected,.day-strip .today,.explorer-row:hover,.completed-work-table tbody tr:hover,.risk-options label:has(input:checked),.db-row:hover,.project-booking-list>a:hover,.project-booking-history a:hover){background:var(--theme-hover)!important;color:#ffbc8b!important}
  html[data-insida-theme="dark"] :is(.project-tabs .active,.report-day.is-today strong,.report-day.is-today span,.report-day.is-today em,.day-strip .today strong,.day-strip .today span){color:var(--theme-orange)}
  html[data-insida-theme="dark"] :is(.completed-work-table td>a:not(.edit-timecard),.table-list article a,.project-results a,.explorer-path a){color:#ffd0aa}

  html[data-insida-theme="dark"] :is(.project-results,.contact-results,.booking-project-results,.picker-list,.db-list){background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] :is(.project-results a:hover,.psc-list a:hover){background:var(--theme-hover);color:var(--theme-orange)}
  html[data-insida-theme="dark"] :is(dialog,.weekend-dialog){background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-text);box-shadow:0 20px 65px rgba(0,0,0,.5)}
  html[data-insida-theme="dark"] dialog::backdrop{background:rgba(0,0,0,.68)}
  html[data-insida-theme="dark"] dialog header button{color:var(--theme-text)}
  html[data-insida-theme="dark"] .weekend-dialog button:not([value="include"]){background:var(--theme-raised);color:var(--theme-text);border-color:var(--theme-line)}

  /* Tables have dark headers and subtle alternating rows, without losing status colors. */
  html[data-insida-theme="dark"] :is(th,.timecard-head,.explorer-columns){background:var(--theme-raised);color:var(--theme-muted);border-color:var(--theme-line)}
  html[data-insida-theme="dark"] td{border-color:var(--theme-line)}
  html[data-insida-theme="dark"] :is(td:not([class]),.vac-table .name){background-color:transparent;color:var(--theme-text)}
  html[data-insida-theme="dark"] :is(.completed-work-table tbody tr.group-1,tbody tr:not([class]):nth-child(even)){background-color:rgba(255,255,255,.025)}
  html[data-insida-theme="dark"] .vac-table :is(th,td){border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .vac-table tbody tr:nth-child(even) :is(td,.name){background:var(--theme-raised)}
  html[data-insida-theme="dark"] .vac-table tbody tr:hover :is(td,.name){background:var(--theme-hover)}
  html[data-insida-theme="dark"] .vac-table :is(.sunday,.today){color:#202328}
  html[data-insida-theme="dark"] :is(.db-name,.project-booking-list>a,.project-booking-history a){color:var(--theme-text)}
  html[data-insida-theme="dark"] :is(.bo-row--head,.project-directory__row--head,.table-head){background:#303c4b!important;color:var(--theme-text)}
  html[data-insida-theme="dark"] .completed-work-table tbody tr:target{background:var(--theme-hover)!important}

  /* Warnings and success indicators remain distinguishable in the dark palette. */
  html[data-insida-theme="dark"] :is(
    .absence-status-card,.time-approval-reminder,.form-note,.admin-timecard-notice,
    .settings-verification,.quality-tool-grid article.needs-action,.project-alerts article,
    .bo-help,.customer-derived-prices,.psc-alert,.merge-notice,.summary-grid .attention,
    .approval.blocked,.day-strip .partial,.risk-verification,.project-derived-prices
  ){background:#392a1d;color:#ffd6ab;border-color:#875a32}
  html[data-insida-theme="dark"] :is(.absence-status-card__content>span,.time-approval-reminder span,.customer-derived-prices small,.project-alerts p){color:#d9c7b7}
  html[data-insida-theme="dark"] .absence-status-card__content>b{color:var(--theme-orange)}
  html[data-insida-theme="dark"] :is(
    .message.success,.absence-message.success,.settings-message.success,.own-notice:not(.error),
    .psc-alert.success,.completed-work-message.success,.project-note-message.success,
    .explorer-message.ok,.instrument-message.success,.vacation-message.success,
    .status.active,.quality-pill.done,.summary-grid .ok,.approval.approved,.approval.ready,
    .day-strip .complete,.customer-alert.is-success,.risk-message.success,
    .quality-operation-message.success,.economy-price-message.success,.db-note.ok
  ){background:#203c30;color:#b2e7c4;border-color:#52785e}
  html[data-insida-theme="dark"] :is(
    .message.error,.absence-message.error,.settings-message.error,.own-notice.error,
    .psc-alert.error,.completed-work-message.error,.project-note-message.error,
    .explorer-message.error,.instrument-message.error,.vacation-message.error,
    .login-error,.booking-error,.project-alerts article.danger,.customer-alert.is-error,
    .instrument-tile .late,.risk-message.error,.quality-operation-message.error,
    .economy-price-message.error,.db-note.error
  ){background:#432728;color:#ffc2bc;border-color:#946062}
  html[data-insida-theme="dark"] :is(.absence-message.warning,.quality-pill){background:#443520;color:#ffdea2;border-color:#8e784f}
  html[data-insida-theme="dark"] .project-alerts article.info{background:#24384d;color:#c3dcff;border-color:#546f91}
  html[data-insida-theme="dark"] .status.inactive{background:var(--theme-raised);color:var(--theme-muted)}

  /* Menu editor controls and rows. */
  html[data-insida-theme="dark"] body:has(.menu-editor){background:var(--theme-bg);color:var(--theme-text)}
  html[data-insida-theme="dark"] .menu-editor{color:var(--theme-text)}
  html[data-insida-theme="dark"] :is(.menu-form-card,.menu-list-card){border-color:var(--theme-line);background:var(--theme-surface);color:var(--theme-text);box-shadow:var(--theme-shadow)}
  html[data-insida-theme="dark"] .menu-heading>span,html[data-insida-theme="dark"] .menu-form-card label span{color:var(--theme-muted)}
  html[data-insida-theme="dark"] :is(.menu-form-card a,.menu-list-card a){color:#ffb27a}
  html[data-insida-theme="dark"] .menu-columns{border-color:var(--theme-line);background:var(--theme-raised);color:var(--theme-muted)}
  html[data-insida-theme="dark"] .menu-row{border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .menu-row:hover{background:var(--theme-hover)}
  html[data-insida-theme="dark"] .menu-row:target{background:#493425;outline-color:var(--theme-orange)}
  html[data-insida-theme="dark"] .menu-title span,html[data-insida-theme="dark"] .menu-title small,html[data-insida-theme="dark"] .menu-row code{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .menu-actions a,html[data-insida-theme="dark"] .menu-actions button{border-color:var(--theme-line);background:var(--theme-raised);color:var(--theme-text)}
  html[data-insida-theme="dark"] .menu-actions .danger{border-color:#99605c;background:#382629;color:#ffb3ad}
  html[data-insida-theme="dark"] .menu-message.ok{background:#20382c;color:#d9f3df}
  html[data-insida-theme="dark"] .menu-message.error{background:#432728;color:#ffd5d1}

  /* Log statistics page surfaces and chart tracks. */
  html[data-insida-theme="dark"] .stats-shell{color:var(--theme-text)}
  html[data-insida-theme="dark"] .stats-heading span,html[data-insida-theme="dark"] .stats-card header>span{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .presets a{border-color:var(--theme-line);background:var(--theme-raised);color:var(--theme-text)}
  html[data-insida-theme="dark"] .presets a.active{border-color:#ad652d;background:#493425;color:#ffc899}
  html[data-insida-theme="dark"] .stats-filter label{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .stats-filter input,html[data-insida-theme="dark"] .stats-filter select{border-color:#586779;background:var(--theme-bg);color:var(--theme-text);color-scheme:dark}
  html[data-insida-theme="dark"] .metrics article,html[data-insida-theme="dark"] .stats-card{border-color:var(--theme-line);background:var(--theme-surface);color:var(--theme-text);box-shadow:var(--theme-shadow)}
  html[data-insida-theme="dark"] .metrics span,html[data-insida-theme="dark"] .metrics small,html[data-insida-theme="dark"] .hour-chart small,html[data-insida-theme="dark"] .day-chart small,html[data-insida-theme="dark"] .live{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .stats-card>header,html[data-insida-theme="dark"] .ranking>div{border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .hour-chart i,html[data-insida-theme="dark"] .ranking i{background:#394655}
  html[data-insida-theme="dark"] .day-chart>div>i{border-color:var(--theme-line)}

  /* URL and text encoder tool. */
  html[data-insida-theme="dark"] .url-shell{color:var(--theme-text)}
  html[data-insida-theme="dark"] .url-card{border-color:var(--theme-line);background:var(--theme-surface);color:var(--theme-text);box-shadow:var(--theme-shadow)}
  html[data-insida-theme="dark"] .url-card>p:first-child{color:var(--theme-orange)}
  html[data-insida-theme="dark"] .url-card>p{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .url-card h1,html[data-insida-theme="dark"] .url-card label{color:var(--theme-text)}
  html[data-insida-theme="dark"] .url-card textarea{border-color:#586779;background:var(--theme-bg);color:var(--theme-text);color-scheme:dark}
  html[data-insida-theme="dark"] .url-buttons button.secondary{background:#354252;color:var(--theme-text)}
  html[data-insida-theme="dark"] .url-error{border-color:#b96a63;background:#432728;color:#ffd5d1}
  html[data-insida-theme="dark"] .url-pretty pre{border:1px solid var(--theme-line);background:var(--theme-bg);color:var(--theme-text)}

  /* Database report builder and query results. */
  html[data-insida-theme="dark"] .report-shell{color:var(--theme-text)}
  html[data-insida-theme="dark"] .report-card{border-color:var(--theme-line);background:var(--theme-surface);color:var(--theme-text);box-shadow:var(--theme-shadow)}
  html[data-insida-theme="dark"] .report-heading h1,html[data-insida-theme="dark"] .report-card h2,html[data-insida-theme="dark"] .report-card h3,html[data-insida-theme="dark"] .report-card strong{color:var(--theme-text)}
  html[data-insida-theme="dark"] .report-muted,html[data-insida-theme="dark"] .report-caption{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .report-card label{color:var(--theme-text)}
  html[data-insida-theme="dark"] .report-fields{border-color:var(--theme-line);background:var(--theme-bg)}
  html[data-insida-theme="dark"] .report-help{border:1px solid var(--theme-line);background:var(--theme-raised);color:#c5cfdb}
  html[data-insida-theme="dark"] .report-card button.secondary{background:#354252;color:var(--theme-text)}
  html[data-insida-theme="dark"] .report-error{border-color:#b96a63;background:#432728;color:#ffd5d1}
  html[data-insida-theme="dark"] .report-table{color:var(--theme-text)}
  html[data-insida-theme="dark"] .report-table th{background:#303c4b;color:var(--theme-text)}
  html[data-insida-theme="dark"] .report-table td,html[data-insida-theme="dark"] .report-table th{border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .report-table tbody tr:nth-child(even){background:#202a36}

  /* Fortnox OAuth account and permission selection. */
  html[data-insida-theme="dark"] .oauth-shell{color:var(--theme-text)}
  html[data-insida-theme="dark"] .oauth-card{border-color:var(--theme-line);background:var(--theme-surface);color:var(--theme-text);box-shadow:var(--theme-shadow)}
  html[data-insida-theme="dark"] .oauth-card h1,html[data-insida-theme="dark"] .oauth-card h2,html[data-insida-theme="dark"] .oauth-card label,html[data-insida-theme="dark"] .oauth-card strong{color:var(--theme-text)}
  html[data-insida-theme="dark"] .oauth-card p{color:#c5cfdb}
  html[data-insida-theme="dark"] .oauth-note{border:1px solid #7b573a;background:#392a1d;color:#ffd6ab}
  html[data-insida-theme="dark"] .oauth-note code{color:#fff0d8}
  html[data-insida-theme="dark"] .oauth-scopes label{border-color:var(--theme-line);background:var(--theme-raised);color:var(--theme-text)}
  html[data-insida-theme="dark"] .oauth-card select{border-color:#586779;background:var(--theme-bg);color:var(--theme-text);color-scheme:dark}
  html[data-insida-theme="dark"] .oauth-alert{border-color:#b96a63;background:#432728;color:#ffd5d1}
  html[data-insida-theme="dark"] .oauth-success{border-color:#52785e;background:#203c30;color:#b2e7c4}
  html[data-insida-theme="dark"] .oauth-small{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .oauth-card p.oauth-note{color:#ffd6ab}
  html[data-insida-theme="dark"] .oauth-card p.oauth-alert{color:#ffd5d1}
  html[data-insida-theme="dark"] .oauth-card p.oauth-success{color:#b2e7c4}

  /* BricsCAD license overview metrics and action links. */
  html[data-insida-theme="dark"] .license-metrics article{border-color:var(--theme-line);background:var(--theme-surface);color:var(--theme-text);box-shadow:var(--theme-shadow)}
  html[data-insida-theme="dark"] .license-metrics span,html[data-insida-theme="dark"] .license-heading span,html[data-insida-theme="dark"] .license-card .empty{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .license-card header>a:not(.add),html[data-insida-theme="dark"] .row-actions a{color:#ffb27a}
  html[data-insida-theme="dark"] .row-actions button{color:#ffaaa3}

  /* Shared Dropbox OAuth status and callback panel. */
  html[data-insida-theme="dark"] .dropbox-oauth-shell{color:var(--theme-text)}
  html[data-insida-theme="dark"] .dropbox-oauth-card{border-color:var(--theme-line);background:var(--theme-surface);color:var(--theme-text);box-shadow:var(--theme-shadow)}
  html[data-insida-theme="dark"] .dropbox-oauth-card h1,html[data-insida-theme="dark"] .dropbox-oauth-card strong{color:var(--theme-text)}
  html[data-insida-theme="dark"] .dropbox-oauth-card p{color:#c5cfdb}
  html[data-insida-theme="dark"] .dropbox-oauth-card p.dropbox-oauth-note{border:1px solid #7b573a;background:#392a1d;color:#ffd6ab}
  html[data-insida-theme="dark"] .dropbox-oauth-status{border-color:var(--theme-line);background:var(--theme-raised);color:var(--theme-text)}
  html[data-insida-theme="dark"] .dropbox-oauth-status strong{color:#edf2f8}
  html[data-insida-theme="dark"] .dropbox-oauth-card p.dropbox-oauth-alert{border-color:#b96a63;background:#432728;color:#ffd5d1}
  html[data-insida-theme="dark"] .dropbox-oauth-card p.dropbox-oauth-success{border-color:#52785e;background:#203c30;color:#b2e7c4}

  /* Booking category stripes and images are preserved, with a static gold self marker. */
  html[data-insida-theme="dark"] .booking-calendar{background:var(--theme-surface);border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .booking-calendar__header{background:#303c4b}
  html[data-insida-theme="dark"] .booking-day--today>h3{background:#392a1d;border-bottom-color:#ff8a3d}
  html[data-insida-theme="dark"] .booking-day--today>h3 .booking-day__overview{color:#ffd6ab}
  html[data-insida-theme="dark"] .booking-day--today>h3 .booking-day__overview span{background:#a94708;color:#fff}
  html[data-insida-theme="dark"] .booking-day>h3 span{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .booking-item:not(.booking-item--special):not(.booking-item--mine){background:var(--theme-raised);color:var(--theme-text);border-top-color:#667386;border-right-color:#667386;border-bottom-color:#667386;box-shadow:0 2px 6px rgba(0,0,0,.3)}
  html[data-insida-theme="dark"] .booking-item--mine{background:linear-gradient(110deg,#6b521f,#a47a28 48%,#73561e)!important;color:#fff4d9;border-top-color:#c49b46;border-right-color:#c49b46;border-bottom-color:#c49b46;animation:none!important}
  html[data-insida-theme="dark"] .booking-item--mine:before{content:none;animation:none!important}
  html[data-insida-theme="dark"] :is(.bo-info-pill,.bo-block,.bo-unplanned-card,.bo-absence){background:var(--theme-raised);color:var(--theme-text)}
  html[data-insida-theme="dark"] .bo-timeline{background:repeating-linear-gradient(90deg,var(--theme-line) 0,var(--theme-line) 1px,transparent 1px,transparent calc(100% / var(--slot-count,18)))}
  html[data-insida-theme="dark"] .booking-item--special{color:var(--theme-text)}
  html[data-insida-theme="dark"] .booking-item--special-holiday{background-color:#432728}
  html[data-insida-theme="dark"] .booking-item--special-halfday{background-color:#24384d}
  html[data-insida-theme="dark"] .booking-item--special-birthday{background-color:#432c39}
  html[data-insida-theme="dark"] .booking-item--special-reminder{background-color:#443520}
  html[data-insida-theme="dark"] .booking-item--special-season{background-color:#203c30}
  html[data-insida-theme="dark"] .booking-item--special-icon-birthday{background-color:#fff;color:#111}
  html[data-insida-theme="dark"] .booking-item--special-icon-winter-tires{background-color:#443520;color:#fff4d9}
  html[data-insida-theme="dark"] .booking-item--special-icon-summer-time{color:#fff}
  html[data-insida-theme="dark"] .booking-item--special-icon-winter-time{background-color:#e8edf3;color:#111}
  html[data-insida-theme="dark"] :is(.booking-day__items.is-drop-target,.bo-drop.is-drop-target .bo-timeline,.bo-unplanned.is-drop-target){background:var(--theme-hover)}
  html[data-insida-theme="dark"] .analog-clock{background:var(--theme-raised);border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .analog-clock:before{background:repeating-conic-gradient(#d3dce7 0deg 1deg,transparent 1deg 30deg)}
  html[data-insida-theme="dark"] .analog-clock i:not(.clock-center){background:#d3dce7}

  /* Sign-in uses the same device preference; photos and document bodies keep their colors. */
  html[data-insida-theme="dark"] .login-panel{background:radial-gradient(circle at 75% 20%,#27323f,var(--theme-bg) 80%)}
  html[data-insida-theme="dark"] .login-card{color:var(--theme-text)}
  html[data-insida-theme="dark"] :is(.panel-intro,.forgot-link,.passkey-message,.login-footer){color:var(--theme-muted)}
  html[data-insida-theme="dark"] .password-toggle{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .own-page-content{color-scheme:light;background:#fff;color:#202328}
  html[data-insida-theme="dark"] .own-page-content{border-color:#dce1e7}
  html[data-insida-theme="dark"] :is(.own-page-content th,.own-page-content td){border-color:#dce1e7;background:#fff;color:#202328}

  /* Dropbox-index cards on the work-method page use their own light component palette. */
  html[data-insida-theme="dark"] :is(.va-card,.va-file){background-color:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-text);box-shadow:var(--theme-shadow)}
  html[data-insida-theme="dark"] .va-files a{background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .va-files .va-file-actions a{background:var(--theme-bg);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .va-files .va-file-actions a:hover{background:var(--theme-hover);border-color:var(--theme-orange);color:var(--theme-orange)}
  html[data-insida-theme="dark"] :is(.va-hero,.va-folder){border-color:var(--theme-line)}
  html[data-insida-theme="dark"] :is(.va-hero span,.va-toolbar,.va-empty){color:var(--theme-muted)}
  html[data-insida-theme="dark"] :is(.va-hero a:not(.active),.va-toolbar button:disabled){background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}

  /* Booking detail cards have light backgrounds on individual cells and history rows. */
  html[data-insida-theme="dark"] :is(.booking-detail-header>a,.booking-tools a,.booking-tools span){background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .booking-tools a:hover{border-color:var(--theme-orange);color:var(--theme-orange)}
  html[data-insida-theme="dark"] .booking-tools span{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .booking-detail-card>div{background:var(--theme-surface);color:var(--theme-text)}
  html[data-insida-theme="dark"] .booking-detail-card span,
  html[data-insida-theme="dark"] .booking-detail-card small{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .booking-history-preview{background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .booking-history-preview>a{border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .booking-history-preview>a.is-current{background:var(--theme-hover);color:var(--theme-orange)}
  html[data-insida-theme="dark"] .booking-send-error{border-color:#99605c;color:#ffb3ad}

  /* The personnel time overview also has light-only cards and day status tiles. */
  html[data-insida-theme="dark"] :is(.person-report,.reported-empty){background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-text);box-shadow:var(--theme-shadow)}
  html[data-insida-theme="dark"] :is(.person-report>header,.person-report details){border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .person-report h2 a{color:var(--theme-text)}
  html[data-insida-theme="dark"] .person-totals>span{background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .person-totals small{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .person-totals .ok{background:#203c30;border-color:#52785e;color:#b2e7c4}
  html[data-insida-theme="dark"] .person-totals .attention{background:#392a1d;border-color:#875a32;color:#ffd6ab}
  html[data-insida-theme="dark"] .person-calendar .report-day{color:var(--theme-text)}
  html[data-insida-theme="dark"] .person-calendar .report-day span,
  html[data-insida-theme="dark"] .person-calendar .report-day small{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .person-calendar .report-day.complete{background:#203c30}
  html[data-insida-theme="dark"] .person-calendar .report-day.partial{background:#392a1d}
  html[data-insida-theme="dark"] .person-calendar .report-day.weekend{background:#27303b}
  html[data-insida-theme="dark"] .person-calendar .report-day.today{background:#493425}
  html[data-insida-theme="dark"] .person-calendar .report-day.today span,
  html[data-insida-theme="dark"] .person-calendar .report-day.today strong{color:#ffbc8b}
  html[data-insida-theme="dark"] .code-totals span{background:var(--theme-raised);color:var(--theme-muted)}
  html[data-insida-theme="dark"] .code-totals strong{color:var(--theme-text)}

  /* Keep the second next-of-kin fieldset from retaining its light-mode fill. */
  html[data-insida-theme="dark"] .personal-card fieldset{border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .personal-card fieldset+fieldset{background:var(--theme-raised);border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .personal-card.activation-card>header>span{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .activation-status>div{background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .activation-status span{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .activation-status strong{color:var(--theme-text)}
  html[data-insida-theme="dark"] .personal-card.activation-card .activation-actions button:not(.primary){background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .personal-card.activation-card .activation-actions button:disabled{background:#343e49;color:#8793a0;border-color:#465363;opacity:1}
  html[data-insida-theme="dark"] .admin-passkey-list article{background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .admin-passkey-list article small,
  html[data-insida-theme="dark"] .admin-passkey-list article span{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .admin-passkey-actions button:not(.danger){background:#344252;border-color:#63748a;color:#f4f7fb}
  html[data-insida-theme="dark"] .admin-passkey-actions button:not(.danger):hover{background:#405267;border-color:var(--theme-orange);color:#fff}
  html[data-insida-theme="dark"] .admin-passkey-actions button.danger{background:#432728;border-color:#99605c;color:#ffb3ad}
  html[data-insida-theme="dark"] .admin-passkey-actions button.danger:hover{background:#563032;border-color:#c27a73;color:#ffe0dd}
  html[data-insida-theme="dark"] .admin-passkeys-empty{border-color:var(--theme-line);color:var(--theme-muted)}
  html[data-insida-theme="dark"] .activation-result{background:#203c30;border-color:#52785e;color:#d6f0dc}
  html[data-insida-theme="dark"] .activation-result button{background:#15251d;color:#d6f0dc;border-color:#72ad7c}
  html[data-insida-theme="dark"] .activation-message{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .activation-message.error{color:#ffb3ad}
  html[data-insida-theme="dark"] .personal-card .dropbox-account{border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .personal-card .dropbox-account.new{background:var(--theme-raised);border-color:var(--theme-line)}
  /* Dropbox latest activity: replace the page's light-only inline component palette. */
  html[data-insida-theme="dark"] .latest-shell{color:var(--theme-text)}
  html[data-insida-theme="dark"] .latest-heading span{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .latest-card{background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-text);box-shadow:var(--theme-shadow)}
  html[data-insida-theme="dark"] .latest-form label{color:var(--theme-text)}
  html[data-insida-theme="dark"] .latest-summary{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .latest-summary strong{color:var(--theme-text)}
  html[data-insida-theme="dark"] .latest-projects a{background:var(--theme-raised);border-color:#8c5938;color:#ffc899}
  html[data-insida-theme="dark"] .latest-table th{background:#303c4b;color:#d7e0eb;border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .latest-table td{border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .latest-table td time{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .latest-account small,
  html[data-insida-theme="dark"] .latest-path small,
  html[data-insida-theme="dark"] .latest-destination{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .latest-path a{color:#a9c9e8}
  html[data-insida-theme="dark"] .latest-project a{color:#ffc08e}
  html[data-insida-theme="dark"] .latest-empty{background:var(--theme-raised);color:var(--theme-muted)}
  html[data-insida-theme="dark"] .latest-error{background:#432728;border-color:#875a5a;color:#ffb3ad}
  /* Inventory reservation administration page. */
  html[data-insida-theme="dark"] .inv-bookings{color:var(--theme-text)}
  html[data-insida-theme="dark"] .inv-heading span,
  html[data-insida-theme="dark"] .inv-topline{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .inv-card{background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-text);box-shadow:var(--theme-shadow)}
  html[data-insida-theme="dark"] .inv-filters label{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .inv-filters input{background:var(--theme-bg);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .inv-button:not(.primary){background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .inv-button.danger{background:#432728;border-color:#875a5a;color:#ffb3ad}
  html[data-insida-theme="dark"] .inv-table th{background:#303c4b;color:#d7e0eb}
  html[data-insida-theme="dark"] .inv-table td{border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .inv-name,
  html[data-insida-theme="dark"] .inv-sub,
  html[data-insida-theme="dark"] .inv-empty{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .inv-booking a{color:#a9c9e8}
  html[data-insida-theme="dark"] .inv-booking .inv-sub a{color:#a9c9e8}
  html[data-insida-theme="dark"] .inv-unlinked{background:#493425;color:#ffd6ab}
  html[data-insida-theme="dark"] .inv-broken,
  html[data-insida-theme="dark"] .inv-notice.error{background:#432728;border-color:#875a5a;color:#ffb3ad}
  html[data-insida-theme="dark"] .inv-notice.success{background:#203c30;border-color:#52785e;color:#b2e7c4}
  html[data-insida-theme="dark"] .inv-pages a,
  html[data-insida-theme="dark"] .inv-pages span{background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .inv-pages .current{background:#493425;border-color:#ad652d;color:#ffd6ab}
  html[data-insida-theme="dark"] .inv-table tr:target{background:#392a1d}
  html[data-insida-theme="dark"] .special-card{background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-text);box-shadow:var(--theme-shadow)}
  html[data-insida-theme="dark"] .special-card header span,
  html[data-insida-theme="dark"] .special-card label>span{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .special-note{background:#392a1d;border-color:#ad652d;color:var(--theme-text)}
  html[data-insida-theme="dark"] .special-note span{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .special-card footer a{background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .car-stats article{background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-text);box-shadow:var(--theme-shadow)}
  html[data-insida-theme="dark"] .car-stats p,
  html[data-insida-theme="dark"] .car-heading span{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .car-panel>header{background:var(--theme-raised);border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .car-panel label{color:var(--theme-text)}
  html[data-insida-theme="dark"] .car-panel label>span{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .car-table tbody tr:nth-child(even){background:var(--theme-raised)}
  html[data-insida-theme="dark"] .car-table tbody tr:nth-child(odd){background:var(--theme-surface)}
  html[data-insida-theme="dark"] .car-table tbody tr:hover{background:var(--theme-hover)}
  html[data-insida-theme="dark"] .car-table small{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .reg{background:#493425;color:#ffc899}
  html[data-insida-theme="dark"] .missing{background:var(--theme-raised);color:var(--theme-muted)}
  html[data-insida-theme="dark"] :is(.relatives-stats article,.phone-stats article){background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-text);box-shadow:var(--theme-shadow)}
  html[data-insida-theme="dark"] :is(.relatives-stats p,.phone-stats p,.relatives-heading span,.phone-heading span){color:var(--theme-muted)}
  html[data-insida-theme="dark"] :is(.relatives-panel>header,.phone-panel>header){background:var(--theme-raised);border-color:var(--theme-line)}
  html[data-insida-theme="dark"] :is(.relatives-panel label,.phone-panel label){color:var(--theme-text)}
  html[data-insida-theme="dark"] :is(.relatives-table tbody tr:nth-child(even),.phone-table tbody tr:nth-child(even)){background:var(--theme-raised)}
  html[data-insida-theme="dark"] :is(.relatives-table tbody tr:nth-child(odd),.phone-table tbody tr:nth-child(odd)){background:var(--theme-surface)}
  html[data-insida-theme="dark"] :is(.relatives-table tbody tr:hover,.phone-table tbody tr:hover){background:var(--theme-hover)}
  html[data-insida-theme="dark"] .relatives-table td:first-child{background:var(--theme-raised)}
  html[data-insida-theme="dark"] :is(.relative-card em,.relative-card b,.missing){color:var(--theme-muted)}

  html[data-insida-theme="dark"] :is(.calc-card header,.calc-table-card h2){background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .calc-grid span{color:var(--theme-text)}
  html[data-insida-theme="dark"] .calc-grid em,
  html[data-insida-theme="dark"] :is(.calc-heading span,.calc-result-card span,.calc-admin-note){color:var(--theme-muted)}
  html[data-insida-theme="dark"] .calc-result-card.primary{background:#392a1d;border-color:#ad652d}
  html[data-insida-theme="dark"] .calc-result-card h2{color:var(--theme-text)}
  html[data-insida-theme="dark"] .calc-table-card tbody tr:nth-child(even){background:var(--theme-raised)}
  html[data-insida-theme="dark"] .calc-table-card tbody tr:nth-child(odd){background:var(--theme-surface)}
  html[data-insida-theme="dark"] .calc-message{background:#392a1d;border-color:#875a32;color:#ffd6ab}
  html[data-insida-theme="dark"] .calc-admin-note{border-color:var(--theme-line)}

  html[data-insida-theme="dark"] .inventory-heading span{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .inventory-card>header{background:var(--theme-raised);border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .inventory-table span{background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .inventory-table>a:hover span,
  html[data-insida-theme="dark"] .inventory-row:hover span{background:var(--theme-hover)}
  html[data-insida-theme="dark"] .inventory-table .late{color:#ff9f8f!important}
  html[data-insida-theme="dark"] .inventory-document-cell a{background:#392a1d!important;border-color:#875a32!important;color:#ffc899!important}
  html[data-insida-theme="dark"] :is(.inventory-message.success,.inventory-message.error){background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}

  html[data-insida-theme="dark"] .scanner-heading span{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .scanner-card>header{background:var(--theme-raised);border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .scanner-note{background:#392a1d;border-color:#ad652d;color:#ffd6ab}
  html[data-insida-theme="dark"] .target-types{border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .target-types label{background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .target-types label:has(input:checked){background:var(--theme-hover);border-color:#ad652d}
  html[data-insida-theme="dark"] :is(.coord-panel,.map-panel){background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .latlong-info{background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-muted)}
  html[data-insida-theme="dark"] .latlong-info summary{color:var(--theme-text)}
  html[data-insida-theme="dark"] :is(.latlong-heading span,.latlong-heading,.latlong-card h2,.coord-panel h3,.map-panel h3){color:var(--theme-text)}
  html[data-insida-theme="dark"] .latlong-heading span{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .latlong-shell label{color:var(--theme-text)}
  html[data-insida-theme="dark"] .latlong-shell label span{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .latlong-shell code{background:var(--theme-bg);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .latlong-heading .secondary,
  html[data-insida-theme="dark"] .latlong-actions a{background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .latlong-actions a:hover,
  html[data-insida-theme="dark"] .latlong-heading .secondary:hover{border-color:var(--theme-orange);color:var(--theme-orange)}
  html[data-insida-theme="dark"] :is(.qna-search,.qna-workspace){background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-text);box-shadow:var(--theme-shadow)}
  html[data-insida-theme="dark"] .qna-search button,
  html[data-insida-theme="dark"] .qna-search a,
  html[data-insida-theme="dark"] .editor-actions>a,
  html[data-insida-theme="dark"] .detail-actions a,
  html[data-insida-theme="dark"] .detail-actions button{background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .qna-workspace{border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .qna-list{border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .qna-list>header{border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .qna-list>header span,
  html[data-insida-theme="dark"] .chips span{background:#493425;color:#ffc899}
  html[data-insida-theme="dark"] .qna-list a{border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .qna-list a:hover,
  html[data-insida-theme="dark"] .qna-list a.active{background:var(--theme-hover);color:var(--theme-text)}
  html[data-insida-theme="dark"] .qna-list a span,
  html[data-insida-theme="dark"] .qna-heading span,
  html[data-insida-theme="dark"] .qna-editor label>small{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .qna-welcome h2,
  html[data-insida-theme="dark"] .qna-detail h2,
  html[data-insida-theme="dark"] .qna-editor h2{color:var(--theme-text)}
  html[data-insida-theme="dark"] .qna-detail header>p{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .detail-actions{border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .detail-actions button{color:#ff9b91}
  html[data-insida-theme="dark"] .editor-wrap{border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .toolbar{background:var(--theme-raised);border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .toolbar button{background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .answer-editor{color:var(--theme-text)}
  html[data-insida-theme="dark"] .answer-editor:empty:before{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .answer pre,
  html[data-insida-theme="dark"] .answer code{background:var(--theme-bg);color:var(--theme-text)}
  html[data-insida-theme="dark"] :is(.notice.success,.notice.error){background:var(--theme-raised);border:1px solid var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .week-booking-calendar .booking-day:nth-child(6),
  html[data-insida-theme="dark"] .week-booking-calendar .booking-day:nth-child(7){background:var(--theme-raised)}
  html[data-insida-theme="dark"] :is(.project-new-heading span,.customer-picker>p,.customer-picker>small,.project-check small,.project-created dt){color:var(--theme-muted)}
  html[data-insida-theme="dark"] .customer-results{background:var(--theme-surface);border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .customer-results button{background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .customer-results button:hover{background:var(--theme-hover)}
  html[data-insida-theme="dark"] .customer-selected{background:#493425;color:var(--theme-text)}
  html[data-insida-theme="dark"] .customer-selected span{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .customer-selected button{color:#ffc899}
  html[data-insida-theme="dark"] .project-check+.project-check{border-color:var(--theme-line)}
  html[data-insida-theme="dark"] :is(.project-new-error,.project-new-message.is-error){background:#392a1d;border-color:#875a32;color:#ffd6ab}
  html[data-insida-theme="dark"] .project-created__checks{color:#a9dfb7}
  html[data-insida-theme="dark"] .project-created dl div{background:var(--theme-raised)}
  html[data-insida-theme="dark"] .project-new-form>footer a,
  html[data-insida-theme="dark"] .project-created>a:not(.primary){color:var(--theme-text)}
  html[data-insida-theme="dark"] .project-new-progress{background:rgba(22,25,31,.96);color:var(--theme-text)}
  html[data-insida-theme="dark"] .project-new-spinner{border-color:var(--theme-line);border-top-color:var(--theme-orange)}
  html[data-insida-theme="dark"] .person-actions .secondary{background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .person-actions .secondary:hover{border-color:var(--theme-orange);color:var(--theme-orange)}
  html[data-insida-theme="dark"] .survey-card{background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-text);box-shadow:var(--theme-shadow)}
  html[data-insida-theme="dark"] :is(.survey .lead,.survey label,.survey-muted,.survey-type,.survey-kpi small,.survey-bar-period){color:var(--theme-muted)}
  html[data-insida-theme="dark"] .survey :is(h1,h2,h3,.survey-bar-title,.survey-bar-value){color:var(--theme-text)}
  html[data-insida-theme="dark"] .survey :is(button,.button){background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .survey :is(button,.button):hover{border-color:var(--theme-orange);color:var(--theme-orange)}
  html[data-insida-theme="dark"] .survey .primary{background:var(--theme-orange);border-color:var(--theme-orange);color:#fff}
  html[data-insida-theme="dark"] .survey .primary:hover{color:#fff}
  html[data-insida-theme="dark"] .survey .danger{color:#ffaaa3}
  html[data-insida-theme="dark"] .survey .notice.error{background:#432728;color:#ffb3ad}
  html[data-insida-theme="dark"] .survey .notice.success{background:#203c30;color:#b2e7c4}
  html[data-insida-theme="dark"] .survey-table :is(th,td){border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .survey-table th{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .survey-kpi{background:var(--theme-raised);color:var(--theme-text)}
  html[data-insida-theme="dark"] .survey-bar-track{background:#303a47}
  html[data-insida-theme="dark"] .customer-directory__section-heading{background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .customer-directory__section-heading h2{color:var(--theme-text)}
  html[data-insida-theme="dark"] .customer-directory__section-heading span{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .customer-directory__section-heading>strong{background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-muted)}
  html[data-insida-theme="dark"] .customer-directory__search label{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .customer-directory__heading span{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .customer-directory__row-actions a{background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .customer-directory__row-actions a:first-child{background:#392a1d;border-color:#875a32;color:#ffc899}
  html[data-insida-theme="dark"] .customer-directory__row-actions a:hover{border-color:var(--theme-orange);color:var(--theme-orange)}
  html[data-insida-theme="dark"] .customer-directory__row-actions a:first-child:hover{color:#ffd8b7}
  html[data-insida-theme="dark"] :is(.customer-directory__back,.customer-directory__search a,.customer-directory__button){background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .customer-directory__button.primary{background:var(--theme-orange);border-color:var(--theme-orange);color:#fff}
  html[data-insida-theme="dark"] .customer-directory__name span,
  html[data-insida-theme="dark"] .customer-directory__projects span,
  html[data-insida-theme="dark"] .customer-directory__contact span,
  html[data-insida-theme="dark"] .customer-directory__empty{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .customer-directory__subheading{border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .customer-directory__contact{background:var(--theme-raised);border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .customer-directory__contact:hover{background:var(--theme-hover)}
  html[data-insida-theme="dark"] .customer-directory__contact em{color:#ffc899}
  html[data-insida-theme="dark"] .customer-directory__projects>a{border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .customer-directory__notice.error{background:#392a1d;border-color:#875a32;color:#ffd6ab}
  html[data-insida-theme="dark"] .contact-directory__heading span{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .contact-directory__section-heading{background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .contact-directory__section-heading h2{color:var(--theme-text)}
  html[data-insida-theme="dark"] .contact-directory__section-heading span{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .contact-directory__section-heading>strong{background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-muted)}
  html[data-insida-theme="dark"] .contact-directory__search label{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .contact-directory__back,
  html[data-insida-theme="dark"] .contact-directory__search a{background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .contact-directory__create,
  html[data-insida-theme="dark"] .contact-directory__search button{background:var(--theme-orange);border-color:var(--theme-orange);color:#fff}
  html[data-insida-theme="dark"] .contact-directory__person{background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .contact-directory__person:hover{background:var(--theme-hover);border-color:var(--theme-orange)}
  html[data-insida-theme="dark"] .contact-directory__person span,
  html[data-insida-theme="dark"] .contact-directory__empty,
  html[data-insida-theme="dark"] .contact-directory__project span{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .contact-directory__person em{color:#ffc899}
  html[data-insida-theme="dark"] .contact-directory__project{border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .contact-directory__project .project-title{color:var(--theme-text)}
  html[data-insida-theme="dark"] .contact-directory__project .project-title:hover{color:var(--theme-orange)}
  html[data-insida-theme="dark"] .show-project-contacts{background:var(--theme-raised);border-color:#875a32;color:#ffc899}
  html[data-insida-theme="dark"] .show-project-contacts:hover{border-color:var(--theme-orange);color:#ffd8b7}
  html[data-insida-theme="dark"] .contact-customer-link{color:#ffc899;text-decoration-color:#875a32}
  html[data-insida-theme="dark"] .contact-directory__notice.error{background:#392a1d;border-color:#875a32;color:#ffd6ab}
  html[data-insida-theme="dark"] .order-page{color:var(--theme-text)}
  html[data-insida-theme="dark"] .order-head p,
  html[data-insida-theme="dark"] .order-meta,
  html[data-insida-theme="dark"] .order-empty{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .order-card{background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] table.order-table th{background:#303c4b;color:var(--theme-text)}
  html[data-insida-theme="dark"] table.order-table tbody tr:nth-child(odd){background:var(--theme-surface);color:var(--theme-text)}
  html[data-insida-theme="dark"] table.order-table tbody tr:nth-child(even){background:var(--theme-raised);color:var(--theme-text)}
  html[data-insida-theme="dark"] table.order-table td{border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .order-button:not(.primary){background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .order-button:not(.primary):hover{border-color:var(--theme-orange);color:var(--theme-orange)}
  html[data-insida-theme="dark"] .id06-page{color:var(--theme-text)}
  html[data-insida-theme="dark"] .id06-head p,
  html[data-insida-theme="dark"] .id06-meta,
  html[data-insida-theme="dark"] .id06-empty{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .id06-card{background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] table.id06-table th{background:#303c4b;color:var(--theme-text)}
  html[data-insida-theme="dark"] table.id06-table tbody tr:nth-child(odd){background:var(--theme-surface);color:var(--theme-text)}
  html[data-insida-theme="dark"] table.id06-table tbody tr:nth-child(even){background:var(--theme-raised);color:var(--theme-text)}
  html[data-insida-theme="dark"] table.id06-table td{border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .sa-shell{color:var(--theme-text)}
  html[data-insida-theme="dark"] .sa-head p,
  html[data-insida-theme="dark"] .sa-meta,
  html[data-insida-theme="dark"] .sa-old,
  html[data-insida-theme="dark"] .sa-empty,
  html[data-insida-theme="dark"] .sa-memo{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .sa-chip{background:var(--theme-raised);color:var(--theme-muted)}
  html[data-insida-theme="dark"] .sa-card{background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .sa-card h2 small{color:var(--theme-muted)}
  html[data-insida-theme="dark"] table.sa-table th{background:#303c4b;color:var(--theme-text)}
  html[data-insida-theme="dark"] table.sa-table tbody tr:nth-child(odd){background:var(--theme-surface);color:var(--theme-text)}
  html[data-insida-theme="dark"] table.sa-table tbody tr:nth-child(even){background:var(--theme-raised);color:var(--theme-text)}
  html[data-insida-theme="dark"] table.sa-table td{border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] table.sa-table td.sa-memo{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .sa-status.pending{background:#443520;color:#ffdea2}
  html[data-insida-theme="dark"] .sa-status.approved{background:#203c30;color:#b2e7c4}
  html[data-insida-theme="dark"] .sa-status.rejected{background:#432728;color:#ffb3ad}
  html[data-insida-theme="dark"] .sa-row-actions button:not(.approve){background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .sa-row-actions button.delete{border-color:#875a5a;color:#ffaaa3}
  html[data-insida-theme="dark"] .sa-row-actions details summary{color:#ffc899}
  html[data-insida-theme="dark"] :is(.sa-alert.error,.sa-alert.success,.sa-alert.warning){background:var(--theme-raised);border:1px solid var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .pl-shell{color:var(--theme-text)}
  html[data-insida-theme="dark"] .pl-head p,
  html[data-insida-theme="dark"] .pl-card h2 small,
  html[data-insida-theme="dark"] .pl-empty{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .pl-chip{background:var(--theme-raised);color:var(--theme-muted)}
  html[data-insida-theme="dark"] .pl-card{background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] table.pl-table th{background:#303c4b;color:var(--theme-text)}
  html[data-insida-theme="dark"] table.pl-table tbody tr:nth-child(odd){background:var(--theme-surface);color:var(--theme-text)}
  html[data-insida-theme="dark"] table.pl-table tbody tr:nth-child(even){background:var(--theme-raised);color:var(--theme-text)}
  html[data-insida-theme="dark"] table.pl-table td{border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .pl-delete{background:var(--theme-raised);border-color:#875a5a;color:#ffaaa3}
  html[data-insida-theme="dark"] :is(.pl-alert.error,.pl-alert.success){background:var(--theme-raised);border:1px solid var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .sick-shell{color:var(--theme-text)}
  html[data-insida-theme="dark"] .sick-heading p,
  html[data-insida-theme="dark"] .sick-card>header>span,
  html[data-insida-theme="dark"] .sick-empty{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .sick-chip{background:var(--theme-raised);color:var(--theme-muted)}
  html[data-insida-theme="dark"] .sick-card{background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] table.sick-table th{background:#303c4b;color:var(--theme-text)}
  html[data-insida-theme="dark"] table.sick-table tbody tr:nth-child(odd){background:var(--theme-surface);color:var(--theme-text)}
  html[data-insida-theme="dark"] table.sick-table tbody tr:nth-child(even){background:var(--theme-raised);color:var(--theme-text)}
  html[data-insida-theme="dark"] table.sick-table td{border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] table.sick-table td:first-child small,
  html[data-insida-theme="dark"] table.sick-table td:nth-child(6) small{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .sick-type.vab{background:#24384d;color:#c3dcff}
  html[data-insida-theme="dark"] .sick-type.sickness{background:#443520;color:#ffdea2}
  html[data-insida-theme="dark"] .sick-ongoing{color:#a9dfb7}
  html[data-insida-theme="dark"] .sick-invalid{color:#ffaaa3}
  html[data-insida-theme="dark"] .daily-audit{background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .daily-audit.complete{background:#1d3028;border-color:#52785e}
  html[data-insida-theme="dark"] .daily-audit.missing{background:#392a1d;border-color:#875a32}
  html[data-insida-theme="dark"] .daily-audit p{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .daily-audit table th{background:#303c4b;color:var(--theme-text);border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .daily-audit table td{color:var(--theme-text);border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .daily-status.ok{color:#a9dfb7}
  html[data-insida-theme="dark"] .daily-status.miss,
  html[data-insida-theme="dark"] .daily-warning{color:#ffd6ab!important}
  html[data-insida-theme="dark"] .daily-error{background:#432728;color:#ffb3ad}
  html[data-insida-theme="dark"] .cert-shell{color:var(--theme-text)}
  html[data-insida-theme="dark"] .cert-head p,
  html[data-insida-theme="dark"] .cert-person-name small,
  html[data-insida-theme="dark"] .cert-toolbar,
  html[data-insida-theme="dark"] .cert-empty{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .cert-chip{background:var(--theme-raised);color:var(--theme-muted)}
  html[data-insida-theme="dark"] .cert-chip.warn{background:#392a1d;color:#ffc899}
  html[data-insida-theme="dark"] .cert-person{background:var(--theme-surface);border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .cert-person summary{color:var(--theme-text)}
  html[data-insida-theme="dark"] .cert-person summary:hover{background:var(--theme-hover)}
  html[data-insida-theme="dark"] .cert-content{border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .cert-remind{background:var(--theme-raised);border-color:#875a32;color:#ffc899}
  html[data-insida-theme="dark"] .cert-remind:hover{border-color:var(--theme-orange);color:#ffd8b7}
  html[data-insida-theme="dark"] table.cert-table th{background:#303c4b;color:var(--theme-text)}
  html[data-insida-theme="dark"] table.cert-table tbody tr:nth-child(odd){background:var(--theme-surface);color:var(--theme-text)}
  html[data-insida-theme="dark"] table.cert-table tbody tr:nth-child(even){background:var(--theme-raised);color:var(--theme-text)}
  html[data-insida-theme="dark"] table.cert-table td{border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] table.cert-table tr.cert-expired{background:#432728!important}
  html[data-insida-theme="dark"] .cert-expired td:nth-child(2),
  html[data-insida-theme="dark"] .cert-state.expired{color:#ffb3ad}
  html[data-insida-theme="dark"] .cert-state.valid{color:#a9dfb7}
  html[data-insida-theme="dark"] .cert-file{color:#ffc899}
  html[data-insida-theme="dark"] .cert-confirm{background:#392a1d;border-color:#875a32}
  html[data-insida-theme="dark"] .cert-confirm p{color:#d9c7b7}
  html[data-insida-theme="dark"] .cert-cancel{background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] :is(.cert-alert.error,.cert-alert.success){background:var(--theme-raised);border:1px solid var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .pick-shell{color:var(--theme-text)}
  html[data-insida-theme="dark"] .pick-head p,
  html[data-insida-theme="dark"] .pick-help,
  html[data-insida-theme="dark"] .pick-checks,
  html[data-insida-theme="dark"] .pick-count{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .pick-card{background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .pick-grid label{background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .pick-grid label:hover{background:var(--theme-hover);border-color:var(--theme-orange)}
  html[data-insida-theme="dark"] .pick-checks button{color:#ffc899}
  html[data-insida-theme="dark"] .pick-sensitive{color:#ffc899}
  html[data-insida-theme="dark"] table.pick-table th{background:#303c4b;color:var(--theme-text)}
  html[data-insida-theme="dark"] table.pick-table tbody tr:nth-child(odd){background:var(--theme-surface);color:var(--theme-text)}
  html[data-insida-theme="dark"] table.pick-table tbody tr:nth-child(even){background:var(--theme-raised);color:var(--theme-text)}
  html[data-insida-theme="dark"] table.pick-table td{border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] :is(.pick-alert.error,.pick-alert.warning){background:var(--theme-raised);border:1px solid var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .keys-heading span,
  html[data-insida-theme="dark"] .key-group header span,
  html[data-insida-theme="dark"] .key-info dt,
  html[data-insida-theme="dark"] .keys-empty,
  html[data-insida-theme="dark"] #keys-no-match{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .keys-totals span{background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .keys-totals strong{color:var(--theme-text)}
  html[data-insida-theme="dark"] .keys-message{background:#203c30;border-color:#52785e;color:#b2e7c4}
  html[data-insida-theme="dark"] .key-group{background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .key-group>header{background:var(--theme-raised);border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .key-group h2{color:var(--theme-text)}
  html[data-insida-theme="dark"] .key-group header a{color:#ffc899}
  html[data-insida-theme="dark"] .key-row{border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .key-row.is-revoked{background:#302a28}
  html[data-insida-theme="dark"] .key-status{background:#203c30;color:#b2e7c4}
  html[data-insida-theme="dark"] .is-revoked .key-status{background:#414751;color:#d2d9e2}
  html[data-insida-theme="dark"] .key-actions button:not(.restore){background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .key-actions .danger{border-color:#875a5a;color:#ffaaa3}
  html[data-insida-theme="dark"] .key-actions .restore{background:var(--theme-orange);border-color:var(--theme-orange);color:#fff}
  html[data-insida-theme="dark"] .keys-empty,
  html[data-insida-theme="dark"] #keys-no-match{border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .risk-edit-shell{color:var(--theme-text)}
  html[data-insida-theme="dark"] .risk-edit-heading p,
  html[data-insida-theme="dark"] .risk-edit-help,
  html[data-insida-theme="dark"] .risk-edit-copy small,
  html[data-insida-theme="dark"] .risk-edit-empty,
  html[data-insida-theme="dark"] .risk-edit-form label,
  html[data-insida-theme="dark"] .risk-edit-form small{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .risk-edit-card{background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .risk-edit-card h2,
  html[data-insida-theme="dark"] .risk-edit-copy strong{color:var(--theme-text)}
  html[data-insida-theme="dark"] .risk-edit-item{background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .risk-edit-item:hover{background:var(--theme-hover);border-color:var(--theme-orange)}
  html[data-insida-theme="dark"] .risk-edit-number{background:#303c4b;color:var(--theme-text)}
  html[data-insida-theme="dark"] .risk-edit-link{background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .risk-edit-link:hover{border-color:var(--theme-orange);color:var(--theme-orange)}
  html[data-insida-theme="dark"] :is(.risk-edit-alert.error,.risk-edit-alert.success){background:var(--theme-raised);border:1px solid var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .settings-shell{color:var(--theme-text)}
  html[data-insida-theme="dark"] .settings-head span,
  html[data-insida-theme="dark"] .settings-help{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .settings-card{background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .settings-card h2{color:var(--theme-text)}
  html[data-insida-theme="dark"] .settings-form label{color:var(--theme-muted)}
  html[data-insida-theme="dark"] table.settings-table th{background:#303c4b;color:var(--theme-text);border-color:var(--theme-line)}
  html[data-insida-theme="dark"] table.settings-table tbody tr:nth-child(odd){background:var(--theme-surface);color:var(--theme-text)}
  html[data-insida-theme="dark"] table.settings-table tbody tr:nth-child(even){background:var(--theme-raised);color:var(--theme-text)}
  html[data-insida-theme="dark"] table.settings-table td{border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .settings-secret{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .settings-badge.secure{background:#203c30;color:#b2e7c4}
  html[data-insida-theme="dark"] .settings-badge.warning{background:#443520;color:#ffdea2}
  html[data-insida-theme="dark"] .settings-badge.empty,
  html[data-insida-theme="dark"] .settings-badge.plain{background:#414751;color:#d2d9e2}
  html[data-insida-theme="dark"] .settings-ops a{color:#ffc899}
  html[data-insida-theme="dark"] .settings-ops button{background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] :is(.settings-notice,.settings-notice.error,.settings-notice.warning){background:var(--theme-raised);border:1px solid var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .settings-notice:not(.error):not(.warning){background:#203c30;border-color:#52785e;color:#b2e7c4}
  html[data-insida-theme="dark"] .settings-notice.error{background:#432728;border-color:#875a5a;color:#ffb3ad}
  html[data-insida-theme="dark"] .settings-notice.warning{background:#443520;border-color:#875a32;color:#ffdea2}

  /* Occupancy statistics: keep totals and the explanatory notice legible on dark surfaces. */
  html[data-insida-theme="dark"] .billing-totals article{background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-text);box-shadow:var(--theme-shadow)}
  html[data-insida-theme="dark"] .billing-totals :is(span,small){color:var(--theme-muted)}
  html[data-insida-theme="dark"] .billing-totals strong{color:var(--theme-text)}
  html[data-insida-theme="dark"] .occupancy-table tfoot,
  html[data-insida-theme="dark"] .occupancy-table tfoot th,
  html[data-insida-theme="dark"] .occupancy-table tfoot td{background:#392a1d!important;border-color:#875a32;color:#ffd6ab!important}
  html[data-insida-theme="dark"] .billing-notice{background:#392a1d;border-color:#875a32;color:#ffd6ab}
  html[data-insida-theme="dark"] .billing-notice summary{color:#ffbc8b}
  html[data-insida-theme="dark"] .billing-notice p{color:#e1cfbf}
  html[data-insida-theme="dark"] .billing-shell button:not(.primary){background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  /* Fortnox billing review table: keep project links and neutral tags readable. */
  html[data-insida-theme="dark"] .billing-shell{--billing-ink:var(--theme-text);--billing-muted:var(--theme-muted);--billing-line:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .billing-shell .billing-project{color:var(--theme-text)}
  html[data-insida-theme="dark"] .billing-shell .billing-project:hover{color:#ffc899}
  html[data-insida-theme="dark"] .billing-shell .billing-customer,
  html[data-insida-theme="dark"] .billing-shell .billing-period span{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .billing-shell .billing-tags span{background:var(--theme-raised);color:var(--theme-text);border:1px solid var(--theme-line)}
  html[data-insida-theme="dark"] .billing-shell .billing-table td{color:var(--theme-text);border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .billing-shell .billing-table tbody tr{background:var(--theme-surface)}
  html[data-insida-theme="dark"] .billing-shell .billing-table tbody tr.billing-has-warning{background:#392a1d}
  html[data-insida-theme="dark"] .billing-shell .billing-warning{color:#ffd6ab}
  html[data-insida-theme="dark"] .billing-shell .billing-selection{background:var(--theme-raised);border-top:1px solid var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .billing-shell .billing-selection :is(strong,span){color:var(--theme-text)}
  html[data-insida-theme="dark"] .billing-shell .billing-selection small{color:var(--theme-muted)}

  /* FAQ: the selected-answer card and embedded rich text also need dark surfaces. */
  html[data-insida-theme="dark"] :is(.faq-detail,.faq-card,.faq-editor-card){background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-text);box-shadow:var(--theme-shadow)}
  html[data-insida-theme="dark"] :is(.faq-detail header,.faq-card>header,.faq-editor-card form>header,.faq-search,.faq-list article){border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .faq-detail h2,
  html[data-insida-theme="dark"] .faq-answer,
  html[data-insida-theme="dark"] .faq-row-main{color:var(--theme-text)}
  html[data-insida-theme="dark"] .faq-detail header span,
  html[data-insida-theme="dark"] .faq-row-main span,
  html[data-insida-theme="dark"] .faq-search label,
  html[data-insida-theme="dark"] .faq-editor label{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .faq-list article:hover,
  html[data-insida-theme="dark"] .faq-list article.active{background:var(--theme-hover)}
  html[data-insida-theme="dark"] .faq-row-actions a,
  html[data-insida-theme="dark"] .faq-answer a{color:#9bc7ff}
  html[data-insida-theme="dark"] .faq-answer a:visited{color:#c5adff}
  html[data-insida-theme="dark"] .faq-answer a:hover{color:var(--theme-orange)}
  html[data-insida-theme="dark"] :is(.faq-detail nav a,.faq-editor-card header a,.faq-actions a:not(.primary),.faq-search button){background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .faq-detail nav button{background:#432728;border-color:#946062;color:#ffb3ad}
  html[data-insida-theme="dark"] .faq-answer :is(pre,code,blockquote){background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .faq-answer :is(td,th){border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .faq-symbols,
  html[data-insida-theme="dark"] .faq-filbank{background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .faq-message.success{background:#203c30;border-color:#52785e;color:#b2e7c4}
  html[data-insida-theme="dark"] .faq-message.error{background:#432728;border-color:#946062;color:#ffb3ad}

  /* Project settings: customer selector and per-user time-report start articles. */
  html[data-insida-theme="dark"] .settings-customer-label,
  html[data-insida-theme="dark"] .settings-customer>small{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .settings-customer>strong{color:var(--theme-text)}
  html[data-insida-theme="dark"] .settings-customer-selected{background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .settings-customer-selected strong{color:var(--theme-text)}
  html[data-insida-theme="dark"] .settings-customer-selected button{background:var(--theme-bg);border-color:var(--theme-line);color:#ffc899}
  html[data-insida-theme="dark"] .settings-customer-results{background:var(--theme-surface);border-color:var(--theme-line);box-shadow:var(--theme-shadow)}
  html[data-insida-theme="dark"] .settings-customer-results button{background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .settings-customer-results button:hover,
  html[data-insida-theme="dark"] .settings-customer-results button:focus-visible{background:var(--theme-hover)}
  html[data-insida-theme="dark"] .settings-customer-results span{color:var(--theme-orange)}
  html[data-insida-theme="dark"] .start-articles{background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-text);box-shadow:var(--theme-shadow)}
  html[data-insida-theme="dark"] .start-articles>header,
  html[data-insida-theme="dark"] .start-article-list,
  html[data-insida-theme="dark"] .start-article-list>div{border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .start-articles h2,
  html[data-insida-theme="dark"] .start-article-list strong{color:var(--theme-text)}
  html[data-insida-theme="dark"] .start-articles header span,
  html[data-insida-theme="dark"] .start-article-add label,
  html[data-insida-theme="dark"] .start-article-list small,
  html[data-insida-theme="dark"] .start-article-empty{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .start-article-list button{background:var(--theme-raised);border-color:var(--theme-line);color:#ffc899}

  /* Project overview map label overlays a light Google map, so give it a dark-mode surface. */
  html[data-insida-theme="dark"] .project-contact-map h3{display:inline-block!important;width:max-content!important;max-width:calc(100% - 20px)!important;min-width:0!important;margin:0!important;padding:5px 9px!important;line-height:1.25!important;background:rgba(29,37,47,.96);border:1px solid var(--theme-line);color:var(--theme-text);box-shadow:0 2px 6px rgba(0,0,0,.3)}

  /* Project contacts tab: darken the panel and restore contrast in contact details and controls. */
  html[data-insida-theme="dark"] .project-contacts{background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-text);box-shadow:var(--theme-shadow)}
  html[data-insida-theme="dark"] .project-contacts>header{border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .project-contacts>header h2,
  html[data-insida-theme="dark"] .project-contact-main h3{color:var(--theme-text)}
  html[data-insida-theme="dark"] .project-contacts>header>span,
  html[data-insida-theme="dark"] .project-contact-company,
  html[data-insida-theme="dark"] .project-contact-links span,
  html[data-insida-theme="dark"] .project-contact-note,
  html[data-insida-theme="dark"] .project-contacts-empty{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .project-contact-links a{background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .project-contact-links a:hover{background:var(--theme-hover);border-color:var(--theme-orange)}
  html[data-insida-theme="dark"] .project-contact-note{border-color:var(--theme-line)}
  html[data-insida-theme="dark"] :is(.project-contact-tools,.project-contact-actions){border-color:var(--theme-line)}
  html[data-insida-theme="dark"] :is(.project-contact-tools summary,.project-contact-actions summary,.project-contact-actions button,.contact-search button){background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] :is(.project-contact-tools summary:hover,.project-contact-actions summary:hover){border-color:var(--theme-orange);color:var(--theme-orange)}
  html[data-insida-theme="dark"] :is(.contact-form,.contact-search){background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] :is(.contact-fields label,.contact-search label){color:var(--theme-muted)}
  html[data-insida-theme="dark"] :is(.contact-fields input,.contact-fields textarea,.contact-search input){background:#13181f;border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .contact-search-results{background:var(--theme-surface);border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .contact-search-results button{background:var(--theme-surface);color:var(--theme-text)}
  html[data-insida-theme="dark"] .contact-search-results button:hover{background:var(--theme-hover)}
  html[data-insida-theme="dark"] .contact-search-results :is(span,p){color:var(--theme-muted)}
  html[data-insida-theme="dark"] .contact-message.success{background:#203c30;color:#b2e7c4}
  html[data-insida-theme="dark"] .contact-message.error{background:#432728;color:#ffb3ad}

  /* Quality tools: keep action links/buttons compact and aligned instead of stretching in grid cards. */
  html[data-insida-theme="dark"] :is(.quality-tool-action button,.quality-tool-grid article>a,.quality-toggle){display:inline-flex;align-items:center;justify-content:center;align-self:start;justify-self:start;width:fit-content;min-width:0;min-height:38px;padding:8px 13px;border:1px solid #68788c;border-radius:8px;background:#3b4858!important;color:#fff!important;font-size:.82rem;line-height:1.2;text-align:center;text-decoration:none;white-space:normal;box-shadow:0 2px 5px rgba(0,0,0,.3);transition:background-color .15s ease,border-color .15s ease,color .15s ease,transform .15s ease}
  html[data-insida-theme="dark"] :is(.quality-tool-action button:hover,.quality-tool-grid article>a:hover,.quality-toggle:hover){background:#34302d!important;border-color:var(--theme-orange);color:#ffd0aa!important;transform:translateY(-1px)}
  html[data-insida-theme="dark"] :is(.quality-tool-action button:focus-visible,.quality-tool-grid article>a:focus-visible,.quality-toggle:focus-visible){outline:2px solid var(--theme-orange);outline-offset:2px}

  /* Project notes: dark surfaces with readable labels and form controls. */
  html[data-insida-theme="dark"] :is(.project-notes-form,.project-note-entry){background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-text);box-shadow:var(--theme-shadow)}
  html[data-insida-theme="dark"] .project-notes>header p{color:var(--theme-muted)}
  html[data-insida-theme="dark"] .project-notes-form label{color:var(--theme-text)}
  html[data-insida-theme="dark"] :is(.project-notes-form input:not([type=file]),.project-notes-form textarea){background:#13181f;border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] :is(.project-notes-form small,.project-note-entry>small,.project-note-entry time){color:var(--theme-muted)}
  html[data-insida-theme="dark"] .project-note-actions{border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .note-action-link{background:var(--theme-raised);border-color:var(--theme-line);color:var(--theme-text)}
  html[data-insida-theme="dark"] .note-action-link:hover{background:var(--theme-hover);border-color:var(--theme-orange);color:#ffd0aa}
  html[data-insida-theme="dark"] .note-action-link.danger{border-color:#99605c;color:#ffb3ad}
  html[data-insida-theme="dark"] .project-note-images img{border-color:var(--theme-line)}
  html[data-insida-theme="dark"] .project-notes-empty{background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-muted)}
  html[data-insida-theme="dark"] .project-notes-message.success{background:#203c30;color:#b2e7c4}
  html[data-insida-theme="dark"] .project-notes-message.error{background:#432728;color:#ffb3ad}

  /* Archived-project Dropbox path in project settings. */
  html[data-insida-theme="dark"] .project-status-panel>header code{background:#493425;border-radius:3px;padding:0 .18em;color:#ffd0aa}
  html[data-insida-theme="dark"] .project-status-dates>span{border-color:var(--theme-line);background:var(--theme-raised);color:var(--theme-muted)}
  html[data-insida-theme="dark"] .project-status-dates>span strong{color:var(--theme-text)}
  html[data-insida-theme="dark"] .booking-item__equipment img{background:rgba(238,241,245,.88);box-shadow:0 0 0 1px rgba(0,0,0,.28)}
  html[data-insida-theme="dark"] .economy-section-toggle{background:#3b4858;border-color:#68788c;color:#fff}
  html[data-insida-theme="dark"] .economy-section-toggle:hover{background:#34302d;border-color:var(--theme-orange);color:#ffd0aa}
}

/* Printed documents always retain the existing light palette. */
@media print{.app-theme-toggle{display:none!important}html{color-scheme:light}}

.economy-collapse-actions{display:flex;align-items:center;gap:10px}
.economy-section-toggle{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:7px 11px;border:1px solid #d5d6d3;border-radius:8px;background:#fff;color:#30343a;font:inherit;font-size:.8rem;font-weight:700;white-space:nowrap;cursor:pointer}
.economy-section-toggle:hover{border-color:#ef6108;background:#fff8f2;color:#c84e00}
.economy-section-toggle:focus-visible{outline:2px solid #ef6108;outline-offset:2px}
.economy-collapsible-content[hidden]{display:none!important}
.economy-delivery-card>header{display:flex;align-items:center;justify-content:space-between;gap:14px}
@media(max-width:560px){.economy-collapse-actions{gap:6px}.economy-section-toggle{min-height:34px;padding:6px 9px;font-size:.75rem}}
