@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,700;1,700&display=swap');
:root{--brown:#54240f;--brown2:#2b1309;--gold:#d99a3c;--cream:#fbf8f3;--ink:#171717;--muted:#6b7280;--line:#e5e7eb;--green:#25833b;--blue:#2468bd;--red:#e03232;--orange:#ed7c19;--sidebar:#1d120d;--shadow:0 5px 20px rgba(44,24,13,.08)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:'DM Sans',Arial,sans-serif;color:var(--ink);background:#f7f7f6}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}button{cursor:pointer}input,select,textarea{width:100%;border:1px solid #d8dade;border-radius:7px;padding:11px 12px;background:white;color:#222;outline:none}input:focus,select:focus,textarea:focus{border-color:#9b5b39;box-shadow:0 0 0 3px rgba(128,67,34,.1)}textarea{min-height:80px;resize:vertical}label{display:flex;flex-direction:column;gap:7px;font-size:13px;font-weight:600;color:#373737}.btn{border:0;border-radius:7px;padding:11px 18px;font-weight:700;display:inline-flex;justify-content:center;align-items:center;gap:7px}.btn.primary{background:linear-gradient(135deg,#6b3017,#3b180b);color:#fff}.btn.green{background:#328a42;color:#fff}.btn.blue{background:#3679cc;color:#fff}.btn.gold{background:var(--gold);color:#2c180c}.btn.light{background:#fff;border:1px solid var(--line)}.btn.wide{width:100%}.green{color:var(--green)!important}.blue{color:var(--blue)!important}.red{color:var(--red)!important}.orange{color:var(--orange)!important}.muted{color:var(--muted)}.block{display:block}.inline{display:inline}.flash{position:fixed;right:22px;top:72px;z-index:50;padding:13px 18px;border-radius:8px;color:white;box-shadow:var(--shadow);animation:flash 4s forwards}.flash.success{background:#278343}.flash.error{background:#c93333}@keyframes flash{0%,80%{opacity:1;transform:none}100%{opacity:0;transform:translateY(-10px);pointer-events:none}}
/* Login */
.login-page{min-height:100vh;background:#fff;display:grid;grid-template-columns:minmax(340px,42%) 1fr;padding:12px}.login-visual{border-radius:10px;overflow:hidden;min-height:620px;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:space-between;text-align:center;padding:55px 20px 80px;background:linear-gradient(rgba(19,8,2,.35),rgba(24,8,1,.7)),radial-gradient(circle at 30% 30%,#9c5b2a,#2b1208 55%,#130805)}.login-visual:after{content:'🥖  🥐  🍞';font-size:70px;filter:drop-shadow(0 10px 12px #0008);position:absolute;bottom:130px}.login-logo{z-index:1}.login-logo .chef{font-size:80px;color:#f4a936}.login-logo h1{font-family:'Playfair Display',serif;font-size:33px;margin:0}.login-logo p{margin:3px}.login-visual>div:last-child{z-index:1}.login-visual h2{font-size:28px;margin:0}.login-form{display:flex;align-items:center;justify-content:center}.login-form form{width:min(450px,80%)}.login-form h2{font-size:27px;margin-bottom:32px}.login-form label{margin:17px 0}.demo{text-align:center;color:#777;font-size:12px;line-height:1.7}.back-store{display:block;text-align:center;color:#7a3920;margin-top:20px;font-size:13px}
/* Application shell */
.app{background:#f5f6f7}.sidebar{position:fixed;inset:0 auto 0 0;width:240px;background:linear-gradient(160deg,#2c180d 0,#0f1f24 100%);color:#e9e6e3;padding:20px 13px;display:flex;flex-direction:column;z-index:20}.brand{height:64px;display:flex;align-items:center;gap:11px;padding:0 12px;margin-bottom:14px}.brand-mark{font-size:36px;color:#e6a33e}.brand span:last-child{display:flex;flex-direction:column}.brand b{font-size:16px}.brand small{font-size:10px;color:#d0a878;margin-top:2px}.sidebar nav{display:flex;flex-direction:column;gap:3px;overflow-y:auto}.sidebar nav a{padding:11px 12px;border-radius:6px;font-size:13px;display:flex;align-items:center;gap:12px}.sidebar nav a i{font-style:normal;width:18px;font-size:17px}.sidebar nav a:hover,.sidebar nav a.active{background:linear-gradient(90deg,#774021,#5c2e1b);color:white}.store-shortcut{font-size:12px;color:#d7b088;padding:12px;margin-top:auto;border-top:1px solid #ffffff19}.main{margin-left:240px;min-height:100vh}.topbar{height:64px;background:white;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 22px;position:sticky;top:0;z-index:10}.topbar h1{font-size:18px;margin:0}.menu-btn{display:none;border:0;background:none;font-size:21px}.user-menu{margin-left:auto;font-size:13px;display:flex;gap:9px;align-items:center}.user-menu a{font-size:11px;color:#9a3f23;margin-left:5px}.content{padding:24px;max-width:1600px;margin:auto}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:20px}.stats.three{grid-template-columns:repeat(3,1fr)}.stat{background:white;border:1px solid #e7e8e9;border-radius:8px;padding:18px;min-height:105px;box-shadow:0 2px 5px #00000005;display:flex;flex-direction:column}.stat small{font-size:12px}.stat strong{font-size:23px;margin-top:14px}.stat em{font-size:10px;font-style:normal;color:#87909b;margin-top:3px}.panel{background:#fff;border:1px solid #e1e3e5;border-radius:9px;padding:18px;box-shadow:0 2px 4px #00000005;margin-bottom:20px}.panel h2{font-size:15px;margin:0 0 16px}.dashboard-grid{display:grid;grid-template-columns:1.25fr 1fr;gap:18px}.bars{height:190px;display:flex;align-items:flex-end;gap:18px;padding:20px 10px 0;border-bottom:1px solid #ddd;background:repeating-linear-gradient(to top,#f3f5f8 0,#f3f5f8 1px,transparent 1px,transparent 45px)}.bars>div{flex:1;height:100%;display:flex;align-items:center;justify-content:flex-end;flex-direction:column;position:relative}.bars span{width:min(38px,70%);background:linear-gradient(#ac6645,#6e2f18);border-radius:4px 4px 0 0;min-height:5px}.bars small{font-size:10px;margin-top:7px}.bars em{font-size:8px;font-style:normal;color:#777}.top-list>div{display:flex;justify-content:space-between;border-bottom:1px solid #eee;padding:12px 3px;font-size:12px}.top-list b{font-size:11px}.quick-actions{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}.quick-actions a{border:1px solid #e8e9ea;border-radius:7px;padding:12px;font-size:11px;text-align:center}.quick-actions i{font-style:normal;font-size:20px;display:block;margin-bottom:5px;color:#723a20}
/* Tables and forms */
.toolbar,.filters{display:flex;gap:10px;align-items:end;margin-bottom:16px}.toolbar .search{max-width:340px;margin-left:auto}.toolbar select{max-width:210px}.filters label{flex-direction:row;align-items:center;white-space:nowrap}.filters input{min-width:160px}.table-wrap{padding:0;overflow-x:auto}table{width:100%;border-collapse:collapse;font-size:12px}th{text-align:left;background:#f4f5f6;padding:13px;color:#444;font-size:11px}td{border-top:1px solid #eceeef;padding:12px}tbody tr:hover{background:#fbfbfb}.table-product{display:flex;align-items:center;gap:12px}.table-product i{font-style:normal;font-size:28px}.status,.role{display:inline-block;padding:4px 8px;border-radius:5px;font-size:10px;background:#eee}.status.ok,.role.caissier{background:#e3f4e4;color:#277835}.status.bad{background:#fde5df;color:#bd3827}.status.off,.status.annulée{background:#eceef0;color:#707780}.status.en-attente{background:#fff2d6;color:#a96b00}.status.préparation{background:#e5edff;color:#275ca8}.status.livrée{background:#e2f5e4;color:#247035}.role.admin{background:#f9e5d8;color:#963e13}.role.comptable{background:#e5ecf9;color:#285c9a}.icon-btn{border:1px solid #dfe2e5;background:white;border-radius:5px;color:#2671c8;padding:5px 8px}.icon-btn.danger{color:#e13232}.avatar{display:inline-grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#633017;color:#fff;margin-right:8px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.span-2{grid-column:1/-1}.checks{flex-direction:row;align-items:center}.checks input{width:auto}.modal-title{display:flex;justify-content:space-between;align-items:center}.modal-title h2{margin:0}.modal-title button{font-size:26px;border:0;background:none}dialog{border:0;border-radius:10px;box-shadow:0 20px 60px #0006;width:min(600px,92vw);padding:0}dialog::backdrop{background:#11090499}.modal-form{padding:24px;display:flex;flex-direction:column;gap:15px}.cards-list{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.contact-card{background:white;border:1px solid var(--line);padding:20px;border-radius:9px}.contact-card>div{font-size:34px;color:#794020}.contact-card h3{margin:7px 0}.contact-card p{font-size:12px;line-height:1.7;color:#6b7280}.settings{display:grid;grid-template-columns:2fr 1fr;gap:45px}.settings form{display:flex;flex-direction:column;gap:18px}.settings aside{text-align:center;border-left:1px solid var(--line);padding:25px}.settings aside .brand-mark{font-size:80px}.category-report>div{margin:16px 0}.category-report label{display:flex;flex-direction:row;justify-content:space-between}.category-report i{display:block;height:9px;background:#eee;border-radius:8px;overflow:hidden;margin-top:6px}.category-report i span{display:block;height:100%;background:linear-gradient(90deg,#64321d,#d18845)}
/* POS */
.pos{display:grid;grid-template-columns:1fr 390px;background:#fff;border:1px solid #ddd;border-radius:9px;overflow:hidden;min-height:650px}.pos-products{padding:14px}.pos-search input{background:#f5f5f4;border:0}.category-pills{display:flex;gap:7px;margin:13px 0;overflow:auto}.category-pills button{border:1px solid #ddd;background:#fff;border-radius:5px;padding:9px 18px;font-size:11px}.category-pills button.active{background:#6a3019;color:#fff}.pos-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.pos-product{background:#fff;border:1px solid #e4e5e5;border-radius:6px;min-height:150px;display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative}.pos-product:hover{border-color:#9e5d37;box-shadow:0 3px 10px #5a2a1318}.pos-product>span{font-size:52px}.pos-product b{font-size:12px;margin-top:7px}.pos-product small{font-weight:700;margin-top:5px}.pos-product em{font-style:normal;font-size:8px;color:#999;position:absolute;right:5px;top:5px}.pos-cart{border-left:1px solid #e4e4e4;padding:16px;display:flex;flex-direction:column}.pos-cart h2{display:flex;justify-content:space-between;font-size:16px}.pos-cart h2 span{font-size:10px;color:#777;font-weight:400}.cart-items{min-height:210px;flex:1}.empty-cart{text-align:center;color:#aaa;padding-top:70px;font-size:35px}.empty-cart p{font-size:12px}.pos-line{display:grid;grid-template-columns:1fr auto auto;gap:8px;align-items:center;border-bottom:1px solid #eee;padding:10px 0;font-size:11px}.pos-line>span b{display:block}.pos-line>span small{color:#777}.qty{display:flex;align-items:center}.qty button{border:1px solid #ddd;background:#fff;width:23px;height:23px}.qty i{font-style:normal;width:26px;text-align:center}.pos-line>button{border:0;background:none;color:#df3c33}.pos-customer{margin:8px 0}.pos-customer select{padding:8px}.discount{display:flex;flex-direction:row;align-items:center;justify-content:space-between;border-top:1px solid #eee;padding:12px 0}.discount input{width:100px;text-align:right;padding:7px}.pos-total{display:flex;justify-content:space-between;align-items:center;font-size:16px;padding:10px 0}.pos-total strong{font-size:23px}.payment{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin:10px 0}.payment button{padding:8px 4px;border:0;border-radius:5px;background:#eee;font-size:11px}.payment button.active{background:#2b8741;color:white}.cash-details,.credit-details{background:#f8f5f2;border:1px solid #eadfd8;border-radius:8px;padding:11px;margin:3px 0 10px}.cash-details label,.credit-details label{font-size:11px}.cash-details input,.credit-details input{padding:8px}.change-box{display:flex;justify-content:space-between;align-items:center;margin-top:10px;color:#5c2e1b}.change-box strong{font-size:18px}.credit-details small{display:block;color:#8a6048;margin-top:7px}.checkout-btn{font-size:15px}.checkout-btn:disabled{opacity:.5;cursor:not-allowed}.ticket-choice{width:min(660px,94vw);text-align:center}.ticket-choice>div{padding:28px}.ticket-choice h2{margin:8px}.ticket-choice p{color:#6b7280;font-size:13px;line-height:1.5}.ticket-choice>div>div:last-of-type{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:20px}.ticket-choice .btn{min-height:50px;white-space:normal}.direct-print-note{display:block;color:#6b7280;margin-top:12px}.direct-print-frame{position:fixed!important;left:-10000px!important;top:-10000px!important;width:1px!important;height:1px!important;border:0!important;opacity:0!important;pointer-events:none!important}
/* Ticket */
.receipt-actions{display:flex;justify-content:center;align-items:center;gap:10px;margin-bottom:18px;flex-wrap:wrap}.receipt-print-warning{flex-basis:100%;text-align:center;color:#8a4b2a;font-size:11px}.receipt{width:var(--receipt-width,80mm);max-width:100%;margin:0 auto;background:#fff;border:1px dashed #bbb;padding:10mm 7mm;box-shadow:0 8px 25px #0001;font-family:Arial,sans-serif}.receipt header{text-align:center;border-bottom:1px dashed #777;padding-bottom:10px}.receipt-logo{font-size:42px;color:#a05b20}.receipt h1{font-size:21px;margin:2px 0}.receipt header p{font-size:11px;line-height:1.5;margin:5px}.receipt-meta{display:flex;flex-direction:column;gap:4px;font-size:10px;padding:10px 0;border-bottom:1px dashed #777}.receipt table{font-size:10px}.receipt th,.receipt td{padding:7px 2px;background:#fff}.receipt th:nth-child(n+2),.receipt td:nth-child(n+2){text-align:right}.receipt-totals{border-top:1px dashed #777;padding-top:9px;display:flex;flex-direction:column;gap:6px;font-size:11px}.receipt-totals span,.receipt-totals strong{display:flex;justify-content:space-between}.receipt-totals>strong{font-size:15px;border-block:1px dashed #777;padding:7px 0}.receipt footer{text-align:center;font-weight:700;font-size:11px;margin-top:18px}.table-title{padding:16px 18px 0}
/* Reports */
.period-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.stats.four{grid-template-columns:repeat(4,1fr)}.target-card{display:grid;grid-template-columns:1fr 2fr;align-items:center;gap:20px}.target-card p{margin:0;color:#6b7280}.target-card i{display:block;height:18px;background:#eee;border-radius:20px;overflow:hidden}.target-card i span{display:block;height:100%;background:linear-gradient(90deg,#6b3017,#d99a3c);border-radius:20px}.report-summary{display:flex;flex-direction:column;gap:14px}.report-summary span,.report-summary strong{display:flex;justify-content:space-between;border-bottom:1px solid #eee;padding-bottom:10px}.report-summary strong{font-size:16px;color:#2b6d38}
.report-print-actions{display:flex;justify-content:center;gap:10px;margin-bottom:18px}.report-print{max-width:297mm;margin:0 auto;background:#fff;padding:12mm;box-shadow:0 8px 30px #0002;color:#252525}.report-print>header{display:flex;justify-content:space-between;align-items:flex-start;border-bottom:3px solid #6b3017;padding-bottom:12px}.report-print>header>div:last-child{text-align:right}.report-print-logo{font-size:42px;color:#b36d27}.report-print h1{margin:0;color:#54240f;font-size:24px}.report-print h2{margin:0;color:#54240f;letter-spacing:2px}.report-print header p{font-size:11px;line-height:1.6;color:#666}.report-print-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:16px 0}.report-print-kpis div{border:1px solid #ddd;border-left:4px solid #6b3017;padding:10px}.report-print-kpis small{display:block;color:#666;font-size:10px}.report-print-kpis b{display:block;font-size:17px;margin-top:5px}.report-print h3{font-size:13px;color:#54240f;margin:18px 0 8px}.report-print table{font-size:10px;border:1px solid #bbb}.report-print th{background:#6b3017;color:#fff;padding:8px}.report-print td{padding:7px;border:1px solid #ddd}.report-print th:nth-child(n+2),.report-print td:nth-child(n+2){text-align:right}.report-print tfoot th{background:#eee;color:#222;border:1px solid #bbb}.report-print>footer{text-align:center;font-size:9px;color:#666;margin-top:15px;border-top:1px solid #ccc;padding-top:8px}
/* Invoice */
.invoice{margin:0 auto;background:#fff;box-shadow:0 8px 30px #0002;padding:18mm;color:#282828}.invoice-a4{width:210mm;min-height:297mm}.invoice-a5{width:148mm;min-height:210mm;padding:12mm}.invoice header{display:flex;justify-content:space-between;border-bottom:3px solid var(--invoice-color);padding-bottom:15px}.invoice header>div:last-child{text-align:right}.invoice-logo{font-size:46px;color:var(--invoice-color)}.invoice h1{margin:0;color:var(--invoice-color)}.invoice h2{font-size:30px;letter-spacing:3px;color:var(--invoice-color);margin:0}.invoice p{font-size:12px;line-height:1.6;color:#5f6368}.invoice-parties{display:grid;grid-template-columns:1fr 1fr;gap:30px;padding:22px 0}.invoice-parties>div{border-left:4px solid var(--invoice-color);padding-left:14px}.invoice-parties small{color:#777;letter-spacing:1px}.invoice-parties h3{margin:7px 0}.invoice table th{background:var(--invoice-color);color:#fff}.invoice table td,.invoice table th{padding:11px}.invoice table td:nth-child(n+2),.invoice table th:nth-child(n+2){text-align:right}.invoice-total{width:45%;margin:25px 0 0 auto;display:flex;flex-direction:column;gap:9px}.invoice-total span,.invoice-total strong{display:flex;justify-content:space-between}.invoice-total strong{background:var(--invoice-color);color:#fff;padding:12px}.invoice footer{text-align:center;border-top:1px solid #ddd;margin-top:40px;padding-top:15px;color:#666}
/* Store */
.public{background:var(--cream);color:#2e241d}.store-header{height:82px;background:#fff;display:flex;align-items:center;padding:0 max(5vw,30px);position:sticky;top:0;z-index:20;border-bottom:1px solid #eee}.store-brand{display:grid;grid-template-columns:42px auto;grid-template-rows:auto auto;align-items:center}.store-brand>span{grid-row:1/3;font-size:37px;color:#b36d27}.store-brand b{font-family:'Playfair Display',serif;font-size:19px}.store-brand small{font-size:9px;color:#9b724c;letter-spacing:1px}.store-header nav{margin-left:auto;display:flex;align-items:center;gap:28px;font-size:13px;font-weight:600}.cart-link{background:#f4eadd;padding:10px 13px;border-radius:20px}.cart-link b{background:#6b3017;color:#fff;border-radius:50%;padding:2px 6px}.login-link{color:#79401f}.hero{min-height:590px;background:radial-gradient(circle at 75% 40%,#85522e 0,#382014 31%,#1c0f09 68%);color:#fff;display:grid;grid-template-columns:1fr 1fr;align-items:center;padding:70px 8%;overflow:hidden}.hero h1{font-family:'Playfair Display',serif;font-size:64px;line-height:1.07;margin:17px 0}.hero h1 em{color:#e2a84f;font-weight:700}.hero p{max-width:530px;line-height:1.7;color:#dccfc6}.eyebrow,.section-heading>span{font-size:11px;letter-spacing:3px;color:#d69638;font-weight:800}.hero-art{position:relative;height:390px;display:flex;align-items:center;justify-content:center}.hero-art:before{content:'';position:absolute;width:420px;height:280px;border-radius:50%;background:#ba783c33;filter:blur(10px)}.hero-art span{font-size:140px;position:absolute;filter:drop-shadow(0 25px 20px #0008)}.hero-art span:nth-child(1){transform:rotate(-17deg) translate(-90px,10px)}.hero-art span:nth-child(2){transform:rotate(12deg) translate(90px,35px)}.hero-art span:nth-child(3){font-size:120px;transform:translate(5px,-85px)}.store-section{padding:80px max(6vw,30px)}.section-heading{text-align:center;margin-bottom:40px}.section-heading h1,.section-heading h2{font-family:'Playfair Display',serif;font-size:38px;margin:10px}.section-heading p{color:#7b7069}.product-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:20px}.shop-card{background:#fff;border-radius:5px;padding:0 18px 18px;box-shadow:var(--shadow);position:relative;overflow:hidden}.product-emoji{height:175px;margin:0 -18px 15px;background:linear-gradient(135deg,#f2e4d4,#fbf8f3);display:grid;place-items:center;font-size:82px}.shop-card .badge{position:absolute;top:12px;left:12px;background:#6f351b;color:white;font-size:9px;padding:5px 8px;border-radius:15px}.shop-card>small{color:#b1773a;font-weight:700;text-transform:uppercase;font-size:9px;letter-spacing:1px}.shop-card h3{font-family:'Playfair Display',serif;margin:7px 0}.shop-card>p{font-size:11px;color:#7a716b;height:34px}.shop-card footer{display:flex;justify-content:space-between;align-items:center;margin-top:15px}.shop-card footer strong{color:#6d3217}.shop-card footer button{border:0;border-radius:50%;background:#6b3017;color:white;width:32px;height:32px;font-size:20px}.shop-card footer button:disabled{opacity:.4}.about{display:grid;grid-template-columns:1fr 1fr;gap:70px;padding:80px 10%;background:#f2e7d9;align-items:center}.about-art{height:350px;background:#3d2113;border-radius:45% 45% 5px 5px;display:grid;place-items:center;font-size:150px;position:relative}.about-art span{position:absolute;right:-25px;bottom:30px;width:100px;height:100px;border-radius:50%;background:#d69a43;display:grid;place-items:center;text-align:center;font-size:11px;color:white}.about-art span b{font-size:20px}.about h2{font-family:'Playfair Display',serif;font-size:38px}.about p{line-height:1.8;color:#6f635b}.features{display:flex;gap:18px;font-size:12px;color:#6f3219}.store-footer{background:#20120b;color:#d9ccc5;display:grid;grid-template-columns:repeat(3,1fr);padding:45px 9%;gap:30px}.store-footer b{font-family:'Playfair Display',serif;color:white}.store-footer p{font-size:12px;line-height:1.8}.cart-page{padding:60px max(6vw,30px);min-height:650px}.cart-layout{display:grid;grid-template-columns:1.4fr 1fr;gap:20px;max-width:1100px;margin:auto}.cart-line{display:grid;grid-template-columns:60px 1fr 80px 110px;gap:15px;align-items:center;border-bottom:1px solid #eee;padding:15px}.cart-line .mini-emoji{font-size:36px}.cart-line div{display:flex;flex-direction:column}.cart-line small{color:#777;margin-top:4px}.cart-line input{padding:7px}.checkout{display:flex;flex-direction:column;gap:14px}.totals{border-top:1px solid #ddd;padding-top:15px;display:flex;flex-direction:column;gap:10px}.totals span,.totals>strong{display:flex;justify-content:space-between}.empty,.success-page{text-align:center;padding:80px 20px}.empty>div{font-size:65px}.success-page{min-height:560px}.success-icon{width:80px;height:80px;border-radius:50%;display:grid;place-items:center;background:#e2f5e5;color:#308042;font-size:40px;margin:auto}.success-page h1{font-family:'Playfair Display',serif;font-size:40px}.success-page>strong{font-size:26px;color:#6f351a}.setup{display:grid;place-items:center;min-height:100vh;background:#f6eee5}.setup-card{background:white;max-width:600px;padding:40px;border-radius:12px;box-shadow:var(--shadow)}.setup-card pre{white-space:pre-wrap;color:#a32b2b}.empty.small{padding:20px}
@media(max-width:1100px){.pos-grid{grid-template-columns:repeat(3,1fr)}.product-grid{grid-template-columns:repeat(3,1fr)}.quick-actions{grid-template-columns:repeat(3,1fr)}}
@media(max-width:820px){.sidebar{transform:translateX(-100%);transition:.25s}.sidebar.open{transform:none}.main{margin-left:0}.menu-btn{display:block;margin-right:10px}.stats{grid-template-columns:1fr 1fr}.dashboard-grid,.settings,.pos,.cart-layout,.about{grid-template-columns:1fr}.pos-cart{border-left:0;border-top:1px solid #ddd}.product-grid{grid-template-columns:repeat(2,1fr)}.hero{grid-template-columns:1fr;padding:60px 30px}.hero h1{font-size:46px}.hero-art{height:260px}.about-art{height:300px}.login-page{grid-template-columns:1fr}.login-visual{min-height:300px;padding:35px}.login-visual:after{display:none}.login-form{padding:40px 0}.store-header nav a:not(.cart-link):not(.login-link){display:none}.cards-list{grid-template-columns:1fr 1fr}}
@media(max-width:520px){.content{padding:14px}.stats,.stats.three{grid-template-columns:1fr}.product-grid{grid-template-columns:1fr}.pos-grid{grid-template-columns:repeat(2,1fr)}.form-grid{grid-template-columns:1fr}.span-2{grid-column:auto}.store-header{padding:0 15px}.store-header nav{gap:8px}.store-brand small{display:none}.store-brand{grid-template-rows:1fr}.hero h1{font-size:38px}.hero-art span{font-size:90px}.hero-art span:nth-child(3){font-size:80px}.cart-line{grid-template-columns:45px 1fr 60px}.cart-line>strong{grid-column:2/-1}.store-footer{grid-template-columns:1fr}.cards-list{grid-template-columns:1fr}.quick-actions{grid-template-columns:1fr 1fr}}
@media print{.sidebar,.topbar,.filters,.toolbar,.receipt-actions,.report-print-actions{display:none!important}.main{margin:0}.content{padding:0}.panel{box-shadow:none}.app{background:#fff}.receipt{border:0;box-shadow:none;margin:0 auto;width:var(--receipt-width,80mm)}.invoice{box-shadow:none;margin:0;padding:12mm}.invoice-a4{width:210mm;min-height:297mm}.invoice-a5{width:148mm;min-height:210mm}.report-print{width:100%;max-width:none;box-shadow:none;margin:0;padding:0}.report-print tr{break-inside:avoid}.report-print table{page-break-inside:auto}}

.permission-panel{margin-top:22px}.permission-panel .panel-title{margin-bottom:18px}.permission-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.permission-card{border:1px solid #e4ded8;border-radius:14px;padding:18px;background:#fff}.permission-card header{display:flex;align-items:center;gap:12px;margin-bottom:14px}.permission-card header div:last-child{display:flex;flex-direction:column}.permission-card header small{color:#7b6f68}.permission-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-bottom:16px}.permission-grid label{display:flex;align-items:center;gap:8px;padding:9px;border-radius:9px;background:#f8f5f2;font-size:13px}.permission-grid input{width:17px;height:17px;accent-color:#7a351b}.permission-card .btn{width:100%}
@media(max-width:900px){.permission-list{grid-template-columns:1fr}.permission-grid{grid-template-columns:1fr}}
@media(max-width:820px){.target-card{grid-template-columns:1fr}.invoice{width:100%;min-height:auto;padding:8mm}.invoice-parties{grid-template-columns:1fr}.invoice-total{width:100%}}

/* Web order preparation */
.order-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.order-layout{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(290px,.8fr);gap:18px}.order-sheet>header{display:grid;grid-template-columns:1fr 1fr;gap:25px;border-bottom:1px solid #eee;margin:-2px 0 20px;padding-bottom:15px}.order-sheet header small{color:#9b5b39;font-weight:800;letter-spacing:1px}.order-sheet header h2,.order-sheet header h3{margin:5px 0}.order-sheet header p{font-size:12px;color:#6b7280;line-height:1.6}.prepare-items{display:flex;flex-direction:column;gap:8px}.prepare-item{display:grid;grid-template-columns:50px 1fr auto minmax(130px,auto);gap:12px;align-items:center;border:1px solid #e5e7eb;border-radius:9px;padding:11px}.prepare-item>span{font-size:31px;text-align:center}.prepare-item div{display:flex;flex-direction:column}.prepare-item small{color:#777;margin-top:3px}.prepare-item>strong{font-size:18px}.prepare-item>em{font-style:normal;font-size:10px;font-weight:700;text-align:right}.prepare-item.ready>em{color:#25833b}.prepare-item.missing{border-color:#efb2a9;background:#fff6f4}.prepare-item.missing>em{color:#c9382a}.order-total{width:min(360px,100%);margin:18px 0 0 auto;display:flex;flex-direction:column;gap:8px}.order-total span,.order-total strong{display:flex;justify-content:space-between}.order-total strong{border-top:2px solid #54240f;padding-top:9px;font-size:17px}.prepare-actions{align-self:start;position:sticky;top:82px}.prepare-actions form{display:flex;flex-direction:column;gap:12px}.prepare-actions form small{font-size:10px;color:#777;text-align:center}.prepare-actions hr{border:0;border-top:1px solid #eee;margin:18px 0}.prepare-ok,.prepare-error{border-radius:8px;padding:13px;margin-bottom:15px;font-size:12px;line-height:1.5}.prepare-ok{background:#e7f6e9;color:#247035}.prepare-error{background:#fff0ec;color:#b93427}.pos-no-results{margin:18px 0;padding:25px;text-align:center;border:1px dashed #d8c6bb;border-radius:8px;color:#8a6a58;background:#fcfaf8}
@media(max-width:900px){.order-layout{grid-template-columns:1fr}.prepare-actions{position:static}.prepare-item{grid-template-columns:45px 1fr auto}.prepare-item>em{grid-column:2/-1;text-align:left}.order-sheet>header{grid-template-columns:1fr}}

/* Visibility, product photos and delivery payment */
.btn.green{background:#23843a;color:#fff!important;box-shadow:0 3px 9px rgba(35,132,58,.22)}.btn.green:hover{background:#196d2d}.table-product img{width:42px;height:42px;object-fit:cover;border-radius:8px;border:1px solid #e5e7eb}.pos-product>img{width:72px;height:72px;object-fit:cover;border-radius:10px;margin-bottom:4px}.product-image-preview{display:flex;align-items:center;gap:10px;background:#f8f5f2;border-radius:8px;padding:8px}.product-image-preview img{width:72px;height:72px;object-fit:cover;border-radius:8px}.product-image-preview small{color:#777}.prepare-item>img{width:46px;height:46px;object-fit:cover;border-radius:8px}.delivery-payment{background:#fff7df;border:1px solid #e7c66e;border-radius:8px;padding:12px;display:flex;flex-direction:column;gap:10px}.delivery-payment>b{color:#784d00}.delivery-payment small{color:#785b25!important;text-align:left!important}.delivery-payment[hidden]{display:none!important}
.btn.compact{padding:8px 11px;font-size:12px;white-space:nowrap}
.ledger-actions{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin-bottom:18px}.ledger-actions .filters{margin:0;flex:1}.ledger-print{display:grid;gap:18px}.ledger-header{display:flex;justify-content:space-between;gap:30px;border-bottom:3px solid var(--primary,#6b3017);padding:6px 4px 18px}.ledger-header>div:last-child{text-align:right}.ledger-header h1,.ledger-header h2,.ledger-header p{margin:4px 0}.ledger-customer{display:flex;justify-content:space-between;align-items:center;background:#fff;border:1px solid #e4e7eb;border-radius:12px;padding:20px 24px}.ledger-customer small{color:#8a4b2a;font-weight:800;letter-spacing:.08em}.ledger-customer h2,.ledger-customer p{margin:5px 0}.ledger-customer>div:last-child{text-align:right}.ledger-customer strong{font-size:28px;color:#b42318}.ledger-stats{margin:0}.ledger-grid{display:grid;grid-template-columns:minmax(300px,.8fr) minmax(520px,1.7fr);gap:20px;margin-top:20px}.payment-form{display:grid;gap:13px}.payment-form label{display:grid;gap:6px;font-weight:700}.payment-form input,.payment-form select{width:100%;padding:12px;border:1px solid #d7dce2;border-radius:8px;background:#fff}.allocation-note{padding:12px;border-radius:8px;background:#eef7ff;color:#175b91;font-size:13px}.opening-row{background:#f8fafc}.payment-history{margin-top:20px}.ledger-print table a{color:#743419;font-weight:700}
@media(max-width:1050px){.ledger-grid{grid-template-columns:1fr}.ledger-header,.ledger-customer{align-items:flex-start}.ledger-actions .filters{flex-basis:100%}}
@media print{.ledger-actions,.ledger-grid,.payment-history,.sidebar,.topbar,.flash{display:none!important}.main{margin:0!important}.content{padding:0!important}.ledger-print{display:block!important}.ledger-print .panel{box-shadow:none;border:0;padding:0}.ledger-header{margin-bottom:14px}.ledger-customer{margin-bottom:14px}.ledger-stats{margin-bottom:14px}.ledger-print table{font-size:10px}.ledger-print th,.ledger-print td{padding:7px 6px}.ledger-print a{color:#111;text-decoration:none}}
.pos-product[hidden]{display:none!important}
.order-quantity-editor{display:grid;grid-template-columns:minmax(240px,.7fr) minmax(520px,1.5fr);gap:22px;align-items:start}.order-quantity-editor h2{margin-bottom:7px}.order-quantity-editor p{font-size:12px;color:#6b7280;line-height:1.5}.order-edit-lines{display:grid;gap:8px}.order-edit-lines form{display:grid;grid-template-columns:1fr 90px 100px;gap:9px;align-items:center;padding:9px 11px;background:#f8fafc;border:1px solid #e4e7eb;border-radius:8px}.order-edit-lines span{display:flex;flex-direction:column}.order-edit-lines small{font-size:10px;color:#77808c;margin-top:3px}.order-edit-lines input{padding:9px;text-align:center}.closed-order-notice{background:#edf7ef;border:1px solid #b9dfc0;color:#216b31;border-radius:9px;padding:15px 18px;font-weight:700;margin-bottom:18px}.order-row-actions{display:flex;align-items:center;gap:7px;white-space:nowrap}.order-row-actions form{margin:0}.btn.danger{background:#c9342f;color:#fff}.closed-badge{font-size:11px;color:#68717d}.database-tool-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.database-tool-grid article{border:1px solid #e1e5e9;border-radius:10px;padding:17px;background:#fafbfc}.database-tool-grid h3{margin:0 0 8px;font-size:15px}.database-tool-grid p{font-size:12px;color:#626b76;line-height:1.55;min-height:56px}.database-tool-grid form{display:grid;gap:11px}.database-tool-grid .danger-zone{border-color:#e6aaa7;background:#fff6f5}.database-tool-grid .danger-zone h3{color:#a9221d}@media(max-width:1050px){.order-quantity-editor,.database-tool-grid{grid-template-columns:1fr}.database-tool-grid p{min-height:0}}
.btn.blue{color:#fff!important;text-shadow:0 1px 1px rgba(0,0,0,.12)}
.custom-logo{display:block;object-fit:contain;object-position:center;flex:0 0 auto}.sidebar-logo{max-width:52px;max-height:52px}.store-brand{display:flex!important;gap:10px}.store-brand>.store-logo{max-width:58px;max-height:58px}.store-brand>span{display:flex;flex-direction:column}.login-brand-logo{max-width:220px;max-height:180px;margin:0 auto 12px}.branding-settings{display:grid;grid-template-columns:minmax(420px,1.4fr) minmax(240px,.6fr);gap:35px;align-items:center}.branding-settings form{display:grid;gap:14px}.branding-settings>aside{min-height:210px;border-left:1px solid var(--line);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;text-align:center}.branding-settings>aside small{font-weight:800;letter-spacing:1.5px;color:#9a6a43}.branding-settings>aside b{font-size:18px}.branding-preview-logo{max-width:100%;object-fit:contain}.logo-size-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px}.branding-settings form>small{color:#777}@media(max-width:850px){.branding-settings{grid-template-columns:1fr}.branding-settings>aside{border-left:0;border-top:1px solid var(--line)}.logo-size-fields{grid-template-columns:1fr}}
.zone-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:18px;margin-bottom:22px}.zone-card header{display:flex;align-items:center;gap:12px}.zone-card header>span{font-size:30px;color:var(--primary)}.zone-card header div{flex:1}.zone-card h2{margin:0}.zone-card header small{color:#777}.zone-card>div{display:flex;gap:12px;flex-wrap:wrap;margin:18px 0}.zone-card>div b{background:#f5f1ee;padding:8px 10px;border-radius:8px;font-size:13px}.zone-card footer{display:flex;justify-content:flex-end;gap:8px}.zone-inventory{margin-top:20px}.zone-inventory input[type=number]{max-width:140px}.zone-banner,.account-required{background:#fff4dc;border:1px solid #f0d192;border-radius:10px;padding:13px 16px;margin-bottom:16px}.customer-auth{max-width:1050px;margin:50px auto;display:grid;grid-template-columns:1fr 1.3fr;gap:22px}.customer-auth form{display:grid;gap:13px}.customer-auth label{display:grid;gap:6px;font-weight:700}.customer-auth small{color:#777}.customer-account{max-width:900px;margin:60px auto}.zone-selector{margin-bottom:12px}.customer-login-link{border:1px solid #d7b79e;border-radius:999px;padding:8px 13px!important}.customer-account h2{margin-top:30px}.customer-order-list{display:grid;gap:9px;margin-top:12px}.customer-order-list article{display:grid;grid-template-columns:1.3fr 1fr auto auto;gap:14px;align-items:center;border:1px solid #e5ded8;border-radius:10px;padding:12px 14px}.customer-order-list article div{display:flex;flex-direction:column}.customer-order-list article small{color:#777;margin-top:3px}@media(max-width:1100px){.store-header nav{gap:8px}.customer-login-link{font-size:12px}}@media(max-width:760px){.customer-auth{grid-template-columns:1fr;margin:24px 14px}.zone-cards{grid-template-columns:1fr}.customer-order-list article{grid-template-columns:1fr 1fr}.customer-login-link{border:0;padding:5px!important}}
.location-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.location-coordinates input[readonly]{background:#f3f4f6;color:#555}.location-status{padding:10px 12px;border-radius:8px;background:#f3f4f6;color:#555;font-size:12px}.location-status.success{background:#e8f6eb;color:#16702a}.location-status.error{background:#fff0ef;color:#ad2923}.location-status.loading{background:#fff6df;color:#8a6100}.location-map{border:1px solid #dedede;border-radius:10px;overflow:hidden;background:#fff}.location-map iframe{width:100%;height:230px;border:0;display:block}.location-map a{display:block;padding:10px;text-align:center;font-weight:700;color:var(--primary)}#zone-modal{width:min(760px,calc(100% - 32px));max-width:calc(100% - 32px);max-height:92dvh;overflow:hidden}#zone-modal .zone-location-form{width:100%;min-width:0;max-width:100%;max-height:92dvh;overflow-y:auto;overflow-x:hidden;box-sizing:border-box}#zone-modal .form-grid>*{min-width:0}#zone-modal input,#zone-modal select,#zone-modal textarea,#zone-modal button{max-width:100%;box-sizing:border-box}.empty-chart{width:100%!important;height:180px!important;display:flex!important;flex-direction:column;align-items:center;justify-content:center;color:#8b929c}.empty-chart>span{position:static!important;height:auto!important;background:none!important;font-size:34px}.empty-chart p{margin:8px 0 0}@media(max-width:700px){#zone-modal{width:calc(100% - 20px);max-width:calc(100% - 20px)}#zone-modal .modal-form{padding:18px}#zone-modal .form-grid{grid-template-columns:1fr}#zone-modal .span-2{grid-column:auto}.location-actions{grid-template-columns:1fr}.location-map iframe{height:190px}}@media(max-width:420px){.topbar{padding:0 10px}.topbar h1{min-width:0;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.menu-btn{margin-right:5px}.user-menu{gap:5px;font-size:0;flex-shrink:0}.user-menu>span{font-size:13px}.user-menu a{font-size:11px;margin-left:0}#zone-modal{width:calc(100% - 10px);max-width:calc(100% - 10px);border-radius:7px}#zone-modal .modal-form{padding:14px;gap:11px}#zone-modal .location-actions .btn{font-size:12px;padding:11px 8px}}

/* Customer order tracking and cancellation */
.customer-order-list article{grid-template-columns:minmax(180px,1.3fr) minmax(150px,1fr) auto auto auto}.customer-order-actions{display:flex!important;flex-direction:row!important;align-items:center;justify-content:flex-end;gap:7px}.customer-order-actions form,.customer-order-footer form{margin:0}.customer-order-detail{max-width:900px;margin:45px auto}.customer-order-detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding-bottom:18px;border-bottom:2px solid #6b3017}.customer-order-detail-head small,.customer-order-meta small{color:#9b5b39;font-weight:800;letter-spacing:.08em}.customer-order-detail-head h1{margin:5px 0;font-size:25px}.customer-order-detail-head p{margin:0;color:#777}.customer-order-detail-head .status{font-style:normal;font-size:12px}.customer-order-meta{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:20px 0}.customer-order-meta>div{display:flex;flex-direction:column;gap:6px;padding:15px;background:#faf7f4;border-radius:9px}.customer-order-meta span{font-size:12px;color:#6b7280}.customer-order-items{display:grid;gap:8px}.customer-order-items article{display:grid;grid-template-columns:52px 1fr auto;gap:12px;align-items:center;border:1px solid #e7e2df;border-radius:9px;padding:11px}.customer-order-items img{width:48px;height:48px;object-fit:cover;border-radius:8px}.customer-order-items>article>span{font-size:34px;text-align:center}.customer-order-items article div{display:flex;flex-direction:column;gap:4px}.customer-order-items small{color:#777}.customer-order-totals{width:min(380px,100%);margin:20px 0 0 auto;display:flex;flex-direction:column;gap:9px}.customer-order-totals span,.customer-order-totals strong{display:flex;justify-content:space-between}.customer-order-totals strong{border-top:2px solid #6b3017;padding-top:10px;font-size:18px}.customer-order-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;border-top:1px solid #eee;margin-top:22px;padding-top:18px}.customer-order-lock{margin:0;color:#8b4b24;font-weight:700;font-size:13px}
.customer-order-items.is-editable article{grid-template-columns:52px minmax(150px,1fr) auto 88px auto}.customer-order-qty{font-size:10px;gap:4px}.customer-order-qty input{padding:8px;text-align:center}.customer-order-edit-submit{display:flex;align-items:center;justify-content:flex-end;gap:14px;margin-top:13px;padding:13px;border-radius:9px;background:#f0f8f1}.customer-order-edit-submit small{color:#55705b}.customer-line-remove{white-space:nowrap}
@media(max-width:900px){.customer-order-list article{grid-template-columns:1fr auto}.customer-order-list article>span{grid-column:1}.customer-order-actions{grid-column:1/-1;justify-content:flex-start}.customer-order-detail{margin:24px 14px}}
@media(max-width:760px){.customer-order-items.is-editable article{grid-template-columns:45px 1fr auto}.customer-order-items.is-editable article>strong{grid-column:3}.customer-order-qty{grid-column:2}.customer-line-remove{grid-column:3}.customer-order-edit-submit{align-items:stretch;flex-direction:column}.customer-order-edit-submit .btn{width:100%}}
@media(max-width:560px){.customer-order-meta{grid-template-columns:1fr}.customer-order-detail-head h1{font-size:19px}.customer-order-footer{align-items:stretch;flex-direction:column}.customer-order-footer .btn,.customer-order-footer form,.customer-order-footer form .btn{width:100%}.customer-order-items.is-editable article{grid-template-columns:42px 1fr}.customer-order-items.is-editable article>strong{grid-column:2}.customer-order-qty{grid-column:2}.customer-line-remove{grid-column:2;width:100%}}

/* Stock receipts */
.stock-entry-form{display:grid;gap:18px}.stock-entry-form>*,.stock-entry-header,.stock-entry-header .form-grid,.stock-entry-header .form-grid>*{min-width:0}.stock-entry-header{margin:0}.stock-entry-header input,.stock-entry-header select,.stock-entry-header textarea{width:100%;max-width:100%;box-sizing:border-box}.stock-entry-form .table-wrap{width:100%;max-width:100%;overflow-x:auto}.stock-entry-table-head{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:14px}.stock-entry-table-head h2,.stock-entry-table-head p{margin:0}.stock-entry-table-head p{color:#6b7280;font-size:12px;margin-top:5px}.stock-entry-table-head .search{max-width:320px}.stock-entry-table input{min-width:105px;padding:8px}.stock-entry-validation{display:flex;align-items:end;justify-content:space-between;gap:20px}.stock-entry-validation label{width:180px}.stock-entry-validation>div{display:flex;align-items:center;justify-content:flex-end;gap:16px}.stock-entry-validation small{color:#6b7280;max-width:440px}.stock-receipt-history{margin-top:8px}.stock-document-actions{display:flex;justify-content:center;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:18px}.stock-document{margin:0 auto;background:#fff;box-shadow:0 8px 30px #0002;color:#252525;padding:14mm}.stock-document.stock-a4{width:210mm;min-height:297mm}.stock-document.stock-a5{width:148mm;min-height:210mm;padding:9mm}.stock-document>header{display:flex;align-items:flex-start;justify-content:space-between;gap:25px;border-bottom:3px solid #6b3017;padding-bottom:14px}.stock-document>header>div:last-child{text-align:right}.stock-document-logo{font-size:46px;color:#b36d27;max-width:100px;max-height:72px;object-fit:contain}.stock-document h1{font-size:21px;margin:5px 0;color:#54240f}.stock-document h2{font-size:25px;letter-spacing:2px;margin:4px 0;color:#54240f}.stock-document header p{font-size:10px;line-height:1.5;color:#666;margin:3px 0}.stock-document header small{font-weight:800;letter-spacing:2px;color:#9a6a43}.stock-document-meta{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:16px 0}.stock-document-meta>div{display:flex;flex-direction:column;gap:4px;border-left:3px solid #6b3017;background:#faf7f4;padding:9px}.stock-document-meta small{font-size:8px;color:#777;letter-spacing:1px}.stock-document-meta b{font-size:11px}.stock-document-meta span{font-size:8px;color:#777}.stock-document-note{font-size:10px;background:#fff8e8;border:1px solid #ecd8a8;padding:9px}.stock-document table{font-size:10px;border:1px solid #bbb}.stock-document th{background:#6b3017;color:#fff;padding:8px}.stock-document td{padding:8px;border:1px solid #ddd}.stock-document th:nth-child(n+2),.stock-document td:nth-child(n+2){text-align:right}.stock-document tfoot th{background:#eee;color:#222;border:1px solid #bbb}.stock-document-signatures{display:grid;grid-template-columns:1fr 1fr;gap:30px;margin-top:28px}.stock-document-signatures>div{min-height:80px;border:1px solid #bbb;padding:10px;font-size:10px;display:flex;flex-direction:column}.stock-document-signatures span{margin-top:auto;text-align:center;color:#777;border-top:1px solid #ddd;padding-top:5px}.stock-document>footer{text-align:center;font-size:8px;color:#777;border-top:1px solid #ddd;margin-top:22px;padding-top:8px}.stock-a5 .stock-document-meta{grid-template-columns:1fr 1fr}.stock-a5 h2{font-size:19px}.stock-a5 table{font-size:8px}.stock-a5 th,.stock-a5 td{padding:6px}.stock-a5 .stock-document-signatures{margin-top:18px;gap:15px}
@media(max-width:900px){.stock-entry-validation,.stock-entry-validation>div{align-items:stretch;flex-direction:column}.stock-entry-validation label{width:100%}.stock-entry-table-head{align-items:stretch;flex-direction:column}.stock-entry-table-head .search{max-width:none}.stock-document{width:100%!important;min-height:auto!important;padding:7mm}.stock-document-meta{grid-template-columns:1fr 1fr}}
@media(max-width:560px){.stock-document>header{flex-direction:column}.stock-document>header>div:last-child{text-align:left}.stock-document-meta{grid-template-columns:1fr}.stock-document-signatures{grid-template-columns:1fr}.stock-document-actions .btn{flex:1}}
@media print{.stock-document-actions{display:none!important}.stock-document{box-shadow:none!important;margin:0 auto!important}.stock-document.stock-a4{width:210mm!important;min-height:297mm!important;padding:12mm!important}.stock-document.stock-a5{width:148mm!important;min-height:210mm!important;padding:8mm!important}.stock-document tr{break-inside:avoid}}

/* POS readability and larger payment controls */
.pos{grid-template-columns:minmax(0,1fr) minmax(440px,480px)}
.pos-products,.pos-cart{min-width:0}.pos-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.pos-product{min-width:0;padding:8px}.pos-product b{text-align:center;overflow-wrap:anywhere}
.pos-cart{padding:22px}
.pos-cart h2{font-size:21px;margin:0 0 15px}.pos-cart h2 span{font-size:12px}
.cart-items{min-height:285px}
.pos-line{grid-template-columns:minmax(120px,1fr) auto auto 38px;gap:12px;align-items:center;padding:15px 0;font-size:14px}
.pos-line-product{min-width:0}.pos-line-product b{display:block;font-size:15px;line-height:1.25;margin-bottom:5px}.pos-line-product small{display:block;color:#777;font-size:12px}
.pos-price-editor{display:flex;align-items:center;gap:6px;margin-top:7px;color:#6b3017;font-size:10px;font-weight:800}.pos-price-editor input{width:86px;min-height:34px;padding:5px 7px;border:1px solid #cda98f;border-radius:7px;background:#fffaf7;text-align:right;font-size:12px;font-weight:800;color:#32170b}
.pos-line-total{font-size:15px;white-space:nowrap;color:#54240f}
.qty{gap:5px;padding:4px;background:#f6f2ee;border:1px solid #e7ddd6;border-radius:11px}
.qty button{width:38px;height:38px;border-radius:8px;font-size:20px;font-weight:800;background:#fff;border:1px solid #d9cec7;color:#54240f}
.qty button:hover{background:#6b3017;color:#fff}.qty i{width:36px;font-size:16px;font-weight:800;font-style:normal}
.pos-line>button[data-remove]{width:36px;height:36px;border-radius:8px;font-size:20px;border:1px solid #efc7c4;background:#fff5f4;color:#b42318}
.pos-customer label{font-size:14px}.pos-customer select,.pos-customer input,.discount input{min-height:45px;font-size:14px}
.pos-total{font-size:18px;padding:16px 0}.pos-total strong{font-size:30px}
.payment{gap:10px;margin:14px 0}.payment button{min-height:54px;padding:12px 8px;font-size:14px;font-weight:800;border:1px solid #d9d9d9;border-radius:9px}
.payment button.active{box-shadow:0 0 0 3px rgba(35,132,58,.18)}
.cash-details,.credit-details{padding:15px}.checkout-btn{min-height:56px;font-size:17px;font-weight:800}
@media(max-width:1180px){.pos{grid-template-columns:minmax(0,1fr) 420px}}
@media(max-width:1100px){.pos-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){.pos{grid-template-columns:1fr}.pos-cart{border-left:0;border-top:1px solid #ddd}}
@media(max-width:820px){.store-header nav .customer-login-link{display:inline-flex!important}}
@media(max-width:560px){.pos-cart{padding:14px}.pos-line{grid-template-columns:minmax(0,1fr) auto 36px;gap:8px}.pos-line-total{grid-column:1}.qty{grid-column:2;grid-row:1/3}.pos-line>button[data-remove]{grid-column:3;grid-row:1/3}.payment{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.payment button{min-width:0;min-height:50px}.pos-total strong{font-size:25px}}
@media(max-width:520px){.pos-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Historique et correction sécurisée des opérations de caisse */
.pos-history-toolbar{display:flex;align-items:center;gap:12px;margin:0 0 12px}.pos-history-toolbar small{color:#68707c}.pos-history-dialog{width:min(1120px,calc(100vw - 28px));max-width:none;padding:0;border:0;border-radius:16px}.pos-history-shell{padding:22px;max-height:min(82vh,760px);overflow:auto}.pos-history-shell .modal-title{margin-bottom:16px}.pos-history-shell .modal-title p{margin:4px 0 0;color:#68707c}.history-actions{display:flex;gap:7px;white-space:nowrap}.pos-sale-edit{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(320px,.75fr);gap:18px;align-items:start}.edit-warning{background:#fff7e8;border:1px solid #f2d7a4;border-radius:10px;padding:11px 13px;color:#6b4218}.pos-edit-lines{display:grid;gap:10px}.pos-edit-lines>label{display:grid;grid-template-columns:minmax(0,1fr) 150px 130px;gap:18px;align-items:center;border:1px solid #e4e7eb;border-radius:12px;padding:14px}.pos-edit-lines span{display:grid;gap:3px}.pos-edit-lines small{color:#68707c}.pos-edit-lines input{width:100%;margin-top:5px}.pos-edit-lines strong{text-align:right}.pos-edit-payment{position:sticky;top:18px}.pos-edit-payment .form-grid{grid-template-columns:1fr}.pos-edit-payment button{margin-top:14px}
.pos-history-filters{display:grid;grid-template-columns:minmax(230px,1.4fr) minmax(145px,.7fr) minmax(145px,.7fr) auto;gap:12px;align-items:end;margin:0 0 16px;padding:14px;background:#f7f8fa;border:1px solid var(--line);border-radius:12px}.pos-history-filters label{display:grid;gap:6px;font-weight:700;font-size:12px}.pos-history-filters input{width:100%;min-width:0;background:#fff}.pos-history-filter-actions{display:flex;gap:8px}.pos-history-filter-actions .btn{min-height:44px;white-space:nowrap}.pos-history-result-count{grid-column:1/-1;color:#68707c;font-weight:700}
@media(max-width:900px){.pos-sale-edit{grid-template-columns:1fr}.pos-edit-payment{position:static}.pos-history-dialog{width:calc(100vw - 16px)}.pos-history-shell{padding:14px}.pos-history-shell .table-wrap{overflow-x:auto}.pos-history-shell table{min-width:760px}}
@media(max-width:900px){.pos-history-filters{grid-template-columns:1fr 1fr}.history-ref-filter,.pos-history-filter-actions{grid-column:1/-1}.pos-history-filter-actions .btn{flex:1}}
@media(max-width:600px){.pos-history-toolbar{align-items:stretch;flex-direction:column}.pos-edit-lines>label{grid-template-columns:1fr 110px}.pos-edit-lines>label>strong{grid-column:1/-1;text-align:left}.pos-sale-edit .panel{padding:14px}}
@media(max-width:520px){.pos-history-filters{grid-template-columns:1fr}.pos-history-filters>*{grid-column:1!important}.pos-history-filter-actions{flex-direction:column}.pos-history-filter-actions .btn{width:100%}}
.pos-edit-payment [hidden]{display:none!important}

/* Barre d’actions POS : zone et historique */
.pos-controlbar{display:flex;align-items:stretch;gap:12px;margin:0 0 14px;min-width:0}.pos-zone-control{margin:0;min-width:280px}.pos-zone-control label,.pos-zone-readonly{height:100%;min-height:52px;display:flex;flex-direction:row;align-items:center;gap:11px;padding:7px 8px 7px 14px;background:#fff;border:1px solid var(--line);border-radius:10px}.pos-zone-control label>span,.pos-zone-readonly>span{white-space:nowrap;color:#6b7280;font-size:12px;font-weight:800}.pos-zone-control select{width:auto;min-width:155px;min-height:38px;padding:8px 34px 8px 11px;font-weight:700;border-color:#e0e2e5}.pos-zone-readonly b{font-size:14px}.pos-history-toolbar{display:flex;align-items:center;gap:11px;margin:0 0 0 auto;min-width:0}.pos-history-toolbar .btn{min-height:52px;padding:10px 17px;border-radius:10px;white-space:nowrap}.pos-history-toolbar small{max-width:210px;line-height:1.3}
@media(max-width:760px){.pos-controlbar{flex-direction:column}.pos-zone-control{min-width:0;width:100%}.pos-zone-control label,.pos-zone-readonly{justify-content:space-between}.pos-zone-control select{width:min(220px,58%);min-width:0}.pos-history-toolbar{width:100%;margin-left:0}.pos-history-toolbar .btn{flex:1}.pos-history-toolbar small{max-width:45%;text-align:right}}
@media(max-width:480px){.pos-zone-control label,.pos-zone-readonly{align-items:stretch;flex-direction:column;gap:7px;padding:11px}.pos-zone-control select{width:100%}.pos-history-toolbar{align-items:stretch;flex-direction:column}.pos-history-toolbar small{max-width:none;text-align:center}.pos-history-toolbar .btn{width:100%}}

/* Profils de l’équipe */
.user-menu{display:flex;align-items:center;gap:12px}.user-profile-link{display:flex;align-items:center;gap:8px;padding:5px 9px;border-radius:999px}.user-profile-link:hover{background:#f4ede8}.user-profile-link img,.user-profile-link span{width:32px;height:32px;border-radius:50%;object-fit:cover;display:grid;place-items:center;background:#6b3017;color:#fff;font-weight:800}.user-profile-link b{font-size:13px}.profile-layout{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(320px,.65fr);gap:20px;align-items:start}.profile-card{display:grid;gap:22px}.profile-intro{display:flex;align-items:center;gap:17px;padding-bottom:20px;border-bottom:1px solid var(--line)}.profile-intro>img,.profile-intro>span{width:88px;height:88px;border-radius:50%;object-fit:cover;display:grid;place-items:center;background:linear-gradient(135deg,#7b3a1c,#3a180b);color:#fff;font-size:34px;font-weight:800;flex:0 0 auto}.profile-intro h2,.profile-intro p{margin:3px 0}.profile-intro p,.profile-intro small{color:#6b7280}.profile-form{display:grid;gap:15px}.profile-form h3{margin:0}.profile-password{position:sticky;top:18px}.profile-password h2{margin-top:0}.profile-password>p{color:#6b7280;font-size:13px;line-height:1.5}.profile-password form{display:grid;gap:14px}.team-user{display:flex;align-items:center;gap:10px;min-width:150px}.team-user img,.team-user i{width:38px;height:38px;border-radius:50%;object-fit:cover;display:grid;place-items:center;background:#6b3017;color:#fff;font-style:normal;font-weight:800;flex:0 0 auto}.team-contact{display:flex;flex-direction:column;gap:3px}.team-contact small{color:#6b7280}.team-table form{margin:0}
@media(max-width:900px){.profile-layout{grid-template-columns:1fr}.profile-password{position:static}.team-table table{min-width:900px}}
@media(max-width:600px){.user-profile-link b{display:none}.user-menu{gap:5px}.user-menu>a:last-child{font-size:11px}.profile-intro{align-items:flex-start}.profile-intro>img,.profile-intro>span{width:70px;height:70px}.profile-form .form-grid{grid-template-columns:1fr}.profile-form .span-2{grid-column:auto}.profile-card,.profile-password{padding:15px}}

/* Clôture de shift du caissier */
.shift-close-form{margin:0}.shift-close-form .btn{min-height:52px}.pos-history-toolbar:has(.shift-close-form) small{display:none}.closure-receipt{width:80mm;max-width:100%;margin:0 auto;background:#fff;border:1px solid #ddd;box-shadow:0 8px 30px #0002;padding:7mm 6mm;color:#111;font-family:Arial,sans-serif}.closure-receipt header{text-align:center;border-bottom:2px dashed #444;padding-bottom:10px}.closure-logo{max-width:70px;max-height:60px;object-fit:contain;margin:0 auto 5px}.closure-receipt h1{font-size:20px;margin:5px 0}.closure-receipt header h2{font-size:14px;margin:12px 0 0;letter-spacing:.05em}.closure-receipt header p{font-size:10px;line-height:1.4;margin:4px 0}.closure-meta{display:grid;gap:5px;padding:11px 0;border-bottom:1px dashed #777;font-size:10px}.closure-meta span,.closure-payments span,.closure-payments strong{display:flex;justify-content:space-between;gap:12px}.closure-receipt h3{font-size:12px;margin:13px 0 7px}.closure-receipt table{font-size:10px}.closure-receipt th,.closure-receipt td{padding:6px 4px}.closure-receipt th:nth-child(n+2),.closure-receipt td:nth-child(n+2){text-align:right}.closure-receipt tfoot th{border-top:2px solid #222;background:#fff}.closure-payments{display:grid;gap:7px;padding:11px 0;border-top:1px dashed #777;font-size:10px}.closure-payments strong{border-top:2px solid #222;padding-top:8px;font-size:12px}.closure-receipt footer{text-align:center;border-top:2px dashed #444;padding-top:12px;margin-top:8px;font-size:9px;line-height:2.2}
@media(max-width:1050px){.pos-controlbar{flex-direction:column}.pos-zone-control{width:100%}.pos-history-toolbar{width:100%;margin-left:0;justify-content:flex-start}.pos-history-toolbar small{margin-left:auto}}
@media(max-width:600px){.pos-history-toolbar,.shift-close-form{width:100%}.pos-history-toolbar .btn,.shift-close-form .btn{width:100%}.closure-receipt{width:100%;padding:18px 14px}}
@media print{.closure-receipt{width:80mm!important;max-width:80mm!important;border:0!important;box-shadow:none!important;margin:0!important;padding:5mm!important}.closure-receipt~*{display:none!important}}
.public{background:var(--store-page-bg,var(--cream));color:var(--store-header-text,#2e241d)}
.public .store-header{background:var(--store-header-bg,#fff);color:var(--store-header-text,#2e241d)}
.public .store-header a{color:inherit}.public .store-brand>span:first-child,.public .store-brand small{color:var(--store-accent,#d69638)}
.public .cart-link{background:color-mix(in srgb,var(--store-primary,#6b3017) 12%,white)}
.public .cart-link b,.public .shop-card footer button,.public .shop-card .badge{background:var(--store-primary,#6b3017)}
.public .hero h1 em,.public .eyebrow,.public .section-heading>span{color:var(--store-accent,#d69638)}
.public .shop-card footer strong,.public .features{color:var(--store-primary,#6b3017)}
.public .store-footer{background:var(--store-footer-bg,#20120b);color:var(--store-footer-text,#d9ccc5)}
.public .store-footer b{color:var(--store-footer-text,#fff)}
.store-menu-toggle{display:none;margin-left:auto;width:44px;height:44px;border:1px solid color-mix(in srgb,currentColor 20%,transparent);border-radius:9px;background:transparent;color:inherit;font-size:23px;cursor:pointer}
.storefront-settings{margin-bottom:22px}.storefront-form{display:grid;gap:20px}.storefront-form fieldset{min-width:0;margin:0;border:1px solid var(--line);border-radius:10px;padding:18px}.storefront-form legend{padding:0 8px;font-weight:800}.storefront-form textarea{resize:vertical}.store-color-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:14px}.store-color-grid label{display:grid;gap:7px}.store-color-grid input[type=color]{width:100%;height:48px;padding:4px;cursor:pointer}.storefront-preview{overflow:hidden;border:1px solid var(--line);border-radius:12px;background:#fff}.storefront-preview header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px;background:var(--preview-header);color:var(--preview-header-text)}.storefront-preview main{display:flex;align-items:center;justify-content:space-between;gap:18px;min-height:105px;padding:22px;background:#fbf7f1}.storefront-preview button{border:0;border-radius:8px;padding:11px 16px;background:var(--preview-primary);color:#fff}.storefront-preview footer{padding:17px;background:var(--preview-footer);color:var(--preview-footer-text);border-top:4px solid var(--preview-accent)}
.favicon-settings{display:grid;grid-template-columns:minmax(320px,1.4fr) minmax(210px,.6fr);gap:35px;align-items:center;margin-bottom:22px}.favicon-settings form{display:grid;gap:14px}.favicon-settings aside{min-height:170px;border-left:1px solid var(--line);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;text-align:center}.favicon-settings aside small{font-weight:800;letter-spacing:1.2px;color:#9a6a43}.favicon-preview,.favicon-placeholder{width:64px;height:64px;border-radius:12px;object-fit:contain;display:grid;place-items:center;background:#f6f0eb;box-shadow:0 5px 15px #0001}.favicon-placeholder{font-size:34px;color:#b36d27}
@media(max-width:820px){.store-menu-toggle{display:grid;place-items:center}.public .store-header{height:auto;min-height:72px;padding:10px 16px;flex-wrap:wrap}.public .store-header nav{display:none;flex:0 0 100%;margin:8px 0 0;padding:10px 0 4px;border-top:1px solid color-mix(in srgb,currentColor 15%,transparent);flex-direction:column;align-items:stretch;gap:4px}.public .store-header nav.open{display:flex}.public .store-header nav a{display:block!important;width:100%;padding:11px 12px;border-radius:7px}.public .store-header .cart-link{display:flex!important;justify-content:space-between}.storefront-settings .panel-title{align-items:flex-start;flex-direction:column}.storefront-settings .panel-title .btn{width:100%}.favicon-settings{grid-template-columns:1fr}.favicon-settings aside{border-left:0;border-top:1px solid var(--line);padding-top:22px}}
@media(max-width:520px){.public .store-brand b{font-size:16px}.public .store-brand>img{max-width:44px!important;max-height:44px!important}.storefront-form fieldset{padding:13px}.store-color-grid{grid-template-columns:1fr 1fr}.storefront-preview header,.storefront-preview main{align-items:flex-start;flex-direction:column}.storefront-preview button{width:100%}.public .store-footer{padding:32px 20px;gap:20px}.public .store-footer div{border-bottom:1px solid color-mix(in srgb,currentColor 18%,transparent);padding-bottom:12px}.public .store-footer div:last-child{border-bottom:0}}
.public .store-header{min-height:94px;height:auto}.public .store-brand{min-width:0;flex-shrink:1}.public .store-brand>.store-logo{width:clamp(170px,13vw,235px)!important;height:76px!important;max-width:235px!important;max-height:76px!important;object-fit:contain;object-position:left center}.public .store-brand>span{flex-shrink:0}.public .store-brand b{line-height:1.15}.public .store-brand small{white-space:nowrap}
@media(max-width:820px){.store-menu-toggle{flex:0 0 44px}.public .store-header{min-height:76px;padding:8px 14px}.public .store-brand{max-width:calc(100% - 58px)}.public .store-brand>.store-logo{width:clamp(130px,31vw,175px)!important;height:60px!important;max-width:175px!important;max-height:60px!important}}
@media(max-width:520px){.public .store-brand{gap:6px}.public .store-brand b{font-size:15px}.public .store-brand>.store-logo{width:clamp(118px,38vw,150px)!important;height:54px!important;max-width:150px!important;max-height:54px!important}.public .store-brand>span{min-width:0}.public .store-brand small{display:none}}
@media(max-width:360px){.public .store-brand>.store-logo{width:110px!important;max-width:110px!important;height:48px!important}.public .store-brand b{font-size:13px}}
.purchase-topbar,.supplier-document-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:16px}.purchase-tabs{display:flex;gap:7px;overflow-x:auto;margin-bottom:16px;padding-bottom:4px}.purchase-tabs a{white-space:nowrap;background:#fff;border:1px solid var(--line);border-radius:8px;padding:11px 15px;font-weight:700;font-size:12px}.purchase-tabs a.active{background:var(--primary);border-color:var(--primary);color:#fff}.purchase-report-filters{display:grid;grid-template-columns:repeat(4,minmax(145px,1fr)) auto auto;gap:10px;align-items:end}.purchase-report-filters label{gap:5px}.supplier-kpis{margin-top:16px}.supplier-document-form{display:grid;gap:16px}.supplier-lines-head{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:15px}.supplier-lines-head h2,.supplier-lines-head p{margin:0}.supplier-lines-head .search{max-width:310px}.supplier-lines-table td:first-child small{display:block;color:#777;margin-top:5px}.supplier-lines-table input{min-width:115px;padding:9px}.supplier-order-summary{display:flex;align-items:flex-end;justify-content:flex-end;gap:35px}.supplier-order-summary>div{width:min(410px,100%);display:grid;gap:9px}.supplier-order-summary span,.supplier-order-summary strong{display:flex;justify-content:space-between;gap:30px}.supplier-order-summary strong{border-top:2px solid var(--primary);padding-top:10px;font-size:19px}.supplier-document{margin:0 auto;background:#fff;box-shadow:0 8px 30px #0002;color:#252525;padding:14mm}.supplier-document.supplier-a4{width:210mm;min-height:297mm}.supplier-document.supplier-a5{width:148mm;min-height:210mm;padding:9mm}.supplier-document>header{display:flex;justify-content:space-between;gap:30px;border-bottom:3px solid var(--primary);padding-bottom:14px}.supplier-document>header>div:last-child{text-align:right}.supplier-document-logo{max-width:110px;max-height:75px;object-fit:contain}.supplier-document h1{font-size:21px;margin:6px 0;color:var(--primary)}.supplier-document h2{font-size:25px;margin:5px 0;color:var(--primary)}.supplier-document header small{font-size:10px;letter-spacing:1.6px;color:#8c593f;font-weight:800}.supplier-document header p{font-size:10px;line-height:1.55;color:#666}.supplier-parties{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:18px 0}.supplier-parties>div{border-left:4px solid var(--primary);background:#faf7f4;padding:12px}.supplier-parties small{font-size:9px;color:#8d644f;letter-spacing:1px}.supplier-parties h3{margin:6px 0}.supplier-parties p{font-size:10px;line-height:1.55}.supplier-document table{font-size:10px;border:1px solid #bbb}.supplier-document th{background:var(--primary);color:#fff;padding:8px}.supplier-document td{padding:8px;border:1px solid #ddd}.supplier-document th:nth-child(n+2),.supplier-document td:nth-child(n+2){text-align:right}.supplier-totals{width:min(390px,100%);margin:20px 0 0 auto;display:grid;gap:7px}.supplier-totals span,.supplier-totals strong{display:flex;justify-content:space-between}.supplier-totals strong{background:var(--primary);color:#fff;padding:10px}.supplier-notes{font-size:10px;background:#fff8e8;padding:10px;border:1px solid #ecd8a8}.supplier-document>footer{display:grid;grid-template-columns:1fr 1fr;gap:40px;margin-top:35px}.supplier-document>footer div{min-height:70px;border:1px solid #bbb;text-align:center;padding:10px;font-size:10px}.supplier-a5{font-size:85%}.supplier-a5 h2{font-size:19px}.supplier-a5 table{font-size:8px}.supplier-a5 th,.supplier-a5 td{padding:6px}.supplier-reception{margin-top:18px;display:grid;grid-template-columns:.7fr 1.3fr;gap:25px;align-items:start}.supplier-reception>form{display:grid;gap:12px}.supplier-payment-layout{display:grid;grid-template-columns:1.5fr .7fr;gap:16px;margin-top:18px}.supplier-payment-form{display:grid;gap:12px;align-content:start}.status.non-payée{background:#fde5df;color:#b52d21}.status.partielle{background:#fff1cc;color:#9a6700}.status.payée{background:#e1f4e4;color:#207737}.status.commandé{background:#e5edff;color:#275ca8}.status.reçu{background:#e1f4e4;color:#207737}.status.annulé{background:#eceef0;color:#707780}
@media(max-width:1100px){.purchase-report-filters{grid-template-columns:repeat(3,1fr)}.supplier-payment-layout,.supplier-reception{grid-template-columns:1fr}}
@media(max-width:760px){.purchase-topbar .btn{flex:1 1 100%}.purchase-report-filters{grid-template-columns:1fr 1fr}.purchase-report-filters .btn{width:100%}.supplier-lines-head{align-items:stretch;flex-direction:column}.supplier-lines-head .search{max-width:none}.supplier-order-summary{align-items:stretch;flex-direction:column}.supplier-order-summary>div{width:100%}.supplier-document-actions .btn{flex:1}.supplier-document{width:100%!important;min-height:0!important;padding:18px!important;overflow-x:auto}.supplier-document>header,.supplier-parties{grid-template-columns:1fr;display:grid}.supplier-document>header>div:last-child{text-align:left}.supplier-document>footer{gap:12px}.supplier-kpis{grid-template-columns:1fr 1fr}}
@media(max-width:520px){.purchase-report-filters{grid-template-columns:1fr}.supplier-kpis{grid-template-columns:1fr}.supplier-document>footer{grid-template-columns:1fr}.supplier-payment-layout{grid-template-columns:1fr}}
@media print{.sidebar,.topbar,.supplier-document-actions,.purchase-topbar,.purchase-tabs,.purchase-report-filters,.supplier-payment-layout,.supplier-reception{display:none!important}.main{margin:0!important}.content{padding:0!important}.supplier-document{box-shadow:none!important;margin:0 auto!important}.purchase-report-table{box-shadow:none}.purchase-report-table table{font-size:10px}}

/* Grands livres, avoirs et retours */
.ledger-directory{display:grid;grid-template-columns:1fr 1fr;gap:18px;align-items:start}.ledger-directory .search{width:100%;margin:12px 0}.document-credit-actions{display:flex;justify-content:flex-end;gap:9px;flex-wrap:wrap;margin-bottom:12px}.credit-lines input{min-width:120px;width:100%;padding:9px}.credit-lines td:last-child{white-space:nowrap}.document-credit-actions+.supplier-document-actions{margin-top:0}
@media(max-width:900px){.ledger-directory{grid-template-columns:1fr}.document-credit-actions{justify-content:stretch}.document-credit-actions .btn{flex:1}}
@media(max-width:560px){.document-credit-actions{flex-direction:column}.document-credit-actions .btn{width:100%}.credit-lines{min-width:720px}}
@media print{.document-credit-actions{display:none!important}}

/* Gestion des clients, fournisseurs et catégories */
.third-party-table td:first-child b,.third-party-table td:first-child small{display:block}.third-party-table td:first-child small,.third-party-table td small{color:#6b7280;margin-top:4px}.row-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.row-actions form{display:inline-flex;margin:0}.third-party-table .status{white-space:nowrap}.document-source-picker form{display:grid;gap:14px}
@media(max-width:900px){.third-party-table table{min-width:1050px}.row-actions{min-width:280px}}

/* Commandes clients : acomptes, TVA et documents */
.order-management-picker{display:flex;align-items:end;gap:12px;margin-bottom:16px}.order-management-picker label{flex:1}.order-management-head{display:flex;align-items:center;justify-content:space-between;gap:18px}.order-management-head h2,.order-management-head p{margin:4px 0}.order-documents-panel{margin:16px 0}.order-document-buttons{display:flex;gap:9px;flex-wrap:wrap}.order-management-grid{display:grid;grid-template-columns:minmax(300px,.75fr) minmax(0,1.25fr);gap:16px;align-items:start}.order-terms-form,.order-payments,.order-payments>form{display:grid;gap:13px}.order-tax-summary,.order-payment-kpis{display:grid;gap:8px;padding:13px;background:#faf7f4;border-radius:10px}.order-tax-summary span,.order-tax-summary strong,.order-payment-kpis span,.order-payment-kpis strong{display:flex;justify-content:space-between;gap:18px}.order-payment-kpis strong{border-top:2px solid var(--primary);padding-top:9px}.order-payments .table-wrap{margin-top:4px}.invoice-payment-detail{width:min(210mm,100%);margin:16px auto}.invoice-payment-detail table{margin-top:14px}.invoice-payment-detail .order-payment-kpis{grid-template-columns:repeat(2,1fr)}
@media(max-width:900px){.order-management-grid{grid-template-columns:1fr}.order-management-picker{align-items:stretch;flex-direction:column}.order-document-buttons .btn{flex:1}.invoice-payment-detail .order-payment-kpis{grid-template-columns:1fr}}
@media(max-width:560px){.order-document-buttons{flex-direction:column}.order-document-buttons .btn{width:100%}.order-management-head{align-items:flex-start;flex-direction:column}.order-payments table{min-width:650px}}
@media print{.order-management-picker,.order-documents-panel,.order-management-head{display:none!important}.invoice-payment-detail{box-shadow:none!important;break-inside:avoid}}

/* POS compact : 7 a 10 lignes visibles et paiement toujours accessible */
@media(min-width:901px){
  .pos{grid-template-columns:minmax(0,1fr) minmax(520px,560px);min-height:630px}
  .pos-cart{display:grid;grid-template-columns:minmax(0,.85fr) minmax(250px,1.15fr);grid-template-rows:auto minmax(350px,1fr) auto auto auto;column-gap:12px;align-content:stretch;min-height:630px;max-height:min(820px,calc(100dvh - 105px));padding:13px 15px;overflow:hidden}
  .pos-cart>h2,.pos-cart>.cart-items,.pos-cart>.cash-details,.pos-cart>.credit-details,.pos-cart>form{grid-column:1/-1}
  .pos-cart>h2{margin:0 0 4px;font-size:19px}
  .cart-items{min-height:0;max-height:520px;overflow-y:auto;overflow-x:hidden;padding-right:5px;scrollbar-gutter:stable}
  .pos-line{grid-template-columns:minmax(0,1fr) auto 31px;grid-template-rows:auto auto;gap:2px 7px;min-height:48px;padding:5px 0;font-size:12px}
  .pos-line-product{grid-column:1;grid-row:1/3;align-self:center}
  .pos-line-product b{font-size:12px;line-height:1.15;margin:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .pos-line-product small{font-size:10px;margin-top:3px}
  .pos-line-total{grid-column:2;grid-row:1;font-size:12px;align-self:end}
  .qty{grid-column:2;grid-row:2;justify-self:end;gap:2px;padding:2px;border-radius:8px}
  .qty button{width:28px;height:27px;border-radius:6px;font-size:16px}
  .qty i{width:27px;font-size:13px}
  .pos-line>button[data-remove]{grid-column:3;grid-row:1/3;align-self:center;width:29px;height:31px;border-radius:6px;font-size:16px}
  .pos-customer{grid-column:1;margin:6px 0 3px;min-width:0;font-size:11px}
  .pos-customer select{width:100%;min-height:38px;padding:7px;font-size:12px}
  .discount{grid-column:2;margin:6px 0 3px;padding:0;border-top:0;gap:6px;font-size:12px}
  .discount input{width:78px;min-height:38px;padding:6px;font-size:12px}
  .pos-total{grid-column:1;padding:5px 0;font-size:15px;gap:8px}.pos-total strong{font-size:22px;white-space:nowrap}
  .payment{grid-column:2;gap:5px;margin:5px 0}.payment button{min-height:42px;padding:7px 3px;font-size:11px;border-radius:7px}
  .cash-details,.credit-details{margin:3px 0 5px;padding:7px 10px}
  .cash-details{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(150px,.75fr);gap:10px;align-items:end}
  .cash-details label,.credit-details label{font-size:10px}.cash-details input,.credit-details input{min-height:34px;padding:6px;font-size:12px}
  .change-box{margin:0;min-height:34px}.change-box strong{font-size:16px;white-space:nowrap}
  .credit-details:not([hidden]){display:grid;grid-template-columns:1fr 1fr;gap:10px;align-items:end}.credit-details small{margin:0}
  .checkout-btn{min-height:43px;font-size:15px}
}
@media(min-width:901px) and (max-width:1180px){.pos{grid-template-columns:minmax(0,1fr) 500px}.pos-cart{grid-template-columns:minmax(0,.8fr) minmax(235px,1.2fr)}}
@media(max-width:900px){.pos-cart{display:flex;max-height:none;overflow:visible}.cart-items{min-height:260px;max-height:420px;overflow-y:auto;overflow-x:hidden}.pos-line{min-width:0}}

/* Clavier virtuel et contrôles d'affichage */
.login-display-tools{display:flex;justify-content:flex-end;gap:9px;margin-bottom:20px}.login-display-tools .btn{min-height:44px}.login-form form>.login-display-tools+h2{margin-top:0}
.virtual-keyboard{position:fixed;z-index:1000;left:0;right:0;bottom:0;width:100%;padding:9px max(10px,calc((100vw - 1080px)/2));background:linear-gradient(180deg,#262626,#111);color:#fff;border-top:3px solid #9a542f;box-shadow:0 -12px 35px #0006}
.virtual-keyboard[hidden]{display:none!important}.virtual-keyboard-head{display:flex;align-items:center;gap:14px;min-height:36px;margin-bottom:7px}.virtual-keyboard-head strong{font-size:14px}.virtual-keyboard-head span{color:#d1d5db;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.virtual-keyboard-head button{margin-left:auto;width:34px;height:32px;border:1px solid #666;border-radius:7px;background:#333;color:#fff;font-size:21px}
.virtual-keyboard-keys{display:grid;gap:5px}.virtual-keyboard-row{display:flex;justify-content:center;gap:5px}.virtual-keyboard-row button{flex:1;max-width:92px;min-width:38px;height:39px;border:1px solid #616161;border-radius:7px;background:linear-gradient(#4b4b4b,#303030);color:#fff;font-weight:800;box-shadow:0 2px 0 #050505}.virtual-keyboard-row button:active,.virtual-keyboard-row button.active{background:#8a4526;border-color:#c57a50;transform:translateY(1px);box-shadow:none}.virtual-keyboard-row button.special{background:linear-gradient(#6a6a6a,#464646)}.virtual-keyboard-actions button.space{flex:5;max-width:520px}.virtual-keyboard-actions button.enter{flex:2;max-width:185px;background:linear-gradient(#7c3b1f,#54240f)}
.virtual-keyboard.numeric{padding-block:9px}.virtual-keyboard.numeric .virtual-keyboard-head,.virtual-keyboard.numeric .virtual-keyboard-keys{width:min(480px,100%);margin-inline:auto}.virtual-keyboard.numeric .virtual-keyboard-keys{gap:6px}.virtual-keyboard.numeric .virtual-keyboard-row{gap:7px}.virtual-keyboard.numeric .virtual-keyboard-row button{width:105px;max-width:115px;height:48px;font-size:17px}.virtual-keyboard.numeric .numeric-row-4 button{font-size:15px}.virtual-keyboard.numeric .numeric-actions button{width:auto;max-width:235px;font-size:14px}.virtual-keyboard.numeric .numeric-actions .enter{background:linear-gradient(#7c3b1f,#54240f)}
@media(min-width:701px){.virtual-keyboard.numeric.is-floating{right:auto;bottom:auto;width:310px;padding:9px;border:2px solid #9a542f;border-radius:13px;box-shadow:0 12px 38px #0008}.virtual-keyboard.numeric.is-floating .virtual-keyboard-head,.virtual-keyboard.numeric.is-floating .virtual-keyboard-keys{width:100%;margin:0}.virtual-keyboard.numeric.is-floating .virtual-keyboard-head{min-height:31px;margin-bottom:5px}.virtual-keyboard.numeric.is-floating .virtual-keyboard-head strong{font-size:12px}.virtual-keyboard.numeric.is-floating .virtual-keyboard-head span{font-size:10px}.virtual-keyboard.numeric.is-floating .virtual-keyboard-row{gap:5px}.virtual-keyboard.numeric.is-floating .virtual-keyboard-row button{flex:1;width:auto;min-width:0;max-width:none;height:42px;font-size:16px}.virtual-keyboard.numeric.is-floating .numeric-row-4 button{font-size:14px}.virtual-keyboard.numeric.is-floating .numeric-actions button{height:38px;font-size:13px}}
.virtual-keyboard-visible .login-form{align-items:flex-start;padding-top:5vh}.virtual-keyboard-visible .login-visual{min-height:calc(100vh - 315px)}
@media(max-width:700px){.login-display-tools{justify-content:stretch}.login-display-tools .btn{flex:1;padding-inline:8px}.virtual-keyboard{padding:7px 5px}.virtual-keyboard-head{margin-inline:5px}.virtual-keyboard-row{gap:3px}.virtual-keyboard-row button{min-width:0;height:37px;font-size:12px}.virtual-keyboard-row.row-5 button{font-size:11px}.virtual-keyboard-visible .login-visual{display:none}.virtual-keyboard-visible .login-form{padding:12px 0 310px}.virtual-keyboard-visible .login-form form{width:92%}}
@media(max-width:430px){.pos-fullscreen-button span,.pos-keyboard-button span{font-size:0}.pos-fullscreen-button span:after{content:'Écran';font-size:12px}.pos-keyboard-button span:after{content:'Clavier';font-size:12px}.virtual-keyboard-row button{height:35px;font-size:11px}.virtual-keyboard-head{min-height:30px}}

/* Création manuelle des commandes clients fidèles */
.dashboard-empty-chart{align-self:center;margin:auto;color:#6b7280;font-size:13px;text-align:center}.customer-order-zone{display:flex;align-items:end;gap:12px}.customer-order-zone label{width:min(440px,100%)}.customer-order-form{display:grid;gap:16px}.customer-order-form>.panel{margin:0}.customer-order-lines input{min-width:90px;padding:8px;text-align:center}.customer-order-lines td:last-child,.customer-order-lines th:last-child{white-space:nowrap;text-align:right}.customer-order-summary{display:flex;align-items:end;justify-content:flex-end;gap:35px}.customer-order-summary>div{width:min(430px,100%);display:grid;gap:9px}.customer-order-summary span,.customer-order-summary strong{display:flex;justify-content:space-between;gap:30px}.customer-order-summary strong{border-top:2px solid var(--primary,#6b3017);padding-top:10px;font-size:19px}.customer-order-summary>.btn{min-width:240px}
@media(max-width:820px){.customer-order-summary{align-items:stretch;flex-direction:column}.customer-order-summary>div,.customer-order-summary>.btn{width:100%;min-width:0}.customer-order-lines{min-width:760px}.customer-order-zone{align-items:stretch;flex-direction:column}.customer-order-zone label{width:100%}}
@media(min-width:821px){body:has([data-customer-order-form]) .virtual-keyboard.numeric{left:auto;right:18px;bottom:18px;width:min(430px,calc(100vw - 36px));padding:10px 12px;border:2px solid #9a542f;border-radius:14px;box-shadow:0 14px 45px #0008}body:has([data-customer-order-form]) .virtual-keyboard.numeric .virtual-keyboard-row button{height:52px}}
body:has([data-customer-order-form]).virtual-keyboard-visible .customer-order-form{padding-bottom:310px}

/* POS en vrai plein écran : aucune barre verticale de page, encaissement toujours visible */
body.pos-fullscreen-mode{height:100dvh;overflow:hidden;background:#f5f6f7}
body.pos-fullscreen-mode .sidebar{display:none!important}
body.pos-fullscreen-mode .main{margin-left:0!important;width:100%;height:100dvh;min-height:0;overflow:hidden}
body.pos-fullscreen-mode .topbar{height:48px;min-height:48px;padding:0 14px;position:relative}
body.pos-fullscreen-mode .topbar h1{font-size:16px}
body.pos-fullscreen-mode .content{width:100%;max-width:none;height:calc(100dvh - 48px);padding:7px 9px;overflow:hidden;display:flex;flex-direction:column}
body.pos-fullscreen-mode .pos-controlbar{display:grid;grid-template-columns:minmax(235px,auto) minmax(0,1fr);align-items:stretch;flex:0 0 46px;width:100%;min-height:46px;margin:0 0 6px;gap:7px}
body.pos-fullscreen-mode .pos-zone-control{width:auto;min-width:235px;margin:0}
body.pos-fullscreen-mode .pos-zone-control label,body.pos-fullscreen-mode .pos-zone-readonly{min-height:46px;height:46px;padding:4px 8px 4px 11px}
body.pos-fullscreen-mode .pos-zone-control select{min-height:34px;height:34px;padding-block:5px}
body.pos-fullscreen-mode .pos-history-toolbar{width:auto;min-width:0;margin:0;justify-content:flex-end;gap:6px;flex-wrap:nowrap}
body.pos-fullscreen-mode .pos-history-toolbar .btn,body.pos-fullscreen-mode .shift-close-form .btn{min-height:46px;height:46px;padding:7px 11px;border-radius:8px;font-size:12px;white-space:nowrap}
body.pos-fullscreen-mode .pos-history-toolbar small{display:none}
body.pos-fullscreen-mode .pos{flex:1;width:100%;height:auto;min-height:0;max-height:none;overflow:hidden;align-items:stretch}
body.pos-fullscreen-mode .pos-products{height:100%;min-height:0;overflow:hidden;display:flex;flex-direction:column;padding:9px}
body.pos-fullscreen-mode .pos-search{flex:0 0 auto}
body.pos-fullscreen-mode .category-pills{flex:0 0 auto;margin:7px 0;padding-bottom:2px}
body.pos-fullscreen-mode .pos-grid{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;align-content:start;padding-right:3px}
body.pos-fullscreen-mode .pos-cart{height:100%;min-height:0;max-height:none;grid-template-rows:auto minmax(250px,1fr) auto auto auto;align-content:stretch;overflow:hidden;padding:9px 12px}
body.pos-fullscreen-mode .cart-items{min-height:0;max-height:none;overflow-y:auto;overflow-x:hidden}
body.pos-fullscreen-mode .pos-cart>h2{margin-bottom:2px}
body.pos-fullscreen-mode .pos-customer,body.pos-fullscreen-mode .discount{margin-top:3px}
body.pos-fullscreen-mode .cash-details,body.pos-fullscreen-mode .credit-details{margin-bottom:3px}
body.pos-fullscreen-mode .checkout-btn{min-height:40px;height:40px}
@media(max-width:900px){body.pos-fullscreen-mode .content{overflow-y:auto;display:block}body.pos-fullscreen-mode .pos-controlbar{grid-template-columns:1fr;height:auto}body.pos-fullscreen-mode .pos{height:auto;min-height:calc(100dvh - 115px)}body.pos-fullscreen-mode .pos-cart{display:flex;height:auto;max-height:none}body.pos-fullscreen-mode{overflow:auto}}

/* Saisie directe de la quantité avec ouverture du pavé numérique */
.qty input[data-qty-direct]{width:38px;min-width:38px;height:32px;padding:3px;text-align:center;border-radius:6px;font-size:13px;font-weight:800;appearance:textfield}.qty input[data-qty-direct]::-webkit-inner-spin-button,.qty input[data-qty-direct]::-webkit-outer-spin-button{appearance:none;margin:0}
@media(min-width:901px){.qty input[data-qty-direct]{width:29px;min-width:29px;height:27px;padding:2px;font-size:12px}}
@media(max-width:640px){.ticket-choice>div{padding:20px 14px}.ticket-choice>div>div:last-of-type{grid-template-columns:1fr}.ticket-choice .btn{min-height:44px}}

/* Ticket thermique compact : hauteur adaptée au contenu et logo lisible en noir */
.receipt-print-page .receipt{width:var(--receipt-width,80mm);max-width:none;padding:4mm 3.5mm}
.direct-print-frame{width:380px!important;height:900px!important}
.receipt-print-page .receipt header{padding-bottom:5px}
.receipt-print-page .receipt-meta{padding:6px 0;gap:2px}
.receipt-print-page .receipt-meta-inline{display:flex;align-items:center;justify-content:space-between;gap:8px;white-space:nowrap}
.receipt-print-page .receipt th,.receipt-print-page .receipt td{padding:4px 2px;line-height:1.15}
.receipt-print-page .receipt-totals{padding-top:6px;gap:4px}
.receipt-print-page .receipt-totals>strong{padding:5px 0}
.receipt-print-page .receipt footer{margin-top:8px;display:flex;flex-direction:column;gap:5px}
.receipt-print-page .receipt footer>b{font-size:11px}
.receipt-print-page .receipt-contact{display:block;font-size:9px;font-weight:400;line-height:1.2;white-space:nowrap;text-align:center}
.receipt-print-page .receipt .receipt-logo.custom-logo{display:block!important;width:min(52mm,100%)!important;height:20mm!important;max-width:100%!important;max-height:20mm!important;margin:0 auto 3px!important;object-fit:contain!important;filter:grayscale(1) contrast(4) brightness(.28)!important}
@media print{
  html,body.receipt-print-page{margin:0!important;padding:0!important;width:var(--receipt-width,80mm)!important;min-width:0!important;min-height:0!important;height:auto!important;background:#fff!important;overflow:visible!important}
  body.receipt-print-page .app{display:block!important;width:var(--receipt-width,80mm)!important;min-width:0!important;min-height:0!important;height:auto!important;margin:0!important;padding:0!important;background:#fff!important}
  body.receipt-print-page .content>*:not(.receipt){display:none!important}
  body.receipt-print-page .main,body.receipt-print-page .content{display:block!important;position:static!important;margin:0!important;padding:0!important;width:var(--receipt-width,80mm)!important;min-width:0!important;max-width:none!important;min-height:0!important;height:auto!important;overflow:visible!important}
  body.receipt-print-page .receipt{display:block!important;position:static!important;width:var(--receipt-width,80mm)!important;max-width:none!important;height:auto!important;min-height:0!important;margin:0!important;padding:.5mm 3mm 2mm!important;border:0!important;box-shadow:none!important;transform:none!important;break-after:avoid-page!important;page-break-after:avoid!important}
  body.receipt-print-page .receipt .receipt-logo.custom-logo{filter:grayscale(1) contrast(6) brightness(.18)!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
}

/* Navigation directe en bas sur tablette et téléphone */
.mobile-bottom-nav{display:none}
@media(max-width:1024px){
  body.app{--mobile-nav-height:72px}
  body.app .sidebar{display:none!important}
  body.app .main{margin-left:0!important;width:100%}
  body.app .menu-btn{display:none!important}
  body.app .content{padding-bottom:calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 18px)}
  .mobile-bottom-nav{position:fixed;z-index:950;left:0;right:0;bottom:0;height:calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));padding:5px 6px max(5px,env(safe-area-inset-bottom));display:flex;align-items:stretch;gap:4px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scroll-snap-type:x proximity;scrollbar-width:none;background:linear-gradient(160deg,#2c180d 0,#0f1f24 100%);border-top:2px solid #8b4a29;box-shadow:0 -7px 22px #0004;-webkit-overflow-scrolling:touch}
  .mobile-bottom-nav::-webkit-scrollbar{display:none}
  .mobile-bottom-nav a{flex:0 0 82px;min-width:82px;scroll-snap-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:5px 4px;border-radius:9px;color:#e9e6e3;text-align:center;font-size:9px;line-height:1.1}
  .mobile-bottom-nav a i{font-style:normal;font-size:21px;line-height:1}
  .mobile-bottom-nav a span{display:-webkit-box;max-width:100%;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2}
  .mobile-bottom-nav a.active{background:linear-gradient(180deg,#8b4a29,#663018);color:#fff;box-shadow:inset 0 0 0 1px #c27a50}
  body.pos-fullscreen-mode .content{height:calc(100dvh - 48px - var(--mobile-nav-height) - env(safe-area-inset-bottom));padding-bottom:7px}
}
@media(max-width:520px){.mobile-bottom-nav a{flex-basis:76px;min-width:76px}.mobile-bottom-nav a i{font-size:20px}.mobile-bottom-nav a span{font-size:8.5px}}
@media print{.mobile-bottom-nav{display:none!important}}

/* Android WebView/APK : empêcher la barre réseau/batterie de masquer l’en-tête */
@media(max-width:820px){
  html.android-webview body.app .topbar{height:auto;min-height:92px;padding-top:max(28px,env(safe-area-inset-top));padding-bottom:10px;box-sizing:border-box}
  html.android-webview body.app .sidebar{padding-top:max(48px,calc(env(safe-area-inset-top) + 20px))}
  html.android-webview body.pos-fullscreen-mode .topbar{height:auto!important;min-height:76px!important;padding-top:max(28px,env(safe-area-inset-top))!important;padding-bottom:6px!important}
  html.android-webview body.pos-fullscreen-mode .content{height:calc(100dvh - 76px - var(--mobile-nav-height) - env(safe-area-inset-bottom))!important}
}

/* Documents A4/A5 compacts et pied légal commun */
.document-legal-settings form{display:grid;gap:14px}
.document-legal-footer{width:min(210mm,100%);margin:12px auto 0;padding:7px 12px;border-top:1px solid #9b8d84;text-align:center;color:#56504c;font-size:9px;line-height:1.35}
.document-legal-footer div{font-weight:800;word-spacing:2px}.document-legal-footer p{margin:3px 0 0}
.document-format-switch{display:contents}
.invoice-logo.custom-logo,.supplier-document-logo.custom-logo,.stock-document-logo.custom-logo,.report-print-logo.custom-logo,.closure-logo.custom-logo{filter:brightness(.58) contrast(1.9) saturate(1.35)!important}
.invoice{padding:11mm 13mm}.invoice header{padding-bottom:8px;align-items:flex-start}.invoice header p{margin:4px 0;line-height:1.35}.invoice .invoice-logo.custom-logo{width:min(58mm,100%)!important;height:25mm!important;max-height:25mm!important;object-fit:contain!important;object-position:left center!important;margin:0 0 3px!important}.invoice .invoice-logo.custom-logo+h1{display:none}.invoice-parties{gap:16px;padding:11px 0}.invoice-parties>div{padding-left:10px}.invoice-parties h3{margin:4px 0}.invoice-parties p{margin:5px 0;line-height:1.4}.invoice table td,.invoice table th{padding:7px}.invoice-total{margin-top:13px;gap:6px}.invoice-total strong{padding:8px}.invoice footer{margin-top:18px;padding-top:8px}
.supplier-document{padding:9mm 11mm}.supplier-document>header{gap:18px;padding-bottom:8px;align-items:flex-start}.supplier-document>header p{margin:4px 0;line-height:1.35}.supplier-document .supplier-document-logo.custom-logo{width:min(48mm,100%)!important;height:20mm!important;max-height:20mm!important;object-fit:contain!important;object-position:left center!important;margin:0 0 3px!important}.supplier-document .supplier-document-logo.custom-logo+h1{display:none}.supplier-parties{gap:12px;margin:10px 0}.supplier-parties>div{padding:8px}.supplier-parties h3{margin:3px 0}.supplier-parties p{margin:4px 0;line-height:1.35}.supplier-document th,.supplier-document td{padding:6px}.supplier-totals{margin-top:12px;gap:5px}.supplier-totals strong{padding:7px}.supplier-document>footer{gap:20px;margin-top:16px}.supplier-document>footer div{min-height:46px;padding:7px}
html[data-document-format="A4"] .supplier-document{width:210mm;min-height:297mm;padding:9mm 11mm}
html[data-document-format="A5"] .supplier-document{width:148mm;min-height:210mm;padding:7mm 8mm;font-size:85%}
html[data-document-format="A5"] .supplier-document h2{font-size:19px}
html[data-document-format="A5"] .supplier-document table{font-size:8px}
html[data-document-format="A5"] .supplier-document th,html[data-document-format="A5"] .supplier-document td{padding:5px}
@media print{
  .invoice,.supplier-document{padding-bottom:20mm!important}
  .invoice-logo.custom-logo,.supplier-document-logo.custom-logo,.stock-document-logo.custom-logo,.report-print-logo.custom-logo,.closure-logo.custom-logo{filter:brightness(.42) contrast(2.5) saturate(1.5)!important;-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}
  .invoice{overflow:visible!important}.invoice header{display:flex!important;flex-direction:row!important;justify-content:space-between!important;align-items:flex-start!important}.invoice header>div:last-child{text-align:right!important}.invoice-parties{display:grid!important;grid-template-columns:1fr 1fr!important;gap:16px!important}.invoice table{width:100%!important}
  .supplier-document{overflow:visible!important}.supplier-document>header{display:flex!important;grid-template-columns:none!important;flex-direction:row!important;justify-content:space-between!important;align-items:flex-start!important}.supplier-document>header>div{width:auto!important;min-width:0!important}.supplier-document>header>div:last-child{text-align:right!important}.supplier-parties{display:grid!important;grid-template-columns:1fr 1fr!important;gap:12px!important}.supplier-document>footer{display:grid!important;grid-template-columns:1fr 1fr!important;gap:20px!important}.supplier-document table{width:100%!important}
  .document-legal-footer{position:fixed;left:8mm;right:8mm;bottom:4mm;width:auto!important;margin:0!important;padding:3mm 0 0!important;background:#fff!important;border-top:1px solid #777!important;font-size:8px;z-index:20}
  .invoice-a4{width:210mm!important;min-height:297mm!important;padding:9mm 11mm 20mm!important}.invoice-a5{width:148mm!important;min-height:210mm!important;padding:7mm 8mm 18mm!important}
  html[data-document-format="A4"] .supplier-document{width:210mm!important;min-height:297mm!important;padding:9mm 11mm 20mm!important}
  html[data-document-format="A5"] .supplier-document{width:148mm!important;min-height:210mm!important;padding:7mm 8mm 18mm!important}
}
.order-document-notes{margin:10px 0;padding:9px 12px;border:1px solid #c9b9b0;background:#fffaf7;display:grid;gap:3px;line-height:1.35}.order-document-notes strong{color:#6b3017;font-size:.78rem;letter-spacing:.08em}.order-document-notes b{font-size:.95rem;color:#111;white-space:normal}
.user-role-panel{margin-top:22px}.user-role-panel .form-grid{align-items:end}.user-role-submit{display:flex;align-items:end}.user-role-submit .btn{min-height:46px}.user-role-panel>p{margin:14px 0 0}
.zone-inventory-search{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0 14px}.zone-inventory-search .search{width:min(460px,100%);min-height:44px}.zone-inventory-search small{color:#6b7280;white-space:nowrap}@media(max-width:640px){.zone-inventory-search{align-items:stretch;flex-direction:column}.zone-inventory-search .search{width:100%}}
.pos [data-credit-details]{display:none!important}
.credit-due-form{display:flex;align-items:center;gap:6px;min-width:220px}.credit-due-form input[type="date"]{min-width:135px;padding:7px}.credit-due-form .btn{white-space:nowrap}
@media(max-width:640px){.credit-due-form{min-width:190px;flex-wrap:wrap}}

/* Pertes, déchets et produits défectueux */
.stock-loss-toolbar{display:flex;align-items:end;justify-content:space-between;gap:14px;margin-bottom:16px}.stock-loss-toolbar form{width:min(390px,100%)}.stock-loss-toolbar label{display:grid;gap:6px;font-weight:700}.stock-loss-form{display:grid;gap:16px}.stock-loss-form>.panel{margin:0}.stock-loss-header{display:grid;grid-template-columns:minmax(240px,.75fr) minmax(420px,1.25fr);gap:24px;align-items:start}.stock-loss-header h2{margin:5px 0}.stock-loss-header p{margin:0;color:#6b7280}.stock-loss-header>div:first-child>small{font-weight:800;color:#9a3412;letter-spacing:.08em}.stock-loss-table input{width:150px;text-align:center}.stock-loss-validation{display:flex;align-items:center;justify-content:space-between;gap:20px;border-left:5px solid #b91c1c}.stock-loss-validation>div{display:grid;gap:4px}.stock-loss-validation>div>b{color:#991b1b}.stock-loss-validation small{color:#6b7280}.stock-loss-detail{border-left:5px solid #9a3412}.stock-loss-detail>p{color:#6b7280}.stock-loss-note{padding:10px 12px;border-radius:8px;background:#fff7ed;color:#3f3f46!important}.stock-loss-history{margin-top:18px}
@media(max-width:820px){.stock-loss-toolbar,.stock-loss-validation{align-items:stretch;flex-direction:column}.stock-loss-toolbar form{width:100%}.stock-loss-header{grid-template-columns:1fr}.stock-loss-table{min-width:680px}.stock-loss-validation .btn{width:100%}}

/* Bons de pertes : ticket thermique ou page A5/A4 */
.stock-loss-row-actions,.stock-loss-detail-actions,.stock-loss-print-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.stock-loss-row-actions{min-width:245px}.stock-loss-row-actions .btn{padding:7px 9px}
.stock-loss-detail-actions{margin:8px 0 14px}.stock-loss-print-actions{justify-content:center;margin:0 0 16px}
.stock-loss-print-document{box-sizing:border-box;margin:0 auto;padding:10mm 12mm;background:#fff;color:#111;border:1px solid #ddd;box-shadow:0 4px 24px #0001;font-family:Arial,sans-serif;font-size:12px;line-height:1.35}
.stock-loss-print-document.loss-print-a4{width:210mm;max-width:100%}.stock-loss-print-document.loss-print-a5{width:148mm;max-width:100%;padding:7mm 8mm;font-size:10px}.stock-loss-print-document.loss-print-ticket{width:var(--loss-ticket-width,80mm);max-width:100%;padding:3mm;font-size:9px;box-shadow:0 2px 16px #0002}
.stock-loss-print-document header{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;border-bottom:2px solid #333;padding-bottom:9px}.stock-loss-print-document header>div:last-child{text-align:right}.stock-loss-print-document h1,.stock-loss-print-document h2{margin:3px 0}.stock-loss-print-document h1{font-size:17px}.stock-loss-print-document h2{font-size:19px}.stock-loss-print-document header small{letter-spacing:.12em;font-weight:800;color:#555}
.stock-loss-print-document .stock-loss-print-logo.custom-logo{display:block!important;width:46mm!important;max-width:100%!important;height:18mm!important;max-height:18mm!important;margin:0!important;object-fit:contain;object-position:left center;filter:grayscale(1) contrast(5) brightness(.24)}
.stock-loss-print-document .stock-loss-print-logo.custom-logo+h1{display:none}
.stock-loss-print-document:not(.loss-print-ticket) header{align-items:center;padding-bottom:4px}
.stock-loss-print-document:not(.loss-print-ticket) header>div:first-child{display:flex;align-items:center;height:20mm;min-height:0;overflow:hidden}
.stock-loss-print-document.loss-print-a5 h2{font-size:16px}
.stock-loss-print-meta{display:flex;gap:6px 18px;flex-wrap:wrap;padding:11px 0}.stock-loss-print-meta span{white-space:normal}.stock-loss-print-note{margin:0 0 10px;padding:7px 8px;border:1px solid #bbb;white-space:normal}
.stock-loss-print-document table{width:100%;border-collapse:collapse;table-layout:fixed}.stock-loss-print-document th,.stock-loss-print-document td{padding:7px 5px;border-bottom:1px solid #bbb;text-align:right;vertical-align:top;overflow-wrap:anywhere}.stock-loss-print-document th:first-child,.stock-loss-print-document td:first-child{text-align:left;width:43%}.stock-loss-print-document tfoot th{font-size:1.1em;border-top:2px solid #333}.stock-loss-print-document footer{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-top:16px;padding-top:7px;border-top:1px solid #999;color:#444;font-size:.85em}
.stock-loss-print-document.loss-print-ticket header{display:block;text-align:center;padding-bottom:4px;border-bottom:1px dashed #555}.stock-loss-print-document.loss-print-ticket header>div:first-child{height:16mm;min-height:0;margin:0 0 2px;overflow:hidden;line-height:0}.stock-loss-print-document.loss-print-ticket header>div:last-child{text-align:center}.stock-loss-print-document.loss-print-ticket header small{font-size:8px}.stock-loss-print-document.loss-print-ticket h2{font-size:12px}.stock-loss-print-document.loss-print-ticket .stock-loss-print-logo.custom-logo{width:48mm!important;height:16mm!important;max-height:16mm!important;margin:0 auto!important;object-position:center}.stock-loss-print-document.loss-print-ticket .stock-loss-print-meta{display:grid;gap:2px;padding:5px 0}.stock-loss-print-document.loss-print-ticket .stock-loss-print-note{padding:4px;margin-bottom:5px}.stock-loss-print-document.loss-print-ticket th,.stock-loss-print-document.loss-print-ticket td{padding:3px 2px;font-size:8px}.stock-loss-print-document.loss-print-ticket th:first-child,.stock-loss-print-document.loss-print-ticket td:first-child{width:43%}.stock-loss-print-document.loss-print-ticket footer{display:block;text-align:center;margin-top:7px;padding-top:4px}.stock-loss-print-document.loss-print-ticket footer span{display:block}
@media print{
  body.stock-loss-print-page{margin:0!important;padding:0!important;background:#fff!important;overflow:visible!important}
  body.stock-loss-print-page .sidebar,body.stock-loss-print-page .topbar,body.stock-loss-print-page .stock-loss-print-actions{display:none!important}
  body.stock-loss-print-page .app,body.stock-loss-print-page .main,body.stock-loss-print-page .content{display:block!important;width:auto!important;min-width:0!important;max-width:none!important;min-height:0!important;height:auto!important;margin:0!important;padding:0!important;overflow:visible!important;background:#fff!important}
  body.stock-loss-print-page .content>*:not(.stock-loss-print-document){display:none!important}
  body.stock-loss-print-page .stock-loss-print-document{display:block!important;position:static!important;max-width:none!important;min-height:0!important;height:auto!important;margin:0!important;border:0!important;box-shadow:none!important;transform:none!important;break-after:avoid-page!important;page-break-after:avoid!important}
  body.stock-loss-print-page[data-loss-format="ticket"] .stock-loss-print-document{width:var(--loss-ticket-width,80mm)!important;padding:1mm 3mm 2mm!important}
  body.stock-loss-print-page[data-loss-format="a5"] .stock-loss-print-document{width:148mm!important;padding:7mm 8mm!important}
  body.stock-loss-print-page[data-loss-format="a4"] .stock-loss-print-document{width:210mm!important;padding:10mm 12mm!important}
  body.stock-loss-print-page .stock-loss-print-logo.custom-logo{filter:grayscale(1) contrast(6) brightness(.18)!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  body.stock-loss-print-page .stock-loss-print-document thead{display:table-header-group}
  body.stock-loss-print-page .stock-loss-print-document tr{break-inside:avoid;page-break-inside:avoid}
}
