/* Haatly — one stylesheet for landing, seller panel and storefront. */
:root {
  --green: #0F3D2E;
  --green-2: #1C5A45;
  --ink: #14201B;
  --muted: #4F5B55;
  --line: #D5D9D2;
  --soft: #F1F2EE;
  --paper: #F7F5EF;
  --white: #FFFFFF;
  --accent: #F2A33A;
  --on-accent: #14201B;
  --wa: #1A7F4B;
  --danger: #B3261E;
  --r: 14px;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'DM Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--paper); font-size: 16px; line-height: 1.5; }
h1, h2 { font-family: var(--display); line-height: 1.15; margin: 0 0 8px; letter-spacing: -0.3px; }
h1 { font-size: 28px; font-weight: 800; }
h2 { font-size: 18px; font-weight: 700; font-family: var(--body); letter-spacing: 0; }
p { margin: 0 0 12px; }
a { color: var(--green); font-weight: 500; }
a:hover { color: #0A2A20; }
img { max-width: 100%; display: block; }
small { font-size: 13px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.pad { padding: 24px 16px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; word-break: break-all; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { flex: none; }
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.wrap-gap { flex-wrap: wrap; gap: 8px; }
.grow { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--white); color: var(--ink); font: 700 15px/1 var(--body); text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.btn.primary:hover { filter: brightness(0.95); }
.btn.wa { background: var(--wa); color: #fff; border-color: transparent; }
.btn.wa:hover { background: #136a3e; color: #fff; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); }
.btn.ghost-light { background: transparent; color: var(--paper); border-color: rgba(247,245,239,.5); }
.btn.ghost-light:hover { border-color: var(--paper); color: var(--paper); }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn.lg { min-height: 56px; font-size: 17px; padding: 0 24px; border-radius: 16px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .6; cursor: wait; }
.link-btn { background: none; border: 0; color: var(--muted); font: 500 15px var(--body); display: inline-flex; gap: 8px; align-items: center; cursor: pointer; padding: 10px 0; min-height: 44px; }
.link-btn:hover { color: var(--ink); }

/* Forms */
.form { display: flex; flex-direction: column; gap: 16px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; }
input, select, textarea {
  font: 400 16px var(--body); color: var(--ink); background: var(--white);
  border: 1.5px solid var(--line); border-radius: var(--r); padding: 12px 14px; min-height: 50px; width: 100%;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(15,61,46,.15); }
input::placeholder, textarea::placeholder { color: #7A8580; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.check { flex-direction: row !important; align-items: center; font-weight: 400 !important; gap: 8px; }
.check input { width: 20px; min-height: 20px; height: 20px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.prefix-input { display: flex; align-items: stretch; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--white); overflow: hidden; }
.prefix-input span { padding: 0 0 0 14px; display: flex; align-items: center; color: var(--muted); font-weight: 400; font-size: 14px; white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; direction: rtl; }
.prefix-input input { border: 0; padding-left: 2px; min-width: 0; }
.switch-row { flex-direction: row !important; justify-content: space-between; align-items: center; background: var(--soft); border-radius: var(--r); padding: 12px 16px; }
.switch-row > span { display: flex; flex-direction: column; font-weight: 400; }
.switch { appearance: none; -webkit-appearance: none; width: 52px !important; min-height: 32px !important; height: 32px; border-radius: 16px; background: #B9C1BC; border: 0; padding: 0; position: relative; cursor: pointer; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch:checked { background: var(--green); }
.switch:checked::after { transform: translateX(20px); }
.swatches { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.swatches legend { font-size: 14px; font-weight: 700; margin-bottom: 8px; padding: 0; }
.swatch { width: 44px; height: 44px; border-radius: 50%; background: var(--c); cursor: pointer; position: relative; flex-direction: row !important; }
.swatch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; min-height: 0; cursor: pointer; }
.swatch:has(input:checked) { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--ink); }
.swatch:has(input:focus-visible) { outline: 3px solid var(--green); outline-offset: 4px; }

/* Flash + badges */
.flash { padding: 12px 16px; border-radius: 12px; margin: 0 0 16px; font-weight: 500; }
.flash.ok { background: #E1F0E6; color: #0F3D2E; }
.flash.err { background: #FBE4E1; color: #8A1C14; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 8px; white-space: nowrap; }
.s-new { background: #FDEBCB; color: #6E4300; }
.s-confirmed { background: #E0ECF8; color: #1D4F86; }
.s-shipped { background: #ECE3F7; color: #4E2A84; }
.s-delivered { background: #E1F0E6; color: #0F3D2E; }
.s-cancelled { background: #F1F2EE; color: #4F5B55; }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 22px var(--display); color: var(--ink); text-decoration: none; letter-spacing: -0.4px; }
.brand.light, .brand.light:hover { color: var(--paper); }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: var(--green); display: inline-flex; align-items: center; justify-content: center; }

/* Landing */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.land-top { background: var(--green); color: var(--paper); padding: 20px 0 72px; }
.hero { padding-top: 64px; max-width: 720px; margin-left: max(0px, calc((100% - 1080px) / 2)); }
.hero h1 { font-size: clamp(38px, 7vw, 64px); letter-spacing: -1.5px; margin-bottom: 16px; }
.hero p { font-size: 18px; color: #C9D6CF; max-width: 560px; margin-bottom: 28px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: -40px; }
.feature { background: var(--white); border-radius: 20px; padding: 24px; box-shadow: 0 6px 20px rgba(15,61,46,.08); }
.feature p { color: var(--muted); margin: 0; }
.feat-ic { width: 44px; height: 44px; border-radius: 12px; background: #E1F0E6; color: var(--green); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.land-foot { padding: 40px 20px; color: var(--muted); font-size: 14px; }

/* Auth */
.auth { min-height: 100vh; display: flex; flex-direction: column; background: var(--green); }
.auth-hero { padding: 28px 24px 32px; max-width: 480px; width: 100%; margin: 0 auto; }
.auth-card { background: var(--paper); flex: 1; border-radius: 28px 28px 0 0; padding: 28px 24px 40px; width: 100%; max-width: 480px; margin: 0 auto; }
@media (min-width: 600px) { .auth { justify-content: center; padding: 40px 16px; } .auth-card { flex: none; border-radius: 28px; } .auth-hero { padding: 0 8px 20px; } }

/* Seller app shell */
.app { display: flex; flex-wrap: wrap; min-height: 100vh; }
.side { flex: 1 1 220px; max-width: 260px; background: var(--white); border-right: 1px solid #E4E6E0; padding: 20px 16px; display: flex; flex-direction: column; gap: 24px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: 44px; border-radius: 12px; text-decoration: none; color: var(--muted); font-weight: 500; }
.nav a:hover { background: var(--soft); color: var(--ink); }
.nav a.on { background: #E1F0E6; color: var(--green); font-weight: 700; }
.side-logout { margin-top: auto; }
.main { flex: 999 1 560px; min-width: 0; padding: 28px clamp(16px, 4vw, 40px) 100px; max-width: 1100px; display: flex; flex-direction: column; gap: 20px; }
.main > h1 { margin: 0; }
@media (max-width: 760px) {
  .app { flex-direction: column; flex-wrap: nowrap; }
  .side { max-width: none; flex: none; padding: 0; border: 0; position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; border-top: 1px solid #E4E6E0; gap: 0; }
  .side .brand, .side-logout { display: none; }
  .nav { flex-direction: row; }
  .nav a { flex: 1; flex-direction: column; gap: 2px; font-size: 11px; padding: 8px 2px; border-radius: 0; min-height: 60px; justify-content: center; }
  .nav a.on { background: transparent; }
  .main { padding-top: 20px; }
}
.back { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--muted); min-height: 44px; }

.card { background: var(--white); border-radius: 20px; padding: 20px; box-shadow: 0 2px 10px rgba(15,61,46,.05); }
.card.narrow { max-width: 560px; }
.card.empty { text-align: left; }
.hello p { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat { background: var(--white); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.stat span { font-size: 13px; color: var(--muted); }
.stat b { font: 800 26px var(--display); }
.share { display: flex; flex-direction: column; gap: 12px; }
.share p { margin: 0; }

.list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.list-item { display: flex; align-items: center; gap: 12px; background: var(--white); border-radius: 16px; padding: 12px 16px; text-decoration: none; color: var(--ink); }
.list-item:hover { color: var(--ink); box-shadow: 0 0 0 2px var(--line); }
.list-item small { color: var(--muted); font-weight: 400; }
.avatar { width: 44px; height: 44px; border-radius: 12px; background: #E1F0E6; color: var(--green); display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

/* Products (seller) */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.prod-card { background: var(--white); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; }
.prod-card.oos .prod-img { opacity: .5; }
.prod-img { aspect-ratio: 1; background: var(--soft); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.prod-img img { width: 100%; height: 100%; object-fit: cover; }
.prod-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.prod-body h2 { font-size: 16px; margin: 0; }
.prod-body p { margin: 0; display: flex; gap: 8px; }
.photo-pick { display: flex; flex-direction: column; gap: 8px; }
.photo-drop { position: relative; width: 160px; height: 160px; border-radius: 18px; border: 2px dashed #9AA7A0; background: var(--soft); cursor: pointer; overflow: hidden; display: block !important; }
.photo-drop input, .logo-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 0; height: 100%; }
.photo-drop:focus-within, .logo-drop:focus-within { outline: 3px solid var(--green); outline-offset: 2px; }
.photo-preview { position: absolute; inset: 0; background: center/cover no-repeat; pointer-events: none; }
.photo-hint { position: absolute; left: 8px; right: 8px; bottom: 8px; background: rgba(255,255,255,.92); border-radius: 10px; padding: 6px 8px; font-size: 13px; display: flex; align-items: center; gap: 6px; justify-content: center; pointer-events: none; }
.logo-row { display: flex; align-items: center; gap: 16px; }
.logo-row > div { display: flex; flex-direction: column; gap: 2px; }
.logo-drop { position: relative; width: 80px; height: 80px; border-radius: 20px; overflow: hidden; cursor: pointer; display: block !important; flex: none; }
.logo-preview { position: absolute; inset: 0; background: var(--accent) center/cover no-repeat; color: var(--on-accent); font: 800 32px var(--display); display: flex; align-items: center; justify-content: center; pointer-events: none; }

/* Orders */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.tabs a { white-space: nowrap; padding: 8px 14px; min-height: 40px; display: inline-flex; align-items: center; gap: 6px; border-radius: 20px; background: var(--white); text-decoration: none; color: var(--ink); font-size: 14px; }
.tabs a small { color: var(--muted); }
.tabs a.on { background: var(--green); color: var(--paper); }
.tabs a.on small { color: #C9D6CF; }
.orders { display: flex; flex-direction: column; gap: 14px; }
.order { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 20px; }
.order:target { box-shadow: 0 0 0 3px var(--accent); }
.order h2 { margin: 0; }
.items { width: 100%; border-collapse: collapse; font-size: 15px; }
.items td { padding: 6px 0; border-bottom: 1px solid #ECEEE8; }
.items .tot td { font-weight: 700; border-bottom: 0; }
.num { text-align: right; white-space: nowrap; }
.cust { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0; font-size: 15px; }
.cust dt { color: var(--muted); }
.cust dd { margin: 0; }
.order select { width: auto; min-height: 40px; padding: 6px 10px; }
.pager { display: flex; gap: 6px; flex-wrap: wrap; }
.pager a { min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--white); text-decoration: none; }
.pager a.on { background: var(--green); color: var(--paper); }

/* Storefront */
.shop { max-width: 960px; margin: 0 auto; background: var(--white); min-height: 100vh; }
body:has(.shop) { background: var(--soft); }
.shop-top { background: var(--green); height: 120px; }
.shop-top-inner { padding: 16px 20px; text-align: right; }
.shop-host { font-size: 12px; color: #C9D6CF; }
.shop-head { padding: 0 20px; margin-top: -40px; }
.shop-head h1 { font-size: 26px; margin: 8px 0 4px; }
.shop-logo { width: 80px; height: 80px; border-radius: 22px; border: 4px solid var(--white); background: var(--accent) center/cover no-repeat; color: var(--on-accent); display: flex; align-items: center; justify-content: center; font: 800 32px var(--display); }
.shop-search { padding: 16px 20px 8px; }
.shop-search input { background: var(--soft); border-color: transparent; }
.shop-grid { padding: 8px 20px 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px 14px; }
.item { display: flex; flex-direction: column; gap: 6px; }
.item[hidden] { display: none; }
.item-img { position: relative; aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden; background: var(--soft); border: 0; padding: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.item-img img { width: 100%; height: 100%; object-fit: cover; }
.item.oos .item-img img { opacity: .5; }
.oos-tag { position: absolute; left: 8px; top: 8px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 8px; }
.item h2 { font-size: 15px; font-weight: 500; margin: 0; }
.price { margin: 0; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price s { font-size: 13px; color: #6A746F; }
.off { font-size: 12px; font-weight: 700; color: var(--wa); }
.btn.add { width: 100%; border-color: var(--green); color: var(--green); }
.stepper { display: flex; align-items: center; justify-content: space-between; border-radius: 12px; background: var(--green); color: #fff; min-height: 44px; min-width: 112px; }
.stepper button { background: none; border: 0; color: #fff; font: 700 20px var(--body); width: 44px; height: 44px; cursor: pointer; }
.stepper span { font-weight: 700; }
.cartbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; width: min(928px, calc(100% - 32px)); background: var(--green); color: var(--paper); border-radius: 18px; padding: 8px 8px 8px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; box-shadow: 0 8px 24px rgba(15,61,46,.3); z-index: 10; }
.cartbar[hidden] { display: none; }
body.has-cart .shop { padding-bottom: 90px; }

/* Bottom sheets */
.sheet { border: 0; padding: 24px 20px 28px; width: min(560px, 100%); max-height: 92vh; border-radius: 24px 24px 0 0; margin: auto auto 0; overflow-y: auto; color: var(--ink); background: var(--white); }
.sheet::backdrop { background: rgba(20,32,27,.55); }
@media (min-width: 640px) { .sheet { border-radius: 24px; margin: auto; } }
.sheet h2 { font: 800 22px var(--display); padding-right: 40px; }
.sheet .x { position: absolute; right: 12px; top: 12px; width: 44px; height: 44px; border-radius: 22px; border: 0; background: var(--soft); font-size: 24px; cursor: pointer; color: var(--ink); }
.sheet form[method=dialog] { margin: 0; }
.sheet > form[method=dialog] .btn { margin-top: 10px; }
.pd-img img { width: 100%; max-height: 50vh; object-fit: contain; border-radius: 16px; background: var(--soft); margin-bottom: 14px; }
.co-items { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.co-row { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid #ECEEE8; }
.co-row .num { min-width: 70px; font-weight: 700; }
.co-total { display: flex; justify-content: space-between; font-size: 18px; margin: 4px 0 16px; }

/* ---- v2: options, plans, owner ---- */
@media (max-width: 760px) { .nav a.hide-m { display: none; } }
.upsell { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; background: #FFF6E6; }
.upsell p { margin: 0; }
.options { border: 1.5px solid var(--line); border-radius: var(--r); padding: 14px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.options legend { font-size: 14px; font-weight: 700; padding: 0 6px; }
.options p { margin: 0; }
.opt-head, .opt-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 56px 44px; gap: 8px; align-items: center; }
.opt-head { font-size: 12px; color: var(--muted); font-weight: 700; }
#optRows { display: flex; flex-direction: column; gap: 8px; }
#optRows:empty + template + .row { margin-top: 0; }
.opt-row input:not(.switch) { min-height: 44px; padding: 8px 10px; }
.opt-del { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--soft); font-size: 22px; cursor: pointer; color: var(--muted); }
.opt-del:hover { color: var(--danger); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; }
.chips:empty { display: none; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1.5px solid var(--line); background: var(--white); color: var(--ink); font: 500 15px var(--body); cursor: pointer; }
.chip.on { border-color: var(--green); background: var(--green); color: #fff; }
.chip.oos { text-decoration: line-through; color: #8A938E; cursor: not-allowed; }
.co-row small { display: block; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.plan-card { display: flex; flex-direction: column; gap: 4px; }
.plan-card.pro { box-shadow: 0 0 0 2px var(--accent); }
.plan-price { font: 800 32px var(--display); margin: 0; }
.plan-price small { font: 400 15px var(--body); color: var(--muted); }
.plan-price.sm { font-size: 20px; }
.plan-now p { margin: 0; }
.ticks { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.ticks li { padding-left: 26px; position: relative; }
.ticks li::before { content: ''; position: absolute; left: 4px; top: 5px; width: 12px; height: 7px; border-left: 2.5px solid var(--wa); border-bottom: 2.5px solid var(--wa); transform: rotate(-45deg); }
.period { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 8px 0 16px; }
.period-opt { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); border-radius: var(--r); padding: 12px; cursor: pointer; }
.period-opt:has(input:checked) { border-color: var(--green); background: #E1F0E6; }
.period-opt input { width: 20px; height: 20px; min-height: 0; accent-color: var(--green); }
.period-opt span { display: flex; flex-direction: column; }
.steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 18px; }
.steps li { padding-left: 4px; }
.steps li > * { display: flex; margin-top: 6px; }
.steps li > b { margin-top: 0; }
.steps li > .btn { display: inline-flex; }
.qr { width: 200px; max-width: 100%; border-radius: 12px; border: 1px solid var(--line); }
.dot { background: var(--accent); color: var(--on-accent) !important; border-radius: 10px; padding: 0 7px; font-weight: 700; }
.stat small, .stat a { font-size: 13px; }
.search-row input { flex: 1; min-width: 0; }
.store-row h2 a { color: var(--ink); text-decoration: none; }
.store-row h2 a:hover { text-decoration: underline; }
.store-row p { margin: 0; }
.store-row select { width: auto; min-height: 40px; padding: 6px 10px; }
.qr-preview { background-color: var(--soft); color: var(--muted); font-size: 18px; }

/* ---- Owner panel ---- */
.owner-app .side { background: var(--green); border-color: var(--green); color: var(--paper); }
.owner-app .nav a { color: #C9D6CF; }
.owner-app .nav a:hover { background: var(--green-2); color: #fff; }
.owner-app .nav a.on { background: var(--paper); color: var(--green); }
.owner-app .link-btn { color: #C9D6CF; }
.owner-app .link-btn:hover { color: #fff; }
.owner-who { font-size: 13px; color: #C9D6CF; margin: 0; word-break: break-all; }
.owner-app .brand-mark, .owner-auth .brand-mark { background: var(--paper); color: var(--green); }
@media (max-width: 760px) {
  .owner-app .side { border-top: 0; }
  .owner-app .nav a.on { background: transparent; color: #fff; }
  .owner-app .main { padding-bottom: 100px; }
}
.m-only { display: none; }
@media (max-width: 760px) {
  .m-only { display: flex; }
  .m-bar { justify-content: space-between; align-items: center; gap: 12px; margin: -8px 0 -8px; }
}

/* ---- Customer accounts ---- */
.shop-top-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.acct-link { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 20px; background: var(--green-2); color: var(--paper); text-decoration: none; font-size: 14px; }
.acct-link:hover { color: #fff; background: #246b53; }
.shop-flash { margin: 12px 20px 0; position: relative; z-index: 1; }
.co-acct { background: var(--soft); border-radius: 12px; padding: 10px 12px; margin: 0 0 14px; }
.cust-top { background: var(--green); color: var(--paper); padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.cust-top b { font-size: 18px; }
.back.light { color: #C9D6CF; }
.back.light:hover { color: #fff; }
.shop-logo.sm { width: 40px; height: 40px; border-radius: 12px; border-width: 2px; font-size: 18px; }
.cust-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; max-width: 560px; }
.cust-body h1 { margin: 0; }
.tabs.sub a { min-height: 36px; font-size: 13px; }
.cust-row { flex-wrap: wrap; }

[hidden] { display: none !important; }

/* ---- Email codes ---- */
.code-input { font-size: 26px !important; letter-spacing: 10px; font-weight: 700; text-align: center; }
.otp-resend { margin-top: -4px; }
.otp-resend .link-btn { padding: 0; }

/* ---- Quantity discount editor ---- */
.tier-head, .tier-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px; align-items: center; }
.tier-head { font-size: 12px; color: var(--muted); font-weight: 700; }
.tier-row input { min-height: 44px; padding: 8px 10px; }
.tier-pct { display: flex; align-items: center; gap: 6px; }
.tier-pct span { color: var(--muted); font-weight: 700; }
.domain-row input { flex: 1; min-width: 180px; min-height: 40px; padding: 6px 10px; }
.plan-card.current { box-shadow: 0 0 0 3px var(--green); }

/* ---- Quantity discounts, catalogue mode, estimates ---- */
.bulk-tag { margin: 0; font-size: 12px; font-weight: 700; color: var(--wa); }
.tiers { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; }
.tiers:empty { display: none; }
.tier-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tier-chip { font-size: 13px; padding: 4px 10px; border-radius: 14px; background: #E1F0E6; color: var(--green); }
.tier-chip.on { background: var(--green); color: #fff; font-weight: 700; }
.stepper input { width: 52px; min-height: 36px; height: 36px; padding: 0 4px; border: 0; border-radius: 8px; text-align: center; font-weight: 700; background: rgba(255,255,255,.15); color: #fff; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
body.catalog #pdPrice, body.catalog .co-total, body.catalog .cartbar .amt { display: none; }
.done-actions { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 12px; }
.est-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tier-type { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tier-unit { white-space: nowrap; }

/* ---- Order editor ---- */
.edit-table { display: flex; flex-direction: column; gap: 8px; }
.edit-head, .edit-row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, .8fr) minmax(0, 1.1fr) minmax(0, 1fr) 56px; gap: 8px; align-items: center; }
.edit-head { font-size: 12px; color: var(--muted); font-weight: 700; }
.edit-row input { min-height: 44px; padding: 8px 10px; }
.edit-row > span:first-child { display: flex; flex-direction: column; gap: 2px; }
.edit-row.removed { opacity: .45; }
.edit-row.removed input:not([type=checkbox]) { text-decoration: line-through; }
.add-row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, .8fr) minmax(0, 1fr); gap: 8px; }
.add-row select, .add-row input { min-height: 44px; padding: 8px 10px; }
@media (max-width: 640px) {
  .edit-head { display: none; }
  .edit-row { grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--soft); padding: 10px; border-radius: 12px; }
  .edit-row > span:first-child { grid-column: 1 / -1; }
  .add-row { grid-template-columns: 1fr 1fr; }
  .add-row select { grid-column: 1 / -1; }
}

/* ---- Catalogue & QR ---- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.cat-qr, .cat-pdf { display: flex; flex-direction: column; gap: 12px; }
.qr-box { align-self: center; background: #fff; border-radius: 16px; padding: 8px; box-shadow: 0 0 0 1px var(--line); }
.qr-box svg { display: block; width: 240px; height: 240px; max-width: 100%; }

/* ---- v3: options with stock, categories, inventory, reports ---- */
.opt5 { grid-template-columns: minmax(0, 1.3fr) minmax(0, .9fr) minmax(0, .8fr) 56px 44px !important; }
.req { color: var(--danger); font-weight: 700; font-size: 12px; }
.cat-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 20px 8px; }
.cat-chips button { white-space: nowrap; min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1.5px solid var(--line); background: var(--white); font: 500 14px var(--body); color: var(--ink); cursor: pointer; }
.cat-chips button.on { background: var(--green); border-color: var(--green); color: #fff; }
.cat-title { grid-column: 1 / -1; margin: 10px 0 -4px; font-size: 18px; }
.stock-low { color: var(--danger); font-weight: 700; }
.inv-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.inv-table th { text-align: left; font-size: 12px; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--line); }
.inv-table td { padding: 8px; border-bottom: 1px solid #ECEEE8; vertical-align: middle; }
.inv-table input { width: 110px; min-height: 40px; padding: 6px 10px; }
.table-wrap { overflow-x: auto; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 180px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.bars .bar { flex: 1; background: #2E7D5B; border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.bars .bar:hover { background: var(--green); }
.bar-labels { display: flex; gap: 4px; font-size: 11px; color: var(--muted); }
.bar-labels span { flex: 1; text-align: center; overflow: hidden; white-space: nowrap; }
.range-tabs { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toggle-form { display: inline-flex; }
.chip-btn { min-height: 36px; padding: 0 12px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--white); font: 600 13px var(--body); cursor: pointer; color: var(--muted); }
.chip-btn.on { background: #E1F0E6; border-color: var(--wa); color: var(--green); }
.price-note { margin: 4px 20px 8px; }
.price-modes { border: 1.5px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin: 0; display: flex; flex-direction: column; gap: 8px; } .price-modes legend { font-size: 14px; font-weight: 700; padding: 0 6px; }
.log { white-space: pre-wrap; word-break: break-all; font-size: 12px; background: var(--soft); padding: 12px; border-radius: 10px; max-height: 480px; overflow: auto; margin: 0; }

/* ---- Installable app ---- */
.top-actions { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
button.acct-link { border: 0; font: 500 14px var(--body); cursor: pointer; }
.install-hint { margin: 10px 20px 0; padding: 10px 12px; border-radius: 12px; background: var(--soft); font-size: 14px; position: relative; z-index: 1; }
.install-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border: 1.5px dashed var(--line); }
.install-card > div { flex: 1 1 260px; }
.install-hint-inline { margin: 6px 0 0; color: var(--ink); }

/* ---- Store design picker (seller settings) ---- */
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; border: 0; padding: 0; margin: 0; }
.themes legend { font-weight: 700; margin-bottom: 8px; display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.theme-opt { display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: 16px; border: 1.5px solid var(--line); cursor: pointer; position: relative; }
.theme-opt input { position: absolute; opacity: 0; pointer-events: none; }
.theme-opt:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.theme-opt:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.theme-opt.locked { cursor: not-allowed; opacity: .6; }
.theme-name { display: flex; flex-direction: column; font-size: 14px; line-height: 1.3; }
.theme-name .ic { width: 14px; height: 14px; vertical-align: -2px; }
.tp { display: block; height: 84px; border-radius: 10px; overflow: hidden; background: #fff; border: 1px solid #E4E6E0; }
.tp i { display: block; font-style: normal; }
.tp-top { height: 24px; background: #0F3D2E; }
.tp .tp-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 6px; }
.tp-tiles i { height: 22px; border-radius: 5px; background: #E6E8E2; }
.tp-pop .tp-top { background: var(--accent); }
.tp-minimal .tp-top { background: #fff; border-bottom: 1px solid #E4E6E0; }
.tp-minimal .tp-tiles i { border-radius: 1px; }
.tp-dark { background: #121A17; border-color: #121A17; }
.tp-dark .tp-top { background: #0B1310; }
.tp-dark .tp-tiles i { background: #2A3631; }
.tp.tp-list .tp-tiles { grid-template-columns: 1fr; gap: 4px; }
.tp-list .tp-tiles i { height: 10px; border-radius: 3px; border-left: 14px solid #C9CDC5; }

/* ==== Storefront look (v3.5) — shared by all store designs ==== */
body:has(.shop) { background: #E9ECE6; }
.shop { --shop-bg: #F4F5F1; --card-shadow: 0 1px 2px rgba(20,32,27,.05), 0 6px 18px rgba(20,32,27,.07); background: var(--shop-bg); box-shadow: 0 0 40px rgba(20,32,27,.06); }
.shop-top { height: 148px; position: relative; overflow: hidden;
  background: var(--green);
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--accent) 38%, transparent) 0%, transparent 60%), linear-gradient(160deg, var(--green) 0%, var(--green-2) 100%); }
.shop-top::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .12;
  background-image: radial-gradient(rgba(255,255,255,.9) 1px, transparent 1.5px); background-size: 18px 18px; }
.shop-top-inner { position: relative; z-index: 1; }
.shop-head { position: relative; z-index: 2; margin: -64px 16px 0; padding: 16px; background: var(--white); border-radius: 22px; box-shadow: 0 10px 34px rgba(20,32,27,.13);
  display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; align-items: center; }
.shop-head .shop-logo { width: 68px; height: 68px; border-radius: 20px; border: 0; box-shadow: 0 4px 14px rgba(20,32,27,.18); font-size: 28px; }
.shop-id { min-width: 0; }
.shop-id h1 { font-size: 22px; margin: 0 0 4px; overflow-wrap: anywhere; }
.shop-cat { display: inline-block; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--soft); padding: 3px 10px; border-radius: 10px; }
.shop-desc { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.shop-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--soft); font-size: 12.5px; font-weight: 500; color: var(--ink); }
.pill .ic { width: 14px; height: 14px; color: var(--green-2); }
.chat-btn { grid-column: 1 / -1; justify-self: start; }
@media (min-width: 720px) {
  .shop-head { grid-template-columns: auto 1fr auto; margin: -72px 24px 0; padding: 20px 22px; }
  .shop-head .shop-logo { width: 84px; height: 84px; font-size: 34px; grid-row: span 2; }
  .shop-id h1 { font-size: 26px; }
  .shop-desc { grid-column: 2 / 3; }
  .shop-meta { grid-column: 2 / 4; }
  .chat-btn { grid-column: 3; grid-row: 1; justify-self: end; }
}

/* Search + categories stay at the top while scrolling */
.shop-tools { position: sticky; top: 0; z-index: 6; background: var(--shop-bg); padding: 14px 16px 8px; }
.shop-tools::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px; background: linear-gradient(var(--shop-bg), transparent); pointer-events: none; }
.search-box { position: relative; }
.search-box .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-box input, .shop-search input { padding-left: 44px; min-height: 50px; background: var(--white); border: 1.5px solid var(--line); border-radius: 16px; box-shadow: 0 1px 2px rgba(20,32,27,.04); }
.search-box input:focus { border-color: var(--green-2); outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 0; }
.shop-tools .cat-chips { padding: 10px 0 2px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.shop-tools .cat-chips::-webkit-scrollbar { display: none; }
.cat-chips button { background: var(--white); box-shadow: 0 1px 2px rgba(20,32,27,.05); }
.price-note { margin: 4px 16px 0; }

/* Product cards */
.shop-grid { padding: 10px 16px 28px; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 620px) { .shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 860px) { .shop-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 12px 24px 32px; } .shop-tools { padding: 16px 24px 8px; } .shop-tools .cat-chips { margin: 0 -24px; padding-left: 24px; padding-right: 24px; } }
.item { background: var(--white); border-radius: 18px; padding: 8px 8px 10px; box-shadow: var(--card-shadow); gap: 4px; transition: transform .15s ease, box-shadow .15s ease; animation: card-in .35s ease both; }
@media (hover: hover) { .item:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(20,32,27,.06), 0 12px 28px rgba(20,32,27,.12); } }
.item-img { aspect-ratio: 1 / 1; border-radius: 13px; }
.item-img img { transition: transform .3s ease; }
@media (hover: hover) { .item:hover .item-img img { transform: scale(1.04); } }
.item h2 { font-size: 14.5px; font-weight: 600; line-height: 1.3; padding: 4px 4px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.item .price { padding: 0 4px; }
.item .price b { font-size: 17px; font-weight: 800; }
.item .bulk-tag { padding: 0 4px; font-size: 11.5px; line-height: 1.35; }
.item .qty-slot, .item > .btn.add { margin-top: auto; padding-top: 6px; }
.btn.add { border: 0; background: var(--accent); color: var(--on-accent); min-height: 42px; border-radius: 12px; font-weight: 800; box-shadow: 0 2px 0 rgba(0,0,0,.08); }
.btn.add:hover { filter: brightness(.95); color: var(--on-accent); border: 0; }
.btn.add:active { transform: scale(.97); }
.stepper { border-radius: 12px; min-height: 42px; }
.disc-tag { position: absolute; right: 8px; top: 8px; background: #D9381E; color: #fff; font: 800 11px/1 var(--body); padding: 5px 7px; border-radius: 8px; letter-spacing: .3px; box-shadow: 0 2px 6px rgba(217,56,30,.35); }
.oos-tag { background: rgba(20,32,27,.82); }
.item.oos h2, .item.oos .price { opacity: .6; }
.noimg .ic { width: 34px; height: 34px; opacity: .45; }
@keyframes card-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .item, .cartbar.bump { animation: none !important; } .item, .item-img img { transition: none; } }
.item .price b.ask { font-size: 15px; color: var(--muted); }
@media (min-width: 860px) { .shop-foot { margin: 8px 24px 0; } }
body.theme-dark .pill .ic { color: var(--accent); }
.no-match { text-align: center; color: var(--muted); padding: 24px 16px 40px; }

/* Footer */
.shop-foot { margin: 8px 16px 0; padding: 16px; background: var(--white); border-radius: 18px; box-shadow: var(--card-shadow); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.shop-foot p { margin: 0; }
.powered { padding: 18px 16px 28px; }

/* Floating cart */
.cartbar { border-radius: 20px; padding: 10px 10px 10px 12px; gap: 12px; justify-content: flex-start; box-shadow: 0 14px 34px rgba(20,32,27,.32); animation: cart-in .25s ease both; }
.cartbar .btn.primary { margin-left: auto; border-radius: 14px; min-height: 46px; font-weight: 800; }
.cart-ic { position: relative; width: 44px; height: 44px; border-radius: 14px; background: rgba(255,255,255,.14); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.cart-ic i { position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font: 800 11px/20px var(--body); font-style: normal; text-align: center; }
.cart-sum { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.cart-sum b { font-size: 13px; font-weight: 500; opacity: .85; }
.cart-sum .amt { font-size: 18px; font-weight: 800; }
.cartbar.bump { animation: cart-bump .35s ease; }
@keyframes cart-in { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes cart-bump { 0% { transform: translate(-50%, 0) scale(1); } 40% { transform: translate(-50%, 0) scale(1.04); } 100% { transform: translate(-50%, 0) scale(1); } }
body.catalog .cart-sum b { font-size: 16px; font-weight: 800; opacity: 1; }

/* Product sheet */
.sheet { box-shadow: 0 -10px 40px rgba(0,0,0,.2); }
.sheet::backdrop { backdrop-filter: blur(2px); }
.pd-sheet { padding-top: 14px; }
.pd-sheet::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
@media (min-width: 640px) { .pd-sheet::before { display: none; } }
.pd-img img { border-radius: 18px; max-height: 46vh; }
.pd-sheet h2 { font-size: 24px; margin-top: 4px; }
.pd-sheet #pdPrice b { font-size: 24px; font-weight: 800; }
.pd-sheet #pdPrice s { font-size: 15px; }

/* ---- Store themes (storefront + customer pages) ---- */
/* Colour pop: header in the store's own colour */
body.theme-pop .shop-top, body.theme-pop .cust-top { background: var(--accent); color: var(--on-accent); }
body.theme-pop .shop-host, body.theme-pop .back.light { color: var(--on-accent); opacity: .8; }
body.theme-pop .acct-link { background: rgba(0,0,0,.14); color: var(--on-accent); }
body.theme-pop .acct-link:hover { background: rgba(0,0,0,.24); color: var(--on-accent); }
body.theme-pop .cat-chips button.on, body.theme-pop .stepper { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
body.theme-pop .stepper button { color: var(--on-accent); }
body.theme-pop .cartbar { background: var(--ink); }

/* Minimal: white, thin lines, square photos */
body.theme-minimal { background: #fff; }
body.theme-minimal .shop-top { background: #fff; height: auto; border-bottom: 1px solid var(--line); }
body.theme-minimal .shop-host { color: var(--muted); }
body.theme-minimal .acct-link { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
body.theme-minimal .acct-link:hover { background: var(--soft); color: var(--ink); }
body.theme-minimal .shop { --shop-bg: #fff; --card-shadow: none; }
body.theme-minimal .shop-top::after { display: none; }
body.theme-minimal .shop-head { margin: 16px 16px 0; box-shadow: none; border: 1px solid var(--line); border-radius: 4px; }
body.theme-minimal .item { border: 1px solid var(--line); border-radius: 4px; }
body.theme-minimal .shop-head .shop-logo { border-radius: 50%; box-shadow: none; border: 1px solid var(--line); }
body.theme-minimal .shop-logo { border-radius: 50%; border-color: var(--line); border-width: 1px; }
body.theme-minimal .shop-head h1 { letter-spacing: 1px; text-transform: uppercase; font-size: 22px; }
body.theme-minimal .item-img, body.theme-minimal .btn.add, body.theme-minimal .shop-search input, body.theme-minimal .stepper { border-radius: 2px; }
body.theme-minimal .item-img { aspect-ratio: 1 / 1; }
body.theme-minimal .btn.add { background: var(--ink); color: #fff; box-shadow: none; }
body.theme-minimal .stepper, body.theme-minimal .cat-chips button.on { background: var(--ink); border-color: var(--ink); }
body.theme-minimal .cat-chips button { border-radius: 2px; }
body.theme-minimal .cartbar { background: var(--ink); border-radius: 4px; }
body.theme-minimal .cust-top { background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); }
body.theme-minimal .back.light { color: var(--muted); }

/* Night: dark background */
body.theme-dark {
  --white: #16201C; --soft: #222D28; --paper: #0F1714; --ink: #EEF2EE; --muted: #A9B5AF; --line: #3A4741;
  --green: #0B1310; --green-2: #26332D; --wa: #3FBF7F; background: #0F1714; color-scheme: dark;
}
body.theme-dark .shop-top { background: #0B1310; border-bottom: 1px solid #26332D; }
body.theme-dark .shop-logo { border-color: #16201C; }
body.theme-dark .shop { --shop-bg: #0F1714; --card-shadow: 0 1px 0 rgba(255,255,255,.04); }
body:has(.shop).theme-dark { background: #0A100D; }
body.theme-dark .cart-ic { background: rgba(0,0,0,.15); }
body.theme-dark .cart-ic i { background: #0B1310; color: #fff; }
body.theme-dark .stepper, body.theme-dark .cat-chips button.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
body.theme-dark .stepper button { color: var(--on-accent); }
body.theme-dark .price s, body.theme-dark .item-img { color: var(--muted); }
body.theme-dark .cartbar { background: var(--accent); color: var(--on-accent); }
body.theme-dark .cartbar .btn.primary { background: #0B1310; color: #fff; }
body.theme-dark .oos-tag { background: #000; }
body.theme-dark a:not(.btn):not(.acct-link) { color: var(--accent); }
body.theme-dark .flash.ok { color: #14201B; }

/* Wholesale list: compact rows with a small photo */
body.theme-list .shop-grid { grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 860px) { body.theme-list .shop-grid { grid-template-columns: 1fr 1fr; } }
body.theme-list .item { display: grid; grid-template-columns: 76px 1fr auto; grid-template-rows: auto auto 1fr; column-gap: 12px; row-gap: 2px; padding: 10px; align-items: start; }
body.theme-list .item h2 { min-height: 0; padding: 2px 0 0; }
body.theme-list .item .price, body.theme-list .item .bulk-tag { padding: 0; }
body.theme-list .item .qty-slot, body.theme-list .item > .btn.add { margin-top: 0; padding-top: 0; }
body.theme-list .disc-tag { font-size: 9px; padding: 3px 4px; right: 3px; top: 3px; }
body.theme-list .item-img { grid-row: 1 / 4; width: 76px; aspect-ratio: 1 / 1; border-radius: 10px; }
body.theme-list .item h2 { grid-column: 2; }
body.theme-list .item .price, body.theme-list .item .bulk-tag { grid-column: 2; }
body.theme-list .item .qty-slot, body.theme-list .item > .btn.add { grid-column: 3; grid-row: 1 / 4; align-self: center; width: auto; min-width: 104px; }
body.theme-list .item .qty-slot .btn.add { width: 100%; }
body.theme-list .oos-tag { font-size: 10px; left: 4px; top: 4px; padding: 2px 5px; }
@media (max-width: 380px) {
  body.theme-list .item { grid-template-columns: 64px 1fr; }
  body.theme-list .item-img { width: 64px; }
  body.theme-list .item .qty-slot, body.theme-list .item > .btn.add { grid-column: 2; grid-row: auto; justify-self: start; margin-top: 6px; }
}
body.theme-dark .acct-link, body.theme-dark .cust-top, body.theme-dark .back.light { color: #EEF2EE; }
body.theme-dark .acct-link:hover { background: #33423B; color: #fff; }
body.theme-dark .shop-host { color: #A9B5AF; }
.progress { height: 10px; border-radius: 5px; background: var(--soft); overflow: hidden; margin: 14px 0 8px; }
.progress span { display: block; height: 100%; background: var(--green); transition: width .3s; }
.price .ask { color: var(--muted); font-weight: 700; font-size: 14px; }

/* ==== Seller panel look (v4.0) ==== */
body.seller { background: #F1F3EE; }
body.seller .side { background: #fff; border-right: 1px solid #E6E9E3; padding: 20px 14px; gap: 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side-store { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--soft); text-decoration: none; color: var(--ink); }
.side-store:hover { color: var(--ink); background: #E7EAE3; }
.side-store .shop-logo.sm { width: 38px; height: 38px; border: 0; border-radius: 11px; font-size: 16px; flex: none; }
.side-store b { display: block; font-size: 14px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.side-store small { font-size: 12px; color: var(--muted); }
body.seller .nav { gap: 2px; }
.nav-group { margin: 12px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8A948F; }
body.seller .nav a { min-height: 40px; padding: 8px 12px; font-size: 14.5px; position: relative; }
body.seller .nav a .ic { width: 19px; height: 19px; }
body.seller .nav a.on { background: var(--green); color: #fff; box-shadow: 0 4px 12px rgba(15,61,46,.18); }
body.seller .nav a.on .ic { color: var(--accent); }
.new-tag { margin-left: auto; font: 800 10px/1 var(--body); font-style: normal; background: var(--accent); color: var(--on-accent); padding: 3px 6px; border-radius: 6px; }
.nav-more { display: none; }
.more-sheet h2 { margin-bottom: 14px; }
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.more-grid a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 14px 6px; min-height: 84px; border-radius: 16px; background: var(--soft); text-decoration: none; color: var(--ink); font-size: 13px; font-weight: 600; text-align: center; }
.more-grid a.on { background: var(--green); color: #fff; }
.more-grid a .ic { width: 22px; height: 22px; }
@media (max-width: 760px) {
  body.seller .side { position: fixed; top: auto; height: auto; padding: 0 4px calc(4px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid #E6E9E3; box-shadow: 0 -6px 20px rgba(20,32,27,.06); overflow: visible; }
  .side-store, .nav-group { display: none; }
  body.seller .nav a, .nav-more { flex: 1; flex-direction: column; gap: 3px; font-size: 11px; padding: 8px 2px; min-height: 60px; justify-content: center; border-radius: 14px; }
  body.seller .nav a.on { background: transparent; color: var(--green); box-shadow: none; font-weight: 800; }
  body.seller .nav a.on .ic { color: var(--green); background: #DDEFE3; border-radius: 10px; padding: 3px 10px; width: 42px; height: 26px; }
  .nav-more { display: flex; align-items: center; border: 0; background: transparent; color: var(--muted); font: 500 11px var(--body); cursor: pointer; }
  .nav-more.on { color: var(--green); font-weight: 800; }
  .new-tag { position: absolute; top: 4px; right: 6px; font-size: 8px; padding: 2px 4px; }
  body.seller .main { padding: 16px 16px 110px; gap: 16px; }
}

/* Page headings */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; max-width: 640px; }
.sec-title { font-size: 17px; margin: 0 0 10px; }
.tool-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: -4px 0 0; }
.tool-row::-webkit-scrollbar { display: none; }
.tool-row a { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 8px 14px; min-height: 40px; border-radius: 12px; background: #fff; border: 1px solid #E3E6E0; text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 600; }
.tool-row a:hover { border-color: var(--green-2); color: var(--ink); }
.tool-row .ic { width: 17px; height: 17px; color: var(--green-2); }
body.seller .card { border-radius: 20px; box-shadow: 0 1px 2px rgba(20,32,27,.04), 0 6px 20px rgba(20,32,27,.05); }

/* Dashboard */
.dash-hero { border-radius: 24px; padding: 22px; color: #fff; position: relative; overflow: hidden;
  background: var(--green); background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--accent) 40%, transparent) 0%, transparent 55%), linear-gradient(150deg, var(--green) 0%, var(--green-2) 100%);
  box-shadow: 0 12px 30px rgba(15,61,46,.22); display: flex; flex-direction: column; gap: 18px; }
.dash-hero::after { content: ""; position: absolute; inset: 0; opacity: .1; pointer-events: none; background-image: radial-gradient(rgba(255,255,255,.9) 1px, transparent 1.5px); background-size: 18px 18px; }
.dash-hero > * { position: relative; z-index: 1; }
.dash-hero-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.dash-hero h1 { color: #fff; margin: 2px 0 8px; font-size: 28px; }
.dash-hi { margin: 0; color: #CFE0D7; }
.dash-plan { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dash-plan small { color: #CFE0D7; }
.dash-plan a { color: var(--accent); font-weight: 700; }
.dash-hero .shop-logo { width: 64px; height: 64px; border: 3px solid rgba(255,255,255,.85); border-radius: 18px; font-size: 26px; flex: none; }
.plan-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.16); color: #fff; font-size: 12.5px; font-weight: 800; }
.plan-badge .ic { width: 14px; height: 14px; color: var(--accent); }
.plan-badge.plan-premium { background: linear-gradient(90deg, #F6D365, #FDA085); color: #3A2200; }
.plan-badge.plan-premium .ic { color: #3A2200; }
.dash-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); border-radius: 16px; padding: 10px 10px 10px 14px; }
.dash-link .mono { font-size: 14px; color: #fff; overflow-wrap: anywhere; }
.dash-link-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.dash-link .btn { background: #fff; border-color: transparent; color: var(--ink); min-height: 38px; }
.dash-link .btn.wa { background: var(--wa); color: #fff; }
.stats-ic .stat { position: relative; text-decoration: none; color: var(--ink); box-shadow: 0 1px 2px rgba(20,32,27,.04), 0 6px 20px rgba(20,32,27,.05); padding: 16px 16px 14px; border-radius: 18px; }
a.stat:hover { color: var(--ink); box-shadow: 0 0 0 2px var(--line); }
.stats-ic .stat i { width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.stats-ic .stat i .ic { width: 20px; height: 20px; }
.t-green i { background: #DFF1E6; color: #1E7A4C; }
.t-blue i { background: #E1ECFB; color: #2F5DB8; }
.t-orange i { background: #FDEBD6; color: #B35F00; }
.t-purple i { background: #EEE4F7; color: #7A3FA8; }
@media (max-width: 520px) { .stats-ic { grid-template-columns: 1fr 1fr; } .stats-ic .stat b { font-size: 22px; } }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.quick-grid a { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 14px; min-height: 60px; border-radius: 16px; background: #fff; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 14.5px; box-shadow: 0 1px 2px rgba(20,32,27,.04), 0 6px 20px rgba(20,32,27,.04); transition: transform .12s ease; }
.quick-grid a:hover { transform: translateY(-1px); color: var(--ink); box-shadow: 0 0 0 2px var(--line); }
.quick-grid i { width: 36px; height: 36px; border-radius: 11px; background: var(--soft); display: inline-flex; align-items: center; justify-content: center; flex: none; color: var(--green); }
.quick-grid .q-primary { background: var(--accent); color: var(--on-accent); }
.quick-grid .q-primary i { background: rgba(255,255,255,.35); color: var(--on-accent); }
.q-badge { position: absolute; top: 6px; right: 8px; font: 800 10px/1 var(--body); font-style: normal; background: #FDE3DF; color: #B3261E; padding: 3px 6px; border-radius: 6px; }
@media (max-width: 520px) { .quick-grid { grid-template-columns: 1fr 1fr; } .quick-grid a { font-size: 13.5px; padding: 10px; } }

/* Seller product cards: compact rows on phones */
body.seller .prod-card { box-shadow: 0 1px 2px rgba(20,32,27,.04), 0 6px 20px rgba(20,32,27,.05); }
body.seller .prod-body .btn.sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
@media (max-width: 560px) {
  body.seller .prod-grid { grid-template-columns: 1fr; gap: 10px; }
  body.seller .prod-card { flex-direction: row; align-items: stretch; }
  body.seller .prod-img { width: 108px; aspect-ratio: auto; min-height: 108px; flex: none; }
  body.seller .prod-body { padding: 12px; gap: 5px; min-width: 0; flex: 1; }
  body.seller .prod-body h2 { font-size: 15px; }
}

/* Plan page: four plans */
.plans-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.plan-card { position: relative; display: flex; flex-direction: column; gap: 4px; }
.plan-card .ticks { flex: 1; }
.plan-tag { align-self: flex-start; font: 800 11px/1 var(--body); letter-spacing: .04em; text-transform: uppercase; padding: 5px 8px; border-radius: 7px; background: var(--soft); color: var(--muted); margin-bottom: 4px; }
.plan-card.current .plan-tag { background: var(--green); color: #fff; }
.plan-premium { background: linear-gradient(160deg, #1B1426 0%, #3A2552 100%) !important; color: #F5EEFF; }
.plan-premium h2, .plan-premium .plan-price { color: #fff; }
.plan-premium .muted { color: #CBB9E6; }
.plan-premium .plan-tag { background: linear-gradient(90deg, #F6D365, #FDA085); color: #3A2200; }
.plan-premium .ticks li::before { border-color: #F6D365; }
.warn-note { background: #FDECEA; color: #8A1C14; border-radius: 12px; padding: 10px 12px; }

/* ==== Kamkaji wordmark (Hindi main logo) ==== */
.brand { flex-direction: column; align-items: flex-start; gap: 0; line-height: 1; }
.logo-hi { font: 800 30px/1.05 'Baloo 2', 'Noto Sans Devanagari', 'Mangal', var(--display); letter-spacing: 0; color: var(--green); position: relative; padding-bottom: 7px; }
.logo-hi::after { content: ""; position: absolute; left: 2px; right: 30%; bottom: 0; height: 4px; border-radius: 2px; background: var(--accent); }
.logo-en { margin-top: 5px; font: 700 10.5px/1 var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.brand.light .logo-hi { color: #fff; }
.brand.light .logo-en { color: #CFE0D7; }
.owner-app .brand .logo-hi { font-size: 26px; }
