
/* FiberX approved styles 21 / 1, light / dark */
html[data-fx-style]{--a-bg:#eaf6ff;--a-surface:#fff;--a-soft:#e0f1ff;--a-ink:#103669;--a-muted:#526d87;--a-border:#cde3f3;--a-primary:#0878df;--a-accent:#18aade;--a-hero:#0878df;--a-alt:#f3f9fe}
html[data-fx-style="1"]{--a-bg:#f0f4f8;--a-soft:#ddf4f1;--a-ink:#163252;--a-muted:#556d80;--a-border:#d7e2eb;--a-primary:#087e87;--a-accent:#13a8b1;--a-hero:#123969;--a-alt:#f5f8fa}
html[data-fx-mode="dark"]{--a-bg:#0c192b;--a-surface:#15283e;--a-soft:#203d58;--a-ink:#edf6ff;--a-muted:#afc4d8;--a-border:#30485f;--a-primary:#1686ed;--a-accent:#57caff;--a-hero:#0866bd;--a-alt:#192f47}
html[data-fx-style="1"][data-fx-mode="dark"]{--a-bg:#0b1922;--a-surface:#142c35;--a-soft:#21444b;--a-border:#31515a;--a-primary:#097e89;--a-accent:#55d6d0;--a-hero:#16456b;--a-alt:#1a353e}
html[data-fx-style] body{--fx-bg:var(--a-bg);--fx-surface:var(--a-surface);--fx-ink:var(--a-ink);--fx-muted:var(--a-muted);--fx-border:var(--a-border);--fx-purple:var(--a-primary);--fx-soft:var(--a-soft);background:var(--a-bg)!important;color:var(--a-ink)!important}
html[data-fx-style] body.fx-app .navbar-wrapper,html[data-fx-style] body.fx-app .fx-app-header{background:var(--a-bg)!important;border-color:var(--a-border)!important}
html[data-fx-style] body.fx-app .navbar-brand *,html[data-fx-style] body.fx-app .navbar-brand{color:var(--a-primary)!important}
html[data-fx-style] body.fx-app .navbar .btn,html[data-fx-style] body.fx-app .navbar .dropdown-item{color:var(--a-ink)!important}
html[data-fx-style] body.fx-app .navbar .btn:hover,html[data-fx-style] body.fx-app .navbar .dropdown-item:hover,html[data-fx-style] body.fx-app .navbar .dropdown-item.fx-active{background:var(--a-soft)!important;color:var(--a-ink)!important}
html[data-fx-style] body.fx-app .navbar .btn.fx-active{background:var(--a-primary)!important;color:white!important;box-shadow:none!important}
html[data-fx-style] body.fx-app .navbar .dropdown-menu{background:var(--a-surface)!important;border-color:var(--a-accent)!important}
html[data-fx-style] body .card,html[data-fx-style] body .stats-section,html[data-fx-style] body .fx-v3-table-shell,html[data-fx-style] body .modal-content,html[data-fx-style] body .dropdown-menu,html[data-fx-style] body .list-group-item{background:var(--a-surface)!important;color:var(--a-ink)!important;border-color:var(--a-border)!important}
html[data-fx-style] body .card-header,html[data-fx-style] body .modal-header,html[data-fx-style] body .modal-footer{background:var(--a-alt)!important;color:var(--a-ink)!important;border-color:var(--a-border)!important}
html[data-fx-style] body .text-muted,html[data-fx-style] body #fx-hybrid .fx-title p,html[data-fx-style] body #fx-hybrid .fx-brand small{color:var(--a-muted)!important}
html[data-fx-style] body .text-primary,html[data-fx-style] body .stats-section-title{color:var(--a-accent)!important}
html[data-fx-style] body .form-control,html[data-fx-style] body .form-select,html[data-fx-style] body textarea,html[data-fx-style] body .input-group-text{background-color:var(--a-surface)!important;color:var(--a-ink)!important;border-color:var(--a-border)!important}
html[data-fx-style] body .form-label,html[data-fx-style] body .fx-app-header strong{color:var(--a-ink)!important}
html[data-fx-style] body input::placeholder,html[data-fx-style] body textarea::placeholder{color:var(--a-muted)!important}
html[data-fx-style] body .btn-primary,html[data-fx-style] body.fx-app .fx-management-primary-actions .btn-primary{background:var(--a-primary)!important;border-color:var(--a-primary)!important;color:white!important}
html[data-fx-style] body .btn-outline-primary,html[data-fx-style] body .btn-outline-secondary,html[data-fx-style] body .fx-app-menu,html[data-fx-style] body .logout-above-nav button{background:var(--a-surface)!important;color:var(--a-ink)!important;border-color:var(--a-border)!important}
html[data-fx-style] body .fx-app-indicator{background:var(--a-soft)!important;color:var(--a-ink)!important;border-color:var(--a-border)!important}
html[data-fx-style] body .table{--bs-table-bg:var(--a-surface);--bs-table-color:var(--a-ink);--bs-table-striped-bg:var(--a-alt);--bs-table-striped-color:var(--a-ink);--bs-table-hover-bg:var(--a-soft);--bs-table-hover-color:var(--a-ink);background:var(--a-surface)!important;color:var(--a-ink)!important}
html[data-fx-style] body .table thead,html[data-fx-style] body .table thead th{background:var(--a-soft)!important;color:var(--a-ink)!important;border-color:var(--a-border)!important}
html[data-fx-style] body.fx-app .table tbody td,html[data-fx-style] body.fx-app .fx-v3-table-shell .table tbody tr td{background:var(--a-surface)!important;color:var(--a-ink)!important;border-color:var(--a-border)!important}
html[data-fx-style] body.fx-app .fx-v3-table-shell .table tbody tr:nth-child(even) td{background:var(--a-alt)!important}
html[data-fx-style] body.fx-app .table tbody tr:hover td{background:var(--a-soft)!important}
html[data-fx-style] body .page-link{background:var(--a-surface)!important;color:var(--a-ink)!important;border-color:var(--a-border)!important}
html[data-fx-style] body .active>.page-link{background:var(--a-primary)!important;color:white!important}
html[data-fx-style] body.fx-app #fx-hybrid .fx-card{background:var(--a-surface)!important;border:1px solid var(--a-border)!important;border-radius:18px!important;box-shadow:0 5px 16px #102b4610!important}
html[data-fx-style] body.fx-app #fx-hybrid .fx-card:after{display:none!important}
html[data-fx-style] body.fx-app #fx-hybrid .fx-label,html[data-fx-style] body.fx-app #fx-hybrid .fx-value,html[data-fx-style] body.fx-app #fx-hybrid .fx-title h1{color:var(--a-ink)!important}
html[data-fx-style] body.fx-app #fx-hybrid .fx-hero{background:var(--a-hero)!important;border-color:var(--a-hero)!important}
html[data-fx-style] body.fx-app #fx-hybrid .fx-hero .fx-label,html[data-fx-style] body.fx-app #fx-hybrid .fx-hero .fx-value{color:white!important}
html[data-fx-style] body.fx-app #fx-hybrid .fx-ico,html[data-fx-style] body.fx-app #fx-hybrid .fx-title-icon{background:var(--a-soft)!important;color:var(--a-accent)!important;border:0!important;box-shadow:none!important;border-radius:15px!important}
html[data-fx-style] body.fx-app #fx-hybrid .fx-ico{width:50px;height:50px;font-size:26px;flex-shrink:0}
html[data-fx-style] body.fx-app #fx-hybrid .fx-hero .fx-ico{background:#ffffff26!important;color:white!important}
html[data-fx-style] body.fx-app #fx-hybrid .fx-red .fx-ico{color:#ed405c!important}
html[data-fx-style] body.fx-app #fx-hybrid .fx-green .fx-ico{color:#10ad72!important}
html[data-fx-style] body.fx-app #fx-hybrid .fx-amber .fx-ico{color:#e89912!important}
html[data-fx-style] body.fx-app #fx-hybrid .fx-line{background:var(--a-accent)!important}
html[data-fx-style] body.fx-app #fx-hybrid .fx-logo{background:none!important;color:var(--a-ink)!important;-webkit-text-fill-color:var(--a-ink)!important}
html[data-fx-style] body.fx-app #fx-hybrid .fx-logo b{color:var(--a-accent)!important;-webkit-text-fill-color:var(--a-accent)!important}
html[data-fx-style] body.fx-app #fx-hybrid .fx-request-row .fx-card{flex-direction:column!important;justify-content:center!important;gap:16px!important;height:160px!important}
html[data-fx-style] body.fx-app .stat-card-compact{background:var(--a-surface)!important;color:var(--a-ink)!important;border-color:var(--a-border)!important}
html[data-fx-style] body :is(button,a,input,select,textarea):focus-visible{outline:3px solid var(--a-accent)!important;outline-offset:3px}
#fxAppearance{display:flex;align-items:center;gap:8px;margin-inline-start:auto;flex-shrink:0}
#fxStyleSelect,#fxModeToggle{height:38px;border:1px solid var(--a-border);background:var(--a-surface);color:var(--a-ink);border-radius:10px}
#fxStyleSelect{padding:0 8px;font-size:12px;max-width:150px}
#fxModeToggle{width:40px;display:grid;place-items:center;cursor:pointer}
#fxModeToggle svg{width:23px;height:23px}
.fx-appearance-floating{position:fixed;top:16px;left:16px;z-index:1050}
@media(max-width:700px){html[data-fx-style] body.fx-app .fx-app-header strong,html[data-fx-style] body.fx-app .fx-app-indicator{display:none}#fxStyleSelect{max-width:128px}.fx-app-header{gap:6px!important}}
@media print{#fxAppearance{display:none!important}html[data-fx-style]{--a-bg:#fff;--a-surface:#fff;--a-ink:#111;--a-muted:#444;--a-alt:#fff;--a-soft:#eee;--a-border:#ccc}}

/* dashboard action white labels */
html[data-fx-style] body.fx-app #fx-hybrid .fx-dashboard-actions .btn-primary,html[data-fx-style] body.fx-app #fx-hybrid .fx-dashboard-actions .btn-primary *{color:#fff!important;-webkit-text-fill-color:#fff!important}


/* FX dark-mode contrast fix — transactions only — 2026-09-26 */
html[data-fx-mode="dark"] body.fx-app.fx-transactions-v2-page .stat-card-compact .stat-label,
html[data-fx-mode="dark"] body.fx-app.fx-transactions-v2-page .stat-card-compact .stat-value,
html[data-fx-mode="dark"] body.fx-app.fx-transactions-v2-page .stat-card-compact.stat-total .stat-label,
html[data-fx-mode="dark"] body.fx-app.fx-transactions-v2-page .stat-card-compact.stat-total .stat-value,
html[data-fx-mode="dark"] body.fx-app.fx-transactions-v2-page .stat-card-compact.stat-success .stat-label,
html[data-fx-mode="dark"] body.fx-app.fx-transactions-v2-page .stat-card-compact.stat-success .stat-value,
html[data-fx-mode="dark"] body.fx-app.fx-transactions-v2-page .stat-card-compact.stat-danger .stat-label,
html[data-fx-mode="dark"] body.fx-app.fx-transactions-v2-page .stat-card-compact.stat-danger .stat-value,
html[data-fx-mode="dark"] body.fx-app.fx-transactions-v2-page .stat-card-compact.stat-warning .stat-label,
html[data-fx-mode="dark"] body.fx-app.fx-transactions-v2-page .stat-card-compact.stat-warning .stat-value,
html[data-fx-mode="dark"] body.fx-app.fx-transactions-v2-page .stat-card-compact.stat-info .stat-label,
html[data-fx-mode="dark"] body.fx-app.fx-transactions-v2-page .stat-card-compact.stat-info .stat-value,
html[data-fx-mode="dark"] body.fx-app.fx-transactions-v2-page .stat-card-compact.stat-primary .stat-label,
html[data-fx-mode="dark"] body.fx-app.fx-transactions-v2-page .stat-card-compact.stat-primary .stat-value,
html[data-fx-mode="dark"] body.fx-app.fx-transactions-v2-page .stat-card-compact.stat-secondary .stat-label,
html[data-fx-mode="dark"] body.fx-app.fx-transactions-v2-page .stat-card-compact.stat-secondary .stat-value,
html[data-fx-mode="dark"] body.fx-app.fx-transactions-v2-page .stat-card-compact.stat-dark .stat-label,
html[data-fx-mode="dark"] body.fx-app.fx-transactions-v2-page .stat-card-compact.stat-dark .stat-value {
  color:#f4f8ff!important;
  -webkit-text-fill-color:#f4f8ff!important;
  text-shadow:0 1px 2px rgba(0,0,0,.55)!important;
}
html[data-fx-mode="dark"] body.fx-app.fx-transactions-v2-page .fx-management-title,
html[data-fx-mode="dark"] body.fx-app.fx-transactions-v2-page .fx-management-title span,
html[data-fx-mode="dark"] body.fx-app.fx-transactions-v2-page .fx-management-title i,
html[data-fx-mode="dark"] body.fx-app.fx-transactions-v2-page .fx-v3-result-pill {
  color:#edf6ff!important;
  -webkit-text-fill-color:#edf6ff!important;
}
html[data-fx-mode="dark"] body.fx-app.fx-transactions-v2-page .search-form-compact,
html[data-fx-mode="dark"] body.fx-app.fx-transactions-v2-page .search-form-compact label,
html[data-fx-mode="dark"] body.fx-app.fx-transactions-v2-page .search-form-compact .form-control,
html[data-fx-mode="dark"] body.fx-app.fx-transactions-v2-page .search-form-compact .form-select,
html[data-fx-mode="dark"] body.fx-app.fx-transactions-v2-page .search-form-compact .btn,
html[data-fx-mode="dark"] body.fx-app.fx-transactions-v2-page .text-muted {
  color:#d7e5f2!important;
  -webkit-text-fill-color:#d7e5f2!important;
}
html[data-fx-mode="dark"] body.fx-app.fx-transactions-v2-page input::placeholder,
html[data-fx-mode="dark"] body.fx-app.fx-transactions-v2-page textarea::placeholder {
  color:#9fb5c9!important;
  opacity:1!important;
}
html[data-fx-mode="dark"] body.fx-app.fx-transactions-v2-page .table,
html[data-fx-mode="dark"] body.fx-app.fx-transactions-v2-page .table td,
html[data-fx-mode="dark"] body.fx-app.fx-transactions-v2-page .table th {
  color:#edf6ff!important;
  -webkit-text-fill-color:#edf6ff!important;
}
html[data-fx-mode="dark"] body.fx-app .navbar .btn,
html[data-fx-mode="dark"] body.fx-app .navbar .btn span,
html[data-fx-mode="dark"] body.fx-app .navbar .btn i,
html[data-fx-mode="dark"] body.fx-app .navbar .dropdown-item,
html[data-fx-mode="dark"] body.fx-app .navbar .dropdown-item span,
html[data-fx-mode="dark"] body.fx-app .navbar .dropdown-item i {
  color:#e8f2fb!important;
  -webkit-text-fill-color:#e8f2fb!important;
  opacity:1!important;
}
html[data-fx-mode="dark"] body.fx-app .navbar .btn.fx-active,
html[data-fx-mode="dark"] body.fx-app .navbar .btn.fx-active span,
html[data-fx-mode="dark"] body.fx-app .navbar .btn.fx-active i,
html[data-fx-mode="dark"] body.fx-app .navbar .dropdown-item.fx-active,
html[data-fx-mode="dark"] body.fx-app .navbar .dropdown-item.fx-active span,
html[data-fx-mode="dark"] body.fx-app .navbar .dropdown-item.fx-active i {
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
}


/* FX dark-mode final contrast patch — 2026-09-26 12:45 */
html[data-fx-mode="dark"] body.fx-app .stat-card-compact .stat-label,
html[data-fx-mode="dark"] body.fx-app .stat-card-compact .stat-label *,
html[data-fx-mode="dark"] body.fx-app .stat-card-compact .stat-value {
  color:#f8fbff!important;
  -webkit-text-fill-color:#f8fbff!important;
  text-shadow:0 1px 2px rgba(0,0,0,.65)!important;
  opacity:1!important;
}
html[data-fx-mode="dark"] body.fx-app .fx-management-title,
html[data-fx-mode="dark"] body.fx-app .fx-management-title *,
html[data-fx-mode="dark"] body.fx-app .fx-v3-result-pill {
  color:#f3f8ff!important;
  -webkit-text-fill-color:#f3f8ff!important;
  opacity:1!important;
}
html[data-fx-mode="dark"] body.fx-app .fx-management-card,
html[data-fx-mode="dark"] body.fx-app .fx-v3-toolbar {
  color:#f3f8ff!important;
}


/* =====================================================================
   FiberX site-wide dark-mode audit/fix — 2026-09-26
   Scope: authenticated app pages only. Light mode is untouched.
   ===================================================================== */
html[data-fx-mode="dark"] body.fx-app {
  color:var(--a-ink)!important;
}

/* Bootstrap/common text that otherwise stays dark */
html[data-fx-mode="dark"] body.fx-app :is(
  .text-dark,.text-black,.text-secondary,
  .card-title,.card-subtitle,.modal-title,.offcanvas-title,
  .form-label,.col-form-label,.dropdown-header,
  .list-group-item,.accordion-button,.accordion-body
){
  color:var(--a-ink)!important;
  -webkit-text-fill-color:var(--a-ink)!important;
}
html[data-fx-mode="dark"] body.fx-app :is(
  .text-muted,.small,.form-text,.helptext,
  .card-text.text-muted,.route-meta,.stops-legend
){
  color:var(--a-muted)!important;
  -webkit-text-fill-color:var(--a-muted)!important;
}

/* Common light surfaces */
html[data-fx-mode="dark"] body.fx-app :is(
  .bg-white,.bg-light,.bg-body,.bg-body-tertiary,
  .list-group-item,.accordion-item,.accordion-button,
  .offcanvas,.toast,.popover
){
  background-color:var(--a-surface)!important;
  border-color:var(--a-border)!important;
}
html[data-fx-mode="dark"] body.fx-app .accordion-button:not(.collapsed){
  background-color:var(--a-soft)!important;
}

/* Common forms */
html[data-fx-mode="dark"] body.fx-app :is(
  input:not([type="checkbox"]):not([type="radio"]),
  select,textarea,.form-control,.form-select,.input-group-text
){
  background-color:var(--a-surface)!important;
  color:var(--a-ink)!important;
  border-color:var(--a-border)!important;
  caret-color:var(--a-ink)!important;
}
html[data-fx-mode="dark"] body.fx-app :is(input,textarea)::placeholder{
  color:var(--a-muted)!important;
  opacity:1!important;
}
html[data-fx-mode="dark"] body.fx-app input[type="date"]::-webkit-calendar-picker-indicator{
  filter:invert(1) brightness(1.35);
}

/* Fixed dark inline text found in the site audit */
html[data-fx-mode="dark"] body.fx-app [style*="color:#0f172a"],
html[data-fx-mode="dark"] body.fx-app [style*="color: #0f172a"],
html[data-fx-mode="dark"] body.fx-app [style*="color:#111827"],
html[data-fx-mode="dark"] body.fx-app [style*="color: #111827"],
html[data-fx-mode="dark"] body.fx-app [style*="color:#000000"],
html[data-fx-mode="dark"] body.fx-app [style*="color: #000000"],
html[data-fx-mode="dark"] body.fx-app [style*="color:#000;"],
html[data-fx-mode="dark"] body.fx-app [style*="color: #000;"],
html[data-fx-mode="dark"] body.fx-app [style*="color:#334155"],
html[data-fx-mode="dark"] body.fx-app [style*="color: #334155"],
html[data-fx-mode="dark"] body.fx-app [style*="color:#374151"],
html[data-fx-mode="dark"] body.fx-app [style*="color: #374151"],
html[data-fx-mode="dark"] body.fx-app [style*="color:#475569"],
html[data-fx-mode="dark"] body.fx-app [style*="color: #475569"]{
  color:var(--a-ink)!important;
  -webkit-text-fill-color:var(--a-ink)!important;
}
html[data-fx-mode="dark"] body.fx-app [style*="color:#64748b"],
html[data-fx-mode="dark"] body.fx-app [style*="color: #64748b"]{
  color:var(--a-muted)!important;
  -webkit-text-fill-color:var(--a-muted)!important;
}

/* Fixed light inline panels found in notes/office/forms */
html[data-fx-mode="dark"] body.fx-app [style*="background:#f8fafc"],
html[data-fx-mode="dark"] body.fx-app [style*="background: #f8fafc"],
html[data-fx-mode="dark"] body.fx-app [style*="background:#f1f5f9"],
html[data-fx-mode="dark"] body.fx-app [style*="background: #f1f5f9"]{
  background:var(--a-alt)!important;
  border-color:var(--a-border)!important;
}
html[data-fx-mode="dark"] body.fx-app [style*="background:#e2e8f0"],
html[data-fx-mode="dark"] body.fx-app [style*="background: #e2e8f0"]{
  background:var(--a-soft)!important;
  border-color:var(--a-border)!important;
}

/* Notifications / quick-note surfaces had hard-coded light palette */
html[data-fx-mode="dark"] body.fx-app #systemNotifDropdown .dropdown-menu,
html[data-fx-mode="dark"] body.fx-app #systemNotifList .dropdown-item,
html[data-fx-mode="dark"] body.fx-app #systemNotifList .system-notif-item{
  background:var(--a-surface)!important;
  color:var(--a-ink)!important;
  border-color:var(--a-border)!important;
}
html[data-fx-mode="dark"] body.fx-app #systemNotifList .dropdown-item:hover,
html[data-fx-mode="dark"] body.fx-app #systemNotifList .system-notif-item:hover,
html[data-fx-mode="dark"] body.fx-app #systemNotifDropdown .system-notif-hint{
  background:var(--a-alt)!important;
}
html[data-fx-mode="dark"] body.fx-app #systemNotifList :is(.system-notif-title,.system-notif-msg){
  color:var(--a-ink)!important;
}
html[data-fx-mode="dark"] body.fx-app #systemNotifList .system-notif-time,
html[data-fx-mode="dark"] body.fx-app #systemNotifDropdown .system-notif-hint{
  color:var(--a-muted)!important;
}

/* Page-specific classes detected by audit */
html[data-fx-mode="dark"] body.fx-app :is(
  .ea-table-card tbody td,
  .sw-table-card tbody td,
  .mt-table-card tbody td,
  .reminder-alert table tbody td,
  .pkg-card .pkg-name,
  .summary-detail-card .sd-name,
  .att-top-card .val,
  .achievement-modal .form-label,
  .date-text,
  .target-table th,
  .adjustment-log-table th
){
  color:var(--a-ink)!important;
}
html[data-fx-mode="dark"] body.fx-app :is(
  .pkg-card .pkg-unit,
  .summary-detail-card .sd-count,
  .office-card p,
  .achievement-summary small,
  .att-notes
){
  color:var(--a-muted)!important;
}
html[data-fx-mode="dark"] body.fx-app :is(.target-table th,.adjustment-log-table th,.att-notes){
  background:var(--a-alt)!important;
  border-color:var(--a-border)!important;
}

/* Navbar legacy theme rules had hard-coded black muted text */
html[data-fx-mode="dark"] body.fx-app .navbar .text-muted,
html[data-fx-mode="dark"] body.fx-app.theme-modern .navbar .text-muted,
html[data-fx-mode="dark"] body.fx-app.theme-warm .navbar .text-muted{
  color:var(--a-ink)!important;
  -webkit-text-fill-color:var(--a-ink)!important;
  text-shadow:none!important;
}

/* Preserve semantic button/badge contrast */
html[data-fx-mode="dark"] body.fx-app :is(
  .btn-primary,.btn-success,.btn-danger,.btn-warning,.btn-info,
  .badge.bg-primary,.badge.bg-success,.badge.bg-danger,.badge.bg-warning,.badge.bg-info
){
  -webkit-text-fill-color:currentColor;
}


/* Site-wide dark audit — targeted legacy page components */
html[data-fx-mode="dark"] body.fx-app :is(
  .es-form-card,.es-table-card,
  .form-card,.table-card,
  .sw-form-card,.sw-table-card,
  .up-card,.up-header,.up-user,
  .gps-map-toolbar,.gps-legend-pill,
  .rem-picker,.rem-group,.rem-cells
){
  background:var(--a-surface)!important;
  color:var(--a-ink)!important;
  border-color:var(--a-border)!important;
}
html[data-fx-mode="dark"] body.fx-app :is(
  .es-form-row .form-group label,
  .es-table tbody td,
  .es-amount,.es-desc,
  .form-row .form-group label,
  .receipts-table tbody td,
  .date-text,
  .sw-form-row .form-group label,
  .sw-table-card tbody td,
  .gps-map-toolbar-title,
  .up-header h2,.up-user strong,.up-label,
  .tx-form-card .form-label,
  .rem-cell input
){
  color:var(--a-ink)!important;
  -webkit-text-fill-color:var(--a-ink)!important;
}
html[data-fx-mode="dark"] body.fx-app :is(
  .stat-label,
  .gps-legend-pill,
  #lastUpdate,
  .up-user,
  .rem-group-label,
  .rem-cell label
){
  color:var(--a-muted)!important;
  -webkit-text-fill-color:var(--a-muted)!important;
}
html[data-fx-mode="dark"] body.fx-app .es-table thead th{
  background:var(--a-soft)!important;
  color:var(--a-ink)!important;
  border-color:var(--a-border)!important;
}
html[data-fx-mode="dark"] body.fx-app .es-table tbody tr,
html[data-fx-mode="dark"] body.fx-app .es-table tbody tr:nth-child(even),
html[data-fx-mode="dark"] body.fx-app .receipts-table tbody tr,
html[data-fx-mode="dark"] body.fx-app .receipts-table tbody tr:nth-child(even),
html[data-fx-mode="dark"] body.fx-app .sw-table-card tbody tr{
  background:var(--a-surface)!important;
  border-color:var(--a-border)!important;
}
html[data-fx-mode="dark"] body.fx-app .es-table tbody tr:hover,
html[data-fx-mode="dark"] body.fx-app .receipts-table tbody tr:hover,
html[data-fx-mode="dark"] body.fx-app .receipts-table tbody tr:nth-child(even):hover,
html[data-fx-mode="dark"] body.fx-app .sw-table-card tbody tr:hover{
  background:var(--a-soft)!important;
}
html[data-fx-mode="dark"] body.fx-app .stat-card:not(.stat-card-compact){
  background:var(--a-alt)!important;
  border-color:var(--a-border)!important;
}
html[data-fx-mode="dark"] body.fx-app .gps-map-page{
  background:var(--a-bg)!important;
}
html[data-fx-mode="dark"] body.fx-app .rem-picker{
  background:var(--a-alt)!important;
}
html[data-fx-mode="dark"] body.fx-app .rem-cells{
  background:var(--a-alt)!important;
}
html[data-fx-mode="dark"] body.fx-app .rem-cell + .rem-cell::before{
  background:var(--a-border)!important;
}
html[data-fx-mode="dark"] body.fx-app .rem-clear-btn{
  background:var(--a-soft)!important;
  color:var(--a-muted)!important;
}
html[data-fx-mode="dark"] body.fx-app .up-header,
html[data-fx-mode="dark"] body.fx-app .up-user{
  background:var(--a-alt)!important;
}

/* Keep bright semantic headers/buttons intact while fixing their surrounding panels */
html[data-fx-mode="dark"] body.fx-app :is(
  .es-header,.receipts-header,.table-head,
  .sw-table-card-green thead th,.sw-table-card-blue thead th
){
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}


/* FX APPROVED SIDEBAR — selected layout 2026-09-27 */
html[data-fx-style] body.fx-app .navbar-wrapper{
  inset:12px 12px 12px auto!important;
  width:236px!important;
  height:calc(100dvh - 24px)!important;
  padding:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  background:linear-gradient(180deg,var(--a-bg) 0%,color-mix(in srgb,var(--a-bg) 88%,white) 100%)!important;
  border:1px solid var(--a-border)!important;
  border-radius:20px!important;
  box-shadow:0 10px 34px rgba(16,54,105,.10)!important;
}
html[data-fx-style] body.fx-app .navbar-wrapper .navbar{
  padding:18px 12px!important;
  border-radius:20px!important;
}
html[data-fx-style] body.fx-app .navbar-brand{
  min-height:74px!important;
  margin:0 0 14px!important;
  padding:14px 10px!important;
  border-radius:16px!important;
}
html[data-fx-style] body.fx-app #navbarNav>div{
  gap:8px!important;
}
html[data-fx-style] body.fx-app .navbar .btn{
  position:relative!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  direction:rtl!important;
  width:100%!important;
  min-height:54px!important;
  padding:8px 10px!important;
  gap:10px!important;
  border:1px solid var(--a-border)!important;
  border-radius:15px!important;
  background:color-mix(in srgb,var(--a-surface) 94%,var(--a-bg))!important;
  color:var(--a-ink)!important;
  box-shadow:0 4px 14px rgba(16,54,105,.05)!important;
  font-size:12px!important;
  font-weight:700!important;
  text-decoration:none!important;
  overflow:hidden!important;
}
html[data-fx-style] body.fx-app .navbar .btn > i{
  display:inline-grid!important;
  place-items:center!important;
  flex:0 0 34px!important;
  width:34px!important;
  height:34px!important;
  margin:0!important;
  border-radius:11px!important;
  background:var(--a-soft)!important;
  color:var(--a-primary)!important;
  font-size:17px!important;
}
html[data-fx-style] body.fx-app .navbar .btn:hover{
  background:color-mix(in srgb,var(--a-soft) 54%,var(--a-surface))!important;
  border-color:color-mix(in srgb,var(--a-primary) 28%,var(--a-border))!important;
  transform:none!important;
}
html[data-fx-style] body.fx-app .navbar .btn.fx-active{
  background:linear-gradient(90deg,color-mix(in srgb,var(--a-primary) 10%,var(--a-surface)),color-mix(in srgb,var(--a-accent) 7%,var(--a-surface)))!important;
  color:var(--a-ink)!important;
  border-color:color-mix(in srgb,var(--a-primary) 55%,var(--a-border))!important;
  box-shadow:0 5px 16px rgba(8,120,223,.10)!important;
}
html[data-fx-style] body.fx-app .navbar .btn.fx-active::after{
  content:""!important;
  position:absolute!important;
  top:8px!important;
  right:0!important;
  width:4px!important;
  height:calc(100% - 16px)!important;
  border-radius:4px 0 0 4px!important;
  background:var(--a-primary)!important;
}
html[data-fx-style] body.fx-app .navbar .btn.fx-active > i{
  background:color-mix(in srgb,#9ff3df 58%,var(--a-soft))!important;
  color:#078f88!important;
}
html[data-fx-style] body.fx-app .navbar .dropdown{
  width:100%!important;
}
html[data-fx-style] body.fx-app .navbar .dropdown-toggle::after{
  margin-inline-start:auto!important;
  margin-inline-end:0!important;
}
html[data-fx-style] body.fx-app .navbar .dropdown-menu{
  width:calc(100% - 8px)!important;
  margin:2px 4px 6px!important;
  padding:6px!important;
  border:1px solid var(--a-border)!important;
  border-right:1px solid var(--a-border)!important;
  border-radius:12px!important;
  background:color-mix(in srgb,var(--a-surface) 96%,var(--a-bg))!important;
  box-shadow:none!important;
}
html[data-fx-style] body.fx-app .navbar .dropdown-item{
  min-height:40px!important;
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  border-radius:9px!important;
  padding:8px 9px!important;
}
html[data-fx-style] body.fx-app .navbar .dropdown-item i{
  display:inline-grid!important;
  place-items:center!important;
  width:28px!important;
  height:28px!important;
  margin:0!important;
  border-radius:9px!important;
  background:var(--a-soft)!important;
  color:var(--a-primary)!important;
}
html[data-fx-style] body.fx-app .fx-app-header{
  right:260px!important;
}
@media(max-width:991px){
  html[data-fx-style] body.fx-app .navbar-wrapper{
    inset:10px 10px 10px auto!important;
    width:min(86vw,260px)!important;
    height:calc(100dvh - 20px)!important;
  }
  html[data-fx-style] body.fx-app.fx-nav-open .navbar-wrapper{display:block!important}
}
html[data-fx-mode="dark"] body.fx-app .navbar-wrapper{
  background:linear-gradient(180deg,var(--a-bg),color-mix(in srgb,var(--a-bg) 86%,#16344f))!important;
  box-shadow:0 10px 34px rgba(0,0,0,.28)!important;
}
html[data-fx-mode="dark"] body.fx-app .navbar .btn{
  background:color-mix(in srgb,var(--a-surface) 94%,var(--a-bg))!important;
  border-color:var(--a-border)!important;
}
html[data-fx-mode="dark"] body.fx-app .navbar .btn.fx-active{
  background:color-mix(in srgb,var(--a-primary) 18%,var(--a-surface))!important;
  color:#fff!important;
}
