@import url('https://fonts.googleapis.com/css2?family=Inter:wght@500;600;700&display=swap');

/* BAFF OS application theme — final cascade layer for a consistent desktop-app UI. */
:root{
  --app-green-950:#043328;--app-green-900:#07503e;--app-green-800:#086348;
  --app-green-700:#087a55;--app-green-600:#0b8f55;--app-green-500:#10a86d;
  --app-mint-100:#daf4e7;--app-mint-50:#eff9f4;--app-gold:#c8a45d;
  --app-gold-soft:#f2e8d2;--app-canvas:#f1f5f3;--app-surface:#fff;
  --app-surface-2:#f7faf8;--app-text:#14221c;--app-muted:#68766f;
  --app-border:#dce6e1;--app-danger:#c9363e;--app-warning:#e7981b;
  --app-info:#3478d4;--app-radius:16px;--app-radius-sm:10px;
  --app-shadow:0 1px 2px rgba(4,51,40,.04),0 10px 30px rgba(4,51,40,.07);
  --app-shadow-hover:0 2px 4px rgba(4,51,40,.06),0 16px 36px rgba(4,51,40,.12);
  --black:var(--app-text);--cream:var(--app-canvas);--white:#fff;--grey:var(--app-muted);
  --danger:var(--app-danger);--ok:var(--app-green-700);
  --baff-page-bg:var(--app-canvas);--baff-surface:var(--app-surface);
  --baff-text:var(--app-text);--baff-muted:var(--app-muted);--baff-gold:var(--app-gold);
  --baff-success:var(--app-green-700);--baff-border:var(--app-border);
  --baff-nav-bg:var(--app-green-950);--baff-nav-bg-deep:#02271f;
  --baff-nav-active-bg:var(--app-green-700);--baff-nav-active-text:#fff;
}

/* ================================================================
   BAFF OS — GLOBAL NIGHT / SYSTEM-DARK RECORD READABILITY
   Keeps operational record rows light and legible while preserving
   the approved dark application shell. Day mode is intentionally
   untouched. Visual POS retains its dedicated checkout treatment.
   ================================================================ */

html[data-theme="night"] body:not([data-module="visual_pos"]) .content :is(label, .field-label, .filter-label),
html[data-theme="night"] body:not([data-module="visual_pos"]) .content :is(.po-panel, .accountant-card, .accountant-form, .finance-card, .inventory-card) label {
    color: #dce9e2 !important;
    opacity: 1 !important;
}

html[data-theme="night"] body:not([data-module="visual_pos"]) .content :is(input, select, textarea) {
    background: #272824 !important;
    color: #ffffff !important;
    border-color: #68736e !important;
}

html[data-theme="night"] body:not([data-module="visual_pos"]) .content :is(input, textarea)::placeholder {
    color: #c3cbc7 !important;
    opacity: 1 !important;
}

html[data-theme="night"] body:not([data-module="visual_pos"]) .content table thead th {
    background: #303246 !important;
    color: #f8f3e9 !important;
    opacity: 1 !important;
}

html[data-theme="night"] body:not([data-module="visual_pos"]) .content table tbody tr {
    background: #f8fbf9 !important;
}

html[data-theme="night"] body:not([data-module="visual_pos"]) .content table tbody tr:nth-child(even) {
    background: #edf6f1 !important;
}

html[data-theme="night"] body:not([data-module="visual_pos"]) .content table tbody tr:hover {
    background: #e1f0e8 !important;
}

html[data-theme="night"] body:not([data-module="visual_pos"]) .content table tbody td,
html[data-theme="night"] body:not([data-module="visual_pos"]) .content table tbody td :is(span, small, strong, div, p) {
    color: #172820 !important;
    opacity: 1 !important;
}

html[data-theme="night"] body:not([data-module="visual_pos"]) .content table tbody a {
    color: #087657 !important;
    opacity: 1 !important;
}

html[data-theme="night"] body:not([data-module="visual_pos"]) .content table tbody :is(.badge, .status-pill, .accountant-status, .po-status) {
    background: #37433e !important;
    color: #ffffff !important;
    opacity: 1 !important;
}

html[data-theme="night"] body:not([data-module="visual_pos"]) .content :is(.payroll-preparation-empty, .payroll-period-empty, td[colspan]) {
    color: #263a31 !important;
    opacity: 1 !important;
}

@media (prefers-color-scheme: dark) {
    html[data-theme="system"] body:not([data-module="visual_pos"]) .content :is(label, .field-label, .filter-label),
    html[data-theme="system"] body:not([data-module="visual_pos"]) .content :is(.po-panel, .accountant-card, .accountant-form, .finance-card, .inventory-card) label {
        color: #dce9e2 !important;
        opacity: 1 !important;
    }

    html[data-theme="system"] body:not([data-module="visual_pos"]) .content :is(input, select, textarea) {
        background: #272824 !important;
        color: #ffffff !important;
        border-color: #68736e !important;
    }

    html[data-theme="system"] body:not([data-module="visual_pos"]) .content :is(input, textarea)::placeholder {
        color: #c3cbc7 !important;
        opacity: 1 !important;
    }

    html[data-theme="system"] body:not([data-module="visual_pos"]) .content table thead th {
        background: #303246 !important;
        color: #f8f3e9 !important;
        opacity: 1 !important;
    }

    html[data-theme="system"] body:not([data-module="visual_pos"]) .content table tbody tr {
        background: #f8fbf9 !important;
    }

    html[data-theme="system"] body:not([data-module="visual_pos"]) .content table tbody tr:nth-child(even) {
        background: #edf6f1 !important;
    }

    html[data-theme="system"] body:not([data-module="visual_pos"]) .content table tbody tr:hover {
        background: #e1f0e8 !important;
    }

    html[data-theme="system"] body:not([data-module="visual_pos"]) .content table tbody td,
    html[data-theme="system"] body:not([data-module="visual_pos"]) .content table tbody td :is(span, small, strong, div, p) {
        color: #172820 !important;
        opacity: 1 !important;
    }

    html[data-theme="system"] body:not([data-module="visual_pos"]) .content table tbody a {
        color: #087657 !important;
        opacity: 1 !important;
    }

    html[data-theme="system"] body:not([data-module="visual_pos"]) .content table tbody :is(.badge, .status-pill, .accountant-status, .po-status) {
        background: #37433e !important;
        color: #ffffff !important;
        opacity: 1 !important;
    }

    html[data-theme="system"] body:not([data-module="visual_pos"]) .content :is(.payroll-preparation-empty, .payroll-period-empty, td[colspan]) {
        color: #263a31 !important;
        opacity: 1 !important;
    }
}

/* Final POS customer-choice cascade (must remain after Night workspace rules). */
body[data-module="visual_pos"] .vpos .customer-mode-option.customer-mode-walk-in,
html[data-theme="night"] body[data-module="visual_pos"] .vpos .customer-mode-option.customer-mode-walk-in{background:#c89b3c!important;color:#17211d!important;border:2px solid #a77922!important;box-shadow:0 5px 12px rgba(105,76,20,.16)!important}
body[data-module="visual_pos"] .vpos .customer-mode-option.customer-mode-existing,
html[data-theme="night"] body[data-module="visual_pos"] .vpos .customer-mode-option.customer-mode-existing{background:#0b8f55!important;color:#fff!important;border:2px solid #076b40!important;box-shadow:0 5px 12px rgba(4,91,53,.18)!important}
body[data-module="visual_pos"] .vpos .customer-mode-option.customer-mode-walk-in :is(.customer-mode-icon,.customer-mode-check),
html[data-theme="night"] body[data-module="visual_pos"] .vpos .customer-mode-option.customer-mode-walk-in :is(.customer-mode-icon,.customer-mode-check){color:#17211d!important}
body[data-module="visual_pos"] .vpos .customer-mode-option.customer-mode-existing :is(.customer-mode-icon,.customer-mode-check),
html[data-theme="night"] body[data-module="visual_pos"] .vpos .customer-mode-option.customer-mode-existing :is(.customer-mode-icon,.customer-mode-check){color:#fff!important}
body[data-module="visual_pos"] .vpos .customer-mode-option.is-selected{outline:3px solid rgba(200,155,60,.42)!important;outline-offset:2px!important}
@media(prefers-color-scheme:dark){
  html[data-theme="system"] body[data-module="visual_pos"] .vpos .customer-mode-option.customer-mode-walk-in{background:#c89b3c!important;color:#17211d!important;border:2px solid #a77922!important}
  html[data-theme="system"] body[data-module="visual_pos"] .vpos .customer-mode-option.customer-mode-existing{background:#0b8f55!important;color:#fff!important;border:2px solid #076b40!important}
}

/* Final basket and Cash refinements after every theme rule. */
body[data-module="visual_pos"] .vpos .basket-line{grid-template-columns:52px minmax(0,1fr) auto!important;gap:12px!important;padding:14px 0!important}
body[data-module="visual_pos"] .vpos .basket-line img{width:52px!important;height:52px!important}
body[data-module="visual_pos"] .vpos .basket-line strong{font-size:1rem!important;line-height:1.3!important;font-weight:750!important;color:#17211d!important}
body[data-module="visual_pos"] .vpos .basket-line small{display:block!important;margin-top:5px!important;font-size:.78rem!important;line-height:1.4!important;color:#68766f!important}
body[data-module="visual_pos"] .vpos .basket-line .remove{margin-top:5px!important;font-size:.75rem!important;font-weight:750!important;color:#a52d35!important}
body[data-module="visual_pos"] .vpos .payment-cash{--method-bg:#0b9b72!important;--method-border:#067554!important;--method-text:#fff!important;--method-icon:#fff!important;--method:#067554!important;background:#0b9b72!important;color:#fff!important;border-color:#067554!important}
body[data-module="visual_pos"] .vpos .payment-cash :is(.payment-name,.payment-icon,.payment-check,.selected-label){color:#fff!important}

/* Match Executive Dashboard KPI figures to Detailed Executive Intelligence. */
body[data-module="executive_dashboard"] .visual-kpis .visual-value{
  font-family:var(--font-numeric,var(--app-font-ui))!important;
  font-size:clamp(1.55rem,2.4vw,2.1rem)!important;
  font-weight:var(--weight-semibold,600)!important;
  line-height:1.12!important;
  letter-spacing:-.025em!important;
  font-variant-numeric:tabular-nums lining-nums!important;
  white-space:nowrap!important;
}
body[data-module="executive_dashboard"] .visual-kpis .kpi-label{
  font-size:.72rem!important;
  line-height:1.35!important;
}
body[data-module="executive_dashboard"] .visual-kpis .kpi-card small{
  font-size:.72rem!important;
  line-height:1.4!important;
}
body[data-module="executive_dashboard"] .visual-kpis :is(.kpi-sales,.kpi-average) .visual-value{
  font-size:clamp(1.42rem,1.75vw,1.72rem)!important;
  letter-spacing:-.035em!important;
}
body[data-module="visual_pos"] .vpos .payment-cash .payment-icon{background:rgba(255,255,255,.16)!important;border-color:rgba(255,255,255,.32)!important}
body[data-module="visual_pos"] .vpos .payment-cash.is-selected{background:#0b9b72!important;box-shadow:0 0 0 3px rgba(11,155,114,.24),0 7px 16px rgba(6,117,84,.2)!important}

/* Final fit safeguard for long Executive Dashboard currency values. */
.visual-kpis :is(.kpi-sales,.kpi-average) .visual-value{
  max-width:100%!important;
  font-family:var(--font-numeric,var(--app-font-ui))!important;
  font-size:clamp(1.22rem,1.35vw,1.48rem)!important;
  font-weight:var(--weight-semibold,600)!important;
  line-height:1.12!important;
  letter-spacing:-.04em!important;
  font-variant-numeric:tabular-nums lining-nums!important;
  white-space:nowrap!important;
  overflow:visible!important;
}

/* Authoritative readable navigation typography. */
.sidebar .nav-group-toggle,
.sidebar .nav-section{
  min-height:48px!important;
  font-family:var(--app-font-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif)!important;
  font-size:1.03rem!important;
  font-weight:750!important;
  line-height:1.28!important;
  letter-spacing:.005em!important;
}
.sidebar .nav-group-panel a,
.sidebar>nav>a{
  min-height:43px!important;
  padding:10px 13px!important;
  font-family:var(--app-font-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif)!important;
  font-size:.97rem!important;
  font-weight:560!important;
  line-height:1.34!important;
  letter-spacing:.003em!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}

/* BAFF luxury vertical navigation gradient. */
.sidebar{
  background:linear-gradient(
    180deg,
    #031f19 0%,
    #064333 30%,
    #087052 67%,
    #0a8c64 100%
  )!important;
  background-attachment:local!important;
}
.sidebar .nav-group-panel{
  gap:2px!important;
}

/* Authoritative readable navigation typography. */
.sidebar .nav-group-toggle,
.sidebar .nav-section{
  min-height:48px!important;
  font-family:var(--app-font-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif)!important;
  font-size:1.03rem!important;
  font-weight:750!important;
  line-height:1.28!important;
  letter-spacing:.005em!important;
}
.sidebar .nav-group-panel a,
.sidebar>nav>a{
  min-height:43px!important;
  padding:10px 13px!important;
  font-family:var(--app-font-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif)!important;
  font-size:.97rem!important;
  font-weight:560!important;
  line-height:1.34!important;
  letter-spacing:.003em!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}
.sidebar .nav-group-panel{
  gap:2px!important;
}

/* POS basket legibility and vivid Cash payment identity. */
body[data-module="visual_pos"] .vpos .basket-line{grid-template-columns:52px minmax(0,1fr) auto!important;gap:12px!important;padding:14px 0!important}
body[data-module="visual_pos"] .vpos .basket-line img{width:52px!important;height:52px!important}
body[data-module="visual_pos"] .vpos .basket-line strong{font-size:1rem!important;line-height:1.3!important;font-weight:750!important;color:#17211d!important}
body[data-module="visual_pos"] .vpos .basket-line small{display:block!important;margin-top:5px!important;font-size:.78rem!important;line-height:1.4!important;color:#68766f!important}
body[data-module="visual_pos"] .vpos .basket-line .remove{margin-top:5px!important;font-size:.75rem!important;font-weight:750!important;color:#a52d35!important}
body[data-module="visual_pos"] .vpos .payment-cash{--method-bg:#0b9b72!important;--method-border:#067554!important;--method-text:#fff!important;--method-icon:#fff!important;--method:#067554!important;background:#0b9b72!important;color:#fff!important;border-color:#067554!important}
body[data-module="visual_pos"] .vpos .payment-cash :is(.payment-name,.payment-icon,.payment-check,.selected-label){color:#fff!important}
body[data-module="visual_pos"] .vpos .payment-cash .payment-icon{background:rgba(255,255,255,.16)!important;border-color:rgba(255,255,255,.32)!important}
body[data-module="visual_pos"] .vpos .payment-cash.is-selected{background:#0b9b72!important;box-shadow:0 0 0 3px rgba(11,155,114,.24),0 7px 16px rgba(6,117,84,.2)!important}

html{background:var(--app-canvas);color-scheme:light;scrollbar-color:#9ab8aa transparent}
body{background:var(--app-canvas)!important;color:var(--app-text)!important;font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text",Inter,Arial,sans-serif!important;letter-spacing:-.005em}
a{color:var(--app-green-700)}
.shell{grid-template-columns:244px minmax(0,1fr)!important;background:var(--app-canvas)}
.main{min-height:100vh;background:radial-gradient(circle at 95% 0,rgba(200,164,93,.08),transparent 24rem),var(--app-canvas)}
.sidebar{background:linear-gradient(180deg,var(--app-green-900),var(--app-green-950) 60%,#02271f)!important;border-right:1px solid rgba(255,255,255,.08)!important;padding:21px 14px!important;box-shadow:8px 0 28px rgba(4,51,40,.12)!important}
.sidebar .brand{color:#fff!important;font-size:20px!important;letter-spacing:.08em!important;padding:5px 10px 1px!important;font-weight:780!important}
.sidebar .brand::first-letter{color:var(--app-gold)}
.sidebar>.sub{color:#d8c28f!important;padding:0 10px 16px!important;margin:2px 0 8px!important;font-weight:650!important;letter-spacing:.025em}
.sidebar a,.sidebar .nav-button,.nav-group-toggle{color:#e8f3ee!important;border:1px solid transparent!important;border-radius:10px!important;font-size:12.5px!important;font-weight:650!important;padding:9px 11px!important;transition:background .16s ease,border-color .16s ease,transform .16s ease!important}
.sidebar a:hover,.sidebar .nav-button:hover,.nav-group-toggle:hover{background:rgba(255,255,255,.09)!important;border-color:rgba(255,255,255,.08)!important;transform:translateX(1px)}
.sidebar a.active,.sidebar a[aria-current="page"],.nav-group-panel a.active,.nav-group-panel a[aria-current="page"]{background:linear-gradient(135deg,var(--app-green-600),var(--app-green-700))!important;color:#fff!important;border-color:rgba(255,255,255,.16)!important;box-shadow:inset 3px 0 var(--app-gold),0 8px 18px rgba(1,32,25,.28)!important}
.nav-section,.nav-group-toggle{text-transform:uppercase!important;letter-spacing:.075em!important}
.nav-section{color:#a8c8b9!important;font-size:10px!important;margin-top:13px!important}
.nav-subsection{color:#d4b976!important;letter-spacing:.06em!important;font-size:9.5px!important}
.nav-note{background:var(--app-gold)!important;color:#193127!important;padding:2px 5px!important;border-radius:999px!important;font-size:8px!important}

.header{position:sticky!important;top:0!important;z-index:60!important;min-height:70px!important;background:rgba(255,255,255,.88)!important;border:0!important;border-bottom:1px solid rgba(4,51,40,.09)!important;padding:12px 24px!important;backdrop-filter:saturate(160%) blur(18px);-webkit-backdrop-filter:saturate(160%) blur(18px);box-shadow:0 1px 10px rgba(4,51,40,.035)!important}
.header .scope{color:var(--app-muted)!important;font-size:13px!important;font-weight:600!important}
.identity-menu>summary{background:#fff!important;border:1px solid var(--app-border)!important;border-radius:13px!important;box-shadow:0 4px 14px rgba(4,51,40,.06)!important;padding:7px 10px!important}
.identity-dropdown{background:#fff!important;border:1px solid var(--app-border)!important;border-radius:14px!important;box-shadow:var(--app-shadow-hover)!important;overflow:hidden}
.identity-dropdown a{color:var(--app-text)!important}
.identity-dropdown a:hover{background:var(--app-mint-50)!important;color:var(--app-green-700)!important}
.content{width:100%!important;max-width:1500px!important;padding:28px clamp(18px,2.5vw,38px)!important}

h1,h2,h3,h4{color:var(--app-text)!important;letter-spacing:-.025em!important}h1{font-weight:760!important}h2,h3{font-weight:720!important}
.muted,small,.scope{color:var(--app-muted)}
.card,.visual-card,.accountant-card,.finance-card,.procurement-card,.ops-branch-card,.ops-template-card,.hr-card,.settings-card,.cash-panel,.cash-form-panel{background:var(--app-surface)!important;border:1px solid var(--app-border)!important;border-radius:var(--app-radius)!important;box-shadow:var(--app-shadow)!important;color:var(--app-text)!important}
.card{padding:20px!important;margin-bottom:18px!important}
.card:hover,.visual-card:hover,.ops-branch-card:hover{border-color:#c9ddd3!important;box-shadow:var(--app-shadow-hover)!important}

button,.btn,input[type="submit"],a.btn,.button,.primary-action{background:linear-gradient(180deg,var(--app-green-600),var(--app-green-700))!important;color:#fff!important;border:1px solid var(--app-green-800)!important;border-radius:10px!important;box-shadow:0 5px 12px rgba(8,122,85,.18)!important;font-weight:700!important;padding:10px 15px!important;min-height:40px;transition:transform .15s ease,box-shadow .15s ease,filter .15s ease!important}
button:hover,.btn:hover,input[type="submit"]:hover,a.btn:hover{filter:brightness(1.04);transform:translateY(-1px);box-shadow:0 8px 18px rgba(8,122,85,.23)!important}
button:active,.btn:active{transform:translateY(0)}
.btn-danger,.danger,[data-variant="danger"]{background:linear-gradient(#d84a51,#bd2f37)!important;border-color:#ad2930!important}
.secondary,.btn-secondary,.ops-secondary,button[value="return"]{background:#fff!important;color:var(--app-green-800)!important;border-color:#bfd7cb!important;box-shadow:none!important}

input,select,textarea{background:#fff!important;color:var(--app-text)!important;border:1px solid #cbdad3!important;border-radius:10px!important;padding:10px 12px!important;min-height:42px!important;box-shadow:inset 0 1px 2px rgba(4,51,40,.025)!important;transition:border-color .15s,box-shadow .15s!important}
input:hover,select:hover,textarea:hover{border-color:#9bbdaf!important}
input:focus,select:focus,textarea:focus{outline:0!important;border-color:var(--app-green-600)!important;box-shadow:0 0 0 3px rgba(16,168,109,.14)!important}
label{color:#384841!important;font-size:12.5px!important;font-weight:650!important;gap:6px}
textarea{min-height:94px!important}

.table-wrap{background:#fff!important;border:1px solid var(--app-border)!important;border-radius:14px!important;box-shadow:var(--app-shadow)!important;overflow:auto!important}
table{background:#fff!important;border-collapse:separate!important;border-spacing:0!important}
th{position:sticky;top:0;background:#edf6f1!important;color:#365046!important;text-transform:uppercase!important;letter-spacing:.055em!important;font-size:10.5px!important;font-weight:780!important;border-bottom:1px solid #d6e5dd!important}
td{color:var(--app-text)!important;border-bottom:1px solid #edf2ef!important;font-size:13px!important}
tr:last-child td{border-bottom:0!important}tbody tr:hover td{background:#f6fbf8!important}
.badge,.status,.pill,.ops-badge{background:var(--app-mint-100)!important;color:var(--app-green-800)!important;border:1px solid #b9dfcc!important;border-radius:999px!important;font-weight:720!important;padding:5px 9px!important}
.badge.danger,.status.danger,.critical{background:#fff0f0!important;color:var(--app-danger)!important;border-color:#f0c5c7!important}
.badge.warning,.status.warning{background:#fff7e5!important;color:#9b6200!important;border-color:#f1d395!important}
.flash{border-radius:12px!important;border:1px solid transparent!important;box-shadow:var(--app-shadow)!important}.flash.success{background:var(--app-mint-100)!important;border-color:#b9dfcc!important}.flash.error{background:#fff0f0!important;border-color:#f0c5c7!important}

/* Executive dashboard: solid, colourful, operational cards with restrained gold. */
.visual-topbar{background:linear-gradient(125deg,var(--app-green-900),var(--app-green-700))!important;border:1px solid rgba(255,255,255,.11)!important;border-radius:20px!important;padding:25px 27px!important;box-shadow:0 18px 42px rgba(4,51,40,.19)!important;margin-bottom:18px!important;position:relative;overflow:hidden}
.visual-topbar:after{content:"";position:absolute;width:260px;height:260px;right:-70px;top:-130px;border:1px solid rgba(200,164,93,.28);border-radius:50%;box-shadow:0 0 0 34px rgba(200,164,93,.05)}
.visual-topbar h1,.visual-topbar p,.visual-topbar small,.visual-topbar .cc-eyebrow,.visual-topbar label{color:#fff!important}.visual-topbar .cc-eyebrow{color:#e8cc8e!important}.visual-topbar p{opacity:.88}.visual-topbar small{opacity:.7}.visual-topbar form{position:relative;z-index:1}
.visual-topbar select{background:rgba(255,255,255,.96)!important;border-color:rgba(255,255,255,.45)!important}.visual-topbar button{background:var(--app-gold)!important;color:#18332a!important;border-color:#d8bc7d!important}
.visual-kpis{gap:12px!important}.visual-card{overflow:hidden;position:relative}.kpi-card{min-height:132px!important;border:0!important;padding:17px!important;box-shadow:var(--app-shadow)!important}.kpi-card:after{content:"";position:absolute;width:70px;height:70px;right:-22px;top:-26px;border-radius:50%;background:rgba(255,255,255,.36)}
.kpi-sales{background:#dff5e9!important}.kpi-transactions{background:#e3efff!important}.kpi-items{background:#f0e7f7!important}.kpi-average{background:#fff0d7!important}.kpi-branches{background:#ddf5f2!important}.kpi-reporting{background:#ffe7e8!important}.kpi-margin{background:#ebecea!important}
.kpi-icon{border-radius:10px!important;box-shadow:0 5px 12px rgba(4,51,40,.08)!important}.kpi-sales .kpi-icon{background:var(--app-green-600)!important}.kpi-average .kpi-icon{background:var(--app-gold)!important;color:#20332c!important}.visual-value{color:var(--app-text)!important;font-weight:800!important}.kpi-label{color:#405149!important}.kpi-card small{color:#6b7b74!important}
.card-heading{border-bottom:1px solid #ecf1ee!important;padding-bottom:12px!important}.card-heading>span{background:var(--app-mint-50)!important;border:1px solid var(--app-border)!important;color:var(--app-green-800)!important;border-radius:8px!important;padding:5px 8px!important}
.trend-svg polyline{stroke:var(--app-green-600)!important}.trend-svg .zero-line{stroke:#dbe7e1!important}.visual-bar{background:#e6eee9!important}.visual-bar i{background:linear-gradient(90deg,var(--app-green-600),#23b97b)!important}.payment-donut{border-color:#e5ece8!important;border-top-color:var(--app-green-600)!important}.ceo-quick-actions{background:#fff!important;border:1px solid var(--app-border)!important;border-radius:16px!important;box-shadow:var(--app-shadow)!important}.ceo-quick-actions a{background:#f8fbf9!important;border:1px solid var(--app-border)!important;color:var(--app-text)!important;border-radius:10px!important}.ceo-quick-actions a:hover{background:var(--app-mint-50)!important;border-color:#b7d7c8!important;color:var(--app-green-800)!important}.ceo-quick-actions i{background:var(--app-gold-soft)!important;color:#7d5d22!important}
.attention-list a{background:#fbfaf7!important;border:1px solid #eee5d5!important;border-radius:10px!important}.attention-list a:hover{background:#fff8e8!important}.attention-status{background:#fff0cf!important;color:#b66d00!important}

/* Visual POS: desktop software density, clear catalogue and fixed checkout. */
body[data-module="visual_pos"] .content{max-width:none!important;padding:18px!important}
.visual-pos,.pos-shell,.visual-pos-shell{background:var(--app-canvas)!important;color:var(--app-text)!important}
.pos-topbar,.visual-pos-header,.pos-header{background:linear-gradient(110deg,var(--app-green-900),var(--app-green-700))!important;color:#fff!important;border:0!important;border-radius:17px!important;box-shadow:0 14px 30px rgba(4,51,40,.16)!important}
.pos-topbar h1,.visual-pos-header h1,.pos-header h1,.pos-topbar label,.pos-header label{color:#fff!important}
.product-card,.pos-product-card,.visual-product-card{background:#fff!important;border:1px solid var(--app-border)!important;border-radius:14px!important;box-shadow:0 5px 18px rgba(4,51,40,.055)!important;overflow:hidden!important;transition:transform .15s,box-shadow .15s,border-color .15s!important}
.product-card:hover,.pos-product-card:hover,.visual-product-card:hover{transform:translateY(-2px)!important;border-color:#afd2c1!important;box-shadow:var(--app-shadow-hover)!important}
.product-card img,.pos-product-card img,.visual-product-card img{background:#f5f8f6!important;object-fit:contain!important}.product-price,.pos-price{color:var(--app-green-700)!important;font-weight:800!important}.stock,.stock-badge{background:var(--app-mint-100)!important;color:var(--app-green-800)!important;border-radius:999px!important}.out-of-stock{opacity:.62!important;filter:saturate(.6)}
.basket,.cart-panel,.checkout-panel,.pos-basket{background:#fff!important;border:1px solid var(--app-border)!important;border-radius:16px!important;box-shadow:var(--app-shadow-hover)!important}.basket-header,.cart-header{border-bottom:1px solid var(--app-border)!important}.checkout-total,.grand-total{color:var(--app-green-800)!important}
.category-filter.active,.category-chip.active{background:var(--app-green-700)!important;color:#fff!important;border-color:var(--app-green-700)!important}

/* Login and exception pages */
.login{background:#fff!important;border:1px solid var(--app-border)!important;border-radius:20px!important;padding:28px!important;box-shadow:0 24px 60px rgba(4,51,40,.14)!important}.login:before{content:"BAFF OS";display:block;color:var(--app-green-900);font-size:24px;font-weight:800;letter-spacing:.08em;margin-bottom:18px;border-left:4px solid var(--app-gold);padding-left:12px}

html[data-theme="night"]{color-scheme:dark;--app-canvas:#0d1713;--app-surface:#14221c;--app-surface-2:#182820;--app-text:#edf6f1;--app-muted:#a6b8af;--app-border:#294037;--app-shadow:0 1px 2px rgba(0,0,0,.15),0 12px 32px rgba(0,0,0,.2)}
html[data-theme="night"] body,html[data-theme="night"] .main{background:#0d1713!important;color:var(--app-text)!important}
html[data-theme="night"] .header{background:rgba(20,34,28,.88)!important;border-color:#294037!important}
html[data-theme="night"] .card,html[data-theme="night"] .visual-card,html[data-theme="night"] .accountant-card,html[data-theme="night"] .finance-card,html[data-theme="night"] .procurement-card,html[data-theme="night"] .ops-branch-card,html[data-theme="night"] .ops-template-card,html[data-theme="night"] .hr-card,html[data-theme="night"] .settings-card,html[data-theme="night"] .table-wrap,html[data-theme="night"] table,html[data-theme="night"] .identity-dropdown{background:var(--app-surface)!important;border-color:var(--app-border)!important;color:var(--app-text)!important}
html[data-theme="night"] h1,html[data-theme="night"] h2,html[data-theme="night"] h3,html[data-theme="night"] td,html[data-theme="night"] .identity-dropdown a{color:var(--app-text)!important}
html[data-theme="night"] th{background:#1b3027!important;color:#c7ded3!important;border-color:#294037!important}html[data-theme="night"] td{border-color:#22372e!important}html[data-theme="night"] tbody tr:hover td{background:#192b23!important}
html[data-theme="night"] input,html[data-theme="night"] select,html[data-theme="night"] textarea{background:#102019!important;color:#eef7f3!important;border-color:#365247!important}
html[data-theme="night"] .ceo-quick-actions,html[data-theme="night"] .ceo-quick-actions a,html[data-theme="night"] .product-card,html[data-theme="night"] .pos-product-card,html[data-theme="night"] .basket,html[data-theme="night"] .cart-panel{background:var(--app-surface)!important;border-color:var(--app-border)!important;color:var(--app-text)!important}

@media(prefers-color-scheme:dark){html[data-theme="system"]{color-scheme:dark;--app-canvas:#0d1713;--app-surface:#14221c;--app-surface-2:#182820;--app-text:#edf6f1;--app-muted:#a6b8af;--app-border:#294037}}
@media(max-width:1100px){.shell{grid-template-columns:210px minmax(0,1fr)!important}.content{padding:20px!important}.visual-kpis{grid-template-columns:repeat(3,minmax(0,1fr))!important}.visual-analytics-row{grid-template-columns:1fr 1fr!important}.visual-analytics-row>*:first-child{grid-column:1/-1}}
@media(max-width:800px){.shell{display:block!important}.sidebar{position:relative!important;width:100%!important;height:auto!important;max-height:none!important}.sidebar nav{display:block!important}.header{top:0!important}.content{padding:14px!important}.visual-topbar{padding:20px!important}.visual-topbar,.visual-filters{display:block!important}.visual-filters>*{margin-top:10px}.visual-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}.visual-analytics-row{grid-template-columns:1fr!important}.visual-analytics-row>*{grid-column:auto!important}.grid,.form-grid,.cash-columns,.ops-panels{grid-template-columns:1fr!important}.table-wrap{max-width:100%!important}.ceo-quick-actions>div{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:480px){.visual-kpis{grid-template-columns:1fr!important}.content{padding:10px!important}.card{padding:15px!important}.header{padding:9px 11px!important}.identity-menu-copy{display:none!important}.ceo-quick-actions>div{grid-template-columns:1fr!important}}
@media print{.sidebar,.header{display:none!important}.shell{display:block!important}.main,.content{margin:0!important;padding:0!important;background:#fff!important}.receipt-paper,.thermal-receipt,.receipt-preview{background:#fff!important;color:#000!important;box-shadow:none!important}}

/* Refined colour balance: green guides actions; it does not fill every control. */
.sidebar{background:linear-gradient(180deg,#0a3a2f,#072e26 62%,#05231d)!important}
.sidebar .nav-group-toggle{
  background:transparent!important;color:#dfece6!important;border-color:transparent!important;
  box-shadow:none!important;transform:none!important;
}
.sidebar .nav-group-toggle:hover,.sidebar .nav-group-toggle:focus-visible{
  background:rgba(255,255,255,.065)!important;border-color:rgba(255,255,255,.075)!important;
  box-shadow:none!important;transform:none!important;
}
.sidebar .nav-group-toggle[aria-expanded="true"]{
  background:rgba(255,255,255,.08)!important;border-color:rgba(255,255,255,.09)!important;
  color:#fff!important;box-shadow:none!important;
}
.sidebar .nav-group-panel a{background:transparent!important;border-color:transparent!important;box-shadow:none!important}
.sidebar .nav-group-panel a:hover{background:rgba(255,255,255,.06)!important}
.sidebar .nav-group-panel a.active,.sidebar .nav-group-panel a[aria-current="page"]{
  background:#116b50!important;border-color:rgba(255,255,255,.13)!important;
  box-shadow:inset 3px 0 var(--app-gold),0 6px 14px rgba(1,25,20,.2)!important;
}

.cc-hero h1,.cc-hero .cc-greeting,.cc-hero p,.cc-hero small{color:#fff!important}
.cc-hero p{color:#e3ddd4!important}.cc-hero small{color:#c3bbae!important}

body[data-module="visual_pos"] .vpos .product-card{
  background:#fff!important;border:1px solid var(--app-border)!important;
  border-bottom:2px solid var(--app-gold)!important;box-shadow:0 6px 20px rgba(4,51,40,.07)!important;
}
body[data-module="visual_pos"] .vpos .product-open{
  background:transparent!important;color:var(--app-text)!important;border:0!important;
  border-radius:0!important;box-shadow:none!important;transform:none!important;padding:0!important;
}
body[data-module="visual_pos"] .vpos .product-open:hover{background:transparent!important;box-shadow:none!important;transform:none!important}
body[data-module="visual_pos"] .vpos .product-copy{background:#fff!important;color:var(--app-text)!important}
body[data-module="visual_pos"] .vpos .product-copy h2{color:var(--app-text)!important}
body[data-module="visual_pos"] .vpos .product-meta strong{color:var(--app-green-800)!important}
body[data-module="visual_pos"] .vpos .category-strip button,
body[data-module="visual_pos"] .vpos .view-switch button,
body[data-module="visual_pos"] .vpos .view-switch a{
  background:#fff!important;color:#34463e!important;border:1px solid #cddbd4!important;
  box-shadow:none!important;transform:none!important;
}
body[data-module="visual_pos"] .vpos .category-strip button:hover,
body[data-module="visual_pos"] .vpos .view-switch button:hover,
body[data-module="visual_pos"] .vpos .view-switch a:hover{background:#f1f8f4!important;border-color:#a9cbbb!important}
body[data-module="visual_pos"] .vpos .category-strip button.active,
body[data-module="visual_pos"] .vpos .view-switch button.active{
  background:#116b50!important;color:#fff!important;border-color:#116b50!important;
  box-shadow:inset 0 -2px var(--app-gold)!important;
}
body[data-module="visual_pos"] .vpos .add-product{
  background:linear-gradient(180deg,#16835f,#116b50)!important;color:#fff!important;
  border:1px solid #0c5a42!important;box-shadow:0 5px 12px rgba(8,92,66,.16)!important;
}
body[data-module="visual_pos"] .vpos .add-product:disabled{
  background:#e5ebe8!important;color:#819087!important;border-color:#d4ded9!important;box-shadow:none!important;
}
body[data-module="visual_pos"] .vpos .catalogue-tools,
body[data-module="visual_pos"] .vpos .basket-panel{background:#fff!important}
body[data-module="visual_pos"] .vpos .customer-mode-option{background:#fff!important;color:var(--app-text)!important;box-shadow:none!important}
body[data-module="visual_pos"] .vpos .customer-mode-option.is-selected{background:#eaf6f0!important;border-color:#16835f!important}

html[data-theme="night"] body[data-module="visual_pos"] .vpos .product-card,
html[data-theme="night"] body[data-module="visual_pos"] .vpos .product-copy{background:var(--app-surface)!important;color:var(--app-text)!important}

/* Green is reserved for the app shell, selected navigation and major banners. */
button,.btn,input[type="submit"],a.btn,.button,.primary-action{
  background:linear-gradient(180deg,#303633,#232825)!important;color:#fff!important;
  border-color:#1b201d!important;box-shadow:0 5px 12px rgba(20,28,24,.14)!important;
}
button:hover,.btn:hover,input[type="submit"]:hover,a.btn:hover{
  background:linear-gradient(180deg,#3a413d,#292f2c)!important;box-shadow:0 7px 16px rgba(20,28,24,.18)!important;
}
.visual-topbar button,.cc-hero button{background:var(--app-gold)!important;color:#25322c!important;border-color:#d8bc7d!important}
.sidebar .nav-group-toggle{background:transparent!important;border-color:transparent!important;box-shadow:none!important}
.sidebar .nav-group-toggle[aria-expanded="true"]{background:rgba(255,255,255,.08)!important;border-color:rgba(255,255,255,.09)!important}
body[data-module="visual_pos"] .vpos .category-strip button.active,
body[data-module="visual_pos"] .vpos .view-switch button.active{
  background:#292f2c!important;color:#fff!important;border-color:var(--app-gold)!important;
  box-shadow:inset 0 -2px var(--app-gold)!important;
}
body[data-module="visual_pos"] .vpos .add-product{
  background:linear-gradient(180deg,#303633,#232825)!important;color:#fff!important;
  border-color:#1b201d!important;box-shadow:0 5px 12px rgba(20,28,24,.14)!important;
}
body[data-module="visual_pos"] .vpos .customer-mode-option.is-selected{
  background:#f4f7f5!important;border-color:var(--app-gold)!important;box-shadow:0 0 0 2px rgba(200,164,93,.10)!important;
}
/* Global navigation repair: submenu glyph masks from the legacy design system
   collided with labels at several widths. Top-level group icons remain. */
.sidebar .nav-group-panel a::before,
.sidebar .nav-group-panel a:before {
  content: none !important;
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  -webkit-mask: none !important;
  mask: none !important;
  background: none !important;
}

.sidebar .nav-group-panel a {
  position: relative !important;
  display: block !important;
  min-height: 38px !important;
  padding: 9px 12px !important;
  line-height: 1.35 !important;
  text-indent: 0 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

/* Global banner contrast repair: the final generic heading rule must never
   turn headings dark when they sit on a dark green application banner. */
.finance-hero h1,
.mkt-hero h1,
.mkt-head h1,
.crm-hero h1,
.crm-page-head h1,
.ops-head h1,
.ops-head-refined h1,
.accountant-hero h1,
.accountant-command-hero h1,
.cash-hero h1,
.settings-hero h1,
.settings-page-head h1,
.inv-hero h1,
.inventory-release-hero h1,
.hr-hero h1,
.purchasing-hero h1,
.visual-pos-header h1,
.vpos-header h1,
.cc-hero h1 {
  color: #fff !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .12) !important;
}

.finance-hero p,
.mkt-hero p,
.mkt-head p,
.crm-hero p,
.crm-page-head p,
.ops-head p,
.ops-head-refined p,
.accountant-hero p,
.accountant-command-hero p,
.cash-hero p,
.settings-hero p,
.settings-page-head p,
.inv-hero p,
.inventory-release-hero p,
.hr-hero p,
.purchasing-hero p,
.visual-pos-header p,
.vpos-header p,
.cc-hero p {
  color: rgba(255, 255, 255, .82) !important;
}

/* One unmistakable BAFF application identity: green is reserved for the
   permanent sidebar, major page banners and important actions. Work surfaces,
   product cards, forms and tables remain neutral white. */
.sidebar {
  background: #043b30 !important;
}

.finance-hero,
.mkt-hero,
.mkt-head,
.crm-hero,
.crm-page-head,
.ops-head,
.ops-head-refined,
.accountant-hero,
.accountant-command-hero,
.cash-hero,
.settings-hero,
.settings-page-head,
.inv-hero,
.inventory-release-hero,
.hr-hero,
.purchasing-hero,
.visual-pos-header,
.vpos-header,
.cc-hero {
  background: #07503e !important;
  background-image: none !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, .12) !important;
  box-shadow: 0 12px 30px rgba(4, 51, 40, .12) !important;
}

.finance-hero > span,
.mkt-hero > span,
.mkt-head > span,
.crm-hero > span,
.crm-page-head > span,
.ops-head > span,
.accountant-hero > span,
.cash-hero > span,
.settings-hero > span,
.inv-hero > span,
.hr-hero > span,
.purchasing-hero > span,
.visual-pos-header > span,
.vpos-header .vpos-eyebrow,
.cc-hero .cc-eyebrow {
  color: #e4c479 !important;
}

body[data-module="visual_pos"] .product-card,
body[data-module="visual_pos"] .product-copy,
body[data-module="visual_pos"] .basket-panel,
body[data-module="visual_pos"] .catalogue-tools,
body[data-module="visual_pos"] .list-view,
.cash-kpis article,
.cash-panel,
.inv-panel,
.inv-card,
.hr-card,
.workforce article {
  background: #fff !important;
  color: var(--app-text) !important;
}

/* Apple-inspired typography and a more generous navigation rail. */
:root {
  --app-font-ui: "SF Pro Text", "Avenir Next", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --app-font-display: "Glegoo", Georgia, "Times New Roman", serif;
}

body,
button,
input,
select,
textarea,
table {
  font-family: var(--app-font-ui) !important;
}

h1,
h2,
h3,
h4,
.metric,
.card-heading,
.product-copy h2,
.basket-head h2 {
  font-family: var(--app-font-display) !important;
  letter-spacing: -.025em !important;
}

h1 { font-weight: 760 !important; }
h2,
h3,
h4 { font-weight: 700 !important; }

.shell {
  grid-template-columns: 290px minmax(0, 1fr) !important;
}

.sidebar {
  width: 290px !important;
  padding-left: 18px !important;
  padding-right: 18px !important;
}

.sidebar .brand {
  font-family: "Glegoo", Georgia, "Times New Roman", serif !important;
  letter-spacing: .09em !important;
}

.sidebar .nav-group-toggle,
.sidebar .nav-section {
  font-family: var(--app-font-ui) !important;
  font-size: 13px !important;
  font-weight: 760 !important;
  letter-spacing: .075em !important;
}

.sidebar .nav-group-panel a,
.sidebar > nav > a {
  font-family: var(--app-font-ui) !important;
  font-size: 14px !important;
  font-weight: 620 !important;
  letter-spacing: -.005em !important;
}

.content {
  max-width: 1600px !important;
}

@media (max-width: 800px) {
  .shell { grid-template-columns: 1fr !important; }
  .sidebar { width: 100% !important; }
}

/* BAFF identity, application header and financial-number refinements. */
.sidebar .brand{color:#fff!important;font-weight:800!important}
.sidebar .brand::first-letter{color:#fff!important}
.sidebar .brand::before{background:#fff!important}
.sidebar>.sub{color:rgba(255,255,255,.82)!important;font-weight:650!important}
.metric,.cc-value,.visual-kpi strong,.kpi-card strong,[data-numeric],.grand-total,.basket-total{font-family:var(--app-font-ui)!important;font-variant-numeric:tabular-nums lining-nums!important;letter-spacing:-.025em!important;font-weight:760!important}
.header{display:flex!important;align-items:center!important;justify-content:flex-end!important}
.header .scope{margin-right:auto!important}
.header-actions{margin-left:auto!important;display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:12px!important}
.header-pos-access{display:inline-flex!important;align-items:center!important;min-height:42px!important;padding:0 16px!important;border-radius:12px!important;background:var(--app-gold)!important;color:#17211d!important;border:1px solid #b78934!important;box-shadow:0 4px 12px rgba(4,51,40,.08)!important;text-decoration:none!important;font-family:var(--app-font-ui)!important;font-size:13px!important;font-weight:760!important}
.header-pos-access:hover{background:#d4ad5c!important}
.identity-menu{margin-left:0!important}.identity-menu>summary{color:#17211d!important}.identity-menu-copy strong{color:#17211d!important}.identity-menu-copy small{color:#68766f!important}
html[data-theme="night"] .identity-menu>summary{background:#16251f!important;border-color:#365046!important;color:#fff!important}
html[data-theme="night"] .identity-menu-copy strong{color:#fff!important}
html[data-theme="night"] .identity-menu-copy small{color:#c3d0ca!important}
@media(prefers-color-scheme:dark){html[data-theme="system"] .identity-menu>summary{background:#16251f!important;border-color:#365046!important;color:#fff!important}html[data-theme="system"] .identity-menu-copy strong{color:#fff!important}html[data-theme="system"] .identity-menu-copy small{color:#c3d0ca!important}}
@media(max-width:640px){.header-pos-access{padding:0 11px!important;font-size:12px!important}}

/* Final BAFF wordmark and official financial typography. */
.sidebar .brand{
  color:var(--app-gold)!important;
  font-family:var(--app-font-display)!important;
  font-weight:800!important;
  letter-spacing:.1em!important;
}
.sidebar .brand::first-letter{color:var(--app-gold)!important}
.sidebar .brand::before{display:none!important;content:none!important}
.metric,.cc-value,.visual-kpi strong,.kpi-card strong,[data-numeric],.grand-total,.basket-total{
  font-family:var(--app-font-display)!important;
  font-weight:700!important;
  font-variant-numeric:tabular-nums lining-nums!important;
  letter-spacing:-.02em!important;
}

/* Final application-wide typography hierarchy. */
body,button,input,select,textarea,table{
  font-family:var(--app-font-ui)!important;
  font-weight:400;
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4,.card-heading,.product-copy h2,.basket-head h2{
  font-family:var(--app-font-display)!important;
  font-weight:700!important;
  letter-spacing:-.025em!important;
  line-height:1.18!important;
}
.sidebar .brand{
  font-size:22px!important;
  font-weight:700!important;
  line-height:1.2!important;
  letter-spacing:.105em!important;
}
.sidebar>.sub{
  font-size:12.5px!important;
  font-weight:650!important;
  line-height:1.35!important;
  letter-spacing:.005em!important;
}
.sidebar .nav-group-toggle,.sidebar .nav-section{
  font-family:var(--app-font-ui)!important;
  font-size:13.5px!important;
  font-weight:720!important;
  line-height:1.25!important;
  letter-spacing:.055em!important;
}
.sidebar .nav-group-panel a,.sidebar>nav>a{
  font-family:var(--app-font-ui)!important;
  font-size:13.5px!important;
  font-weight:590!important;
  line-height:1.35!important;
  letter-spacing:0!important;
}
.label,.cc-eyebrow,.visual-kpi>span,.kpi-card>span,.nav-subsection{
  font-family:var(--app-font-ui)!important;
  font-weight:720!important;
  letter-spacing:.085em!important;
}
.metric,.cc-value,.visual-kpi strong,.kpi-card strong,[data-numeric],.grand-total,.basket-total{
  line-height:1.1!important;
}

/* Night/System-dark contrast isolation for dashboards and shared app text. */
html[data-theme="night"] .visual-kpi>span,
html[data-theme="night"] .kpi-card>span,
html[data-theme="night"] .cc-eyebrow,
html[data-theme="night"] .label,
html[data-theme="night"] .muted,
html[data-theme="night"] small,
html[data-theme="night"] .scope,
html[data-theme="night"] .cc-method,
html[data-theme="night"] .visual-card p,
html[data-theme="night"] .visual-card li,
html[data-theme="night"] .visual-card td{
  color:#aebfb7!important;
}
html[data-theme="night"] .visual-kpi strong,
html[data-theme="night"] .kpi-card strong,
html[data-theme="night"] .cc-value,
html[data-theme="night"] [data-numeric],
html[data-theme="night"] .visual-card h1,
html[data-theme="night"] .visual-card h2,
html[data-theme="night"] .visual-card h3{
  color:#f4faf7!important;
}
html[data-theme="night"] .cc-priority,
html[data-theme="night"] .attention-item,
html[data-theme="night"] .management-attention article{
  background:#182820!important;
  color:#f4faf7!important;
  border-color:#8f6b2b!important;
}
html[data-theme="night"] .cc-priority strong,
html[data-theme="night"] .cc-priority p,
html[data-theme="night"] .attention-item strong,
html[data-theme="night"] .attention-item p{
  color:#f4faf7!important;
}
html[data-theme="night"] .cc-priority a,
html[data-theme="night"] .attention-item a{
  color:#e3bd68!important;
}
html[data-theme="night"] .attention-card a{
  background:#182820!important;
  color:#f4faf7!important;
  border:1px solid #5d4a27!important;
}
html[data-theme="night"] .attention-card a strong{color:#f4faf7!important}
html[data-theme="night"] .attention-card a small{color:#b8c8c0!important}
html[data-theme="night"] .payment-legend,
html[data-theme="night"] .payment-legend span,
html[data-theme="night"] .reporting-legend,
html[data-theme="night"] .reporting-legend span,
html[data-theme="night"] .branch-card,
html[data-theme="night"] .branch-row{color:#d9e5df!important}

@media(prefers-color-scheme:dark){
  html[data-theme="system"] .visual-kpi>span,html[data-theme="system"] .kpi-card>span,html[data-theme="system"] .cc-eyebrow,html[data-theme="system"] .label,html[data-theme="system"] .muted,html[data-theme="system"] small,html[data-theme="system"] .scope,html[data-theme="system"] .cc-method,html[data-theme="system"] .visual-card p,html[data-theme="system"] .visual-card li,html[data-theme="system"] .visual-card td{color:#aebfb7!important}
  html[data-theme="system"] .visual-kpi strong,html[data-theme="system"] .kpi-card strong,html[data-theme="system"] .cc-value,html[data-theme="system"] [data-numeric],html[data-theme="system"] .visual-card h1,html[data-theme="system"] .visual-card h2,html[data-theme="system"] .visual-card h3{color:#f4faf7!important}
  html[data-theme="system"] .cc-priority,html[data-theme="system"] .attention-item,html[data-theme="system"] .management-attention article{background:#182820!important;color:#f4faf7!important;border-color:#8f6b2b!important}
  html[data-theme="system"] .cc-priority strong,html[data-theme="system"] .cc-priority p,html[data-theme="system"] .attention-item strong,html[data-theme="system"] .attention-item p{color:#f4faf7!important}
  html[data-theme="system"] .cc-priority a,html[data-theme="system"] .attention-item a{color:#e3bd68!important}
  html[data-theme="system"] .attention-card a{background:#182820!important;color:#f4faf7!important;border:1px solid #5d4a27!important}
  html[data-theme="system"] .attention-card a strong{color:#f4faf7!important}html[data-theme="system"] .attention-card a small{color:#b8c8c0!important}
  html[data-theme="system"] .payment-legend,html[data-theme="system"] .payment-legend span,html[data-theme="system"] .reporting-legend,html[data-theme="system"] .reporting-legend span,html[data-theme="system"] .branch-card,html[data-theme="system"] .branch-row{color:#d9e5df!important}
}

/* POS customer identity choices: solid, immediate and touch-friendly. */
body[data-module="visual_pos"] .vpos .customer-mode-option.customer-mode-walk-in,
html[data-theme="night"] body[data-module="visual_pos"] .vpos .customer-mode-option.customer-mode-walk-in{
  background:#c89b3c!important;color:#17211d!important;border:2px solid #a77922!important;
  box-shadow:0 5px 12px rgba(105,76,20,.16)!important;
}
body[data-module="visual_pos"] .vpos .customer-mode-option.customer-mode-existing,
html[data-theme="night"] body[data-module="visual_pos"] .vpos .customer-mode-option.customer-mode-existing{
  background:#0b8f55!important;color:#fff!important;border:2px solid #076b40!important;
  box-shadow:0 5px 12px rgba(4,91,53,.18)!important;
}
body[data-module="visual_pos"] .vpos .customer-mode-option.customer-mode-walk-in :is(.customer-mode-icon,.customer-mode-check),
html[data-theme="night"] body[data-module="visual_pos"] .vpos .customer-mode-option.customer-mode-walk-in :is(.customer-mode-icon,.customer-mode-check){color:#17211d!important}
body[data-module="visual_pos"] .vpos .customer-mode-option.customer-mode-existing :is(.customer-mode-icon,.customer-mode-check),
html[data-theme="night"] body[data-module="visual_pos"] .vpos .customer-mode-option.customer-mode-existing :is(.customer-mode-icon,.customer-mode-check){color:#fff!important}
body[data-module="visual_pos"] .vpos .customer-mode-option.is-selected{outline:3px solid rgba(200,155,60,.38)!important;outline-offset:2px!important}

@media(prefers-color-scheme:dark){
  html[data-theme="system"] body[data-module="visual_pos"] .vpos .customer-mode-option.customer-mode-walk-in{background:#c89b3c!important;color:#17211d!important;border:2px solid #a77922!important;box-shadow:0 5px 12px rgba(105,76,20,.16)!important}
  html[data-theme="system"] body[data-module="visual_pos"] .vpos .customer-mode-option.customer-mode-existing{background:#0b8f55!important;color:#fff!important;border:2px solid #076b40!important;box-shadow:0 5px 12px rgba(4,91,53,.18)!important}
  html[data-theme="system"] body[data-module="visual_pos"] .vpos .customer-mode-option.customer-mode-walk-in :is(.customer-mode-icon,.customer-mode-check){color:#17211d!important}
  html[data-theme="system"] body[data-module="visual_pos"] .vpos .customer-mode-option.customer-mode-existing :is(.customer-mode-icon,.customer-mode-check){color:#fff!important}
}

/* Visual POS uses a high-contrast retail workspace in Night mode.
   The application shell stays dark; transaction surfaces stay light. */
html[data-theme="night"] body[data-module="visual_pos"] .vpos{
  --baff-surface:#fff;--baff-surface-raised:#fff;--baff-surface-muted:#f4f7f6;
  --baff-surface-soft:#f4f7f6;--baff-surface-elevated:#fff;
  --baff-text:#17211d;--baff-text-secondary:#45534d;--baff-text-muted:#68766f;
  --baff-border:#dce6e1;--baff-border-strong:#bfcfc7;--baff-success:#0b8f55;
  --pos-cash-bg:#e3f0e7;--pos-cash-border:#3e7854;--pos-cash-text:#244d35;
  --pos-momo-bg:#f5e6ad;--pos-momo-border:#b99032;--pos-momo-text:#5b4615;
  --pos-card-bg:#e0eaf4;--pos-card-border:#4f78a5;--pos-card-text:#294b6d;
  --pos-transfer-bg:#ebe2ef;--pos-transfer-border:#82628d;--pos-transfer-text:#52375c;
  --pos-walkin-bg:#e4efe7;--pos-walkin-border:#4d8060;--pos-walkin-text:#28503a;
  --pos-existing-bg:#f2e6c9;--pos-existing-border:#a47c28;--pos-existing-text:#624915;
  --pos-review-bg:#572738;color:#17211d!important;
}
html[data-theme="night"] body[data-module="visual_pos"] .vpos :is(.catalogue-tools,.product-card,.list-view,.basket-panel,.modal-card,.review-card){background:#fff!important;color:#17211d!important;border-color:#dce6e1!important}
html[data-theme="night"] body[data-module="visual_pos"] .vpos .product-copy{background:#fff!important;color:#17211d!important}
html[data-theme="night"] body[data-module="visual_pos"] .vpos :is(.product-copy h2,.basket-head h2,.customer h3,.payment-form h3,.totals strong,.grand-total){color:#17211d!important}
html[data-theme="night"] body[data-module="visual_pos"] .vpos :is(.product-category,.basket-line small,.customer-privacy,.payment-form>p,.totals span){color:#68766f!important}
html[data-theme="night"] body[data-module="visual_pos"] .vpos :is(.pos-product-media-frame,.product-image-wrap.pos-product-media){background:#f4f7f6!important;border-color:#dce6e1!important}
html[data-theme="night"] body[data-module="visual_pos"] .vpos :is(input,select,textarea){background:#fff!important;color:#17211d!important;border-color:#bfcfc7!important}
html[data-theme="night"] body[data-module="visual_pos"] .vpos :is(.view-switch a,.view-switch button,.category-strip a,.category-strip button){background:#fff!important;color:#17211d!important;border-color:#dce6e1!important}
html[data-theme="night"] body[data-module="visual_pos"] .vpos :is(.view-switch .active,.category-strip .active){background:#17211d!important;color:#fff!important;border-color:#c89b3c!important}
html[data-theme="night"] body[data-module="visual_pos"] .vpos :is(.basket-empty,.empty-state,.payment-unavailable){background:#f4f7f6!important;color:#68766f!important;border-color:#dce6e1!important}
html[data-theme="night"] body[data-module="visual_pos"] .vpos .customer-mode-option{background:#fff!important;color:#17211d!important}
html[data-theme="night"] body[data-module="visual_pos"] .vpos .walk-in-confirmation{background:#e4efe7!important;color:#28503a!important;border-color:#8ab69a!important}
html[data-theme="night"] body[data-module="visual_pos"] .vpos .walk-in-confirmation :is(label,strong,small){color:#28503a!important}
html[data-theme="night"] body[data-module="visual_pos"] .vpos .payment-mode label{background:#f4f7f6!important;color:#17211d!important;border-color:#dce6e1!important}
html[data-theme="night"] body[data-module="visual_pos"] .vpos .payment-method{color:var(--pos-method-text,#17211d)!important}
html[data-theme="night"] body[data-module="visual_pos"] .vpos #change-due{background:#f4f7f6!important;color:#0b6f45!important}
html[data-theme="night"] body[data-module="visual_pos"] .vpos .totals{background:#fff!important;border-color:#dce6e1!important}

@media(prefers-color-scheme:dark){
  html[data-theme="system"] body[data-module="visual_pos"] .vpos{--baff-surface:#fff;--baff-surface-raised:#fff;--baff-surface-muted:#f4f7f6;--baff-surface-soft:#f4f7f6;--baff-surface-elevated:#fff;--baff-text:#17211d;--baff-text-secondary:#45534d;--baff-text-muted:#68766f;--baff-border:#dce6e1;--baff-border-strong:#bfcfc7;--baff-success:#0b8f55;--pos-cash-bg:#e3f0e7;--pos-cash-border:#3e7854;--pos-cash-text:#244d35;--pos-momo-bg:#f5e6ad;--pos-momo-border:#b99032;--pos-momo-text:#5b4615;--pos-card-bg:#e0eaf4;--pos-card-border:#4f78a5;--pos-card-text:#294b6d;--pos-transfer-bg:#ebe2ef;--pos-transfer-border:#82628d;--pos-transfer-text:#52375c;--pos-walkin-bg:#e4efe7;--pos-walkin-border:#4d8060;--pos-walkin-text:#28503a;--pos-existing-bg:#f2e6c9;--pos-existing-border:#a47c28;--pos-existing-text:#624915;--pos-review-bg:#572738;color:#17211d!important}
  html[data-theme="system"] body[data-module="visual_pos"] .vpos :is(.catalogue-tools,.product-card,.list-view,.basket-panel,.modal-card,.review-card){background:#fff!important;color:#17211d!important;border-color:#dce6e1!important}
  html[data-theme="system"] body[data-module="visual_pos"] .vpos .product-copy{background:#fff!important;color:#17211d!important}
  html[data-theme="system"] body[data-module="visual_pos"] .vpos :is(.product-copy h2,.basket-head h2,.customer h3,.payment-form h3,.totals strong,.grand-total){color:#17211d!important}
  html[data-theme="system"] body[data-module="visual_pos"] .vpos :is(.product-category,.basket-line small,.customer-privacy,.payment-form>p,.totals span){color:#68766f!important}
  html[data-theme="system"] body[data-module="visual_pos"] .vpos :is(.pos-product-media-frame,.product-image-wrap.pos-product-media){background:#f4f7f6!important;border-color:#dce6e1!important}
  html[data-theme="system"] body[data-module="visual_pos"] .vpos :is(input,select,textarea){background:#fff!important;color:#17211d!important;border-color:#bfcfc7!important}
  html[data-theme="system"] body[data-module="visual_pos"] .vpos :is(.view-switch a,.view-switch button,.category-strip a,.category-strip button){background:#fff!important;color:#17211d!important;border-color:#dce6e1!important}
  html[data-theme="system"] body[data-module="visual_pos"] .vpos :is(.view-switch .active,.category-strip .active){background:#17211d!important;color:#fff!important;border-color:#c89b3c!important}
  html[data-theme="system"] body[data-module="visual_pos"] .vpos :is(.basket-empty,.empty-state,.payment-unavailable){background:#f4f7f6!important;color:#68766f!important;border-color:#dce6e1!important}
  html[data-theme="system"] body[data-module="visual_pos"] .vpos .customer-mode-option{background:#fff!important;color:#17211d!important}
  html[data-theme="system"] body[data-module="visual_pos"] .vpos .walk-in-confirmation{background:#e4efe7!important;color:#28503a!important;border-color:#8ab69a!important}
  html[data-theme="system"] body[data-module="visual_pos"] .vpos .walk-in-confirmation :is(label,strong,small){color:#28503a!important}
  html[data-theme="system"] body[data-module="visual_pos"] .vpos .payment-mode label{background:#f4f7f6!important;color:#17211d!important;border-color:#dce6e1!important}
  html[data-theme="system"] body[data-module="visual_pos"] .vpos .payment-method{color:var(--pos-method-text,#17211d)!important}
  html[data-theme="system"] body[data-module="visual_pos"] .vpos #change-due{background:#f4f7f6!important;color:#0b6f45!important}
  html[data-theme="system"] body[data-module="visual_pos"] .vpos .totals{background:#fff!important;border-color:#dce6e1!important}
}

/* Final customer-choice colours after every theme rule. */
body[data-module="visual_pos"] .vpos .customer-mode-option.customer-mode-walk-in,
html[data-theme="night"] body[data-module="visual_pos"] .vpos .customer-mode-option.customer-mode-walk-in{background:#c89b3c!important;color:#17211d!important;border:2px solid #a77922!important;box-shadow:0 5px 12px rgba(105,76,20,.16)!important}
body[data-module="visual_pos"] .vpos .customer-mode-option.customer-mode-existing,
html[data-theme="night"] body[data-module="visual_pos"] .vpos .customer-mode-option.customer-mode-existing{background:#0b8f55!important;color:#fff!important;border:2px solid #076b40!important;box-shadow:0 5px 12px rgba(4,91,53,.18)!important}
body[data-module="visual_pos"] .vpos .customer-mode-option.customer-mode-walk-in :is(.customer-mode-icon,.customer-mode-check),
html[data-theme="night"] body[data-module="visual_pos"] .vpos .customer-mode-option.customer-mode-walk-in :is(.customer-mode-icon,.customer-mode-check){color:#17211d!important}
body[data-module="visual_pos"] .vpos .customer-mode-option.customer-mode-existing :is(.customer-mode-icon,.customer-mode-check),
html[data-theme="night"] body[data-module="visual_pos"] .vpos .customer-mode-option.customer-mode-existing :is(.customer-mode-icon,.customer-mode-check){color:#fff!important}
body[data-module="visual_pos"] .vpos .customer-mode-option.is-selected{outline:3px solid rgba(200,155,60,.42)!important;outline-offset:2px!important}
@media(prefers-color-scheme:dark){
  html[data-theme="system"] body[data-module="visual_pos"] .vpos .customer-mode-option.customer-mode-walk-in{background:#c89b3c!important;color:#17211d!important;border:2px solid #a77922!important}
  html[data-theme="system"] body[data-module="visual_pos"] .vpos .customer-mode-option.customer-mode-existing{background:#0b8f55!important;color:#fff!important;border:2px solid #076b40!important}
}

/* Final basket and Cash refinements — authoritative cascade. */
body[data-module="visual_pos"] .vpos .basket-line{grid-template-columns:52px minmax(0,1fr) auto!important;gap:12px!important;padding:14px 0!important}
body[data-module="visual_pos"] .vpos .basket-line img{width:52px!important;height:52px!important}
body[data-module="visual_pos"] .vpos .basket-line strong{font-size:1rem!important;line-height:1.3!important;font-weight:750!important;color:#17211d!important}
body[data-module="visual_pos"] .vpos .basket-line small{display:block!important;margin-top:5px!important;font-size:.78rem!important;line-height:1.4!important;color:#68766f!important}
body[data-module="visual_pos"] .vpos .basket-line .remove{margin-top:5px!important;font-size:.75rem!important;font-weight:750!important;color:#a52d35!important}
body[data-module="visual_pos"] .vpos .payment-cash{--method-bg:#0b9b72!important;--method-border:#067554!important;--method-text:#fff!important;--method-icon:#fff!important;--method:#067554!important;background:#0b9b72!important;color:#fff!important;border-color:#067554!important}
body[data-module="visual_pos"] .vpos .payment-cash :is(.payment-name,.payment-icon,.payment-check,.selected-label){color:#fff!important}
body[data-module="visual_pos"] .vpos .payment-cash .payment-icon{background:rgba(255,255,255,.16)!important;border-color:rgba(255,255,255,.32)!important}
body[data-module="visual_pos"] .vpos .payment-cash.is-selected{background:#0b9b72!important;box-shadow:0 0 0 3px rgba(11,155,114,.24),0 7px 16px rgba(6,117,84,.2)!important}

/* Authoritative final currency fit. */
.visual-kpis :is(.kpi-sales,.kpi-average) .visual-value{
  max-width:100%!important;
  font-family:var(--font-numeric,var(--app-font-ui))!important;
  font-size:clamp(1.22rem,1.35vw,1.48rem)!important;
  font-weight:var(--weight-semibold,600)!important;
  line-height:1.12!important;
  letter-spacing:-.04em!important;
  font-variant-numeric:tabular-nums lining-nums!important;
  white-space:nowrap!important;
  overflow:visible!important;
}

/* Final readable navigation scale — must remain last in the cascade. */
.sidebar .nav-group-toggle,
.sidebar .nav-section{
  min-height:48px!important;
  font-family:Inter,"Avenir Next",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  font-size:1.03rem!important;
  font-weight:750!important;
  line-height:1.28!important;
  letter-spacing:.005em!important;
}
.sidebar .nav-group-panel a,
.sidebar>nav>a{
  min-height:43px!important;
  padding:10px 13px!important;
  font-family:Inter,"Avenir Next",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  font-size:.97rem!important;
  font-weight:560!important;
  line-height:1.34!important;
  letter-spacing:.003em!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}

/* Final BAFF luxury gradient — authoritative sidebar surface. */
.sidebar{
  background:linear-gradient(180deg,#031f19 0%,#064333 30%,#087052 67%,#0a8c64 100%)!important;
  background-attachment:local!important;
}

/* Subtle BAFF luxury gradient for every major application banner. */
:is(.visual-topbar,.finance-hero,.mkt-hero,.mkt-head,.crm-hero,.crm-page-head,
.ops-head,.ops-head-refined,.accountant-hero,.accountant-command-hero,.cash-hero,
.settings-hero,.settings-page-head,.inv-hero,.inventory-release-hero,.hr-hero,
.purchasing-hero,.visual-pos-header,.vpos-header,.cc-hero){
  background:
    radial-gradient(circle at 94% 0%,rgba(212,174,96,.16),transparent 29%),
    linear-gradient(118deg,#04372c 0%,#075640 52%,#08785a 100%)!important;
  border-color:rgba(255,255,255,.15)!important;
  box-shadow:0 16px 36px rgba(3,45,35,.18)!important;
}

/* Inventory Night mode: dark readable operational surfaces. */
html[data-theme="night"] .inventory-control :is(.inv-panel,.inv-card,.inv-scan){
  background:#16241e!important;
  color:#edf6f1!important;
  border-color:#365046!important;
}
html[data-theme="night"] .inventory-control :is(.inv-panel,.inv-card,.inv-scan) :is(h1,h2,h3,strong,label){
  color:#f5faf7!important;
}
html[data-theme="night"] .inventory-control :is(.inv-panel,.inv-card,.inv-scan) :is(p,span,small,.muted){
  color:#bdcec5!important;
}
html[data-theme="night"] .inventory-control .inv-card strong{
  color:#f3d58f!important;
}
html[data-theme="night"] .inventory-control :is(input,select,textarea){
  background:#0f1d17!important;
  color:#f4faf7!important;
  border-color:#4d675c!important;
}
html[data-theme="night"] .inventory-control :is(input,textarea)::placeholder{
  color:#91a69b!important;
  opacity:1!important;
}
html[data-theme="night"] .inventory-control .inv-nav a{
  background:#1b2923!important;
  color:#edf6f1!important;
  border-color:#45594f!important;
}
html[data-theme="night"] .inventory-control .inv-nav a:hover,
html[data-theme="night"] .inventory-control .inv-nav a[aria-current="page"]{
  background:#0b7858!important;
  color:#fff!important;
  border-color:#d1ad62!important;
}

@media(prefers-color-scheme:dark){
  html[data-theme="system"] .inventory-control :is(.inv-panel,.inv-card,.inv-scan){background:#16241e!important;color:#edf6f1!important;border-color:#365046!important}
  html[data-theme="system"] .inventory-control :is(.inv-panel,.inv-card,.inv-scan) :is(h1,h2,h3,strong,label){color:#f5faf7!important}
  html[data-theme="system"] .inventory-control :is(.inv-panel,.inv-card,.inv-scan) :is(p,span,small,.muted){color:#bdcec5!important}
  html[data-theme="system"] .inventory-control .inv-card strong{color:#f3d58f!important}
  html[data-theme="system"] .inventory-control :is(input,select,textarea){background:#0f1d17!important;color:#f4faf7!important;border-color:#4d675c!important}
  html[data-theme="system"] .inventory-control :is(input,textarea)::placeholder{color:#91a69b!important;opacity:1!important}
}

/* BAFF typography system: Inter for operation, Glegoo for identity and headlines. */
:root{
  --app-font-ui:Inter,"Avenir Next",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --app-font-display:"Glegoo",Georgia,"Times New Roman",serif;
  --font-interface:var(--app-font-ui);
  --font-numeric:var(--app-font-ui);
}
body,
button,.btn,input,select,textarea,
table,th,td,label,small,
.label,.muted,.scope,.badge,
.accountant-action,.accountant-card-link,
.inv-nav,.inv-actions,.settings-tabs{
  font-family:var(--app-font-ui)!important;
}
:is(h1,h2,h3,h4,h5,h6,
.page-title,.section-title,.card-title,.panel-title,
.visual-topbar .cc-greeting,.cc-hero .cc-greeting,
.accountant-panel-heading>strong,
.accountant-panel-heading>span){
  font-family:var(--app-font-display)!important;
}
:is(.visual-value,.metric,.cc-value,[data-numeric],
.kpi-card strong,.visual-kpi strong,.inv-card strong,
.accountant-value,.finance-card strong,
.cash-kpis strong,.management-kpi strong){
  font-family:var(--app-font-ui)!important;
  font-variant-numeric:tabular-nums lining-nums!important;
}

/* System-dark luxury shell and high-contrast upper workspace. */
@media(prefers-color-scheme:dark){
  html[data-theme="system"] .header{
    background:linear-gradient(105deg,rgba(8,30,24,.96),rgba(13,55,42,.94))!important;
    border-bottom:1px solid rgba(211,174,96,.24)!important;
    box-shadow:0 8px 26px rgba(0,0,0,.22)!important;
  }
  html[data-theme="system"] .identity-menu>summary{
    background:linear-gradient(135deg,#123328,#0b241d)!important;
    border-color:rgba(211,174,96,.45)!important;
    box-shadow:0 7px 20px rgba(0,0,0,.24)!important;
  }
  html[data-theme="system"] .identity-dropdown{
    background:linear-gradient(160deg,#153229 0%,#0c211a 100%)!important;
    color:#f6fbf8!important;
    border:1px solid rgba(211,174,96,.46)!important;
    box-shadow:0 20px 50px rgba(0,0,0,.42)!important;
  }
  html[data-theme="system"] .identity-dropdown :is(a,button){
    color:#f5faf7!important;
    background:transparent!important;
  }
  html[data-theme="system"] .identity-dropdown :is(a,button):hover,
  html[data-theme="system"] .identity-dropdown :is(a,button):focus-visible{
    color:#fff!important;
    background:#0b7858!important;
  }
  html[data-theme="system"] .identity-dropdown hr{
    border-color:rgba(211,174,96,.24)!important;
  }
  html[data-theme="system"] .identity-dropdown :is(.appearance-title,.appearance-label){
    color:#d9bd7b!important;
  }
  html[data-theme="system"] .visual-kpi{
    background:linear-gradient(145deg,#172a22,#12231c)!important;
    color:#f3f8f5!important;
    border-color:#365046!important;
    box-shadow:0 10px 24px rgba(0,0,0,.18)!important;
  }
  html[data-theme="system"] .visual-kpi>span,
  html[data-theme="system"] .visual-kpi small{
    color:#b9cbc2!important;
  }
  html[data-theme="system"] .visual-kpi strong,
  html[data-theme="system"] .visual-kpi .visual-value{
    color:#f7fbf9!important;
  }
  html[data-theme="system"] .ceo-quick-actions,
  html[data-theme="system"] .ceo-quick-actions a{
    background:#16261f!important;
    color:#f2f8f5!important;
    border-color:#365046!important;
  }
}

/* System-dark coloured KPI cards: larger, high-contrast information. */
@media(prefers-color-scheme:dark){
  html[data-theme="system"] .visual-kpis .kpi-card{
    color:#14271f!important;
    border:1px solid rgba(20,57,43,.14)!important;
    box-shadow:0 12px 28px rgba(0,0,0,.2)!important;
  }
  html[data-theme="system"] .visual-kpis .kpi-card .kpi-label{
    color:#30483e!important;
    font-size:.82rem!important;
    font-weight:750!important;
    line-height:1.25!important;
    letter-spacing:.055em!important;
  }
  html[data-theme="system"] .visual-kpis .kpi-card .visual-value{
    color:#10271d!important;
    font-family:var(--app-font-ui)!important;
    font-size:clamp(1.42rem,1.5vw,1.58rem)!important;
    font-weight:750!important;
    line-height:1.12!important;
    letter-spacing:-.04em!important;
    white-space:nowrap!important;
  }
  html[data-theme="system"] .visual-kpis .kpi-card:not(.kpi-sales):not(.kpi-average) .visual-value{
    font-size:clamp(1.55rem,1.75vw,1.82rem)!important;
    letter-spacing:-.025em!important;
  }
  html[data-theme="system"] .visual-kpis .kpi-card small{
    color:#586e64!important;
    font-size:.76rem!important;
    font-weight:550!important;
    line-height:1.3!important;
  }
  html[data-theme="system"] .visual-kpis .kpi-margin :is(.data-state-title,.data-state-reason){
    color:#394e45!important;
  }
}
