@import url('fonts/fonts.css');
:root{--primary:#176b50;--primary-dark:#00513b;--amber:#c68b43;--ink:#14232b;--muted:#718079;--canvas:#f6f8f7;--border:#e1e8e5;--soft:#e9f7f0;--green-soft:#e8f5ef;--red:#c93b2b;--red-soft:#fdefee;--white:#fff;--shadow:0 4px 16px -2px rgba(20,35,43,.07)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--canvas);font:15px/1.55 Inter,Arial,sans-serif;color:var(--ink)}button,input,select,textarea{font:inherit}a{color:inherit;text-decoration:none}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.5}a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #429775;outline-offset:2px}.material-symbols-outlined{display:inline-flex;align-items:center;justify-content:center;font-size:20px;vertical-align:middle;line-height:1;flex:none}.material-symbols-outlined svg{display:block}h1,h2,h3{font-family:Manrope,Inter,sans-serif;letter-spacing:-.02em;margin:0}h1{font-size:28px;line-height:1.24}h2{font-size:19px}h3{font-size:16px}p{margin:0}.muted{color:var(--muted)}.small{font-size:13px}.medium{font-weight:600}.strong{font-weight:700}.caps{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.09em;color:var(--muted)}.mono,.num{font-variant-numeric:tabular-nums;font-feature-settings:'tnum'}.link{color:var(--primary);font-weight:600}.link:hover{text-decoration:underline}.app-header{position:fixed;z-index:50;inset:0 0 auto;height:66px;background:#fff;border-bottom:1px solid #e8efeb;box-shadow:0 1px 2px rgba(16,35,25,.04),0 6px 18px -8px rgba(16,35,25,.08);display:flex;align-items:center;padding:0 25px;gap:24px}.header-brand{display:flex;align-items:center;gap:10px;width:210px;flex:none}.brand-mark{width:33px;height:35px;border-radius:5px;background:var(--primary-dark);color:#fff;display:grid;place-items:center}.brand-title{font-family:Manrope;font-weight:800;letter-spacing:-.04em;color:var(--primary-dark);font-size:16px;line-height:1.1}.brand-sub{font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);font-weight:700}.branch-box{display:flex;align-items:center;gap:7px;border:1px solid var(--border);background:var(--soft);padding:7px 10px;border-radius:4px;min-width:130px}.branch-box select{border:0;background:transparent;font-weight:700;color:var(--primary-dark);max-width:210px;outline:0;cursor:pointer}.header-search{margin:auto;max-width:410px;flex:1;position:relative}.header-search input{width:100%;padding-left:38px;background:#f9fbfa}.header-search .material-symbols-outlined{position:absolute;top:9px;left:11px;color:var(--muted)}.header-actions{margin-left:auto;display:flex;align-items:center;gap:12px}.user-pill{display:flex;align-items:center;gap:10px;padding-left:14px;border-left:1px solid var(--border)}.avatar{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;color:var(--primary-dark);background:#caeedf;font-weight:800}.sidebar{position:fixed;z-index:45;top:66px;left:0;bottom:0;width:242px;background:linear-gradient(180deg,#0b3d2e 0%,#102f26 55%,#122e25 100%);overflow:auto;padding:17px 11px 28px}.nav-section{margin-bottom:17px}.nav-head{padding:5px 13px 7px;color:rgba(255,255,255,.42)}.nav-item{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:8px;color:rgba(233,244,238,.74);font-size:14px;font-weight:600;transition:background .13s,color .13s}.nav-item .material-symbols-outlined{font-size:18px;color:rgba(233,244,238,.55)}.nav-item:hover{background:rgba(255,255,255,.08);color:#fff}.nav-item:hover .material-symbols-outlined{color:#fff}.nav-item.active{background:linear-gradient(135deg,#1e8f6b,#177256);color:#fff;box-shadow:0 4px 14px -3px rgba(0,0,0,.4),inset 0 1px 0 rgba(255,255,255,.14)}.nav-item.active .material-symbols-outlined{color:#fff}.sidebar-foot{margin:18px 10px 0;padding:13px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.1);border-radius:10px;font-size:13px;line-height:1.6;color:rgba(255,255,255,.88)}.sidebar-foot .muted{color:rgba(255,255,255,.52)}.workspace{margin-left:242px;padding-top:66px;min-height:100vh}.page{padding:23px 27px 48px;max-width:1700px;margin:0 auto}.eyebrow{display:flex;gap:6px;align-items:center;color:var(--muted);font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;margin-bottom:8px}.page-title{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:23px}.title-sub{font-size:14px;color:var(--muted);margin-top:6px}.actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;padding:8px 16px;font-size:14px;font-weight:700;border:1px solid #ccd9d1;border-radius:8px;background:linear-gradient(180deg,#ffffff,#f2f6f3);color:var(--ink);white-space:nowrap;box-shadow:0 1px 2px rgba(16,35,25,.08),inset 0 1px 0 #fff;transition:background .13s,box-shadow .13s,border-color .13s,transform .13s}.btn .material-symbols-outlined{font-size:18px;line-height:1}.btn:hover{background:linear-gradient(180deg,#ffffff,#e9f1ec);border-color:#aec4b6;box-shadow:0 4px 10px -3px rgba(16,35,25,.18),inset 0 1px 0 #fff;transform:translateY(-1px)}.btn:active{transform:translateY(0);box-shadow:0 1px 2px rgba(16,35,25,.1);transition-duration:.05s}.btn:focus-visible{outline:2px solid #429775;outline-offset:2px;box-shadow:0 0 0 4px rgba(66,151,117,.2)}.btn:disabled,.btn:disabled:hover,.btn:disabled:active{opacity:.55;transform:none;box-shadow:none;background:#f3f6f4;border-color:#d7e0da;color:var(--ink);cursor:not-allowed}.btn-primary{background:linear-gradient(180deg,#1e8262 0%,#176b50 55%,#115a41 100%);border-color:#0f513c;color:#fff;text-shadow:0 1px 1px rgba(0,0,0,.16);box-shadow:0 3px 8px -2px rgba(18,94,68,.5),inset 0 1px 0 rgba(255,255,255,.18)}.btn-primary:hover{background:linear-gradient(180deg,#1a7456,#145f46 60%,#0e4f39);border-color:#0c4733;box-shadow:0 7px 15px -4px rgba(18,94,68,.55),inset 0 1px 0 rgba(255,255,255,.16);transform:translateY(-1px)}.btn-primary:active{background:linear-gradient(180deg,#125c43,#0e4f39);box-shadow:0 1px 3px rgba(18,94,68,.4),inset 0 2px 4px rgba(0,0,0,.18);transform:translateY(0)}.btn-primary:disabled,.btn-primary:disabled:hover,.btn-primary:disabled:active{background:linear-gradient(180deg,#7d9c90,#6f9083);border-color:#6f9083;color:#eef4f1;text-shadow:none;opacity:1;box-shadow:none;transform:none}.btn-amber{background:linear-gradient(180deg,#d59b4f,#c68b43 55%,#b07934);border-color:#a5702f;color:#fff;text-shadow:0 1px 1px rgba(0,0,0,.14);box-shadow:0 3px 8px -2px rgba(198,139,67,.5),inset 0 1px 0 rgba(255,255,255,.2)}.btn-amber:hover{background:linear-gradient(180deg,#ca8f44,#b57e36 60%,#a06e2d);border-color:#966627;box-shadow:0 7px 14px -4px rgba(198,139,67,.55),inset 0 1px 0 rgba(255,255,255,.18);transform:translateY(-1px)}.btn-amber:active{box-shadow:0 1px 3px rgba(198,139,67,.4),inset 0 2px 4px rgba(0,0,0,.15);transform:translateY(0)}.btn-danger{color:#b3291d;background:linear-gradient(180deg,#fffafa,#fdf0ee);border-color:#e8c4be;box-shadow:0 1px 2px rgba(179,41,29,.07)}.btn-danger:hover{background:linear-gradient(180deg,#fdecea,#f9dcd8);border-color:#dca79f;color:#96220f;box-shadow:0 4px 10px -3px rgba(179,41,29,.25);transform:translateY(-1px)}.btn-danger:active{transform:translateY(0);box-shadow:0 1px 2px rgba(179,41,29,.12)}.btn-sm{min-height:32px;padding:4px 11px;font-size:13px;border-radius:7px;gap:5px}.btn-sm .material-symbols-outlined{font-size:16px}.toolbar{display:flex;gap:9px;flex-wrap:wrap;align-items:center;margin-bottom:17px}.toolbar .grow{flex:1}.badge{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:3px 10px;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.025em;background:#eef2f0;color:#56655e}.badge:before{content:'';display:inline-block;width:6px;height:6px;border-radius:50%;background:currentColor}.badge.ok{background:#e7f5ed;color:#147347}.badge.warn{background:#fdf1df;color:#9a671e}.badge.bad{background:#fcecea;color:#bb3927}.badge.neutral{background:#eef2f0;color:#5b6962}.card{background:#fff;border:1px solid #e4eae6;border-radius:12px;box-shadow:0 1px 2px rgba(16,35,25,.04),0 10px 26px -14px rgba(16,35,25,.12);min-width:0}.card-head{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid #e9efeb;gap:10px}.card-head h2{font-size:16px;font-weight:800}.card-body{padding:18px 20px}.kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin-bottom:19px}.kpi{position:relative;padding:18px 19px;min-height:118px}.kpi .kpi-icon{position:absolute;right:16px;top:16px;width:42px;height:42px;border-radius:11px;display:grid;place-items:center;background:var(--green-soft);color:var(--primary);font-size:22px}.kpi.amber .kpi-icon{background:#fdf1e0}.kpi.red .kpi-icon{background:var(--red-soft)}.kpi.ink .kpi-icon{background:#edf1f4}.kpi .value{font:800 26px/1.2 Manrope,Inter;margin:16px 0 5px;color:var(--ink);white-space:nowrap;letter-spacing:-.02em}.kpi .foot{font-size:12.5px;color:var(--muted)}.two-col{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(300px,1fr);gap:16px}.three-col{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}.grid-halves{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.grid-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.field{display:flex;flex-direction:column;gap:5px;min-width:0}.field label,.field-label{font-size:13px;font-weight:700;color:#586862}.field input,.field select,.field textarea,.search-input{width:100%;min-width:0;border:1px solid #cfdad3;border-radius:7px;background:#fff;padding:9px 11px;min-height:40px;color:var(--ink);transition:border-color .13s,box-shadow .13s}.field textarea{min-height:78px;resize:vertical}.field input[type=checkbox]{width:auto;min-height:0;accent-color:var(--primary)}.field input:focus,.field select:focus,.field textarea:focus,.search-input:focus{outline:0;border-color:#176b50;box-shadow:0 0 0 3px rgba(23,107,80,.14)}.hint{color:var(--muted);font-size:12px}.span2{grid-column:span 2}.input-unit{display:flex;align-items:center;position:relative}.input-unit input{padding-right:45px}.input-unit span{position:absolute;right:10px;color:var(--muted);font-size:13px}.table-scroll{overflow-x:auto}.table{width:100%;border-collapse:collapse;text-align:left}.table th{font-size:12.5px;font-weight:700;letter-spacing:.01em;color:#67766d;background:#f7faf8;border-bottom:1px solid #e4eae6;padding:11px 14px;white-space:nowrap}.table td{border-bottom:1px solid #eff3f1;padding:12px 14px;font-size:14px;vertical-align:middle}.table tr:last-child td{border-bottom:0}.table tbody tr{transition:background .1s}.table tbody tr:hover{background:#f4f9f6}.table .right{text-align:right}.table .primary-cell{font-weight:700;color:var(--ink)}.table .subline{color:var(--muted);font-size:12px;margin-top:3px}.empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;min-height:160px;color:#6b7d73;text-align:center;padding:25px}.empty .material-symbols-outlined{font-size:36px;color:#8cad9e}.notice{background:#ecf6ef;border:1px solid #c6e4d2;color:#236347;font-size:14px;padding:13px 15px;border-radius:9px;margin-bottom:17px}.notice.error{background:#fff2f0;border-color:#f1c7c3;color:#a53029}.metric-horizontal{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:11px 0;border-bottom:1px solid #edf1ef}.metric-horizontal:last-child{border:0}.section-bar{margin-top:22px;margin-bottom:12px;display:flex;justify-content:space-between;align-items:center}.section-bar h2{font-size:16px}.progress{height:3px;border-radius:99px;background:#e8eeea;overflow:hidden}.progress>span{display:block;background:linear-gradient(90deg,#5da786,#2f8a64);height:100%;border-radius:99px;opacity:.85}.stat-info{font-size:13px;color:var(--muted);line-height:1.7}.flex{display:flex}.flex-between{display:flex;justify-content:space-between;align-items:center;gap:10px}.flex-wrap{display:flex;flex-wrap:wrap;gap:8px}.gap{gap:10px}.mt{margin-top:16px}.mb{margin-bottom:16px}.mt-sm{margin-top:8px}.padded{padding:16px}.filter-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:14px 0}.filter-row .search-input{max-width:345px}.tag{background:#e6eee9;border-radius:3px;color:#3f6150;padding:3px 7px;font-size:12px;font-weight:700}.list-record{display:flex;gap:11px;align-items:flex-start;padding:12px 0;border-bottom:1px solid var(--border)}.list-record:last-child{border-bottom:0}.icon-tile{width:38px;height:38px;background:#e9f5ed;color:var(--primary);display:grid;place-items:center;border-radius:10px;flex-shrink:0}.icon-tile.amber{background:#fcf1e0;color:#966324}.quick-stat{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.divider{height:1px;background:var(--border);margin:14px 0}.pill-toggle{display:flex;gap:3px;background:#eef3f0;border-radius:4px;padding:4px}.pill-toggle>*{flex:1}.pill-toggle button{padding:8px;border:0;border-radius:3px;background:transparent;font-weight:700;color:var(--muted)}.pill-toggle button.active{color:var(--primary);background:#fff;box-shadow:0 1px 3px #0001}.form-footer{display:flex;justify-content:flex-end;gap:9px;margin-top:16px;border-top:1px solid var(--border);padding-top:14px}.details{padding:13px 17px}.details summary{font-weight:700;cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between}.details summary:after{content:'+';color:var(--primary);font-size:21px}.details[open] summary:after{content:'âˆ’'}.details[open] summary{margin-bottom:15px}.pos-layout{display:grid;grid-template-columns:minmax(0,1fr) 366px;gap:16px;align-items:start}.pos-product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(262px,1fr));gap:14px}.product-card{background:#fff;border:1px solid var(--border);border-left:3px solid #2c7d5d;border-radius:10px;padding:18px 18px 13px;display:flex;flex-direction:column;transition:border-color .14s,box-shadow .14s,transform .14s}.product-card:hover{border-color:#9bbdab;box-shadow:0 8px 18px -10px rgba(16,35,25,.22);transform:translateY(-1px)}.product-card .title{font-weight:800;font-family:Manrope;font-size:16px}.product-card .row{display:flex;justify-content:space-between;align-items:center;gap:8px}.product-card .meta{color:var(--muted);font-size:12px}.product-card .price{font-weight:800;color:#164b39;font-size:15px;margin-top:9px}.cart{position:sticky;top:85px}.cart-row{padding:10px 0;border-bottom:1px solid var(--border)}.cart-row:last-child{border:0}.cart-total{font:800 29px/1.2 Manrope;color:var(--ink)}.cart-empty{min-height:100px}.cart-input{width:58px!important;min-height:32px!important;padding:5px 7px!important}.money-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.page-tools{display:flex;justify-content:space-between;gap:10px;align-items:center;margin:0 0 16px}.chip{padding:6px 10px;background:#eaf4ee;border:1px solid #d1e6d8;font-size:13px;color:#1b6548;font-weight:700;border-radius:3px}.production-layout{display:grid;grid-template-columns:300px 1fr 290px;gap:14px;align-items:start}.production-output{display:grid;grid-template-columns:1fr 110px 75px 65px;gap:8px;align-items:end;margin-bottom:10px}.job-banner{background:#edf8f1;padding:14px;border:1px solid #d1e7d9;border-radius:5px}.logo-large{font:800 29px Manrope;color:var(--primary-dark)}.auth-wrap{min-height:100vh;display:grid;grid-template-columns:1fr 1fr;background:#fff}.auth-aside{background:linear-gradient(150deg,#042a1e 0%,#0b3d2e 42%,#176b50 78%,#1e8a66 100%);padding:55px;display:flex;flex-direction:column;justify-content:space-between;color:#fff}.auth-aside h1{font-size:37px;max-width:520px;margin:22px 0}.auth-aside p{max-width:420px;color:#d7f2e3;font-size:16px;line-height:1.8}.auth-panel{display:flex;align-items:center;justify-content:center;padding:38px}.auth-card{width:min(440px,100%)}.auth-card h2{font-size:29px;margin:15px 0 8px}.auth-card form{display:grid;gap:16px;margin-top:27px}.menu-toggle{display:none}.overlay{display:none}.mobile-only{display:none}.invoice-sheet{max-width:900px;margin:40px auto;background:#fff;border:1px solid #dfe7e2;padding:45px;box-shadow:0 12px 40px #1023190a}.invoice-meta{display:grid;grid-template-columns:1fr 1fr;gap:25px;margin:35px 0}.invoice-sheet h1{font-size:37px}.print-toolbar{max-width:900px;margin:25px auto 0;display:flex;justify-content:space-between;align-items:center}.invoice-totals{width:280px;margin:20px 0 0 auto}.invoice-total-row{display:flex;justify-content:space-between;padding:9px 0;border-bottom:1px solid var(--border)}.invoice-total-row.big{font-weight:800;font-size:19px;border-top:2px solid var(--primary-dark)}.kbd{font:12px monospace;border:1px solid #d8e4db;border-radius:2px;padding:2px 5px;color:var(--muted)}.hidden{display:none!important}.product-card[data-match="false"]{display:none!important}.pc-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.pc-title{font-family:Manrope,Inter,sans-serif;font-weight:800;font-size:18px;letter-spacing:-.015em;line-height:1.3;color:var(--ink)}.pc-dims{font-weight:700;color:#3c5247;white-space:nowrap}.pc-grade{flex:none;font-size:10.5px;font-weight:800;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);background:var(--soft);border:1px solid var(--border);padding:3px 9px;border-radius:99px;margin-top:3px}.pc-stats{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;margin-top:13px}.pc-price{font-weight:800;color:#164b39;font-size:21px;letter-spacing:-.01em;line-height:1.1;font-variant-numeric:tabular-nums;white-space:nowrap}.pc-price .pc-unit{font-size:13px;font-weight:600;color:var(--muted)}.pc-noprice{font-size:13px;color:var(--muted);font-weight:600}.pc-stock{flex:none;font-size:12.5px;color:var(--muted);text-align:right;line-height:1.25;white-space:nowrap}.pc-stock b{display:block;font-size:17px;font-weight:800;color:var(--ink);font-variant-numeric:tabular-nums}.pc-add{width:100%;margin-top:14px;padding:11px 14px;font-size:15px;font-weight:700;min-height:46px;display:flex;align-items:center;justify-content:center;gap:7px;border-radius:7px}.pc-foot{margin-top:10px;font-size:11px;color:var(--muted);opacity:.8;letter-spacing:.02em}.desktop-hide{display:none}
@media(max-width:1280px){.kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.production-layout{grid-template-columns:270px 1fr}.production-layout>.card:last-child{grid-column:2}.header-search{max-width:280px}}
@media(max-width:1050px){.header-brand{width:165px}.sidebar{width:210px}.workspace{margin-left:210px}.header-search{display:none}.pos-layout{grid-template-columns:1fr}.cart{position:static}.two-col{grid-template-columns:1fr}.pos-cart-bar{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:44;background:#fff;border-top:1px solid var(--border);padding:10px 14px;align-items:center;justify-content:space-between;gap:12px;box-shadow:0 -6px 24px rgba(20,35,43,.12)}.pos-cart-bar-info{display:flex;flex-direction:column}#pos-root{padding-bottom:78px}body.pos-sheet-open{overflow:hidden}body.pos-sheet-open aside.cart{position:fixed;inset:auto 0 0 0;bottom:0;z-index:45;max-height:86vh;overflow-y:auto;border-radius:14px 14px 0 0;box-shadow:0 -12px 40px rgba(20,35,43,.3)}body.pos-sheet-open .pos-cart-bar{display:none}body.pos-sheet-open .pos-sheet-close{display:grid;place-items:center;position:absolute;top:8px;right:8px;width:34px;height:34px;border:0;background:#eef3f0;border-radius:50%;font-size:18px}}
@media(max-width:768px){.app-header{padding:0 12px;gap:9px;height:60px}.header-brand{width:auto}.header-brand .brand-sub{display:none}.branch-box{margin-left:auto;min-width:0;padding:5px}.branch-box select{max-width:140px;font-size:12px}.header-actions{margin-left:0}.user-pill .user-meta,.header-actions .header-date{display:none}.user-pill{border:0;padding-left:0}.menu-toggle{display:grid;place-items:center;background:none;border:0}.sidebar{top:60px;width:260px;transform:translateX(-100%);transition:transform .2s;box-shadow:0 20px 50px #0001}.sidebar.open{transform:translateX(0)}.overlay.open{display:block;position:fixed;z-index:43;inset:60px 0 0;background:#0008}.workspace{margin:0;padding-top:60px}.page{padding:17px 13px 36px}.page-title{flex-direction:column;gap:12px;margin-bottom:16px}h1{font-size:24px}.kpi-grid{gap:9px}.kpi{padding:12px;min-height:102px}.kpi .value{font-size:20px}.grid-halves,.three-col,.grid-form{grid-template-columns:1fr}.span2{grid-column:auto}.pos-product-grid{grid-template-columns:1fr}.production-layout{grid-template-columns:1fr}.production-layout>.card:last-child{grid-column:auto}.production-output{grid-template-columns:1fr 85px 70px}.production-output .remove{grid-column:span 3}.desktop-hide{display:block}.auth-wrap{grid-template-columns:1fr}.auth-aside{display:none}.auth-panel{min-height:100vh}.invoice-sheet{margin:12px;padding:20px}.invoice-meta{grid-template-columns:1fr}.print-toolbar{margin:10px}.table th,.table td{padding:9px 10px}}
/* POS improvements: steppers, cart rows, mobile sheet */
.qty-stepper{display:flex;align-items:center;gap:6px}.qty-btn{width:36px;height:36px;border:1px solid var(--border);background:#fff;border-radius:5px;font-size:19px;font-weight:700;color:var(--primary);display:grid;place-items:center;padding:0}.qty-btn:disabled{opacity:.35}.cart-input{width:64px!important;min-height:36px!important;text-align:center;padding:5px 7px!important}.cart-row-controls{flex-wrap:wrap;gap:8px}.avail-note{font-size:12px}.pos-sheet-close{display:none}.pos-cart-bar{display:none}.cart .card-head{position:relative}
@media print{body{background:#fff}.no-print,.print-toolbar,.app-header,.sidebar,.overlay{display:none!important}.workspace{margin:0;padding:0}.invoice-sheet{border:0;box-shadow:none;margin:0;padding:15mm;max-width:none}.invoice-sheet *{color:#000!important} @page{size:A4;margin:0}}
.pay-row{display:flex;gap:7px;align-items:center;margin-bottom:8px}.pay-row select{flex:0 0 auto;max-width:110px}.pay-row input{min-width:0}.pay-row .pay-amount{flex:1}.pay-row .pay-ref{flex:1.2}.pay-remove{border:1px solid var(--border);background:#fff;border-radius:4px;width:30px;height:30px;line-height:1;font-size:16px;color:var(--muted)}.pay-remove:hover{color:var(--red)}.link-btn{border:0;background:none;color:var(--primary);font-weight:700;padding:2px 0;cursor:pointer}.link-btn:hover{text-decoration:underline}
/* POS till polish */
.cart-row{background:#fbfdfc;border:1px solid #e2eae5;border-radius:10px;padding:11px 12px;margin-bottom:9px;box-shadow:0 1px 2px rgba(16,35,25,.04)}
.cart-row:last-child{border:1px solid #e2eae5;margin-bottom:4px}
.cart-row .flex-between>div>b{font-family:Manrope,Inter,sans-serif;font-size:13.5px;font-weight:800;letter-spacing:-.01em}
.cart-row [data-remove-cart]{min-height:26px;padding:2px 9px;border-color:transparent;background:transparent;box-shadow:none;color:var(--muted);font-size:15px;border-radius:6px}
.cart-row [data-remove-cart]:hover{background:var(--red-soft);color:var(--red);border-color:transparent;box-shadow:none;transform:none}
.qty-stepper{display:inline-flex;align-items:stretch;gap:0;border:1px solid #c9d6ce;border-radius:8px;overflow:hidden;background:#fff;box-shadow:0 1px 2px rgba(16,35,25,.05)}
.qty-btn{width:32px;height:34px;border:0;background:transparent;border-radius:0;font-size:17px;font-weight:700;color:var(--primary);display:grid;place-items:center;padding:0;transition:background .12s}
.qty-btn:hover{background:#e8f2ec}
.qty-btn:active{background:#d9e9e0}
.qty-btn:disabled{opacity:.3;background:transparent}
.qty-stepper .cart-input{width:52px!important;min-height:34px!important;text-align:center;padding:5px 4px!important;border:0;border-left:1px solid #e2eae5;border-right:1px solid #e2eae5;border-radius:0;font-weight:700;font-variant-numeric:tabular-nums}
.qty-stepper .cart-input:focus-visible{outline:none;box-shadow:inset 0 0 0 2px #429775}
.avail-note{font-size:11.5px;white-space:nowrap}
.line-amount{font:800 15px/1.2 Manrope,Inter,sans-serif;color:var(--primary-dark);font-variant-numeric:tabular-nums;white-space:nowrap}
.cart-empty{border:1px dashed #d8e2dc;border-radius:10px;margin-bottom:4px}
.net-pay-row{display:flex;justify-content:space-between;align-items:center;gap:12px;background:linear-gradient(180deg,#edf7f0,#e4f1e9);border:1px solid #cbe2d3;border-radius:11px;padding:13px 16px;margin-top:14px;box-shadow:inset 0 1px 0 rgba(255,255,255,.6)}
.net-pay-row .caps{color:#33604a;font-size:12.5px}
.cart-total{font:800 27px/1.15 Manrope,Inter,sans-serif;color:var(--primary-dark);letter-spacing:-.02em}
#payment-rows .pay-row{background:#f8fbf9;border:1px solid #e4eae6;border-radius:9px;padding:7px;gap:7px}
.pay-row select,.pay-row input{min-height:36px}
.pay-remove{border:1px solid transparent;background:transparent;border-radius:6px;width:30px;height:30px;line-height:1;font-size:16px;color:var(--muted);flex:none;transition:background .12s,color .12s}
.pay-remove:hover{color:var(--red);background:var(--red-soft)}
#pay-summary{padding:8px 10px;background:#f2f7f4;border-radius:8px;border:1px solid #e4eae6}
.btn-checkout{width:100%;min-height:56px;font-size:13.8px;font-weight:800;font-family:Manrope,Inter,sans-serif;padding:8px 8px;gap:5px;border-radius:12px;margin-top:6px;box-shadow:0 8px 18px -5px rgba(18,94,68,.55),inset 0 1px 0 rgba(255,255,255,.22)}
.btn-checkout:hover{box-shadow:0 12px 24px -6px rgba(18,94,68,.6),inset 0 1px 0 rgba(255,255,255,.2)}
.btn-checkout .material-symbols-outlined{font-size:20px}
.btn-checkout:disabled,.btn-checkout:disabled:hover{min-height:56px;background:linear-gradient(180deg,#8ba79b,#7c998c);border-color:#7c998c;color:#e6efea;opacity:1;text-shadow:none;box-shadow:none;transform:none}
.pos-cart-bar .btn{min-height:42px}

/* mobile till bar must override the base display:none â€” cascade order fix */
@media(max-width:1050px){.pos-cart-bar{display:flex}body.pos-sheet-open .pos-cart-bar{display:none}}

/* Responsive audit layer: deliberate phone/tablet behaviour. Kept after the legacy rules so print and desktop styles above remain intact. */
body{overflow-x:hidden}
.card-head{flex-wrap:wrap}
.kpi .caps{display:block;padding-right:44px}
.search-toggle{display:none}
.sidebar-branch{display:none}
.sidebar-branch select{width:100%;border:1px solid rgba(255,255,255,.18);border-radius:7px;background:rgba(255,255,255,.08);color:#fff;min-height:40px;padding:8px 10px;font-weight:700}
.sidebar-branch select option{color:var(--ink)}
@media(min-width:1051px){.log-receiving-layout{grid-template-columns:minmax(0,1.5fr) minmax(250px,.8fr)}}
@media(max-width:1050px){
 .app-header{gap:12px}
 .header-brand{width:auto;flex:none}
 .menu-toggle,.search-toggle{display:grid;place-items:center;width:40px;height:40px;min-height:40px;border:0;border-radius:8px;background:transparent;color:var(--ink);padding:0;flex:none}
 .menu-toggle:hover,.search-toggle:hover{background:#edf4f0}
 .sidebar{width:min(292px,84vw);transform:translateX(-105%);transition:transform .2s ease;box-shadow:0 20px 50px rgba(0,0,0,.24)}
 .sidebar.open{transform:translateX(0)}
 .workspace{margin-left:0}
 .overlay.open{display:block;position:fixed;z-index:43;inset:66px 0 0;background:rgba(8,19,15,.55)}
 .mobile-only{display:block}
 .sidebar-branch{display:block;margin:0 4px 16px;padding:12px;border:1px solid rgba(255,255,255,.1);border-radius:10px;background:rgba(255,255,255,.055)}
 .sidebar-branch label{display:block;margin-bottom:6px;font-size:11px;font-weight:800;letter-spacing:.09em;text-transform:uppercase;color:rgba(255,255,255,.48)}
 .header-search{position:fixed;top:66px;left:0;right:0;z-index:49;display:block;max-width:none;margin:0;padding:10px 16px;background:#fff;border-bottom:1px solid var(--border);box-shadow:0 12px 24px -14px rgba(20,35,43,.24);transform:translateY(-115%);opacity:0;pointer-events:none;transition:transform .16s ease,opacity .16s ease}
 .header-search .material-symbols-outlined{top:20px;left:27px}
 body.search-open .header-search{transform:translateY(0);opacity:1;pointer-events:auto}
 .table-scroll{max-width:100%;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;scrollbar-width:thin}
 .table-scroll .table{min-width:640px}
 .table-scroll .table:has(th:nth-child(6)){min-width:760px}
 .table-scroll .table:has(th:nth-child(8)){min-width:960px}
 .table td[colspan] .empty{align-items:flex-start;text-align:left;min-height:110px;padding-top:18px}
 .field input,.field select,.field textarea,.search-input{min-height:42px}
 input[type=checkbox]{width:20px;height:20px;min-height:0;accent-color:var(--primary)}
 .btn{min-height:42px}
 .btn-sm{min-height:38px}
 .pay-row select,.pay-row input{min-height:42px}
 .pay-remove{width:38px;height:38px}
 .qty-btn{width:40px;height:42px}
 .qty-stepper .cart-input{width:56px!important;min-height:42px!important}
}
@media(min-width:600px) and (max-width:900px){
 .three-col{grid-template-columns:repeat(2,minmax(0,1fr))}
 .three-col>*:last-child{grid-column:1/-1}
}
@media(min-width:901px) and (max-width:1050px){
 .pos-layout{grid-template-columns:minmax(0,1fr) 340px}
 .pos-layout>aside.cart{display:block;position:sticky;top:86px}
 .pos-cart-bar{display:none!important}
 #pos-root{padding-bottom:0}
}
@media(max-width:900px){
 .pos-layout{grid-template-columns:1fr}
 .pos-layout>aside.cart{display:none}
 body.pos-sheet-open .pos-layout>aside.cart{display:block}
 #pos-root{padding-bottom:calc(82px + env(safe-area-inset-bottom))}
 .pos-cart-bar{padding-bottom:calc(10px + env(safe-area-inset-bottom))}
 .pos-cart-bar .btn{min-height:46px;padding-left:18px;padding-right:18px}
 body.pos-sheet-open aside.cart{max-height:92vh}
 body.pos-sheet-open .cart .card-head{padding-right:56px}
 body.pos-sheet-open aside.cart .card-body{padding-bottom:112px}
 body.pos-sheet-open .btn-checkout{position:fixed;left:14px;right:14px;bottom:calc(10px + env(safe-area-inset-bottom));z-index:47;margin-top:0}
}
@media(max-width:768px){
 .app-header{gap:8px}
 .header-search{top:60px}
 .overlay.open{inset:60px 0 0}
 .sidebar{width:min(280px,84vw)}
 .business-type-badge{display:none}
 .logout-btn{width:40px;padding-left:0;padding-right:0}
 .header-actions{gap:7px;flex:none}
 .kpi .caps{display:block;padding-right:40px}
 .table-scroll{box-shadow:inset -18px 0 18px -18px rgba(20,35,43,.28)}
 .table-scroll .table th:first-child,.table-scroll .table td:first-child:not([colspan]){position:sticky;left:0;z-index:1;box-shadow:1px 0 0 #e4eae6}
 .table-scroll .table th:first-child{z-index:2;background:#f7faf8}
 .table-scroll .table td:first-child:not([colspan]){background:#fff}
 .table-scroll .table tbody tr:hover td:first-child:not([colspan]){background:#f4f9f6}
 .toolbar,.filter-row{align-items:stretch}
 .toolbar .field,.filter-row .field{flex:1 1 145px}
 .toolbar .search-input,.filter-row .search-input{max-width:none;flex:1 1 100%}
 .page-title .actions{width:100%}
 .page-title .actions .btn{flex:1 1 auto}
 .form-footer{align-items:stretch;flex-direction:column}
 .form-footer .btn{width:100%}
 .pos-product-grid{grid-template-columns:repeat(auto-fill,minmax(262px,1fr))}
 .pay-row{flex-wrap:wrap}
 .pay-row select{flex:0 0 106px}
 .pay-row .pay-amount{flex:1 1 110px}
 .pay-row .pay-ref{flex:1 1 100%;order:4}
 .card-head{padding:14px 16px}
 .card-body{padding:16px}
}
@media(max-width:640px){
 .branch-box{display:none}
 .print-toolbar{margin:10px 12px;flex-direction:column;align-items:stretch;gap:10px}
 .print-toolbar>.btn,.print-toolbar .actions,.print-toolbar .actions .btn{width:100%}
 .print-toolbar .actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
 .print-toolbar .actions .btn-primary{grid-column:1/-1}
 .invoice-sheet h1{font-size:29px}
 .invoice-meta{gap:18px;margin:26px 0}
 .invoice-lines-scroll{overflow:visible;box-shadow:none}
 .invoice-lines-scroll .table{min-width:0!important}
 .invoice-lines-scroll thead{display:none}
 .invoice-lines-scroll tbody tr{display:block;padding:10px 0;border-bottom:1px solid var(--border)}
 .invoice-lines-scroll tbody tr:last-child{border-bottom:0}
 .invoice-lines-scroll td{display:flex;justify-content:space-between;gap:16px;padding:5px 0;border:0;text-align:right;min-width:0;position:static;box-shadow:none;background:transparent!important}
 .invoice-lines-scroll td:before{content:attr(data-label);font-weight:700;color:var(--muted);text-align:left}
 .invoice-lines-scroll td:first-child{display:block;padding-bottom:9px;text-align:left}
 .invoice-lines-scroll td:first-child:before{display:block;margin-bottom:3px;font-size:12px;text-transform:uppercase;letter-spacing:.06em}
}
@media(min-width:600px) and (max-width:768px){
 .grid-form,.grid-halves{grid-template-columns:repeat(2,minmax(0,1fr))}
 .span2{grid-column:span 2}
 .page-title .actions{width:auto}
 .page-title .actions .btn{flex:0 0 auto}
 .form-footer{align-items:center;flex-direction:row}
 .form-footer .btn{width:auto}
}
@media(min-width:769px) and (max-width:1050px){
 .table-scroll{box-shadow:inset -18px 0 18px -18px rgba(20,35,43,.24)}
 .table-scroll .table th:first-child,.table-scroll .table td:first-child:not([colspan]){min-width:135px;position:sticky;left:0;z-index:1;box-shadow:1px 0 0 #e4eae6}
 .table-scroll .table th:first-child{z-index:2;background:#f7faf8}
 .table-scroll .table td:first-child:not([colspan]){background:#fff}
 .table-scroll .table tbody tr:hover td:first-child:not([colspan]){background:#f4f9f6}
}
/* Data-heavy pages stay single-column through 1050px; POS is the deliberate exception with a persistent sale slip. */
@media(max-width:900px){
 .business-type-badge{display:none}
 .user-pill .user-meta{display:none}
 .user-pill{border:0;padding-left:0}
 .search-toggle{margin-left:auto}
}
@media(max-width:768px){
 .table-scroll .table th:first-child,.table-scroll .table td:first-child:not([colspan]){min-width:132px}
 .production-output{grid-template-columns:repeat(2,minmax(0,1fr))}
 .production-output>.field:first-child,.production-output .remove{grid-column:1/-1}
}

/* Audit round 2: print integrity, deliberate 901-1050 header, touch targets */
@media print{
 .table-scroll{overflow-x:visible}
 .table-scroll .table{min-width:0!important}
 .table-scroll .table th:first-child,.table-scroll .table td:first-child:not([colspan]){position:static;box-shadow:none}
 .two-col,.three-col,.grid-halves{grid-template-columns:1fr 1fr}
 .kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .pos-cart-bar,.search-toggle,.menu-toggle{display:none!important}
}
/* 901-1050: room exists for an inline search box â€” use it instead of the toggle panel, so the header has no dead gap */
@media(min-width:901px) and (max-width:1050px){
 .header-search{position:relative;top:auto;left:auto;right:auto;z-index:auto;display:block;transform:none;opacity:1;pointer-events:auto;max-width:none;margin:0;padding:0;background:transparent;border:0;box-shadow:none;flex:1;min-width:0}
 .header-search .material-symbols-outlined{top:11px;left:11px}
 .search-toggle{display:none}
 .user-pill .user-meta{display:none}
 .user-pill{border:0;padding-left:0}
 .header-actions{gap:10px}
}
/* touch targets: nav rows and icon buttons comfortable for till/tablet use */
@media(max-width:1050px){
 .nav-item{padding:11px 12px}
 .nav-section{margin-bottom:13px}
}

/* icon FOUC guard: hide raw material icon names until the lucide shim converts them */
span.material-symbols-outlined:not([data-lucide-done]){visibility:hidden}

/* Sale slip fit: the panel never exceeds viewport height — cart items scroll internally
   while customer picker, totals, payment and the checkout button stay visible. */
aside.cart{display:flex;flex-direction:column;max-height:calc(100vh - 105px)}
aside.cart form.card-body{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
#cart-items{flex:0 1 auto;overflow-y:auto;min-height:54px;scrollbar-width:thin}
#cart-items::-webkit-scrollbar{width:5px}
#cart-items::-webkit-scrollbar-thumb{background:#c3d4c9;border-radius:3px}
@media(max-width:1050px){
  body.pos-sheet-open aside.cart{overflow-y:auto}
  body.pos-sheet-open #cart-items{max-height:27vh;overflow-y:auto}
  body.pos-sheet-open .card-body{padding-bottom:12px}
}

/* POS slip compaction — notes field stays small so checkout is never pushed off-screen */
#pos-root textarea{min-height:38px!important;max-height:38px;resize:none}
#pos-root .field.mb{margin-bottom:8px}

/* POS payment modal — focused, short, solid */
.pay-modal-backdrop{position:fixed;inset:0;z-index:80;background:rgba(16,35,25,.5);backdrop-filter:blur(2px);display:flex;align-items:center;justify-content:center;padding:16px}
.pay-modal-backdrop.hidden{display:none}
.pay-modal{background:#fff;border-radius:14px;box-shadow:0 24px 64px -12px rgba(16,35,25,.45);width:100%;max-width:430px;max-height:calc(100vh - 32px);overflow-y:auto;padding:18px 18px 16px;animation:paymodal-in .18s ease-out}
@keyframes paymodal-in{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:none}}
.pay-modal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.pay-modal-head h2{font-size:18px}
.pay-modal-close{border:0;background:#eef3f0;border-radius:50%;width:32px;height:32px;font-size:17px;display:grid;place-items:center;color:var(--muted)}
.pay-modal-close:hover{background:#e2eae5;color:var(--ink)}
.pay-modal-total{display:flex;align-items:center;justify-content:space-between;background:var(--soft);border:1px solid var(--border);border-radius:10px;padding:12px 14px;margin-bottom:14px}
.pay-modal-total b{font-size:24px;font-weight:800;color:var(--primary-dark);font-variant-numeric:tabular-nums;letter-spacing:-.01em}
.pay-modal-summary{margin:10px 0 14px;font-size:13px;color:var(--muted);background:var(--soft);border-radius:8px;padding:8px 12px;text-align:center}
.pay-modal .pay-row{display:grid;grid-template-columns:110px 1fr auto;gap:8px;margin-bottom:8px}
.pay-modal .pay-row .pay-ref{grid-column:1/-1}
.pay-modal textarea{min-height:38px!important;max-height:38px;resize:none}
.pay-modal .btn-checkout{width:100%;min-height:52px;font-size:15px;font-weight:800;margin-top:4px}
body.pay-modal-open{overflow:hidden}
@media(max-width:520px){
 .pay-modal-backdrop{align-items:flex-end;padding:0}
 .pay-modal{max-width:none;border-radius:16px 16px 0 0;max-height:92vh}
}
/* POS add-to-cart feedback toast */
.pos-toast{position:fixed;left:50%;bottom:96px;transform:translateX(-50%);z-index:90;background:var(--primary-dark);color:#fff;padding:10px 18px;border-radius:999px;font-size:14px;font-weight:600;box-shadow:0 8px 24px rgba(16,35,25,.35);display:flex;align-items:center;gap:8px;animation:toast-in .18s ease-out;pointer-events:none;white-space:nowrap;max-width:92vw;overflow:hidden;text-overflow:ellipsis}
.pos-toast.hidden{display:none}
@keyframes toast-in{from{opacity:0;transform:translateX(-50%) translateY(8px)}to{opacity:1;transform:translateX(-50%)}}
@media(max-width:1050px){.pos-toast{bottom:110px}}
/* cart pulse when item added */
@keyframes cart-pulse{0%{box-shadow:0 0 0 0 rgba(35,134,89,.45)}100%{box-shadow:0 0 0 14px rgba(35,134,89,0)}}
aside.cart.cart-pulse{animation:cart-pulse .5s ease-out}
@keyframes bar-pop{0%{transform:translateY(0)}40%{transform:translateY(-5px)}100%{transform:translateY(0)}}
.pos-cart-bar.bar-pop{animation:bar-pop .35s ease-out}

/* KPI trend chips (vs yesterday) */
.trend{display:inline-flex;align-items:center;gap:3px;font-size:12px;font-weight:700;padding:2px 8px;border-radius:999px;white-space:nowrap}
.trend .material-symbols-outlined{font-size:14px}
.trend em{font-style:normal;font-weight:500;opacity:.75;margin-left:2px}
.trend.up{color:#1a7a4a;background:#e5f5ec}
.trend.down{color:#b4362e;background:#fdecea}

/* dashboard 7-day revenue chart — pure CSS */
.trend-chart{display:flex;align-items:flex-end;gap:8px;height:150px;margin-top:8px}
.trend-col{flex:1;display:flex;flex-direction:column;align-items:center;gap:5px;height:100%;min-width:0}
.trend-val{font-size:10px;font-weight:700;color:var(--muted);white-space:nowrap}
.trend-bar-wrap{flex:1;width:100%;display:flex;align-items:flex-end;justify-content:center}
.trend-bar{width:70%;max-width:34px;background:linear-gradient(180deg,#2f9e6b,var(--primary-dark));border-radius:5px 5px 2px 2px;min-height:3px;transition:height .3s ease}
.trend-bar.today{background:linear-gradient(180deg,#e8a23d,#c47f1a)}
.trend-bar:hover{filter:brightness(1.12)}
.trend-day{font-size:11px;color:var(--muted);font-weight:600}
@media(max-width:700px){.trend-chart{height:120px;gap:5px}.trend-val{display:none}}
