:root{
  --green:#005230;--green-2:#063f2b;--green-3:#0b6b47;--orange:#fd8102;--orange-2:#e96f00;--white:#fff;--ink:#10231a;--muted:#6b7b73;--line:#e4ebe7;--soft:#f5f8f6;--danger:#c8372d;--info:#2674c8;--warning:#d56d00;--success:#0b7a4b;--shadow:0 10px 28px rgba(13,50,34,.08);--radius:18px
}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;background:#f3f7f5;color:var(--ink)}a{text-decoration:none;color:inherit}button,input,select,textarea{font:inherit}.muted{color:var(--muted)}.hidden{display:none!important}
.btn{border:0;border-radius:12px;padding:11px 16px;font-weight:800;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:9px;transition:.15s ease;background:#eaf0ed;color:var(--ink)}.btn:hover{transform:translateY(-1px)}.btn.primary{background:var(--orange);color:#fff}.btn.green{background:var(--green);color:#fff}.btn.danger{background:#fff1ef;color:var(--danger);border:1px solid #ffd8d2}.btn.ghost{background:#fff;border:1px solid var(--line)}.btn.sm{padding:8px 11px;border-radius:9px;font-size:13px}.btn.block{width:100%}.tag{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:6px 10px;font-size:12px;font-weight:800;background:#eef4f0;color:var(--green)}.tag.orange{background:#fff3e6;color:#c65d00}.tag.success{background:#e8f7ef;color:var(--success)}.tag.warning{background:#fff3e6;color:var(--warning)}.tag.danger{background:#fff0ee;color:var(--danger)}.tag.info{background:#eef5ff;color:var(--info)}
.alert{border-radius:12px;padding:12px 14px;margin:12px 0;font-weight:700}.alert.success{background:#eaf8f0;color:#086b42;border:1px solid #cceedd}.alert.danger{background:#fff0ee;color:#a62921;border:1px solid #ffd5cf}.alert.info{background:#eff6ff;color:#245a95;border:1px solid #d9e9ff}
/* install/login */
.install-page,.login-page{min-height:100vh;background:var(--green);padding:36px 18px;display:grid;place-items:center}.install-card,.login-card{width:min(840px,100%);background:#fff;border-radius:24px;padding:30px;box-shadow:0 18px 50px rgba(0,0,0,.18)}.login-card{width:min(460px,100%)}.install-logo,.login-logo{width:220px;max-width:75%;display:block;border-radius:10px;background:var(--green);margin-bottom:18px}.brand-kicker{font-weight:900;color:var(--orange);letter-spacing:.18em;font-size:12px}.install-card h1,.login-card h1{font-size:30px;margin:6px 0 8px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.form-grid h3{grid-column:1/-1;margin:12px 0 -2px;color:var(--green)}.form-grid label,.stack-form label{display:grid;gap:7px;font-size:13px;font-weight:800;color:#30463b}.form-grid input,.form-grid select,.form-grid textarea,.stack-form input,.stack-form select,.stack-form textarea,.field{width:100%;border:1px solid var(--line);border-radius:12px;padding:12px 13px;background:#fff;color:var(--ink);outline:none}.form-grid input:focus,.form-grid select:focus,.form-grid textarea:focus,.stack-form input:focus,.stack-form select:focus,.stack-form textarea:focus,.field:focus{border-color:var(--green);outline:2px solid rgba(0,82,48,.22);outline-offset:1px}.span-2{grid-column:1/-1}.check{display:flex!important;grid-template-columns:auto 1fr!important;align-items:center;gap:10px!important}.check input{width:auto!important}.stack-form{display:grid;gap:14px}
/* app shell */
.app{min-height:100vh;display:grid;grid-template-columns:254px 1fr}.sidebar{background:var(--green);color:#fff;position:sticky;top:0;height:100vh;padding:18px 14px;display:flex;flex-direction:column;z-index:30}.side-logo{height:62px;width:100%;object-fit:contain;object-position:left center;border-radius:10px}.side-name{font-size:11px;color:#bcd2c7;margin:8px 8px 16px;font-weight:800;letter-spacing:.14em}.nav{display:grid;gap:5px}.nav a{display:flex;align-items:center;gap:12px;color:#e9f3ee;padding:11px 12px;border-radius:11px;font-weight:700;font-size:14px}.nav a i{width:18px;text-align:center;font-size:15px}.nav a:hover,.nav a.active{background:#fff;color:var(--green)}.nav .badge{margin-left:auto;background:var(--orange);color:#fff;font-size:11px;border-radius:999px;min-width:21px;height:21px;display:grid;place-items:center;padding:0 6px}.side-bottom{margin-top:auto;display:grid;gap:6px;border-top:1px solid rgba(255,255,255,.14);padding-top:12px}
.main{min-width:0}.topbar{height:72px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:14px;padding:0 26px;position:sticky;top:0;z-index:20}.menu-toggle{display:none;background:none;border:0;font-size:22px;color:var(--green)}.top-title{font-weight:900}.top-spacer{flex:1}.quick-store{display:flex;align-items:center;gap:8px;border:1px solid var(--line);padding:8px 11px;border-radius:11px;font-size:13px;font-weight:800}.user-chip{display:flex;align-items:center;gap:10px}.avatar{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#eef4f0;color:var(--green);font-weight:900}.content{padding:26px;max-width:1500px;margin:0 auto}.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:22px}.page-head h1{margin:0 0 4px;font-size:28px}.page-actions{display:flex;gap:10px;flex-wrap:wrap}
.card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}.card-pad{padding:20px}.grid{display:grid;gap:18px}.stats-grid{grid-template-columns:repeat(5,minmax(0,1fr));margin-bottom:18px}.stat{padding:18px}.stat-top{display:flex;align-items:center;justify-content:space-between;gap:8px}.stat-icon{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;background:#eef5f1;color:var(--green);font-size:18px}.stat-icon.orange{background:#fff3e5;color:var(--orange)}.stat .value{font-size:24px;font-weight:950;margin:13px 0 2px}.stat .label{color:var(--muted);font-size:12px;font-weight:800}.dashboard-grid{grid-template-columns:1.25fr .95fr}.section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:15px}.section-title h2,.section-title h3{margin:0}.mini-label{font-size:12px;font-weight:800;color:var(--muted)}
.chart{height:230px;display:flex;align-items:flex-end;gap:14px;padding:18px 4px 0;border-bottom:1px solid var(--line)}.bar-wrap{flex:1;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:8px}.bar{width:min(34px,70%);background:var(--green);border-radius:8px 8px 2px 2px;min-height:4px}.bar-wrap:nth-child(even) .bar{background:var(--orange)}.bar-label{font-size:11px;color:var(--muted);font-weight:800}.table-wrap{overflow:auto}.table{width:100%;border-collapse:collapse}.table th,.table td{text-align:left;padding:13px 12px;border-bottom:1px solid var(--line);font-size:13px;white-space:nowrap}.table th{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}.table tr:last-child td{border-bottom:0}.product-thumb{width:46px;height:46px;border-radius:10px;background:#eef4f0;object-fit:cover}.empty{padding:42px 16px;text-align:center;color:var(--muted)}.empty i{font-size:42px;color:#c9d7cf;margin-bottom:10px}.split{display:grid;grid-template-columns:1fr 1fr;gap:18px}.store-tools{display:grid;grid-template-columns:1fr auto;gap:16px;align-items:center}.store-link{padding:12px 13px;background:var(--soft);border-radius:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.qr-box{width:150px;text-align:center}.qr-box img{width:130px;height:130px;border:8px solid #fff;box-shadow:0 0 0 1px var(--line);border-radius:10px}
/* modal/form */
.modal{position:fixed;inset:0;background:rgba(3,28,18,.46);z-index:100;display:none;align-items:center;justify-content:center;padding:18px}.modal.open{display:flex}.modal-card{background:#fff;border-radius:20px;width:min(680px,100%);max-height:90vh;overflow:auto;padding:22px}.modal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.icon-btn{width:38px;height:38px;border:1px solid var(--line);border-radius:10px;background:#fff;display:grid;place-items:center;cursor:pointer}.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:4px}
/* public store */
.store-body{background:#f3f7f5;min-height:100vh}.store-header{background:var(--green);color:#fff;padding:18px 20px;position:sticky;top:0;z-index:20;border-bottom:4px solid var(--orange)}.store-header-inner{max-width:1200px;margin:auto;display:flex;align-items:center;gap:14px}.merchant-logo{width:54px;height:54px;border-radius:15px;background:#fff;object-fit:cover;padding:4px}.merchant-mark{width:54px;height:54px;border-radius:15px;background:#fff;color:var(--green);display:grid;place-items:center;font-weight:950;font-size:20px}.merchant-info h1{font-size:19px;margin:0 0 2px}.merchant-info p{margin:0;color:#d7e6de;font-size:12px}.store-actions{margin-left:auto;display:flex;gap:9px}.store-action{width:42px;height:42px;border:1px solid rgba(255,255,255,.25);border-radius:12px;display:grid;place-items:center;color:#fff;background:rgba(255,255,255,.06);position:relative}.cart-count{position:absolute;top:-6px;right:-6px;background:var(--orange);color:#fff;border-radius:999px;min-width:21px;height:21px;font-size:11px;font-weight:900;display:grid;place-items:center;padding:0 5px}.store-main{max-width:1200px;margin:0 auto;padding:24px 18px 90px}.hero-store{background:#fff;border:1px solid var(--line);border-radius:22px;padding:20px;display:grid;grid-template-columns:1.15fr .85fr;gap:16px;align-items:center;margin-bottom:18px}.hero-store h2{font-size:32px;margin:0 0 9px}.hero-store p{color:var(--muted);line-height:1.6}.hero-visual{background:var(--green);border-radius:18px;padding:22px;color:#fff;display:grid;gap:10px}.hero-visual .big{font-size:32px;font-weight:950}.hero-visual .orange{color:var(--orange)}.search-row{display:grid;grid-template-columns:1fr auto;gap:10px;margin:18px 0}.search-box{background:#fff;border:1px solid var(--line);border-radius:14px;display:flex;align-items:center;padding:0 14px;gap:10px}.search-box input{border:0;outline:0;background:transparent;padding:13px 0;width:100%}.categories{display:flex;gap:8px;overflow:auto;padding-bottom:5px;margin-bottom:18px}.cat-chip{border:1px solid var(--line);background:#fff;border-radius:999px;padding:8px 13px;font-size:13px;font-weight:800;white-space:nowrap;cursor:pointer}.cat-chip.active{background:var(--green);color:#fff;border-color:var(--green)}.products-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.product-card{background:#fff;border:1px solid var(--line);border-radius:18px;overflow:hidden;display:flex;flex-direction:column}.product-image{height:190px;background:#eef3f0;display:grid;place-items:center;overflow:hidden}.product-image img{width:100%;height:100%;object-fit:cover}.product-image i{font-size:42px;color:#a5b9ae}.product-body{padding:15px;display:flex;flex-direction:column;gap:9px;flex:1}.product-name{font-weight:900;font-size:15px}.product-desc{font-size:12px;color:var(--muted);line-height:1.45;min-height:34px}.product-price{font-size:18px;color:var(--orange);font-weight:950}.product-meta{display:flex;align-items:center;justify-content:space-between;gap:8px}.stock{font-size:11px;color:var(--muted);font-weight:800}.add-cart{width:38px;height:38px;border:0;border-radius:11px;background:var(--green);color:#fff;cursor:pointer;font-size:16px}.add-cart[disabled]{background:#b8c7bf;cursor:not-allowed}.powered{display:flex;align-items:center;justify-content:center;gap:8px;color:var(--muted);font-size:11px;margin-top:30px}.powered img{height:30px;width:auto;border-radius:4px;background:var(--green)}
.cart-drawer{position:fixed;top:0;right:-460px;width:min(430px,100%);height:100vh;background:#fff;z-index:110;box-shadow:-18px 0 45px rgba(0,0,0,.14);transition:.22s ease;display:flex;flex-direction:column}.cart-drawer.open{right:0}.drawer-head{padding:19px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}.drawer-body{padding:16px;overflow:auto;flex:1}.cart-item{display:grid;grid-template-columns:1fr auto;gap:10px;padding:12px 0;border-bottom:1px solid var(--line)}.qty{display:flex;align-items:center;gap:8px}.qty button{width:30px;height:30px;border:1px solid var(--line);background:#fff;border-radius:8px}.drawer-foot{padding:16px;border-top:1px solid var(--line);display:grid;gap:10px}.totals{display:grid;gap:7px}.total-row{display:flex;justify-content:space-between}.total-row.big{font-size:18px;font-weight:950}.drawer-overlay{position:fixed;inset:0;background:rgba(3,28,18,.4);z-index:105;display:none}.drawer-overlay.open{display:block}.checkout-form{display:grid;gap:12px}.checkout-form label{display:grid;gap:6px;font-size:12px;font-weight:800}.checkout-form input,.checkout-form textarea,.checkout-form select{border:1px solid var(--line);border-radius:11px;padding:11px 12px;outline:none}.order-success{background:#eaf8f0;border:1px solid #cceedd;color:#086b42;border-radius:14px;padding:14px;margin-bottom:16px}
/* receipt */
.receipt{width:80mm;margin:20px auto;background:#fff;padding:8mm;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:#111}.receipt h1{text-align:center;font-size:20px}.receipt .center{text-align:center}.receipt hr{border:0;border-top:1px dashed #888}.receipt table{width:100%;border-collapse:collapse;font-size:12px}.receipt td{padding:4px 0}.receipt .right{text-align:right}.no-print{max-width:80mm;margin:20px auto;display:flex;gap:8px;justify-content:center}
@media(max-width:1150px){.stats-grid{grid-template-columns:repeat(3,1fr)}.products-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:900px){.app{grid-template-columns:1fr}.sidebar{position:fixed;left:-270px;width:254px;transition:.2s}.sidebar.open{left:0}.menu-toggle{display:block}.topbar{padding:0 16px}.content{padding:18px}.dashboard-grid,.split{grid-template-columns:1fr}.stats-grid{grid-template-columns:repeat(2,1fr)}.quick-store span{display:none}.hero-store{grid-template-columns:1fr}.products-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:620px){.form-grid{grid-template-columns:1fr}.span-2,.form-grid h3{grid-column:1}.install-card{padding:20px}.stats-grid{grid-template-columns:1fr 1fr}.stat{padding:14px}.stat .value{font-size:19px}.page-head{align-items:flex-start;flex-direction:column}.products-grid{grid-template-columns:1fr 1fr;gap:10px}.product-image{height:140px}.product-body{padding:12px}.hero-store h2{font-size:25px}.store-header{padding:12px}.merchant-logo,.merchant-mark{width:45px;height:45px}.store-actions{gap:6px}.store-action{width:39px;height:39px}.content{padding:14px}.card-pad{padding:15px}}
@media(max-width:420px){.stats-grid{grid-template-columns:1fr}.products-grid{grid-template-columns:1fr 1fr}.product-image{height:122px}.product-desc{display:none}.store-main{padding-left:10px;padding-right:10px}.hero-store{padding:15px}.top-title{font-size:14px}.user-chip .user-text{display:none}}
@media print{.no-print{display:none}.receipt{margin:0;width:80mm;box-shadow:none}}
.side-bottom a{display:flex;align-items:center;gap:12px;color:#e9f3ee;padding:10px 12px;border-radius:10px;font-weight:700;font-size:14px}.side-bottom a:hover{background:rgba(255,255,255,.1)}
.plan-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:1050px){.plan-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.plan-grid{grid-template-columns:1fr}}
