:root{--primary:#17191c;--primary-light:#f0f0ee;--primary-dark:#050607;--sidebar-bg:#111316;--bg:#f3f3f1;--card:#fff;--border:#dddeda;--text:#151719;--text-2:#60656a;--text-3:#969b9f}
html,body{background:#f3f3f1!important;color:#151719}
::selection{color:#fff;background:#17191c}
.sidebar{background:#111316!important;border-right-color:#282b2f!important}.sidebar nav a.active{color:#111!important;background:#fff!important;border-color:#fff!important}.sidebar .brand em{color:#fff!important;background:#292c30!important}
.topbar{background:rgba(255,255,255,.96)!important;border-color:#dedfdb!important}
.content,.main-content,.page-content,.workspace-content{background:#f3f3f1!important}
.card,.stat-card,.dashboard-operating,.dashboard-actions .action-card,.business-trend-card,.sales-trend-card,.dashboard-activity-card,.dashboard-allocation-card{background:#fff!important;border-color:#dddeda!important;box-shadow:0 8px 28px rgba(15,17,19,.045)!important}
.btn.primary,.inventory-actions .stock-add{color:#fff!important;background:#17191c!important;border-color:#17191c!important}.btn.primary:hover,.inventory-actions .stock-add:hover{background:#000!important;border-color:#000!important}
.btn:hover{color:#111!important;border-color:#888!important;background:#f5f5f3!important}.input:focus,select.input:focus,textarea.input:focus,.form-item input:focus,.form-item select:focus{border-color:#555!important;box-shadow:0 0 0 3px rgba(0,0,0,.08)!important}
.chip.active,.dashboard-period-tabs button.active,.sales-period-tabs button.active{color:#fff!important;background:#17191c!important;border-color:#17191c!important}
.table thead th{color:#666!important;background:#f2f2f0!important}.table tbody tr:hover td,.table tr:hover td{background:#f6f6f4!important}
.dashboard-hero,.mobile-workspace-hero,.m-stock-overview-hero,.m-today-hero{background:linear-gradient(135deg,#111316,#25282c)!important;border-color:#2c2f33!important}.dashboard-hero:before,.dashboard-hero:after{border-color:rgba(255,255,255,.12)!important}.dashboard-eyebrow span,.hero-progress i{background:#fff!important}
.dashboard-hero-side{background:#1d2024!important;border-color:#3b3e43!important}.dashboard-actions .action-card .ic,.dashboard-actions .action-card:nth-child(2) .ic,.dashboard-actions .action-card:nth-child(3) .ic,.dashboard-actions .action-card:nth-child(4) .ic,.dashboard-actions .action-card-major:first-child .ic{color:#17191c!important;background:#eeeeeb!important}
.module-hero,.report-hero{background:#fff!important;border-color:#dddeda!important}.inventory-tech-signal,.inventory-filter-toolbar,.stock-filter-row,.report-control{background:#f4f4f2!important;border-color:#dddeda!important}.inventory-tech-signal .pulse,.m-stock-tech-signal .pulse{background:#17191c!important;box-shadow:none!important}
.bottom-nav{background:rgba(255,255,255,.97)!important;border-color:#d9dad6!important}.m-tab.active{background:#17191c!important}.m-tcard,.m-inrow,.m-in-summary{background:#fff!important;border-color:#dddeda!important}
.erp-boot{position:fixed;z-index:99999;left:50%;top:50%;display:flex;align-items:center;gap:11px;transform:translate(-50%,-50%);padding:14px 20px;border-radius:999px;color:#fff;background:rgba(10,11,13,.9);box-shadow:0 16px 46px rgba(0,0,0,.22);backdrop-filter:blur(12px);font:600 13px/1 system-ui,sans-serif}.erp-boot[hidden]{display:none}.erp-boot span{width:15px;height:15px;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;border-radius:50%;animation:erpSpin .7s linear infinite}.erp-boot.is-error span{display:none}@keyframes erpSpin{to{transform:rotate(360deg)}}

/* Mobile final pass: neutral luxury black + white, no legacy teal/blue surfaces. */
@media(max-width:720px){
  html.light-mode body,html.light-mode .content,html.light-mode #view-root{background:#f3f3f1!important}
  html.light-mode .mobile-workspace-hero,
  html.light-mode .m-in-command-hero,
  html.light-mode .m-out-command-hero,
  html.light-mode .m-today-hero,
  html.light-mode .m-stock-overview-hero,
  html.light-mode .pan-mobile-hero{
    color:#f8f8f6!important;border:1px solid #30333a!important;
    background:radial-gradient(circle at 88% 4%,#30333a 0,transparent 34%),linear-gradient(145deg,#202329,#0e1013)!important;
    box-shadow:inset 0 1px rgba(255,255,255,.08),0 15px 34px rgba(10,11,13,.17)!important
  }
  html.light-mode .mobile-workspace-hero:before,html.light-mode .mobile-workspace-hero:after,
  html.light-mode .m-in-command-hero:after,html.light-mode .m-out-command-hero:after,
  html.light-mode .m-today-hero:after,html.light-mode .m-stock-overview-hero:after,
  html.light-mode .pan-mobile-hero:after{border-color:rgba(255,255,255,.055)!important;background:transparent!important}
  html.light-mode .m-hero-eyebrow,html.light-mode .m-hero-eyebrow span:first-child,
  html.light-mode .m-hero-greet p,html.light-mode .m-hero-value span,html.light-mode .m-hero-split span,
  html.light-mode .m-in-command-top,html.light-mode .m-in-command-main p,html.light-mode .m-in-command-main span,
  html.light-mode .m-out-command-top,html.light-mode .m-out-command-main p,html.light-mode .m-out-command-main span,
  html.light-mode .m-today-hero-top,html.light-mode .m-today-hero-main>div>span,
  html.light-mode .m-stock-overview-eyebrow,html.light-mode .m-stock-overview-sub,
  html.light-mode .pan-mobile-hero-top p,html.light-mode .pan-mobile-hero-value>span,html.light-mode .pan-mobile-hero-value>small{color:#a8adb5!important}
  html.light-mode .m-hero-greet h2,html.light-mode .m-hero-value b,html.light-mode .m-hero-split b,
  html.light-mode .m-in-command-main h2,html.light-mode .m-out-command-main h2,
  html.light-mode .m-today-hero-main h2,html.light-mode .m-today-hero-metrics b,
  html.light-mode .m-stock-overview-hero h2,html.light-mode .m-stock-overview-hero b,
  html.light-mode .pan-mobile-hero h2,html.light-mode .pan-mobile-hero-value>b{color:#fff!important}
  html.light-mode .m-hero-eyebrow i,html.light-mode .m-in-live i,html.light-mode .m-today-hero-top i{background:#f4f4f2!important;box-shadow:0 0 0 4px rgba(255,255,255,.08)!important}
  html.light-mode .m-in-command-icon,html.light-mode .m-out-command-icon,html.light-mode .m-today-hero-icon{color:#fff!important;border-color:#4a4e56!important;background:rgba(255,255,255,.055)!important}
  html.light-mode .mobile-inout-shell .inout-page-tabs,html.light-mode .m-tabs,html.light-mode .inout-page-tabs{border-color:#d9dad7!important;background:#efefed!important;box-shadow:none!important}
  html.light-mode .mobile-inout-shell .inout-page-tabs .m-tab,html.light-mode .m-tabs .m-tab,html.light-mode .inout-page-tabs .m-tab{color:#71757a!important;background:transparent!important;box-shadow:none!important}
  html.light-mode .mobile-inout-shell .inout-page-tabs .m-tab.active,html.light-mode .m-tabs .m-tab.active,html.light-mode .inout-page-tabs .m-tab.active{color:#fff!important;background:linear-gradient(145deg,#090a0c,#25282d)!important;box-shadow:0 7px 16px rgba(10,11,13,.16)!important}
  html.light-mode .scan-workspace .chip.active,html.light-mode [data-act="scan-mode"].active,html.light-mode [data-act="scan-automerge"].active{color:#fff!important;border-color:#25282d!important;background:#17191d!important;box-shadow:0 7px 16px rgba(10,11,13,.14)!important}
  html.light-mode .m-in-workbench,html.light-mode .scan-workspace,html.light-mode .m-stock-card,html.light-mode .m-tcard{border-color:#dedfdb!important;background:#fff!important}
  html.light-mode button,html.light-mode .btn,html.light-mode .chip,html.light-mode .m-tab{transition:transform .16s ease,background-color .2s ease,color .2s ease,border-color .2s ease,box-shadow .2s ease}
  html.light-mode button:active,html.light-mode .btn:active,html.light-mode .chip:active,html.light-mode .m-tab:active{transform:scale(.975)}

  /* Guaranteed readable typography on every dark mobile hero. */
  html.light-mode .m-stock-overview-main p,html.light-mode .m-stock-overview-main h2,
  html.light-mode .m-stock-overview-main strong,html.light-mode .m-stock-overview-main>div>span,
  html.light-mode .m-stock-overview-top>span,html.light-mode .m-stock-overview-metrics span,
  html.light-mode .m-stock-overview-metrics small{color:#aeb3bc!important}
  html.light-mode .m-stock-overview-main strong,html.light-mode .m-stock-overview-metrics b{color:#fff!important}
  html.light-mode .m-stock-overview-top button{color:#17191d!important;border-color:#e5e6e3!important;background:#f4f4f1!important;box-shadow:0 6px 16px rgba(0,0,0,.16)!important}
  html.light-mode .m-stock-overview-icon{color:#fff!important;border-color:#555a63!important;background:linear-gradient(145deg,#30343b,#1b1e23)!important}
  html.light-mode .m-stock-tech-signal{color:#eef0f3!important;border-color:#454952!important;background:rgba(255,255,255,.075)!important}
  html.light-mode .m-stock-tech-signal small,html.light-mode .m-stock-tech-signal em{color:#aeb3bc!important}
  html.light-mode .m-stock-tech-signal b{color:#fff!important}
  html.light-mode .m-stock-tech-signal .pulse{background:#e7e9ec!important;box-shadow:0 0 0 4px rgba(255,255,255,.08)!important}
  html.light-mode .m-stock-overview-metrics{border-color:#444851!important;background:rgba(255,255,255,.065)!important}
  html.light-mode .m-stock-overview-metrics>div+div{border-left-color:#444851!important}

  /* Inbound, outbound and activity steps use silver glass instead of unreadable grey slabs. */
  html.light-mode .m-in-step-rail,html.light-mode .m-out-step-rail,
  html.light-mode .m-out-command-metrics,html.light-mode .m-today-hero-metrics{
    color:#eef0f3!important;border-color:#444851!important;background:rgba(255,255,255,.065)!important
  }
  html.light-mode .m-in-step-rail>div,html.light-mode .m-out-step-rail>div,
  html.light-mode .m-in-step-rail span,html.light-mode .m-out-step-rail span,
  html.light-mode .m-out-command-metrics span,html.light-mode .m-out-command-metrics small,
  html.light-mode .m-today-hero-metrics span,html.light-mode .m-today-hero-metrics em{color:#aeb3bc!important}
  html.light-mode .m-in-step-rail>div.active,html.light-mode .m-out-step-rail>div.active{color:#fff!important}
  html.light-mode .m-in-step-rail b,html.light-mode .m-out-step-rail b{color:#1a1c20!important;background:#e9eaec!important}
  html.light-mode .m-in-step-rail .active b,html.light-mode .m-out-step-rail .active b{color:#fff!important;background:#24272d!important;box-shadow:0 0 0 1px #666b75!important}
  html.light-mode .m-in-step-rail i,html.light-mode .m-out-step-rail i{background:linear-gradient(90deg,#747983,#434750)!important}
  html.light-mode .m-out-command-metrics b,html.light-mode .m-today-hero-metrics b{color:#fff!important}
  html.light-mode .m-today-hero-top em,html.light-mode .m-out-command-top em{color:#e3e5e8!important;border-color:#4b4f58!important;background:rgba(255,255,255,.055)!important}

  /* Form and catalogue surfaces stay white with real black text. */
  html.light-mode .m-in-workbench .m-in-form-head,html.light-mode .m-out-pick-head,
  html.light-mode .m-stock-catalog-head{border-color:#e1e2df!important;background:#f6f6f4!important}
  html.light-mode .m-in-workbench .m-in-form-head h3,html.light-mode .m-out-pick-head h3,
  html.light-mode .m-stock-catalog-head h3{color:#181a1e!important}
  html.light-mode .m-in-workbench .m-in-form-head small,html.light-mode .m-in-workbench .m-in-form-head p,
  html.light-mode .m-out-pick-head small,html.light-mode .m-out-pick-head p,
  html.light-mode .m-stock-catalog-head small,html.light-mode .m-stock-catalog-head p{color:#72777e!important}
  html.light-mode .m-in-workbench .m-in-form-icon{color:#fff!important;background:linear-gradient(145deg,#26292f,#111317)!important;box-shadow:0 7px 16px rgba(12,13,15,.16)!important}
  html.light-mode .m-in-workbench .in-code-field label:after{color:#555a61!important;background:#eeeeec!important}
  html.light-mode .m-in-product-block,html.light-mode .m-inrow,html.light-mode .m-out-product-card,
  html.light-mode .m-stock-product-card{color:#202226!important;border-color:#dfe0dd!important;background:#fff!important;box-shadow:0 7px 18px rgba(17,19,21,.045)!important}
  html.light-mode .m-in-workbench .m-in-add-row{color:#282b30!important;border-color:#bfc2c5!important;background:#f7f7f5!important}
  html.light-mode .m-in-workbench .m-submit{color:#fff!important;background:linear-gradient(145deg,#0b0c0f,#25282e)!important;box-shadow:0 10px 22px rgba(10,11,13,.17)!important}

  /* Dashboard functions: one material family, no rainbow icon palette. */
  html.light-mode .mobile-action-rail{gap:9px!important}
  html.light-mode .mobile-action,html.light-mode .mobile-action:nth-child(1),html.light-mode .mobile-action:nth-child(2),
  html.light-mode .mobile-action:nth-child(3),html.light-mode .mobile-action:nth-child(4){color:#202226!important;border-color:#dddeda!important;background:#fff!important;box-shadow:0 8px 20px rgba(17,19,21,.055)!important}
  html.light-mode .mobile-action .ma-icon,html.light-mode .mobile-action:nth-child(1) .ma-icon,
  html.light-mode .mobile-action:nth-child(2) .ma-icon,html.light-mode .mobile-action:nth-child(3) .ma-icon,
  html.light-mode .mobile-action:nth-child(4) .ma-icon{color:#202329!important;background:#efefed!important}
  html.light-mode .mobile-action:active{color:#fff!important;border-color:#24272d!important;background:#17191d!important;box-shadow:0 9px 22px rgba(10,11,13,.17)!important}
  html.light-mode .mobile-action:active .ma-icon{color:#fff!important;background:#30343b!important}
  html.light-mode .mobile-kpi-grid .mobile-metric,html.light-mode .mobile-kpi-grid .mobile-metric:nth-child(1),
  html.light-mode .mobile-kpi-grid .mobile-metric:nth-child(2),html.light-mode .mobile-kpi-grid .mobile-metric:nth-child(3){color:#202226!important;border:1px solid #dddeda!important;border-top:1px solid #dddeda!important;background:#fff!important;box-shadow:0 8px 20px rgba(17,19,21,.045)!important}
  html.light-mode .mobile-kpi-grid .m-value{color:#17191d!important}

  /* Neutral focus and selection feedback with a restrained metallic highlight. */
  html.light-mode .input:focus,html.light-mode input:focus,html.light-mode select:focus,html.light-mode textarea:focus{border-color:#565b64!important;box-shadow:0 0 0 3px rgba(30,33,38,.10)!important}
  html.light-mode .m-chips-scroll .chip.active,html.light-mode .m-today-range .chip.active{color:#fff!important;border-color:#24272d!important;background:#17191d!important}

  /* Secondary tools stay light and neutral so the interface is not a wall of black. */
  html.light-mode :where(.profit-calc-hero,.credit-hero,.wallet-hero,.paid-break-hero,.wish-hero,.me-hero){
    color:#1b1d21!important;border:1px solid #dddeda!important;
    background:radial-gradient(circle at 92% 0%,rgba(25,28,33,.065),transparent 34%),linear-gradient(145deg,#fff,#f1f1ef)!important;
    box-shadow:0 9px 24px rgba(17,19,21,.05)!important
  }
  html.light-mode :where(.profit-calc-hero,.credit-hero,.wallet-hero,.paid-break-hero,.wish-hero,.me-hero):after{border-color:rgba(25,28,33,.045)!important}
  html.light-mode :where(.profit-calc-hero,.credit-hero,.wallet-hero,.paid-break-hero,.wish-hero,.me-hero) :where(h2,h3,b,strong){color:#17191d!important}
  html.light-mode :where(.profit-calc-hero,.credit-hero,.wallet-hero,.paid-break-hero,.wish-hero,.me-hero) :where(p,span,small,i,.section-kicker){color:#6e7379!important}
  html.light-mode :where(.credit-month,.wallet-balance,.pb-rate){color:#202226!important;border-color:#d9dad7!important;background:rgba(255,255,255,.82)!important}
  html.light-mode :where(.credit-month,.wallet-balance,.pb-rate) :where(b,strong,input,select){color:#17191d!important}
  html.light-mode .pan-mobile-hero-top .pan-health-badge{color:#fff!important;border-color:#454a52!important;background:#22252a!important}
}

/* Mobile graphite refinement: readable figures + restrained technical detailing. */
@media(max-width:720px){
  html.light-mode .mobile-workspace-hero,
  html.light-mode .m-in-command-hero,
  html.light-mode .m-out-command-hero,
  html.light-mode .m-today-hero,
  html.light-mode .m-stock-overview-hero,
  html.light-mode .pan-mobile-hero{
    border-color:#454b55!important;
    background:
      linear-gradient(115deg,rgba(255,255,255,.055) 0,rgba(255,255,255,0) 22%),
      repeating-linear-gradient(105deg,rgba(255,255,255,.022) 0,rgba(255,255,255,.022) 1px,transparent 1px,transparent 34px),
      radial-gradient(circle at 92% 8%,rgba(151,164,181,.22) 0,rgba(64,71,82,.12) 25%,transparent 48%),
      linear-gradient(145deg,#30353d 0%,#20242a 44%,#15181d 100%)!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.17),inset 0 -1px 0 rgba(255,255,255,.035),0 14px 30px rgba(20,23,27,.14)!important
  }
  html.light-mode .mobile-workspace-hero:before,
  html.light-mode .m-in-command-hero:before,
  html.light-mode .m-out-command-hero:before,
  html.light-mode .m-today-hero:before,
  html.light-mode .m-stock-overview-hero:before,
  html.light-mode .pan-mobile-hero:before{
    content:""!important;position:absolute!important;z-index:0!important;pointer-events:none!important;
    left:18px!important;right:18px!important;top:0!important;height:1px!important;
    background:linear-gradient(90deg,transparent,rgba(224,232,240,.72),transparent)!important
  }
  html.light-mode .m-stock-overview-metrics b.pos,
  html.light-mode .m-stock-overview-metrics b[class~="pos"]{
    color:#d8fff7!important;text-shadow:0 0 14px rgba(172,236,226,.18)!important
  }
  html.light-mode .m-stock-overview-metrics b.neg,
  html.light-mode .m-stock-overview-metrics b[class~="neg"]{
    color:#ffe3df!important;text-shadow:0 0 14px rgba(255,203,196,.12)!important
  }
  html.light-mode .m-stock-overview-metrics span{color:#c2c8d0!important}
  html.light-mode .m-stock-overview-metrics small{color:#b6bdc6!important}
  html.light-mode .m-stock-overview-metrics{
    border-color:#555c67!important;
    background:linear-gradient(100deg,rgba(255,255,255,.105),rgba(255,255,255,.045))!important;
    box-shadow:inset 0 1px rgba(255,255,255,.06)!important
  }
  html.light-mode .m-stock-overview-metrics>div+div{border-left-color:#59606b!important}
  html.light-mode .topbar{
    border-bottom:1px solid #d9dcdf!important;
    background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(244,245,244,.96))!important;
    box-shadow:0 5px 18px rgba(19,22,26,.055)!important
  }
  html.light-mode .topbar:after{
    content:"";position:absolute;right:14px;bottom:-1px;left:14px;height:1px;pointer-events:none;
    background:linear-gradient(90deg,transparent,#858d98 28%,#d9dde1 72%,transparent)
  }
}
