:root {
    --theme-bg: #f3f6fb;
    --theme-bg-alt: #eef2f8;
    --theme-surface: rgba(255, 255, 255, 0.9);
    --theme-surface-strong: #ffffff;
    --theme-surface-muted: rgba(248, 250, 252, 0.94);
    --theme-surface-soft: rgba(255, 255, 255, 0.7);
    --theme-border: rgba(21, 32, 51, 0.12);
    --theme-border-strong: rgba(21, 32, 51, 0.18);
    --theme-text: #152033;
    --theme-text-soft: #2f3d52;
    --theme-text-muted: #64748b;
    --theme-shadow: 0 20px 60px rgba(26, 35, 52, 0.1);
    --theme-shadow-soft: 0 12px 28px rgba(26, 35, 52, 0.08);
    --theme-accent: #0f6c7b;
    --theme-accent-strong: #124d55;
    --theme-accent-soft: rgba(15, 108, 123, 0.12);
    --theme-danger: #b42318;
    --theme-danger-soft: rgba(180, 35, 24, 0.12);
    --theme-success: #166534;
    --theme-success-soft: rgba(22, 101, 52, 0.12);
    --theme-warning: #a16207;
    --theme-warning-soft: rgba(161, 98, 7, 0.12);
}

.app-staging-warning {
    position: sticky;
    top: 0;
    z-index: 1040;
    box-sizing: border-box;
    min-height: 40px;
    padding: 9px 16px;
    border-top: 3px solid #dc2626;
    border-bottom: 1px solid #ca8a04;
    background: #facc15;
    color: #422006;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
}

.app-staging-warning + .app-navbar {
    top: 40px;
}

.app-staging-warning span {
    margin-left: 8px;
    font-weight: 600;
}

.app-theme-switcher {
    position: relative;
}

.app-theme-section {
    display: grid;
    gap: 4px;
    padding: 0 4px 6px;
}

.app-theme-disclosure {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: var(--erp-control-radius);
}

.app-theme-disclosure:hover,
.app-theme-disclosure:focus-visible {
    background: var(--theme-surface-soft);
    outline: none;
}

.app-theme-disclosure-copy {
    display: grid;
    gap: 2px;
    text-align: left;
}

.app-theme-disclosure-copy .app-dropdown-heading {
    padding: 0;
}

.app-theme-disclosure-copy strong {
    color: var(--theme-text);
    font-size: var(--app-font-size-14);
    line-height: 1.15;
}

.app-theme-disclosure-chevron {
    width: 9px;
    height: 9px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    opacity: 0.62;
    transform: rotate(45deg);
    transition: transform 180ms ease, opacity 180ms ease;
}

.app-theme-section.is-open .app-theme-disclosure {
    background: var(--theme-surface-soft);
    border-color: var(--theme-border);
}

.app-theme-section.is-open .app-theme-disclosure-chevron {
    transform: rotate(225deg);
    opacity: 0.9;
}

.app-theme-disclosure-panel {
    display: grid;
    gap: 4px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding-top: 0;
    transform: translateY(-4px);
    transition:
        max-height 220ms ease,
        opacity 180ms ease,
        transform 180ms ease,
        padding-top 180ms ease;
}

.app-theme-section.is-open .app-theme-disclosure-panel {
    max-height: 240px;
    opacity: 1;
    padding-top: 2px;
    transform: translateY(0);
}

.app-theme-toggle {
    min-height: 40px;
    padding: 8px 12px;
    border-radius: var(--erp-control-radius);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--theme-border);
    background: var(--theme-surface);
    color: var(--theme-text);
    box-shadow: none;
}

.app-theme-toggle:hover,
.app-theme-toggle:focus {
    background: var(--theme-surface-strong);
    color: var(--theme-text);
}

.app-theme-toggle-icon {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--theme-accent-soft);
    color: var(--theme-accent-strong);
    font-family: var(--app-font-display);
    font-size: var(--app-font-size-13);
    font-weight: var(--app-font-weight-bold);
}

.app-theme-toggle-copy {
    display: grid;
    align-items: center;
    gap: 1px;
    text-align: left;
}

.app-theme-toggle-label {
    color: var(--theme-text-muted);
    font-size: var(--app-font-size-10);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-theme-toggle-copy strong {
    color: var(--theme-text);
    font-size: var(--app-font-size-12);
    font-weight: var(--app-font-weight-extrabold);
}

.app-theme-menu {
    min-width: 220px;
}

.app-theme-choice {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--erp-control-radius);
    border: 1px solid transparent;
    transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.app-theme-choice-preview {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    gap: 4px;
    padding: 5px;
    border-radius: 10px;
    border: 1px solid var(--theme-border);
    background: var(--theme-surface-soft);
}

.app-theme-choice-preview span {
    display: block;
    border-radius: 999px;
}

.app-theme-choice-preview span:first-child {
    height: 8px;
}

.app-theme-choice-preview span:last-child {
    flex: 1 1 auto;
}

.app-theme-choice-preview-light {
    background: linear-gradient(180deg, #ffffff 0%, #eef4fb 100%);
}

.app-theme-choice-preview-light span:first-child {
    background: rgba(18, 77, 85, 0.16);
}

.app-theme-choice-preview-light span:last-child {
    background: rgba(21, 32, 51, 0.08);
}

.app-theme-choice-preview-dark {
    background: linear-gradient(180deg, #152033 0%, #0f172a 100%);
}

.app-theme-choice-preview-dark span:first-child {
    background: rgba(94, 234, 212, 0.6);
}

.app-theme-choice-preview-dark span:last-child {
    background: rgba(255, 255, 255, 0.12);
}

.app-theme-choice-preview-system {
    background:
        linear-gradient(135deg, #ffffff 0%, #ffffff 49%, #152033 51%, #0f172a 100%);
}

.app-theme-choice-preview-system span:first-child {
    background: rgba(15, 108, 123, 0.4);
}

.app-theme-choice-preview-system span:last-child {
    background: rgba(255, 255, 255, 0.42);
}

.app-theme-choice-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
}

.app-theme-choice-copy small {
    color: var(--theme-text-muted);
    font-size: var(--app-font-size-11);
}

.app-theme-choice-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(15, 108, 123, 0.1);
    color: var(--theme-accent-strong);
    font-size: var(--app-font-size-10);
    font-weight: var(--app-font-weight-extrabold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    flex: 0 0 auto;
}

.app-theme-choice-status.is-hidden {
    display: none;
}

.app-theme-choice.is-current {
    background: var(--theme-accent-soft);
    border-color: rgba(15, 108, 123, 0.18);
    box-shadow: none;
}

.app-theme-choice.is-current::after {
    content: "";
}

html[data-theme="dark"] {
    color-scheme: dark;
    --ink-strong: var(--theme-text);
    --ink: var(--theme-text);
    --muted: var(--theme-text-muted);
    --line: var(--theme-border);
    --surface: var(--theme-surface-strong);
    --shadow-soft: none;
    --shadow-card: none;
    --bs-body-bg: #0e141b;
    --bs-body-color: #e2e8f0;
    --bs-tertiary-bg: #16202b;
    --bs-secondary-bg: #18212d;
    --bs-border-color: rgba(148, 163, 184, 0.22);
    --bs-emphasis-color: #f8fafc;
    --bs-secondary-color: #94a3b8;
    --bs-tertiary-color: #cbd5e1;
    --bs-link-color: #5eead4;
    --bs-link-hover-color: #99f6e4;
    --bs-primary: #14b8a6;
    --bs-primary-rgb: 20, 184, 166;
    --bs-success: #4ade80;
    --bs-success-rgb: 74, 222, 128;
    --bs-danger: #f87171;
    --bs-danger-rgb: 248, 113, 113;
    --bs-warning: #fbbf24;
    --bs-warning-rgb: 251, 191, 36;
    --theme-bg: #0e141b;
    --theme-bg-alt: #111927;
    --theme-surface: rgba(15, 23, 42, 0.92);
    --theme-surface-strong: #111827;
    --theme-surface-muted: rgba(17, 24, 39, 0.96);
    --theme-surface-soft: rgba(255, 255, 255, 0.04);
    --theme-border: rgba(148, 163, 184, 0.18);
    --theme-border-strong: rgba(148, 163, 184, 0.3);
    --theme-text: #e2e8f0;
    --theme-text-soft: #cbd5e1;
    --theme-text-muted: #94a3b8;
    --theme-shadow: 0 28px 80px rgba(2, 6, 23, 0.44);
    --theme-shadow-soft: 0 16px 34px rgba(2, 6, 23, 0.28);
    --theme-accent: #14b8a6;
    --theme-accent-strong: #0f766e;
    --theme-accent-soft: rgba(20, 184, 166, 0.12);
    --theme-danger: #f87171;
    --theme-danger-soft: rgba(248, 113, 113, 0.12);
    --theme-success: #4ade80;
    --theme-success-soft: rgba(74, 222, 128, 0.12);
    --theme-warning: #fbbf24;
    --theme-warning-soft: rgba(251, 191, 36, 0.12);
}

html[data-theme="dark"] .list-shell {
    --accent: var(--theme-accent);
    --accent-strong: var(--theme-accent-strong);
    --accent-soft: var(--theme-accent-soft);
    --hero-start: var(--theme-surface-strong);
    --hero-end: var(--theme-surface-strong);
}

html[data-theme="dark"],
html[data-theme="light"] {
    background: var(--theme-bg);
}

body {
    background: var(--theme-bg);
    color: var(--theme-text);
}

html[data-theme="dark"] body {
    background: var(--theme-bg);
}

html[data-theme="dark"] .app-application-footer {
    border-color: var(--theme-border);
    background: rgba(10, 16, 23, 0.78);
    color: var(--theme-text-muted);
}

html[data-theme="dark"] .app-application-footer__version {
    color: var(--theme-text);
}

html[data-theme="dark"] body.admin-body .app-application-footer--admin {
    border-color: var(--admin-carbon-border);
    background: var(--admin-carbon-surface);
    color: var(--admin-carbon-muted);
}

html[data-theme="dark"] body.admin-body .app-application-footer--admin .app-application-footer__version {
    color: var(--admin-carbon-text);
}

html[data-theme="dark"] .bg-white,
html[data-theme="dark"] .bg-light {
    background-color: var(--theme-surface) !important;
}

html[data-theme="dark"] .text-dark {
    color: var(--theme-text) !important;
}

html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .text-secondary {
    color: var(--theme-text-muted) !important;
}

html[data-theme="dark"] .border-light {
    border-color: var(--theme-border) !important;
}

html[data-theme="dark"] .btn-light,
html[data-theme="dark"] .btn-outline-light {
    color: var(--theme-text) !important;
    border-color: var(--theme-border) !important;
    background: rgba(255, 255, 255, 0.04) !important;
}

html[data-theme="dark"] .btn-outline-dark {
    border-color: var(--theme-border-strong) !important;
    color: var(--theme-text) !important;
    background: rgba(255, 255, 255, 0.02) !important;
}

html[data-theme="dark"] .btn-dark {
    background: var(--theme-surface-strong) !important;
    border-color: transparent !important;
    color: #081018 !important;
}

html[data-theme="dark"] .btn-secondary {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: var(--theme-border) !important;
    color: var(--theme-text) !important;
}

html[data-theme="dark"] .btn-primary {
    background: var(--theme-accent) !important;
    border-color: transparent !important;
    color: #f8fafc !important;
    box-shadow: none;
}

html[data-theme="dark"] .btn-primary:hover,
html[data-theme="dark"] .btn-primary:focus {
    background: var(--theme-accent) !important;
    border-color: transparent !important;
    color: #f8fafc !important;
    box-shadow: none;
}

.modal-backdrop.show {
    background-color: color-mix(in srgb, var(--theme-text) 68%, var(--theme-bg) 32%);
    opacity: 0.56;
}

html[data-theme="dark"] .alert,
html[data-theme="dark"] .card,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .list-surface,
html[data-theme="dark"] .section-box,
html[data-theme="dark"] .sidebar-card,
html[data-theme="dark"] .detail-card,
html[data-theme="dark"] .system-information-card,
html[data-theme="dark"] .system-information-history-card,
html[data-theme="dark"] .system-information-entry,
html[data-theme="dark"] .login-box,
html[data-theme="dark"] .admin-panel-card,
html[data-theme="dark"] .admin-stat-card,
html[data-theme="dark"] .admin-workspace-card,
html[data-theme="dark"] .admin-form-card,
html[data-theme="dark"] .admin-account-context,
html[data-theme="dark"] .admin-hero-panel {
    background: var(--theme-surface);
    color: var(--theme-text);
    border-color: var(--theme-border);
    box-shadow: none;
}

html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer,
html[data-theme="dark"] .card-header,
html[data-theme="dark"] .dropdown-header,
html[data-theme="dark"] .table thead th {
    border-color: var(--theme-border) !important;
}

html[data-theme="dark"] .dropdown-item,
html[data-theme="dark"] .nav-link,
html[data-theme="dark"] .page-link,
html[data-theme="dark"] .app-global-search-option,
html[data-theme="dark"] .app-flyout-entry,
html[data-theme="dark"] .app-theme-choice {
    color: var(--theme-text) !important;
}

html[data-theme="dark"] .dropdown-item:hover,
html[data-theme="dark"] .dropdown-item:focus,
html[data-theme="dark"] .app-global-search-option:hover,
html[data-theme="dark"] .app-global-search-option:focus,
html[data-theme="dark"] .app-flyout-entry:hover,
html[data-theme="dark"] .app-flyout-entry:focus,
html[data-theme="dark"] .app-theme-choice:hover,
html[data-theme="dark"] .app-theme-choice:focus {
    background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .navbar .dropdown-item.text-danger {
    color: #fca5a5 !important;
}

html[data-theme="dark"] .navbar .dropdown-item.text-danger:hover,
html[data-theme="dark"] .navbar .dropdown-item.text-danger:focus,
html[data-theme="dark"] .navbar .dropdown-item.text-danger:active {
    background: rgba(248, 113, 113, 0.14);
    color: #fecaca !important;
}

html[data-theme="dark"] .nav-tabs {
    border-bottom-color: rgba(75, 104, 142, 0.45) !important;
}

html[data-theme="dark"] .nav-tabs .nav-link {
    color: rgba(202, 221, 245, 0.9) !important;
    background: transparent !important;
    border-color: transparent !important;
}

html[data-theme="dark"] .nav-tabs .nav-link:hover,
html[data-theme="dark"] .nav-tabs .nav-link:focus {
    color: #f3f7ff !important;
    background: rgba(34, 52, 82, 0.55) !important;
    border-color: rgba(78, 109, 151, 0.45) !important;
}

html[data-theme="dark"] .nav-tabs .nav-link.active,
html[data-theme="dark"] .nav-tabs .nav-item.show .nav-link {
    color: #f3f7ff !important;
    background: rgba(28, 45, 74, 0.92) !important;
    border-color: rgba(92, 127, 173, 0.55) !important;
}

html[data-theme="dark"] .table {
    color: var(--theme-text);
    border-color: var(--theme-border);
}

html[data-theme="dark"] .table > :not(caption) > * > * {
    background-color: rgba(255, 255, 255, 0.015);
    border-color: var(--theme-border);
}

html[data-theme="dark"] .table thead.table-light th,
html[data-theme="dark"] .table-light th,
html[data-theme="dark"] .table > thead.table-light > tr > th,
html[data-theme="dark"] .tab-content .table thead th {
    background-color: rgba(16, 28, 51, 0.96) !important;
    color: rgba(210, 224, 244, 0.9) !important;
    border-color: rgba(95, 129, 171, 0.35) !important;
}

html[data-theme="dark"] .tab-content .table tbody td {
    color: #f3f7ff !important;
}

html[data-theme="dark"] .tab-content .table tbody tr {
    background-color: rgba(12, 24, 46, 0.85) !important;
}

html[data-theme="dark"] .tab-content .table-responsive {
    scrollbar-color: rgba(123, 145, 176, 0.9) rgba(7, 16, 33, 0.9);
    scrollbar-width: thin;
}

html[data-theme="dark"] .tab-content .table-responsive::-webkit-scrollbar {
    height: 10px;
    width: 10px;
}

html[data-theme="dark"] .tab-content .table-responsive::-webkit-scrollbar-track {
    background: rgba(7, 16, 33, 0.9);
}

html[data-theme="dark"] .tab-content .table-responsive::-webkit-scrollbar-thumb {
    background: rgba(123, 145, 176, 0.85);
    border-radius: 999px;
}

html[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-bg-type: rgba(255, 255, 255, 0.03);
}

html[data-theme="dark"] .table-hover > tbody > tr:hover > * {
    --bs-table-bg-state: rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .input-group-text,
html[data-theme="dark"] .select2-container--default .select2-selection--single,
html[data-theme="dark"] .select2-container--default .select2-selection--multiple {
    background-color: rgba(255, 255, 255, 0.04);
    border-color: var(--theme-border);
    color: var(--theme-text);
}

html[data-theme="dark"] .form-control::placeholder,
html[data-theme="dark"] .form-select::placeholder {
    color: var(--theme-text-muted);
}

html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus,
html[data-theme="dark"] .select2-container--default .select2-selection--single:focus,
html[data-theme="dark"] .select2-container--default .select2-selection--multiple:focus {
    border-color: var(--theme-accent);
    box-shadow: none;
}

html[data-theme="dark"] .select2-container--default .select2-selection__rendered,
html[data-theme="dark"] .select2-container--default .select2-search--dropdown .select2-search__field {
    color: var(--theme-text);
}

html[data-theme="dark"] .select2-dropdown {
    background: var(--theme-surface-strong);
    border-color: var(--theme-border);
    color: var(--theme-text);
}

html[data-theme="dark"] .select2-results__option--highlighted[aria-selected],
html[data-theme="dark"] .select2-results__option--highlighted {
    background: rgba(255, 255, 255, 0.08);
    color: var(--theme-text);
}

html[data-theme="dark"] .app-navbar {
    background: var(--theme-surface-strong) !important;
    box-shadow: none;
}

html[data-theme="dark"] .app-navbar::after,
html[data-theme="dark"] .app-bookmark-bar,
html[data-theme="dark"] .app-navbar-collapse,
html[data-theme="dark"] .app-user-menu,
html[data-theme="dark"] .app-dropdown-menu,
html[data-theme="dark"] .app-global-search-dropdown,
html[data-theme="dark"] .app-flyout-panel,
html[data-theme="dark"] .app-flyout-trigger,
html[data-theme="dark"] .app-theme-menu {
    border-color: var(--theme-border);
}

html[data-theme="dark"] .app-navbar::after {
    background: var(--theme-surface-strong);
}

html[data-theme="dark"] .app-bookmark-bar {
    background: var(--theme-surface-strong);
}

html[data-theme="dark"] .app-bookmark-chip,
html[data-theme="dark"] .app-bookmark-more-btn,
html[data-theme="dark"] .app-bookmark-add-btn,
html[data-theme="dark"] .app-user-chip,
html[data-theme="dark"] .app-theme-toggle,
html[data-theme="dark"] .app-login-btn {
    background: var(--theme-surface-strong) !important;
    border-color: var(--theme-border) !important;
    color: var(--theme-text) !important;
}

html[data-theme="dark"] .app-bookmark-chip:hover,
html[data-theme="dark"] .app-bookmark-chip:focus-visible,
html[data-theme="dark"] .app-bookmark-more-btn:hover,
html[data-theme="dark"] .app-bookmark-more-btn:focus-visible,
html[data-theme="dark"] .app-bookmark-add-btn:hover,
html[data-theme="dark"] .app-bookmark-add-btn:focus-visible,
html[data-theme="dark"] .app-user-chip:hover,
html[data-theme="dark"] .app-user-chip:focus,
html[data-theme="dark"] .app-theme-toggle:hover,
html[data-theme="dark"] .app-theme-toggle:focus {
    background: var(--theme-surface-strong) !important;
}

html[data-theme="dark"] .app-integration-job-link {
    background: var(--theme-surface-strong);
    border-color: var(--theme-border);
    color: var(--theme-text);
}

html[data-theme="dark"] .app-integration-job-link:hover,
html[data-theme="dark"] .app-integration-job-link:focus-visible {
    background: var(--theme-surface-strong);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

html[data-theme="dark"] .app-integration-job-link strong,
html[data-theme="dark"] .app-integration-job-message,
html[data-theme="dark"] .app-integration-job-counts {
    color: var(--theme-text);
}

html[data-theme="dark"] .app-integration-job-progress {
    background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .app-integration-job-stop {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(248, 113, 113, 0.5);
    color: #fca5a5;
}

html[data-theme="dark"] .app-integration-job-status.is-running {
    background: rgba(103, 232, 249, 0.12);
    color: #67e8f9;
}

html[data-theme="dark"] .app-integration-job-status.is-warning {
    background: rgba(251, 191, 36, 0.14);
    color: #fbbf24;
}

html[data-theme="dark"] .app-integration-job-status.is-danger {
    background: rgba(248, 113, 113, 0.14);
    color: #fca5a5;
}

html[data-theme="dark"] .app-integration-job-status.is-success {
    background: rgba(74, 222, 128, 0.14);
    color: #86efac;
}

html[data-theme="dark"] .app-integration-job-status.is-muted {
    background: rgba(255, 255, 255, 0.08);
    color: var(--theme-text-muted);
}

html[data-theme="dark"] .app-nav-pill,
html[data-theme="dark"] .app-nav-pill.is-active,
html[data-theme="dark"] .app-global-search-input,
html[data-theme="dark"] .app-flyout-trigger,
html[data-theme="dark"] .app-flyout-entry,
html[data-theme="dark"] .app-theme-toggle {
    color: var(--theme-text) !important;
}

html[data-theme="dark"] .app-nav-pill.is-active {
    background: var(--theme-accent) !important;
    border-color: rgba(125, 211, 252, 0.34) !important;
    color: var(--theme-text) !important;
    box-shadow: none;
}

html[data-theme="dark"] .app-nav-pill.is-active .app-nav-pill-icon {
    background: rgba(8, 15, 24, 0.36);
    color: #67e8f9;
}

html[data-theme="dark"] .app-nav-pill.is-active .app-nav-pill-kicker {
    color: var(--theme-text-muted);
}

html[data-theme="dark"] .app-global-search-input {
    background: var(--theme-surface-strong);
    border-color: var(--theme-border);
}

html[data-theme="dark"] .app-global-search-dropdown {
    background: rgba(10, 18, 31, 0.98);
    border-color: var(--theme-border);
    box-shadow: none;
}

html[data-theme="dark"] .app-global-search-dropdown-status,
html[data-theme="dark"] .app-global-search-empty-state,
html[data-theme="dark"] .app-global-search-option:hover,
html[data-theme="dark"] .app-global-search-option.is-active {
    background: rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .app-subsidiary-disclosure:hover,
html[data-theme="dark"] .app-subsidiary-disclosure:focus-visible,
html[data-theme="dark"] .app-subsidiary-disclosure[aria-expanded="true"],
html[data-theme="dark"] .app-subsidiary-option:hover,
html[data-theme="dark"] .app-subsidiary-option:focus-visible {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--theme-border);
}

html[data-theme="dark"] .app-subsidiary-disclosure-copy strong,
html[data-theme="dark"] .app-subsidiary-option-copy strong {
    color: var(--theme-text);
}

html[data-theme="dark"] .app-subsidiary-option.is-current {
    background: rgba(125, 211, 252, 0.12);
    border-color: rgba(125, 211, 252, 0.18);
}

html[data-theme="dark"] .app-subsidiary-option-copy small {
    color: var(--theme-text-muted);
}

html[data-theme="dark"] .app-subsidiary-option-status {
    background: rgba(125, 211, 252, 0.12);
    color: #bae6fd;
}

html[data-theme="dark"] .app-user-avatar-badge {
    box-shadow: none;
}

html[data-theme="dark"] .app-theme-switcher .app-theme-toggle-icon {
    background: rgba(125, 211, 252, 0.12);
    color: var(--theme-accent);
}

html[data-theme="dark"] .app-theme-choice.is-current {
    background: rgba(125, 211, 252, 0.12);
    color: var(--theme-text) !important;
}

html[data-theme="dark"] .app-theme-choice-copy small,
html[data-theme="dark"] .app-theme-toggle-label {
    color: var(--theme-text-muted);
}

html[data-theme="dark"] .app-theme-toggle-copy strong {
    color: var(--theme-text);
}

html[data-theme="dark"] .app-rejection-modal .modal-content,
html[data-theme="dark"] .app-rejection-history-modal .modal-content,
html[data-theme="dark"] .app-delete-confirm-modal .modal-content,
html[data-theme="dark"] .app-bookmark-modal .modal-content,
html[data-theme="dark"] .app-integration-followup-modal .modal-content {
    background: var(--theme-surface-strong);
    color: var(--theme-text);
    border-color: var(--theme-border);
}

html[data-theme="dark"] .app-revaluation-warning-modal .modal-content {
    border-color: var(--theme-border);
    background: var(--theme-surface-strong);
    box-shadow: none;
}

html[data-theme="dark"] .app-revaluation-warning-icon {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.14);
}

html[data-theme="dark"] .app-auto-logout-modal .modal-content {
    background: var(--theme-surface-strong);
    color: var(--theme-text);
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: none;
}

html[data-theme="dark"] .app-auto-logout-modal .modal-content::before {
    background: var(--theme-surface-strong);
}

html[data-theme="dark"] .app-auto-logout-kicker {
    color: var(--theme-text-muted);
}

html[data-theme="dark"] .app-auto-logout-title {
    color: var(--theme-text);
}

html[data-theme="dark"] .app-auto-logout-message {
    color: var(--theme-text-soft);
}

html[data-theme="dark"] .app-auto-logout-btn {
    background: var(--theme-surface-strong);
    box-shadow: none;
}

html[data-theme="dark"] .app-integration-followup-kicker {
    color: #fdba74;
}

html[data-theme="dark"] .app-integration-followup-copy {
    color: var(--theme-text-muted);
}

html[data-theme="dark"] .app-integration-followup-message-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--theme-border);
}

html[data-theme="dark"] .app-integration-followup-message {
    color: var(--theme-text-soft);
}

html[data-theme="dark"] .app-integration-followup-modal .btn-close {
    background-color: rgba(148, 163, 184, 0.16);
}

html[data-theme="dark"] .app-integration-followup-footer {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--theme-border);
}
html[data-theme="dark"] .bill-approval-page .bill-approval-row.is-failed > * {
    background: rgba(248, 113, 113, 0.08);
}

html[data-theme="dark"] .bill-approval-page .bill-approval-row.is-failed:hover > * {
    background: rgba(248, 113, 113, 0.12);
}

html[data-theme="dark"] .bill-approval-page .bill-approval-note,
html[data-theme="dark"] .bill-approval-page .bill-approval-secondary-text,
html[data-theme="dark"] .bill-approval-page .bill-approval-result-message {
    color: var(--theme-text-muted);
}

html[data-theme="dark"] .bill-approval-page .bill-approval-result-danger {
    background: rgba(248, 113, 113, 0.14);
    color: #fecaca;
}

html[data-theme="dark"] .bill-approval-page .per-page-select {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--theme-border);
    color: var(--theme-text);
    color-scheme: dark;
}

html[data-theme="dark"] .bill-approval-page .per-page-select:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(125, 211, 252, 0.42);
    box-shadow: none;
}

html[data-theme="dark"] .bill-approval-page .per-page-select option {
    background: var(--theme-surface-strong);
    color: var(--theme-text);
}

html[data-theme="dark"] .bill-approval-page .status-pending {
    background: rgba(245, 158, 11, 0.16);
    color: #fde68a;
    border-color: rgba(245, 158, 11, 0.2);
}

html[data-theme="dark"] .app-rejection-header,
html[data-theme="dark"] .app-rejection-history-modal-header,
html[data-theme="dark"] .app-delete-confirm-modal .modal-header,
html[data-theme="dark"] .app-bookmark-modal .modal-header,
html[data-theme="dark"] .app-integration-followup-header {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--theme-border);
}

html[data-theme="dark"] body.login-body .login-box,
html[data-theme="dark"] body.profile-detail-body .profile-page-header,
html[data-theme="dark"] body.profile-detail-body .profile-detail-page .section-box,
html[data-theme="dark"] body.profile-detail-body .profile-detail-page .sidebar-card,
html[data-theme="dark"] body.profile-detail-body .profile-meta-pill,
html[data-theme="dark"] body.profile-detail-body .profile-role-pill,
html[data-theme="dark"] body.profile-detail-body .empty-state {
    background: var(--theme-surface);
    border-color: var(--theme-border);
    color: var(--theme-text);
}

html[data-theme="dark"] body.profile-detail-body .profile-kicker,
html[data-theme="dark"] body.profile-detail-body .profile-badge,
html[data-theme="dark"] body.profile-detail-body .mini-pill,
html[data-theme="dark"] body.profile-detail-body .profile-avatar-hero,
html[data-theme="dark"] body.profile-detail-body .health-stat {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
    color: var(--theme-text) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body.profile-detail-body .profile-kicker {
    background: rgba(34, 211, 238, 0.1) !important;
    border-color: rgba(34, 211, 238, 0.22) !important;
    color: #99f6e4 !important;
}

html[data-theme="dark"] body.profile-detail-body .profile-badge {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] body.profile-detail-body .mini-pill {
    background: rgba(255, 255, 255, 0.045) !important;
    color: #cbd5e1 !important;
}

html[data-theme="dark"] body.profile-detail-body .profile-avatar-hero {
    background: var(--theme-bg) !important;
    color: #99f6e4 !important;
}

html[data-theme="dark"] body.profile-detail-body .health-stat {
    background: var(--theme-bg) !important;
}

html[data-theme="dark"] body.profile-detail-body .health-stat strong {
    color: var(--theme-text) !important;
}

html[data-theme="dark"] body.profile-detail-body {
    --profile-bg-start: var(--theme-bg);
    --profile-bg-end: var(--theme-bg);
    --profile-surface: var(--theme-surface-strong);
    --profile-border: var(--theme-border);
    --profile-border-strong: var(--theme-border-strong);
    --profile-text: var(--theme-text);
    --profile-muted: var(--theme-text-muted);
    --profile-accent: var(--theme-accent);
    --profile-accent-deep: var(--theme-accent-strong);
    --profile-green-soft: rgba(74, 222, 128, 0.14);
    --profile-green-text: #86efac;
    --profile-red-soft: rgba(248, 113, 113, 0.14);
    --profile-red-text: #fca5a5;
    --profile-shadow: none;
    --profile-card-shadow: none;
}

html[data-theme="dark"] body.profile-detail-body .profile-page-title,
html[data-theme="dark"] body.profile-detail-body .section-title,
html[data-theme="dark"] body.profile-detail-body .sidebar-title,
html[data-theme="dark"] body.profile-detail-body .detail-label,
html[data-theme="dark"] body.profile-detail-body .detail-value,
html[data-theme="dark"] body.profile-detail-body .profile-meta-label,
html[data-theme="dark"] body.profile-detail-body .profile-meta-value,
html[data-theme="dark"] body.profile-detail-body .profile-role-copy strong,
html[data-theme="dark"] body.profile-detail-body .profile-role-copy span,
html[data-theme="dark"] body.profile-detail-body .profile-hero-caption strong,
html[data-theme="dark"] body.profile-detail-body .profile-hero-caption span,
html[data-theme="dark"] body.profile-detail-body .health-stat strong,
html[data-theme="dark"] body.profile-detail-body .health-item strong {
    color: var(--theme-text);
}

html[data-theme="dark"] body.profile-detail-body .profile-page-subtitle,
html[data-theme="dark"] body.profile-detail-body .section-copy,
html[data-theme="dark"] body.profile-detail-body .sidebar-copy,
html[data-theme="dark"] body.profile-detail-body .note-item,
html[data-theme="dark"] body.profile-detail-body .health-item span,
html[data-theme="dark"] body.profile-detail-body .profile-role-copy span,
html[data-theme="dark"] body.profile-detail-body .profile-role-pill small {
    color: var(--theme-text-muted);
}

html[data-theme="dark"] body.login-body .login-btn {
    background: var(--theme-bg);
    color: #061018;
}

html[data-theme="dark"] body.login-body .login-brand-mark {
    background: transparent;
}

html[data-theme="dark"] body.login-body {
    background: var(--theme-bg);
}

html[data-theme="dark"] body.login-body .login-brand-title,
html[data-theme="dark"] body.login-body .login-box-header h1,
html[data-theme="dark"] body.login-body .form-row label,
html[data-theme="dark"] body.login-body .login-form-help,
html[data-theme="dark"] body.login-body .login-note,
html[data-theme="dark"] body.login-body .login-link-btn,
html[data-theme="dark"] body.login-body .toggle-pw {
    color: var(--theme-text-muted);
}

html[data-theme="dark"] body.login-body .login-box-header p,
html[data-theme="dark"] body.login-body .form-row input,
html[data-theme="dark"] body.login-body .form-row input::placeholder {
    color: var(--theme-text);
}

html[data-theme="dark"] body.login-body .login-alert-danger,
html[data-theme="dark"] body.login-body .login-alert-error {
    background: rgba(248, 113, 113, 0.08);
    border-color: rgba(248, 113, 113, 0.18);
    color: #fca5a5;
}

html[data-theme="dark"] body.login-body .login-alert-success {
    background: rgba(74, 222, 128, 0.08);
    border-color: rgba(74, 222, 128, 0.16);
    color: #86efac;
}

html[data-theme="dark"] body.login-body .login-alert-warning {
    background: rgba(251, 191, 36, 0.08);
    border-color: rgba(251, 191, 36, 0.16);
    color: #fcd34d;
}

html[data-theme="dark"] body.login-body .form-row input {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--theme-border);
}

html[data-theme="dark"] body.login-body .form-row input:focus {
    background: rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] body.login-body .login-link-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(148, 163, 184, 0.2);
    color: var(--theme-text);
    box-shadow: none;
}

html[data-theme="dark"] body.login-body .login-link-btn:hover {
    border-color: rgba(34, 211, 238, 0.28);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

html[data-theme="dark"] body.login-body .login-card-note {
    background: rgba(34, 211, 238, 0.06);
    border-color: rgba(34, 211, 238, 0.14);
}

html[data-theme="dark"] body.login-body .login-card-note p {
    color: var(--theme-text-muted);
}

html[data-theme="dark"] body.admin-body {
    color: var(--theme-text);
    --admin-bg: var(--theme-bg);
    --admin-surface: var(--theme-surface-strong);
    --admin-surface-strong: var(--theme-surface-strong);
    --admin-sidebar: rgba(8, 13, 20, 0.98);
    --admin-sidebar-border: var(--theme-border);
    --admin-border: var(--theme-border);
    --admin-text: var(--theme-text);
    --admin-text-soft: var(--theme-text-muted);
    --admin-text-muted: var(--theme-text-muted);
    --admin-white: #f8fafc;
    --admin-emerald: #67e8f9;
    --admin-emerald-soft: rgba(34, 211, 238, 0.12);
    --admin-amber: #fbbf24;
    --admin-amber-soft: rgba(251, 191, 36, 0.12);
    --admin-copper: #fdba74;
    --admin-copper-soft: rgba(253, 186, 116, 0.12);
    --admin-slate: #93c5fd;
    --admin-slate-soft: rgba(147, 197, 253, 0.12);
    --admin-plum: #c4b5fd;
    --admin-plum-soft: rgba(196, 181, 253, 0.12);
    --admin-ice: #7dd3fc;
    --admin-ice-soft: rgba(125, 211, 252, 0.12);
    --admin-danger: #f87171;
    --admin-danger-soft: rgba(248, 113, 113, 0.12);
    --admin-shadow: none;
    --admin-shadow-soft: none;
    --admin-carbon-bg: var(--theme-bg);
    --admin-carbon-surface: var(--theme-surface-strong);
    --admin-carbon-surface-alt: var(--theme-surface-muted);
    --admin-carbon-surface-hover: var(--theme-surface-muted);
    --admin-carbon-border: var(--theme-border);
    --admin-carbon-border-strong: var(--theme-border-strong);
    --admin-carbon-text: var(--theme-text);
    --admin-carbon-muted: var(--theme-text-muted);
    --admin-carbon-subtle: var(--theme-text-muted);
    --admin-carbon-accent: var(--theme-accent);
    --admin-carbon-accent-hover: var(--erp-primary-hover);
    --admin-carbon-danger: #f87171;
    --admin-carbon-success: #4ade80;
    --admin-carbon-warning: #fbbf24;
    --admin-carbon-shadow: none;
}

html[data-theme="dark"] body.admin-body .admin-sidebar {
    background: var(--theme-bg);
    border-right-color: var(--theme-border);
}

html[data-theme="dark"] body.admin-body .admin-sidebar::before {
    background: var(--theme-bg);
}

html[data-theme="dark"] body.admin-body .admin-main,
html[data-theme="dark"] body.admin-body .admin-topbar,
html[data-theme="dark"] body.admin-body .admin-panel-card,
html[data-theme="dark"] body.admin-body .admin-stat-card,
html[data-theme="dark"] body.admin-body .admin-workspace-card,
html[data-theme="dark"] body.admin-body .admin-form-card,
html[data-theme="dark"] body.admin-body .admin-account-context,
html[data-theme="dark"] body.admin-body .admin-hero-panel,
html[data-theme="dark"] body.admin-body .admin-section,
html[data-theme="dark"] body.admin-body .admin-detail-grid {
    background: transparent;
    color: var(--theme-text);
}

html[data-theme="dark"] body.admin-body .admin-panel-card,
html[data-theme="dark"] body.admin-body .admin-stat-card,
html[data-theme="dark"] body.admin-body .admin-workspace-card,
html[data-theme="dark"] body.admin-body .admin-form-card,
html[data-theme="dark"] body.admin-body .admin-account-context {
    background: var(--theme-surface);
    border-color: var(--theme-border);
    box-shadow: none;
}

html[data-theme="dark"] body.admin-body .admin-topbar-copy,
html[data-theme="dark"] body.admin-body .admin-topbar-actions,
html[data-theme="dark"] body.admin-body .admin-topbar-link,
html[data-theme="dark"] body.admin-body .admin-date-chip,
html[data-theme="dark"] body.admin-body .admin-sidebar-links a {
    color: var(--theme-text);
}

html[data-theme="dark"] body.admin-body .admin-topbar-link,
html[data-theme="dark"] body.admin-body .admin-nav-link,
html[data-theme="dark"] body.admin-body .admin-close-nav,
html[data-theme="dark"] body.admin-body .admin-nav-toggle {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--theme-border);
}

html[data-theme="dark"] body.admin-body .admin-nav-link.is-active,
html[data-theme="dark"] body.admin-body .admin-topbar-link.is-primary {
    background: rgba(125, 211, 252, 0.12);
    color: var(--theme-text);
}

html[data-theme="dark"] body.admin-body .admin-topbar-link:hover,
html[data-theme="dark"] body.admin-body .admin-topbar-link:focus,
html[data-theme="dark"] body.admin-body .admin-nav-link:hover,
html[data-theme="dark"] body.admin-body .admin-nav-link:focus {
    background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] body.admin-body .admin-section-title,
html[data-theme="dark"] body.admin-body .admin-page-title,
html[data-theme="dark"] body.admin-body .admin-panel-title,
html[data-theme="dark"] body.admin-body .admin-stat-value,
html[data-theme="dark"] body.admin-body .admin-workspace-card h3,
html[data-theme="dark"] body.admin-body .admin-identity-name {
    color: var(--theme-text);
}

html[data-theme="dark"] body.admin-body .admin-page-description,
html[data-theme="dark"] body.admin-body .admin-stat-note,
html[data-theme="dark"] body.admin-body .admin-stat-copy,
html[data-theme="dark"] body.admin-body .admin-workspace-body p,
html[data-theme="dark"] body.admin-body .admin-workspace-metric span,
html[data-theme="dark"] body.admin-body .admin-nav-link-meta,
html[data-theme="dark"] body.admin-body .admin-nav-group-label {
    color: var(--theme-text-muted);
}

html[data-theme="dark"] .app-theme-switcher {
    position: relative;
}

html[data-theme="dark"] .app-theme-disclosure:hover,
html[data-theme="dark"] .app-theme-disclosure:focus-visible,
html[data-theme="dark"] .app-theme-section.is-open .app-theme-disclosure {
    background: rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .app-theme-toggle {
    min-height: 40px;
    padding: 8px 12px;
    border-radius: var(--erp-control-radius);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

html[data-theme="dark"] .app-theme-toggle-icon {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(125, 211, 252, 0.12);
    color: var(--theme-accent);
    font-family: var(--app-font-display);
    font-size: var(--app-font-size-13);
    font-weight: var(--app-font-weight-bold);
}

html[data-theme="dark"] .app-theme-toggle-copy {
    display: grid;
    align-items: center;
    gap: 1px;
    text-align: left;
}

html[data-theme="dark"] .app-theme-toggle-label {
    color: var(--theme-text-muted);
    font-size: var(--app-font-size-10);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

html[data-theme="dark"] .app-theme-toggle-copy strong {
    color: var(--theme-text);
    font-size: var(--app-font-size-12);
    font-weight: var(--app-font-weight-extrabold);
}

html[data-theme="dark"] .app-theme-menu {
    min-width: 220px;
}

html[data-theme="dark"] .app-theme-choice {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

html[data-theme="dark"] .app-theme-choice-preview {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.03);
}

html[data-theme="dark"] .app-theme-choice-preview-light {
    background: linear-gradient(180deg, #f8fafc 0%, #dbe7f5 100%);
}

html[data-theme="dark"] .app-theme-choice-preview-dark {
    background: linear-gradient(180deg, #111827 0%, #020617 100%);
}

html[data-theme="dark"] .app-theme-choice-preview-system {
    background:
        linear-gradient(135deg, #f8fafc 0%, #f8fafc 49%, #111827 51%, #020617 100%);
}

html[data-theme="dark"] .app-theme-choice-copy {
    display: grid;
    gap: 2px;
}

html[data-theme="dark"] .app-theme-choice-copy small {
    color: var(--theme-text-muted);
    font-size: var(--app-font-size-11);
}

html[data-theme="dark"] .app-theme-choice-status {
    background: rgba(125, 211, 252, 0.12);
    color: #bae6fd;
}

html[data-theme="dark"] .app-theme-choice.is-current::after {
    content: "";
}

html[data-theme="dark"] .list-hero,
html[data-theme="dark"] .list-surface {
    border-color: var(--theme-border);
    box-shadow: none;
}

html[data-theme="dark"] .list-hero {
    background: var(--theme-surface-strong);
}

html[data-theme="dark"] .list-hero::before {
    background: rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .list-hero::after {
    background: rgba(45, 212, 191, 0.1);
}

html[data-theme="dark"] .app-breadcrumb-item {
    color: var(--theme-text-muted);
}

html[data-theme="dark"] .app-breadcrumb-item + .app-breadcrumb-item::before {
    color: rgba(148, 163, 184, 0.48);
}

html[data-theme="dark"] .app-breadcrumb-link {
    color: var(--theme-text);
}

html[data-theme="dark"] .app-breadcrumb-link:hover,
html[data-theme="dark"] .app-breadcrumb-link:focus-visible {
    color: #67e8f9;
}

html[data-theme="dark"] .app-breadcrumb-current {
    color: var(--theme-text);
}

html[data-theme="dark"] .list-stat,
html[data-theme="dark"] .toolbar,
html[data-theme="dark"] .pagination-bar,
html[data-theme="dark"] .table-card {
    border-color: var(--theme-border);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: none;
}

html[data-theme="dark"] .list-stat {
    background: rgba(255, 255, 255, 0.035);
}

html[data-theme="dark"] .search-input,
html[data-theme="dark"] .per-page-select {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--theme-border);
    color: var(--theme-text);
}

html[data-theme="dark"] .search-input::placeholder {
    color: var(--theme-text-muted);
}

html[data-theme="dark"] .search-input:focus,
html[data-theme="dark"] .per-page-select:focus {
    border-color: var(--theme-accent);
    box-shadow: none;
    background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .list-shell .btn-outline-secondary {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--theme-border);
    color: var(--theme-text);
}

html[data-theme="dark"] .list-shell .btn-outline-secondary:hover,
html[data-theme="dark"] .list-shell .btn-outline-secondary:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--theme-border-strong);
    color: var(--theme-text);
}

html[data-theme="dark"] .data-table thead th {
    background: rgba(255, 255, 255, 0.04);
    border-bottom-color: var(--theme-border);
    color: var(--theme-text-muted);
}

html[data-theme="dark"] .data-table tbody tr {
    border-bottom-color: var(--theme-border);
}

html[data-theme="dark"] .data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .data-table tbody td {
    color: var(--theme-text);
}

html[data-theme="dark"] .list-shell .data-table thead th:last-child,
html[data-theme="dark"] .list-shell .td-actions {
    background: rgba(15, 23, 42, 0.96);
    box-shadow: none;
}

html[data-theme="dark"] .list-shell .data-table tbody tr:hover .td-actions {
    background: rgba(15, 23, 42, 0.98);
}

html[data-theme="dark"] .action-link {
    background: rgba(125, 211, 252, 0.12);
    color: var(--theme-text);
}

html[data-theme="dark"] .action-link:hover {
    background: rgba(125, 211, 252, 0.18);
    box-shadow: none;
    color: var(--theme-text);
}

html[data-theme="dark"] .action-link-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--theme-text);
}

html[data-theme="dark"] .status-badge,
html[data-theme="dark"] .list-view-chip,
html[data-theme="dark"] .page-btn,
html[data-theme="dark"] .meta-pill,
html[data-theme="dark"] .mini-chip {
    background: rgba(255, 255, 255, 0.05);
    color: var(--theme-text);
    border-color: var(--theme-border);
}

html[data-theme="dark"] .list-sync-value {
    color: var(--theme-text-muted);
}

html[data-theme="dark"] a.list-sync-value:hover,
html[data-theme="dark"] a.list-sync-value:focus-visible {
    color: var(--theme-text);
}

html[data-theme="dark"] .list-view-chip:hover,
html[data-theme="dark"] .page-btn:hover:not(.disabled) {
    background: rgba(255, 255, 255, 0.08);
    color: var(--theme-text);
    box-shadow: none;
}

html[data-theme="dark"] .page-btn.is-current {
    background: var(--theme-surface-strong);
    border-color: rgba(125, 211, 252, 0.22);
    color: #ecfeff;
    box-shadow: none;
}

html[data-theme="dark"] .pagination-ellipsis {
    background: rgba(255, 255, 255, 0.03);
    color: var(--theme-text-muted);
}

html[data-theme="dark"] .list-view-chip.active {
    background: rgba(125, 211, 252, 0.12);
    color: var(--theme-text);
    border-color: rgba(125, 211, 252, 0.2);
}

html[data-theme="dark"] .list-view-count {
    background: rgba(255, 255, 255, 0.08);
    color: var(--theme-text);
}

html[data-theme="dark"] .page-btn.disabled {
    background: rgba(255, 255, 255, 0.03);
    color: var(--theme-text-muted);
}

html[data-theme="dark"] .pagination-goto-label {
    color: var(--theme-text);
}

html[data-theme="dark"] .pagination-goto-input {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--theme-border);
    color: var(--theme-text);
}

html[data-theme="dark"] .pagination-goto-input:focus {
    border-color: rgba(125, 211, 252, 0.35);
    box-shadow: none;
}

html[data-theme="dark"] .pagination-info,
html[data-theme="dark"] .td-empty {
    color: var(--theme-text-muted);
}

html[data-theme="dark"] body.admin-body .admin-table thead th {
    background: rgba(255, 255, 255, 0.04);
    border-bottom-color: var(--theme-border);
    color: var(--theme-text-muted);
}

html[data-theme="dark"] body.admin-body .admin-table tbody td {
    border-top-color: var(--theme-border);
    color: var(--theme-text);
}

html[data-theme="dark"] body.admin-body .admin-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

html[data-theme="dark"] body.admin-body .admin-user-avatar {
    background: var(--theme-bg);
    color: #dbf4ff;
}

html[data-theme="dark"] body.admin-body .admin-user-username {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--theme-border);
    color: var(--theme-text-muted);
}

html[data-theme="dark"] body.admin-body .admin-role-pill {
    background: rgba(125, 211, 252, 0.12);
    border: 1px solid rgba(125, 211, 252, 0.18);
    color: #7dd3fc;
}

html[data-theme="dark"] body.admin-body .admin-status-pill {
    background: rgba(74, 222, 128, 0.12);
    border: 1px solid rgba(74, 222, 128, 0.18);
    color: #86efac;
}

html[data-theme="dark"] body.admin-body .admin-status-pill.is-active {
    background: rgba(74, 222, 128, 0.16);
    color: #86efac;
}

html[data-theme="dark"] body.admin-body .admin-status-pill.is-warning {
    background: rgba(250, 204, 21, 0.14);
    border: 1px solid rgba(250, 204, 21, 0.22);
    color: #fde68a;
}

html[data-theme="dark"] body.admin-body .admin-panel-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--theme-border);
    color: var(--theme-text-muted);
}

html[data-theme="dark"] .theme-coa,
html[data-theme="dark"] .theme-bill,
html[data-theme="dark"] .theme-vendor,
html[data-theme="dark"] .theme-customer,
html[data-theme="dark"] .theme-wht,
html[data-theme="dark"] .theme-employee,
html[data-theme="dark"] .theme-balance-sheet,
html[data-theme="dark"] .theme-finance-setup,
html[data-theme="dark"] .theme-profit-loss,
html[data-theme="dark"] .theme-trial-balance,
html[data-theme="dark"] .theme-match-bank,
html[data-theme="dark"] .theme-fifo,
html[data-theme="dark"] .theme-fifo-calc,
html[data-theme="dark"] .theme-gl,
html[data-theme="dark"] .theme-audit {
    --hero-start: var(--theme-surface-strong);
    --hero-end: var(--theme-surface-strong);
}

html[data-theme="dark"] .theme-coa {
    --theme-accent: #2dd4bf;
    --theme-accent-strong: #14b8a6;
    --theme-accent-soft: rgba(20, 184, 166, 0.14);
    --accent: var(--theme-accent);
    --accent-strong: var(--theme-accent-strong);
    --accent-soft: var(--theme-accent-soft);
    --bs-primary: #14b8a6;
    --bs-primary-rgb: 20, 184, 166;
}

html[data-theme="dark"] .theme-coa .list-hero {
    background: var(--theme-surface-strong);
}

html[data-theme="dark"] .theme-coa .list-hero::after {
    background: rgba(20, 184, 166, 0.1);
}

html[data-theme="dark"] .theme-coa .btn-primary {
    background: var(--theme-accent) !important;
    border-color: transparent !important;
    color: #f8fafc !important;
    box-shadow: none;
}

html[data-theme="dark"] .theme-coa .btn-primary:hover,
html[data-theme="dark"] .theme-coa .btn-primary:focus {
    background: var(--theme-accent) !important;
    border-color: transparent !important;
    color: #f8fafc !important;
    box-shadow: none;
}

html[data-theme="dark"] .theme-coa .action-link {
    background: rgba(20, 184, 166, 0.12);
}

html[data-theme="dark"] .theme-coa .action-link:hover {
    background: rgba(20, 184, 166, 0.18);
    box-shadow: none;
}

html[data-theme="dark"] .theme-vendor {
    --theme-accent: #14b8a6;
    --theme-accent-strong: #0f766e;
    --theme-accent-soft: rgba(20, 184, 166, 0.14);
    --accent: var(--theme-accent);
    --accent-strong: var(--theme-accent-strong);
    --accent-soft: var(--theme-accent-soft);
    --bs-primary: #14b8a6;
    --bs-primary-rgb: 20, 184, 166;
    --hero-start: var(--theme-surface-strong);
    --hero-end: var(--theme-surface-strong);
}

html[data-theme="dark"] .theme-vendor .list-hero::after {
    background: rgba(20, 184, 166, 0.1);
}

html[data-theme="dark"] .theme-vendor .btn-primary {
    background: var(--theme-accent) !important;
    border-color: transparent !important;
    color: #f8fafc !important;
    box-shadow: none;
}

html[data-theme="dark"] .theme-vendor .btn-primary:hover,
html[data-theme="dark"] .theme-vendor .btn-primary:focus {
    background: var(--theme-accent) !important;
    border-color: transparent !important;
    color: #f8fafc !important;
    box-shadow: none;
}

html[data-theme="dark"] .theme-vendor .action-link {
    background: rgba(20, 184, 166, 0.12);
}

html[data-theme="dark"] .theme-vendor .action-link:hover {
    background: rgba(20, 184, 166, 0.18);
    box-shadow: none;
}

html[data-theme="dark"] .theme-audit {
    --audit-ink: var(--theme-text);
    --audit-muted: var(--theme-text-muted);
    --audit-line: var(--theme-border);
    --audit-soft-surface: var(--theme-surface-strong);
}

html[data-theme="dark"] .theme-audit .audit-event-summary-card,
html[data-theme="dark"] .theme-audit .audit-section-card,
html[data-theme="dark"] .theme-audit .audit-row-card,
html[data-theme="dark"] .theme-audit .audit-field-change,
html[data-theme="dark"] .theme-audit .audit-summary-item,
html[data-theme="dark"] .theme-audit .audit-row-field {
    background: rgba(14, 27, 48, 0.92) !important;
    border-color: rgba(95, 128, 171, 0.42) !important;
    box-shadow: none;
}

html[data-theme="dark"] .theme-audit .audit-summary-item strong,
html[data-theme="dark"] .theme-audit .audit-row-field strong,
html[data-theme="dark"] .theme-audit .audit-field-values strong,
html[data-theme="dark"] .theme-audit .audit-row-head strong,
html[data-theme="dark"] .theme-audit .audit-section-head h3,
html[data-theme="dark"] .theme-audit .audit-child-block h4,
html[data-theme="dark"] .theme-audit .audit-event-title {
    color: #f3f7ff !important;
}

html[data-theme="dark"] .theme-audit .audit-summary-item span,
html[data-theme="dark"] .theme-audit .audit-row-field span,
html[data-theme="dark"] .theme-audit .audit-field-label,
html[data-theme="dark"] .theme-audit .audit-field-values small,
html[data-theme="dark"] .theme-audit .audit-row-head span,
html[data-theme="dark"] .theme-audit .audit-section-head span,
html[data-theme="dark"] .theme-audit .audit-event-subtitle,
html[data-theme="dark"] .theme-audit .audit-kicker.muted {
    color: rgba(175, 196, 225, 0.88) !important;
}

html[data-theme="dark"] .theme-audit .audit-change-chip {
    border-color: rgba(95, 128, 171, 0.46) !important;
}

html[data-theme="dark"] .audit-offcanvas {
    background: rgba(8, 18, 35, 0.97) !important;
    color: #f3f7ff;
}

html[data-theme="dark"] .audit-offcanvas .offcanvas-header,
html[data-theme="dark"] .audit-offcanvas .offcanvas-body {
    border-color: rgba(95, 128, 171, 0.38) !important;
}

html[data-theme="dark"] .theme-match-bank {
    --accent: var(--theme-accent);
    --accent-strong: var(--theme-accent-strong);
    --accent-soft: var(--theme-accent-soft);
}

html[data-theme="dark"] .theme-match-bank .match-bank-card,
html[data-theme="dark"] .theme-match-bank .match-bank-empty-state,
html[data-theme="dark"] .theme-match-bank .match-bank-review-card,
html[data-theme="dark"] .theme-match-bank .match-bank-stat,
html[data-theme="dark"] .theme-match-bank .match-bank-summary-metric,
html[data-theme="dark"] .theme-match-bank .match-bank-filter-row {
    background: rgba(14, 27, 48, 0.92) !important;
    border-color: rgba(95, 128, 171, 0.42) !important;
    color: #f3f7ff !important;
}

html[data-theme="dark"] .theme-match-bank .match-bank-card h2,
html[data-theme="dark"] .theme-match-bank .match-bank-review-card h2,
html[data-theme="dark"] .theme-match-bank .match-bank-stat strong,
html[data-theme="dark"] .theme-match-bank .match-bank-summary-metric strong {
    color: #f3f7ff !important;
}

html[data-theme="dark"] .theme-match-bank .match-bank-section-label,
html[data-theme="dark"] .theme-match-bank .match-bank-stat span,
html[data-theme="dark"] .theme-match-bank .match-bank-summary-metric span,
html[data-theme="dark"] .theme-match-bank .match-bank-help,
html[data-theme="dark"] .theme-match-bank .match-bank-selection-message {
    color: rgba(175, 196, 225, 0.88) !important;
}

html[data-theme="dark"] .theme-match-bank .match-bank-form-grid label,
html[data-theme="dark"] .theme-match-bank .match-bank-file-field,
html[data-theme="dark"] .theme-match-bank .match-bank-add-charge-field span {
    color: #dbe9ff !important;
}

html[data-theme="dark"] .theme-match-bank .match-bank-table-wrap {
    background: rgba(11, 23, 43, 0.95) !important;
    border-color: rgba(95, 128, 171, 0.38) !important;
}

html[data-theme="dark"] .theme-match-bank .match-bank-table th {
    background: rgba(24, 40, 66, 0.96) !important;
    color: rgba(192, 211, 238, 0.9) !important;
    border-bottom-color: rgba(95, 128, 171, 0.34) !important;
}

html[data-theme="dark"] .theme-match-bank .match-bank-table td {
    color: #f3f7ff !important;
    border-bottom-color: rgba(95, 128, 171, 0.28) !important;
}

html[data-theme="dark"] .theme-match-bank .match-bank-table tbody tr:hover {
    background: rgba(33, 54, 88, 0.62) !important;
}

html[data-theme="dark"] .theme-match-bank .match-bank-tab {
    color: rgba(209, 225, 246, 0.92) !important;
}

html[data-theme="dark"] .theme-match-bank .match-bank-tab strong {
    background: rgba(62, 86, 124, 0.55) !important;
    color: #f3f7ff !important;
}

html[data-theme="dark"] .theme-match-bank .match-bank-tab.is-active {
    background: rgba(20, 184, 166, 0.2) !important;
    border-color: rgba(45, 212, 191, 0.42) !important;
    color: #d9fffb !important;
}

html[data-theme="dark"] .theme-match-bank .match-bank-selection-tray {
    background: var(--theme-surface-strong) !important;
}

html[data-theme="dark"] .theme-match-bank .match-bank-selection-actions {
    background: rgba(20, 35, 61, 0.92) !important;
    border-color: rgba(95, 128, 171, 0.42) !important;
}

html[data-theme="dark"] .theme-match-bank .match-bank-exclude-form textarea {
    background: rgba(13, 26, 48, 0.94) !important;
    border-color: rgba(95, 128, 171, 0.42) !important;
    color: #f3f7ff !important;
}

html[data-theme="dark"] .theme-match-bank .match-bank-exclude-form textarea::placeholder {
    color: rgba(173, 194, 223, 0.72) !important;
}

html[data-theme="dark"] .theme-match-bank #match-bank-add-charge-open,
html[data-theme="dark"] .theme-match-bank #match-bank-clear-button {
    background: rgba(38, 55, 84, 0.88) !important;
    border-color: rgba(95, 128, 171, 0.42) !important;
    color: #dceaff !important;
}

html[data-theme="dark"] .theme-match-bank .match-bank-modal {
    background: rgba(8, 19, 37, 0.98) !important;
    border-color: rgba(95, 128, 171, 0.44) !important;
}

html[data-theme="dark"] .theme-match-bank .reconcile-modal-card .reconcile-modal-actions {
    background: rgba(8, 19, 37, 0.98) !important;
    border-bottom-color: rgba(95, 128, 171, 0.42) !important;
}

html[data-theme="dark"] .theme-match-bank .match-bank-modal-head h2,
html[data-theme="dark"] .theme-match-bank .match-bank-modal-form {
    color: #f3f7ff !important;
}

html[data-theme="dark"] .theme-match-bank .reconcile-summary-panel {
    background: rgba(15, 31, 54, 0.94) !important;
    border-color: rgba(95, 128, 171, 0.44) !important;
}

html[data-theme="dark"] .theme-match-bank .reconcile-summary-head {
    background: rgba(26, 50, 82, 0.96) !important;
    color: #f3f7ff !important;
}

html[data-theme="dark"] .theme-match-bank .reconcile-summary-row {
    color: rgba(203, 220, 244, 0.92) !important;
}

html[data-theme="dark"] .theme-match-bank .reconcile-summary-row strong {
    color: #f3f7ff !important;
}

html[data-theme="dark"] .theme-match-bank .reconcile-filter-bar,
html[data-theme="dark"] .theme-match-bank .reconcile-review-toolbar {
    background: rgba(20, 35, 61, 0.92) !important;
    border: 1px solid rgba(95, 128, 171, 0.42) !important;
    border-radius: var(--erp-control-radius);
}

html[data-theme="dark"] .theme-match-bank .reconcile-audit-title,
html[data-theme="dark"] .theme-match-bank .reconcile-filter-side,
html[data-theme="dark"] .theme-match-bank .reconcile-filter-utility {
    color: #e7f0ff !important;
}

html[data-theme="dark"] .theme-match-bank .reconcile-grid-wrap {
    border: 1px solid rgba(95, 128, 171, 0.36) !important;
    background: rgba(11, 23, 43, 0.95) !important;
}

html[data-theme="dark"] .theme-match-bank .reconcile-page-nav,
html[data-theme="dark"] .theme-match-bank .reconcile-page-select {
    background: rgba(14, 27, 48, 0.94) !important;
    border-color: rgba(95, 128, 171, 0.42) !important;
    color: #dceaff !important;
}

html[data-theme="dark"] .theme-match-bank .reconcile-tab-strip {
    border-bottom-color: rgba(95, 128, 171, 0.42) !important;
}

html[data-theme="dark"] .theme-match-bank .reconcile-tab-button {
    color: rgba(173, 194, 223, 0.88) !important;
}

html[data-theme="dark"] .theme-match-bank .reconcile-tab-button:hover,
html[data-theme="dark"] .theme-match-bank .reconcile-tab-button:focus-visible {
    color: #e7f0ff !important;
    background: rgba(28, 45, 74, 0.55) !important;
}

html[data-theme="dark"] .theme-match-bank .reconcile-tab-button.is-active {
    color: #f3f7ff !important;
    border-bottom-color: #2dd4bf !important;
}

html[data-theme="dark"] .audit-shell .audit-stat,
html[data-theme="dark"] .audit-shell .audit-toolbar,
html[data-theme="dark"] .audit-shell .audit-advanced-panel,
html[data-theme="dark"] .audit-shell .audit-filter-grid input,
html[data-theme="dark"] .audit-shell .audit-filter-grid select,
html[data-theme="dark"] .audit-shell .audit-search-input {
    background: rgba(14, 27, 48, 0.92) !important;
    border-color: rgba(95, 128, 171, 0.42) !important;
    color: #f3f7ff !important;
}

html[data-theme="dark"] .audit-shell .audit-stat span,
html[data-theme="dark"] .audit-shell .audit-stat small,
html[data-theme="dark"] .audit-shell .audit-chip-label,
html[data-theme="dark"] .audit-shell .audit-kicker.muted,
html[data-theme="dark"] .audit-shell .audit-search-icon {
    color: rgba(175, 196, 225, 0.88) !important;
}

html[data-theme="dark"] .audit-shell .audit-stat strong,
html[data-theme="dark"] .audit-shell .audit-advanced-panel summary,
html[data-theme="dark"] .audit-shell .audit-filter-grid label {
    color: #f3f7ff !important;
}

html[data-theme="dark"] .audit-shell .audit-advanced-panel[open] summary {
    background: rgba(25, 42, 69, 0.9) !important;
    border-bottom-color: rgba(95, 128, 171, 0.38) !important;
}

html[data-theme="dark"] .audit-offcanvas .audit-event-summary-card,
html[data-theme="dark"] .audit-offcanvas .audit-section-card,
html[data-theme="dark"] .audit-offcanvas .audit-row-card,
html[data-theme="dark"] .audit-offcanvas .audit-field-change,
html[data-theme="dark"] .audit-offcanvas .audit-summary-item,
html[data-theme="dark"] .audit-offcanvas .audit-row-field {
    background: rgba(14, 27, 48, 0.92) !important;
    border-color: rgba(95, 128, 171, 0.42) !important;
}

html[data-theme="dark"] .audit-offcanvas .audit-event-title,
html[data-theme="dark"] .audit-offcanvas .audit-summary-item strong,
html[data-theme="dark"] .audit-offcanvas .audit-row-field strong,
html[data-theme="dark"] .audit-offcanvas .audit-field-values strong,
html[data-theme="dark"] .audit-offcanvas .audit-row-head strong,
html[data-theme="dark"] .audit-offcanvas .audit-section-head h3 {
    color: #f3f7ff !important;
}

html[data-theme="dark"] .audit-offcanvas .audit-event-subtitle,
html[data-theme="dark"] .audit-offcanvas .audit-summary-item span,
html[data-theme="dark"] .audit-offcanvas .audit-row-field span,
html[data-theme="dark"] .audit-offcanvas .audit-field-label,
html[data-theme="dark"] .audit-offcanvas .audit-field-values small,
html[data-theme="dark"] .audit-offcanvas .audit-row-head span,
html[data-theme="dark"] .audit-offcanvas .audit-section-head span {
    color: rgba(175, 196, 225, 0.88) !important;
}

html[data-theme="dark"] .audit-shell .audit-field-values > div,
html[data-theme="dark"] .audit-offcanvas .audit-field-values > div {
    background: rgba(33, 52, 82, 0.9) !important;
    border-color: rgba(95, 128, 171, 0.4) !important;
}

html[data-theme="dark"] .audit-shell .audit-field-values small,
html[data-theme="dark"] .audit-offcanvas .audit-field-values small {
    color: rgba(181, 201, 230, 0.92) !important;
}

html[data-theme="dark"] .audit-shell .audit-field-values strong,
html[data-theme="dark"] .audit-offcanvas .audit-field-values strong {
    color: #f3f7ff !important;
}

html[data-theme="dark"] .bi-rate-preview {
    background: rgba(14, 27, 48, 0.96) !important;
    border-color: rgba(95, 128, 171, 0.42) !important;
    color: #f3f7ff !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .bi-rate-preview-kicker,
html[data-theme="dark"] .bi-rate-preview-meta {
    color: rgba(181, 201, 230, 0.9) !important;
}

html[data-theme="dark"] .bi-rate-preview-trend-up {
    background: rgba(22, 163, 74, 0.35) !important;
    color: #dcfce7 !important;
}

html[data-theme="dark"] .bi-rate-preview-trend-down {
    background: rgba(220, 38, 38, 0.35) !important;
    color: #fee2e2 !important;
}

html[data-theme="dark"] .bi-rate-preview-trend-flat {
    background: rgba(71, 85, 105, 0.48) !important;
    color: #e2e8f0 !important;
}

html[data-theme="dark"] .bi-rate-sidebar-shell {
    background: rgba(10, 21, 39, 0.97) !important;
    border-color: rgba(95, 128, 171, 0.42) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .bi-rate-sidebar-kicker {
    color: #5eead4 !important;
}

html[data-theme="dark"] .bi-rate-sidebar-title {
    color: #f3f7ff !important;
}

html[data-theme="dark"] .bi-rate-sidebar-copy {
    color: rgba(181, 201, 230, 0.88) !important;
}

html[data-theme="dark"] .bi-rate-close {
    background: rgba(39, 57, 87, 0.86) !important;
    color: #e7f0ff !important;
}

html[data-theme="dark"] .bi-rate-form {
    background: rgba(18, 34, 58, 0.94) !important;
    border-color: rgba(95, 128, 171, 0.4) !important;
}

html[data-theme="dark"] .bi-rate-field span {
    color: #dbe9ff !important;
}

html[data-theme="dark"] .bi-rate-field select,
html[data-theme="dark"] .bi-rate-field input {
    background: rgba(12, 25, 46, 0.94) !important;
    border-color: rgba(95, 128, 171, 0.42) !important;
    color: #f3f7ff !important;
}

html[data-theme="dark"] .bi-rate-field select::placeholder,
html[data-theme="dark"] .bi-rate-field input::placeholder {
    color: rgba(173, 194, 223, 0.72) !important;
}

html[data-theme="dark"] .bi-rate-status,
html[data-theme="dark"] .bi-rate-empty {
    background: rgba(20, 78, 61, 0.42) !important;
    color: #ccfbf1 !important;
}

html[data-theme="dark"] .bi-rate-status-error {
    background: rgba(127, 29, 29, 0.45) !important;
    color: #fee2e2 !important;
}

html[data-theme="dark"] .home-forex-toolbar,
html[data-theme="dark"] .home-forex-chart-shell,
html[data-theme="dark"] .home-forex-summary-chip,
html[data-theme="dark"] .home-forex-status,
html[data-theme="dark"] .home-forex-empty {
    border-color: rgba(148, 163, 184, 0.22) !important;
    background: rgba(15, 23, 42, 0.96) !important;
    color: var(--theme-text) !important;
}

html[data-theme="dark"] .home-forex-currency-choice {
    border-color: rgba(148, 163, 184, 0.22) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--theme-text) !important;
}

html[data-theme="dark"] .home-forex-currency-choice:hover,
html[data-theme="dark"] .home-forex-currency-choice:focus-within {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(125, 211, 252, 0.42) !important;
}

html[data-theme="dark"] .home-forex-currency-swatch {
    box-shadow: none !important;
}

html[data-theme="dark"] .home-forex-date {
    border-color: rgba(148, 163, 184, 0.22) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--theme-text) !important;
}

html[data-theme="dark"] .home-forex-date:focus {
    border-color: rgba(125, 211, 252, 0.42) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .home-forex-error {
    border-color: rgba(251, 113, 133, 0.18) !important;
    background: rgba(127, 29, 29, 0.42) !important;
    color: #fecaca !important;
}

html[data-theme="dark"] .home-forex-summary-swatch {
    box-shadow: none !important;
}

html[data-theme="dark"] .home-forex-chart-grid {
    stroke: rgba(148, 163, 184, 0.18) !important;
}

html[data-theme="dark"] .home-forex-chart-axis-label {
    fill: rgba(203, 213, 225, 0.82) !important;
}

html[data-theme="dark"] .home-forex-chart-frame {
    stroke: rgba(148, 163, 184, 0.22) !important;
}

html[data-theme="dark"] .bi-rate-table-wrap {
    background: rgba(11, 23, 43, 0.96) !important;
    border-color: rgba(95, 128, 171, 0.4) !important;
}

html[data-theme="dark"] .bi-rate-table thead th {
    background: rgba(24, 40, 66, 0.96) !important;
    color: rgba(192, 211, 238, 0.9) !important;
    border-bottom-color: rgba(95, 128, 171, 0.34) !important;
}

html[data-theme="dark"] .bi-rate-table tbody td {
    color: #f3f7ff !important;
    border-bottom-color: rgba(95, 128, 171, 0.28) !important;
}

html[data-theme="dark"] .audit-offcanvas .btn-close {
    filter: invert(1) grayscale(100%) brightness(140%);
}

html[data-theme="dark"] .audit-shell .audit-action-badge,
html[data-theme="dark"] .audit-offcanvas .audit-action-badge {
    border: 1px solid transparent;
    text-shadow: none;
}

html[data-theme="dark"] .audit-shell .audit-action-change,
html[data-theme="dark"] .audit-offcanvas .audit-action-change {
    color: #dbeafe !important;
    background: rgba(37, 99, 235, 0.5) !important;
    border-color: rgba(96, 165, 250, 0.55) !important;
}

html[data-theme="dark"] .audit-shell .audit-action-login,
html[data-theme="dark"] .audit-offcanvas .audit-action-login {
    color: #dcfce7 !important;
    background: rgba(22, 163, 74, 0.48) !important;
    border-color: rgba(74, 222, 128, 0.5) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .audit-shell .audit-action-logout,
html[data-theme="dark"] .audit-shell .audit-action-delete,
html[data-theme="dark"] .audit-shell .audit-action-rejected,
html[data-theme="dark"] .audit-offcanvas .audit-action-logout,
html[data-theme="dark"] .audit-offcanvas .audit-action-delete,
html[data-theme="dark"] .audit-offcanvas .audit-action-rejected {
    color: #fee2e2 !important;
    background: rgba(220, 38, 38, 0.45) !important;
    border-color: rgba(248, 113, 113, 0.52) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .theme-customer {
    --theme-accent: #b45309;
    --theme-accent-strong: #92400e;
    --theme-accent-soft: rgba(180, 83, 9, 0.16);
    --accent: var(--theme-accent);
    --accent-strong: var(--theme-accent-strong);
    --accent-soft: var(--theme-accent-soft);
    --bs-primary: #b45309;
    --bs-primary-rgb: 180, 83, 9;
    --hero-start: var(--theme-surface-strong);
    --hero-end: var(--theme-surface-strong);
}

html[data-theme="dark"] .theme-customer .list-hero::after {
    background: rgba(245, 158, 11, 0.1);
}

html[data-theme="dark"] .theme-customer .btn-primary {
    background: var(--theme-accent) !important;
    border-color: transparent !important;
    color: #fff7ed !important;
    box-shadow: none;
}

html[data-theme="dark"] .theme-customer .btn-primary:hover,
html[data-theme="dark"] .theme-customer .btn-primary:focus {
    background: var(--theme-accent) !important;
    border-color: transparent !important;
    color: #fff7ed !important;
    box-shadow: none;
}

html[data-theme="dark"] .theme-customer .action-link {
    background: rgba(180, 83, 9, 0.12);
}

html[data-theme="dark"] .theme-customer .action-link:hover {
    background: rgba(180, 83, 9, 0.18);
    box-shadow: none;
}

html[data-theme="dark"] .theme-employee {
    --theme-accent: #8b5cf6;
    --theme-accent-strong: #6d28d9;
    --theme-accent-soft: rgba(139, 92, 246, 0.14);
    --accent: var(--theme-accent);
    --accent-strong: var(--theme-accent-strong);
    --accent-soft: var(--theme-accent-soft);
    --bs-primary: #8b5cf6;
    --bs-primary-rgb: 139, 92, 246;
    --hero-start: var(--theme-surface-strong);
    --hero-end: var(--theme-surface-strong);
}

html[data-theme="dark"] .theme-employee .list-hero::after {
    background: rgba(139, 92, 246, 0.1);
}

html[data-theme="dark"] .theme-employee .btn-primary {
    background: var(--theme-accent) !important;
    border-color: transparent !important;
    color: #f8fafc !important;
    box-shadow: none;
}

html[data-theme="dark"] .theme-employee .btn-primary:hover,
html[data-theme="dark"] .theme-employee .btn-primary:focus {
    background: var(--theme-accent) !important;
    border-color: transparent !important;
    color: #f8fafc !important;
    box-shadow: none;
}

html[data-theme="dark"] .theme-employee .action-link {
    background: rgba(139, 92, 246, 0.12);
}

html[data-theme="dark"] .theme-employee .action-link:hover {
    background: rgba(139, 92, 246, 0.18);
    box-shadow: none;
}

html[data-theme="dark"] .date-picker,
html[data-theme="dark"] .flatpickr-calendar {
    background: var(--theme-surface-strong);
    color: var(--theme-text);
    border-color: var(--theme-border);
    box-shadow: none;
}

html[data-theme="dark"] .flatpickr-months,
html[data-theme="dark"] .flatpickr-weekdays {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--theme-border);
}

html[data-theme="dark"] .flatpickr-day {
    color: var(--theme-text);
}

html[data-theme="dark"] .flatpickr-day:hover,
html[data-theme="dark"] .flatpickr-day.selected,
html[data-theme="dark"] .flatpickr-day.startRange,
html[data-theme="dark"] .flatpickr-day.endRange {
    background: rgba(125, 211, 252, 0.14);
    border-color: rgba(125, 211, 252, 0.24);
}

/* Dark mode: flyouts, finance command center, notifications, and report shells */
html[data-theme="dark"] .app-dropdown-menu,
html[data-theme="dark"] .app-flyout-menu {
    background: rgba(10, 18, 31, 0.98);
    border-color: var(--theme-border);
    box-shadow: none;
}

html[data-theme="dark"] .app-flyout-layout {
    background: var(--theme-surface-strong);
    box-shadow: none;
}

html[data-theme="dark"] .app-flyout-nav {
    border-right-color: var(--theme-border);
    background: rgba(7, 12, 18, 0.82);
}

html[data-theme="dark"] .app-flyout-trigger {
    color: var(--theme-text);
}

html[data-theme="dark"] .app-flyout-trigger strong,
html[data-theme="dark"] .app-flyout-panel-head strong {
    color: var(--theme-text);
}

html[data-theme="dark"] .app-flyout-trigger small,
html[data-theme="dark"] .app-flyout-panel-note,
html[data-theme="dark"] .app-flyout-panel .dropdown-item small {
    color: var(--theme-text-muted);
}

html[data-theme="dark"] .app-flyout-group:hover .app-flyout-trigger,
html[data-theme="dark"] .app-flyout-group:focus-within .app-flyout-trigger {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: none;
}

html[data-theme="dark"] .app-flyout-group.is-active .app-flyout-trigger {
    border-color: rgba(103, 232, 249, 0.44);
    background: var(--theme-accent);
    box-shadow: none;
    color: #ecfeff;
}

html[data-theme="dark"] .app-flyout-panel {
    background: rgba(10, 18, 31, 0.98);
}

html[data-theme="dark"] .app-flyout-group.is-active .app-flyout-panel {
    background: var(--theme-accent);
}

html[data-theme="dark"] .app-flyout-panel-head {
    border-bottom-color: var(--theme-border);
}

html[data-theme="dark"] .app-flyout-active-chip {
    background: var(--theme-accent);
    border-color: rgba(103, 232, 249, 0.3);
    box-shadow: none;
}

html[data-theme="dark"] .app-flyout-active-chip span {
    color: rgba(226, 232, 240, 0.72);
}

html[data-theme="dark"] .app-flyout-panel .dropdown-item.app-flyout-entry {
    border-color: rgba(148, 163, 184, 0.16);
    background: var(--theme-surface-strong);
    color: var(--theme-text);
}

html[data-theme="dark"] .app-flyout-panel .dropdown-item.app-flyout-entry::before {
    background: rgba(103, 232, 249, 0.28);
}

html[data-theme="dark"] .app-flyout-panel .dropdown-item.app-flyout-entry.is-current {
    background: var(--theme-surface-strong);
    border-color: rgba(103, 232, 249, 0.36);
    box-shadow: none;
}

html[data-theme="dark"] .app-flyout-panel .dropdown-item.app-flyout-entry.is-current::before {
    background: rgba(103, 232, 249, 0.96);
}

html[data-theme="dark"] .app-flyout-panel .dropdown-item.app-flyout-entry:hover,
html[data-theme="dark"] .app-flyout-panel .dropdown-item.app-flyout-entry:focus {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(103, 232, 249, 0.28);
    box-shadow: none;
}

html[data-theme="dark"] .fcc-shell,
html[data-theme="dark"] .notifications-shell,
html[data-theme="dark"] .quick-access-panel {
    --home-bg: var(--theme-bg);
    --home-bg-deep: var(--theme-bg);
    --panel-bg: var(--theme-bg);
    --panel-border: var(--theme-border);
    --panel-shadow: none;
    --text-main: var(--theme-text);
    --text-subtle: var(--theme-text-muted);
    --text-soft: var(--theme-text-muted);
    --accent: var(--theme-accent);
    --accent-soft: var(--theme-accent-soft);
    --accent-teal: #5eead4;
    --accent-teal-soft: rgba(94, 234, 212, 0.12);
    --accent-amber: #fbbf24;
    --accent-amber-soft: rgba(251, 191, 36, 0.12);
    --ok: #4ade80;
    --ok-soft: rgba(74, 222, 128, 0.12);
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, 0.12);
    --hero-start: var(--theme-surface-strong);
    --hero-mid: var(--theme-surface-strong);
    --hero-end: var(--theme-surface-strong);
    --hero-copy: var(--theme-text);
    --hero-border: var(--theme-border);
}

html[data-theme="dark"] .fcc-status-bar {
    background: var(--theme-surface-strong);
    border-color: var(--panel-border);
    box-shadow: none;
    color: var(--text-main);
}

html[data-theme="dark"] .fcc-status-copy,
html[data-theme="dark"] .fcc-status-bar .fcc-inline-label,
html[data-theme="dark"] .fcc-kicker,
html[data-theme="dark"] .fcc-inline-label,
html[data-theme="dark"] .fcc-queue-meta,
html[data-theme="dark"] .fcc-queue-main span,
html[data-theme="dark"] .fcc-empty-note,
html[data-theme="dark"] .fcc-aging-delta-steady,
html[data-theme="dark"] .fcc-aging-list-row small {
    color: var(--text-subtle);
}

html[data-theme="dark"] .fcc-shortcuts-panel,
html[data-theme="dark"] .fcc-queue-panel,
html[data-theme="dark"] .fcc-aging-panel,
html[data-theme="dark"] .fcc-alert-strip {
    border-color: var(--panel-border);
    background: var(--panel-bg);
    box-shadow: none;
}

html[data-theme="dark"] .fcc-panel-head {
    border-bottom-color: var(--panel-border);
}

html[data-theme="dark"] .fcc-panel-head h2,
html[data-theme="dark"] .fcc-queue-main strong,
html[data-theme="dark"] .fcc-aging-head h3,
html[data-theme="dark"] .fcc-aging-total {
    color: var(--text-main);
}

html[data-theme="dark"] .fcc-chip,
html[data-theme="dark"] .fcc-button-secondary,
html[data-theme="dark"] .fcc-button-approve,
html[data-theme="dark"] .fcc-button-reject,
html[data-theme="dark"] .fcc-button {
    border-color: var(--panel-border);
}

html[data-theme="dark"] .fcc-chip-muted {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-subtle);
}

html[data-theme="dark"] .fcc-chip-module {
    background: rgba(125, 211, 252, 0.12);
    color: var(--theme-accent);
}

html[data-theme="dark"] .fcc-chip-urgency-overdue {
    background: rgba(248, 113, 113, 0.14);
    color: var(--danger);
}

html[data-theme="dark"] .fcc-chip-urgency-waiting {
    background: rgba(251, 191, 36, 0.14);
    color: var(--theme-warning);
}

html[data-theme="dark"] .fcc-chip-urgency-in_review {
    background: rgba(125, 211, 252, 0.12);
    color: var(--theme-accent);
}

html[data-theme="dark"] .fcc-inline-select,
html[data-theme="dark"] .fcc-shortcut-item,
html[data-theme="dark"] .fcc-queue-row,
html[data-theme="dark"] .fcc-aging-card,
html[data-theme="dark"] .fcc-aging-tab,
html[data-theme="dark"] .fcc-aging-legend-row,
html[data-theme="dark"] .fcc-aging-list-row {
    border-color: var(--panel-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
}

html[data-theme="dark"] .fcc-inline-select:focus {
    border-color: var(--theme-accent);
    box-shadow: none;
}

html[data-theme="dark"] .fcc-shortcut-item:hover,
html[data-theme="dark"] .fcc-queue-row:hover {
    background: rgba(255, 255, 255, 0.07);
}

html[data-theme="dark"] .fcc-shortcut-link,
html[data-theme="dark"] .fcc-shortcut-handle,
html[data-theme="dark"] .fcc-shortcut-remove {
    color: var(--text-main);
}

html[data-theme="dark"] .fcc-shortcut-link span,
html[data-theme="dark"] .fcc-shortcut-link,
html[data-theme="dark"] .fcc-queue-meta a {
    color: var(--text-subtle);
}

html[data-theme="dark"] .fcc-shortcut-handle {
    color: var(--text-subtle);
}

html[data-theme="dark"] .fcc-shortcut-remove {
    color: var(--danger);
}

html[data-theme="dark"] .fcc-queue-list {
    border-color: var(--panel-border);
    background: var(--theme-surface-strong);
    box-shadow: none;
}

html[data-theme="dark"] .fcc-queue-header {
    background: var(--theme-surface-strong);
    color: var(--text-subtle);
}

html[data-theme="dark"] .fcc-queue-row {
    border-top-color: rgba(148, 163, 184, 0.14);
    background: var(--theme-surface-strong);
}

html[data-theme="dark"] .fcc-queue-row:hover {
    background: var(--theme-surface-strong);
}

html[data-theme="dark"] .fcc-queue-main strong,
html[data-theme="dark"] .fcc-queue-main span,
html[data-theme="dark"] .fcc-queue-module a,
html[data-theme="dark"] .fcc-queue-meta {
    color: var(--text-main);
}

html[data-theme="dark"] .fcc-queue-module a {
    color: var(--theme-accent);
}

html[data-theme="dark"] .fcc-button-approve,
html[data-theme="dark"] .fcc-button-reject,
html[data-theme="dark"] .fcc-button-secondary {
    border-color: var(--panel-border);
}

html[data-theme="dark"] .fcc-button-secondary {
    background: rgba(125, 211, 252, 0.1);
    color: var(--theme-accent);
}

html[data-theme="dark"] .fcc-button-approve {
    background: rgba(74, 222, 128, 0.1);
    color: var(--ok);
}

html[data-theme="dark"] .fcc-button-reject {
    background: rgba(248, 113, 113, 0.1);
    color: var(--danger);
}

html[data-theme="dark"] .fcc-aging-tabs {
    background: rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .fcc-aging-tab.is-active {
    background: rgba(125, 211, 252, 0.12);
    color: var(--text-main);
}

html[data-theme="dark"] .fcc-aging-bar {
    background: rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .fcc-aging-legend-swatch {
    box-shadow: none;
}

html[data-theme="dark"] .fcc-shell .home-panel,
html[data-theme="dark"] .fcc-shell .home-notification-panel,
html[data-theme="dark"] .fcc-shell .pending-card,
html[data-theme="dark"] .fcc-shell .home-bank-summary-strip,
html[data-theme="dark"] .fcc-shell .home-bank-table-wrap {
    border-color: var(--panel-border);
    background: var(--theme-surface-strong);
    box-shadow: none;
}

html[data-theme="dark"] .fcc-shell .home-panel::before,
html[data-theme="dark"] .fcc-shell .home-bank-panel::before {
    background: var(--theme-surface-strong);
}

html[data-theme="dark"] .fcc-shell .home-bank-panel,
html[data-theme="dark"] .fcc-shell .home-bank-panel .home-panel-header,
html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-toolbar,
html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-footer,
html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-summary-strip,
html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-table-wrap {
    color: var(--text-main);
}

html[data-theme="dark"] .fcc-shell .home-bank-panel .home-chip-muted {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.14);
    color: var(--text-subtle);
}

html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-currency-chip {
    background: rgba(125, 211, 252, 0.12);
    color: var(--accent);
}

html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-chip-warning {
    background: rgba(251, 191, 36, 0.12);
    color: var(--accent-amber);
}

html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-heading h2,
html[data-theme="dark"] .fcc-shell .home-bank-panel .home-panel-header h2,
html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-summary-item strong,
html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-table tbody td,
html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-empty,
html[data-theme="dark"] .fcc-shell .home-bank-panel .home-panel-copy,
html[data-theme="dark"] .fcc-shell .home-bank-panel .home-inline-label,
html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-summary-item span,
html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-table thead th,
html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-footer-link {
    color: var(--text-main);
}

html[data-theme="dark"] .fcc-shell .home-bank-panel .home-panel-copy,
html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-summary-item span,
html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-table thead th,
html[data-theme="dark"] .fcc-shell .home-bank-panel .home-inline-label,
html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-empty {
    color: var(--text-subtle);
}

html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-select,
html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-search {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    box-shadow: none;
}

html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-select::placeholder,
html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-search::placeholder {
    color: var(--text-subtle);
}

html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-select:focus,
html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-search:focus {
    border-color: rgba(125, 211, 252, 0.42);
    box-shadow: none;
}

html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-select {
    color-scheme: dark;
}

html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-select option {
    background: var(--theme-surface-strong);
    color: var(--theme-text);
}

html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-select option:checked,
html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-select option:focus,
html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-select option:hover {
    background: rgba(125, 211, 252, 0.16);
    color: var(--theme-text);
}

html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-table thead th {
    background: rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-table tbody td {
    border-top-color: rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.02);
}

html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-row {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(148, 163, 184, 0.14);
}

html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-row:nth-child(even) td {
    background: rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-row:hover td {
    background: rgba(255, 255, 255, 0.07);
}

html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-account-link {
    color: var(--accent);
}

html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-status-healthy {
    background: rgba(74, 222, 128, 0.12);
    color: var(--ok);
}

html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-status-warning {
    background: rgba(251, 191, 36, 0.12);
    color: var(--accent-amber);
}

html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-status-muted {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-subtle);
}

html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-items-link,
html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-footer-link {
    background: rgba(125, 211, 252, 0.1);
    border-color: rgba(125, 211, 252, 0.18);
    color: var(--accent);
}

html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-items-link:hover,
html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-footer-link:hover {
    background: rgba(125, 211, 252, 0.16);
    border-color: rgba(125, 211, 252, 0.28);
}

html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-empty {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.03);
}

html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-toolbar-meta .home-chip-muted {
    background: rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-table-wrap {
    overflow: auto;
}

html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-table-wrap,
html[data-theme="dark"] .fcc-shell .home-bank-panel .home-bank-table {
    color: var(--text-main);
}

html[data-theme="dark"] .notifications-hero,
html[data-theme="dark"] .notifications-focus-panel,
html[data-theme="dark"] .notifications-feed-panel,
html[data-theme="dark"] .notifications-summary-card,
html[data-theme="dark"] .notifications-feed-item {
    border-color: var(--panel-border);
    background: var(--panel-bg);
    box-shadow: none;
}

html[data-theme="dark"] .notifications-hero {
    background: var(--theme-surface-strong);
    color: var(--text-main);
}

html[data-theme="dark"] .notifications-hero h1,
html[data-theme="dark"] .notifications-focus-panel h2,
html[data-theme="dark"] .notifications-feed-header h2,
html[data-theme="dark"] .notifications-summary-card strong,
html[data-theme="dark"] .notifications-feed-topline strong,
html[data-theme="dark"] .notifications-feed-detail {
    color: var(--text-main);
}

html[data-theme="dark"] .notifications-hero p,
html[data-theme="dark"] .notifications-focus-panel p,
html[data-theme="dark"] .notifications-feed-header p,
html[data-theme="dark"] .notifications-feed-message,
html[data-theme="dark"] .notifications-feed-detail-label,
html[data-theme="dark"] .notifications-kicker,
html[data-theme="dark"] .notifications-feed-time {
    color: var(--text-subtle);
}

html[data-theme="dark"] .notifications-summary-card span,
html[data-theme="dark"] .notifications-feed-counts span,
html[data-theme="dark"] .notifications-feed-module,
html[data-theme="dark"] .notifications-feed-status,
html[data-theme="dark"] .notifications-primary-link,
html[data-theme="dark"] .notifications-feed-link {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--panel-border);
    color: var(--text-main);
}

html[data-theme="dark"] .notifications-summary-card.is-unread {
    background: rgba(125, 211, 252, 0.08);
    border-color: rgba(125, 211, 252, 0.22);
}

html[data-theme="dark"] .notifications-feed-item.is-unread {
    background: var(--theme-surface-strong);
    box-shadow: none;
}

html[data-theme="dark"] .app-notification-list::-webkit-scrollbar-track {
    background: rgba(148, 163, 184, 0.12);
}

html[data-theme="dark"] .app-notification-list::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.42);
}

html[data-theme="dark"] .app-notification-list::-webkit-scrollbar-thumb:hover {
    background: rgba(125, 211, 252, 0.72);
}

html[data-theme="dark"] .app-notification-item {
    border-color: rgba(148, 163, 184, 0.18);
    background: var(--theme-surface-strong);
    color: var(--text-main);
    box-shadow: none;
}

html[data-theme="dark"] .app-notification-item:hover,
html[data-theme="dark"] .app-notification-item:focus,
html[data-theme="dark"] .app-notification-item:focus-visible {
    background: var(--theme-surface-strong);
    border-color: rgba(125, 211, 252, 0.22);
    box-shadow: none;
}

html[data-theme="dark"] .app-notification-item.is-unread {
    border-color: rgba(125, 211, 252, 0.28);
    background: var(--theme-surface-strong);
    box-shadow: none;
}

html[data-theme="dark"] .app-notification-item-copy strong,
html[data-theme="dark"] .app-notification-item-module,
html[data-theme="dark"] .app-notification-item-detail,
html[data-theme="dark"] .app-notification-item-detail strong {
    color: var(--text-main);
}

html[data-theme="dark"] .app-notification-item-detail-label,
html[data-theme="dark"] .app-notification-item-detail-separator,
html[data-theme="dark"] .app-notification-item-copy small,
html[data-theme="dark"] .app-notification-item time {
    color: var(--text-subtle);
}

html[data-theme="dark"] .app-notification-clear-btn {
    border-color: rgba(248, 113, 113, 0.28);
    background: rgba(15, 23, 42, 0.96);
    color: #fca5a5;
    box-shadow: none;
}

html[data-theme="dark"] .app-notification-clear-btn:hover,
html[data-theme="dark"] .app-notification-clear-btn:focus-visible {
    border-color: rgba(248, 113, 113, 0.5);
    background: rgba(127, 29, 29, 0.26);
    box-shadow: none;
}

html[data-theme="dark"] .app-notification-unread-pill {
    background: rgba(248, 113, 113, 0.16);
    color: #fca5a5;
}

html[data-theme="dark"] .app-notification-empty {
    border-color: rgba(148, 163, 184, 0.24);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-subtle);
}

html[data-theme="dark"] .app-notification-view-all {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
}

html[data-theme="dark"] .app-notification-view-all:hover,
html[data-theme="dark"] .app-notification-view-all:focus-visible {
    border-color: rgba(125, 211, 252, 0.24);
    background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .notifications-feed-empty {
    border-color: rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-subtle);
}

html[data-theme="dark"] .quick-access-panel,
html[data-theme="dark"] .quick-access-manager,
html[data-theme="dark"] .quick-access-item {
    border-color: var(--panel-border);
    background: var(--panel-bg);
    color: var(--text-main);
}

html[data-theme="dark"] .quick-access-panel::before {
    background: var(--theme-surface-strong);
}

html[data-theme="dark"] .quick-access-manager-head,
html[data-theme="dark"] .quick-access-item,
html[data-theme="dark"] .quick-access-status,
html[data-theme="dark"] .quick-access-footnote {
    color: var(--text-subtle);
}

html[data-theme="dark"] .quick-access-add-select,
html[data-theme="dark"] .quick-access-add-button,
html[data-theme="dark"] .quick-access-remove,
html[data-theme="dark"] .quick-access-handle {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--panel-border);
    color: var(--text-main);
}

html[data-theme="dark"] .quick-access-add-select:focus {
    border-color: var(--theme-accent);
    box-shadow: none;
}

html[data-theme="dark"] .quick-access-item:hover,
html[data-theme="dark"] .quick-access-item:focus-within {
    border-color: rgba(125, 211, 252, 0.24);
    background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .quick-access-link strong,
html[data-theme="dark"] .quick-access-link {
    color: var(--text-main);
}

html[data-theme="dark"] .quick-access-link span {
    color: var(--text-subtle);
}

html[data-theme="dark"] .theme-trial-balance {
    --accent: var(--theme-accent);
    --accent-strong: var(--theme-accent-strong);
    --accent-soft: var(--theme-accent-soft);
    --accent-faint: var(--theme-accent-soft);
    --tb-line: var(--theme-border);
    --tb-header: rgba(255, 255, 255, 0.04);
    --hero-start: var(--theme-surface-strong);
    --hero-end: var(--theme-surface-strong);
}

html[data-theme="dark"] .theme-trial-balance .list-hero {
    background: var(--theme-surface-strong);
}

html[data-theme="dark"] .theme-trial-balance .tb-filter-panel,
html[data-theme="dark"] .theme-trial-balance .tb-alert,
html[data-theme="dark"] .theme-trial-balance .tb-reconcile-card,
html[data-theme="dark"] .theme-trial-balance .tb-table-head,
html[data-theme="dark"] .theme-trial-balance .tb-detail-summary span {
    border-color: var(--tb-line);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: none;
}

html[data-theme="dark"] .theme-trial-balance .tb-filter-panel {
    background: var(--theme-surface-strong);
}

html[data-theme="dark"] .theme-trial-balance .tb-filter-intro strong,
html[data-theme="dark"] .theme-trial-balance .tb-reconcile-head h2,
html[data-theme="dark"] .theme-trial-balance .tb-table-head h2,
html[data-theme="dark"] .theme-trial-balance .tb-detail-summary strong,
html[data-theme="dark"] .theme-trial-balance .tb-table .td-currency,
html[data-theme="dark"] .theme-trial-balance .tb-table .td-mono {
    color: var(--theme-text);
}

html[data-theme="dark"] .theme-trial-balance .tb-filter-intro small,
html[data-theme="dark"] .theme-trial-balance .tb-inline-note,
html[data-theme="dark"] .theme-trial-balance .tb-alert,
html[data-theme="dark"] .theme-trial-balance .tb-reconcile-note span,
html[data-theme="dark"] .theme-trial-balance .tb-reconcile-note small,
html[data-theme="dark"] .theme-trial-balance .tb-reconcile-ok,
html[data-theme="dark"] .theme-trial-balance .tb-detail-summary small,
html[data-theme="dark"] .theme-trial-balance .td-empty {
    color: var(--theme-text-muted);
}

html[data-theme="dark"] .theme-trial-balance .tb-filter-grid select {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--tb-line);
    color: var(--theme-text);
}

html[data-theme="dark"] .theme-trial-balance .tb-filter-grid select:focus {
    border-color: var(--theme-accent);
    box-shadow: none;
    background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .theme-trial-balance .tb-table-card {
    border-color: var(--tb-line);
    background: rgba(15, 23, 42, 0.92);
    box-shadow: none;
}

html[data-theme="dark"] .theme-trial-balance .tb-table-head {
    background: var(--theme-surface-strong);
}

html[data-theme="dark"] .theme-trial-balance .tb-table thead th {
    background: rgba(255, 255, 255, 0.04);
    border-bottom-color: var(--tb-line);
    color: var(--theme-text-muted);
}

html[data-theme="dark"] .theme-trial-balance .tb-table tbody td {
    border-bottom-color: rgba(148, 163, 184, 0.12);
    color: var(--theme-text);
}

html[data-theme="dark"] .theme-trial-balance .tb-table tbody tr:nth-child(even):not(.tb-total-row) {
    background: rgba(255, 255, 255, 0.03);
}

html[data-theme="dark"] .theme-trial-balance .tb-table tbody tr:hover:not(.tb-total-row) {
    background: rgba(125, 211, 252, 0.08);
}

html[data-theme="dark"] .theme-trial-balance .tb-total-row td {
    background: rgba(125, 211, 252, 0.08);
    border-top-color: rgba(125, 211, 252, 0.2);
}

html[data-theme="dark"] .theme-trial-balance .tb-reconcile-status,
html[data-theme="dark"] .theme-trial-balance .tb-reconcile-chip,
html[data-theme="dark"] .theme-trial-balance .tb-reconcile-grid span {
    background: rgba(125, 211, 252, 0.1);
    color: var(--theme-text);
}

html[data-theme="dark"] .theme-trial-balance .tb-amount-link,
html[data-theme="dark"] .theme-trial-balance .tb-document-link {
    border-bottom-color: rgba(125, 211, 252, 0.34);
    color: var(--theme-accent);
}

html[data-theme="dark"] .theme-balance-sheet {
    --accent: var(--theme-accent);
    --accent-strong: var(--theme-accent-strong);
    --accent-soft: var(--theme-accent-soft);
    --bs-line: rgba(95, 128, 171, 0.36);
    --bs-header: rgba(24, 40, 66, 0.96);
}

html[data-theme="dark"] .theme-balance-sheet .bs-filter-panel,
html[data-theme="dark"] .theme-balance-sheet .bs-alert,
html[data-theme="dark"] .theme-balance-sheet .bs-reconcile-card,
html[data-theme="dark"] .theme-balance-sheet .bs-table-head,
html[data-theme="dark"] .theme-balance-sheet .bs-detail-summary span {
    background: rgba(14, 27, 48, 0.92) !important;
    border-color: rgba(95, 128, 171, 0.4) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .theme-balance-sheet .bs-filter-grid label > span,
html[data-theme="dark"] .theme-balance-sheet .bs-inline-note,
html[data-theme="dark"] .theme-balance-sheet .bs-reconcile-note span,
html[data-theme="dark"] .theme-balance-sheet .bs-reconcile-note small,
html[data-theme="dark"] .theme-balance-sheet .bs-detail-summary small,
html[data-theme="dark"] .theme-balance-sheet .td-empty {
    color: rgba(175, 196, 225, 0.88) !important;
}

html[data-theme="dark"] .theme-balance-sheet .bs-table-head h2,
html[data-theme="dark"] .theme-balance-sheet .bs-reconcile-head h2,
html[data-theme="dark"] .theme-balance-sheet .bs-reconcile-grid strong,
html[data-theme="dark"] .theme-balance-sheet .bs-detail-summary strong,
html[data-theme="dark"] .theme-balance-sheet .bs-row-label,
html[data-theme="dark"] .theme-balance-sheet .bs-table .td-currency,
html[data-theme="dark"] .theme-balance-sheet .bs-table .td-mono {
    color: #f3f7ff !important;
}

html[data-theme="dark"] .theme-balance-sheet .bs-filter-grid select {
    background: rgba(12, 25, 46, 0.94) !important;
    border-color: rgba(95, 128, 171, 0.42) !important;
    color: #f3f7ff !important;
}

html[data-theme="dark"] .theme-balance-sheet .bs-table-card {
    border-color: rgba(95, 128, 171, 0.4) !important;
    background: rgba(11, 23, 43, 0.96) !important;
}

html[data-theme="dark"] .theme-balance-sheet .bs-table thead th,
html[data-theme="dark"] .theme-balance-sheet .bs-table thead th.bs-sticky-col {
    background: rgba(24, 40, 66, 0.96) !important;
    color: rgba(192, 211, 238, 0.9) !important;
    border-bottom-color: rgba(95, 128, 171, 0.34) !important;
}

html[data-theme="dark"] .theme-balance-sheet .bs-table tbody td,
html[data-theme="dark"] .theme-balance-sheet .bs-table tbody .bs-sticky-col {
    background: rgba(12, 24, 46, 0.86) !important;
    color: #f3f7ff !important;
    border-bottom-color: rgba(95, 128, 171, 0.28) !important;
}

html[data-theme="dark"] .theme-balance-sheet .bs-table tbody tr:nth-child(even):not(.bs-row-grand_total):not(.bs-row-section) td,
html[data-theme="dark"] .theme-balance-sheet .bs-table tbody tr:nth-child(even):not(.bs-row-grand_total):not(.bs-row-section) .bs-sticky-col {
    background: rgba(16, 30, 56, 0.9) !important;
}

html[data-theme="dark"] .theme-balance-sheet .bs-row-section td,
html[data-theme="dark"] .theme-balance-sheet .bs-row-section .bs-sticky-col,
html[data-theme="dark"] .theme-balance-sheet .bs-row-subsection td,
html[data-theme="dark"] .theme-balance-sheet .bs-row-total td,
html[data-theme="dark"] .theme-balance-sheet .bs-row-grand_total td {
    background: rgba(26, 43, 72, 0.94) !important;
}

html[data-theme="dark"] .theme-balance-sheet .bs-table thead .bs-section-kicker,
html[data-theme="dark"] .theme-balance-sheet .bs-table-count,
html[data-theme="dark"] .theme-balance-sheet .bs-row-toggle,
html[data-theme="dark"] .theme-balance-sheet .bs-reconcile-chip,
html[data-theme="dark"] .theme-balance-sheet .bs-reconcile-status {
    color: #dbe9ff !important;
}

html[data-theme="dark"] .theme-balance-sheet .bs-amount-link,
html[data-theme="dark"] .theme-balance-sheet .bs-document-link {
    color: #a7f3d0 !important;
    border-bottom-color: rgba(167, 243, 208, 0.45) !important;
}

html[data-theme="dark"] .theme-profit-loss {
    --accent: var(--theme-accent);
    --accent-strong: var(--theme-accent-strong);
    --accent-soft: var(--theme-accent-soft);
    --pl-line: var(--theme-border);
    --pl-header: rgba(24, 40, 66, 0.96);
}

html[data-theme="dark"] .theme-profit-loss .pl-filter-panel,
html[data-theme="dark"] .theme-profit-loss .pl-alert,
html[data-theme="dark"] .theme-profit-loss .pl-reconcile-card,
html[data-theme="dark"] .theme-profit-loss .pl-table-head,
html[data-theme="dark"] .theme-profit-loss .pl-detail-summary span,
html[data-theme="dark"] .theme-profit-loss .pl-editor-panel {
    background: rgba(14, 27, 48, 0.92) !important;
    border-color: rgba(95, 128, 171, 0.4) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .theme-profit-loss .pl-filter-grid label > span,
html[data-theme="dark"] .theme-profit-loss .pl-inline-note,
html[data-theme="dark"] .theme-profit-loss .pl-reconcile-note span,
html[data-theme="dark"] .theme-profit-loss .pl-reconcile-note small,
html[data-theme="dark"] .theme-profit-loss .pl-reconcile-ok,
html[data-theme="dark"] .theme-profit-loss .pl-detail-summary small,
html[data-theme="dark"] .theme-profit-loss .td-empty {
    color: rgba(175, 196, 225, 0.88) !important;
}

html[data-theme="dark"] .theme-profit-loss .pl-table-head h2,
html[data-theme="dark"] .theme-profit-loss .pl-editor-panel h2,
html[data-theme="dark"] .theme-profit-loss .pl-reconcile-head h2,
html[data-theme="dark"] .theme-profit-loss .pl-reconcile-grid strong,
html[data-theme="dark"] .theme-profit-loss .pl-row-label,
html[data-theme="dark"] .theme-profit-loss .pl-table .td-currency,
html[data-theme="dark"] .theme-profit-loss .pl-table .td-percent,
html[data-theme="dark"] .theme-profit-loss .pl-table .td-mono,
html[data-theme="dark"] .theme-profit-loss .pl-detail-summary strong {
    color: #f3f7ff !important;
}

html[data-theme="dark"] .theme-profit-loss .pl-filter-grid select,
html[data-theme="dark"] .theme-profit-loss .pl-filter-grid input,
html[data-theme="dark"] .theme-profit-loss .pl-editor-panel select,
html[data-theme="dark"] .theme-profit-loss .pl-editor-panel input,
html[data-theme="dark"] .theme-profit-loss .pl-editor-panel textarea {
    background: rgba(12, 25, 46, 0.94) !important;
    border-color: rgba(95, 128, 171, 0.42) !important;
    color: #f3f7ff !important;
}

html[data-theme="dark"] .theme-profit-loss .pl-table-card {
    border-color: rgba(95, 128, 171, 0.4) !important;
    background: rgba(11, 23, 43, 0.96) !important;
}

html[data-theme="dark"] .theme-profit-loss .pl-table thead th,
html[data-theme="dark"] .theme-profit-loss .pl-table thead th.pl-sticky-col {
    background: rgba(24, 40, 66, 0.96) !important;
    color: rgba(192, 211, 238, 0.9) !important;
    border-bottom-color: rgba(95, 128, 171, 0.34) !important;
}

html[data-theme="dark"] .theme-profit-loss .pl-table tbody td,
html[data-theme="dark"] .theme-profit-loss .pl-table tbody .pl-sticky-col {
    background: rgba(12, 24, 46, 0.86) !important;
    color: #f3f7ff !important;
    border-bottom-color: rgba(95, 128, 171, 0.28) !important;
}

html[data-theme="dark"] .theme-profit-loss .pl-table tbody tr:nth-child(even):not(.pl-row-total):not(.pl-row-header) td,
html[data-theme="dark"] .theme-profit-loss .pl-table tbody tr:nth-child(even):not(.pl-row-total):not(.pl-row-header) .pl-sticky-col {
    background: rgba(16, 30, 56, 0.9) !important;
}

html[data-theme="dark"] .theme-profit-loss .pl-row-header td,
html[data-theme="dark"] .theme-profit-loss .pl-row-header .pl-sticky-col,
html[data-theme="dark"] .theme-profit-loss .pl-row-formula td,
html[data-theme="dark"] .theme-profit-loss .pl-row-subtotal td,
html[data-theme="dark"] .theme-profit-loss .pl-row-total td {
    background: rgba(26, 43, 72, 0.94) !important;
}

html[data-theme="dark"] .theme-profit-loss .pl-amount-link,
html[data-theme="dark"] .theme-profit-loss .pl-document-link {
    color: #a7f3d0 !important;
    border-bottom-color: rgba(167, 243, 208, 0.45) !important;
}

html[data-theme="dark"] body.theme-custom-financial-report {
    color: var(--theme-text);
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-hero {
    background: var(--theme-bg) !important;
    border-color: rgba(148, 163, 184, 0.18) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-hero::before {
    opacity: 0.18;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-hero::after {
    background: rgba(45, 212, 191, 0.08) !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-list-surface {
    background: var(--theme-bg) !important;
    border-color: rgba(148, 163, 184, 0.16) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-context-bar,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-toolbar,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-filter-bar,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-table-card,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-report-card,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-structure-panel,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-config-panel,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-empty-state,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-subpanel,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-row-item,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-section-card,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-standalone-row-card,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-column-card,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-filter-card {
    background: rgba(15, 23, 42, 0.9) !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-context-bar,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-filter-bar,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-subpanel,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-detail-table-head {
    background: var(--theme-bg) !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-context-item strong,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-list-title-row strong,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-item-title strong,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-row-label strong,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-panel-head h2,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-subpanel-head h3,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-config-head h2,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-detail-table-head h2,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-empty-state h2,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-config-empty,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-report-table .pl-row-label,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-report-table .td-currency,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-report-table .td-mono {
    color: var(--theme-text) !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-context-label,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-panel-kicker,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-toolbar-field span,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-config-field span,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-filter-field span,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-toolbar-note,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-panel-note,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-subpanel-head p,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-toggle-note,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-item-meta,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-row-meta,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-empty-state p,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-column-head span,
html[data-theme="dark"] body.theme-custom-financial-report .td-empty {
    color: var(--theme-text-muted) !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-edit-page .cfr-panel-kicker,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-edit-page .cfr-toolbar-field span,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-edit-page .cfr-config-field span,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-edit-page .cfr-filter-field span,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-edit-page .cfr-panel-note,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-edit-page .cfr-subpanel-head p,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-edit-page .cfr-toggle-note,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-edit-page .cfr-item-meta,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-edit-page .cfr-row-meta {
    color: #b7c7db !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-edit-page .cfr-badge {
    background: rgba(51, 65, 85, 0.9) !important;
    color: #9fb6d1 !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-edit-page .cfr-badge.is-positive {
    background: rgba(20, 83, 45, 0.38) !important;
    color: #86efac !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-edit-page .cfr-badge.is-warning {
    background: rgba(120, 53, 15, 0.42) !important;
    color: #fbbf24 !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-default-badge {
    background: rgba(74, 222, 128, 0.14) !important;
    color: #86efac !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-status-pill,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-detail-table-count,
html[data-theme="dark"] body.theme-custom-financial-report .pl-table-count {
    background: rgba(148, 163, 184, 0.12) !important;
    color: #d7e2f0 !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-config-kind {
    background: rgba(45, 212, 191, 0.14) !important;
    color: #99f6e4 !important;
}

html[data-theme="dark"] body.theme-custom-financial-report input.form-control,
html[data-theme="dark"] body.theme-custom-financial-report input.form-select,
html[data-theme="dark"] body.theme-custom-financial-report select.form-select,
html[data-theme="dark"] body.theme-custom-financial-report textarea.form-control,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-filter-field input,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-filter-field select,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-drag-handle,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-row-action-button,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-reference-list button,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-toolbar-toggle,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-config-check,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-negate-toggle,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-config-empty {
    background: rgba(30, 41, 59, 0.9) !important;
    border-color: rgba(148, 163, 184, 0.22) !important;
    color: var(--theme-text) !important;
}

html[data-theme="dark"] body.theme-custom-financial-report input.form-control::placeholder,
html[data-theme="dark"] body.theme-custom-financial-report textarea.form-control::placeholder {
    color: var(--theme-text-muted) !important;
}

html[data-theme="dark"] body.theme-custom-financial-report input.form-control:focus,
html[data-theme="dark"] body.theme-custom-financial-report input.form-select:focus,
html[data-theme="dark"] body.theme-custom-financial-report select.form-select:focus,
html[data-theme="dark"] body.theme-custom-financial-report textarea.form-control:focus,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-filter-field input:focus,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-filter-field select:focus {
    border-color: rgba(45, 212, 191, 0.4) !important;
    box-shadow: none !important;
    background: rgba(30, 41, 59, 0.96) !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .btn-outline-secondary {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(148, 163, 184, 0.22) !important;
    color: var(--theme-text) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .btn-outline-secondary:hover,
html[data-theme="dark"] body.theme-custom-financial-report .btn-outline-secondary:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(148, 163, 184, 0.32) !important;
    color: var(--theme-text) !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .btn-outline-danger,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-action-btn-danger {
    background: rgba(248, 113, 113, 0.08) !important;
    border-color: rgba(248, 113, 113, 0.22) !important;
    color: #fecaca !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .btn-outline-danger:hover,
html[data-theme="dark"] body.theme-custom-financial-report .btn-outline-danger:focus,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-action-btn-danger:hover,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-action-btn-danger:focus {
    background: rgba(248, 113, 113, 0.14) !important;
    border-color: rgba(248, 113, 113, 0.3) !important;
    color: #fee2e2 !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-detail-summary span {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(148, 163, 184, 0.18) !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-detail-summary small {
    color: var(--theme-text-muted) !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-detail-summary strong {
    color: var(--theme-text) !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-table-card .table-scroll,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-report-card .table-scroll {
    background: rgba(11, 23, 43, 0.98) !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-list-page .cfr-table thead th,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-report-table thead th,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-report-table thead th.pl-sticky-col {
    background: rgba(24, 40, 66, 0.96) !important;
    color: rgba(192, 211, 238, 0.9) !important;
    border-bottom-color: rgba(95, 128, 171, 0.34) !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-list-page .cfr-table tbody td,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-report-table tbody td,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-report-table tbody .pl-sticky-col {
    background: rgba(12, 24, 46, 0.86) !important;
    color: var(--theme-text) !important;
    border-bottom-color: rgba(95, 128, 171, 0.26) !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-list-page .cfr-table tbody tr,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-list-page .cfr-table tbody td.text-end {
    background: rgba(12, 24, 46, 0.86) !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-list-page .cfr-table tbody td strong,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-list-page .cfr-table tbody td a,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-list-page .cfr-table tbody td span,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-list-page .cfr-table tbody td form,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-list-page .cfr-table tbody td form button {
    color: inherit !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-list-page .cfr-table tbody tr:nth-child(even) td,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-report-table tbody tr:nth-child(even):not(.pl-row-total):not(.pl-row-header) td,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-report-table tbody tr:nth-child(even):not(.pl-row-total):not(.pl-row-header) .pl-sticky-col {
    background: rgba(16, 30, 56, 0.9) !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-list-page .cfr-table tbody tr:hover td,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-report-table tbody tr:hover:not(.pl-row-header):not(.pl-row-total) td,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-report-table tbody tr:hover:not(.pl-row-header):not(.pl-row-total) .pl-sticky-col {
    background: rgba(25, 47, 74, 0.92) !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-list-page .cfr-table tbody tr:hover,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-list-page .cfr-table tbody tr:hover td.text-end {
    background: rgba(25, 47, 74, 0.92) !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-report-table .pl-row-header td,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-report-table .pl-row-header .pl-sticky-col,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-report-table .pl-row-formula td,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-report-table .pl-row-total td,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-report-table .cfr-subtotal-row td {
    background: rgba(26, 43, 72, 0.94) !important;
    color: var(--theme-text) !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-report-table .cfr-account-detail-row td {
    background: rgba(13, 27, 50, 0.9) !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-report-table .cfr-row-label-detail .pl-row-label,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-document-link,
html[data-theme="dark"] body.theme-custom-financial-report .pl-amount-link {
    color: #a7f3d0 !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-document-link,
html[data-theme="dark"] body.theme-custom-financial-report .pl-amount-link {
    border-bottom-color: rgba(167, 243, 208, 0.45) !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-list-page .cfr-action-btn {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(148, 163, 184, 0.22) !important;
    color: var(--theme-text) !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-list-page .cfr-action-btn:hover,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-list-page .cfr-action-btn:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(148, 163, 184, 0.3) !important;
    color: var(--theme-text) !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-list-page .cfr-action-btn:disabled,
html[data-theme="dark"] body.theme-custom-financial-report .cfr-list-page .cfr-action-btn.disabled {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(148, 163, 184, 0.16) !important;
    color: rgba(148, 163, 184, 0.7) !important;
    opacity: 1 !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-scroll-arrow {
    background: rgba(15, 23, 42, 0.96) !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
    color: #99f6e4 !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-scroll-arrow:hover:not(:disabled),
html[data-theme="dark"] body.theme-custom-financial-report .cfr-scroll-arrow:focus-visible:not(:disabled) {
    background: rgba(30, 41, 59, 0.98) !important;
    border-color: rgba(45, 212, 191, 0.32) !important;
}

html[data-theme="dark"] body.theme-custom-financial-report .cfr-negative {
    color: #fca5a5 !important;
}

html[data-theme="dark"] .theme-gl {
    --accent: var(--theme-accent);
    --accent-strong: var(--theme-accent-strong);
    --accent-soft: var(--theme-accent-soft);
}

html[data-theme="dark"] .theme-gl .gl-stat-card,
html[data-theme="dark"] .theme-gl .gl-snapshot-card,
html[data-theme="dark"] .theme-gl .gl-period-filter-row {
    background: rgba(14, 27, 48, 0.92) !important;
    border-color: rgba(95, 128, 171, 0.42) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .theme-gl .gl-stat-card strong,
html[data-theme="dark"] .theme-gl .gl-totals-quick span,
html[data-theme="dark"] .theme-gl .gl-snapshot-value,
html[data-theme="dark"] .theme-gl .gl-coa-cell strong,
html[data-theme="dark"] .theme-gl .gl-memo-cell {
    color: #f3f7ff !important;
}

html[data-theme="dark"] .theme-gl .gl-stat-note,
html[data-theme="dark"] .theme-gl .gl-snapshot-label,
html[data-theme="dark"] .theme-gl .gl-snapshot-note,
html[data-theme="dark"] .theme-gl .gl-filter-grid label,
html[data-theme="dark"] .theme-gl .gl-filter-grid span,
html[data-theme="dark"] .theme-gl .gl-period-filter-row label,
html[data-theme="dark"] .theme-gl .gl-period-filter-row span,
html[data-theme="dark"] .theme-gl .gl-coa-cell span {
    color: rgba(175, 196, 225, 0.9) !important;
}

html[data-theme="dark"] .theme-gl .gl-filter-grid input,
html[data-theme="dark"] .theme-gl .gl-filter-grid select,
html[data-theme="dark"] .theme-gl .gl-period-filter-row input,
html[data-theme="dark"] .theme-gl .gl-period-filter-row select {
    background: rgba(12, 25, 46, 0.94) !important;
    border-color: rgba(95, 128, 171, 0.42) !important;
    color: #f3f7ff !important;
}

html[data-theme="dark"] .theme-gl .gl-table-card {
    border-color: rgba(95, 128, 171, 0.42) !important;
    background: rgba(11, 23, 43, 0.96) !important;
}

html[data-theme="dark"] .theme-gl .gl-source-pill {
    color: #d9fffb !important;
    background: rgba(20, 184, 166, 0.2) !important;
    border-color: rgba(45, 212, 191, 0.44) !important;
}

html[data-theme="dark"] .ap-aging-report-table .ap-aging-total-row td,
html[data-theme="dark"] .ar-aging-report-table .ar-aging-total-row td {
    background: rgba(26, 43, 72, 0.96) !important;
    color: #f3f7ff !important;
    border-top-color: rgba(95, 128, 171, 0.42) !important;
}

html[data-theme="dark"] .ap-aging-report-table .ap-aging-total-row .td-currency,
html[data-theme="dark"] .ar-aging-report-table .ar-aging-total-row .td-currency {
    color: #c7f9ff !important;
}

html[data-theme="dark"] .system-information-card,
html[data-theme="dark"] .system-information-history-card,
html[data-theme="dark"] .system-information-entry,
html[data-theme="dark"] .system-information-summary-item,
html[data-theme="dark"] .system-information-legend,
html[data-theme="dark"] .system-information-table-wrap,
html[data-theme="dark"] .system-information-empty-state {
    background: rgba(14, 27, 48, 0.92) !important;
    border-color: rgba(95, 128, 171, 0.42) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .system-information-kicker,
html[data-theme="dark"] .system-information-section-kicker,
html[data-theme="dark"] .system-information-summary-item span,
html[data-theme="dark"] .system-information-block-head span,
html[data-theme="dark"] .system-information-child-group-head span,
html[data-theme="dark"] .system-information-entry-meta span,
html[data-theme="dark"] .system-information-section-count,
html[data-theme="dark"] .system-information-change-table thead th,
html[data-theme="dark"] .system-information-local-datetime {
    color: rgba(192, 211, 238, 0.95) !important;
}

html[data-theme="dark"] .system-information-title,
html[data-theme="dark"] .system-information-section-title,
html[data-theme="dark"] .system-information-summary-item strong,
html[data-theme="dark"] .system-information-entry-copy strong,
html[data-theme="dark"] .system-information-child-row-head strong,
html[data-theme="dark"] .system-information-block-head strong,
html[data-theme="dark"] .system-information-child-group-head strong,
html[data-theme="dark"] .system-information-child-subgroup h5,
html[data-theme="dark"] .system-information-empty-state strong,
html[data-theme="dark"] .system-information-change-table td:first-child {
    color: #f3f7ff !important;
}

html[data-theme="dark"] .system-information-copy,
html[data-theme="dark"] .system-information-section-copy,
html[data-theme="dark"] .system-information-legend-note,
html[data-theme="dark"] .system-information-summary-item small,
html[data-theme="dark"] .system-information-entry-copy span,
html[data-theme="dark"] .system-information-child-row-head span,
html[data-theme="dark"] .system-information-empty-state p,
html[data-theme="dark"] .system-information-change-table td:nth-child(2),
html[data-theme="dark"] .system-information-change-table td:nth-child(3) {
    color: rgba(181, 201, 230, 0.9) !important;
}

html[data-theme="dark"] .system-information-entry[open] summary {
    background: rgba(25, 42, 69, 0.92) !important;
    border-bottom-color: rgba(95, 128, 171, 0.38) !important;
}

html[data-theme="dark"] .system-information-change-table th,
html[data-theme="dark"] .system-information-change-table td {
    border-bottom-color: rgba(95, 128, 171, 0.3) !important;
}

html[data-theme="dark"] .system-information-change-table thead th {
    background: rgba(24, 40, 66, 0.98) !important;
    color: rgba(205, 222, 245, 0.98) !important;
    border-bottom-color: rgba(95, 128, 171, 0.38) !important;
}

html[data-theme="dark"] .system-information-change-table tbody td {
    background: rgba(12, 24, 46, 0.9) !important;
    color: #f3f7ff !important;
}

/* Dark mode: shared detail page surfaces and note blocks */
html[data-theme="dark"] .readonly-note,
html[data-theme="dark"] .detail-card,
html[data-theme="dark"] .detail-item,
html[data-theme="dark"] .detail-item-wide,
html[data-theme="dark"] .description-note-card,
html[data-theme="dark"] .description-card,
html[data-theme="dark"] .note-card {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: var(--theme-border) !important;
    color: var(--theme-text);
}

html[data-theme="dark"] .auto-generated,
html[data-theme="dark"] .detail-value,
html[data-theme="dark"] .description-text,
html[data-theme="dark"] .note-list,
html[data-theme="dark"] .note-list li,
html[data-theme="dark"] .description-note-card p {
    color: var(--theme-text) !important;
}

html[data-theme="dark"] .field-label,
html[data-theme="dark"] .detail-label,
html[data-theme="dark"] .note-title,
html[data-theme="dark"] .description-eyebrow {
    color: var(--theme-text-muted) !important;
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .detail-input,
html[data-theme="dark"] .detail-select,
html[data-theme="dark"] .detail-textarea {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: var(--theme-border) !important;
    color: var(--theme-text) !important;
}

html[data-theme="dark"] .form-control::placeholder,
html[data-theme="dark"] .detail-input::placeholder,
html[data-theme="dark"] .detail-textarea::placeholder {
    color: var(--theme-text-muted) !important;
}

html[data-theme="dark"] .description-note-card::before,
html[data-theme="dark"] .description-card::before {
    background: var(--theme-surface-strong) !important;
}

/* Dark mode: accounting period list and detail pages */
html[data-theme="dark"] .period-page-shell {
    --period-ink: var(--theme-text);
    --period-copy: var(--theme-text);
    --period-muted: var(--theme-text-muted);
    --period-line: var(--theme-border);
    --period-card: var(--theme-surface-strong);
    --period-card-strong: var(--theme-surface-strong);
    --period-accent: var(--theme-accent);
    --period-accent-strong: var(--theme-accent-strong);
    --period-accent-soft: var(--theme-accent-soft);
    --period-success: #4ade80;
    --period-danger: #f87171;
    --period-gold: #fbbf24;
    color: var(--period-ink);
}

html[data-theme="dark"] .period-page-shell .period-command-hero {
    background: var(--theme-surface-strong) !important;
    border-color: rgba(148, 163, 184, 0.18) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .period-page-shell .period-command-hero::after {
    background: rgba(125, 211, 252, 0.07) !important;
}

html[data-theme="dark"] .period-page-shell .period-toolbar,
html[data-theme="dark"] .period-page-shell .period-panel,
html[data-theme="dark"] .period-page-shell .period-side-card,
html[data-theme="dark"] .period-page-shell .period-readiness-card {
    background: rgba(15, 23, 42, 0.9) !important;
    border-color: rgba(148, 163, 184, 0.18) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .period-page-shell .period-toolbar {
    border: 1px solid rgba(148, 163, 184, 0.18) !important;
}

html[data-theme="dark"] .period-page-shell .period-meta-tile,
html[data-theme="dark"] .period-page-shell .period-status-row,
html[data-theme="dark"] .period-page-shell .period-filter-static,
html[data-theme="dark"] .period-page-shell .period-checklist-item,
html[data-theme="dark"] .period-page-shell .period-action-card,
html[data-theme="dark"] .period-page-shell .period-delete-list li,
html[data-theme="dark"] .period-page-shell .period-empty-note {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(148, 163, 184, 0.18) !important;
    color: var(--period-copy) !important;
}

html[data-theme="dark"] .period-page-shell .period-meta-value,
html[data-theme="dark"] .period-page-shell .period-status-name,
html[data-theme="dark"] .period-page-shell .period-tree-label,
html[data-theme="dark"] .period-page-shell .period-action-title,
html[data-theme="dark"] .period-page-shell .period-delete-list li,
html[data-theme="dark"] .period-page-shell .period-sibling-link {
    color: var(--period-ink) !important;
}

html[data-theme="dark"] .period-page-shell .period-meta-label,
html[data-theme="dark"] .period-page-shell .period-readiness-title span,
html[data-theme="dark"] .period-page-shell .period-panel-kicker,
html[data-theme="dark"] .period-page-shell .period-eyebrow,
html[data-theme="dark"] .period-page-shell .period-inline-note,
html[data-theme="dark"] .period-page-shell .period-panel-copy,
html[data-theme="dark"] .period-page-shell .period-action-copy,
html[data-theme="dark"] .period-page-shell .period-delete-empty {
    color: var(--period-muted) !important;
}

html[data-theme="dark"] .period-page-shell .period-state-pill {
    background: rgba(148, 163, 184, 0.12) !important;
    color: var(--period-ink) !important;
}

html[data-theme="dark"] .period-page-shell .period-state-pill.is-on {
    background: rgba(74, 222, 128, 0.12) !important;
    color: #86efac !important;
}

html[data-theme="dark"] .period-page-shell .period-state-pill.is-off {
    background: rgba(248, 113, 113, 0.12) !important;
    color: #fca5a5 !important;
}

html[data-theme="dark"] .period-page-shell .period-state-pill.is-waiting {
    background: rgba(251, 191, 36, 0.12) !important;
    color: #fcd34d !important;
}

html[data-theme="dark"] .period-page-shell .period-state-pill.is-neutral {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--period-muted) !important;
}

html[data-theme="dark"] .period-page-shell .period-filter-field select,
html[data-theme="dark"] .period-page-shell .period-filter-field input {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
    color: var(--period-ink) !important;
}

html[data-theme="dark"] .period-page-shell .period-filter-field select::placeholder,
html[data-theme="dark"] .period-page-shell .period-filter-field input::placeholder {
    color: var(--period-muted) !important;
}

html[data-theme="dark"] .period-page-shell .period-filter-field select:focus,
html[data-theme="dark"] .period-page-shell .period-filter-field input:focus {
    border-color: rgba(125, 211, 252, 0.45) !important;
    box-shadow: none !important;
    background: rgba(255, 255, 255, 0.06) !important;
}

html[data-theme="dark"] .period-page-shell .period-button,
html[data-theme="dark"] .period-page-shell .period-link-button,
html[data-theme="dark"] .period-page-shell .period-expand-toggle,
html[data-theme="dark"] .period-page-shell .period-status-link {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(148, 163, 184, 0.22) !important;
    color: var(--period-ink) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .period-page-shell .period-button:hover,
html[data-theme="dark"] .period-page-shell .period-link-button:hover,
html[data-theme="dark"] .period-page-shell .period-expand-toggle:hover,
html[data-theme="dark"] .period-page-shell .period-status-link:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(125, 211, 252, 0.24) !important;
    color: var(--period-ink) !important;
}

html[data-theme="dark"] .period-page-shell .period-solid-button {
    background: var(--theme-surface-strong) !important;
    border-color: rgba(125, 211, 252, 0.24) !important;
    color: #ecfeff !important;
}

html[data-theme="dark"] .period-page-shell .period-solid-button:hover {
    background: var(--theme-surface-strong) !important;
}

html[data-theme="dark"] .period-page-shell .period-button.is-secondary {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(148, 163, 184, 0.22) !important;
    color: var(--period-ink) !important;
}

html[data-theme="dark"] .period-page-shell .period-button.is-warning {
    background: var(--theme-warning-soft) !important;
    border-color: rgba(251, 191, 36, 0.22) !important;
    color: #fff7ed !important;
}

html[data-theme="dark"] .period-page-shell .period-button.is-danger {
    background: var(--theme-danger-soft) !important;
    border-color: rgba(248, 113, 113, 0.24) !important;
    color: #fff1f2 !important;
}

html[data-theme="dark"] .period-page-shell .period-table th,
html[data-theme="dark"] .period-page-shell .period-table td {
    border-bottom-color: rgba(148, 163, 184, 0.16) !important;
    color: var(--period-ink) !important;
}

html[data-theme="dark"] .period-page-shell .period-table thead th {
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--period-muted) !important;
}

html[data-theme="dark"] .period-page-shell .period-table tr[data-depth="0"],
html[data-theme="dark"] .period-page-shell .period-table tr[data-depth="1"] {
    background: rgba(255, 255, 255, 0.025) !important;
}

html[data-theme="dark"] .period-page-shell .period-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.05) !important;
}

html[data-theme="dark"] .period-page-shell .period-expand-toggle {
    border-radius: var(--erp-control-radius) !important;
}

html[data-theme="dark"] .period-page-shell .period-status-link.is-ok {
    background: rgba(74, 222, 128, 0.12) !important;
    color: #86efac !important;
}

html[data-theme="dark"] .period-page-shell .period-status-link.is-locked,
html[data-theme="dark"] .period-page-shell .period-status-link.is-closed {
    background: rgba(248, 113, 113, 0.12) !important;
    color: #fca5a5 !important;
}

html[data-theme="dark"] .period-page-shell .period-status-link.is-muted {
    background: rgba(148, 163, 184, 0.12) !important;
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .period-detail-page .period-panel,
html[data-theme="dark"] .period-detail-page .period-side-card,
html[data-theme="dark"] .period-detail-page .period-readiness-card {
    background: rgba(15, 23, 42, 0.92) !important;
}

html[data-theme="dark"] .period-detail-page .period-checklist-item {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(148, 163, 184, 0.18) !important;
    color: var(--period-copy) !important;
}

html[data-theme="dark"] .period-detail-page .period-checklist-item::before {
    background: rgba(125, 211, 252, 0.12) !important;
    color: var(--period-accent-strong) !important;
}

html[data-theme="dark"] .period-detail-page .period-action-card:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(125, 211, 252, 0.22) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .period-detail-page .period-sibling-link {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(148, 163, 184, 0.14) !important;
}

html[data-theme="dark"] .period-detail-page .period-sibling-link:hover {
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: rgba(125, 211, 252, 0.22) !important;
}

html[data-theme="dark"] .period-detail-page .period-sibling-link.is-current {
    background: rgba(125, 211, 252, 0.12) !important;
    border-color: rgba(125, 211, 252, 0.3) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .period-detail-page .period-delete-card {
    background: var(--theme-surface-strong) !important;
    border-color: rgba(248, 113, 113, 0.18) !important;
}

html[data-theme="dark"] .period-detail-page .period-delete-list li {
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--period-copy) !important;
}

html[data-theme="dark"] .period-detail-page .period-empty-note {
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--period-muted) !important;
}

html[data-theme="dark"] body.admin-body .admin-alert {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(148, 163, 184, 0.18) !important;
    color: var(--theme-text) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body.admin-body .admin-alert-danger {
    background: rgba(248, 113, 113, 0.1) !important;
    border-color: rgba(248, 113, 113, 0.2) !important;
    color: #ffe4e6 !important;
}

html[data-theme="dark"] body.admin-body .admin-alert-success {
    background: rgba(74, 222, 128, 0.1) !important;
    border-color: rgba(74, 222, 128, 0.2) !important;
    color: #dcfce7 !important;
}

/* Dark mode: integration monitoring pages */
html[data-theme="dark"] .integration-monitor-page {
    color: var(--theme-text);
}

html[data-theme="dark"] .integration-monitor-kicker {
    color: var(--admin-ice) !important;
}

html[data-theme="dark"] .integration-monitor-live-chip,
html[data-theme="dark"] .integration-monitor-refresh-state,
html[data-theme="dark"] .integration-monitor-meta-pill,
html[data-theme="dark"] .integration-monitor-drawer-chip,
html[data-theme="dark"] .integration-monitor-detail-chip {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(148, 163, 184, 0.18) !important;
    color: var(--theme-text) !important;
}

html[data-theme="dark"] .integration-monitor-live-chip {
    background: rgba(45, 212, 191, 0.1) !important;
    color: #a7f3d0 !important;
}

html[data-theme="dark"] .integration-monitor-refresh-state {
    background: rgba(125, 211, 252, 0.1) !important;
    color: #bae6fd !important;
}

html[data-theme="dark"] .integration-monitor-hero,
html[data-theme="dark"] .integration-monitor-panel,
html[data-theme="dark"] .integration-monitor-summary-card,
html[data-theme="dark"] .integration-monitor-drawer-card,
html[data-theme="dark"] .integration-monitor-drawer-hero,
html[data-theme="dark"] .integration-monitor-detail-hero,
html[data-theme="dark"] .integration-monitor-detail-section,
html[data-theme="dark"] .integration-monitor-detail-metrics article,
html[data-theme="dark"] .integration-monitor-table-shell {
    border-color: rgba(148, 163, 184, 0.18) !important;
    background: rgba(15, 23, 42, 0.9) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .integration-monitor-hero {
    background: var(--theme-surface-strong) !important;
}

html[data-theme="dark"] .integration-monitor-hero-copy h2,
html[data-theme="dark"] .integration-monitor-panel-head h2,
html[data-theme="dark"] .integration-monitor-drawer-top h2,
html[data-theme="dark"] .integration-monitor-drawer-hero h2,
html[data-theme="dark"] .integration-monitor-detail-title h2,
html[data-theme="dark"] .integration-monitor-detail-metrics strong,
html[data-theme="dark"] .integration-monitor-group-heading strong,
html[data-theme="dark"] .integration-monitor-detail-section-head strong,
html[data-theme="dark"] .integration-monitor-drawer-card-head strong {
    color: var(--theme-text) !important;
}

html[data-theme="dark"] .integration-monitor-hero-copy p,
html[data-theme="dark"] .integration-monitor-panel-note,
html[data-theme="dark"] .integration-monitor-empty-copy,
html[data-theme="dark"] .integration-monitor-drawer-hero p,
html[data-theme="dark"] .integration-monitor-detail-title p,
html[data-theme="dark"] .integration-monitor-summary-note,
html[data-theme="dark"] .integration-monitor-child-result-message,
html[data-theme="dark"] .integration-monitor-message-cell,
html[data-theme="dark"] .integration-monitor-request-cell span,
html[data-theme="dark"] .integration-monitor-record-counts span,
html[data-theme="dark"] .integration-monitor-detail-row span,
html[data-theme="dark"] .integration-monitor-drawer-card-head span,
html[data-theme="dark"] .integration-monitor-detail-section-head span,
html[data-theme="dark"] .integration-monitor-summary-label,
html[data-theme="dark"] .integration-monitor-group-heading span,
html[data-theme="dark"] .integration-monitor-table thead th {
    color: var(--theme-text-muted) !important;
}

html[data-theme="dark"] .integration-monitor-filter-grid span {
    color: var(--theme-text-muted) !important;
}

html[data-theme="dark"] .integration-monitor-filter-grid input,
html[data-theme="dark"] .integration-monitor-filter-grid select,
html[data-theme="dark"] .integration-monitor-filter-static {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(148, 163, 184, 0.18) !important;
    color: var(--theme-text) !important;
}

html[data-theme="dark"] .integration-monitor-filter-grid input:focus,
html[data-theme="dark"] .integration-monitor-filter-grid select:focus {
    border-color: rgba(125, 211, 252, 0.45) !important;
    box-shadow: none !important;
    background: rgba(255, 255, 255, 0.06) !important;
}

html[data-theme="dark"] .integration-monitor-summary-card.tone-success {
    background: var(--theme-success-soft) !important;
}

html[data-theme="dark"] .integration-monitor-summary-card.tone-danger {
    background: var(--theme-danger-soft) !important;
}

html[data-theme="dark"] .integration-monitor-summary-card.tone-accent {
    background: var(--theme-surface-strong) !important;
}

html[data-theme="dark"] .integration-monitor-summary-value {
    color: var(--theme-text) !important;
}

html[data-theme="dark"] .integration-monitor-table-shell {
    overflow: hidden;
}

html[data-theme="dark"] .integration-monitor-table thead th {
    background: rgba(255, 255, 255, 0.04) !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16) !important;
}

html[data-theme="dark"] .integration-monitor-table tbody td {
    color: var(--theme-text) !important;
    border-top-color: rgba(148, 163, 184, 0.14) !important;
    background: rgba(255, 255, 255, 0.02) !important;
}

html[data-theme="dark"] .integration-monitor-table tbody tr:hover td,
html[data-theme="dark"] .integration-monitor-group-row td,
html[data-theme="dark"] .integration-monitor-table tbody .integration-monitor-group-row:hover td {
    background: rgba(255, 255, 255, 0.05) !important;
}

html[data-theme="dark"] .integration-monitor-group-row td {
    border-top-color: rgba(148, 163, 184, 0.16) !important;
    border-bottom-color: rgba(148, 163, 184, 0.12) !important;
}

html[data-theme="dark"] .integration-monitor-group-chevron {
    border-right-color: var(--theme-text-muted) !important;
    border-bottom-color: var(--theme-text-muted) !important;
}

html[data-theme="dark"] .integration-monitor-status.tone-success {
    background: rgba(74, 222, 128, 0.12) !important;
    color: #86efac !important;
}

html[data-theme="dark"] .integration-monitor-status.tone-warning {
    background: rgba(251, 191, 36, 0.12) !important;
    color: #fcd34d !important;
}

html[data-theme="dark"] .integration-monitor-status.tone-danger {
    background: rgba(248, 113, 113, 0.12) !important;
    color: #fca5a5 !important;
}

html[data-theme="dark"] .integration-monitor-status.tone-muted {
    background: rgba(148, 163, 184, 0.12) !important;
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .integration-monitor-drawer {
    background: var(--theme-surface-strong) !important;
    border-left-color: rgba(148, 163, 184, 0.18) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .integration-monitor-drawer-overlay {
    background: rgba(2, 6, 23, 0.72) !important;
}

html[data-theme="dark"] .integration-monitor-drawer-close {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--theme-text) !important;
}

html[data-theme="dark"] .integration-monitor-detail-hero {
    background: var(--theme-surface-strong) !important;
}

html[data-theme="dark"] .integration-monitor-detail-metrics article.tone-success {
    border-color: rgba(74, 222, 128, 0.22) !important;
    background: rgba(20, 83, 45, 0.18) !important;
}

html[data-theme="dark"] .integration-monitor-detail-metrics article.tone-danger {
    border-color: rgba(248, 113, 113, 0.22) !important;
    background: rgba(127, 29, 29, 0.18) !important;
}

html[data-theme="dark"] .integration-monitor-child-result {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(148, 163, 184, 0.18) !important;
}

html[data-theme="dark"] .integration-monitor-child-result-code,
html[data-theme="dark"] .integration-monitor-code-block {
    background: rgba(2, 6, 23, 0.88) !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(148, 163, 184, 0.14) !important;
}

html[data-theme="dark"] .integration-monitor-failure-table th,
html[data-theme="dark"] .integration-monitor-failure-table td {
    color: var(--theme-text) !important;
    border-top-color: rgba(148, 163, 184, 0.14) !important;
}

html[data-theme="dark"] .integration-monitor-detail-row {
    border-bottom-color: rgba(148, 163, 184, 0.14) !important;
}

html[data-theme="dark"] .integration-monitor-page .admin-secondary-button,
html[data-theme="dark"] .integration-monitor-page .admin-primary-button {
    box-shadow: none !important;
}

/* Dark mode: opening balance import page */
html[data-theme="dark"] .opbal-page {
    color: var(--theme-text);
}

html[data-theme="dark"] .opbal-page .opbal-hero {
    border-color: rgba(148, 163, 184, 0.18) !important;
    background: var(--theme-surface-strong) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .opbal-page .opbal-hero .list-eyebrow,
html[data-theme="dark"] .opbal-page .opbal-status-kicker,
html[data-theme="dark"] .opbal-page .opbal-section-label,
html[data-theme="dark"] .opbal-page .opbal-stat span {
    color: var(--theme-text-muted) !important;
}

html[data-theme="dark"] .opbal-page .opbal-hero .page-title,
html[data-theme="dark"] .opbal-page .opbal-status-banner h2,
html[data-theme="dark"] .opbal-page .opbal-card h2,
html[data-theme="dark"] .opbal-page .opbal-panel h2,
html[data-theme="dark"] .opbal-page .opbal-empty-state h2,
html[data-theme="dark"] .opbal-page .opbal-stat strong {
    color: var(--theme-text) !important;
}

html[data-theme="dark"] .opbal-page .opbal-hero .page-subtitle,
html[data-theme="dark"] .opbal-page .opbal-status-copy,
html[data-theme="dark"] .opbal-page .opbal-status-meta,
html[data-theme="dark"] .opbal-page .opbal-help,
html[data-theme="dark"] .opbal-page .opbal-warning,
html[data-theme="dark"] .opbal-page .opbal-empty-state,
html[data-theme="dark"] .opbal-page .opbal-disclaimer-list,
html[data-theme="dark"] .opbal-page .opbal-preview-tools {
    color: var(--theme-text-muted) !important;
}

html[data-theme="dark"] .opbal-page .opbal-surface {
    background: transparent !important;
}

html[data-theme="dark"] .opbal-page .opbal-status-banner,
html[data-theme="dark"] .opbal-page .opbal-card,
html[data-theme="dark"] .opbal-page .opbal-panel,
html[data-theme="dark"] .opbal-page .opbal-stat {
    border-color: rgba(148, 163, 184, 0.18) !important;
    background: rgba(15, 23, 42, 0.9) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .opbal-page .opbal-status-banner {
    background: var(--theme-surface-strong) !important;
    border-left-color: rgba(125, 211, 252, 0.55) !important;
}

html[data-theme="dark"] .opbal-page .opbal-status-banner.is-previewed {
    border-left-color: rgba(125, 211, 252, 0.7) !important;
    background: var(--theme-surface-strong) !important;
}

html[data-theme="dark"] .opbal-page .opbal-status-banner.is-confirmed {
    border-left-color: rgba(74, 222, 128, 0.65) !important;
    background: var(--theme-surface-strong) !important;
}

html[data-theme="dark"] .opbal-page .opbal-status-banner.is-locked {
    border-left-color: rgba(148, 163, 184, 0.45) !important;
    background: var(--theme-accent-soft) !important;
}

html[data-theme="dark"] .opbal-page .opbal-status-banner.is-reset,
html[data-theme="dark"] .opbal-page .opbal-status-banner.is-rolled-back,
html[data-theme="dark"] .opbal-page .opbal-status-banner.is-superseded {
    border-left-color: rgba(251, 191, 36, 0.65) !important;
    background: var(--theme-surface-strong) !important;
}

html[data-theme="dark"] .opbal-page .opbal-lifecycle {
    gap: 0.5rem;
}

html[data-theme="dark"] .opbal-page .opbal-step {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
    color: var(--theme-text-muted) !important;
}

html[data-theme="dark"] .opbal-page .opbal-step.is-done {
    background: rgba(125, 211, 252, 0.1) !important;
    border-color: rgba(125, 211, 252, 0.26) !important;
    color: #bae6fd !important;
}

html[data-theme="dark"] .opbal-page .opbal-step.is-current {
    background: rgba(125, 211, 252, 0.18) !important;
    border-color: rgba(125, 211, 252, 0.34) !important;
    color: #ecfeff !important;
}

html[data-theme="dark"] .opbal-page .opbal-field span {
    color: var(--theme-text-muted) !important;
}

html[data-theme="dark"] .opbal-page .opbal-field .form-control,
html[data-theme="dark"] .opbal-page .opbal-field .form-select,
html[data-theme="dark"] .opbal-page .opbal-card .form-control,
html[data-theme="dark"] .opbal-page .opbal-card .form-select {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
    color: var(--theme-text) !important;
}

html[data-theme="dark"] .opbal-page .opbal-field .form-control::placeholder,
html[data-theme="dark"] .opbal-page .opbal-card .form-control::placeholder {
    color: var(--theme-text-muted) !important;
}

html[data-theme="dark"] .opbal-page .opbal-import-reminder {
    background: rgba(120, 53, 15, 0.18) !important;
    border-color: rgba(251, 191, 36, 0.28) !important;
}

html[data-theme="dark"] .opbal-page .opbal-import-reminder legend {
    color: #fde68a !important;
}

html[data-theme="dark"] .opbal-page .opbal-import-reminder p,
html[data-theme="dark"] .opbal-page .opbal-import-checklist {
    color: var(--theme-text-muted) !important;
}

html[data-theme="dark"] .opbal-page .opbal-import-checklist .form-check-input {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(251, 191, 36, 0.38) !important;
}

html[data-theme="dark"] .opbal-page .opbal-import-checklist .form-check-input:checked {
    background-color: #d97706 !important;
    border-color: #f59e0b !important;
}

html[data-theme="dark"] .opbal-page .opbal-table thead th {
    background: rgba(255, 255, 255, 0.04) !important;
    border-bottom-color: rgba(148, 163, 184, 0.16) !important;
    color: var(--theme-text-muted) !important;
}

html[data-theme="dark"] .opbal-page .opbal-table tbody td {
    color: var(--theme-text) !important;
    border-top-color: rgba(148, 163, 184, 0.14) !important;
    background: rgba(255, 255, 255, 0.02) !important;
}

html[data-theme="dark"] .opbal-page .opbal-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.05) !important;
}

html[data-theme="dark"] .opbal-page .opbal-row-invalid td,
html[data-theme="dark"] .opbal-page .opbal-row-invalid:hover td {
    background: rgba(127, 29, 29, 0.18) !important;
}

html[data-theme="dark"] .opbal-page .opbal-history-current td {
    background: rgba(8, 47, 73, 0.22) !important;
}

html[data-theme="dark"] .opbal-page .status-badge {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--theme-text) !important;
    border-color: rgba(148, 163, 184, 0.18) !important;
}

html[data-theme="dark"] .opbal-page .status-approved {
    background: rgba(74, 222, 128, 0.12) !important;
    color: #86efac !important;
    border-color: rgba(74, 222, 128, 0.2) !important;
}

html[data-theme="dark"] .opbal-page .status-rejected {
    background: rgba(248, 113, 113, 0.12) !important;
    color: #fca5a5 !important;
    border-color: rgba(248, 113, 113, 0.2) !important;
}

html[data-theme="dark"] .opbal-page .opbal-ready-pill {
    background: rgba(74, 222, 128, 0.12) !important;
    color: #86efac !important;
}

html[data-theme="dark"] .opbal-page .opbal-alert-pill {
    background: rgba(248, 113, 113, 0.12) !important;
    color: #fca5a5 !important;
}

html[data-theme="dark"] .opbal-page .opbal-inline-error,
html[data-theme="dark"] .opbal-page .opbal-stat-danger,
html[data-theme="dark"] .opbal-page .opbal-warning {
    color: #fca5a5 !important;
}

html[data-theme="dark"] .opbal-page .opbal-empty-state,
html[data-theme="dark"] .opbal-page .opbal-empty-state p,
html[data-theme="dark"] .opbal-page .opbal-disclaimer-list {
    color: var(--theme-text-muted) !important;
}

html[data-theme="dark"] .opbal-page .opbal-empty-state h2 {
    color: var(--theme-text) !important;
}

html[data-theme="dark"] .opbal-page .opbal-preview-tools span {
    color: var(--theme-text-muted) !important;
}

html[data-theme="dark"] .opbal-page .btn-light,
html[data-theme="dark"] .opbal-page .btn-dark,
html[data-theme="dark"] .opbal-page .btn-outline-secondary,
html[data-theme="dark"] .opbal-page .btn-outline-danger {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
    color: var(--theme-text) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .opbal-page .btn-primary,
html[data-theme="dark"] .opbal-page .btn-success {
    background: var(--theme-success-soft) !important;
    border-color: rgba(45, 212, 191, 0.28) !important;
    color: #ecfeff !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .opbal-page .btn-danger,
html[data-theme="dark"] .opbal-page .btn-outline-danger:hover {
    background: rgba(248, 113, 113, 0.12) !important;
    border-color: rgba(248, 113, 113, 0.26) !important;
    color: #fee2e2 !important;
}

html[data-theme="dark"] .opbal-page .btn-outline-secondary:hover,
html[data-theme="dark"] .opbal-page .btn-light:hover,
html[data-theme="dark"] .opbal-page .btn-dark:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--theme-text) !important;
}

html[data-theme="dark"] .opbal-page .modal-content {
    background: rgba(15, 23, 42, 0.98) !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
    color: var(--theme-text) !important;
}

html[data-theme="dark"] .opbal-page .modal-header,
html[data-theme="dark"] .opbal-page .modal-footer {
    border-color: rgba(148, 163, 184, 0.16) !important;
}

html[data-theme="dark"] .opbal-page .modal-title,
html[data-theme="dark"] .opbal-page .modal-body {
    color: var(--theme-text) !important;
}

html[data-theme="dark"] .opbal-page .opbal-lock-form .btn {
    box-shadow: none !important;
}

.workflow-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.workflow-form-actions-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

html[data-theme="dark"] .mass-delete-page .transaction-filter-panel {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(148, 163, 184, 0.2);
}

html[data-theme="dark"] .mass-delete-page .transaction-filter-field > span,
html[data-theme="dark"] .mass-delete-page .transaction-filter-header {
    color: var(--theme-text-muted);
}

html[data-theme="dark"] .mass-delete-page .transaction-filter-panel .form-control,
html[data-theme="dark"] .mass-delete-page .transaction-filter-panel .form-select {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(148, 163, 184, 0.2);
    color: var(--theme-text);
}


/* Per-user appearance tokens are injected server-side by appearance_tokens.html. */
html[data-user-appearance] :is(h1, h2, h3, h4, h5, h6, .app-display-font) {
    font-weight: var(--user-heading-weight) !important;
}

html[data-user-colors] {
    --bs-primary: var(--user-accent);
    --bs-primary-rgb: var(--user-accent-rgb);
    --theme-primary: var(--user-accent);
    --theme-primary-hover: var(--user-accent-hover);
    --theme-accent: var(--user-accent);
    --theme-accent-strong: var(--user-accent-text);
    --theme-accent-soft: var(--user-accent-soft);
    --accent: var(--theme-accent);
    --accent-strong: var(--theme-accent-strong);
    --accent-soft: var(--theme-accent-soft);
    --accent-faint: var(--theme-accent-soft);
}

html[data-user-colors] :is(.list-shell, [class^="theme-"], [class*=" theme-"]) {
    --accent: var(--theme-accent);
    --accent-strong: var(--theme-accent-strong);
    --accent-soft: var(--theme-accent-soft);
    --accent-faint: var(--theme-accent-soft);
}

html[data-user-colors] .app-navbar,
html[data-user-colors] .admin-sidebar {
    background: var(--user-navbar) !important;
    border-color: var(--user-navbar-border) !important;
}

html[data-user-colors] .app-navbar :is(
    .app-brand,
    .app-nav-pill:not(.is-active),
    .app-user-chip,
    .app-bookmark-chip,
    .app-bookmark-more-btn,
    .app-bookmark-add-btn,
    .app-navbar-toggler
),
html[data-user-colors] .app-navbar :is(
    .app-brand-subtitle,
    .app-nav-pill:not(.is-active) .app-nav-pill-kicker,
    .app-user-chip-label,
    .app-user-chip-value,
    .app-bookmark-label,
    .app-global-search-icon
),
html[data-user-colors] .app-global-search-input,
html[data-user-colors] .app-global-search-input::placeholder {
    color: var(--user-navbar-on) !important;
    opacity: 1;
}

html[data-user-colors] .app-navbar .app-nav-pill.is-active {
    background: var(--user-accent) !important;
    border-color: var(--user-accent) !important;
    color: var(--user-accent-on) !important;
}

html[data-user-colors] .app-navbar .app-nav-pill.is-active :is(
    .app-nav-pill-icon,
    .app-nav-pill-label,
    .app-nav-pill-kicker
) {
    color: var(--user-accent-on) !important;
}

html[data-user-colors] .admin-sidebar :is(
    .admin-brand,
    .admin-close-nav,
    .admin-nav-link,
    .admin-profile-toggle,
    .admin-sidebar-links > a,
    .admin-brand-title,
    .admin-brand-subtitle,
    .admin-nav-group-label,
    .admin-nav-link-title,
    .admin-nav-link-meta,
    .admin-identity-label,
    .admin-identity-name
) {
    color: var(--user-navbar-on) !important;
}

html[data-user-colors] .admin-sidebar .admin-nav-link.is-active {
    background: var(--user-accent) !important;
    color: var(--user-accent-on) !important;
}

html[data-user-colors] :is(a:not(.btn), .page-link, .nav-tabs .nav-link.active) {
    color: var(--user-accent-text);
}

html[data-user-colors] :is(.btn-primary, .btn-primary:hover, .btn-primary:focus, .btn-primary:active, .shortcut-save-button) {
    background: var(--user-accent) !important;
    border-color: var(--user-accent) !important;
    color: var(--user-accent-on) !important;
}

html[data-user-colors] :is(button, a, input, select, textarea):focus-visible {
    outline: 2px solid var(--user-accent-focus) !important;
    outline-offset: 2px;
}

html[data-user-colors] .admin-body {
    --cds-link-primary: var(--user-accent-text);
    --cds-focus: var(--user-accent-focus);
    --cds-button-primary: var(--user-accent);
    --cds-button-primary-hover: var(--user-accent-hover);
    --cds-text-on-color: var(--user-accent-on);
}

html[data-theme="dark"] .theme-fifo .fifo-filter-grid :is(select, input),
html[data-theme="dark"] .theme-fifo .fifo-summary-card {
    background: var(--theme-surface-strong) !important;
    border-color: var(--theme-border) !important;
    color: var(--theme-text) !important;
}

html[data-theme="dark"] .theme-fifo .fifo-filter-grid :is(select, input) {
    color: var(--theme-text) !important;
}

html[data-theme="dark"] .theme-fifo .fifo-filter-grid input::placeholder,
html[data-theme="dark"] .theme-fifo .fifo-summary-card :is(span, small) {
    color: var(--theme-text-muted) !important;
    opacity: 1;
}

html[data-theme="dark"] .theme-fifo .fifo-summary-card strong {
    color: var(--theme-text) !important;
}

html[data-user-colors] .shortcut-settings-body {
    --shortcut-accent: var(--theme-accent);
    --shortcut-accent-strong: var(--theme-accent-strong);
    --shortcut-accent-bright: var(--erp-primary-hover);
    --shortcut-accent-soft: var(--theme-accent-soft);
}
