/* AMS Night — shared across every route, native form and dialog.
   Visual direction: TailAdmin dark dashboards; original AMS implementation.
   Keep business states in modules and all visual roles in these tokens. */
:root{color-scheme:dark;--bg:#10151f;--surface:#1b2332;--surface-raised:#222d40;--surface-inset:#151c29;--line:#344056;--ink:#e2e8f2;--muted:#a6b3c7;--green:#8880ff;--accent:#2f315b;--white:var(--surface);--primary:#6258e8;--primary-hover:#746bf2;--link:#a6a1ff;--positive:#6ee7b7;--warning:#f5ce85;--danger:#ffabb5;--info:#9ac7ff;--shadow:0 6px 22px #00000021;scrollbar-color:#47546c var(--bg);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
html,body,.shell,.page{background:var(--bg);color:var(--ink)}body{line-height:1.55}::selection{background:#5148a3;color:#fff}a{color:var(--link)}h1,h2,h3,h4,strong{color:inherit}h1{font-size:30px;letter-spacing:-.8px;font-weight:720}h2{font-weight:680}p{line-height:1.65}.lead{color:var(--muted)}.eyebrow{color:#a7a2e8}.section-copy,.subtext,.save-state,.stat small,.empty-state p,.breadcrumb,.breadcrumb strong,.card-head p,.step-copy p,.count-subtotal,.kit-bottom small,.field small,footer{color:var(--muted)}
.sidebar{background:#121927;border-right:1px solid #293246;scrollbar-color:#47546c #121927}.brand,.brand:hover{color:#e5eafa}.brand-mark{background:linear-gradient(145deg,#8c81ff,#5a4ed6);color:#fff;box-shadow:0 5px 14px #5146cc35}.brand-store{color:#abb8d1}.workspace{background:#1b2437;border-color:#354056}.workspace-avatar{background:#343354;color:#d9d5ff}.workspace small,.sidebar-bottom,.sidebar-bottom small{color:#a9b7cc}.sidebar-bottom{border-color:#303b50}.nav-group summary{color:#94a4be}.nav-button{background:transparent;color:#b9c5d9;line-height:1.5}.nav-button.active{background:#343054;color:#d9d5ff;box-shadow:inset 3px 0 #9a8eff}.nav-button:hover:not(.active){background:#202b40;color:#edf0fa}.planned-dot{background:#7e8da7}.small-dot{background:#5ed6af}
.topbar{background:#151c29;border-bottom:1px solid #2b3549}.user-button{background:transparent;color:var(--ink)}.user-avatar{background:#302e51;color:#d7d1ff}.pill{background:#242e41;border:1px solid #364258;color:#bbc8db}.connection-notice{background:#1c293c;color:#b0c7e2;border-bottom:1px solid #2d3d54}.connection-notice.online{background:#142c29;color:#a1d6c3}.connection-notice.warning{background:#352c1f;color:#f5ce85}.connection-notice button{background:transparent;color:inherit;border-color:currentColor}
.card,.stat,.kit-card,.login-card,.product-search-field,.listing-section,.order-shipping-section,.order-billing-details,.dashboard-date-range,.sales-periods{background:var(--surface);color:var(--ink);border-color:var(--line);box-shadow:var(--shadow)}.card,.stat,.kit-card{border-radius:15px}.stat{border-top:1px solid var(--line);position:relative;overflow:hidden;padding:21px 22px}.stat-top{color:#b9c6da;font-size:12px;font-weight:550;display:flex;align-items:center;justify-content:space-between;gap:10px}.stat-value,.stat-value.money-value{color:#eef1f8;font-weight:720;letter-spacing:-.7px}.stat:nth-child(2),.stat:nth-child(3),.stat:nth-child(4),.sales-kpis .stat:nth-child(n){border-top-color:var(--line)}.stat::after{content:'';position:absolute;left:0;top:22px;width:3px;height:26px;border-radius:0 4px 4px 0;background:#9c91ff}.stat:nth-child(2)::after{background:#55d6ae}.stat:nth-child(3)::after{background:#77b7fb}.stat:nth-child(4)::after{background:#ed9bad}.metric-icon{width:31px;height:31px;padding:6px;border-radius:9px;color:#c4baff;background:#34304d;flex-shrink:0}.stat:nth-child(2) .metric-icon{color:#8de3bf;background:#203e36}.stat:nth-child(3) .metric-icon{color:#a6cfff;background:#283c57}.stat:nth-child(4) .metric-icon{color:#ffb0bd;background:#452b39}
.button,.component-row button,.close-button,.cost-button{background:#293449;border-color:#46526a;border-bottom-color:#242e42;color:#dce4f2;box-shadow:0 2px 0 #080e1899;transition:background .15s,box-shadow .15s,transform .15s}.button:hover,.component-row button:hover,.close-button:hover,.cost-button:hover{background:#35415b;color:#f0f3fb;box-shadow:0 3px 9px #0003}.button.primary,.button.light,.heading-row [data-inventory="new-product"],.heading-row [data-inventory="new-kit"],.heading-row [data-inventory="purchase"]{background:var(--primary);border-color:#8178fb;border-bottom-color:#4940b3;color:#fff;box-shadow:0 3px 0 #302980,0 4px 12px #4b3fbb22}.button.primary:hover,.button.light:hover{background:var(--primary-hover);color:#fff}.button.subtle{background:transparent;color:#bdc9db;border-color:var(--line);box-shadow:none}.button:disabled{opacity:.5;box-shadow:none}.button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible,.queue-shortcut:focus-visible,.sales-periods .button:focus-visible,.sales-queues .button:focus-visible{outline:2px solid #a99fff;outline-offset:3px}.close-button{border:1px solid var(--line);border-radius:8px;color:#bdc8db}.skip{background:var(--surface-raised);color:var(--ink)}
.field,label,.field small{color:#b9c6d9}.input,input:not([type=checkbox]):not([type=file]),select,textarea,.field input,.field select,.form-grid input,.form-grid select,.quantity-input{background:var(--surface-inset);border-color:#46526b;color:var(--ink);box-shadow:inset 0 1px 3px #0002}input::placeholder,textarea::placeholder{color:#8999b0;opacity:1}input[type=checkbox]{accent-color:#9990ff}option{background:#1b2332;color:var(--ink)}input:focus,select:focus,textarea:focus{border-color:#a99fff}.field input:disabled,select:disabled{background:#242c3b;color:#8897ae}.invalid{border-color:#ef8d9b!important}
table{color:var(--ink)}th,thead th{background:#232f43;color:#bbc9df;border-color:var(--line)}td{border-color:#303c51}tbody tr:not(:last-child) td{border-bottom-color:#303c51}tbody tr:hover,.inventory-products-table tr:hover{background:#242f43}.table-footer,.history-entry,.summary-item,.milestone,.kit-top,.kit-bottom,.table-card,.listing-card,.order-sale-item+.order-sale-item{border-color:var(--line)}.inventory-products-table td::before{color:var(--muted)}.sku,.inline-code{color:#b2c7e7}.inline-code,.recipe,.quantity-chip{background:#222e43;border-color:var(--line)}.product-symbol,.product-graphic,.product-graphic.winter{background:#2b3150;color:#bfb6ff}.recipe .component-row,.kit-card{border-color:var(--line)}.kit-bottom strong,.product-name strong{color:var(--ink)}
.badge.green,.stock-value.positive{background:#173e33;color:#8fe7c1}.badge.amber,.stock-value.pending{background:#44351f;color:#f5ce85}.badge.red{background:#482a35;color:#ffb3bf}.badge.blue{background:#243b59;color:#a7ceff}.badge.purple{background:#353054;color:#c9bbff}.badge.teal{background:#193c40;color:#8ee0dd}.badge.gray,.stock-value.zero{background:#2c374b;color:#c1cde0}.channel-tab{background:#222d40;border-color:#3e4a61;color:#c3d0e4}.channel-tab.selected,.channel-brand.ml{background:#423820;border-color:#6a5932;color:#f0d891}.channel-tab.unavailable{background:#202a3b;border-color:#344056;color:#9eacc1}.channel-brand.shopee{background:#472c27;color:#ffc0a5}.order-quantity{background:#343253;color:#d5ceff}.step-number{background:#343153;color:#d0c9ff}
.hero{background:linear-gradient(115deg,#262d49,#1b3438);border-color:#3b4560;color:var(--ink)}.hero h2{color:#eeeafa}.hero p{color:#b7c5d9}.illustration-card{background:#26324a;color:var(--ink);border-color:#46526c}.illustration-card span{color:var(--muted)}.mini-check{background:#284d43;color:#a5f3cf}.hero-ring{border-color:#4b577244}.callout{background:#3c3022;border-color:#6a5433;color:#f4d39b}.callout.green{background:#1d3b32;border-color:#345e4f;color:#a7e6c6}.progress-line{background:#2b3549}.progress-line span{background:#8f87f7}
dialog{background:var(--surface);color:var(--ink);border:1px solid #47516a;box-shadow:0 30px 100px #0009}dialog::backdrop{background:#070c16ba;backdrop-filter:blur(5px)}.dialog-card{background:var(--surface);color:var(--ink)}.dialog-head,.dialog-actions{border-color:#364158}.dialog-head h2{color:#e8eaf6}.dialog-actions{background:var(--surface);padding-bottom:3px}.dialog-error,#dialog-error{background:#432a32;color:#ffb7c1;border-color:#75414c}.order-cost-pending{background:#402831;border-color:#72404c;color:#ffb7c1}.cost-missing-link{background:transparent;color:#ffb7c1}.cost-missing-link:hover{color:#ffdae0}.cost-missing-link:focus-visible{outline-color:#ffb7c1}#inventory-product-form details{background:var(--surface-inset);border-color:#3d4a62;color:var(--ink)}#toast{background:#2b3d3c;border:1px solid #4a726b;color:#cef1e4;box-shadow:0 8px 30px #0005}#toast.error{background:#482b35;color:#ffd0d8;border-color:#814553}
.login-screen{background:radial-gradient(ellipse at top,#262645 0,#10151f 65%)}.login-screen .shell,.login-screen .page{background:transparent}.login-card{border-color:#3d4660;box-shadow:0 30px 100px #0005}.login-brand{color:#dedaff}.login-card h1{color:#e9eaf6}
.order-sale{background:var(--surface);border-color:#3b465e;box-shadow:0 5px 20px #0002}.order-card-header{background:linear-gradient(110deg,#292640,#22364a);border-color:#42435c;color:#f0edff}.order-card-header .subtext{color:#b5c1d8}.order-card-content{background:var(--surface)}.order-products h3,.order-sale-item h3{color:#e8edf7}.order-financial,.listing-price{background:#151f2e;border-color:#39465b;color:var(--ink)}.finance-caption{color:#a8b8d4}.finance-row{border-color:#303e54;color:#b3c3d8}.finance-row strong{color:#e0e9f7}.finance-row:first-of-type strong{color:#8ae3c3}.order-financial .subtext{border-color:#344258;color:var(--muted)}.order-card-footer,.order-evidence{background:#182030;border-color:#354159;color:var(--muted)}.order-evidence summary,.orders-advanced>summary,.orders-history>summary{color:#b5c5e7}.order-sale-photo,.listing-photo{background:#dfe4ec;border-color:#46526a;box-shadow:none}.order-sale-placeholder,.listing-photo:not(img){background:#222c40;color:#a8b8cf}.listing-title-button{background:transparent;color:#beb8ff}.listing-title-button:hover{color:#dedaff}.listing-filters{background:var(--surface-inset);border-color:var(--line)}
dialog:has(.order-detail-layout) .dialog-card{background:#151d2b}dialog:has(.order-detail-layout) .dialog-head h2{color:#e8eaf7}dialog:has(.order-detail-layout) .close-button{background:#28334a;border-color:#46526c;color:#cad3e4}.order-section-title h3{color:#e4eaf5}.detail-section-icon{background:#2a3856;color:#a2c8ff}.order-shipping-grid>div{background:#151e2d;border-top-color:#809dd0}.order-shipping-grid>div:nth-child(2){border-top-color:#58bca0}.order-shipping-grid span,.order-detail-note{color:#acbad0}.order-shipping-grid strong{color:#dce5f4}.order-operation-note{background:#232d43;color:#b8c8de}.order-billing-details summary{color:#b5c4e8}.order-billing-details dl{background:#172131;color:#c5d2e4}
.sales-periods,.dashboard-date-range{background:#1b2332;border-color:#39435b}.sales-queues{border-color:#354158}.sales-queues .button.primary{background:#343054;border-color:#7064ac;color:#e0d7ff;box-shadow:none}.sales-comparison h2,.dashboard-operations h2{color:#e6eaf5}.sales-chart text{fill:#bdc9dd}.sales-chart line{stroke:#4b5872}.sales-chart rect:nth-of-type(1){fill:#9a8ae3}.sales-chart rect:nth-of-type(2){fill:#52b99d}.comparison-periods{background:#151e2d;color:var(--ink)}.comparison-periods span,.comparison-periods small{color:#adbbd2}.comparison-periods strong{color:#d5dff0}.comparison-periods>div:last-child{border-color:#52b99d}.queue-shortcut{background:transparent;color:#bdcbe0;border-color:#354158}.queue-shortcut:hover{background:#263149}.queue-shortcut strong{color:#e8edf6}.queue-shortcut>span:last-child{color:#a7a0de}.queue-dot{background:#dfb365}.queue-dot.blue{background:#81b2f4}.queue-dot.teal{background:#65cbb0}.queue-dot.gray{background:#97a6bd}.dashboard-coverage,.dashboard-loading{background:#212c42;border-color:#354158;color:#b8c9df}.dashboard-date-range>span{color:#a8b7cc}.sales-periods .button.primary{background:#6258e8}.order-detail-layout .order-shipping-section{background:var(--surface)}
@media(max-width:800px){.sidebar{background:#121927}.topbar{background:#151c29}.hero{background:linear-gradient(115deg,#262d49,#1b3438)}.inventory-products-table tbody tr{border-color:var(--line)}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important;scroll-behavior:auto!important}}
.dialog-actions{box-shadow:0 -8px 16px var(--surface)}dialog:has(.order-detail-layout) .dialog-actions{background:#151d2b;box-shadow:0 -8px 16px #151d2b}#inventory-product-form summary{color:#c6bcff}
@media(max-width:600px){.order-sale-photo{width:72px;height:84px;padding:5px}.order-detail-layout .order-sale-photo{width:72px;height:84px}}

/* Submenus use text hierarchy; no placeholder square glyphs. */
.nav-group-items .nav-button>.icon{display:none}.nav-group-items .nav-button{padding-left:14px;gap:8px}
.daily-sales{margin-top:16px}.daily-sales-readout{display:flex;gap:8px 15px;flex-wrap:wrap;align-items:baseline;background:var(--surface-inset);border:1px solid var(--line);padding:12px 14px;border-radius:9px;min-height:60px}.daily-sales-readout span{color:var(--muted);font-size:12px}.daily-sales-readout strong{font-size:17px;color:#9be4cd;font-variant-numeric:tabular-nums}.daily-sales-svg{display:block;width:100%;height:auto;aspect-ratio:640/250;min-height:170px;touch-action:pan-y;margin-top:12px}.daily-sales-svg:focus-visible{outline:2px solid #aa9eff;outline-offset:3px;border-radius:7px}.daily-grid{stroke:#39465b;stroke-width:1;stroke-dasharray:3 5}.daily-axis{fill:#acbad0;font-size:11px;font-family:inherit}.daily-line{fill:none;stroke:#78d7bc;stroke-width:2.5;stroke-linejoin:round;stroke-linecap:round}.daily-point{fill:#78d7bc;stroke:#17212f;stroke-width:1.5;pointer-events:none}.daily-point[data-active=true]{fill:#d1fff0;stroke:#64c9ad;stroke-width:4;r:5}.daily-guide{stroke:#af9ff0;stroke-width:1;stroke-dasharray:4 4}.daily-chart-help{color:var(--muted);font-size:11px;line-height:1.6}.daily-values summary{color:#b9b0f4;font-size:12px;cursor:pointer;padding:9px 0}.daily-values table{font-size:12px}.daily-values .table-wrap{max-height:300px;overflow:auto}.daily-values th{position:sticky;top:0}@media(max-width:520px){.daily-sales-readout{display:grid;gap:5px}.daily-sales-readout strong{font-size:17px}.daily-sales-svg{min-height:150px}}
