:root{font-family:"Inter","Segoe UI",system-ui,sans-serif;color:#291923;background:#faf5f7;--burgundy:#42101e;--ink:#291923;--muted:#6e5662;--line:#ecdee4;--paper:#fff;--accent:#a71b38;--accent-dark:#80132a;--tint:#fbe9ee;--red:#a5263e;--shadow:0 10px 28px #4618270e;font-synthesis:none}
*{box-sizing:border-box}
body{margin:0;min-height:100vh}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
button:disabled{cursor:not-allowed;opacity:.5}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #c63c59;outline-offset:2px}
a{color:inherit}
svg{width:20px;height:20px;flex:none;vertical-align:middle}
h1,h2,h3,p{margin:0}
h1{font-size:clamp(1.85rem,3vw,2.6rem);letter-spacing:-.065em;line-height:1.1}
h2{font-size:1.1rem;letter-spacing:-.025em}
h3{font-size:1rem}
p{line-height:1.55}
small{font-size:.81rem}
.boot{display:grid;min-height:100vh;place-content:center;color:var(--muted)}
.muted,.hint{color:var(--muted)}
.hint{font-size:.87rem;line-height:1.45}
.eyebrow{font-size:.76rem;font-weight:800;text-transform:uppercase;letter-spacing:.14em}
.brand{display:flex;align-items:center;gap:.75rem;text-align:left;white-space:nowrap}
.brand-mark{display:inline-block;position:relative;overflow:hidden;flex:none;background:white;width:42px;aspect-ratio:1;border-radius:11px;vertical-align:middle}
.brand-mark img{position:absolute;inset:-21% auto auto -22%;width:144%;height:144%;max-width:none}
.brand strong{display:block;font-size:1.16rem;letter-spacing:-.04em}
.brand small{display:block;font-size:.68rem;font-weight:700;letter-spacing:.13em;text-transform:uppercase;margin-top:2px;color:#edbcc9}
.login-shell{min-height:100vh;display:grid;grid-template-columns:minmax(390px,1.08fr) minmax(400px,.92fr)}
.login-art{position:relative;isolation:isolate;background:radial-gradient(ellipse at 94% 88%,#b92a47 0,transparent 60%),linear-gradient(142deg,#330b16,#591328 72%);color:#fff;display:grid;align-items:center;padding:clamp(2rem,7vw,7.5rem);overflow:hidden;min-height:650px}
.login-art::after{content:"";position:absolute;z-index:-1;right:-210px;bottom:-310px;width:630px;aspect-ratio:1;border-radius:50%;border:1px solid #ffd9e44d;box-shadow:0 0 0 44px #ffd9e414,0 0 0 88px #ffd9e414;pointer-events:none}
.login-intro .hero-mark{width:clamp(128px,15vw,205px);border-radius:24%;margin-bottom:clamp(1.65rem,4vw,3.5rem);box-shadow:0 15px 40px #29061566;outline:1px solid #fff7;outline-offset:7px}
.login-intro .eyebrow{color:#ffcad6}
.login-intro h1{font-size:clamp(3.2rem,6.7vw,7rem);line-height:.98;margin:.65rem 0 1.1rem}
.login-intro p{color:#f7dce4;max-width:27rem;font-size:1.08rem}
.top-mark{width:25px;border:1px solid var(--line);border-radius:6px}
.receipt-mark{width:48px;margin-bottom:7px}
.login-main{display:grid;align-items:center;justify-items:center;padding:32px;background:#fffbfc}
.login-form{width:min(100%,410px)}
.login-form h2{font-size:2rem;letter-spacing:-.055em;margin:7px 0 8px}
.login-form>p{margin-bottom:24px}
.login-form .btn{width:100%;margin-top:7px;min-height:49px}
.login-icon{display:grid;place-items:center;width:48px;height:48px;background:var(--tint);color:var(--accent);border-radius:14px;margin-bottom:15px}
.sidebar{position:fixed;inset:0 auto 0 0;width:230px;background:var(--burgundy);color:#fff5f7;display:flex;flex-direction:column;padding:22px 15px 14px;z-index:10}
.sidebar .brand{margin:3px 7px 35px}
.nav-label{color:#edbcc9;padding:4px 13px 9px;display:block}
.nav{display:grid;gap:5px}
.nav button,.side-bottom button{display:flex;align-items:center;gap:11px;width:100%;text-align:left;background:transparent;color:#f2d3dc;border:0;border-radius:9px;padding:11px 12px;font-size:.91rem;font-weight:650}
.nav button:hover,.side-bottom button:hover{background:#612237;color:white}
.nav button.active{background:#742639;color:#fff2f5}
.nav button.active::after{content:"";width:6px;height:6px;background:#ff9db1;border-radius:50%;margin-left:auto}
.side-bottom{margin-top:auto}
.account-mini{display:flex;gap:9px;align-items:center;margin:8px 0;border-top:1px solid #733447;padding:14px 8px 7px;min-width:0}
.account-mini div:last-child{min-width:0}
.account-mini strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.88rem}
.account-mini small{color:#eac2cf}
.avatar{width:34px;height:34px;display:grid;place-items:center;background:#793346;color:#ffe0e8;border-radius:10px;font-weight:800;flex:none}
.workspace{margin-left:230px;min-width:0}
.topbar{min-height:64px;padding:0 27px;display:flex;gap:12px;align-items:center;justify-content:space-between;background:white;border-bottom:1px solid var(--line)}
.breadcrumb{display:flex;align-items:center;gap:10px;font-weight:700;font-size:.91rem}
.breadcrumb svg{color:#896672;width:17px}
.top-date{color:var(--muted);font-size:.88rem;display:flex;align-items:center;gap:8px}
.top-date svg{width:17px}
.page{max-width:1600px;margin:0 auto;padding:26px 26px 32px}
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:22px}
.page-head p{margin-top:7px}
.page-head .eyebrow{color:var(--accent);margin-bottom:7px}
.row,.actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.split{display:flex;align-items:center;justify-content:space-between;gap:10px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid transparent;border-radius:9px;min-height:41px;padding:8px 13px;font-weight:730;font-size:.9rem;background:white;color:var(--ink);white-space:nowrap}
.btn svg{width:17px;height:17px}
.primary{background:var(--accent);color:white}
.primary:hover{background:var(--accent-dark)}
.secondary{border-color:#e8d8df}
.secondary:hover{background:#fbf1f4}
.danger{background:#fff0f2;color:#a31f37}
.danger:hover{background:#ffe2e7}
.icon-btn{width:34px;height:34px;min-height:34px;padding:0}
.icon-btn svg{width:16px}
.panel{background:var(--paper);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);min-width:0}
.panel-pad{padding:18px}
.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:17px 18px;border-bottom:1px solid var(--line)}
.input,.field input,.field select,.field textarea{width:100%;background:#fff;border:1px solid #e1ced7;border-radius:9px;height:43px;color:var(--ink);padding:0 11px;min-width:0}
.field input:disabled{background:#faf5f7}
.field textarea{min-height:70px;resize:vertical;padding:10px 11px}
.field{display:grid;gap:6px;min-width:0;font-size:.87rem;font-weight:700}
.fields{display:grid;gap:14px}
.fields.two{grid-template-columns:1fr 1fr}
.span{grid-column:1/-1}
.field select,.select{appearance:none;background:#fff linear-gradient(45deg,transparent 54%,#896672 55%) right 14px center/5px 5px no-repeat;padding-right:25px}
.search{position:relative;flex:1;min-width:0}
.search input{padding-left:39px}
.search svg{position:absolute;left:12px;top:12px;color:#896672;width:18px;height:18px}
.toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.toolbar .search{min-width:165px}.toolbar select{width:auto}
.pos-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(295px,345px);gap:17px;align-items:start}
.catalog-head{padding:16px 17px 11px}
.chips{display:flex;gap:7px;flex-wrap:wrap;margin-top:13px}
.chip{border:1px solid #ebdce2;background:white;padding:7px 10px;border-radius:7px;font-weight:720;color:#694d59;font-size:.84rem}
.chip.on{background:var(--tint);border-color:#f0c9d4;color:#881930}
.product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(142px,1fr));gap:11px;padding:0 17px 17px}
.product{border:1px solid var(--line);border-radius:12px;background:white;text-align:left;padding:10px;color:var(--ink);min-width:0;transition:border-color .15s,transform .15s}
.product:hover:not(:disabled){border-color:#cc6881;transform:translateY(-2px)}
.product-art{height:66px;display:grid;place-items:center;border-radius:8px;background:#fbe9ee;color:#a71b38;margin-bottom:9px}
.product-art svg{width:32px;height:32px}
.tone-1{background:#eeeafb;color:#6757a9}
.tone-2{background:#ecf3fe;color:#3a6ca1}
.tone-3{background:#fff1e6;color:#a35e29}
.tone-4{background:#f7eaf1;color:#a45078}
.product-name{display:block;font-size:.88rem;font-weight:790;overflow-wrap:anywhere}
.product-meta{display:flex;align-items:center;justify-content:space-between;gap:4px;margin-top:7px}
.product-meta strong{font-size:.87rem;color:var(--accent-dark)}
.product-meta small{font-size:.72rem;color:var(--muted);text-align:right}
.cart{position:sticky;top:14px}
.cart-body{padding:0 15px;max-height:43vh;overflow:auto}
.cart-item{display:grid;grid-template-columns:1fr auto;gap:7px;padding:12px 0;border-bottom:1px solid var(--line);font-size:.87rem}
.cart-item .actions{gap:4px}
.cart-item .icon-btn{width:26px;height:26px;min-height:26px}
.cart-item .icon-btn svg{width:13px}
.cart-item p{font-size:.8rem;color:var(--muted);margin-top:4px}
.cart-foot{padding:14px 16px 16px;border-top:1px solid var(--line);display:grid;gap:10px}
.cart-foot .btn{min-height:45px}
.total{font-size:1.12rem;border-top:1px dashed #ddc3cf;padding-top:10px}
.total strong{font-size:1.35rem;letter-spacing:-.04em}
.empty{display:grid;justify-items:center;text-align:center;gap:9px;padding:30px 17px;color:var(--muted)}
.empty .btn{margin-top:3px}
.empty strong{color:var(--ink);font-size:.95rem}
.empty-icon{display:grid;place-items:center;width:47px;height:47px;border-radius:14px;color:#a71b38;background:#fbe9ee}
.empty-icon svg{width:24px;height:24px}
.cart-body .empty{padding:33px 5px}
.badge{display:inline-flex;font-size:.75rem;line-height:1.2;border-radius:6px;background:#e9f5ef;color:#186846;padding:5px 8px;font-weight:800;white-space:nowrap}
.badge.neutral{background:#f5edf2;color:#664e5c}
.badge.alert{background:#fff0dc;color:#8a500b}
.badge.off{background:#fce9ed;color:#92253b}
.table-wrap{overflow:auto}
table{width:100%;border-collapse:collapse;font-size:.88rem;white-space:nowrap}
th,td{text-align:left;padding:11px 14px;border-bottom:1px solid var(--line)}
th{background:#fcf7f9;color:#694d59;font-size:.8rem}
tr:last-child td{border-bottom:0}
td strong{display:block}
td small{display:block;margin-top:2px;color:var(--muted)}
.table-nav{padding:12px 16px;border-top:1px solid var(--line)}
.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:14px}
.kpi{padding:15px}
.kpi-icon{display:inline-grid;place-items:center;padding:8px;border-radius:9px;background:var(--tint);color:var(--accent);margin-bottom:8px}
.kpi-icon svg{width:17px;height:17px}
.kpi p{font-size:.83rem;font-weight:700;color:var(--muted)}
.kpi strong{font-size:clamp(1.12rem,2vw,1.55rem);letter-spacing:-.05em;display:block;margin-top:2px;overflow-wrap:anywhere}
.report-grid{display:grid;grid-template-columns:1.38fr 1fr;gap:13px;margin-bottom:14px}
.trend{width:100%;height:auto;display:block;margin:8px auto 0}
.chart-row{display:grid;gap:3px;margin:10px 0}
progress{width:100%;height:8px;accent-color:var(--accent);appearance:none}
progress::-webkit-progress-bar{background:#f2e5eb;border-radius:5px}
progress::-webkit-progress-value{background:#bd3353;border-radius:5px}
progress::-moz-progress-bar{background:#bd3353;border-radius:5px}
.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}
.settings-grid h2{margin-bottom:16px}
dialog{width:min(520px,calc(100% - 28px));border:1px solid var(--line);border-radius:16px;padding:0;color:var(--ink);box-shadow:0 18px 65px #44122550;max-height:90vh}
dialog::backdrop{background:#330b1873}
.dialog-body{padding:17px 19px}
.dialog-head{padding:13px 19px}
.dialog-footer{justify-content:flex-end;margin-top:16px}
.form-error{color:var(--red);font-size:.86rem;line-height:1.4}
.form-error:empty{display:none}
.receipt{padding:10px 6px;font-family:ui-monospace,monospace;font-size:.82rem}
.receipt .center{text-align:center}
.receipt div+.split{margin-top:5px}
.receipt hr{border:0;border-top:1px dashed #9aa5af;margin:10px 0}
.receipt h3{font-size:1.13rem}
#toast{position:fixed;right:18px;bottom:18px;z-index:30;max-width:min(470px,calc(100% - 36px));pointer-events:none}
#toast div{border-radius:10px;background:var(--burgundy);color:#fff;box-shadow:var(--shadow);padding:12px 16px}
#toast .error{background:#8d2038}
#print,.mobile-toggle{display:none}
@media(max-width:1100px){.sidebar{width:194px}.workspace{margin-left:194px}.page{padding:21px 17px}.topbar{padding:0 17px}.pos-grid{grid-template-columns:minmax(0,1fr) minmax(266px,300px)}}
@media(max-width:850px){.sidebar{width:63px;padding:12px 7px}.sidebar .brand{margin:5px 3px 25px}.sidebar .brand-mark{width:41px;height:41px}.sidebar .brand div,.nav span,.side-bottom button span,.account-mini div:last-child,.nav-label,.nav button.active::after{display:none}.nav button,.side-bottom button{justify-content:center}.workspace{margin-left:63px}.account-mini{justify-content:center;padding-inline:0}.login-art{padding:2rem}.login-shell{grid-template-columns:1fr 1fr}.login-art{min-height:100vh}}
@media(max-width:650px){.topbar{min-height:53px;padding:0 12px}.top-date{font-size:.78rem}.top-date svg{display:none}.workspace{margin-left:0;padding-bottom:62px}.sidebar{inset:auto 0 0 0;width:auto;height:58px;padding:4px;flex-direction:row;justify-content:center;gap:3px}.sidebar .brand,.account-mini{display:none}.nav,.side-bottom{display:flex;flex-wrap:nowrap;margin:0;gap:2px}.nav button,.side-bottom button{min-width:42px;padding:6px 5px;flex-direction:column;gap:2px;font-size:.58rem}.nav button span,.side-bottom button span{display:inline}.nav svg,.side-bottom svg{width:17px;height:17px}.page{padding:16px 10px}.page-head{align-items:flex-start;flex-direction:column;margin-bottom:15px}.pos-grid,.report-grid,.settings-grid{grid-template-columns:1fr}.cart{position:static}.cart-body{max-height:none}.product-grid{grid-template-columns:repeat(auto-fill,minmax(125px,1fr));padding-inline:10px}.catalog-head{padding-inline:10px}.kpis{grid-template-columns:repeat(2,1fr)}.login-shell{grid-template-columns:1fr}.login-art{min-height:auto;padding:24px 20px}.login-intro{display:grid;grid-template-columns:65px 1fr;column-gap:17px;align-items:center}.login-intro .hero-mark{grid-row:span 2;width:58px;margin:0;outline-offset:3px}.login-intro .eyebrow{align-self:end}.login-intro h1{font-size:clamp(1.65rem,8vw,2.55rem);margin:4px 0 0;align-self:start}.login-intro p{display:none}.login-main{padding:22px 19px 35px;align-items:start}.fields.two{gap:10px}.login-form h2{font-size:1.65rem}}
@media print{@page{margin:8mm}body{background:#fff}#app,#dialog,#toast{display:none!important}#print{display:block;width:min(76mm,100%);margin:0 auto;color:#000}.receipt{padding:0}.receipt-mark img{filter:grayscale(1) brightness(.67) contrast(4)}}
.report-gap{height:14px}
#report-filter{align-items:flex-end}
.account-note{margin:12px 0}

/* Operational layout */
:root{--surface-soft:#fdf8fa;--action-ring:#f0c6d2}
.sidebar{background:linear-gradient(170deg,#350d19 8%,#481121 72%,#4d1426);padding-top:25px}
.sidebar .brand{margin-bottom:30px}
.nav button{min-height:43px;transition:background .15s,color .15s}
.nav button.active{background:#f6d8e21c;box-shadow:inset 3px 0 #ff9bb2;color:#fff}
.topbar{min-height:65px}
.breadcrumb{min-width:0}
.breadcrumb>span:not(.top-mark){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.top-date{white-space:nowrap}
.page-head{gap:18px;margin-bottom:24px}
.page-head h1{font-size:clamp(1.8rem,3vw,2.35rem)}
.page-head .muted{font-size:.94rem}
.page>.panel,.report-grid>.panel,.pos-grid>.panel{border-radius:17px}
.panel-head h2{line-height:1.3}
.panel-head .hint{margin-top:3px}
.btn.subtle{min-height:34px;background:var(--surface-soft);color:var(--accent-dark);border-color:#f2dbe3;font-size:.82rem;padding:6px 10px}
.btn.subtle:not(:disabled):hover{background:var(--tint);border-color:var(--action-ring)}
.dashboard-hero{position:relative;isolation:isolate;overflow:hidden;border-radius:19px;color:white;min-height:169px;margin-bottom:17px;padding:23px 26px;display:flex;align-items:center;justify-content:space-between;gap:20px;background:radial-gradient(ellipse at 97% 112%,#b42347,transparent 62%),linear-gradient(116deg,#490f22,#69172f)}
.dashboard-hero::before,.dashboard-hero::after{content:"";position:absolute;right:34px;bottom:-182px;border:1px solid #ffd6e144;border-radius:50%;width:360px;aspect-ratio:1;z-index:-1}
.dashboard-hero::after{right:6px;bottom:-209px;width:415px;border-color:#ffd6e128}
.dashboard-hero h1{margin:7px 0;font-size:clamp(1.9rem,3.5vw,2.85rem)}
.dashboard-hero p{color:#ffe1e9;font-size:.9rem}
.dashboard-hero p:first-child{font-weight:750}
.dashboard-hero p svg{width:16px;height:16px;margin-right:4px}
.hero-primary{background:white;color:#7d1630}
.hero-primary:hover{background:#fff0f4}
.hero-secondary{background:#ffffff14;border-color:#ffffff66;color:white}
.hero-secondary:hover{background:#ffffff28}
.hero-actions{flex-shrink:0}
.kpis{gap:13px;margin-bottom:17px}
.kpi{padding:15px 16px 16px;border-radius:14px;box-shadow:0 4px 12px #46182707}
.kpi .metric-title{display:flex;justify-content:space-between;align-items:center;gap:8px}
.kpi .kpi-icon{margin:0;flex:none;width:34px;height:34px}
.kpi strong{margin-top:8px;font-variant-numeric:tabular-nums}
.metric-alert .kpi-icon{color:#95581a;background:#fff1de}
.metric-receipt .kpi-icon{color:#87395f;background:#f8e9f2}
.metric-bag .kpi-icon,.metric-box .kpi-icon{color:#735193;background:#f2eaf9}
.report-grid{gap:15px;margin-bottom:16px}
.chart-panel .panel-head>svg{color:var(--accent)}
.chart-panel .empty,.report-grid>.panel>.empty{min-height:142px;align-content:center}
.dashboard-stock,.best-list{list-style:none;margin:0;padding:4px 17px 7px}
.dashboard-stock li,.best-list li{border-bottom:1px solid var(--line);padding:10px 0;font-size:.89rem}
.dashboard-stock li:last-child,.best-list li:last-child{border-bottom:0}
.dashboard-stock small,.park-row small{color:var(--muted);display:block;margin-top:3px}
.stock-icon,.best-rank{background:var(--tint);color:var(--accent-dark);border-radius:9px;width:32px;height:32px;display:grid;place-items:center;flex:none}
.stock-icon svg{width:17px;height:17px}
.best-rank{font-weight:750}
.inventory-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;margin-bottom:16px}
.inventory-summary .kpi{padding:13px 15px}
.inventory-summary .kpi strong{margin-top:4px}
.cart-tools{display:flex;flex-wrap:wrap;gap:7px;padding:11px 15px 7px}
.cart-item{border-bottom:1px solid var(--line);column-gap:12px}
.cart-item>strong,.cart-foot strong{font-variant-numeric:tabular-nums}
.cart-foot .total{color:var(--accent-dark)}
.product{transition:border-color .15s,transform .15s,box-shadow .15s}
.product:hover:not(:disabled){box-shadow:0 5px 14px #6f173316}
.product-art{position:relative;height:77px}
.product-add{position:absolute;right:5px;bottom:5px;display:grid;place-items:center;background:#fff;color:var(--accent-dark);border-radius:6px;width:24px;height:24px;box-shadow:0 2px 5px #49202916}
.product-add svg{width:14px;height:14px}
.product-category{display:block;color:var(--muted);font-size:.73rem;margin:0 0 3px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.product-name{line-height:1.32}
.mobile-cart{display:none}
.park-row{padding:10px 0;border-bottom:1px solid var(--line)}
.park-row:last-child{border:0}
.receive-row{display:grid;grid-template-columns:minmax(0,1fr) 78px minmax(112px,.6fr) 34px;gap:8px;align-items:end;padding:8px 0;border-bottom:1px solid var(--line)}
.receive-row .icon-btn{min-height:43px}
.receive-manual{grid-column:1/-1}
.receive-manual[hidden]{display:none}
.report-controls{display:flex;justify-content:space-between;align-items:end;gap:12px;flex-wrap:wrap}
.report-dates{align-items:end}
dialog .table-wrap{margin-top:9px}

@media(max-width:950px){
  .dashboard-hero{align-items:flex-start;flex-direction:column;gap:14px}
  .hero-actions{flex-shrink:1}
}
@media(max-width:650px){
  .sidebar{padding:4px;background:var(--burgundy)}
  .nav button{min-height:46px}
  .nav button.active{box-shadow:inset 0 2px #ff9bb2}
  .topbar{min-height:53px}
  .top-date{font-size:.73rem}
  .breadcrumb{gap:6px}
  .breadcrumb>span:not(.top-mark){max-width:115px}
  .page-head{gap:12px;margin-bottom:16px}
  .dashboard-hero{min-height:0;padding:18px 16px;margin-bottom:13px}
  .dashboard-hero h1{margin:5px 0}
  .kpis,.inventory-summary{gap:8px}
  .kpi,.inventory-summary .kpi{padding:10px;min-width:0}
  .kpi .kpi-icon{width:28px;height:28px;padding:5px}
  .kpi .metric-title{gap:4px}
  .kpi .metric-title p{line-height:1.25}
  .product-art{height:69px}
  .mobile-cart:not(:empty){position:sticky;bottom:66px;display:flex;justify-content:center;padding:8px 0 0;z-index:2;pointer-events:none}
  .mobile-cart .btn{min-height:43px;pointer-events:auto;box-shadow:0 5px 18px #510c2760}
  #pos-cart{scroll-margin-top:10px}
}
@media(prefers-reduced-motion:reduce){
  .nav button,.product{transition:none}
  .product:hover:not(:disabled){transform:none}
}

.scan-panel{margin-top:12px;border:1px solid #edd0da;border-radius:12px;background:#fdf6f8;padding:10px 12px}
.scan-panel strong{color:#881b36;font-size:.9rem}
.scan-panel form{margin:8px 0;flex-wrap:nowrap}
.scan-panel form input{flex:1;min-width:0}
.scan-panel .hint{overflow-wrap:anywhere;min-height:1.35em}
.sales-figure{margin:0}
.sales-figure .trend{height:auto;width:100%;display:block}
.trend text{font:12px system-ui,sans-serif;fill:var(--muted)}
.trend-grid{stroke:#ead9e1;fill:none;stroke-dasharray:3 4}
.trend-line{stroke:var(--accent);stroke-width:2.8;fill:none;stroke-linecap:round;stroke-linejoin:round}
.trend-area{fill:#f8e5ec}
.trend-dot{stroke:var(--accent);stroke-width:2;fill:#fff}
.chart-key{display:inline-block;width:12px;height:3px;background:var(--accent);vertical-align:middle;border-radius:2px;margin-right:4px}
.section-after{margin-top:16px}
.log-detail{min-width:130px;max-width:330px;white-space:normal;overflow-wrap:anywhere}
a.btn{text-decoration:none}
.field input[type=file]{height:auto;padding:9px 10px}
@media(max-width:650px){
  .sidebar nav{overflow-x:auto;min-width:0;scrollbar-width:none}
  .sidebar nav::-webkit-scrollbar{display:none}
}

/* Camera preview and touch layout */
.camera-pane{min-width:0;border:1px solid #ecd5de;border-radius:12px;padding:10px;background:#fff7fa}
.camera-pane[hidden],.camera-pane [hidden]{display:none!important}
.camera-view{position:relative;width:100%;aspect-ratio:16/10;max-height:38dvh;overflow:hidden;border-radius:9px;background:#24151b}
.camera-view video{width:100%;height:100%;display:block;object-fit:contain}
.camera-guide{position:absolute;inset:25% 10%;border:2px solid #ffffffb0;border-radius:9px;pointer-events:none}
.camera-guide i{display:block;position:absolute;left:7%;right:7%;top:50%;height:1px;background:#ff6d92;box-shadow:0 0 8px #ff4d81}
.camera-feedback{margin:8px 0;min-height:1.4em;overflow-wrap:anywhere}
.camera-help{margin-top:10px}
.product-barcode-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.product-barcode-tools .hint:empty{display:none}
#pos-cart{scroll-margin-block:14px 78px}

@media(max-width:1024px) and (min-width:651px){
  .sidebar{width:67px;padding-inline:7px}
  .workspace{margin-left:67px}
  .sidebar .brand{margin:5px 4px 24px}
  .sidebar .brand div,.nav span,.side-bottom button span,.account-mini div:last-child,.nav-label,.nav button.active::after{display:none}
  .nav button,.side-bottom button{justify-content:center;min-height:46px}
  .account-mini{justify-content:center;padding-inline:0}
  .page{padding:19px 16px}
  .pos-grid{grid-template-columns:minmax(0,1fr) minmax(250px,34%)}
  .pos-grid .toolbar .search{flex-basis:100%}
}
@media(max-width:650px){
  .workspace{padding-bottom:calc(72px + env(safe-area-inset-bottom))}
  .sidebar{height:calc(58px + env(safe-area-inset-bottom));padding-bottom:calc(4px + env(safe-area-inset-bottom));justify-content:space-between}
  .sidebar nav{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(38px,1fr);flex:1;gap:0;min-width:0}
  .sidebar .nav button,.sidebar .side-bottom button{min-width:0;padding:5px 1px;gap:3px;min-height:46px;line-height:1}
  .sidebar .side-bottom button{width:43px}
  .sidebar .nav button span{white-space:nowrap;font-size:clamp(.52rem,2vw,.64rem)}
  .pos-grid .toolbar .search{flex-basis:100%}
  .pos-grid .toolbar>.btn{flex:1}
  .product-grid{grid-template-columns:repeat(auto-fill,minmax(min(135px,46%),1fr));gap:8px}
  .page-head .actions{width:100%;gap:6px}
  .page-head .actions .btn{white-space:normal}
  .btn,.input,.field input,.field select{min-height:44px}
  .input,.field input,.field select,.field textarea{font-size:16px}
  .cart-item .icon-btn{width:35px;height:35px;min-height:35px}
  dialog{max-height:calc(100dvh - 24px);width:calc(100% - 16px)}
  .dialog-head{position:sticky;top:0;background:white;z-index:1}
  .dialog-body{padding:13px 12px}
  .camera-view{max-height:34dvh}
  .mobile-cart:not(:empty){bottom:calc(64px + env(safe-area-inset-bottom))}
  .table-wrap{overscroll-behavior-inline:contain}
}
@media(max-width:360px){
  .top-date{display:none}
  .fields.two{grid-template-columns:1fr}
}

.back-to-store{display:inline-block;margin-top:1rem;color:#701d39;font-size:.86rem;font-weight:650;text-underline-offset:.2em}

.forgot-password{justify-self:end;color:#701d39;font-size:.86rem;font-weight:650;text-underline-offset:.2em}

dialog:has(#receive-lines),dialog:has(.intake-history){width:min(720px,calc(100% - 28px))}
.invoice-proof{display:grid;gap:9px}
.invoice-proof .actions,.intake-history .actions{margin-top:8px}
.invoice-proof img,.invoice-stored{max-width:100%;max-height:360px;object-fit:contain;border:1px solid var(--line);border-radius:9px}
.intake-note{white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:520px){
  .receive-row{grid-template-columns:minmax(0,1fr) minmax(0,1.4fr) 34px}
  .receive-product{grid-column:1/-1}
}
.invoice-proof [hidden]{display:none!important}
