@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --serif: "Fraunces", Georgia, serif;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px rgba(16, 32, 24, 0.08);
  --ring: 0 0 0 4px color-mix(in srgb, var(--primary) 22%, transparent);
  --container: 1180px;
  --sidebar: 268px;
  --header: 72px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --fs: 16px;
  --fs-sm: 13px;
  --pad: 22px;
  --gutter: 32px;
  --tap: 40px;
}

[data-scheme="forest"] {
  --primary: #1d6b45;
  --primary-2: #0f3d28;
  --accent: #e0a106;
  --accent-2: #f3d48a;
}
[data-scheme="harvest"] {
  --primary: #b65c1f;
  --primary-2: #6d3410;
  --accent: #2f6b3a;
  --accent-2: #cfe8c4;
}
[data-scheme="teal"] {
  --primary: #0e7c7b;
  --primary-2: #073e44;
  --accent: #e07a3d;
  --accent-2: #f6d0b8;
}
[data-scheme="cocoa"] {
  --primary: #6e3b2b;
  --primary-2: #3a1d15;
  --accent: #c4a35a;
  --accent-2: #efe3c4;
}
[data-scheme="indigo"] {
  --primary: #2f3d8f;
  --primary-2: #171f4d;
  --accent: #d4a017;
  --accent-2: #f3e2ad;
}

[data-theme="light"] {
  --bg: #f4f1ea;
  --bg-2: #fffdf8;
  --surface: #ffffff;
  --surface-2: #f7f3eb;
  --text: #17231c;
  --muted: #5d6b63;
  --line: rgba(23, 35, 28, 0.1);
  --ok: #1a7a45;
  --warn: #b7791f;
  --bad: #b42318;
  --hero: linear-gradient(135deg, color-mix(in srgb, var(--primary-2) 92%, #000) 0%, var(--primary) 58%, color-mix(in srgb, var(--primary) 70%, var(--accent)) 100%);
  --nav: rgba(255, 253, 248, 0.86);
  --card-shine: linear-gradient(180deg, rgba(255,255,255,.7), transparent);
}
[data-theme="dark"] {
  --bg: #0e1512;
  --bg-2: #121c18;
  --surface: #17221d;
  --surface-2: #1d2b25;
  --text: #eef4ef;
  --muted: #a3b3aa;
  --line: rgba(238, 244, 239, 0.1);
  --ok: #4ade80;
  --warn: #f4c16e;
  --bad: #fb7185;
  --hero: linear-gradient(135deg, #050807 0%, var(--primary-2) 48%, var(--primary) 100%);
  --nav: rgba(14, 21, 18, 0.84);
  --card-shine: linear-gradient(180deg, rgba(255,255,255,.04), transparent);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: var(--fs);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, .chip, .cat-filter, .loc-switch a, .tabs a {
  touch-action: manipulation;
}
h1, h2, h3, h4 { font-family: var(--serif); letter-spacing: -0.03em; line-height: 1.15; margin: 0 0 .5em; }
p { margin: 0 0 1em; color: var(--muted); }

.container { width: min(var(--container), calc(100% - var(--gutter))); margin-inline: auto; }
.muted { color: var(--muted); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.grid { display: grid; gap: 18px; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 11px 18px; cursor: pointer;
  background: var(--primary); color: #fff; font-weight: 700;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 30%, transparent);
  transition: transform .18s var(--ease), filter .18s;
}
@media (hover: hover) {
  .btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
}
.btn.secondary { background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn.ghost { background: transparent; color: inherit; box-shadow: none; border: 1px solid color-mix(in srgb, #fff 30%, transparent); }
.btn.gold { background: var(--accent); color: #1a1406; box-shadow: none; }
.btn.danger { background: var(--bad); }
.btn.sm { padding: 8px 12px; font-size: 13px; }
.btn.full { width: 100%; }
.btn[hidden],
[data-page-list][hidden],
[data-show-list][hidden] {
  display: none !important;
}

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--surface-2); border: 1px solid var(--line);
}
.chip.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, var(--surface)); }
.chip.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, var(--surface)); }
.chip.danger { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--surface)); }
.chip.accent { background: color-mix(in srgb, var(--accent) 20%, var(--surface)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-body { padding: 20px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }

.flash { margin: 14px 0; padding: 12px 14px; border-radius: 12px; font-weight: 600; }
.flash.success { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); color: var(--ok); }
.flash.error { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); color: var(--bad); }
.flash.info { background: color-mix(in srgb, var(--primary) 12%, var(--surface)); }

label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.input, .select, .textarea, input[type="text"], input[type="password"], input[type="email"],
input[type="number"], input[type="date"], input[type="file"], input[type="search"], input[type="tel"],
select, textarea {
  width: 100%; border: 1px solid var(--line); background: var(--bg-2);
  border-radius: 12px; padding: 11px 12px; outline: none;
}
textarea { min-height: 110px; resize: vertical; }
.input:focus, .select:focus, textarea:focus, input:focus, select:focus { box-shadow: var(--ring); border-color: var(--primary); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.span-2 { grid-column: span 2; }
.help { font-size: 12px; color: var(--muted); margin-top: 4px; }

.table-wrap { overflow: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
table.data tr:hover td { background: color-mix(in srgb, var(--primary) 5%, transparent); }
table.data tr.on-item td { background: color-mix(in srgb, var(--primary) 8%, transparent); }
table.data tr.on-item { scroll-margin-top: 96px; }
table.data td.batch-detail { padding: 0; background: var(--surface-2); }
table.data.nested { margin: 0; background: transparent; }
table.data.nested th, table.data.nested td { padding: 10px 12px; font-size: 13px; }
table.data tr.batch-open { display: none; }
table.data tr.batch-open.open { display: table-row; }
table.data tr.batch-open:hover td { background: var(--surface-2); }
.table-link {
  border: 0; background: none; padding: 0; cursor: pointer;
  font: inherit; font-weight: 700; color: var(--primary);
}
.table-link.on { text-decoration: underline; }

.public-header {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(16px);
  background: var(--nav);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.public-header .inner {
  min-height: var(--header);
  height: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  position: relative;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; min-width: 0; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 14px; flex: 0 0 auto;
  background: var(--hero); color: #fff;
  display: grid; place-items: center; overflow: hidden;
  box-shadow: 0 10px 20px color-mix(in srgb, var(--primary) 30%, transparent);
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand small { display: block; font-weight: 600; color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-family: var(--font); }
.nav { display: flex; gap: 6px; align-items: center; flex: 1; }
.nav a { padding: 8px 12px; border-radius: 999px; font-weight: 650; color: var(--muted); }
.nav a.active, .nav a:hover { background: var(--surface-2); color: var(--text); }
.nav-tools, .switchers { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.seg { display: flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg a, .seg button {
  border: 0; background: transparent; padding: 6px 10px; border-radius: 999px; cursor: pointer; font-weight: 700; font-size: 12px; color: var(--muted);
}
.seg a.on, .seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.menu-btn { display: none; }

.hero {
  position: relative; overflow: hidden; color: #f7f3ea;
  background: var(--hero);
  min-height: 52vh; display: grid; align-items: center;
  padding: 48px 0 64px;
}
.hero::after {
  content: ""; position: absolute; inset: auto -10% -30% 40%; height: 80%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 40%, transparent), transparent 60%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; position: relative; z-index: 1; }
.hero-grid.simple { grid-template-columns: 1fr; max-width: 640px; }
.kicker {
  display: inline-flex; gap: 8px; align-items: center;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
  padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.hero h1 { font-size: clamp(1.5rem, 4.6vw, 4rem); color: #fff; max-width: 16ch; }
.hero p { color: rgba(255,255,255,.82); font-size: clamp(.9rem, 2vw, 1.125rem); max-width: 48ch; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 28px; }
.hero-stats div { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 14px; }
.hero-stats strong { display: block; font-size: 22px; color: #fff; font-family: var(--serif); }
.hero-visual {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 28px; padding: 18px;
  backdrop-filter: blur(10px);
  transform: rotate(2deg);
}
.hero-visual .mini { display: grid; gap: 10px; }
.mini-item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: rgba(8,16,12,.35); border-radius: 16px; padding: 12px 14px; color: #fff;
}
.leaf-bg {
  position: absolute; width: 280px; height: 280px; right: 8%; top: 12%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpath fill='rgba(255,255,255,.06)' d='M100 10c40 30 70 70 80 110-50-10-90 10-120 50C40 120 40 50 100 10z'/%3E%3C/svg%3E") center/contain no-repeat;
  pointer-events: none;
}

.hero-slider {
  position: relative; min-height: 72vh; overflow: hidden; color: #fff;
  background: #0f3d28;
}
.hero-slider .slides { position: absolute; inset: 0; }
.hero-slider .slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .7s var(--ease);
}
.hero-slider .slide.on { opacity: 1; z-index: 1; }
.hero-slider .slide img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transform: scale(1.04);
}
.hero-overlay {
  position: relative; z-index: 2; min-height: 72vh; display: grid; align-items: end;
  padding: 48px 0 72px;
  background: linear-gradient(180deg, rgba(8,20,14,.12) 0%, rgba(8,20,14,.28) 45%, rgba(8,20,14,.78) 100%);
}
.hero-overlay h1 { font-size: clamp(1.5rem, 4.6vw, 4rem); color: #fff; max-width: 16ch; }
.hero-overlay p { color: rgba(255,255,255,.88); font-size: clamp(.9rem, 2vw, 1.125rem); max-width: 46ch; }
.slide-btn {
  position: absolute; top: 50%; z-index: 3; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.18); color: #fff; font-size: 28px; line-height: 1;
  backdrop-filter: blur(8px);
}
.slide-btn.prev { left: 16px; }
.slide-btn.next { right: 16px; }
.slide-dots {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: 18px;
  display: flex; justify-content: center; gap: 8px;
}
.slide-dots button {
  width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0;
  background: rgba(255,255,255,.4); cursor: pointer;
}
.slide-dots button.on { background: #fff; width: 22px; border-radius: 999px; }

.section { padding: clamp(32px, 6vw, 72px) 0; }
.section-head { margin-bottom: 28px; }
.section-head h2 { font-size: clamp(1.25rem, 3vw, 2.5rem); }
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cat-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 18px;
  transition: transform .2s var(--ease), box-shadow .2s;
  min-height: 150px;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.cat-ico {
  width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 12px;
  background: color-mix(in srgb, var(--primary) 12%, var(--surface)); color: var(--primary);
}
.cat-ico svg { width: 28px; height: 28px; }
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.catalog-cta {
  display: flex;
  justify-content: center;
  margin-top: 36px;
}
.catalog-cta .btn {
  padding: 16px 40px;
  font-size: 1.08rem;
  min-width: min(340px, 100%);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 42%, transparent);
}
.product-card { display: flex; flex-direction: column; min-height: 100%; }
.product-media {
  height: 210px; background:
    var(--card-shine),
    linear-gradient(145deg, color-mix(in srgb, var(--primary) 18%, var(--surface-2)), var(--surface-2));
  display: grid; place-items: center; position: relative; overflow: hidden;
}
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-media .mark { width: 72px; height: 72px; color: var(--primary); }
.product-media .mark svg { width: 72px; height: 72px; }
.product-card .body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card h3 { font-size: clamp(.92rem, 1.6vw, 1.125rem); font-family: var(--font); letter-spacing: -0.02em; }
.price { font-weight: 800; font-size: clamp(.92rem, 1.6vw, 1.125rem); color: var(--primary); }
.product-cat { font-size: var(--fs-sm); }
.featured-chip { position: absolute; top: 8px; left: 8px; }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.trust { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; padding: 14px 0; color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.cta-band {
  margin: 20px 0 0; border-radius: 28px; padding: 36px; color: #fff;
  background: var(--hero); display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap;
}
.cta-band p { color: rgba(255,255,255,.82); }

.public-footer { border-top: 1px solid var(--line); padding: 40px 0 24px; margin-top: 20px; background: var(--bg-2); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
.public-footer a { color: var(--muted); }

.page-hero { padding: clamp(20px, 4vw, 42px) 0 12px; }
.page-hero h1 { font-size: clamp(1.35rem, 4vw, 3.2rem); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 24px; }
.filters .grow { flex: 1; min-width: 220px; }

.detail { display: grid; grid-template-columns: .9fr 1.1fr; gap: 28px; align-items: start; }
.detail-media {
  border-radius: 28px; min-height: 360px; background: linear-gradient(160deg, color-mix(in srgb, var(--primary) 20%, var(--surface)), var(--surface));
  border: 1px solid var(--line); display: grid; place-items: center;
}
.detail-media svg { width: 140px; height: 140px; color: var(--primary); }

.split-about { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; }
.value-list { display: grid; gap: 12px; }
.value-list div { padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.info-tile { padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }

.cat-filters {
  display: flex; flex-wrap: wrap; gap: 8px; max-width: 100%;
  align-items: center;
}
.cat-filter {
  display: inline-flex; align-items: center; padding: 7px 14px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font-weight: 700; font-size: 13px; color: var(--text);
  line-height: 1.2;
}
.cat-filter:hover, .cat-filter.on {
  background: var(--primary); color: #fff; border-color: transparent;
}
.cat-strip { padding: 28px 0 8px; }
.cat-strip-title { font-size: 22px; margin: 0 0 12px; }
.catalog-bar { padding: 18px 0 8px; }
.catalog-tools {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px;
}
.catalog-tools input[type="search"] {
  width: min(240px, 100%); padding: 8px 12px; font-size: 14px; border-radius: 10px;
}
.catalog-tools select { width: auto; min-width: 140px; padding: 8px 10px; font-size: 13px; }
.catalog-all { padding-bottom: 48px; }

.about-shop { max-width: 72ch; }
.about-copy { font-size: clamp(.95rem, 2vw, 1.125rem); line-height: 1.65; color: var(--text); }

.login-body {
  min-height: 100vh;
  display: grid; place-items: center;
  background:
    radial-gradient(1200px 500px at 10% -10%, color-mix(in srgb, var(--primary) 35%, transparent), transparent 60%),
    radial-gradient(900px 400px at 110% 110%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 55%),
    var(--bg);
}
.login-solo { width: min(420px, calc(100% - 32px)); padding: 28px 0; }
.login-solo .login-card { width: 100%; border-radius: 28px; box-shadow: var(--shadow); overflow: hidden; }
.login-solo .card-body { padding: 28px 26px 24px; }
.login-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; font-weight: 800; }
.login-brand small { display: block; font-weight: 600; color: var(--muted); }
.login-switches { display: flex; justify-content: space-between; gap: 10px; margin: 14px 0 18px; }
.login-form label { margin-top: 12px; }
.login-form input, .login-form select { width: 100%; }
.login-form .btn { margin-top: 20px; padding: 13px 18px; }
.login-solo h1 { font-size: clamp(1.2rem, 3vw, 1.75rem); margin: 4px 0 4px; }
.login-back { margin-top: 16px; text-align: center; font-weight: 700; }

.drop { position: relative; display: inline-block; }
.drop-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 30;
  min-width: 160px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); padding: 6px; overflow: hidden;
}
.drop.open .drop-menu { display: grid; }
.drop-menu a, .drop-menu button, .drop-menu .danger-link {
  display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0;
  background: none; border-radius: 8px; cursor: pointer; font-weight: 650; color: var(--text);
}
.drop-menu a:hover, .drop-menu button:hover { background: var(--surface-2); }
.drop-menu .danger-link, .drop-menu button.danger-link { color: var(--danger, #b42318); }
.drop-menu form { margin: 0; }

.notify-wrap { position: relative; }
.notify-btn {
  position: relative; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface-2); cursor: pointer; color: var(--text);
}
.notify-btn.has-new { border-color: var(--accent); animation: notifyPulse 1.6s ease infinite; }
@keyframes notifyPulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 40%, transparent); }
  50% { box-shadow: 0 0 0 6px transparent; }
}
.notify-btn .badge {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--accent); color: #1a1406; font-size: 10px; font-weight: 800;
  display: grid; place-items: center;
}
.notify-panel {
  display: none; position: absolute; right: 0; top: calc(100% + 8px); z-index: 40;
  width: min(320px, 80vw); background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow); padding: 12px;
}
.notify-panel.open { display: block; }
.notify-panel a { display: grid; gap: 2px; padding: 8px; border-radius: 10px; }
.notify-panel a:hover { background: var(--surface-2); }
.notify-panel .see-all { font-weight: 800; margin-top: 4px; }
.loc-line { font-size: 12px; }

.receipt-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10, 16, 12, .55);
  display: none; place-items: center; padding: 24px;
}
.receipt-overlay.open,
.receipt-overlay:not([hidden]) { display: grid; }
.receipt-overlay[hidden] { display: none !important; }
body.receipt-open { overflow: hidden; }
.receipt-dialog {
  background: var(--surface); color: var(--text);
  border-radius: 20px; padding: 18px 18px 16px; width: min(360px, 100%);
  max-height: 86vh; overflow: auto; box-shadow: var(--shadow);
}
.receipt-actions { margin-top: 14px; justify-content: flex-end; }
.print-frame {
  position: fixed !important; left: -10000px; top: 0; z-index: -1;
  width: 80mm; height: 90vh; border: 0; background: #fff;
}
.thermal-receipt { display: none; }
.rcpt { font-size: 13px; line-height: 1.4; }
.rcpt-center { text-align: center; margin-bottom: 8px; }
.rcpt-lines { width: 100%; border-collapse: collapse; }
.rcpt-lines td { padding: 3px 0; vertical-align: top; word-break: break-word; }
.rcpt-lines td:last-child { text-align: right; white-space: nowrap; width: 1%; padding-left: 10px; font-weight: 700; }
.rcpt-row { display: table; width: 100%; margin: 4px 0; }
.rcpt-row span { display: table-cell; vertical-align: top; }
.rcpt-row span:last-child { text-align: right; white-space: nowrap; width: 1%; padding-left: 10px; font-weight: 700; }
#receiptBox .rcpt { width: 100%; }

.chart-panel { margin-top: 16px; }
.dash-head {
  display: flex; flex-direction: column; align-items: stretch; gap: 12px;
  margin-bottom: 20px;
}
.dash-welcome { margin: 0; }
.dash-toolbar, .place-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 0;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.dash-group {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 2px 16px 2px 0;
}
.dash-group + .dash-group {
  padding-left: 16px;
  border-left: 1px solid var(--line);
}
.dash-group-end {
  margin-left: auto;
  padding-right: 0;
}
.dash-group-lbl {
  font-size: 11px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.dash-toolbar .loc-switch, .place-bar .loc-switch { margin: 0; }
.place-bar .toolbar { margin: 0; }
.place-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.place-head .page-head { margin-bottom: 0; }
.place-stat { font-size: 13px; font-weight: 700; color: var(--text); }
.place-stat strong { font-family: var(--serif); font-size: 1.1rem; }
.dash-block { margin-top: 20px; }
.dash-kicker {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.dash-kicker h3 { margin: 0; font-size: 1.08rem; }
.stats.kpi { margin-bottom: 4px; }
.stat.accent {
  background: color-mix(in srgb, var(--primary) 9%, var(--surface));
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
}
.stat.accent .num { color: var(--primary); }
.stat.tone-warn .num { color: var(--warn); }
.stat.tone-bad .num { color: var(--bad); }
.stat.now { padding: 14px 16px; background: var(--surface-2); }
.stat.now .num { font-size: 22px; }
.stats.three { grid-template-columns: repeat(3, 1fr); }
.chart-panel .dash-kicker { margin-bottom: 12px; }
.loss-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.loss-form input[type="number"] { width: 92px; padding: 6px 8px; }
.chart-grid {
  display: grid; grid-template-columns: 280px 1fr; gap: 20px; align-items: center; margin-top: 8px;
}
.chart-grid canvas { max-width: 100%; height: auto; }
.chart-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; font-weight: 700; margin-top: 8px; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.chart-grid h4 { margin: 0 0 8px; font-size: 14px; }

.fund-math { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fund-eq {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px;
}
.fund-eq h4 { margin: 0 0 12px; font-size: 1.02rem; }
.eq-table { width: 100%; border-collapse: collapse; }
.eq-table th, .eq-table td { padding: 8px 0; font-size: 14px; }
.eq-table th { text-align: left; font-weight: 650; color: var(--muted); }
.eq-table td { text-align: right; font-family: var(--serif); font-size: 1.2rem; font-weight: 700; }
.eq-table .eq-total th, .eq-table .eq-total td {
  border-top: 2px solid var(--line); padding-top: 12px; color: var(--primary);
}
.eq-table .eq-total td { font-size: 1.35rem; }
.fund-eq .help { margin: 12px 0 0; font-size: 13px; }
.fund-period { margin: 14px 0 0; font-size: 13px; }
.loan-view {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 0;
}
.loan-view > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 18px;
}
.loan-view > summary::-webkit-details-marker,
.loan-view > summary::marker { display: none; content: ''; }
.loan-view-copy { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.loan-view-copy strong { font-family: var(--serif); font-size: 1.08rem; }
.loan-view-peek { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 13px; font-weight: 650; }
.loan-view-peek b { color: var(--text); font-family: var(--serif); font-size: 1rem; }
.loan-view-go {
  flex: 0 0 auto; border-radius: 999px; padding: 8px 16px; font-weight: 800; font-size: 13px;
  background: var(--primary); color: #fff;
}
.loan-view[open] > summary { border-bottom: 1px solid var(--line); }
.loan-view[open] .when-closed { display: none; }
.loan-view:not([open]) .when-open { display: none; }
.loan-view-body { padding: 16px 18px 18px; }
.loan-view-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.col-toggles { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.col-off { display: none !important; }
.print-head { display: none; }
.report-filters { margin-bottom: 14px; }

.login-wrap {
  min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr;
}
.login-art { background: var(--hero); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.login-art h1 { font-size: clamp(1.6rem, 4vw, 3rem); color: #fff; }
.login-panel { display: grid; place-items: center; padding: 32px; }
.login-card { width: min(420px, 100%); }

.app-shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  background: color-mix(in srgb, var(--primary-2) 88%, #000);
  color: #e9f3ec; padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow: auto;
  padding-top: calc(18px + env(safe-area-inset-top));
}
.sidebar .brand small { color: rgba(255,255,255,.65); }
.side-group { margin: 18px 8px 8px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .55; font-weight: 800; }
.side-link {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border-radius: 12px; color: rgba(255,255,255,.78); font-weight: 650; margin-bottom: 4px;
}
.side-link:hover, .side-link.active { background: rgba(255,255,255,.1); color: #fff; }
.side-link .badge {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center;
  background: var(--accent); color: #1a1406; font-size: 11px;
}
.side-fold { margin: 0 0 6px; }
.side-fold-btn {
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  user-select: none;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 800;
  color: rgba(255,255,255,.52);
  text-align: left;
}
.side-fold-btn:hover { color: #fff; background: rgba(255,255,255,.06); }
.side-fold.open > .side-fold-btn { color: rgba(255,255,255,.78); }
.side-fold-btn::after {
  content: '';
  width: 6px; height: 6px; flex: 0 0 auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: .7;
  transition: transform .15s var(--ease);
}
.side-fold.open > .side-fold-btn::after {
  transform: rotate(225deg);
  margin-top: 3px;
}
.side-fold-body { display: none; }
.side-fold.open > .side-fold-body { display: block; }
.side-fold .side-link { margin-left: 2px; }
.side-logout { margin-top: 10px; color: rgba(255,255,255,.55); }
.side-sync {
  margin: 8px 12px 14px;
  padding: 8px 0 0;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: 11px;
  line-height: 1.45;
  color: rgba(255,255,255,.72);
}
.side-sync strong {
  display: block;
  color: #fff;
  font-weight: 700;
  margin-bottom: 2px;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 10px;
}
.main { min-width: 0; }
.topbar {
  min-height: 68px; height: auto; display: flex; align-items: center; justify-content: space-between;
  padding: 8px 22px; padding-top: calc(8px + env(safe-area-inset-top));
  border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 20;
  gap: 10px; flex-wrap: wrap;
}
.topbar-start, .topbar-end { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.topbar-end { justify-content: flex-end; margin-left: auto; }
.topbar-title { min-width: 0; }
.topbar-title strong { display: block; font-size: 0.95rem; }
.page { padding: var(--pad); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat {
  padding: 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line);
}
.stat .lbl { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.stat .num { font-size: clamp(1.25rem, 2vw, 1.75rem); font-family: var(--serif); margin-top: 6px; }
.two { display: grid; grid-template-columns: 1.3fr .7fr; gap: 16px; }

.pos-layout { display: grid; grid-template-columns: 1.35fr .65fr; gap: 16px; min-height: calc(100vh - 112px); }
.pos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-content: start; max-height: calc(100vh - 220px); overflow: auto; }
.pos-item {
  text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 16px; padding: 12px; cursor: pointer;
}
@media (hover: hover) {
  .pos-item:hover { border-color: var(--primary); }
}
.pos-item strong { display: block; font-size: 14px; }
.cart { display: flex; flex-direction: column; min-height: 100%; }
.cart-body { display: flex; flex-direction: column; height: 100%; }
.cart-lines { flex: 1; overflow: auto; max-height: 38vh; }
.cart-line { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.qty-ctrl { display: flex; align-items: center; gap: 6px; }
.qty-ctrl button { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; }
.totals { display: grid; gap: 8px; padding-top: 10px; }
.totals div { display: flex; justify-content: space-between; }
.pay-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pay-grid button { border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 8px; cursor: pointer; font-weight: 700; font-size: 12px; min-height: 40px; }
.pay-grid button.on { background: var(--primary); color: #fff; border-color: transparent; }
.pos-dock, .cart-scrim, .cart-close { display: none; }
.pos-launch { display: none; }
.pos-dock.pulse { transform: scale(1.02); }

.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); font-weight: 700; font-size: 13px; }
.tabs a.on { background: var(--primary); color: #fff; border-color: transparent; }

.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 20%, var(--surface));
  display: grid; place-items: center; font-weight: 800; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.here-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 6px 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 13px;
}
.here-bar .here-kicker {
  font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.here-bar strong { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.here-bar select { width: auto; min-width: 160px; max-width: 220px; padding: 6px 10px; border-radius: 999px; }
.here-bar .here-name { font-weight: 800; padding-right: 8px; }
.here-bar.here-station { background: color-mix(in srgb, var(--primary) 14%, var(--surface)); border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); }
.here-bar.here-station strong { color: var(--primary); }
.here-bar.here-warehouse { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.here-bar.here-warehouse strong { color: color-mix(in srgb, var(--primary-2) 70%, var(--accent)); }
.store-pick span { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.store-pick select { max-width: 150px; }
tr.is-current td { background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
.dest-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin-top: 6px; }
.dest-pick {
  position: relative;
  display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 14px; cursor: pointer; background: var(--surface-2);
}
.dest-pick input { position: absolute; opacity: 0; pointer-events: none; }
.dest-pick.on, .dest-pick:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--surface)); }
.fund-board { margin: 0 0 16px; }
.alloc-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.alloc-pick {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface); min-height: 92px;
}
.alloc-pick:hover { border-color: var(--primary); }
.alloc-pick.on {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
}
.alloc-pick strong { font-size: 15px; }
.alloc-left { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; color: var(--primary); }
.product-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.product-filter { margin: 0; flex: 1; }
.product-filter input[type="search"] { max-width: 220px; }
.product-filter select { width: auto; min-width: 140px; }

.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.pager { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.pager a, .pager span { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); }

.receipt { width: 280px; margin: 0 auto; font-size: 12px; }
.scheme-picks { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.scheme-picks label { border: 2px solid var(--line); border-radius: 14px; padding: 10px; cursor: pointer; text-align: center; font-size: 11px; }
.scheme-picks input { display: none; }
.scheme-picks input:checked + span, .scheme-picks label:has(input:checked) { border-color: var(--primary); }
.swatch { height: 18px; border-radius: 999px; margin-bottom: 6px; }

.mobile-side { display: none; }
.notice-strip {
  display: flex; gap: 10px; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-radius: 14px; margin-bottom: 14px;
  background: color-mix(in srgb, var(--warn) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 30%, var(--line));
}

.page-head { margin-bottom: 14px; }
.page-head h2 { font-size: clamp(1.1rem, 2vw, 1.35rem); margin: 0; font-family: var(--serif); }
.lede { font-size: 13px; margin: 4px 0 0; color: var(--muted); }
.toolbar {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  margin-bottom: 14px;
}
.toolbar .btn.on, .toolbar .btn.secondary.on {
  background: var(--primary); color: #fff; border-color: transparent; box-shadow: none;
}
.loc-switch { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.loc-switch a {
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font-weight: 700; font-size: 13px; color: var(--muted);
}
.loc-switch a.on, .loc-switch a:hover { background: var(--primary); color: #fff; border-color: transparent; }
.tools-panel {
  display: none; margin-bottom: 14px;
  padding: 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.tools-panel.open { display: block; }
.tools-panel h3 { margin: 0 0 10px; font-size: 1.1rem; }
.filters { margin: 0; }
.filters.compact {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: end;
}
.filters.compact input,
.filters.compact select {
  width: auto; min-width: 128px; max-width: 220px;
  padding: 7px 10px; font-size: 13px; border-radius: 10px;
}
.filters.compact input[type="search"] { min-width: 180px; flex: 1; max-width: 280px; }
.pos-tools {
  display: flex; gap: 8px; margin-bottom: 10px; align-items: center; flex-wrap: wrap;
}
.pos-tools input, .pos-tools select {
  padding: 8px 10px; font-size: 13px; border-radius: 10px; width: auto;
}
.pos-tools input[type="search"] { flex: 1; min-width: 160px; max-width: 240px; }
.pos-tools select { min-width: 130px; max-width: 180px; }
.qty-unit { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.qty-unit small { font-weight: 600; color: var(--muted); margin-left: 2px; }
.cell-stack { display: flex; flex-direction: column; gap: 6px; min-width: 148px; }
.cell-stack select { padding: 7px 10px; font-size: 13px; border-radius: 10px; }
.cost-hint { font-size: 11px; color: var(--muted); margin: 0; white-space: normal; }
.batch-picks { display: flex; flex-wrap: wrap; gap: 4px; max-width: 240px; }
.batch-picks button {
  border: 1px solid var(--line); background: var(--surface-2); color: var(--muted);
  border-radius: 999px; padding: 3px 8px; font-size: 11px; font-weight: 700; cursor: pointer;
}
.batch-picks button:hover { border-color: var(--primary); color: var(--text); }
table.data td.wrap { white-space: normal; vertical-align: top; }
.form-stack [data-new-batch-fields] label { display: block; margin-top: 12px; }
.form-stack > label { margin-top: 12px; }
.form-stack > label:first-of-type { margin-top: 0; }
.form-stack .help { margin-bottom: 8px; }
.form-stack .btn { margin-top: 14px; }
.matrix { width: 100%; border-collapse: collapse; font-size: 13px; }
.matrix th, .matrix td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: center; }
.matrix th { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.matrix th:first-child, .matrix td:first-child { text-align: left; font-weight: 650; }
.matrix input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); }
.summary-bar {
  display: flex; gap: 16px; flex-wrap: wrap; align-items: baseline;
  margin: 0 0 12px; font-size: 14px;
}
.summary-bar strong { font-family: var(--serif); font-size: 1.15rem; }
.role-pill {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  background: color-mix(in srgb, var(--primary) 12%, var(--surface)); color: var(--primary);
}
.inv-empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.inv-empty .btn { margin-top: 12px; }

.drawer-scrim {
  display: none;
  position: fixed; inset: 0; z-index: 44;
  border: 0; padding: 0; margin: 0;
  background: rgba(8, 16, 12, 0.46);
  cursor: pointer;
}
body.drawer-open { overflow: hidden; }

@media (max-width: 1100px) {
  :root {
    --gutter: 24px;
    --pad: 16px;
    --header: 60px;
  }
  .hero-grid, .detail, .split-about, .contact-grid, .login-wrap, .pos-layout, .two, .footer-grid, .chart-grid, .fund-math {
    grid-template-columns: 1fr;
  }
  .product-grid, .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .why-grid { grid-template-columns: 1fr 1fr; }
  .stats, .dash-week, .stats.five, .dash-week.four, .stats.kpi, .stats.now, .stats.three { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: min(86vw, 300px); max-width: 100%;
    transform: translateX(-110%); transition: transform .25s var(--ease); z-index: 50;
    height: 100%;
  }
  .sidebar.open { transform: none; }
  .app-shell:has(.sidebar.open) > .drawer-scrim,
  .public-header:has(.nav.open) > .drawer-scrim { display: block; }
  .mobile-side { display: inline-flex; min-height: var(--tap); }
  .menu-btn { display: inline-flex; min-height: var(--tap); }
  .nav { display: none; flex: none; }
  .nav.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
    padding: 8px; z-index: 50; box-shadow: var(--shadow); max-height: min(78vh, 640px); overflow: auto;
  }
  .public-header .inner { position: relative; }
  .nav.open > a { padding: 11px 12px; font-size: 0.92rem; }
  .nav-tools {
    flex-wrap: wrap; margin-top: 6px; margin-left: 0; padding-top: 10px;
    border-top: 1px solid var(--line); width: 100%;
  }
  .nav-tools .btn { width: 100%; }
  .hero, .hero-slider, .hero-overlay { min-height: 48vh; }
  .hero-overlay { padding: 28px 0 48px; align-items: end; }
  .span-2 { grid-column: span 1; }
  .pos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: none; }
  .pos-launch { display: inline-flex; }
  .pos-launch-wide { display: none; }
  .pos-hint { display: none; }
  .page-pos {
    padding-bottom: calc(84px + env(safe-area-inset-bottom));
  }
  .page-pos .pos-layout {
    min-height: 0;
    gap: 10px;
  }
  .pos-item {
    min-height: 76px;
    padding: 12px 10px;
  }
  .pos-dock {
    display: flex;
    align-items: center;
    gap: 10px;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 30;
    min-height: 52px;
    padding: 8px 10px 8px 14px;
    border: 0;
    border-radius: 16px;
    background: var(--primary);
    color: #fff;
    font: inherit;
    font-weight: 700;
    box-shadow: 0 12px 28px color-mix(in srgb, var(--primary) 40%, transparent);
    cursor: pointer;
    transition: transform .18s var(--ease);
  }
  .pos-dock-meta { display: flex; align-items: baseline; gap: 6px; margin-right: auto; }
  .pos-dock-meta strong { font-size: 1.1rem; }
  .pos-dock-go {
    background: rgba(255,255,255,.16);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 13px;
  }
  .cart-close { display: inline-flex; }
  .page-pos .cart {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 40;
    width: 100%;
    max-height: min(90vh, 760px);
    margin: 0;
    min-height: 0;
    border-radius: 20px 20px 0 0;
    transform: translateY(110%);
    transition: transform .22s var(--ease);
    box-shadow: 0 -12px 40px rgba(0,0,0,.18);
  }
  .page-pos .cart.open { transform: none; }
  .page-pos .cart-body {
    height: auto;
    max-height: min(90vh, 760px);
    overflow: auto;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }
  .page-pos .cart-lines { max-height: none; flex: none; }
  .cart-scrim {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 35;
    border: 0;
    background: rgba(8, 16, 12, 0.45);
  }
  body.cart-open { overflow: hidden; }
  body.cart-open .cart-scrim { display: block; }
  .scheme-picks { grid-template-columns: repeat(3, 1fr); }
  .catalog-cta .btn { min-width: 0; width: 100%; padding: 12px 18px; font-size: 0.95rem; }
}

@media (max-width: 720px) {
  :root {
    --fs: 15px;
    --fs-sm: 12px;
    --gutter: 20px;
    --pad: 12px;
    --header: 54px;
    --radius: 14px;
    --radius-sm: 10px;
    --tap: 42px;
  }
  .brand { gap: 8px; font-size: 0.92rem; }
  .brand-mark { width: 32px; height: 32px; border-radius: 10px; font-size: 12px; }
  .public-header .brand small { display: none; }
  .seg a, .seg button { padding: 5px 8px; font-size: 11px; }
  .btn { padding: 9px 14px; }
  .btn.sm { padding: 7px 10px; font-size: 12px; }
  .card-body, .panel { padding: 14px; }
  .product-media { height: 132px; }
  .product-card .body { padding: 10px 10px 12px; gap: 5px; }
  .product-card .chip { font-size: 10px; padding: 3px 7px; }
  .product-card .spread { flex-wrap: nowrap; align-items: baseline; gap: 6px; }
  .product-card .spread .muted { font-size: 11px; white-space: nowrap; }
  .cat-card { min-height: 0; padding: 12px; border-radius: 16px; }
  .cat-ico { width: 36px; height: 36px; border-radius: 12px; margin-bottom: 8px; }
  .cat-ico svg { width: 20px; height: 20px; }
  .cat-strip-title { font-size: 1.05rem; }
  .cat-filter { padding: 6px 10px; font-size: 12px; }
  .hero-slider, .hero-overlay { min-height: 38vh; }
  .slide-btn { width: 36px; height: 36px; font-size: 22px; }
  .slide-btn.prev { left: 8px; }
  .slide-btn.next { right: 8px; }
  .why-grid, .form-grid, .contact-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 18px; border-radius: 18px; }
  .public-footer { padding: 24px 0 16px; }
  .footer-grid { gap: 16px; }
  .detail-media { min-height: 220px; border-radius: 18px; }
  .filters .grow, .filters.compact input, .filters.compact select,
  .filters.compact input[type="search"], .catalog-tools input[type="search"],
  .pos-tools input, .pos-tools select, .product-filter input[type="search"], .product-filter select {
    min-width: 0; max-width: none; width: 100%;
  }
  .catalog-tools, .pos-tools, .product-tools, .filters.compact { flex-direction: column; align-items: stretch; }
  .login-solo { width: min(100%, calc(100% - 20px)); padding: 16px 0 28px; }
  .login-solo .card-body { padding: 18px 16px 16px; }
  .login-solo .login-card { border-radius: 20px; }
  .login-art { padding: 28px 20px; }
  .login-panel { padding: 16px; }
  .topbar {
    padding: 8px 12px; padding-top: calc(8px + env(safe-area-inset-top));
    min-height: 52px;
  }
  .topbar-start { width: 100%; }
  .topbar-end { width: 100%; margin-left: 0; gap: 6px; }
  .topbar-title strong { font-size: 0.88rem; }
  .loc-line { font-size: 11px; }
  .here-bar {
    width: 100%; border-radius: 12px; padding: 6px 8px;
    justify-content: space-between;
  }
  .here-bar select { min-width: 0; max-width: none; flex: 1; }
  .notify-btn { width: 36px; height: 36px; }
  .avatar { width: 32px; height: 32px; }
  .stats, .stats.kpi, .stats.three, .stats.now { gap: 8px; }
  .stat, .stat.now { padding: 12px; border-radius: 14px; }
  .stat .lbl { font-size: 10px; }
  .dash-toolbar, .place-bar { padding: 8px 10px; border-radius: 12px; }
  .dash-group + .dash-group, .dash-group-end {
    border-left: 0; padding-left: 0; padding-top: 8px; margin-top: 4px; margin-left: 0;
    border-top: 1px solid var(--line); width: 100%;
  }
  .table-wrap { margin-inline: -12px; padding-inline: 12px; -webkit-overflow-scrolling: touch; }
  table.data { font-size: 12px; }
  table.data th, table.data td { padding: 8px 7px; white-space: normal; }
  .toolbar .btn { min-height: var(--tap); }
  .pay-grid { grid-template-columns: repeat(2, 1fr); }
  .pos-item { padding: 10px; border-radius: 12px; }
  .pos-item strong { font-size: 13px; }
  .qty-ctrl button { width: 40px; height: 40px; }
  .cart-line { grid-template-columns: 1fr auto; gap: 6px 10px; }
  .cart-line > strong:last-child { grid-column: 2; grid-row: 1; }
  .alloc-picks, .dest-picks { grid-template-columns: 1fr 1fr; }
  .alloc-pick { min-height: 0; padding: 10px 12px; }
  .alloc-left { font-size: 1.05rem; }
  .loan-view > summary { padding: 12px; flex-wrap: wrap; }
  .loan-view-go { width: 100%; text-align: center; }
  .notify-panel { width: min(100vw - 24px, 320px); right: -8px; }
  .receipt-overlay { padding: 12px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .receipt-dialog { padding: 14px; border-radius: 16px; max-height: 90vh; }
  .scheme-picks { grid-template-columns: repeat(2, 1fr); }
  .page { padding-bottom: calc(var(--pad) + env(safe-area-inset-bottom)); }
  .input, .select, .textarea, input[type="text"], input[type="password"], input[type="email"],
  input[type="number"], input[type="date"], input[type="file"], input[type="search"], input[type="tel"],
  select, textarea { padding: 10px 11px; font-size: 16px; border-radius: 10px; }
  label { font-size: 12px; }
}

@media (max-width: 400px) {
  .alloc-picks, .dest-picks, .stats, .stats.kpi, .stats.three, .stats.now {
    grid-template-columns: 1fr;
  }
  .pos-grid { grid-template-columns: 1fr 1fr; }
}

@media print {
  .sidebar, .topbar, .btn, .filters, .toolbar, .tools-panel, .loc-switch, .no-print,
  .receipt-overlay, .notify-wrap, .print-frame, .drop, .tabs, .product-tools,
  .wa-float, .install-modal, .sync-pill, .pos-dock { display: none !important; }
  .app-shell, .main, .page { display: block; padding: 0; background: #fff; color: #000; }
  body { background: #fff; }
  .print-head { display: block; margin-bottom: 12px; }
  .report-table, .panel { box-shadow: none; border: 0; padding: 0; }
  .col-off { display: none !important; }
  table.data th, table.data td { white-space: normal; }
  .receipt-overlay.open { display: none !important; }
  .sheet-wrap { box-shadow: none; }
}

.sync-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); white-space: nowrap;
}
.sync-pill.online { color: #188038; border-color: #b7e1c4; background: #e6f4ea; }
.sync-pill.offline { color: #8a1f11; border-color: #f5c6c0; background: #fce8e6; }
.sync-pill.syncing { color: #8a5a00; border-color: #f6d9a0; background: #fff4e5; }
.barcode-field { display: flex; gap: 8px; align-items: stretch; }
.barcode-field input { flex: 1; min-width: 0; }
.barcode-field .btn { flex: 0 0 auto; white-space: nowrap; }
.pos-scan-note { margin: 0 0 10px; font-size: 12px; }
.pos-scan-note.is-err { color: var(--bad); }
.install-modal {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 240;
  display: flex; justify-content: center; align-items: flex-end;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  pointer-events: none; background: none;
}
.install-card {
  pointer-events: auto; position: relative; overflow: hidden;
  width: min(440px, 100%);
  padding: 16px 16px 18px; border-radius: 20px; color: var(--text);
  background: color-mix(in srgb, var(--surface) 64%, transparent);
  border: 1px solid color-mix(in srgb, #fff 52%, var(--line));
  box-shadow: 0 16px 40px rgba(16, 32, 24, .18);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}
[data-theme="dark"] .install-card {
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  border-color: color-mix(in srgb, #fff 14%, transparent);
  box-shadow: 0 16px 40px rgba(0,0,0,.38);
}
.install-card h2 { margin: 0 0 6px; font-size: 1.12rem; }
.install-card p { margin: 0; font-size: 13px; line-height: 1.4; }
.install-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.install-actions .btn { width: 100%; min-height: 42px; }
.install-timer {
  position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px;
  border-radius: 99px; background: color-mix(in srgb, var(--primary) 55%, transparent);
  transform-origin: left center; animation: install-tick 5s linear forwards;
}
@keyframes install-tick { from { transform: scaleX(1); } to { transform: scaleX(0); } }
body.install-open {
  padding-bottom: calc(10.75rem + env(safe-area-inset-bottom));
}
body:has(.page-pos).install-open {
  padding-bottom: calc(10.75rem + 84px + env(safe-area-inset-bottom));
}
body.install-open .wa-float {
  bottom: calc(11rem + env(safe-area-inset-bottom));
}
.wa-float {
  position: fixed; right: 16px; bottom: 16px; z-index: 40;
  background: #25d366; color: #fff; font-weight: 700; text-decoration: none;
  padding: 12px 16px; border-radius: 999px; box-shadow: 0 8px 24px rgba(37,211,102,.4);
}
.wa-float:hover { filter: brightness(1.05); color: #fff; }
.map-embed {
  border-radius: 16px; overflow: hidden; border: 1px solid var(--line);
  min-height: 280px; background: #e8efe9;
}
.map-embed iframe { display: block; width: 100%; height: 320px; border: 0; }
.visit-grid {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 24px; align-items: start;
}
.sheet-wrap { overflow: auto; border: 1px solid #c5c5c5; background: #fff; }
table.sheet { width: 100%; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 13px; color: #222; }
table.sheet th, table.sheet td { border: 1px solid #d0d0d0; padding: 8px 10px; text-align: right; }
table.sheet th:first-child, table.sheet td:first-child { text-align: left; }
table.sheet thead th { background: #34a853; color: #fff; font-weight: 700; position: sticky; top: 0; }
table.sheet tbody tr:nth-child(even) { background: #f8f9fa; }
table.sheet .sheet-total td { font-weight: 700; background: #eef6f0; }
.sheet-pos { color: #188038; }
.sheet-neg { color: #c5221f; }
.scan-stage {
  position: relative; margin-bottom: 10px; border-radius: 12px; overflow: hidden;
  background: #111; max-height: 220px;
}
.scan-stage video { width: 100%; height: 220px; object-fit: cover; }
.scan-stage .btn { position: absolute; top: 8px; right: 8px; }
.linkish { background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }

@media (max-width: 800px) {
  .visit-grid { grid-template-columns: 1fr; }
  .sync-pill { order: -1; }
}

@media (max-width: 720px) {
  .barcode-field { flex-direction: column; }
  .install-modal { padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); }
  .install-card { width: 100%; border-radius: 18px; padding: 14px 14px 16px; }
  .install-card h2 { font-size: 1.02rem; }
  .install-card p { font-size: 12px; }
  .install-actions { grid-template-columns: 1fr; gap: 8px; }
  .install-actions .btn { min-height: 44px; }
}

@media (max-width: 1100px) {
  body:has(.page-pos).install-open .install-modal {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }
}

