/* Nextwork Data — White mode final color pass.
   Loaded after component-scoped CSS so the central theme registry remains authoritative. */

.app-shell.theme-light {
    color-scheme: light;
}

/* Sidebar: keep the dark shell, but raise navigation contrast. */
.app-shell.theme-light .sidebar {
    background: var(--nw-theme-bg-sidebar) !important;
}

.app-shell.theme-light .sidebar .brand-name,
.app-shell.theme-light .sidebar .nav-link,
.app-shell.theme-light .sidebar .status-title {
    color: var(--nw-theme-sidebar-text) !important;
}

.app-shell.theme-light .sidebar .brand-subtitle,
.app-shell.theme-light .sidebar .nav-section,
.app-shell.theme-light .sidebar .status-copy {
    color: var(--nw-theme-sidebar-muted) !important;
}

.app-shell.theme-light .sidebar .nav-icon {
    color: var(--nw-theme-sidebar-icon) !important;
}

.app-shell.theme-light .sidebar .nav-link:hover {
    background: #172B42 !important;
    color: #FFFFFF !important;
}

.app-shell.theme-light .sidebar .nav-link.active {
    background: #21364D !important;
    color: #FFFFFF !important;
    border-color: #2D435B !important;
    box-shadow: inset 3px 0 0 var(--nw-theme-accent) !important;
}

.app-shell.theme-light .sidebar .desktop-sidebar-toggle {
    background: #1B3047 !important;
    border-color: #40556C !important;
    color: #FFFFFF !important;
}

.app-shell.theme-light .sidebar .desktop-sidebar-toggle:hover {
    border-color: var(--nw-theme-accent) !important;
    color: #FFFFFF !important;
}

/* White mode brand/action accent: #2A77A6 everywhere an action is intentionally accented. */
.app-shell.theme-light :is(
    .global-transaction-button,
    .shell-back-button,
    .primary-action,
    .global-customer-proclamation-button,
    .add-to-proclamation-button,
    .new-transaction-action,
    .identity-upload-button,
    .identity-document-button,
    .download-all,
    .download-button,
    .live-create-call,
    .save-settings,
    .settings-save-bar button,
    .transfer-button,
    .apply-period,
    .transaction-footer .primary,
    .customer-credential-shell-modal footer .primary,
    .customer-proclamation-picker-list article > button
) {
    background: var(--nw-theme-accent) !important;
    border-color: var(--nw-theme-accent) !important;
    color: #FFFFFF !important;
    box-shadow: none !important;
}

.app-shell.theme-light :is(
    .global-transaction-button,
    .shell-back-button,
    .primary-action,
    .global-customer-proclamation-button,
    .add-to-proclamation-button,
    .new-transaction-action,
    .identity-upload-button,
    .identity-document-button,
    .download-all,
    .download-button,
    .live-create-call,
    .save-settings,
    .settings-save-bar button,
    .transfer-button,
    .apply-period,
    .transaction-footer .primary,
    .customer-credential-shell-modal footer .primary,
    .customer-proclamation-picker-list article > button
):hover:not(:disabled) {
    background: var(--nw-theme-accent-hover) !important;
    border-color: var(--nw-theme-accent-hover) !important;
    color: #FFFFFF !important;
}

/* Active tabs and selected controls use the same blue accent. */
.app-shell.theme-light :is(
    .tabs button.active,
    .qualification-tabs button.active,
    .application-detail-tabs button.active,
    .pager .selected,
    .journal-view-switch button.active
) {
    background: var(--nw-theme-accent) !important;
    border-color: var(--nw-theme-accent) !important;
    color: #FFFFFF !important;
    box-shadow: none !important;
}

.app-shell.theme-light .workspace-tab.active {
    box-shadow: inset 0 2px 0 var(--nw-theme-accent) !important;
}

.app-shell.theme-light :is(.calculator-button.active, .single-tab-button.active) {
    background: var(--nw-theme-accent-soft) !important;
    border-color: var(--nw-theme-accent) !important;
    color: var(--nw-theme-accent-strong) !important;
}

.app-shell.theme-light :is(.columns-button.active, .theme-choice.selected) {
    background: var(--nw-theme-accent-soft) !important;
    border-color: var(--nw-theme-accent) !important;
    color: var(--nw-theme-accent-strong) !important;
    box-shadow: inset 0 0 0 1px var(--nw-theme-accent) !important;
}

.app-shell.theme-light :is(
    .contact-command:hover,
    .notes-toggle.active,
    .notes-toggle:hover,
    .education-field-row button:hover,
    .edit-button:hover,
    .back-accounting:hover
) {
    border-color: var(--nw-theme-accent) !important;
}

.app-shell.theme-light :is(
    .customer-link:hover,
    .proclamation-link:hover,
    .application-link:hover,
    .live-proclamation-link:hover,
    .live-proclamation-link:focus-visible,
    .call-link,
    .summary-copy-value:hover,
    .identity-file-preview:hover,
    .identity-file-item a,
    .summary-identity-files a,
    .education-file-control a,
    .education-file-item button:hover
) {
    color: var(--nw-theme-accent) !important;
}

.app-shell.theme-light :is(
    input[type="checkbox"],
    input[type="radio"]
) {
    accent-color: var(--nw-theme-accent) !important;
}

.app-shell.theme-light :is(input, textarea, select):focus,
.app-shell.theme-light .search-box:focus-within {
    border-color: var(--nw-theme-accent) !important;
    box-shadow: 0 0 0 2px rgba(42,119,166,.10) !important;
    outline: none !important;
}

/* Replace dark neutral chips that were inherited from Black mode. */
.app-shell.theme-light :is(
    .header-status.customer,
    .education-canvas-head > strong,
    .notes-toggle b,
    .quality-summary-head > span,
    .document-section-head > span,
    .qualification-summary-section-head > span
) {
    background: var(--nw-theme-neutral-chip-bg) !important;
    border-color: var(--nw-theme-neutral-chip-border) !important;
    color: var(--nw-theme-neutral-chip-text) !important;
}

.app-shell.theme-light #nextwork-extra-credential-trigger {
    background: var(--nw-theme-neutral-chip-bg) !important;
    border-color: var(--nw-theme-neutral-chip-border) !important;
    color: var(--nw-theme-neutral-chip-text) !important;
}

.app-shell.theme-light #nextwork-extra-credential-trigger:hover {
    background: var(--nw-theme-accent-soft) !important;
    border-color: var(--nw-theme-accent) !important;
    color: var(--nw-theme-accent-strong) !important;
}

/* Customer transactions: dark KPI blocks were unreadable in White mode. */
.app-shell.theme-light .customer-transaction-summary > div {
    background: var(--nw-theme-surface-raised) !important;
    border-color: var(--nw-theme-border) !important;
    color: var(--nw-theme-text-primary) !important;
}

.app-shell.theme-light .customer-transaction-summary span {
    color: var(--nw-theme-text-muted) !important;
}

.app-shell.theme-light .customer-transaction-summary strong {
    color: var(--nw-theme-text-primary) !important;
}

/* Qualification workspace: ensure Black-mode surfaces become light neutrals. */
.app-shell.theme-light :is(
    .education-field-catalog,
    .education-card-canvas,
    .education-entry-card,
    .education-field-row,
    .credential-card,
    .history-item
) {
    background: var(--nw-theme-surface-soft) !important;
    border-color: var(--nw-theme-border) !important;
    color: var(--nw-theme-text-primary) !important;
}

.app-shell.theme-light :is(
    .education-catalog-head span,
    .education-canvas-head span,
    .education-field-row strong,
    .education-entry-head h4,
    .credential-card > span
) {
    color: var(--nw-theme-text-primary) !important;
}

/* Active qualification catalog entries retain their green state in light mode. */
.app-shell.theme-light .education-field-row.included {
    background: var(--nw-ui-ok-bg-deep) !important;
    border-color: var(--nw-ui-ok-border) !important;
}

/* White workspace surfaces and table contrast. */
.app-shell.theme-light :is(.content-card, .data-panel, .summary-card, .metric-card, .stat-card) {
    background: var(--nw-theme-surface) !important;
    border-color: var(--nw-theme-border) !important;
}

.app-shell.theme-light table th {
    background: #F3F6F9 !important;
    color: #536174 !important;
    border-color: var(--nw-theme-border) !important;
}

.app-shell.theme-light table td {
    background: #FFFFFF !important;
    color: var(--nw-theme-text-primary) !important;
    border-color: #E1E7ED !important;
}

.app-shell.theme-light tbody tr:hover td {
    background: #F6F8FA !important;
}

/* White-mode accent details from layout/settings. */
.app-shell.theme-light .settings-scope-note {
    border-left-color: var(--nw-theme-accent) !important;
}

.app-shell.theme-light :is(
    .settings-card > header > span,
    .settings-scope-note > b,
    .user-editor > header span,
    .payroll-head > div > span
) {
    color: var(--nw-theme-accent) !important;
}

.app-shell.theme-light .editor-note {
    border-left-color: var(--nw-theme-accent) !important;
}

/* Keep semantic states semantic; only brand orange becomes blue. */
.app-shell.theme-light .status-dot {
    background: var(--nw-success) !important;
}


/* ==========================================================================
   White mode contrast system — batch 2
   These rules map legacy Black-mode component colors onto shared semantic
   White-mode roles. Change the tokens in theme-tokens.css to update each
   whole category at once.
   ========================================================================== */

/* ROLE: sidebar-contrast --------------------------------------------------- */
.app-shell.theme-light .sidebar :is(.nav-link, .nav-link span:last-child, .nav-icon) {
    color: var(--nw-theme-sidebar-nav-text) !important;
    opacity: 1 !important;
}

.app-shell.theme-light .sidebar :is(.nav-section, .brand-subtitle, .status-copy) {
    color: var(--nw-theme-sidebar-section-text) !important;
    opacity: 1 !important;
}

.app-shell.theme-light .sidebar .status-title {
    color: #FFFFFF !important;
}

.app-shell.theme-light .sidebar .nav-link.active,
.app-shell.theme-light .sidebar .nav-link.active :is(span:last-child, .nav-icon) {
    color: #FFFFFF !important;
}

/* ROLE: modal-surface ----------------------------------------------------- */
.app-shell.theme-light :is(
    .new-customer-modal,
    .customer-application-modal,
    .qualification-detail-popup,
    .customer-credential-shell-modal
) {
    background: var(--nw-theme-modal-bg) !important;
    color: var(--nw-theme-text-primary) !important;
    border-color: var(--nw-theme-border-strong) !important;
}

.app-shell.theme-light :is(
    .new-customer-modal-head,
    .new-customer-modal-footer,
    .customer-application-modal-head,
    .customer-application-modal-footer,
    .qualification-detail-popup-head,
    .qualification-detail-popup-footer
) {
    background: var(--nw-theme-modal-head-bg) !important;
    color: var(--nw-theme-text-primary) !important;
    border-color: var(--nw-theme-border) !important;
}

.app-shell.theme-light :is(
    .new-customer-section,
    .new-customer-modal .credential-card
) {
    background: var(--nw-theme-modal-section-bg) !important;
    color: var(--nw-theme-text-primary) !important;
    border-color: var(--nw-theme-border) !important;
}

.app-shell.theme-light :is(
    .new-customer-grid input,
    .new-customer-modal .credential-card input,
    .new-customer-modal .identity-file-picker
) {
    background: var(--nw-theme-modal-field-bg) !important;
    color: var(--nw-theme-text-primary) !important;
    border-color: var(--nw-theme-border-strong) !important;
}

.app-shell.theme-light :is(
    .new-customer-grid label > span,
    .new-customer-file-field > span,
    .new-customer-modal .credential-card label > span,
    .new-customer-modal .credential-card > strong
) {
    color: var(--nw-theme-text-secondary) !important;
}

.app-shell.theme-light .new-customer-modal-head > div > span {
    color: var(--nw-theme-accent) !important;
}

.app-shell.theme-light .new-customer-modal .modal-close {
    background: var(--nw-theme-neutral-chip-bg) !important;
    color: var(--nw-theme-neutral-chip-text) !important;
    border-color: var(--nw-theme-neutral-chip-border) !important;
}

.app-shell.theme-light .new-customer-modal-footer .secondary-action {
    background: #FFFFFF !important;
    color: var(--nw-theme-text-secondary) !important;
    border-color: var(--nw-theme-border-strong) !important;
}

/* ROLE: note-surface ------------------------------------------------------ */
.app-shell.theme-light .notes-popover {
    background: var(--nw-theme-modal-bg) !important;
    color: var(--nw-theme-note-text) !important;
    border-color: var(--nw-theme-note-border) !important;
    box-shadow: 0 16px 42px rgba(15, 23, 42, .16) !important;
}

.app-shell.theme-light .notes-popover-head strong {
    color: var(--nw-theme-text-primary) !important;
}

.app-shell.theme-light .notes-popover textarea {
    background: #FFFFFF !important;
    color: var(--nw-theme-text-primary) !important;
    border-color: var(--nw-theme-border-strong) !important;
}

.app-shell.theme-light .saved-notes {
    border-color: var(--nw-theme-note-border) !important;
}

.app-shell.theme-light .saved-note {
    background: var(--nw-theme-note-bg) !important;
    border: 1px solid var(--nw-theme-note-border) !important;
}

.app-shell.theme-light .saved-note span {
    color: var(--nw-theme-note-text) !important;
}

.app-shell.theme-light .saved-note button {
    color: var(--nw-theme-text-muted) !important;
}

.app-shell.theme-light .saved-note button:hover {
    color: var(--nw-theme-accent) !important;
}

/* ROLE: semantic-status-pills -------------------------------------------- */
.app-shell.theme-light :is(
    .header-status.active,
    .eligibility-status.eligible
) {
    background: var(--nw-theme-success-pill-bg) !important;
    color: var(--nw-theme-success-pill-text) !important;
    border-color: var(--nw-theme-success-pill-bg) !important;
}

.app-shell.theme-light :is(
    .eligibility-status.needs-review,
    .header-status.appointed
) {
    background: var(--nw-theme-warning-pill-bg) !important;
    color: var(--nw-theme-warning-pill-text) !important;
    border-color: var(--nw-theme-warning-pill-bg) !important;
}

/* ROLE: count-chip -------------------------------------------------------- */
.app-shell.theme-light :is(
    .customer-eligibility-head > span,
    .eligibility-panel-head > div > span,
    .eligibility-review-head > span,
    .eligibility-auto-checks summary span
) {
    background: var(--nw-theme-count-chip-bg) !important;
    color: var(--nw-theme-count-chip-text) !important;
    border-color: var(--nw-theme-neutral-chip-border) !important;
}

/* ROLE: warning-row / missing-document ----------------------------------- */
.app-shell.theme-light :is(
    .qualification-summary-file.missing,
    .document-summary-row.missing
) {
    background: var(--nw-theme-warning-row-bg) !important;
    color: var(--nw-theme-warning-row-text) !important;
    border-color: var(--nw-theme-warning-row-border) !important;
}

.app-shell.theme-light .qualification-summary-file.missing span {
    color: var(--nw-theme-warning-row-muted) !important;
}

.app-shell.theme-light .qualification-summary-file.missing strong {
    color: var(--nw-theme-warning-row-text) !important;
}

.app-shell.theme-light .qualification-summary-file.missing em {
    color: var(--nw-theme-warning-row-text) !important;
    font-weight: 900 !important;
}

.app-shell.theme-light .folder-quality-alert {
    background: var(--nw-theme-warning-row-bg) !important;
    color: var(--nw-theme-text-primary) !important;
    border-color: var(--nw-theme-warning-row-border) !important;
}

.app-shell.theme-light .folder-quality-alert-icon {
    background: var(--nw-theme-warning-pill-bg) !important;
    color: #FFFFFF !important;
}

.app-shell.theme-light .folder-quality-issues span {
    color: var(--nw-theme-text-primary) !important;
}

.app-shell.theme-light .folder-quality-issues em {
    color: var(--nw-theme-warning-row-text) !important;
}

/* ROLE: eligibility-surface ---------------------------------------------- */
.app-shell.theme-light .customer-eligibility-panel {
    background: var(--nw-theme-surface) !important;
    border-color: var(--nw-theme-border) !important;
}

.app-shell.theme-light .customer-eligibility-head {
    background: var(--nw-theme-toolbar-bg) !important;
    border-color: var(--nw-theme-border) !important;
}

.app-shell.theme-light .customer-eligibility-head :is(h3, p) {
    color: var(--nw-theme-text-primary) !important;
}

.app-shell.theme-light .customer-eligibility-head p {
    color: var(--nw-theme-text-muted) !important;
}

.app-shell.theme-light .customer-eligibility-table th {
    background: var(--nw-theme-toolbar-bg) !important;
    color: var(--nw-theme-text-secondary) !important;
}

.app-shell.theme-light .customer-eligibility-table td {
    background: #FFFFFF !important;
    color: var(--nw-theme-text-primary) !important;
}

.app-shell.theme-light .customer-eligibility-table td small {
    color: var(--nw-theme-text-muted) !important;
}

/* ROLE: generic embedded eligibility cards ------------------------------- */
.app-shell.theme-light :is(
    .eligibility-panel,
    .eligibility-position-card,
    .eligibility-review-block,
    .eligibility-auto-checks
) {
    background: var(--nw-theme-surface) !important;
    color: var(--nw-theme-text-primary) !important;
    border-color: var(--nw-theme-border) !important;
}

.app-shell.theme-light :is(
    .eligibility-panel-head h3,
    .eligibility-position-heading h4,
    .eligibility-coverage strong,
    .eligibility-review-head strong,
    .eligibility-requirement-title strong,
    .eligibility-clear-check strong,
    .eligibility-auto-check-row strong
) {
    color: var(--nw-theme-text-primary) !important;
}

.app-shell.theme-light :is(
    .eligibility-panel-legend,
    .eligibility-position-heading p,
    .eligibility-coverage small,
    .eligibility-requirement-title small,
    .eligibility-requirement-help,
    .eligibility-clear-check small,
    .eligibility-auto-check-row small
) {
    color: var(--nw-theme-text-muted) !important;
}

/* ROLE: toolbar-surface / proclamation workspace ------------------------- */
.app-shell.theme-light .workspace-context {
    background: var(--nw-theme-toolbar-bg) !important;
    border-color: var(--nw-theme-border) !important;
}

.app-shell.theme-light .workspace-context > a {
    color: var(--nw-theme-accent) !important;
}

.app-shell.theme-light .workspace-context span {
    color: var(--nw-theme-text-muted) !important;
}

.app-shell.theme-light .workspace-context strong {
    color: var(--nw-theme-text-primary) !important;
}

.app-shell.theme-light :is(
    .live-proclamation-workspace select,
    .refresh-live,
    .toolbar-button,
    .clear-filters-button,
    .columns-button,
    .toolbar-status-multi-filter
) {
    background: var(--nw-theme-toolbar-control-bg) !important;
    color: var(--nw-theme-toolbar-text) !important;
    border-color: var(--nw-theme-border-strong) !important;
}

.app-shell.theme-light .toolbar-status-multi-filter.active,
.app-shell.theme-light .columns-button.active {
    background: var(--nw-theme-accent-soft) !important;
    color: var(--nw-theme-accent-strong) !important;
    border-color: var(--nw-theme-accent) !important;
}

.app-shell.theme-light .workspace-column-picker {
    background: var(--nw-theme-toolbar-bg) !important;
    border-color: var(--nw-theme-border) !important;
}

.app-shell.theme-light .workspace-column-picker-head strong {
    color: var(--nw-theme-text-primary) !important;
}

.app-shell.theme-light .workspace-column-picker-head button,
.app-shell.theme-light .workspace-column-options label {
    background: #FFFFFF !important;
    color: var(--nw-theme-text-secondary) !important;
    border-color: var(--nw-theme-border) !important;
}

.app-shell.theme-light .workspace-column-options label.selected {
    background: var(--nw-theme-accent-soft) !important;
    color: var(--nw-theme-accent-strong) !important;
    border-color: var(--nw-theme-accent) !important;
}


/* ==========================================================================
   White mode system contrast — batch 3
   Central rules for notification cards, proclamation management, every grid
   header/filter, candidate/application modal, document review, Automation & AI
   and AI diagnostic rows.
   ========================================================================== */

/* ROLE: customer-notification -------------------------------------------- */
.app-shell.theme-light .customer-note-popup {
    background: var(--nw-theme-notification-bg) !important;
    color: var(--nw-theme-notification-text) !important;
    border-color: var(--nw-theme-notification-border) !important;
    border-left-color: var(--nw-theme-notification-accent) !important;
    box-shadow: 0 14px 36px rgba(15, 23, 42, .16) !important;
}

.app-shell.theme-light .customer-note-popup .note-popup-head {
    background: var(--nw-theme-notification-head-bg) !important;
    border-color: var(--nw-theme-notification-border) !important;
}

.app-shell.theme-light .customer-note-popup .note-popup-head strong,
.app-shell.theme-light .customer-note-popup p {
    color: var(--nw-theme-notification-text) !important;
}

.app-shell.theme-light .customer-note-popup .note-popup-head button {
    background: #FFFFFF !important;
    color: var(--nw-theme-text-secondary) !important;
    border-color: var(--nw-theme-border-strong) !important;
}

.app-shell.theme-light .customer-note-popup .note-popup-customer {
    color: var(--nw-theme-accent) !important;
}

.app-shell.theme-light .customer-note-popup .note-popup-footer {
    background: #F8FAFC !important;
    color: var(--nw-theme-notification-muted) !important;
    border-color: var(--nw-theme-notification-border) !important;
}

.app-shell.theme-light .customer-note-popup .delete-note {
    background: #FFF1EF !important;
    color: #9C352E !important;
    border-color: #E7B9B4 !important;
}

/* ROLE: proclamation-management ------------------------------------------ */
.app-shell.theme-light .workspace-management-card {
    background: var(--nw-theme-operational-panel-bg) !important;
    color: var(--nw-theme-operational-panel-text) !important;
    border-color: var(--nw-theme-operational-panel-border) !important;
}

.app-shell.theme-light .workspace-management-main span,
.app-shell.theme-light .workspace-management-facts span {
    color: var(--nw-theme-operational-panel-muted) !important;
}

.app-shell.theme-light .workspace-management-main strong,
.app-shell.theme-light .workspace-management-facts strong {
    color: var(--nw-theme-operational-panel-text) !important;
}

.app-shell.theme-light .workspace-management-facts > div {
    background: #FFFFFF !important;
    border-color: var(--nw-theme-operational-panel-border) !important;
}

.app-shell.theme-light .workspace-management-actions :is(a, button) {
    background: #FFFFFF !important;
    color: var(--nw-theme-text-secondary) !important;
    border-color: var(--nw-theme-border-strong) !important;
}

.app-shell.theme-light .workspace-management-actions :is(a, button):hover {
    background: var(--nw-theme-accent-soft) !important;
    color: var(--nw-theme-accent-strong) !important;
    border-color: var(--nw-theme-accent) !important;
}

/* ROLE: global-grid-contrast --------------------------------------------- */
.app-shell.theme-light :is(
    .entity-list-template,
    .journal-table,
    .queue-table,
    .customer-eligibility-table,
    .license-table,
    .customer-transactions-table,
    .workspace-candidates-table,
    .live-candidates-table
) th {
    background: var(--nw-theme-grid-head-bg) !important;
    color: var(--nw-theme-grid-head-text) !important;
    border-color: var(--nw-theme-grid-border) !important;
    opacity: 1 !important;
}

.app-shell.theme-light :is(
    .entity-list-template,
    .journal-table,
    .queue-table,
    .customer-eligibility-table,
    .license-table,
    .customer-transactions-table,
    .workspace-candidates-table,
    .live-candidates-table
) td {
    background: var(--nw-theme-grid-cell-bg) !important;
    color: var(--nw-theme-grid-cell-text) !important;
    border-color: var(--nw-theme-grid-border) !important;
}

.app-shell.theme-light :is(
    .entity-list-template,
    .journal-table,
    .queue-table,
    .customer-eligibility-table,
    .license-table,
    .customer-transactions-table,
    .workspace-candidates-table,
    .live-candidates-table
) tbody tr:hover td {
    background: #F7F9FB !important;
}

.app-shell.theme-light .grid-column-filter-trigger {
    color: var(--nw-theme-grid-filter-icon) !important;
    opacity: 1 !important;
}

.app-shell.theme-light .grid-column-filter-trigger:hover,
.app-shell.theme-light .grid-column-filter-trigger.active {
    background: var(--nw-theme-grid-filter-hover) !important;
    border-color: var(--nw-theme-grid-filter-active) !important;
    color: var(--nw-theme-grid-filter-active) !important;
}

.app-shell.theme-light .grid-column-filter-trigger i {
    background: var(--nw-theme-grid-filter-active) !important;
}

.app-shell.theme-light :is(
    .entity-list-template .column-order-controls button,
    .entity-list-template .sort-indicator,
    .entity-list-template .grid-column-sort b,
    .journal-table .grid-column-sort b
) {
    color: var(--nw-theme-grid-filter-icon) !important;
}

.app-shell.theme-light :is(
    .entity-list-template .sort-indicator.active,
    .entity-list-template .grid-column-sort b,
    .journal-table .grid-column-sort b
) {
    color: var(--nw-theme-grid-filter-active) !important;
}

.app-shell.theme-light .grid-column-filter-popover[popover] {
    background: var(--nw-theme-grid-filter-bg) !important;
    color: var(--nw-theme-grid-cell-text) !important;
    border-color: var(--nw-theme-grid-border) !important;
}

.app-shell.theme-light :is(
    .grid-filter-search,
    .grid-filter-range input
) {
    background: #FFFFFF !important;
    color: var(--nw-theme-grid-cell-text) !important;
    border-color: var(--nw-theme-grid-border) !important;
}

.app-shell.theme-light :is(
    .grid-filter-search input,
    .grid-filter-all,
    .grid-filter-options label,
    .grid-filter-tree-row,
    .grid-filter-range label,
    .grid-filter-year-hint,
    .grid-filter-empty
) {
    color: var(--nw-theme-grid-cell-text) !important;
}

.app-shell.theme-light :is(
    .grid-filter-all:hover,
    .grid-filter-options label:hover,
    .grid-filter-tree-row:hover
) {
    background: var(--nw-theme-grid-filter-hover) !important;
}

.app-shell.theme-light .grid-filter-checkbox.checked {
    background: var(--nw-theme-grid-filter-active) !important;
    border-color: var(--nw-theme-grid-filter-active) !important;
}

.app-shell.theme-light .grid-column-filter-popover[popover] footer {
    background: var(--nw-theme-grid-head-bg) !important;
    border-color: var(--nw-theme-grid-border) !important;
}

.app-shell.theme-light .grid-column-filter-popover[popover] footer button {
    background: #FFFFFF !important;
    color: var(--nw-theme-grid-cell-text) !important;
    border-color: var(--nw-theme-grid-border) !important;
}

.app-shell.theme-light .grid-column-filter-popover[popover] footer .grid-filter-apply {
    background: var(--nw-theme-accent) !important;
    color: #FFFFFF !important;
    border-color: var(--nw-theme-accent) !important;
}

.app-shell.theme-light .grid-column-filter-popover[popover] footer .grid-filter-clear,
.app-shell.theme-light .clear-grid-filters:not(:disabled) {
    color: var(--nw-theme-accent) !important;
    border-color: var(--nw-theme-accent) !important;
}

.app-shell.theme-light .entity-list-template .panel-footer {
    background: #FFFFFF !important;
    color: var(--nw-theme-text-muted) !important;
    border-color: var(--nw-theme-grid-border) !important;
}

.app-shell.theme-light .entity-list-template .page-size select,
.app-shell.theme-light .entity-list-template .pager button {
    background: #FFFFFF !important;
    color: var(--nw-theme-text-primary) !important;
    border-color: var(--nw-theme-grid-border) !important;
}

.app-shell.theme-light .entity-list-template .result-count strong {
    color: var(--nw-theme-text-primary) !important;
}

/* ROLE: candidate-application-modal -------------------------------------- */
.app-shell.theme-light .candidate-modal {
    background: var(--nw-theme-modal-bg) !important;
    color: var(--nw-theme-text-primary) !important;
    border-color: var(--nw-theme-border-strong) !important;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .22) !important;
}

.app-shell.theme-light :is(
    .candidate-modal-head,
    .candidate-modal-footer
) {
    background: var(--nw-theme-modal-head-bg) !important;
    border-color: var(--nw-theme-border) !important;
}

.app-shell.theme-light .candidate-modal-head span {
    color: var(--nw-theme-accent) !important;
}

/* The Καρτέλα πελάτη / Αίτηση switch keeps the same dark text as in the customer view. */
.app-shell.theme-light .candidate-modal-head .record-context-switch span {
    color: inherit !important;
}

.app-shell.theme-light .candidate-modal-head h2,
.app-shell.theme-light .application-card-box-head h3,
.app-shell.theme-light .internal-comment-head strong,
.app-shell.theme-light .change-entry strong {
    color: var(--nw-theme-text-primary) !important;
}

.app-shell.theme-light .candidate-modal-close {
    background: #FFFFFF !important;
    color: var(--nw-theme-text-secondary) !important;
    border-color: var(--nw-theme-border-strong) !important;
}

.app-shell.theme-light .application-overview {
    background: var(--nw-theme-modal-section-bg) !important;
    border-color: var(--nw-theme-border) !important;
}

.app-shell.theme-light .application-overview label > span {
    color: var(--nw-theme-text-muted) !important;
}

.app-shell.theme-light :is(
    .readonly-field,
    .payment-readonly,
    .application-overview input,
    .application-overview select,
    .application-overview textarea,
    .submission-file-control,
    .comment-composer textarea
) {
    background: #FFFFFF !important;
    color: var(--nw-theme-text-primary) !important;
    border-color: var(--nw-theme-border-strong) !important;
}

.app-shell.theme-light .paid-status-field.is-paid .payment-readonly {
    background: #EAF7F0 !important;
    color: #176B45 !important;
    border-color: #A9D7BE !important;
}

.app-shell.theme-light :is(
    .application-card-box,
    .application-auxiliary-panel,
    .candidate-state
) {
    background: #FFFFFF !important;
    color: var(--nw-theme-text-primary) !important;
    border-color: var(--nw-theme-border) !important;
}

.app-shell.theme-light .application-card-box-head,
.app-shell.theme-light .comment-composer,
.app-shell.theme-light .operation-message,
.app-shell.theme-light .internal-comment,
.app-shell.theme-light .change-entry {
    border-color: var(--nw-theme-border) !important;
}

.app-shell.theme-light :is(
    .empty-card-state,
    .operation-message,
    .internal-comment-head span,
    .change-entry span,
    .save-message
) {
    color: var(--nw-theme-text-muted) !important;
}

.app-shell.theme-light .internal-comment p {
    color: var(--nw-theme-text-secondary) !important;
}

.app-shell.theme-light .application-files-list > a {
    color: var(--nw-theme-text-primary) !important;
    border-color: var(--nw-theme-border) !important;
}

.app-shell.theme-light .application-files-list > a:hover {
    background: var(--nw-theme-accent-soft) !important;
    color: var(--nw-theme-accent-strong) !important;
}

.app-shell.theme-light :is(
    .file-upload-button,
    .candidate-modal-footer button:not(.save-action),
    .internal-comment-head button
) {
    background: #FFFFFF !important;
    color: var(--nw-theme-text-secondary) !important;
    border-color: var(--nw-theme-border-strong) !important;
}

.app-shell.theme-light :is(
    .file-upload-button,
    .candidate-modal-footer button:not(.save-action),
    .internal-comment-head button
):hover:not(:disabled) {
    background: var(--nw-theme-accent-soft) !important;
    color: var(--nw-theme-accent-strong) !important;
    border-color: var(--nw-theme-accent) !important;
}

.app-shell.theme-light .candidate-modal-footer .save-action {
    background: var(--nw-theme-accent) !important;
    color: #FFFFFF !important;
    border-color: var(--nw-theme-accent) !important;
}

/* ROLE: document-review -------------------------------------------------- */
.app-shell.theme-light .review-panel {
    color: var(--nw-theme-text-primary) !important;
}

.app-shell.theme-light .review-panel-head h3,
.app-shell.theme-light .review-empty strong,
.app-shell.theme-light .review-card strong,
.app-shell.theme-light .review-history summary,
.app-shell.theme-light .history-row strong {
    color: var(--nw-theme-text-primary) !important;
}

.app-shell.theme-light :is(
    .review-panel-head p,
    .review-card-title span,
    .review-values span,
    .review-source span,
    .review-source small,
    .history-row span,
    .history-row small,
    .review-empty
) {
    color: var(--nw-theme-text-muted) !important;
}

.app-shell.theme-light .review-count {
    background: var(--nw-theme-neutral-chip-bg) !important;
    color: var(--nw-theme-neutral-chip-text) !important;
    border-color: var(--nw-theme-neutral-chip-border) !important;
}

.app-shell.theme-light .review-empty {
    background: var(--nw-theme-surface-soft) !important;
    border-color: var(--nw-theme-border) !important;
}

.app-shell.theme-light .review-card,
.app-shell.theme-light .review-values > div {
    background: #FFFFFF !important;
    color: var(--nw-theme-text-primary) !important;
    border-color: var(--nw-theme-border) !important;
}

.app-shell.theme-light .review-values .proposed {
    background: #EAF7F0 !important;
    border-color: #A9D7BE !important;
}

.app-shell.theme-light .review-history {
    border-color: var(--nw-theme-border) !important;
}

.app-shell.theme-light .history-row {
    border-color: var(--nw-theme-border) !important;
}

.app-shell.theme-light .review-run-button,
.app-shell.theme-light .review-actions .approve {
    background: var(--nw-theme-accent) !important;
    color: #FFFFFF !important;
    border-color: var(--nw-theme-accent) !important;
}

.app-shell.theme-light .review-actions button,
.app-shell.theme-light .history-row button {
    background: #FFFFFF !important;
    color: var(--nw-theme-text-secondary) !important;
    border-color: var(--nw-theme-border-strong) !important;
}

.app-shell.theme-light .review-actions .reject {
    color: #A33B35 !important;
}

/* ROLE: automation-workspace --------------------------------------------- */
.app-shell.theme-light .automation-hub {
    color: var(--nw-theme-text-primary) !important;
}

.app-shell.theme-light :is(
    .automation-hero,
    .automation-panel,
    .source-model-card,
    .queue-intake-panel,
    .queue-panel
) {
    background: #FFFFFF !important;
    color: var(--nw-theme-text-primary) !important;
    border-color: var(--nw-theme-operational-panel-border) !important;
}

.app-shell.theme-light :is(
    .automation-hero h1,
    .panel-heading h2,
    .source-model-card strong,
    .queue-intake-copy h2,
    .queue-header h2
) {
    color: var(--nw-theme-text-primary) !important;
}

.app-shell.theme-light :is(
    .automation-eyebrow,
    .panel-kicker,
    .automation-hero p,
    .panel-copy,
    .source-model-card > span,
    .source-model-card small,
    .queue-intake-copy p,
    .queue-header p,
    .queue-intake-copy span,
    .queue-kicker
) {
    color: var(--nw-theme-text-muted) !important;
}

.app-shell.theme-light .source-model-card.automatic {
    background: #F1FAF5 !important;
    border-color: #B8DDC8 !important;
}

.app-shell.theme-light .source-model-card.automatic strong {
    color: #176B45 !important;
}

.app-shell.theme-light .source-model-card.manual {
    background: var(--nw-theme-accent-soft) !important;
    border-color: #B8D5E6 !important;
}

.app-shell.theme-light .source-model-card.manual strong {
    color: var(--nw-theme-accent-strong) !important;
}

.app-shell.theme-light .source-model-card.pipeline-target {
    background: var(--nw-theme-surface-soft) !important;
    border-color: var(--nw-theme-border) !important;
}

.app-shell.theme-light .automation-stage,
.app-shell.theme-light .connection-state {
    background: var(--nw-theme-neutral-chip-bg) !important;
    color: var(--nw-theme-neutral-chip-text) !important;
    border-color: var(--nw-theme-neutral-chip-border) !important;
}

.app-shell.theme-light .panel-icon {
    background: var(--nw-theme-accent-soft) !important;
    color: var(--nw-theme-accent) !important;
    border-color: #B8D5E6 !important;
}

.app-shell.theme-light .pipeline-step {
    background: var(--nw-theme-operational-panel-bg) !important;
    border-color: var(--nw-theme-operational-panel-border) !important;
}

.app-shell.theme-light .pipeline-step.ai {
    background: var(--nw-theme-accent-soft) !important;
    border-color: #B8D5E6 !important;
}

.app-shell.theme-light .pipeline-step strong,
.app-shell.theme-light .pipeline-step small,
.app-shell.theme-light .panel-footer span {
    color: var(--nw-theme-text-muted) !important;
}

.app-shell.theme-light .pipeline-step span {
    color: var(--nw-theme-text-primary) !important;
}

.app-shell.theme-light .panel-footer {
    background: transparent !important;
    border-color: var(--nw-theme-border) !important;
}

.app-shell.theme-light .panel-footer button {
    background: var(--nw-theme-neutral-chip-bg) !important;
    color: var(--nw-theme-neutral-chip-text) !important;
    border-color: var(--nw-theme-neutral-chip-border) !important;
}

/* Automation source queue and manual intake. */
.app-shell.theme-light .queue-intake-panel {
    border-color: var(--nw-theme-accent) !important;
}

.app-shell.theme-light :is(
    .queue-intake-form input,
    .queue-intake-form select,
    .queue-toolbar input,
    .queue-toolbar select,
    .queue-search,
    .edit-body input
) {
    background: #FFFFFF !important;
    color: var(--nw-theme-text-primary) !important;
    border-color: var(--nw-theme-border-strong) !important;
}

.app-shell.theme-light :is(
    .queue-intake-form label > span,
    .edit-body label > span,
    .queue-intake-state,
    .queue-search span
) {
    color: var(--nw-theme-text-muted) !important;
}

.app-shell.theme-light .queue-intake-form > button,
.app-shell.theme-light .queue-actions > button:not(.pdf-action),
.app-shell.theme-light .activate-button {
    background: var(--nw-theme-accent) !important;
    color: #FFFFFF !important;
    border-color: var(--nw-theme-accent) !important;
}

.app-shell.theme-light .queue-actions .pdf-action {
    background: #EAF7F0 !important;
    color: #176B45 !important;
    border-color: #A9D7BE !important;
}

.app-shell.theme-light .edit-button {
    background: #FFFFFF !important;
    color: var(--nw-theme-text-secondary) !important;
    border-color: var(--nw-theme-border-strong) !important;
}

.app-shell.theme-light .deactivate-button {
    background: #FFF1EF !important;
    color: #9C352E !important;
    border-color: #E7B9B4 !important;
}

.app-shell.theme-light .queue-header {
    background: var(--nw-theme-operational-panel-head-bg) !important;
    border-color: var(--nw-theme-operational-panel-border) !important;
}

.app-shell.theme-light .duth-ai-switch {
    background: #F1FAF5 !important;
    border-color: #B8DDC8 !important;
}

.app-shell.theme-light .duth-ai-switch span,
.app-shell.theme-light .duth-ai-switch small {
    color: #5C7166 !important;
}

.app-shell.theme-light .duth-ai-switch strong {
    color: #176B45 !important;
}

.app-shell.theme-light .duth-ai-switch.paused {
    background: var(--nw-theme-warning-row-bg) !important;
    border-color: var(--nw-theme-warning-row-border) !important;
}

.app-shell.theme-light .duth-ai-switch.paused strong,
.app-shell.theme-light .duth-ai-switch.paused small {
    color: var(--nw-theme-warning-row-text) !important;
}

.app-shell.theme-light .queue-actions .duth-ai-toggle {
    background: #FFFFFF !important;
    color: #176B45 !important;
    border-color: #A9D7BE !important;
}

.app-shell.theme-light .queue-actions .duth-ai-switch.paused .duth-ai-toggle {
    background: #FFFFFF !important;
    color: var(--nw-theme-warning-row-text) !important;
    border-color: var(--nw-theme-warning-row-border) !important;
}

.app-shell.theme-light .persistent-badge {
    background: #F1FAF5 !important;
    color: #176B45 !important;
    border-color: #A9D7BE !important;
}

.app-shell.theme-light .queue-message {
    background: var(--nw-theme-operational-panel-bg) !important;
    color: var(--nw-theme-text-secondary) !important;
    border-color: var(--nw-theme-operational-panel-border) !important;
}

.app-shell.theme-light .queue-message.ok {
    background: #F1FAF5 !important;
    color: #176B45 !important;
    border-color: #A9D7BE !important;
}

.app-shell.theme-light .queue-message.error {
    background: #FFF1EF !important;
    color: #9C352E !important;
    border-color: #E7B9B4 !important;
}

.app-shell.theme-light .queue-toolbar {
    background: var(--nw-theme-toolbar-bg) !important;
    border-color: var(--nw-theme-grid-border) !important;
}

.app-shell.theme-light .queue-title :is(a, strong) {
    color: var(--nw-theme-text-primary) !important;
}

.app-shell.theme-light .queue-title a:hover {
    color: var(--nw-theme-accent) !important;
}

.app-shell.theme-light .queue-title code,
.app-shell.theme-light .queue-pagination,
.app-shell.theme-light .queue-summary,
.app-shell.theme-light .queue-diagnostics {
    color: var(--nw-theme-text-muted) !important;
}

.app-shell.theme-light .queue-link-cell a {
    color: var(--nw-theme-accent) !important;
}

.app-shell.theme-light .document-links a {
    background: var(--nw-theme-accent-soft) !important;
    color: var(--nw-theme-accent-strong) !important;
    border-color: #B8D5E6 !important;
}

.app-shell.theme-light .document-links .manual-doc {
    background: var(--nw-theme-accent-soft) !important;
    color: var(--nw-theme-accent-strong) !important;
    border-color: #B8D5E6 !important;
}

.app-shell.theme-light .queue-pagination {
    background: #FFFFFF !important;
}

.app-shell.theme-light .queue-pagination select,
.app-shell.theme-light .queue-pagination button {
    background: #FFFFFF !important;
    color: var(--nw-theme-text-primary) !important;
    border-color: var(--nw-theme-grid-border) !important;
}

.app-shell.theme-light .queue-summary,
.app-shell.theme-light .queue-diagnostics {
    background: #FFFFFF !important;
    border-color: var(--nw-theme-grid-border) !important;
}

.app-shell.theme-light .queue-summary strong,
.app-shell.theme-light .queue-diagnostics strong,
.app-shell.theme-light .queue-diagnostics summary {
    color: var(--nw-theme-text-primary) !important;
}

.app-shell.theme-light .edit-modal {
    background: var(--nw-theme-modal-bg) !important;
    color: var(--nw-theme-text-primary) !important;
    border-color: var(--nw-theme-border-strong) !important;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .22) !important;
}

.app-shell.theme-light .edit-modal :is(header, footer) {
    background: var(--nw-theme-modal-head-bg) !important;
    border-color: var(--nw-theme-border) !important;
}

.app-shell.theme-light .edit-title {
    color: var(--nw-theme-text-primary) !important;
}

.app-shell.theme-light .edit-body :is(small, .edit-note) {
    color: var(--nw-theme-text-muted) !important;
}

.app-shell.theme-light .edit-modal .save {
    background: var(--nw-theme-accent) !important;
    color: #FFFFFF !important;
    border-color: var(--nw-theme-accent) !important;
}

.app-shell.theme-light .edit-modal .cancel {
    background: #FFFFFF !important;
    color: var(--nw-theme-text-secondary) !important;
    border-color: var(--nw-theme-border-strong) !important;
}

/* ROLE: ai-diagnostic ----------------------------------------------------- */
.app-shell.theme-light .source-ai-diagnostic-row > td {
    background: #FFFFFF !important;
    border-color: var(--nw-theme-grid-border) !important;
}

.app-shell.theme-light .source-ai-diagnostic-row:hover {
    background: #FFFFFF !important;
}

.app-shell.theme-light .diagnostic-toggle {
    background: var(--nw-theme-operational-panel-head-bg) !important;
    color: var(--nw-theme-text-secondary) !important;
    border-color: var(--nw-theme-operational-panel-border) !important;
}

.app-shell.theme-light .diagnostic-toggle:hover {
    background: var(--nw-theme-accent-soft) !important;
    color: var(--nw-theme-accent-strong) !important;
}

.app-shell.theme-light .diagnostic-toggle > span {
    color: var(--nw-theme-accent) !important;
}

.app-shell.theme-light .diagnostic-panel {
    background: #FFFFFF !important;
    color: var(--nw-theme-text-primary) !important;
    border-color: var(--nw-theme-operational-panel-border) !important;
}

.app-shell.theme-light .diagnostic-head span,
.app-shell.theme-light .diagnostic-head small,
.app-shell.theme-light .run-history > span,
.app-shell.theme-light .stage-event time {
    color: var(--nw-theme-text-muted) !important;
}

.app-shell.theme-light .diagnostic-head strong,
.app-shell.theme-light .stage-log h4,
.app-shell.theme-light .stage-event strong {
    color: var(--nw-theme-text-primary) !important;
}

.app-shell.theme-light .run-ai-button {
    background: var(--nw-theme-accent) !important;
    color: #FFFFFF !important;
    border-color: var(--nw-theme-accent) !important;
}

.app-shell.theme-light .diagnostic-state {
    background: var(--nw-theme-operational-panel-bg) !important;
    color: var(--nw-theme-text-secondary) !important;
    border-color: var(--nw-theme-operational-panel-border) !important;
}

.app-shell.theme-light .diagnostic-state.error,
.app-shell.theme-light .diagnostic-error {
    background: #FFF1EF !important;
    color: #9C352E !important;
    border-color: #E7B9B4 !important;
}

.app-shell.theme-light .diagnostic-error strong,
.app-shell.theme-light .diagnostic-error p {
    color: #9C352E !important;
}

.app-shell.theme-light .run-history {
    border-color: var(--nw-theme-operational-panel-border) !important;
}

.app-shell.theme-light .run-history button {
    background: #FFFFFF !important;
    color: var(--nw-theme-text-secondary) !important;
    border-color: var(--nw-theme-border-strong) !important;
}

.app-shell.theme-light .run-history button.selected {
    background: var(--nw-theme-accent-soft) !important;
    color: var(--nw-theme-accent-strong) !important;
    border-color: var(--nw-theme-accent) !important;
}

.app-shell.theme-light :is(
    .diagnostic-overview > div,
    .document-diagnostic > div,
    .result-columns details
) {
    background: var(--nw-theme-operational-panel-bg) !important;
    color: var(--nw-theme-text-primary) !important;
    border-color: var(--nw-theme-operational-panel-border) !important;
}

.app-shell.theme-light .diagnostic-overview span,
.app-shell.theme-light .document-diagnostic span {
    color: var(--nw-theme-text-muted) !important;
}

.app-shell.theme-light .diagnostic-overview strong,
.app-shell.theme-light .document-diagnostic strong,
.app-shell.theme-light .document-diagnostic code,
.app-shell.theme-light .result-columns summary {
    color: var(--nw-theme-text-primary) !important;
}

.app-shell.theme-light .document-diagnostic a {
    color: var(--nw-theme-accent) !important;
}

.app-shell.theme-light .stage-event {
    color: var(--nw-theme-text-secondary) !important;
    border-color: var(--nw-theme-operational-panel-border) !important;
}

.app-shell.theme-light .stage-event p {
    color: var(--nw-theme-text-secondary) !important;
}

.app-shell.theme-light .result-columns pre {
    background: #FFFFFF !important;
    color: #244735 !important;
    border-color: var(--nw-theme-operational-panel-border) !important;
}

/* Keep explicit semantic diagnostic states strong and readable. */
.app-shell.theme-light :is(
    .diagnostic-toggle em.success,
    .diagnostic-panel .stage-event.success span,
    .diagnostic-panel strong.success,
    .diagnostic-panel em.success
) {
    color: #176B45 !important;
}

.app-shell.theme-light :is(
    .diagnostic-toggle em.failed,
    .diagnostic-panel .stage-event.failed span,
    .diagnostic-panel strong.failed,
    .diagnostic-panel em.failed
) {
    color: #A33B35 !important;
}

.app-shell.theme-light :is(
    .diagnostic-toggle em.running,
    .diagnostic-panel .stage-event.running span,
    .diagnostic-panel strong.running,
    .diagnostic-panel em.running
) {
    color: #8A5A14 !important;
}


/* ==========================================================================
   White mode global controls — batch 4
   Baseline: every ordinary control inherits the same neutral / primary /
   danger / success language. Component-specific rules only override semantic
   meaning, not basic contrast.
   ========================================================================== */

/* ROLE: global-form-control ---------------------------------------------- */
.app-shell.theme-light :where(
    input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
    select,
    textarea
) {
    background: var(--nw-control-bg) !important;
    color: var(--nw-control-text) !important;
    border-color: var(--nw-control-border) !important;
    opacity: 1 !important;
}

.app-shell.theme-light :where(
    input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
    select,
    textarea
)::placeholder {
    color: var(--nw-control-muted) !important;
    opacity: 1 !important;
}

.app-shell.theme-light :where(
    input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
    select,
    textarea
):disabled,
.app-shell.theme-light :where(
    input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
    select,
    textarea
)[readonly] {
    background: var(--nw-control-disabled-bg) !important;
    color: var(--nw-control-disabled-text) !important;
    border-color: var(--nw-control-border) !important;
}

/* ROLE: global-neutral-button -------------------------------------------- */
.app-shell.theme-light :where(
    button:not(.customer-link):not(.grid-column-sort):not(.grid-column-filter-trigger):not(.degree-result):not(.diagnostic-toggle):not(.summary-card)
) {
    background: var(--nw-control-bg) !important;
    color: var(--nw-control-text) !important;
    border-color: var(--nw-control-border) !important;
    opacity: 1;
}

.app-shell.theme-light :where(
    button:not(.customer-link):not(.grid-column-sort):not(.grid-column-filter-trigger):not(.degree-result):not(.diagnostic-toggle):not(.summary-card)
):hover:not(:disabled) {
    background: var(--nw-control-bg-hover) !important;
    color: var(--nw-control-text) !important;
    border-color: var(--nw-control-border-hover) !important;
}

.app-shell.theme-light :where(button):disabled {
    color: var(--nw-control-disabled-text) !important;
    cursor: not-allowed;
}

/* Re-assert semantic primary controls over the neutral baseline. */
.app-shell.theme-light :is(
    .global-transaction-button,
    .shell-back-button,
    .primary-action,
    .primary-button,
    .save-button,
    .global-customer-proclamation-button,
    .add-to-proclamation-button,
    .new-transaction-action,
    .identity-upload-button,
    .identity-document-button,
    .download-all,
    .download-button,
    .live-create-call,
    .save-settings,
    .settings-save-bar button,
    .transfer-button,
    .apply-period,
    .review-run-button,
    .review-actions .approve,
    .candidate-modal-footer .save-action,
    .queue-intake-form > button,
    .activate-button,
    .edit-modal .save,
    .run-ai-button,
    .export-report-button
) {
    background: var(--nw-control-primary-bg) !important;
    color: var(--nw-control-primary-text) !important;
    border-color: var(--nw-control-primary-bg) !important;
}

.app-shell.theme-light :is(
    .global-transaction-button,
    .shell-back-button,
    .primary-action,
    .primary-button,
    .save-button,
    .global-customer-proclamation-button,
    .add-to-proclamation-button,
    .new-transaction-action,
    .identity-upload-button,
    .identity-document-button,
    .download-all,
    .download-button,
    .live-create-call,
    .save-settings,
    .settings-save-bar button,
    .transfer-button,
    .apply-period,
    .review-run-button,
    .review-actions .approve,
    .candidate-modal-footer .save-action,
    .queue-intake-form > button,
    .activate-button,
    .edit-modal .save,
    .run-ai-button,
    .export-report-button
):hover:not(:disabled) {
    background: var(--nw-control-primary-hover) !important;
    color: #FFFFFF !important;
    border-color: var(--nw-control-primary-hover) !important;
}

/* ROLE: semantic-danger / success buttons -------------------------------- */
.app-shell.theme-light :is(
    .danger-action,
    .deactivate-button,
    .field-actions .deactivate,
    .delete-note
) {
    background: var(--nw-control-danger-bg) !important;
    color: var(--nw-control-danger-text) !important;
    border-color: var(--nw-control-danger-border) !important;
}

.app-shell.theme-light :is(
    .field-actions .activate
) {
    background: var(--nw-control-success-bg) !important;
    color: var(--nw-control-success-text) !important;
    border-color: var(--nw-control-success-border) !important;
}

/* ROLE: application/payment-status --------------------------------------- */
.app-shell.theme-light .application-status,
.app-shell.theme-light .payment-status {
    display: inline-flex !important;
    align-items: center;
    min-height: 24px;
    padding: 0 var(--nw-space-2);
    border: 1px solid var(--nw-status-neutral-border) !important;
    border-radius: var(--nw-radius-md);
    background: var(--nw-status-neutral-bg) !important;
    color: var(--nw-status-neutral-text) !important;
    font-weight: 800;
    line-height: 1;
    opacity: 1 !important;
    white-space: nowrap;
}

.app-shell.theme-light .application-status.new {
    background: var(--nw-status-new-bg) !important;
    color: var(--nw-status-new-text) !important;
    border-color: #B9D5E5 !important;
}

.app-shell.theme-light .application-status.processing {
    background: var(--nw-status-processing-bg) !important;
    color: var(--nw-status-processing-text) !important;
    border-color: #E5C88E !important;
}

.app-shell.theme-light .application-status.finalized {
    background: var(--nw-status-finalized-bg) !important;
    color: var(--nw-status-finalized-text) !important;
    border-color: var(--nw-control-success-border) !important;
}

.app-shell.theme-light .application-status.cancelled {
    background: var(--nw-status-cancelled-bg) !important;
    color: var(--nw-status-cancelled-text) !important;
    border-color: var(--nw-control-danger-border) !important;
}

.app-shell.theme-light .application-status.pending {
    background: var(--nw-status-pending-bg) !important;
    color: var(--nw-status-pending-text) !important;
    border-color: #E5C88E !important;
}

.app-shell.theme-light .payment-status.paid {
    background: var(--nw-status-finalized-bg) !important;
    color: var(--nw-status-finalized-text) !important;
    border-color: var(--nw-control-success-border) !important;
}

.app-shell.theme-light .payment-status.unpaid {
    background: var(--nw-status-pending-bg) !important;
    color: var(--nw-status-pending-text) !important;
    border-color: #E5C88E !important;
}

/* ROLE: eligibility-position-code ---------------------------------------- */
.app-shell.theme-light .eligibility-position-code {
    background: var(--nw-theme-accent-soft) !important;
    color: var(--nw-theme-accent-strong) !important;
    border-color: #B8D5E6 !important;
}

.app-shell.theme-light .eligibility-position-code small {
    color: #607A8E !important;
}

.app-shell.theme-light .eligibility-status-badge {
    background: var(--nw-status-neutral-bg) !important;
    color: var(--nw-status-neutral-text) !important;
    border: 1px solid var(--nw-status-neutral-border) !important;
}

.app-shell.theme-light .is-eligible .eligibility-status-badge {
    background: var(--nw-control-success-bg) !important;
    color: var(--nw-control-success-text) !important;
    border-color: var(--nw-control-success-border) !important;
}

.app-shell.theme-light :is(
    .needs-license .eligibility-status-badge,
    .needs-experience .eligibility-status-badge,
    .needs-review .eligibility-status-badge
) {
    background: var(--nw-status-pending-bg) !important;
    color: var(--nw-status-pending-text) !important;
    border-color: #E5C88E !important;
}

/* ROLE: accounting-light ------------------------------------------------- */
.app-shell.theme-light :is(
    .cash-panel,
    .cash-kpi
) {
    background: #FFFFFF !important;
    border-color: var(--nw-theme-border) !important;
}

.app-shell.theme-light .cash-panel-head {
    border-color: var(--nw-theme-border) !important;
}

.app-shell.theme-light .cash-panel-head h2,
.app-shell.theme-light .cash-account-name strong,
.app-shell.theme-light .cash-kpi strong,
.app-shell.theme-light .account-day-row > strong,
.app-shell.theme-light .movement-type {
    color: var(--nw-theme-text-primary) !important;
}

.app-shell.theme-light :is(
    .cash-panel-head p,
    .cash-account-name small,
    .cash-account-balance small,
    .transfer-field > span,
    .transfer-select-copy small,
    .cash-kpi small,
    .cash-kpi > div > span,
    .movement-row > span,
    .movement-accounts
) {
    color: var(--nw-theme-text-muted) !important;
}

.app-shell.theme-light :is(
    .transfer-account-select,
    .transfer-amount > div
) {
    background: #FFFFFF !important;
    border-color: var(--nw-control-border) !important;
}

.app-shell.theme-light .transfer-select-copy select {
    background: transparent !important;
    color: var(--nw-theme-text-primary) !important;
}

.app-shell.theme-light .transfer-select-copy select option {
    background: #FFFFFF !important;
    color: var(--nw-theme-text-primary) !important;
}

.app-shell.theme-light :is(
    .cash-account-icon,
    .mini-account-icon,
    .cash-kpi-icon
) {
    background: var(--nw-theme-neutral-chip-bg) !important;
    color: var(--nw-theme-neutral-chip-text) !important;
}

.app-shell.theme-light :is(
    .cash-account-row.cash .cash-account-icon,
    .mini-account-icon.cash,
    .cash-kpi.available .cash-kpi-icon,
    .cash-kpi.income .cash-kpi-icon
) {
    background: var(--nw-control-success-bg) !important;
    color: var(--nw-control-success-text) !important;
}

.app-shell.theme-light :is(
    .cash-account-row.bank .cash-account-icon,
    .mini-account-icon.bank,
    .cash-kpi.net .cash-kpi-icon
) {
    background: var(--nw-theme-accent-soft) !important;
    color: var(--nw-theme-accent-strong) !important;
}

.app-shell.theme-light :is(
    .cash-account-row.pos .cash-account-icon,
    .mini-account-icon.pos
) {
    background: #F3ECFA !important;
    color: #725092 !important;
}

.app-shell.theme-light :is(
    .cash-account-row.reserve .cash-account-icon,
    .mini-account-icon.reserve
) {
    background: var(--nw-status-neutral-bg) !important;
    color: var(--nw-status-neutral-text) !important;
}

.app-shell.theme-light .cash-kpi.expense .cash-kpi-icon {
    background: var(--nw-control-danger-bg) !important;
    color: var(--nw-control-danger-text) !important;
}

.app-shell.theme-light :is(
    .account-day-header,
    .movement-header,
    .account-day-total
) {
    background: var(--nw-theme-grid-head-bg) !important;
    color: var(--nw-theme-grid-head-text) !important;
}

.app-shell.theme-light :is(
    .cash-account-row,
    .account-day-row,
    .movement-row
) {
    border-color: var(--nw-theme-grid-border) !important;
}

/* ROLE: accounting-journal-light ----------------------------------------- */
.app-shell.theme-light .journal-view-switch {
    background: #FFFFFF !important;
    border-color: var(--nw-control-border) !important;
}

.app-shell.theme-light .journal-view-switch button {
    background: #FFFFFF !important;
    color: var(--nw-control-text) !important;
    border-color: var(--nw-control-border) !important;
}

.app-shell.theme-light .journal-view-switch button.active {
    background: var(--nw-theme-accent) !important;
    color: #FFFFFF !important;
    border-color: var(--nw-theme-accent) !important;
    box-shadow: none !important;
}

.app-shell.theme-light .read-only-badge {
    background: var(--nw-status-neutral-bg) !important;
    color: var(--nw-status-neutral-text) !important;
    border-color: var(--nw-status-neutral-border) !important;
}

.app-shell.theme-light .audit-note {
    background: var(--nw-theme-accent-soft) !important;
    color: var(--nw-theme-accent-strong) !important;
    border-left-color: var(--nw-theme-accent) !important;
}

/* ROLE: reports-light ---------------------------------------------------- */
.app-shell.theme-light :is(
    .comparison-head > span,
    .change.neutral,
    .estimate-badge
) {
    background: var(--nw-status-neutral-bg) !important;
    color: var(--nw-status-neutral-text) !important;
    border-color: var(--nw-status-neutral-border) !important;
}

.app-shell.theme-light .comparison-row.head,
.app-shell.theme-light .analysis-row.head {
    background: var(--nw-theme-grid-head-bg) !important;
    color: var(--nw-theme-grid-head-text) !important;
}

.app-shell.theme-light :is(
    .comparison-row,
    .analysis-row,
    .trend-row,
    .customer-ranking > div
) {
    border-color: var(--nw-theme-grid-border) !important;
}

.app-shell.theme-light .forecast-note {
    background: var(--nw-status-pending-bg) !important;
    color: var(--nw-status-pending-text) !important;
    border-left-color: #D7A34B !important;
}

/* ROLE: configuration-light --------------------------------------------- */
.app-shell.theme-light .configuration-tabs button {
    background: #FFFFFF !important;
    color: var(--nw-control-text) !important;
    border-color: var(--nw-control-border) !important;
}

.app-shell.theme-light .configuration-tabs button.active {
    background: var(--nw-theme-accent) !important;
    color: #FFFFFF !important;
    border-color: var(--nw-theme-accent) !important;
}

.app-shell.theme-light .order-controls button,
.app-shell.theme-light .field-actions button,
.app-shell.theme-light .field-editor footer button {
    background: #FFFFFF !important;
    color: var(--nw-control-text) !important;
    border-color: var(--nw-control-border) !important;
}

.app-shell.theme-light .usage-meta span {
    background: var(--nw-status-neutral-bg) !important;
    color: var(--nw-status-neutral-text) !important;
}

.app-shell.theme-light .field-meta code,
.app-shell.theme-light .required-tag {
    color: var(--nw-theme-accent) !important;
}

.app-shell.theme-light .check-settings {
    background: var(--nw-theme-surface-soft) !important;
}

.app-shell.theme-light .check-settings label {
    color: var(--nw-theme-text-secondary) !important;
}

/* ROLE: qualification-catalog-light ------------------------------------- */
.app-shell.theme-light .pilot-badge {
    background: var(--nw-theme-accent-soft) !important;
    color: var(--nw-theme-accent-strong) !important;
    border-color: var(--nw-theme-accent) !important;
}

.app-shell.theme-light .catalog-mode-tabs button {
    background: #FFFFFF !important;
    color: var(--nw-control-text) !important;
    border-color: var(--nw-control-border) !important;
}

.app-shell.theme-light .catalog-mode-tabs button.active {
    background: var(--nw-status-neutral-bg) !important;
    color: var(--nw-control-text) !important;
    border-color: var(--nw-theme-accent) !important;
    box-shadow: inset 0 2px 0 var(--nw-theme-accent) !important;
}

.app-shell.theme-light .catalog-mode-tabs button span {
    background: var(--nw-status-neutral-bg) !important;
    color: var(--nw-status-neutral-text) !important;
}

.app-shell.theme-light .catalog-mode-tabs button.active span {
    background: var(--nw-status-neutral-bg) !important;
    color: var(--nw-status-neutral-text) !important;
}

.app-shell.theme-light .catalog-flow div strong {
    background: var(--nw-status-neutral-bg) !important;
    color: var(--nw-status-neutral-text) !important;
    border-color: var(--nw-control-border) !important;
}

.app-shell.theme-light .degree-result.active {
    background: var(--nw-theme-accent-soft) !important;
    box-shadow: inset 3px 0 var(--nw-theme-accent) !important;
}

.app-shell.theme-light .level-chip {
    background: var(--nw-theme-accent-soft) !important;
    color: var(--nw-theme-accent-strong) !important;
    border-color: #B8D5E6 !important;
}

.app-shell.theme-light .selected-kicker,
.app-shell.theme-light .mapping-total strong,
.app-shell.theme-light .panel-title > span,
.app-shell.theme-light .license-table code,
.app-shell.theme-light .license-table details summary {
    color: var(--nw-theme-accent) !important;
}

.app-shell.theme-light .tier-badge {
    background: var(--nw-status-neutral-bg) !important;
    color: var(--nw-status-neutral-text) !important;
    border-color: var(--nw-status-neutral-border) !important;
}

.app-shell.theme-light .tier-badge.primary,
.app-shell.theme-light .license-mode.automatic {
    background: var(--nw-control-success-bg) !important;
    color: var(--nw-control-success-text) !important;
    border-color: var(--nw-control-success-border) !important;
}

.app-shell.theme-light :is(
    .tier-badge.auxiliary,
    .tier-badge.conditional,
    .license-mode.presence
) {
    background: var(--nw-status-pending-bg) !important;
    color: var(--nw-status-pending-text) !important;
    border-color: #E5C88E !important;
}

.app-shell.theme-light .license-mode.manual {
    background: var(--nw-status-neutral-bg) !important;
    color: var(--nw-status-neutral-text) !important;
    border-color: var(--nw-status-neutral-border) !important;
}

/* ROLE: qualification-catalog review/licence/machine panels (stabilization 2026-10-02)
   ΠΡΟΣ ΕΛΕΓΧΟ, ΑΔΕΙΕΣ and ΜΗΧΑΝΗΜΑΤΑ ΕΡΓΟΥ reuse the dark .pending-* inline styles; without this
   block they stayed dark and MainLayout's forced dark headings became invisible on them. */
.app-shell.theme-light :is(.pending-panel, .pending-group, .pending-summary > div, .machine-specialty) {
    background: var(--nw-theme-surface) !important;
    border-color: var(--nw-theme-border) !important;
    color: var(--nw-theme-text-primary) !important;
}

.app-shell.theme-light :is(.pending-summary, .pending-filters, .license-pager) {
    background: var(--nw-theme-surface-soft) !important;
    border-color: var(--nw-theme-border) !important;
}

.app-shell.theme-light :is(.pending-head, .machine-specialty h3, .license-table-wrap, .machine-rules) {
    border-color: var(--nw-theme-border) !important;
}

.app-shell.theme-light :is(.pending-head h2, .pending-title strong, .machine-specialty h3, .machine-rules strong) {
    color: var(--nw-theme-text-primary) !important;
}

.app-shell.theme-light :is(.pending-summary strong, .pending-arrow, .machine-whole code) {
    color: var(--nw-theme-accent) !important;
}

.app-shell.theme-light :is(.pending-head p, .pending-summary span, .machine-rules, .machine-rules li,
    .machine-specialty h3 span, .machine-whole, .license-table td small) {
    color: var(--nw-theme-text-secondary) !important;
}

.app-shell.theme-light .pending-count {
    background: var(--nw-status-neutral-bg) !important;
    color: var(--nw-status-neutral-text) !important;
    border-color: var(--nw-status-neutral-border) !important;
}

.app-shell.theme-light .pending-head button:not(.secondary):not(:disabled) {
    background: var(--nw-theme-accent) !important;
    color: #FFFFFF !important;
    border-color: var(--nw-theme-accent) !important;
}

/* ROLE: customer-card operator licence (Μ.Ε. + ομάδα) */
.app-shell.theme-light .operator-specialty {
    background: var(--nw-theme-surface-soft) !important;
    border-color: var(--nw-theme-border) !important;
}

.app-shell.theme-light .operator-specialty h5 {
    color: var(--nw-theme-text-primary) !important;
}

.app-shell.theme-light :is(.operator-machine span, .operator-help) {
    color: var(--nw-theme-text-secondary) !important;
}

/* ROLE: eligibility «ΚΑΛΥΠΤΕΤΑΙ» label (light green on white was ~1.9:1) */
.app-shell.theme-light .eligibility-auto-check-row em {
    color: var(--nw-control-success-text) !important;
}

/* Sand: customer Summary qualification details have their own warm, high-contrast
   colors. The light-theme table/button overrides otherwise leave blue-gray labels
   and near-white strips that clash with the Sand palette. Scope to this view only. */
.app-shell.theme-sand.theme-light .qualification-summary-panel,
.app-shell.theme-sand.theme-light .qualification-summary-section,
.app-shell.theme-sand.theme-light .qualification-summary-subsection {
    background: #FFF9EF !important;
    border-color: #D3C6B2 !important;
}
.app-shell.theme-sand.theme-light .qualification-summary-section-head {
    background: #F8EBD6 !important;
    border-color: #D3C6B2 !important;
}
.app-shell.theme-sand.theme-light .qualification-summary-panel .nw-summary-list-table {
    background: #FFF9EF !important;
    border-color: #D3C6B2 !important;
}
.app-shell.theme-sand.theme-light .qualification-summary-panel .nw-summary-list-table th {
    background: #F8EBD6 !important;
    color: #5A4A3B !important;
    border-color: #D3C6B2 !important;
}
.app-shell.theme-sand.theme-light .qualification-summary-panel .nw-summary-list-table td {
    background: #FFF9EF !important;
    color: #33291F !important;
    border-color: #E6D7BE !important;
}
.app-shell.theme-sand.theme-light .qualification-summary-panel .nw-summary-list-details button {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #33291F !important;
}
.app-shell.theme-sand.theme-light .qualification-summary-panel .nw-summary-list-details span {
    color: #5A4A3B !important;
}
.app-shell.theme-sand.theme-light .qualification-summary-panel :is(
    .nw-summary-list-details strong,
    .nw-summary-list-table td > strong,
    .nw-summary-list-file
) {
    color: #33291F !important;
}
.app-shell.theme-sand.theme-light .qualification-summary-panel .nw-summary-list-row.missing td {
    background: #FFF0D7 !important;
}
.app-shell.theme-sand.theme-light .qualification-summary-panel .nw-summary-list-missing {
    color: #815416 !important;
}
.app-shell.theme-sand.theme-light .qualification-summary-panel .nw-summary-list-row:hover td {
    background: #FCE9D2 !important;
}
