/*
 * Aendix Office Workspace dark-mode surface map.
 * v1.9.23 - Applies only when the authenticated Office account selects dark mode.
 */
html[data-aow-theme="dark"] body.aow-is-workspace {
  --button-primary-bg:#2563eb;
  --button-primary-hover:#1d4ed8;
}
html[data-aow-theme="dark"] .aen-candidate-state--pending { color:#fde68a; background:#382b16; border-color:#98752e; }
html[data-aow-theme="dark"] .aen-candidate-state--scheduled { color:#bfdbfe; background:#182e4b; border-color:#527cad; }
html[data-aow-theme="dark"] .aen-candidate-state--published,
html[data-aow-theme="dark"] .aen-published-card-status { color:#bbf7d0; background:#15382a; border-color:#4a8a68; }
html[data-aow-theme="dark"] body,
html[data-aow-theme="dark"] .aow-workspace-shell { color:var(--global-text); background:var(--workspace-bg); }
html[data-aow-theme="dark"] .aow-topbar { background:var(--topbar-bg); border-color:var(--topbar-border); }
html[data-aow-theme="dark"] .aow-sidebar-toggle,
html[data-aow-theme="dark"] .aow-theme-toggle,
html[data-aow-theme="dark"] .aow-button--secondary,
html[data-aow-theme="dark"] .aow-mini-button { background:#1a2739; color:#dce6f2; border-color:#41536b; }
html[data-aow-theme="dark"] .aow-sidebar-toggle:hover,
html[data-aow-theme="dark"] .aow-theme-toggle:hover,
html[data-aow-theme="dark"] .aow-button--secondary:hover,
html[data-aow-theme="dark"] .aow-mini-button:hover { background:#223249; border-color:#536985; }
.aow-theme-toggle { width:38px; height:38px; flex:0 0 38px; display:inline-grid; place-items:center; padding:0; border:1px solid var(--global-border-strong); border-radius:9px; background:#fff; color:#475467; cursor:pointer; transition:background-color .15s ease,border-color .15s ease,color .15s ease; }
.aow-theme-toggle:hover { background:#f8fafc; color:#101828; }
.aow-theme-toggle:focus-visible { outline:2px solid var(--global-accent); outline-offset:2px; }
.aow-theme-toggle:disabled { opacity:.58; cursor:wait; }
.aow-theme-toggle__icon { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.aow-theme-toggle__icon--moon { fill:currentColor; stroke:none; }
.aow-theme-toggle__icon--sun { display:none; }
html[data-aow-theme="dark"] .aow-theme-toggle__icon--moon { display:none; }
html[data-aow-theme="dark"] .aow-theme-toggle__icon--sun { display:block; }

html[data-aow-theme="dark"] .aow-module-card,
html[data-aow-theme="dark"] .aow-employee-card,
html[data-aow-theme="dark"] .aow-settings-card,
html[data-aow-theme="dark"] .aow-dashboard-module,
html[data-aow-theme="dark"] .aow-dashboard-section,
html[data-aow-theme="dark"] .aow-attendance-slot,
html[data-aow-theme="dark"] .aow-attendance-employee,
html[data-aow-theme="dark"] .aow-folder-card,
html[data-aow-theme="dark"] .aow-library-preview__dialog,
html[data-aow-theme="dark"] .aow-library-share-dialog,
html[data-aow-theme="dark"] .aow-access-details,
html[data-aow-theme="dark"] .aow-folder-permission-row,
html[data-aow-theme="dark"] .aow-file-permission-row,
html[data-aow-theme="dark"] .aow-workday-picker label,
html[data-aow-theme="dark"] .aow-knowledge-tree,
html[data-aow-theme="dark"] .aow-knowledge-content,
html[data-aow-theme="dark"] .aow-kb-section,
html[data-aow-theme="dark"] .aow-kb-read-panel,
html[data-aow-theme="dark"] .aow-kb-readers>div,
html[data-aow-theme="dark"] .aow-kb-editor-meta,
html[data-aow-theme="dark"] .aow-kb-person-check,
html[data-aow-theme="dark"] .aow-kb-section-editor,
html[data-aow-theme="dark"] .aow-kb-tag-choice,
html[data-aow-theme="dark"] .aow-modal__dialog,
html[data-aow-theme="dark"] .aow-announcement-card,
html[data-aow-theme="dark"] .aow-note-editor { background:#172235; border-color:#2b3a4f; color:#e4ebf3; }

html[data-aow-theme="dark"] .aow-employee-card__head,
html[data-aow-theme="dark"] .aow-attendance-employee__head,
html[data-aow-theme="dark"] .aow-panel-toolbar,
html[data-aow-theme="dark"] .aow-panel-toolbar--sticky,
html[data-aow-theme="dark"] .aow-settings-section-head,
html[data-aow-theme="dark"] .aow-dashboard-section>summary,
html[data-aow-theme="dark"] .aow-performance-person>summary,
html[data-aow-theme="dark"] .aow-attendance-months details>summary,
html[data-aow-theme="dark"] .aow-kb-article-header,
html[data-aow-theme="dark"] .aow-kb-editor-titlebar,
html[data-aow-theme="dark"] .aow-kb-sections-toolbar,
html[data-aow-theme="dark"] .aow-kb-tree-category-head,
html[data-aow-theme="dark"] .aow-note-owner-bar { background:#1c2a3e; border-color:#32445c; color:#e7eef7; }

html[data-aow-theme="dark"] .aow-setting-summary,
html[data-aow-theme="dark"] .aow-employee-create-panel,
html[data-aow-theme="dark"] .aow-clock-window,
html[data-aow-theme="dark"] .aow-performance-note,
html[data-aow-theme="dark"] .aow-library-empty,
html[data-aow-theme="dark"] .aow-kb-tree-category,
html[data-aow-theme="dark"] .aow-kb-access-box,
html[data-aow-theme="dark"] .aow-kb-editor-image,
html[data-aow-theme="dark"] .aow-kb-tag-library,
html[data-aow-theme="dark"] .aow-kb-import-rules { background:#142033; border-color:#2b3a4f; color:#c9d5e3; }

html[data-aow-theme="dark"] .aow-module-card__icon,
html[data-aow-theme="dark"] .aow-empty-state__icon { background:#182d52; }
html[data-aow-theme="dark"] .aow-empty-state code { background:#223149; color:#cbd7e5; }
html[data-aow-theme="dark"] .aow-kb-tree-article:hover,
html[data-aow-theme="dark"] .aow-kb-tree-toggle:hover,
html[data-aow-theme="dark"] .aow-kb-tree-toggle:focus-visible,
html[data-aow-theme="dark"] .aow-kb-category-toggle:hover,
html[data-aow-theme="dark"] .aow-kb-category-toggle:focus-visible { background:#20314a; color:#9fc0ff; }
html[data-aow-theme="dark"] .aow-kb-category-toggle { color:#9eafc2; }
html[data-aow-theme="dark"] .aow-kb-tree-article.is-active,
html[data-aow-theme="dark"] .aow-kb-tag-choice.is-active { background:#20395f; color:#a9c8ff; border-color:#496f9f; }

html[data-aow-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html[data-aow-theme="dark"] textarea,
html[data-aow-theme="dark"] select,
html[data-aow-theme="dark"] .aow-input,
html[data-aow-theme="dark"] .aow-table-input,
html[data-aow-theme="dark"] .aow-preview-text-editor { background:#101b2b; color:#edf3fa; border-color:#41536b; caret-color:#edf3fa; }
html[data-aow-theme="dark"] input::placeholder,
html[data-aow-theme="dark"] textarea::placeholder { color:#74859b; opacity:1; }
html[data-aow-theme="dark"] select option { background:#101b2b; color:#edf3fa; }
html[data-aow-theme="dark"] input:disabled,
html[data-aow-theme="dark"] textarea:disabled,
html[data-aow-theme="dark"] select:disabled { background:#172235; color:#72849a; }

html[data-aow-theme="dark"] .aow-grid-toolbar input[type="search"] { background:#101b2b; color:#edf3fa; border-color:#41536b; }
html[data-aow-theme="dark"] .aow-data-table { background:var(--table-row-bg); color:var(--table-text); }
html[data-aow-theme="dark"] .aow-data-table th { background:var(--table-header-bg); color:var(--table-header-text); border-color:var(--table-border); }
html[data-aow-theme="dark"] .aow-data-table td { border-color:var(--table-border); }
html[data-aow-theme="dark"] .aow-data-table tbody tr:hover td { background:var(--table-row-hover-bg); }

html[data-aow-theme="dark"] .aow-kb-article-header h2,
html[data-aow-theme="dark"] .aow-kb-section h3,
html[data-aow-theme="dark"] .aow-kb-editor-titlebar h2,
html[data-aow-theme="dark"] .aow-kb-tree-category-head strong,
html[data-aow-theme="dark"] .aow-dashboard-section>summary strong,
html[data-aow-theme="dark"] .aow-folder-open strong { color:#f2f6fb; }
html[data-aow-theme="dark"] .aow-kb-section-text,
html[data-aow-theme="dark"] .aow-kb-read-panel summary,
html[data-aow-theme="dark"] .aow-kb-tree-article,
html[data-aow-theme="dark"] .aow-attendance-early-check { color:#d8e2ee; }
html[data-aow-theme="dark"] .aow-kb-article-meta,
html[data-aow-theme="dark"] .aow-kb-tree-category-head small,
html[data-aow-theme="dark"] .aow-kb-editor-titlebar span,
html[data-aow-theme="dark"] .aow-kb-sections-toolbar span,
html[data-aow-theme="dark"] .aow-folder-open small,
html[data-aow-theme="dark"] .aow-field small,
html[data-aow-theme="dark"] .aow-setting-summary span { color:#9eafc2; }

html[data-aow-theme="dark"] .aow-kb-rich-toolbar { background:#172235; border-color:#41536b; }
html[data-aow-theme="dark"] .aow-kb-rich-tool,
html[data-aow-theme="dark"] .aow-kb-rich-color,
html[data-aow-theme="dark"] .aow-kb-rich-select { background:#1a2739; color:#e2eaf4; border-color:#41536b; }
html[data-aow-theme="dark"] .aow-kb-rich-tool:hover,
html[data-aow-theme="dark"] .aow-kb-rich-tool:focus-visible,
html[data-aow-theme="dark"] .aow-kb-rich-color:hover,
html[data-aow-theme="dark"] .aow-kb-rich-select:hover,
html[data-aow-theme="dark"] .aow-kb-rich-select:focus-visible { background:#253650; border-color:#5d7798; }
html[data-aow-theme="dark"] .aow-kb-rich-editor,
html[data-aow-theme="dark"] .aow-announcement-rich-editor { background:#101b2b; color:#edf3fa; border-color:#41536b; caret-color:#edf3fa; }
html[data-aow-theme="dark"] .aow-kb-rich-editor a,
html[data-aow-theme="dark"] .aow-kb-section-text a,
html[data-aow-theme="dark"] .aow-announcement-content a { color:#8cb4ff; }
html[data-aow-theme="dark"] .aow-kb-rich-editor table,
html[data-aow-theme="dark"] .aow-kb-section-text table,
html[data-aow-theme="dark"] .aow-announcement-content table { background:#101b2b; color:#e7eef7; }
html[data-aow-theme="dark"] .aow-kb-rich-editor th,
html[data-aow-theme="dark"] .aow-kb-section-text th,
html[data-aow-theme="dark"] .aow-announcement-content th { background:#1c2a3e; }
html[data-aow-theme="dark"] .aow-kb-rich-editor th,
html[data-aow-theme="dark"] .aow-kb-rich-editor td,
html[data-aow-theme="dark"] .aow-kb-section-text th,
html[data-aow-theme="dark"] .aow-kb-section-text td,
html[data-aow-theme="dark"] .aow-announcement-content th,
html[data-aow-theme="dark"] .aow-announcement-content td { border-color:#41536b; }
html[data-aow-theme="dark"] .aow-kb-rich-table-picker { background:#172235; border-color:#41536b; box-shadow:0 16px 34px rgba(0,0,0,.32); }
html[data-aow-theme="dark"] .aow-kb-rich-table-cell { background:#142033; border-color:#41536b; }
html[data-aow-theme="dark"] .aow-kb-rich-table-cell:hover,
html[data-aow-theme="dark"] .aow-kb-rich-table-cell.is-active { background:#27466f; border-color:#72a2ff; }

html[data-aow-theme="dark"] .aow-doc-preview { background:#111c2c; color:#e8eef6; }
html[data-aow-theme="dark"] .aow-doc-table td { border-color:#41536b; }
html[data-aow-theme="dark"] .aow-library-preview,
html[data-aow-theme="dark"] .aow-library-share-modal,
html[data-aow-theme="dark"] .aow-modal { background:rgba(3,8,17,.78); }
html[data-aow-theme="dark"] .aow-library-preview__head,
html[data-aow-theme="dark"] .aow-library-share-actions { border-color:#2b3a4f; background:#172235; }

html[data-aow-theme="dark"] .aow-attendance-slot.is-open { background:#192b47; border-color:#4f78ad; }
html[data-aow-theme="dark"] .aow-attendance-slot.is-missing { background:#321f28; border-color:#8a4959; }
html[data-aow-theme="dark"] .aow-attendance-slot.is-complete { background:#153229; border-color:#3f775f; }
html[data-aow-theme="dark"] .aow-attendance-summary-state,
html[data-aow-theme="dark"] .aow-dashboard-attendance-state,
html[data-aow-theme="dark"] .aow-kb-status-pill { background:#26364b; color:#c7d3e1; }
html[data-aow-theme="dark"] .aow-attendance-summary-state.is-complete,
html[data-aow-theme="dark"] .aow-dashboard-attendance-state.is-complete,
html[data-aow-theme="dark"] .aow-kb-status-pill.is-published,
html[data-aow-theme="dark"] .aow-kb-read-done,
html[data-aow-theme="dark"] .aow-announcement-read-done { background:#17392d; color:#74d9a3; }
html[data-aow-theme="dark"] .aow-attendance-summary-state.is-missing,
html[data-aow-theme="dark"] .aow-dashboard-attendance-state.is-missing,
html[data-aow-theme="dark"] .aow-badge--unread { background:#3a2029; color:#ff9aaa; }
html[data-aow-theme="dark"] .aow-attendance-summary-state.is-open,
html[data-aow-theme="dark"] .aow-dashboard-attendance-state.is-open { background:#183453; color:#8abaff; }
html[data-aow-theme="dark"] .aow-kb-status-pill.is-draft { background:#3b3119; color:#ffd267; }

html[data-aow-theme="dark"] .aow-kb-tags span,
html[data-aow-theme="dark"] .aow-kb-section-label { background:#243349; color:#b9c7d8; border-color:#41536b; }
html[data-aow-theme="dark"] .aow-kb-editor-image img,
html[data-aow-theme="dark"] .aow-kb-image-button img { background:#101b2b; border-color:#41536b; }
html[data-aow-theme="dark"] .aow-kb-tree-row[data-kb-depth]:not([data-kb-depth="0"])::before { background:#3b4b61; }

@media (max-width:767px) {
  .aow-theme-toggle { width:36px; height:36px; flex-basis:36px; }
  .aow-topbar__meta { gap:8px; }
}

/* Additional module surfaces that use fixed light colors in the legacy component CSS. */
html[data-aow-theme="dark"] .aow-share-person,
html[data-aow-theme="dark"] .aow-attendance-months details,
html[data-aow-theme="dark"] .aow-settings-tabs,
html[data-aow-theme="dark"] .aow-settings-tabpanel,
html[data-aow-theme="dark"] .aow-performance-person,
html[data-aow-theme="dark"] .aow-performance-person__body,
html[data-aow-theme="dark"] .aow-attendance-month-person,
html[data-aow-theme="dark"] .aow-performance-history>details,
html[data-aow-theme="dark"] .aow-employee-card--compact,
html[data-aow-theme="dark"] .aow-employee-card__facts>span,
html[data-aow-theme="dark"] .aow-employee-card__manage,
html[data-aow-theme="dark"] .aow-attendance-month-switcher,
html[data-aow-theme="dark"] .aow-segmented-control,
html[data-aow-theme="dark"] .aow-announcement-editor,
html[data-aow-theme="dark"] .aow-note-editor,
html[data-aow-theme="dark"] .aow-modal__body,
html[data-aow-theme="dark"] .aow-kb-rich-table-popover { background:#172235; color:#e4ebf3; border-color:#2b3a4f; }
html[data-aow-theme="dark"] .aow-employee-permissions,
html[data-aow-theme="dark"] .aow-shared-employee-list,
html[data-aow-theme="dark"] .aow-login-protection,
html[data-aow-theme="dark"] .aow-profile-avatar-preview,
html[data-aow-theme="dark"] .aow-employee-card__summary { background:#142033; border-color:#2b3a4f; color:#d9e4ef; }
html[data-aow-theme="dark"] .aow-employee-card__summary { background:linear-gradient(180deg,#18263a 0%,#142033 100%); }
html[data-aow-theme="dark"] .aow-attendance-month-switcher__head,
html[data-aow-theme="dark"] .aow-access-details>summary,
html[data-aow-theme="dark"] .aow-performance-person>summary { background:#1c2a3e; border-color:#32445c; }
html[data-aow-theme="dark"] .aow-performance-person__totals>span { background:#203047; border-color:#3a4f69; }
html[data-aow-theme="dark"] .aow-performance-event input,
html[data-aow-theme="dark"] .aow-performance-event select { background:#101b2b; color:#edf3fa; border-color:#41536b; }
html[data-aow-theme="dark"] .aow-login-protection.is-locked { background:#3a2029; border-color:#8a4959; color:#ff9aaa; }
html[data-aow-theme="dark"] .aow-announcement-card.is-pinned { background:#192b47; border-color:#4f78ad; }
html[data-aow-theme="dark"] .aow-announcement-titleline h3,
html[data-aow-theme="dark"] .aow-announcement-content { color:#dce7f4; }
html[data-aow-theme="dark"] .aow-announcement-meta { color:#9eafc2; }
html[data-aow-theme="dark"] .aow-settings-tabs button { color:#9eafc2; }
html[data-aow-theme="dark"] .aow-settings-tabs button.is-active { color:#f2f6fb; }
html[data-aow-theme="dark"] .aow-modal__body>.aow-toolbar-actions:last-child { background:rgba(23,34,53,.96); }
html[data-aow-theme="dark"] .aow-modal__close { background:#1a2739; color:#dce6f2; border-color:#41536b; }
html[data-aow-theme="dark"] .aow-preview-frame--drawio { background:#101b2b; }
html[data-aow-theme="dark"] .aow-doc-preview h1 { color:#f2f6fb; }
html[data-aow-theme="dark"] .aow-doc-preview h2 { color:#dce8f7; }
html[data-aow-theme="dark"] .aow-doc-preview h3,
html[data-aow-theme="dark"] .aow-doc-preview h4,
html[data-aow-theme="dark"] .aow-doc-preview h5,
html[data-aow-theme="dark"] .aow-doc-preview h6,
html[data-aow-theme="dark"] .aow-doc-preview p { color:#d4dfeb; }
html[data-aow-theme="dark"] .aow-kb-lightbox-close,
html[data-aow-theme="dark"] .aow-kb-lightbox-nav { background:rgba(26,39,57,.94); color:#f2f6fb; }

/* v1.9.22: dark-mode text hierarchy and contrast audit.
 * Legacy component CSS still contains light-theme navy/gray text values.
 * These scoped rules keep headings, navigation and explanatory text readable
 * without flattening every text level into the same white color. */
html[data-aow-theme="dark"] .aow-panel-toolbar > div:first-child strong,
html[data-aow-theme="dark"] .aow-settings-section-head strong,
html[data-aow-theme="dark"] .aow-dashboard-section > summary strong,
html[data-aow-theme="dark"] .aow-attendance-months > details > summary,
html[data-aow-theme="dark"] .aow-attendance-month-person > summary strong,
html[data-aow-theme="dark"] .aow-attendance-employee__head strong,
html[data-aow-theme="dark"] .aow-employee-card__head strong,
html[data-aow-theme="dark"] .aow-attendance-month-switcher__head strong,
html[data-aow-theme="dark"] .aow-performance-person__identity strong,
html[data-aow-theme="dark"] .aow-makeup-auto > strong,
html[data-aow-theme="dark"] .aow-modal__header strong,
html[data-aow-theme="dark"] .aow-kb-tag-library-head strong,
html[data-aow-theme="dark"] .aow-kb-section-editor-head strong,
html[data-aow-theme="dark"] .aow-settings-card h3,
html[data-aow-theme="dark"] .aow-employee-card h3 {
  color:#f4f7fb;
}

html[data-aow-theme="dark"] .aow-panel-toolbar > div:first-child > span,
html[data-aow-theme="dark"] .aow-settings-section-head span,
html[data-aow-theme="dark"] .aow-settings-section-note,
html[data-aow-theme="dark"] .aow-dashboard-section > summary small,
html[data-aow-theme="dark"] .aow-attendance-employee__head small,
html[data-aow-theme="dark"] .aow-attendance-slot__meta > span,
html[data-aow-theme="dark"] .aow-attendance-slot__meta > small,
html[data-aow-theme="dark"] .aow-table-subtext,
html[data-aow-theme="dark"] .aow-attendance-month-switcher__head small,
html[data-aow-theme="dark"] .aow-performance-person > summary small,
html[data-aow-theme="dark"] .aow-performance-person__totals small,
html[data-aow-theme="dark"] .aow-employee-card__identity small,
html[data-aow-theme="dark"] .aow-kb-tag-library-head small,
html[data-aow-theme="dark"] .aow-section-help,
html[data-aow-theme="dark"] .aow-login-protection small {
  color:#b8c4d3;
}

html[data-aow-theme="dark"] .aow-settings-tabs button,
html[data-aow-theme="dark"] .aow-subnav button {
  color:#b9c7d8;
}
html[data-aow-theme="dark"] .aow-settings-tabs button:hover,
html[data-aow-theme="dark"] .aow-settings-tabs button:focus-visible,
html[data-aow-theme="dark"] .aow-subnav button:hover,
html[data-aow-theme="dark"] .aow-subnav button:focus-visible {
  color:#e4edf7;
}
html[data-aow-theme="dark"] .aow-settings-tabs button.is-active,
html[data-aow-theme="dark"] .aow-subnav button.is-active {
  color:#ffffff;
}

html[data-aow-theme="dark"] .aow-field > span,
html[data-aow-theme="dark"] .aow-workday-picker label,
html[data-aow-theme="dark"] .aow-clock-window > strong,
html[data-aow-theme="dark"] .aow-access-details > summary,
html[data-aow-theme="dark"] .aow-shared-employee-list > strong {
  color:#e4edf7;
}

html[data-aow-theme="dark"] .aow-library-breadcrumb button[disabled],
html[data-aow-theme="dark"] .aow-makeup-check,
html[data-aow-theme="dark"] .aow-attendance-slot__result time,
html[data-aow-theme="dark"] .aow-kb-rich-table-status,
html[data-aow-theme="dark"] .aow-kb-import-rules {
  color:#c5d1df;
}


/* v1.9.23: finish the dark-surface audit.
 * Some legacy light-theme selectors in the Workspace shell have greater
 * specificity than the generic dark map, so the first module heading band and
 * compact checkbox/pill controls are explicitly scoped here. */
html[data-aow-theme="dark"] .aow-workspace-main .aow-workspace-panel > .aow-panel-toolbar:first-child,
html[data-aow-theme="dark"] .aow-workspace-main .aow-workspace-panel > .aow-panel-toolbar--sticky:first-child {
  background:#1c2a3e;
  border-color:#32445c;
  color:#e7eef7;
}
html[data-aow-theme="dark"] .aow-panel-toolbar .aow-toolbar-actions > span,
html[data-aow-theme="dark"] [data-aow-attendance-admin-pending] {
  color:#aebdce;
}

html[data-aow-theme="dark"] .aow-attendance-early-check {
  background:#142033;
  border-color:#3b4d65;
  color:#cbd7e5;
}
html[data-aow-theme="dark"] .aow-attendance-early-check:hover {
  background:#1a293d;
  border-color:#536a87;
  color:#e4edf7;
}
html[data-aow-theme="dark"] .aow-attendance-early-check:has(input:checked) {
  background:#1d3658;
  border-color:#5b83bd;
  color:#c5dcff;
}
html[data-aow-theme="dark"] .aow-workspace-shell input[type="checkbox"],
html[data-aow-theme="dark"] .aow-workspace-shell input[type="radio"] {
  accent-color:#5b8ff9;
  color-scheme:dark;
}
html[data-aow-theme="dark"] .aow-workspace-shell input[type="checkbox"]:disabled,
html[data-aow-theme="dark"] .aow-workspace-shell input[type="radio"]:disabled {
  opacity:.68;
}

html[data-aow-theme="dark"] .aow-pending-badge,
html[data-aow-theme="dark"] .aow-permission-chips span,
html[data-aow-theme="dark"] .aow-dashboard-attendance-state.is-upcoming {
  background:#223149;
  border-color:#3b4d65;
  color:#b9c7d8;
}
html[data-aow-theme="dark"] .aow-segmented-control button {
  color:#aebdce;
}
html[data-aow-theme="dark"] .aow-segmented-control button:hover,
html[data-aow-theme="dark"] .aow-segmented-control button:focus-visible {
  background:#223249;
  color:#e7eef7;
}
html[data-aow-theme="dark"] .aow-segmented-control button.is-active {
  background:#3f73df;
  color:#ffffff;
}

/* Keep compact status pills dark enough for night use while retaining state. */
html[data-aow-theme="dark"] .aow-attendance-summary-state,
html[data-aow-theme="dark"] .aow-dashboard-attendance-state {
  background:#25354b;
  color:#d0dbe7;
}
html[data-aow-theme="dark"] .aow-attendance-summary-state.is-complete,
html[data-aow-theme="dark"] .aow-dashboard-attendance-state.is-complete {
  background:#143a2d;
  color:#7be5b1;
}
html[data-aow-theme="dark"] .aow-attendance-summary-state.is-missing,
html[data-aow-theme="dark"] .aow-dashboard-attendance-state.is-missing {
  background:#45242c;
  color:#ff9dab;
}
html[data-aow-theme="dark"] .aow-attendance-summary-state.is-open,
html[data-aow-theme="dark"] .aow-dashboard-attendance-state.is-open {
  background:#193b5d;
  color:#93c6ff;
}

/* v1.9.27: Knowledge read-target controls and unread indicators. */
html[data-aow-theme="dark"] .aow-kb-read-settings,
html[data-aow-theme="dark"] .aow-kb-read-target-box { background:#142033; border-color:#34465e; color:#dce6f2; }
html[data-aow-theme="dark"] .aow-kb-read-scope-help { color:#c3cfdd; }
html[data-aow-theme="dark"] .aow-kb-read-scope-help strong { color:#eef4fb; }
html[data-aow-theme="dark"] .aow-kb-read-scope-help small { color:#9fb0c4; }
html[data-aow-theme="dark"] .aow-kb-unread-dot { background:#fb5c6c; box-shadow:0 0 0 2px rgba(251,92,108,.16); }
html[data-aow-theme="dark"] .aow-announcement-read-confirm{border-top-color:#2f4056}

/* v1.9.30 Text Library + Backup dark mode */
html[data-aow-theme="dark"] .aow-textlib-category,
html[data-aow-theme="dark"] .aow-textlib-entry,
html[data-aow-theme="dark"] .aow-textlib-plain-view,
html[data-aow-theme="dark"] .aow-textlib-rich-view,
html[data-aow-theme="dark"] .aow-backup-card{background:#182235;border-color:#314056;color:#d8e1ec}
html[data-aow-theme="dark"] .aow-textlib-category-title strong,
html[data-aow-theme="dark"] .aow-backup-card h3{color:#f1f5f9}
html[data-aow-theme="dark"] .aow-textlib-category-title small,
html[data-aow-theme="dark"] .aow-textlib-entry,
html[data-aow-theme="dark"] .aow-textlib-content-editors small,
html[data-aow-theme="dark"] .aow-backup-card p{color:#b6c3d4}
html[data-aow-theme="dark"] .aow-textlib-entry-list{border-color:#314056}
html[data-aow-theme="dark"] .aow-textlib-entry{border-color:#26364b}
html[data-aow-theme="dark"] .aow-textlib-entry:hover,
html[data-aow-theme="dark"] .aow-textlib-entry.is-active{background:#202e43;color:#f1f5f9}
html[data-aow-theme="dark"] .aow-textlib-entry small{color:#8fa0b5}
html[data-aow-theme="dark"] .aow-textlib-rich img,html[data-aow-theme="dark"] .aow-textlib-rich-view img{border-color:#314056;box-shadow:0 1px 2px rgba(0,0,0,.24)}
html[data-aow-theme="dark"] .aow-backup-warning{background:#3a291f!important;color:#fdba74!important}


/* v1.9.32 rich-document supporting surfaces */
html[data-aow-theme="dark"] .aow-kb-section-text blockquote,html[data-aow-theme="dark"] .aow-textlib-rich-view blockquote,html[data-aow-theme="dark"] .aow-kb-rich-editor blockquote,html[data-aow-theme="dark"] .aow-textlib-rich blockquote{background:#17263a;border-left-color:#6f9fd7;color:#d8e2ee}
html[data-aow-theme="dark"] .aow-kb-section-text hr,html[data-aow-theme="dark"] .aow-textlib-rich-view hr,html[data-aow-theme="dark"] .aow-kb-rich-editor hr,html[data-aow-theme="dark"] .aow-textlib-rich hr{border-top-color:#34465e}
html[data-aow-theme="dark"] .aow-kb-section-text pre,html[data-aow-theme="dark"] .aow-textlib-rich-view pre,html[data-aow-theme="dark"] .aow-kb-rich-editor pre,html[data-aow-theme="dark"] .aow-textlib-rich pre{background:#101b2b;border-color:#34465e;color:#e7eef7}


/* v1.9.34 typography-standardization controls */
html[data-aow-theme="dark"] .aow-rich-standardize{background:#1b3049;border-color:#3b5878;color:#d9eaff}
html[data-aow-theme="dark"] .aow-rich-standardize:hover,
html[data-aow-theme="dark"] .aow-rich-standardize:focus-visible{background:#24415f;border-color:#5f83aa;color:#ffffff}
html[data-aow-theme="dark"] .aow-rich-heading-note{color:#9fb0c4}

/* v1.9.38: Collection Library upload diagnostic contrast in dark mode. */
[data-aow-theme="dark"] .aow-library-module>.aow-inline-status[data-state="saving"],
[data-aow-theme="dark"] .aow-library-module>.aow-inline-status[data-state="loading"]{color:#93c5fd}
[data-aow-theme="dark"] .aow-library-module>.aow-inline-status[data-state="saved"]{color:#86efac}
[data-aow-theme="dark"] .aow-library-module>.aow-inline-status[data-state="error"]{color:#fca5a5}
