
:root{font-family:Inter,Segoe UI,Arial,sans-serif;color:#203c35;background:#f4f6f3;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer;border:0;border-radius:10px;padding:13px 18px;background:#15594c;color:white;font-weight:650;min-height:44px}button:hover{filter:brightness(.94)}button:disabled{opacity:.5;cursor:wait}.secondary{background:#e8eee8;color:#24594c}.danger{background:#f9e4de;color:#973e28}.brandmark{display:grid;place-items:center;width:43px;height:43px;background:#d9edba;color:#164e40;border-radius:13px;font-weight:800;font-size:29px}.brand{display:flex;gap:12px;align-items:center;text-decoration:none;color:white;font-size:22px;font-weight:700}.brand small{display:block;font-size:10px;letter-spacing:2.8px;margin-top:3px;color:#b9d0c6}aside{width:240px;background:#133f35;position:fixed;inset:0 auto 0 0;padding:30px 20px;color:white;display:flex;flex-direction:column}nav{margin-top:50px;display:grid;gap:8px}nav button{background:transparent;text-align:left;color:#c9d9d1;font-weight:500}nav button.active{background:#d9edba;color:#163e31}.sidefoot{margin-top:auto;display:grid;gap:12px;font-size:10px;letter-spacing:1px}.sidefoot small{color:#b9d0c6;line-height:1.7;letter-spacing:0}main{margin-left:240px;padding:32px 38px;max-width:1700px}header{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:30px}.eyebrow{font-size:10px;letter-spacing:2px;color:#748b7e}h1{font-size:30px;letter-spacing:-1px;margin:8px 0}h2{font-size:20px;margin:0 0 16px}h3{font-size:16px;margin:6px 0}p{line-height:1.6;color:#60766b}.sync{display:flex;gap:12px;align-items:center;font-size:12px;color:#557567}.panel{background:white;border:1px solid #e0e7df;border-radius:17px;padding:24px;box-shadow:0 3px 12px #173b2503}.sale-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:24px}.toolbar{display:flex;align-items:center;gap:12px;margin-bottom:20px;flex-wrap:wrap}.toolbar input{flex:1}.toolbar h2{margin:0;flex:1}input,select{width:100%;padding:13px;border:1px solid #d7e0d6;border-radius:9px;background:white;color:#203c35;min-width:0}input:focus,select:focus{outline:2px solid #94b994;outline-offset:1px}label{display:grid;gap:7px;font-size:13px;font-weight:600;margin:12px 0}.product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:15px}.product-card{text-align:left;background:white;color:#203c35;border:1px solid #e0e7df;padding:10px;border-radius:15px;font-weight:400;overflow:hidden}.product-card img{width:100%;height:135px;object-fit:cover;border-radius:10px;background:#edf1e9}.product-card h3{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.product-card small{color:#718477;display:block;font-size:11px}.product-card .price{display:flex;justify-content:space-between;margin-top:12px;font-size:14px;font-weight:700}.badge{background:#edf4e6;color:#51713c;padding:4px 7px;border-radius:6px;font-size:10px}.badge.warn{background:#fff0db;color:#95622b}.empty{text-align:center;padding:45px 20px;color:#738577;border:1px dashed #ccd9ca;border-radius:14px;grid-column:1/-1}.empty b{display:block;color:#365b49;margin-bottom:8px}.cart{align-self:start;position:sticky;top:20px}.cart-item{border-bottom:1px solid #e6ebe2;padding:14px 0}.cart-item-head{display:flex;justify-content:space-between;gap:8px;align-items:center}.cart-item-head button{padding:0 9px;min-height:32px}.row{display:flex;gap:12px;align-items:center}.row>*{flex:1}.cart label{font-size:11px}.total{display:flex;justify-content:space-between;align-items:center;margin:22px 0 12px}.total strong{font-size:26px}.wide{width:100%}.muted{color:#718477;font-size:12px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-bottom:24px}.stat small{color:#748777}.stat strong{display:block;font-size:27px;margin:14px 0 6px;letter-spacing:-1px}.stat.highlight{background:#15594c;color:white}.stat.highlight small{color:#d5e2d9}.cols{display:grid;grid-template-columns:1.3fr 1fr;gap:24px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;text-align:left;font-size:13px}th{font-weight:500;color:#7a8c7e;font-size:11px;white-space:nowrap}th,td{padding:14px 9px;border-bottom:1px solid #edf0e9}td img{width:42px;height:42px;object-fit:cover;border-radius:8px;vertical-align:middle;margin-right:10px}td button{padding:8px 12px;white-space:nowrap}.note{padding:13px 16px;background:#fff1da;border-radius:10px;color:#865c2b;font-size:12px;margin-bottom:18px;line-height:1.6}.positive{color:#287855}.negative{color:#bb4b32}.gate{min-height:100vh;display:grid;place-items:center;padding:20px;background:#edf2e9}.login{width:min(420px,100%)}.login h1{margin-top:20px}.login>button{width:100%;margin-top:10px}details{margin-top:22px;font-size:12px}summary{cursor:pointer;color:#466d54}#loginError{color:#a24632;font-size:13px}dialog{border:0;border-radius:17px;padding:25px;width:min(520px,calc(100% - 30px));max-height:90vh;box-shadow:0 20px 80px #0003}dialog::backdrop{background:#10291f88}#closeModal{margin-top:12px;width:100%}.photo-preview{width:100%;height:145px;object-fit:contain;background:#f3f5ef;border-radius:10px}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#163f32;color:white;padding:16px 24px;border-radius:12px;z-index:100;max-width:90vw;box-shadow:0 8px 30px #0002}.barrow{display:grid;grid-template-columns:100px 1fr 80px;gap:12px;align-items:center;font-size:12px;margin:15px 0}.bar{height:9px;background:#e8eee4;border-radius:10px;overflow:hidden}.bar i{display:block;height:100%;background:#7fab6f;border-radius:10px}button:focus-visible{outline:3px solid #9bba72;outline-offset:3px}[hidden]{display:none!important}
@media(min-width:1500px){.product-grid{grid-template-columns:repeat(auto-fill,minmax(175px,1fr))}.product-card img{height:160px}}
@media(max-width:1100px){aside{width:190px;padding:25px 15px}main{margin-left:190px;padding:25px 20px}.sale-layout{grid-template-columns:1fr 300px}.stats{grid-template-columns:repeat(2,1fr)}.cols{grid-template-columns:1fr}}
@media(max-width:760px){aside{width:100%;height:auto;inset:auto 0 0;z-index:20;padding:7px 5px env(safe-area-inset-bottom);background:#133f35}.brand,.sidefoot{display:none}nav{display:flex;overflow:auto;gap:2px;margin:0}nav button{flex:1;min-width:68px;text-align:center;padding:12px 5px;font-size:10px;border-radius:8px;white-space:nowrap}main{margin:0;padding:20px 14px 90px}header{align-items:flex-start;margin-bottom:20px}h1{font-size:25px}.sync{flex-direction:column;gap:6px;align-items:flex-end;font-size:10px}.sync button{padding:7px 10px;min-height:34px;font-size:11px}.sale-layout{grid-template-columns:1fr}.cart{position:static}.panel{padding:18px}.product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.product-card img{height:140px}.stats{gap:10px}.stat strong{font-size:23px}.toolbar{gap:8px}.toolbar button{font-size:12px}.cols{gap:16px}.row{flex-wrap:wrap}.row>*{min-width:100px}.barrow{grid-template-columns:80px 1fr 65px}}

/* Version 2: phone-first navigation, checkout and money ledger. */
.mobile-only,.mobile-cart{display:none}.login-eyebrow{display:block;margin:25px 0 12px}.login-footer{border-top:1px solid #e3e9df;margin-top:24px;padding-top:18px;font-size:10px;color:#82917f;text-align:center}.login #offlineUnlock{margin-top:10px}.login details{border-top:1px solid #e3e9df;padding-top:18px}.login summary{font-weight:600;font-size:13px}.login h1{font-size:29px}.welcome{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:0 0 24px}.welcome p{margin:8px 0 0}.money-strip{background:#e8eee0;border:1px solid #dce5d2;border-radius:15px;padding:20px 24px;display:flex;gap:24px;align-items:center;justify-content:space-between;margin-bottom:24px}.money-strip small{display:block;color:#63795e;font-size:11px;margin-bottom:8px}.money-strip strong{font-size:21px}.item-meta{display:flex;justify-content:space-between;font-size:11px;color:#718477;gap:10px;margin-top:8px}.item-meta strong{color:#203c35}.flow-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-bottom:20px}.flow-stats .panel{position:relative}.flow-stats small{display:block;font-size:12px;color:#778b78}.flow-stats strong{display:block;font-size:30px;margin-top:15px;letter-spacing:-1px}.flow-icon{float:right;display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#edf1e8;font-size:22px}.incoming{color:#287855;background:#e2f0e5}.outgoing{color:#b45b3c;background:#fbede5}.balance-note{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}.balance-note small{font-size:11px;color:#7a8a77;display:block;margin-bottom:8px}.balance-note b{font-size:18px}.supplier-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:14px}.supplier-grid>div{border:1px solid #e0e7da;border-radius:10px;padding:17px;display:grid;gap:12px}.purchase-total{background:#edf2e8;padding:14px;border-radius:9px;font-weight:650;color:#28513a}.more-menu{display:grid;gap:10px}.more-menu button{text-align:left}hr{border:0;border-top:1px solid #e5ebe0;margin:20px 0}.report-date{margin:0}td .badge{display:inline-block;margin:5px 0 0 8px}button{touch-action:manipulation}input,select{min-height:46px}dialog{overscroll-behavior:contain}
@media(max-width:1100px){.money-strip{flex-wrap:wrap;gap:18px}.money-strip>div{flex:1}.money-strip button{width:100%}.flow-stats strong{font-size:25px}}
@media(max-width:760px){.desktopnav{display:none!important}.mobile-only{display:flex!important}aside{padding:6px 5px calc(6px + env(safe-area-inset-bottom))}nav{display:grid;grid-template-columns:repeat(5,1fr);overflow:visible;gap:3px}nav button{min-width:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;padding:9px 2px;font-size:20px;min-height:53px}nav .navlabel{font-size:10px}main{padding-bottom:145px}input,select{font-size:16px}.toolbar input[type=search]{flex-basis:100%}.toolbar #category{max-width:none!important;flex:1}.product-card{padding:9px}.product-card h3{font-size:15px;margin-top:10px}.product-card img{height:155px}.product-card .price{font-size:14px}.welcome{margin-bottom:18px}.welcome .eyebrow{font-size:9px}.welcome p{font-size:12px}.welcome button{font-size:12px;padding:12px}.money-strip{padding:16px;gap:16px}.money-strip>div{min-width:80px}.money-strip small{font-size:10px}.money-strip strong{font-size:18px}.stats .panel{padding:17px}.stat small{font-size:10px}.flow-stats{grid-template-columns:1fr 1fr;gap:10px}.flow-stats>.panel:last-child{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:10px}.flow-stats>.panel:last-child strong{margin:0}.flow-stats strong{font-size:25px}.flow-icon{width:28px;height:28px;font-size:20px}.balance-note{flex-direction:column;align-items:stretch}.balance-note>div{display:flex;justify-content:space-between;gap:14px;align-items:center}.balance-note>span{display:none}.balance-note small{margin:0}.balance-note b{font-size:16px}.toolbar>button{flex:1}.cart{scroll-margin-top:15px}.mobile-cart:not([hidden]){display:block;position:fixed;bottom:calc(78px + env(safe-area-inset-bottom));left:14px;right:14px;z-index:15;box-shadow:0 6px 24px #123e3533;background:#d9edba;color:#123f35;border:1px solid #b8d391;min-height:48px}.cart .row{flex-wrap:nowrap}.cart .row>*{min-width:0}.cart label{font-size:12px}#toast{bottom:150px;width:max-content;text-align:center;font-size:13px}dialog{padding:20px}.photo-preview{height:180px}.flow-stats small{font-size:11px}.login{padding:26px}.table-wrap{margin:0 -6px}td,th{padding:13px 8px}.item-meta{font-size:12px}.supplier-grid{grid-template-columns:1fr}}
@media(max-width:380px){.product-card img{height:130px}.stat strong{font-size:21px}.money-strip strong{font-size:16px}.brandmark{width:40px;height:40px}.sync{max-width:135px}h1{font-size:23px}}
