/* ============================================================
   Shared readability layer
   Loaded after every module stylesheet so secondary information
   remains readable without competing with primary values.
   ============================================================ */

:root,
[data-bs-theme="dark"] {
    --text-secondary: #e2e8f0;
    --text-muted: #cbd5e1;
    --inv-text-secondary: #e2e8f0;
    --inv-text-muted: #cbd5e1;
    --auth-muted: #d5dce6;
    --takruz-muted: #cbd5e1;
}

.profile-page {
    --profile-muted: #d5dce6;
    --profile-subtle: #cbd5e1;
}

.shift-page {
    --shift-copy: #d5dce6;
}

#userModal {
    --account-muted: #cbd5e1;
}

[data-bs-theme="light"] {
    --text-secondary: #475569;
    --text-muted: #64748b;
    --inv-text-secondary: #475569;
    --inv-text-muted: #64748b;
    --takruz-muted: #64748b;
}

[data-bs-theme="light"] .profile-page {
    --profile-muted: #475569;
    --profile-subtle: #64748b;
}

[data-bs-theme="light"] .shift-page {
    --shift-copy: #475569;
}

[data-bs-theme="light"] #userModal {
    --account-muted: #64748b;
}

/* Common labels, helper copy, and table headings. */
.text-muted,
.form-text,
.help-text,
.helper-text,
.field-help,
.field-hint,
.page-header p,
.card-header p,
.card-header small,
.modal-header p,
.empty-state p {
    color: var(--text-muted) !important;
}

.form-label,
.col-form-label,
.input-group-custom > label,
fieldset > legend,
.table thead th,
table thead th {
    color: var(--text-secondary) !important;
}

.form-label,
.col-form-label,
.input-group-custom > label {
    font-size: max(0.78rem, 0.82em) !important;
}

.card small:not(.badge),
.modal small:not(.badge),
.page-header small:not(.badge) {
    font-size: max(0.74rem, 0.82em) !important;
}

body small:not(.badge):not([class*="badge"]):not([class*="status"]):not(.text-danger):not(.text-success):not(.text-warning):not(.text-info):not(.report-no-sales):not(.pax-rate-hint) {
    color: var(--text-muted) !important;
    font-size: max(0.76rem, 0.82em) !important;
}

body .small:not(.badge):not([class*="badge"]):not([class*="status"]):not(.text-danger):not(.text-success):not(.text-warning):not(.text-info) {
    color: var(--text-muted) !important;
    font-size: max(0.76rem, 0.82em) !important;
}

body .badge {
    font-size: max(0.72rem, 0.82em) !important;
}

main label:not(.btn),
body table thead th {
    font-size: max(0.76rem, 0.82em) !important;
}

.text-white-50 {
    color: var(--text-muted) !important;
    opacity: 1 !important;
}

/* Base statistic helpers had global opacity that dimmed every module. */
.stat-label,
.stat-change {
    opacity: 1 !important;
}

.stat-label {
    color: var(--text-secondary) !important;
    font-size: max(0.76rem, 0.82em) !important;
}

.stat-change {
    color: var(--text-muted) !important;
    font-size: max(0.76rem, 0.82em) !important;
}

.stat-change.is-positive {
    color: #4ade80 !important;
}

.stat-change.is-negative {
    color: #fb7185 !important;
}

.sidebar-nav .nav-divider span {
    color: #f87171 !important;
    font-size: 0.68rem !important;
    opacity: 1 !important;
}

.form-control::placeholder,
.form-select:invalid,
input::placeholder,
textarea::placeholder {
    color: #9da7b6 !important;
    opacity: 1;
}

.form-control:disabled,
.form-select:disabled,
input:disabled,
textarea:disabled {
    color: #aeb7c5 !important;
    opacity: 0.84;
}

[data-bs-theme="light"] .form-control::placeholder,
[data-bs-theme="light"] input::placeholder,
[data-bs-theme="light"] textarea::placeholder {
    color: #64748b !important;
}

[data-bs-theme="light"] .form-control:disabled,
[data-bs-theme="light"] .form-select:disabled,
[data-bs-theme="light"] input:disabled,
[data-bs-theme="light"] textarea:disabled {
    color: #64748b !important;
}

/* Reports used several local alpha colors that bypassed the theme tokens. */
.reports-page .reports-mode-description,
.reports-page .reports-filter-field .form-label,
.reports-page .report-filters label,
.reports-page .reports-summary-card .stat-label,
.reports-page .reports-summary-card .stat-change:not(.is-positive):not(.is-negative),
.reports-page .reports-reconciliation span,
.reports-page .reports-reconciliation small,
.reports-page .report-card-header small,
.reports-page .reports-branch-table thead th {
    color: var(--text-muted) !important;
}

.reports-page .reports-filter-field .form-label,
.reports-page .report-filters label,
.reports-page .reports-summary-card .stat-label,
.reports-page .reports-reconciliation span,
.reports-page .reports-branch-table thead th {
    color: var(--text-secondary) !important;
}

.reports-page .reports-filter-field .form-label,
.reports-page .report-filters label,
.reports-page .reports-summary-card .stat-label,
.reports-page .reports-summary-card .stat-change,
.reports-page .reports-reconciliation span,
.reports-page .reports-reconciliation small {
    font-size: max(0.76rem, 0.82em) !important;
}

/* Account/profile screens previously used copy as small as 9–10px. */
.profile-page small,
.profile-page time,
.profile-page .profile-meta-note,
.profile-page .profile-label-row > span,
.profile-page .profile-uri,
.profile-page .profile-activity-item p,
.branch-details-modal small,
.branch-details-modal .branch-staff-login,
.branch-details-modal .branch-staff-meta span {
    font-size: max(0.72rem, 0.82em) !important;
}

.reports-page .stat-change.is-positive {
    color: #4ade80 !important;
}

.reports-page .stat-change.is-negative,
.reports-page .report-no-sales {
    color: #fb7185 !important;
}

/* Page-specific copy that does not use the shared theme variables. */
.user-meta,
.access-muted,
.last-login-mini,
.product-tile__desc,
.product-tile__status,
.stock-restock-note.is-muted,
.se-empty-hint,
.se-table thead th .th-sub,
.shift-muted,
.forecast-context-label,
.branch-view-hint {
    color: var(--text-muted) !important;
    opacity: 1 !important;
}

.branch-view-hint,
.product-tile__desc,
.product-tile__status,
.stock-restock-note,
.se-table thead th .th-sub,
.forecast-context-label {
    font-size: max(0.74rem, 0.82em) !important;
}

.sheet-header th small {
    color: inherit !important;
    font-size: max(0.74rem, 0.82em) !important;
    opacity: 1 !important;
}

.dashboard-branch-filter label,
.dashboard-branch-name small,
.dashboard-branch-metric span,
.dashboard-sheet-status span,
.dashboard-sheet-status small,
.profile-page label {
    font-size: max(0.76rem, 0.82em) !important;
}

.dashboard-branch-metric span,
.dashboard-sheet-status span,
.dashboard-sheet-status small {
    color: var(--text-secondary) !important;
}

.inv-item-branch,
.pulse-item-revenue,
.insight-revenue-qty,
.insight-kpi-sub,
.pulse-section-label,
.insight-section-label,
.insight-kpi-label {
    color: var(--text-muted) !important;
    font-size: max(0.74rem, 0.82em) !important;
}

.audit-admin-page .audit-summary-card span,
.audit-admin-page .audit-summary-card small,
.manage-users-page .manage-users-card-count,
.branch-admin-page .branch-code {
    font-size: max(0.76rem, 0.82em) !important;
}

.product-tile--inactive {
    opacity: 0.78 !important;
}

.product-tile__inactive-badge,
.tile-action-btn,
.tile-action-more {
    font-size: max(0.72rem, 0.82em) !important;
}

.product-tile__no-image,
.product-tile__no-image span,
.product-tile__inactive-badge,
.product-search-count,
.product-tile .tile-action-btn,
.product-tile .tile-action-more {
    color: var(--text-secondary) !important;
    opacity: 1 !important;
}

.product-toolbar p,
.product-page-header p,
.product-admin-page p {
    color: var(--text-muted) !important;
}

.menu-management-hero p,
.menu-category-filter:not(.active) {
    color: var(--text-muted) !important;
}

.menu-category-filter {
    font-size: max(0.74rem, 0.82em) !important;
}

.stock-product-copy > span,
.stock-restock-note.is-muted,
.stock-sheet-heading p,
.stock-results-count,
.stock-view-only,
.stock-group-row td span,
.product-cell .product-code,
.branch-summary-card .branch-code,
.branch-metric .metric-label,
.category-label,
.value-cell,
.stock-empty-state,
.last-updated,
.se-page-subtitle,
.se-branch-date,
.se-empty > p,
.order-number {
    color: var(--text-muted) !important;
    opacity: 1 !important;
}

.stock-product-copy > span,
.stock-product-quantity span,
.stock-restock-note,
.stock-sheet-heading p,
.stock-filter-bar .filter-group label,
.stock-view-button,
.stock-results-count,
.stock-view-only,
.stock-group-row td span,
.product-cell .product-code,
.branch-summary-card .branch-code,
.branch-metric .metric-label,
.category-label,
.last-updated,
.stock-sheet-count,
.sheet-category-count,
.inventory-jump-link span:last-child,
.sheet-category-jump-btn span {
    font-size: max(0.74rem, 0.82em) !important;
}

.manage-items-category-btn span,
.manage-items-category-count,
.notification-view-all-count {
    font-size: max(0.74rem, 0.82em) !important;
}

.stock-filter-bar .filter-group label,
.stock-view-button,
.stock-product-quantity span,
.stock-sheet-count {
    color: var(--text-secondary) !important;
    opacity: 1 !important;
}

.sales-hero-total > span,
.insight-hour-label,
.forecast-header-field > span,
.shift-branch-chip,
.nc-meta span,
.nc-filter-count,
.pos-connection-badge span,
.pos-sync-label,
.pos-sync-count {
    color: var(--text-secondary) !important;
    font-size: max(0.74rem, 0.82em) !important;
    opacity: 1 !important;
}

.shift-detail-loading,
.forecast-header-help,
.forecast-header-help span {
    color: var(--text-muted) !important;
    opacity: 1 !important;
}

.forecast-header-help span {
    font-size: max(0.74rem, 0.82em) !important;
}

#userModal .optional-label,
#userModal .account-modal-eyebrow,
#userModal .account-section-step,
.branch-details-modal .badge {
    font-size: max(0.72rem, 0.82em) !important;
}

#userModal .account-section-step {
    color: #f87171 !important;
}

#userModal .branch-toggle-btn:not(.active) {
    color: var(--text-muted) !important;
}

.company-profile .tier-label,
.company-profile .contact-text strong,
.company-profile .ty-closing,
.company-profile .profile-copyright {
    color: var(--text-muted) !important;
}

.company-profile .tier-label,
.company-profile .contact-text strong {
    font-size: max(0.76rem, 0.82em) !important;
}

.profile-page .btn {
    font-size: max(0.76rem, 0.82em) !important;
}

.inv-sales-section-heading span,
.inv-sales-money-title span,
.inv-sales-stat-title,
.inv-sales-stat-meta,
.inv-sales-card .text-muted,
.daily-branch-revenue span,
.monthly-report-page .reports-hero-meta span,
.summary-panel > header p {
    color: var(--text-muted) !important;
    opacity: 1 !important;
}

.card .inv-sales-items-table .text-muted,
.monthly-report-page .branch-score-metrics span {
    color: var(--text-muted) !important;
    opacity: 1 !important;
}

.monthly-report-page .branch-score-metrics span {
    font-size: max(0.76rem, 0.82em) !important;
}

.monthly-report-page .monthly-products-card .monthly-products-footer,
.monthly-report-page .monthly-products-card .monthly-products-footer span {
    color: var(--text-muted) !important;
    opacity: 1 !important;
}

.inv-sales-stat-title,
.inv-sales-stat-meta,
.daily-branch-revenue span,
.monthly-report-page .reports-hero-meta span {
    font-size: max(0.76rem, 0.82em) !important;
}

/* POS has its own compact workspace, including several hard-coded low-alpha labels. */
.pax-field label,
.pos-section-label,
.pos-cash-field label {
    color: var(--text-secondary) !important;
    font-size: max(0.76rem, 0.82em) !important;
}

.pos-empty-cart-text,
#emptyCart p,
.pos-cart-item .cart-item-unit-price,
.unli-guest-summary small,
.pos-total-row,
.pos-discount-breakdown,
.receipt-modal-title small,
.pos-shift-button small {
    color: var(--text-muted) !important;
}

.pos-cart-item .cart-item-unit-price,
.unli-guest-summary small,
.pos-discount-breakdown,
.receipt-modal-title small,
.pos-shift-button small {
    font-size: max(0.72rem, 0.82em) !important;
}

.disc-chip,
.pos-pay-btn,
.denom-btn,
.pos-clear-btn,
.pos-kbd {
    color: var(--text-secondary) !important;
}

.disc-chip,
.denom-btn,
.pos-clear-btn,
.pos-kbd {
    font-size: max(0.7rem, 0.82em) !important;
}

/* Authentication screens do not use the application shell variables. */
.auth-recovery-page .auth-intro,
.auth-recovery-page .auth-dev-note,
.auth-recovery-page .auth-rules,
.auth-recovery-page .auth-back,
.auth-recovery-page .auth-input-wrap > i {
    color: #bcc5d2 !important;
}

.auth-recovery-page .auth-input-wrap input::placeholder {
    color: #9da7b6 !important;
}

body:not(.auth-recovery-page) .brand-subtitle,
body:not(.auth-recovery-page) .form-header p,
body:not(.auth-recovery-page) .forgot-password-link {
    color: #bcc5d2 !important;
}

@media (max-width: 768px) {
    .form-label,
    .col-form-label,
    .input-group-custom > label {
        font-size: 0.8rem;
    }
}

/* ============================================================
   Light-mode contrast floor
   Module styles are primarily designed for the dark theme. Keep
   their structure and accents, but replace pale dark-theme text
   with colors that remain readable on white and light-gray panels.
   ============================================================ */
[data-bs-theme="light"] {
    --text-secondary: #334155;
    --text-muted: #475569;
    --inv-text-secondary: #334155;
    --inv-text-muted: #475569;
    --takruz-muted: #475569;
}

[data-bs-theme="light"] .profile-page {
    --profile-muted: #334155;
    --profile-subtle: #475569;
}

[data-bs-theme="light"] .shift-page {
    --shift-copy: #334155;
}

[data-bs-theme="light"] #userModal {
    --account-muted: #475569;
}

/* Shared semantic copy must use the darker light-theme variants. */
[data-bs-theme="light"] .text-danger,
[data-bs-theme="light"] .stat-change.is-negative,
[data-bs-theme="light"] .report-no-sales {
    color: #b4233a !important;
}

[data-bs-theme="light"] .text-success,
[data-bs-theme="light"] .stat-change.is-positive {
    color: #166534 !important;
}

[data-bs-theme="light"] .text-warning {
    color: #854d0e !important;
}

[data-bs-theme="light"] .text-info {
    color: #075985 !important;
}

/* Section labels and eyebrows sit on pale red surfaces in light mode. */
[data-bs-theme="light"] .sidebar-nav .nav-divider span,
[data-bs-theme="light"] .forecast-page-eyebrow,
[data-bs-theme="light"] .reports-eyebrow,
[data-bs-theme="light"] .summary-eyebrow,
[data-bs-theme="light"] .audit-eyebrow,
[data-bs-theme="light"] .branch-eyebrow,
[data-bs-theme="light"] .settings-eyebrow,
[data-bs-theme="light"] .manage-users-eyebrow,
[data-bs-theme="light"] .manage-users-card-eyebrow,
[data-bs-theme="light"] .profile-eyebrow,
[data-bs-theme="light"] #userModal .account-modal-eyebrow,
[data-bs-theme="light"] #userModal .account-section-step {
    color: #b4233a !important;
    opacity: 1 !important;
}

/* Role, access, and activity pills were using pastel dark-theme text. */
[data-bs-theme="light"] .role-pill-admin {
    color: #be123c !important;
    background: #ffe4e6 !important;
    border-color: #fda4af !important;
}

[data-bs-theme="light"] .role-pill-manager {
    color: #92400e !important;
    background: #fef3c7 !important;
    border-color: #fcd34d !important;
}

[data-bs-theme="light"] .role-pill-staff {
    color: #0f766e !important;
    background: #ccfbf1 !important;
    border-color: #5eead4 !important;
}

[data-bs-theme="light"] .access-pill {
    color: #4338ca !important;
    background: #eef2ff !important;
    border-color: #a5b4fc !important;
}

[data-bs-theme="light"] .status-pill-active,
[data-bs-theme="light"] .branch-status.is-active,
[data-bs-theme="light"] .profile-status-pill,
[data-bs-theme="light"] .tax-setup-status.is-active {
    color: #166534 !important;
    background: #dcfce7 !important;
    border-color: #86efac !important;
}

[data-bs-theme="light"] .status-pill-inactive,
[data-bs-theme="light"] .branch-status.is-inactive {
    color: #475569 !important;
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}

[data-bs-theme="light"] .tax-setup-status.is-disabled {
    color: #854d0e !important;
    background: #fef3c7 !important;
    border-color: #fcd34d !important;
}

/* Action links remain visibly actionable without relying on faint color alone. */
[data-bs-theme="light"] .branch-edit-button {
    color: #1d4ed8 !important;
    background: #eff6ff !important;
    border-color: #93c5fd !important;
}

[data-bs-theme="light"] .branch-delete-button {
    color: #b91c1c !important;
    background: #fef2f2 !important;
    border-color: #fca5a5 !important;
}

[data-bs-theme="light"] .btn-outline-success {
    color: #166534 !important;
    border-color: #15803d !important;
}

/* Disabled controls need legible labels instead of white on pale tint. */
[data-bs-theme="light"] button:disabled,
[data-bs-theme="light"] .btn.disabled,
[data-bs-theme="light"] .btn[aria-disabled="true"] {
    color: #475569 !important;
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
    box-shadow: none !important;
    opacity: 1 !important;
}

/* Dashboard operational states. */
[data-bs-theme="light"] .dashboard-section-heading h2 > span,
[data-bs-theme="light"] .dashboard-sheet-status > div:first-child strong,
[data-bs-theme="light"] .dashboard-branch-status .pending strong {
    color: #b4233a !important;
}

[data-bs-theme="light"] .dashboard-branch-metric.stock strong,
[data-bs-theme="light"] .dashboard-sheet-status.progressing > div:first-child strong {
    color: #854d0e !important;
}

[data-bs-theme="light"] .dashboard-sheet-status.complete > div:first-child strong {
    color: #166534 !important;
}

/* Inventory and expiry status colors with a WCAG-readable light variant. */
[data-bs-theme="light"] .se-empty-hint a,
[data-bs-theme="light"] .se-info-strip strong,
[data-bs-theme="light"] .se-pill.pill-total {
    color: #b4233a !important;
}

[data-bs-theme="light"] .se-pill.pill-warning,
[data-bs-theme="light"] .se-table thead th.col-days {
    color: #854d0e !important;
}

[data-bs-theme="light"] .se-pill.pill-danger,
[data-bs-theme="light"] .se-table thead th.col-countdown {
    color: #991b1b !important;
}

/* Counts and muted product-management chips cannot stay pale red. */
[data-bs-theme="light"] .manage-items-category-btn span,
[data-bs-theme="light"] .manage-items-category-count,
[data-bs-theme="light"] .product-search-count,
[data-bs-theme="light"] .product-tile__inactive-badge {
    color: #334155 !important;
    opacity: 1 !important;
}

/* Remaining module-specific copy discovered during the live page audit. */
[data-bs-theme="light"] .forecast-update-button:disabled .generate-label,
[data-bs-theme="light"] .forecast-update-button.disabled .generate-label,
[data-bs-theme="light"] .forecast-update-button[aria-disabled="true"] .generate-label {
    color: #475569 !important;
}

[data-bs-theme="light"] .sales-range-pill,
[data-bs-theme="light"] .sales-hero-copy > p,
[data-bs-theme="light"] .sales-page .form-label {
    color: #475569 !important;
}

[data-bs-theme="light"] .sales-eyebrow,
[data-bs-theme="light"] .sales-filter-toggle-cue .cue-open,
[data-bs-theme="light"] .branch-list-heading > div > span {
    color: #b4233a !important;
}

[data-bs-theme="light"] .menu-category-filter:not(.active) > span {
    color: #475569 !important;
    background: #e2e8f0 !important;
}

[data-bs-theme="light"] .menu-category-filter.active > span {
    color: #ffffff !important;
    background: #b91c1c !important;
}

[data-bs-theme="light"] .tile-action-recipe,
[data-bs-theme="light"] .tile-action-recipe > span {
    color: #b4233a !important;
}

/* Decorative icons also need a visible light-theme accent. */
[data-bs-theme="light"] .manage-users-hero-icon,
[data-bs-theme="light"] .manage-users-card-icon,
[data-bs-theme="light"] .manage-users-summary .material-symbols-rounded,
[data-bs-theme="light"] .branch-hero-icon,
[data-bs-theme="light"] .audit-summary-icon,
[data-bs-theme="light"] .audit-card-icon {
    color: #b4233a !important;
}

[data-bs-theme="light"] .branch-chip .material-symbols-rounded {
    color: #4338ca !important;
}

[data-bs-theme="light"] .manage-users-card .btn-outline-danger {
    color: #b91c1c !important;
    border-color: #fca5a5 !important;
    background: #fef2f2 !important;
}

[data-bs-theme="light"] .manage-users-card .btn-outline-primary {
    color: #1d4ed8 !important;
    border-color: #93c5fd !important;
    background: #eff6ff !important;
}

[data-bs-theme="light"] .forecast-update-button {
    color: #991b1b !important;
    background: #fee2e2 !important;
    border-color: #fca5a5 !important;
}

[data-bs-theme="light"] .forecast-update-button .generate-label {
    color: inherit !important;
}

[data-bs-theme="light"] .forecast-update-button:hover,
[data-bs-theme="light"] .forecast-update-button:focus {
    color: #ffffff !important;
    background: #b91c1c !important;
    border-color: #991b1b !important;
}

[data-bs-theme="light"] .menu-management-eyebrow {
    color: #b4233a !important;
}

[data-bs-theme="light"] .product-tile__inactive-badge {
    color: #334155 !important;
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
}

[data-bs-theme="light"] .pulse-item-rank {
    color: #ffffff !important;
    background: #b91c1c !important;
}

[data-bs-theme="light"] .insight-revenue-rank {
    color: #1e293b !important;
    background: #fef3c7 !important;
    border-color: #fcd34d !important;
}

/* Profile and legacy utility classes use their own high-specificity colors. */
[data-bs-theme="light"] .text-muted {
    color: #475569 !important;
    opacity: 1 !important;
}

[data-bs-theme="light"] .profile-avatar-large {
    color: #991b1b !important;
    background: #fee2e2 !important;
    border-color: #fca5a5 !important;
}

[data-bs-theme="light"] .profile-identity p span {
    color: #475569 !important;
}

[data-bs-theme="light"] .card .table .text-muted,
[data-bs-theme="light"] .card .table small.text-muted,
[data-bs-theme="light"] .card .data-table .text-muted {
    color: #475569 !important;
    opacity: 1 !important;
}

[data-bs-theme="light"] .profile-verification-badge.is-unverified {
    color: #854d0e !important;
    background: #fef3c7 !important;
    border-color: #fcd34d !important;
}

[data-bs-theme="light"] .profile-verification-badge.is-verified {
    color: #166534 !important;
    background: #dcfce7 !important;
    border-color: #86efac !important;
}

[data-bs-theme="light"] .profile-tabs button.is-active,
[data-bs-theme="light"] .profile-primary-button {
    color: #ffffff !important;
    background: #b91c1c !important;
    border-color: #991b1b !important;
}

/* Non-admin users see this branch indicator on every page. The generic
   Bootstrap info badge rule otherwise leaves white text on a white badge. */
[data-bs-theme="light"] .main-navbar .navbar-branch-badge,
[data-bs-theme="light"] .main-navbar .badge.bg-info.navbar-branch-badge {
    color: #1e293b !important;
    background: #ffffff !important;
    border: 1px solid #dc2626 !important;
}

[data-bs-theme="light"] .main-navbar .navbar-branch-badge i {
    color: #dc2626 !important;
}

/* The logo contains white lettering that disappears against the light navbar.
   Outline the artwork without changing its size or the navbar layout. */
[data-bs-theme="light"] .main-navbar .navbar-logo {
    filter:
        drop-shadow(1px 0 0 #1e293b)
        drop-shadow(-1px 0 0 #1e293b)
        drop-shadow(0 1px 0 #1e293b)
        drop-shadow(0 -1px 0 #1e293b)
        drop-shadow(0 2px 3px rgba(15, 23, 42, 0.3));
}

/* Expiry Tracker used an obsolete `.light-theme` body class, so its live
   `[data-bs-theme="light"]` pages kept the pastel dark-theme status colors. */
[data-bs-theme="light"] .se-date-separator td {
    color: #991b1b !important;
    background: #fff7f7 !important;
}

[data-bs-theme="light"] .se-date-badge {
    color: #6b21a8 !important;
    background: #f3e8ff !important;
    border-color: #d8b4fe !important;
}

[data-bs-theme="light"] .se-qty-badge {
    color: #166534 !important;
    background: #dcfce7 !important;
}

[data-bs-theme="light"] .se-use-first {
    color: #854d0e !important;
    background: #fef3c7 !important;
}

[data-bs-theme="light"] .se-days-input-wrap {
    background: #fefce8 !important;
    border-color: #fcd34d !important;
}

[data-bs-theme="light"] .se-days-input {
    color: #92400e !important;
}

[data-bs-theme="light"] .se-days-suffix,
[data-bs-theme="light"] .se-item-unit {
    color: #475569 !important;
}

[data-bs-theme="light"] .se-batch-remaining {
    color: #4338ca !important;
}

[data-bs-theme="light"] .se-expiry-val {
    color: #9a3412 !important;
}

[data-bs-theme="light"] .se-expiry-tag.tag-safe {
    color: #166534 !important;
    background: #dcfce7 !important;
    border-color: #86efac !important;
}

[data-bs-theme="light"] .se-expiry-tag.tag-warning {
    color: #854d0e !important;
    background: #fef3c7 !important;
    border-color: #fcd34d !important;
}

[data-bs-theme="light"] .se-expiry-tag.tag-critical,
[data-bs-theme="light"] .se-expiry-tag.tag-expired {
    color: #991b1b !important;
    background: #fee2e2 !important;
    border-color: #fca5a5 !important;
}

[data-bs-theme="light"] .se-expiry-tag.tag-none,
[data-bs-theme="light"] .se-expiry-tag.tag-disposed,
[data-bs-theme="light"] .se-expiry-tag.tag-depleted {
    color: #475569 !important;
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
}

/* Combined Sales Summary */
[data-bs-theme="light"] .summary-print-button {
    color: #991b1b !important;
    background: #fee2e2 !important;
    border-color: #fca5a5 !important;
}

[data-bs-theme="light"] .summary-print-button:hover,
[data-bs-theme="light"] .summary-print-button:focus-visible {
    color: #ffffff !important;
    background: #b91c1c !important;
    border-color: #991b1b !important;
}

[data-bs-theme="light"] .summary-period-tabs button {
    color: #475569 !important;
}

[data-bs-theme="light"] .summary-period-tabs button i,
[data-bs-theme="light"] .summary-period-tabs button.active,
[data-bs-theme="light"] .summary-period-tabs button.active i,
[data-bs-theme="light"] .summary-panel header > a {
    color: #991b1b !important;
}

[data-bs-theme="light"] .summary-filter-field label {
    color: #475569 !important;
}

[data-bs-theme="light"] .summary-payment-badge.cash,
[data-bs-theme="light"] .summary-payment-badge:not(.gcash) {
    color: #166534 !important;
    background: #dcfce7 !important;
}

[data-bs-theme="light"] .summary-payment-badge.gcash {
    color: #1d4ed8 !important;
    background: #dbeafe !important;
}

[data-bs-theme="light"] .summary-kpi-card > small.positive {
    color: #166534 !important;
}

[data-bs-theme="light"] .summary-kpi-card > small.negative {
    color: #b4233a !important;
}

[data-bs-theme="light"] .summary-product-row > b {
    color: #991b1b !important;
    background: #fee2e2 !important;
}

/* Register Shifts & Cash Closing */
[data-bs-theme="light"] .shift-eyebrow,
[data-bs-theme="light"] .shift-code,
[data-bs-theme="light"] .shift-detail-drawer > header span {
    color: #b4233a !important;
}

[data-bs-theme="light"] .shift-hero p,
[data-bs-theme="light"] .shift-filter-form label,
[data-bs-theme="light"] .shift-table-heading small {
    color: #475569 !important;
}

[data-bs-theme="light"] .shift-status-pill.is-open,
[data-bs-theme="light"] .shift-variance.is-over {
    color: #075985 !important;
    background: #e0f2fe !important;
}

[data-bs-theme="light"] .shift-status-pill.is-closed,
[data-bs-theme="light"] .shift-variance.is-balanced,
[data-bs-theme="light"] .shift-approval-note.is-approved {
    color: #166534 !important;
    background: #dcfce7 !important;
}

[data-bs-theme="light"] .shift-variance.is-short {
    color: #991b1b !important;
    background: #fee2e2 !important;
}

[data-bs-theme="light"] .shift-approval-note {
    color: #854d0e !important;
}

[data-bs-theme="light"] .shift-detail-drawer > header {
    background: #fff7f7 !important;
    border-bottom-color: #fecaca !important;
}

[data-bs-theme="light"] .shift-detail-drawer > header h2 {
    color: #1e293b !important;
}

[data-bs-theme="light"] .shift-detail-drawer > header button {
    color: #475569 !important;
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
}

[data-bs-theme="light"] .summary-apply,
[data-bs-theme="light"] .shift-filter-button {
    color: #ffffff !important;
    background: #b91c1c !important;
    border-color: #991b1b !important;
}

[data-bs-theme="light"] .summary-apply:hover,
[data-bs-theme="light"] .summary-apply:focus-visible,
[data-bs-theme="light"] .shift-filter-button:hover,
[data-bs-theme="light"] .shift-filter-button:focus-visible {
    color: #ffffff !important;
    background: #991b1b !important;
}

/* Older inventory administration pages */
[data-bs-theme="light"] .card-header.bg-info.text-white,
[data-bs-theme="light"] .card-header.bg-info.text-white h5 {
    color: #082f49 !important;
}

[data-bs-theme="light"] .btn-success {
    color: #ffffff !important;
    background: #166534 !important;
    border-color: #14532d !important;
}

[data-bs-theme="light"] .card code {
    color: #9d174d !important;
}

[data-bs-theme="light"] .manage-item-sheet-badge.is-samgyup {
    color: #991b1b !important;
    background: #fee2e2 !important;
    border-color: #fca5a5 !important;
}

[data-bs-theme="light"] .manage-item-sheet-badge.is-softdrinks {
    color: #1d4ed8 !important;
    background: #dbeafe !important;
    border-color: #93c5fd !important;
}

[data-bs-theme="light"] .manage-item-sheet-badge.is-lemonade {
    color: #854d0e !important;
    background: #fef3c7 !important;
    border-color: #fcd34d !important;
}

/* Daily and monthly branch comparison labels. */
[data-bs-theme="light"] .daily-branch-rank,
[data-bs-theme="light"] .daily-branch-share-row > strong {
    color: #991b1b !important;
}

[data-bs-theme="light"] .branch-score-pct {
    color: #334155 !important;
}

[data-bs-theme="light"] .shift-detail-reference span,
[data-bs-theme="light"] .shift-review-card span,
[data-bs-theme="light"] .shift-money-grid span,
[data-bs-theme="light"] .shift-payment-grid span,
[data-bs-theme="light"] .shift-movement-list small,
[data-bs-theme="light"] .shift-detail-empty,
[data-bs-theme="light"] .shift-review-card p {
    color: #475569 !important;
    opacity: 1 !important;
}

/* Required marks and field icons in account/branch forms. */
[data-bs-theme="light"] #userModal .required-mark,
[data-bs-theme="light"] .branch-admin-page .required-mark,
[data-bs-theme="light"] .branch-admin-page .modal .text-danger {
    color: #b4233a !important;
}

[data-bs-theme="light"] #userModal .um-icon,
[data-bs-theme="light"] #userModal .profile-password-toggle,
[data-bs-theme="light"] #userModal .account-field .material-symbols-rounded {
    color: #64748b !important;
}

[data-bs-theme="light"] .profile-session-item strong em {
    color: #166534 !important;
    background: #dcfce7 !important;
    border: 1px solid #86efac !important;
}

[data-bs-theme="light"] .profile-danger-button,
[data-bs-theme="light"] .profile-text-button.is-danger {
    color: #991b1b !important;
    background: #fee2e2 !important;
    border-color: #fca5a5 !important;
}

[data-bs-theme="light"] .profile-danger-button:hover,
[data-bs-theme="light"] .profile-danger-button:focus-visible {
    color: #ffffff !important;
    background: #b91c1c !important;
    border-color: #991b1b !important;
}

[data-bs-theme="light"] .branch-staff-section > header > span {
    color: #166534 !important;
    background: #dcfce7 !important;
    border: 1px solid #86efac !important;
}

[data-bs-theme="light"] .branch-staff-avatar {
    color: #1d4ed8 !important;
    background: #dbeafe !important;
    border-color: #93c5fd !important;
}

[data-bs-theme="light"] .branch-manage-users-button {
    color: #1d4ed8 !important;
    background: #eff6ff !important;
    border-color: #93c5fd !important;
}

[data-bs-theme="light"] .branch-manage-users-button:hover,
[data-bs-theme="light"] .branch-manage-users-button:focus-visible {
    color: #ffffff !important;
    background: #1d4ed8 !important;
    border-color: #1e40af !important;
}

[data-bs-theme="light"] .img-upload-placeholder,
[data-bs-theme="light"] .img-upload-placeholder span,
[data-bs-theme="light"] .img-upload-placeholder small {
    color: #475569 !important;
    opacity: 1 !important;
}

/* Brand primary actions use a solid dark red in light mode so white labels
   meet contrast requirements without depending on a gradient calculation. */
[data-bs-theme="light"] .btn-primary,
[data-bs-theme="light"] .btn-danger,
[data-bs-theme="light"] .manage-users-primary-action,
[data-bs-theme="light"] .branch-primary-action,
[data-bs-theme="light"] .audit-primary-action,
[data-bs-theme="light"] .branch-details-edit-button,
[data-bs-theme="light"] .pos-process-btn,
[data-bs-theme="light"] .pos-pay-btn.active,
[data-bs-theme="light"] .category-filter.active {
    color: #ffffff !important;
    background: #b91c1c !important;
    border-color: #991b1b !important;
    background-image: none !important;
}

[data-bs-theme="light"] .badge.bg-primary {
    color: #ffffff !important;
    background: #1d4ed8 !important;
    border-color: #1e40af !important;
    background-image: none !important;
}

html[data-bs-theme="light"] body .reports-page .reports-filter-action > .btn.btn-primary {
    color: #ffffff !important;
    background: #b91c1c !important;
    border-color: #991b1b !important;
    background-image: none !important;
}

[data-bs-theme="light"] .audit-hero-action {
    color: #ffffff !important;
    background: #b91c1c !important;
    border-color: #991b1b !important;
    background-image: none !important;
}

[data-bs-theme="light"] .audit-hero-icon,
[data-bs-theme="light"] .audit-section-icon,
[data-bs-theme="light"] .audit-filter-status .material-symbols-rounded,
[data-bs-theme="light"] .audit-filter-note .material-symbols-rounded,
[data-bs-theme="light"] .audit-chip.active .material-symbols-rounded {
    color: #b4233a !important;
}

[data-bs-theme="light"] .audit-summary-icon.is-total {
    color: #b4233a !important;
    background: #fee2e2 !important;
}

[data-bs-theme="light"] .audit-summary-icon.is-important {
    color: #854d0e !important;
    background: #fef3c7 !important;
}

[data-bs-theme="light"] .audit-summary-icon.is-security {
    color: #9f1239 !important;
    background: #ffe4e6 !important;
}

[data-bs-theme="light"] .audit-summary-icon.is-inventory {
    color: #166534 !important;
    background: #dcfce7 !important;
}

[data-bs-theme="light"] .audit-summary-icon.is-total .material-symbols-rounded {
    color: #b4233a !important;
}

[data-bs-theme="light"] .audit-summary-icon.is-important .material-symbols-rounded {
    color: #854d0e !important;
}

[data-bs-theme="light"] .audit-summary-icon.is-security .material-symbols-rounded {
    color: #9f1239 !important;
}

[data-bs-theme="light"] .audit-summary-icon.is-inventory .material-symbols-rounded {
    color: #166534 !important;
}

[data-bs-theme="light"] .pos-process-btn .pos-kbd {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.16) !important;
}

[data-bs-theme="light"] #userModal .modal-title-icon .material-symbols-rounded,
[data-bs-theme="light"] #userModal .account-section-icon .material-symbols-rounded {
    color: #b4233a !important;
}

[data-bs-theme="light"] #userModal .role-context .material-symbols-rounded {
    color: #4338ca !important;
}

[data-bs-theme="light"] #userModal .modal-footer > p .material-symbols-rounded {
    color: #166534 !important;
}

[data-bs-theme="light"] .audit-hero p {
    color: #475569 !important;
}

[data-bs-theme="light"] .audit-chip:not(.active) .material-symbols-rounded {
    color: #475569 !important;
}

html[data-bs-theme="light"] body .sales-report-page .report-filters .btn.btn-primary {
    color: #ffffff !important;
    background: #b91c1c !important;
    border-color: #991b1b !important;
    background-image: none !important;
}
