:root {
  --brand: #0b5d52; --brand-2: #0e7a6b; --brand-ink: #063b34; --brand-soft: #e3f3ef;
  --accent: #f59e0b; --accent-soft: #fff4dc; --red: #dc2626; --green: #15803d;
  --ink: #12211f; --muted: #5b6b68; --line: #dde6e4; --bg: #f5f8f7; --card: #fff;
  --radius: 14px; --shadow: 0 1px 2px rgba(10,40,35,.06), 0 6px 24px rgba(10,40,35,.06);
  color-scheme: light;
}
* { box-sizing: border-box }
html, body { margin: 0 }
body { font: 15px/1.5 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); padding-bottom: 72px }
a { color: var(--brand-2) }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em }
.container { max-width: 1180px; margin: 0 auto; padding: 0 16px }
.muted { color: var(--muted) }
.small { font-size: 13px }
.hidden, [hidden] { display: none !important }

/* top bar */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30 }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink) }
.brand b { display: block; font-size: 17px; letter-spacing: .3px; color: var(--brand-ink) }
.brand small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 2px; color: var(--brand-2); font-weight: 700; margin-top: -2px }
.logo { width: 38px; height: 38px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 26px; line-height: 1 }
nav { display: flex; gap: 6px; align-items: center }
nav a { text-decoration: none; color: var(--ink); font-weight: 600; padding: 8px 12px; border-radius: 10px; font-size: 14px; white-space: nowrap }
nav a:hover, nav a.on { background: var(--brand-soft); color: var(--brand-ink) }
nav .pill { background: var(--brand); color: #fff }
nav .pill:hover { background: var(--brand-ink); color: #fff }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #000; font-size: 12px; text-align: center; margin-left: 4px }
.announce { background: var(--brand-ink); color: #fff; text-align: center; font-size: 13px; padding: 7px 16px }

/* buttons & forms */
.btn { appearance: none; border: 1px solid transparent; background: var(--brand); color: #fff; font: inherit; font-weight: 700; padding: 10px 18px; border-radius: 10px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; justify-content: center }
.btn:hover { background: var(--brand-ink) }
.btn:disabled { opacity: .5; cursor: not-allowed }
.btn.ghost { background: #fff; color: var(--brand-ink); border-color: var(--line) }
.btn.ghost:hover { border-color: var(--brand-2) }
.btn.accent { background: var(--accent); color: #1b1300 }
.btn.lg { padding: 14px 24px; font-size: 16px }
.btn.sm { padding: 6px 12px; font-size: 13px }
.btn.danger { background: #fff; color: var(--red); border-color: #f3c4c4 }
.btn.block { width: 100% }
label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 4px; color: #33413f }
input, select, textarea { width: 100%; font: inherit; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink) }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(14,122,107,.25); border-color: var(--brand-2) }
.field { margin-bottom: 14px }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px }
.err-box { background: #fdecec; color: #8a1c1c; border: 1px solid #f5c2c2; padding: 10px 12px; border-radius: 10px; margin-bottom: 14px; white-space: pre-line; font-size: 14px }

/* hero */
.hero { background: radial-gradient(1200px 400px at 85% -10%, rgba(245,158,11,.25), transparent 60%), linear-gradient(135deg, #063b34, #0b5d52 55%, #0e7a6b); color: #fff; padding: 56px 0 64px; overflow: hidden }
.hero-in { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center }
.eyebrow { display: inline-block; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); padding: 5px 12px; border-radius: 30px; font-size: 13px; font-weight: 600; margin-bottom: 16px }
.hero h1 { font-size: clamp(30px, 5vw, 50px); font-weight: 800; letter-spacing: -.5px }
.hero h1 em { font-style: normal; color: #ffd27a }
.hero p.lead { font-size: 18px; opacity: .9; max-width: 560px }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px }
.hero .btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.45) }
.hero-card { background: #fff; color: var(--ink); border-radius: 18px; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.25) }
.hero-card h3 { font-size: 16px }
.clock { display: flex; gap: 14px; align-items: center; background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; margin: 12px 0 }
.clock b { font-size: 22px }
.steps { list-style: none; padding: 0; margin: 0 }
.steps li { display: flex; gap: 12px; padding: 9px 0; border-top: 1px dashed var(--line); font-size: 14px }
.steps li:first-child { border-top: 0 }
.steps .n { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; font-weight: 800; font-size: 13px }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: -34px; position: relative }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow) }
.stat b { display: block; font-size: 24px; color: var(--brand-ink) }
.stat span { font-size: 13px; color: var(--muted) }
section.block { padding: 56px 0 8px }
section.block h2 { font-size: 28px; text-align: center }
section.block .sub { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 28px }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px }
.feature .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); display: grid; place-items: center; font-size: 22px; margin-bottom: 12px }
.feature h3 { font-size: 17px }
.feature p { margin: 0; color: var(--muted); font-size: 14px }
.promo { margin: 48px 0 0; background: linear-gradient(120deg, #fff4dc, #ffe7b0); border: 1px solid #f6d48a; border-radius: 20px; padding: 28px; display: flex; justify-content: space-between; gap: 20px; align-items: center; flex-wrap: wrap }
.promo h3 { font-size: 22px; margin: 0 0 4px }
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; counter-reset: s }
.timeline div { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; position: relative }
.timeline div b { display: block; color: var(--brand-2); font-size: 13px; text-transform: uppercase; letter-spacing: 1px }
.timeline div strong { display: block; font-size: 17px; margin: 4px 0 }
.timeline div span { font-size: 14px; color: var(--muted) }

/* auth */
.auth { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 40px 0; align-items: start }
.auth .pitch { background: linear-gradient(160deg, var(--brand-ink), var(--brand)); color: #fff; border-radius: 18px; padding: 28px }
.auth .pitch li { margin: 8px 0 }
.tabs { display: flex; gap: 6px; background: #eef3f2; padding: 4px; border-radius: 12px; margin-bottom: 18px }
.tabs a { flex: 1; text-align: center; padding: 9px; border-radius: 9px; text-decoration: none; color: var(--muted); font-weight: 700 }
.tabs a.on { background: #fff; color: var(--brand-ink); box-shadow: var(--shadow) }

/* shop */
.page { padding: 22px 0 }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px }
.page-head h1 { font-size: 24px; margin: 0 }
.searchbar { position: sticky; top: 64px; z-index: 20; background: var(--bg); padding: 10px 0 }
.search-row { display: flex; gap: 8px; flex-wrap: wrap }
.search-row .q { flex: 1 1 320px; position: relative }
.search-row .q input { padding-left: 42px; font-size: 16px; height: 50px; border-radius: 12px }
.search-row .q::before { content: "⌕"; position: absolute; left: 14px; top: 9px; font-size: 24px; color: var(--muted) }
.search-row select { width: auto; flex: 0 1 200px; height: 50px; border-radius: 12px }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; height: 50px; margin: 0; white-space: nowrap }
.chk input { width: auto }
.plist { display: flex; flex-direction: column; gap: 8px }
.prow { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center }
.prow.oos { opacity: .6 }
.pname { font-weight: 700; font-size: 15px }
.pmeta { font-size: 12.5px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; margin-top: 2px }
.tag { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 20px; background: var(--brand-soft); color: var(--brand-ink) }
.tag.scheme { background: var(--accent-soft); color: #8a5a00 }
.tag.red { background: #fde8e8; color: var(--red) }
.tag.gray { background: #eef1f1; color: var(--muted) }
.price { text-align: right; min-width: 150px }
.price .rate { font-size: 18px; font-weight: 800; color: var(--brand-ink) }
.price .mrp { font-size: 12.5px; color: var(--muted) }
.price .margin { font-size: 12px; font-weight: 700; color: var(--green) }
.qtybox { display: flex; align-items: center; gap: 6px }
.stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff }
.stepper button { width: 34px; height: 38px; border: 0; background: #f2f6f5; font-size: 18px; font-weight: 700; cursor: pointer; color: var(--brand-ink) }
.stepper input { width: 56px; height: 38px; border: 0; text-align: center; padding: 0; border-radius: 0; font-weight: 700 }
.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 18px }
.mini { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px }
.mini .pname { font-size: 14px }
.mini .row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px }
.section-title { font-size: 15px; font-weight: 800; margin: 8px 0 10px; display: flex; align-items: center; gap: 8px }
.empty { text-align: center; padding: 48px 16px; color: var(--muted) }
.empty .big { font-size: 40px }

/* cart bar */
.cartbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--brand-ink); color: #fff; padding: 10px 0; box-shadow: 0 -8px 24px rgba(0,0,0,.15) }
.cartbar .container { display: flex; justify-content: space-between; align-items: center; gap: 12px }
.cartbar .btn { background: var(--accent); color: #1b1300 }

/* tables */
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid var(--line) }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; vertical-align: middle }
.table th { background: #f2f6f5; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted) }
.table td.r, .table th.r { text-align: right }
.table tr:last-child td { border-bottom: 0 }
.table-wrap { overflow-x: auto }
.status { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; text-transform: capitalize; background: #eef1f1 }
.status.placed { background: #e0ecff; color: #1d4ed8 }
.status.confirmed, .status.picked { background: #fff4dc; color: #8a5a00 }
.status.billed, .status.dispatched { background: #ede4ff; color: #6d28d9 }
.status.delivered, .status.paid { background: #dcf5e5; color: var(--green) }
.status.cancelled { background: #fde8e8; color: var(--red) }
.status.unpaid { background: #fde8e8; color: var(--red) }
.status.partial { background: #fff4dc; color: #8a5a00 }
.sum-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px }
.sum-cards .stat { margin: 0 }
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start }
.sticky { position: sticky; top: 80px }
.totrow { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px }
.totrow.big { font-size: 20px; font-weight: 800; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px }
.radio-card { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 8px; cursor: pointer; font-weight: 500 }
.radio-card input { width: auto; margin-top: 4px }
.radio-card.on { border-color: var(--brand-2); background: var(--brand-soft) }
.radio-card.disabled { opacity: .55; cursor: not-allowed }

/* footer */
.footer { background: #072b26; color: #cfe3df; margin-top: 56px; padding: 32px 0 }
.footer-in { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; font-size: 14px }
.footer b { color: #fff }
.footer a { color: #9be3d4 }

/* toasts */
#toasts { position: fixed; top: 76px; right: 16px; z-index: 100; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 32px) }
.toast { background: var(--brand-ink); color: #fff; padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow); font-weight: 600; font-size: 14px; transition: opacity .4s, transform .4s; white-space: pre-line }
.toast.err { background: var(--red) }
.toast.out { opacity: 0; transform: translateY(-8px) }
.spinner { text-align: center; padding: 30px; color: var(--muted) }

@media (max-width: 900px) {
  .hero-in, .auth, .cart-layout { grid-template-columns: 1fr }
  .stats { grid-template-columns: repeat(2, 1fr) }
  .features, .timeline { grid-template-columns: 1fr 1fr }
  .footer-in { grid-template-columns: 1fr }
  .sticky { position: static }
}
@media (max-width: 640px) {
  .topbar-in { height: auto; padding: 10px 16px; flex-wrap: wrap }
  nav { width: 100%; overflow-x: auto; padding-bottom: 2px }
  nav a { padding: 7px 10px }
  .searchbar { top: 0; position: static }
  .features, .timeline, .grid2, .sum-cards { grid-template-columns: 1fr }
  .prow { grid-template-columns: 1fr auto; }
  .prow .qtybox { grid-column: 1 / -1; justify-content: flex-end }
  .price { min-width: 0 }
  .hero { padding: 36px 0 54px }
  .search-row select { flex: 1 1 45% }
  .chk { flex: 1 1 45% }
}
