/* SADA Commerce — Imigongo design system. No external fonts, no gold. */
:root {
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --accent: #2f6b4f;
  --accent-ink: #ffffff;
  --accent-deep: color-mix(in srgb, var(--accent) 74%, #0d1a14);
  --accent-soft: color-mix(in srgb, var(--accent) 11%, #fffdf7);
  --accent-line: color-mix(in srgb, var(--accent) 32%, #ded8c8);
  --paper: #f1eee4;
  --paper-2: #e8e3d5;
  --panel: #fffdf8;
  --panel-2: #f8f5ec;
  --ink: #1a201c;
  --muted: #686f66;
  --line: #ded8c8;
  --line-strong: #c6bfab;
  --rail: #2b1713;
  --rail-2: #45251c;
  --rail-3: #5c3526;
  --rail-ink: #f8f1e4;
  --rail-muted: #cbaf9c;
  --clay: #a3543f;
  --ok: #2f6b4f;
  --warn: #8a5d18;
  --danger: #993b31;
  --info: #2c5c6c;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 18px 44px rgba(20, 32, 26, 0.09);
  --shadow-sm: 0 6px 18px rgba(20, 32, 26, 0.07);
  --disc: 48px;
  --rail-w: 188px;
  --ref-rail-width: 172px;
  --imig-ink: #21402f;

  /* Navigation identity — the approved tyre-ring rail and its More circle.
     Ink follows the canvas, not a dark-panel constant: dark wording on the
     cream light theme, cream on the dark one. The tenant accent owns every
     active state. */
  --ref-ink: #F6EAC8;
  --ref-ink-dim: #A99C81;
  --ref-topbar-a: #1B1711;
  --ref-topbar-b: #100E0A;
  --ref-hairline: color-mix(in srgb, var(--accent) 34%, transparent);
  --ref-hairline-soft: color-mix(in srgb, var(--accent) 18%, transparent);
  --nav-ink: #241E14;
  --nav-ink-dim: #5B5344;
  --nav-active-ink: color-mix(in srgb, var(--accent) 62%, #241E14);
  --nav-label-ink: #241E14;
  --nav-label-shadow: 0 1px 2px rgba(255, 255, 255, .95), 0 0 4px rgba(255, 255, 255, .75);
  --nav-card-ground: color-mix(in srgb, var(--panel) 94%, var(--accent) 6%);
  --nav-card-edge: color-mix(in srgb, var(--accent) 32%, var(--line-strong));
  --nav-card-shadow: 0 24px 50px -34px rgba(66, 50, 18, .42), 0 2px 8px rgba(66, 50, 18, .08);
  --nav-disc-ground: var(--panel);
  --nav-disc-ink: color-mix(in srgb, var(--accent) 76%, #3A2F1C);
  --nav-disc-edge: inset 0 1px 0 rgba(255, 255, 255, .9);
  --nav-disc-shadow: 0 8px 16px -12px rgba(66, 50, 18, .35);
  --nav-band-ground: color-mix(in srgb, var(--panel) 84%, var(--accent) 16%);
  --nav-imig-ink: color-mix(in srgb, var(--accent) 60%, #2B2620);
  --nav-imig-opacity: .34;
  --nav-imig-cell: 84px;
  --page-imig-ink: color-mix(in srgb, var(--accent) 55%, #2B2620);
  --page-imig-opacity: .30;

  /* Imigongo artwork — the approved nested-diamond spiral, shared verbatim
     with the Restaurant Platform. The 96px cell is the canvas and sidebar
     weave; the 120px band is the navigation ribbon; both are alpha masks so
     the tenant accent paints the same geometry in either theme. */
  --imig-cell:96px;
  --imig-light-bg:url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2796%27%20height%3D%2796%27%20viewBox%3D%270%200%2096%2096%27%3E%3Cpath%20d%3D%27M0%200%2022%200%200%2022Z%27%20fill%3D%27%233b3833%27%20fill-opacity%3D%270.26%27%2F%3E%3Cpath%20d%3D%27M96%200%2074%200%2096%2022Z%27%20fill%3D%27%233b3833%27%20fill-opacity%3D%270.26%27%2F%3E%3Cpath%20d%3D%27M0%2096%2022%2096%200%2074Z%27%20fill%3D%27%233b3833%27%20fill-opacity%3D%270.26%27%2F%3E%3Cpath%20d%3D%27M96%2096%2074%2096%2096%2074Z%27%20fill%3D%27%233b3833%27%20fill-opacity%3D%270.26%27%2F%3E%3Cpath%20d%3D%27M48%205%2091%2048%2048%2091%205%2048Z%27%20fill%3D%27none%27%20stroke%3D%27%233b3833%27%20stroke-opacity%3D%270.38%27%20stroke-width%3D%271.6%27%2F%3E%3Cpath%20d%3D%27M48%2017%2079%2048%2048%2079%2017%2048Z%27%20fill%3D%27none%27%20stroke%3D%27%236d675c%27%20stroke-opacity%3D%270.44%27%20stroke-width%3D%271.2%27%2F%3E%3Cpath%20d%3D%27M48%2029%2067%2048%2048%2067%2029%2048Z%27%20fill%3D%27none%27%20stroke%3D%27%236d675c%27%20stroke-opacity%3D%270.44%27%20stroke-width%3D%271.2%27%2F%3E%3Cpath%20d%3D%27M48%2038%2058%2048%2048%2058%2038%2048Z%27%20fill%3D%27%238c6a2f%27%20fill-opacity%3D%270.6%27%2F%3E%3Cpath%20d%3D%27M48%2044.5%2051.5%2048%2048%2051.5%2044.5%2048Z%27%20fill%3D%27%233b3833%27%20fill-opacity%3D%270.26%27%2F%3E%3Cpath%20d%3D%27M24%2019%2029%2024%2024%2029%2019%2024Z%27%20fill%3D%27%236d675c%27%20fill-opacity%3D%270.34%27%2F%3E%3Cpath%20d%3D%27M72%2019%2077%2024%2072%2029%2067%2024Z%27%20fill%3D%27%236d675c%27%20fill-opacity%3D%270.34%27%2F%3E%3Cpath%20d%3D%27M24%2067%2029%2072%2024%2077%2019%2072Z%27%20fill%3D%27%236d675c%27%20fill-opacity%3D%270.34%27%2F%3E%3Cpath%20d%3D%27M72%2067%2077%2072%2072%2077%2067%2072Z%27%20fill%3D%27%236d675c%27%20fill-opacity%3D%270.34%27%2F%3E%3Cpath%20d%3D%27M24%2024%2034%2034M72%2024%2062%2034M24%2072%2034%2062M72%2072%2062%2062%27%20fill%3D%27none%27%20stroke%3D%27%233b3833%27%20stroke-opacity%3D%270.38%27%20stroke-width%3D%271%27%2F%3E%3Cpath%20d%3D%27M48%200v5M48%2091v5M0%2048h5M91%2048h5%27%20fill%3D%27none%27%20stroke%3D%27%236d675c%27%20stroke-opacity%3D%270.44%27%20stroke-width%3D%271.2%27%2F%3E%3C%2Fsvg%3E");
  --imig-dark-bg:url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2796%27%20height%3D%2796%27%20viewBox%3D%270%200%2096%2096%27%3E%3Cpath%20d%3D%27M0%200%2022%200%200%2022Z%27%20fill%3D%27%23c9c5ba%27%20fill-opacity%3D%270.26%27%2F%3E%3Cpath%20d%3D%27M96%200%2074%200%2096%2022Z%27%20fill%3D%27%23c9c5ba%27%20fill-opacity%3D%270.26%27%2F%3E%3Cpath%20d%3D%27M0%2096%2022%2096%200%2074Z%27%20fill%3D%27%23c9c5ba%27%20fill-opacity%3D%270.26%27%2F%3E%3Cpath%20d%3D%27M96%2096%2074%2096%2096%2074Z%27%20fill%3D%27%23c9c5ba%27%20fill-opacity%3D%270.26%27%2F%3E%3Cpath%20d%3D%27M48%205%2091%2048%2048%2091%205%2048Z%27%20fill%3D%27none%27%20stroke%3D%27%23c9c5ba%27%20stroke-opacity%3D%270.52%27%20stroke-width%3D%271.6%27%2F%3E%3Cpath%20d%3D%27M48%2017%2079%2048%2048%2079%2017%2048Z%27%20fill%3D%27none%27%20stroke%3D%27%239a968b%27%20stroke-opacity%3D%270.54%27%20stroke-width%3D%271.2%27%2F%3E%3Cpath%20d%3D%27M48%2029%2067%2048%2048%2067%2029%2048Z%27%20fill%3D%27none%27%20stroke%3D%27%239a968b%27%20stroke-opacity%3D%270.54%27%20stroke-width%3D%271.2%27%2F%3E%3Cpath%20d%3D%27M48%2038%2058%2048%2048%2058%2038%2048Z%27%20fill%3D%27%23cbb27a%27%20fill-opacity%3D%270.5%27%2F%3E%3Cpath%20d%3D%27M48%2044.5%2051.5%2048%2048%2051.5%2044.5%2048Z%27%20fill%3D%27%23c9c5ba%27%20fill-opacity%3D%270.26%27%2F%3E%3Cpath%20d%3D%27M24%2019%2029%2024%2024%2029%2019%2024Z%27%20fill%3D%27%239a968b%27%20fill-opacity%3D%270.36%27%2F%3E%3Cpath%20d%3D%27M72%2019%2077%2024%2072%2029%2067%2024Z%27%20fill%3D%27%239a968b%27%20fill-opacity%3D%270.36%27%2F%3E%3Cpath%20d%3D%27M24%2067%2029%2072%2024%2077%2019%2072Z%27%20fill%3D%27%239a968b%27%20fill-opacity%3D%270.36%27%2F%3E%3Cpath%20d%3D%27M72%2067%2077%2072%2072%2077%2067%2072Z%27%20fill%3D%27%239a968b%27%20fill-opacity%3D%270.36%27%2F%3E%3Cpath%20d%3D%27M24%2024%2034%2034M72%2024%2062%2034M24%2072%2034%2062M72%2072%2062%2062%27%20fill%3D%27none%27%20stroke%3D%27%23c9c5ba%27%20stroke-opacity%3D%270.52%27%20stroke-width%3D%271%27%2F%3E%3Cpath%20d%3D%27M48%200v5M48%2091v5M0%2048h5M91%2048h5%27%20fill%3D%27none%27%20stroke%3D%27%239a968b%27%20stroke-opacity%3D%270.54%27%20stroke-width%3D%271.2%27%2F%3E%3C%2Fsvg%3E");
  --imig-band:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'120'%20height%3D'120'%20viewBox%3D'0%200%20120%20120'%3E%3Cg%20fill%3D'%23fff'%3E%3Cpath%20d%3D'M0%200h60L30%2030ZM0%2060h60L30%2030ZM0%2060h60L30%2090ZM0%20120h60L30%2090ZM60%200h60L90%2030ZM60%2060h60L90%2030ZM60%2060h60L90%2090ZM60%20120h60L90%2090Z'%20fill-opacity%3D'.3'%2F%3E%3Cpath%20d%3D'M60%200v60L30%2030ZM0%200v60L30%2030ZM60%2060v60L30%2090ZM0%2060v60L30%2090ZM120%200v60L90%2030ZM60%200v60L90%2030ZM120%2060v60L90%2090ZM60%2060v60L90%2090Z'%20fill-opacity%3D'.13'%2F%3E%3Cpath%20d%3D'M0%20-30L30%200L0%2030L-30%200ZM0%2030L30%2060L0%2090L-30%2060ZM0%2090L30%20120L0%20150L-30%20120ZM60%20-30L90%200L60%2030L30%200ZM60%2030L90%2060L60%2090L30%2060ZM60%2090L90%20120L60%20150L30%20120ZM120%20-30L150%200L120%2030L90%200ZM120%2030L150%2060L120%2090L90%2060ZM120%2090L150%20120L120%20150L90%20120Z'%20fill%3D'none'%20stroke%3D'%23fff'%20stroke-opacity%3D'.42'%20stroke-width%3D'2'%2F%3E%3Cpath%20d%3D'M30%206L54%2030L30%2054L6%2030ZM30%2066L54%2090L30%20114L6%2090ZM90%206L114%2030L90%2054L66%2030ZM90%2066L114%2090L90%20114L66%2090Z'%20fill%3D'none'%20stroke%3D'%23fff'%20stroke-opacity%3D'.92'%20stroke-width%3D'2.6'%2F%3E%3Cpath%20d%3D'M30%2017L43%2030L30%2043L17%2030ZM30%2077L43%2090L30%20103L17%2090ZM90%2017L103%2030L90%2043L77%2030ZM90%2077L103%2090L90%20103L77%2090Z'%20fill%3D'none'%20stroke%3D'%23fff'%20stroke-opacity%3D'.6'%20stroke-width%3D'1.8'%2F%3E%3Cpath%20d%3D'M30%2025L35%2030L30%2035L25%2030ZM30%2085L35%2090L30%2095L25%2090ZM90%2025L95%2030L90%2035L85%2030ZM90%2085L95%2090L90%2095L85%2090Z'%20fill-opacity%3D'.95'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  --imig-weave:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'96'%20height%3D'96'%20viewBox%3D'0%200%2096%2096'%3E%3Cpath%20d%3D'M0%200%2022%200%200%2022Z'%20fill%3D'%23fff'%20fill-opacity%3D'.26'%2F%3E%3Cpath%20d%3D'M96%200%2074%200%2096%2022Z'%20fill%3D'%23fff'%20fill-opacity%3D'.26'%2F%3E%3Cpath%20d%3D'M0%2096%2022%2096%200%2074Z'%20fill%3D'%23fff'%20fill-opacity%3D'.26'%2F%3E%3Cpath%20d%3D'M96%2096%2074%2096%2096%2074Z'%20fill%3D'%23fff'%20fill-opacity%3D'.26'%2F%3E%3Cpath%20d%3D'M48%205%2091%2048%2048%2091%205%2048Z'%20fill%3D'none'%20stroke%3D'%23fff'%20stroke-opacity%3D'.38'%20stroke-width%3D'1.6'%2F%3E%3Cpath%20d%3D'M48%2017%2079%2048%2048%2079%2017%2048Z'%20fill%3D'none'%20stroke%3D'%23fff'%20stroke-opacity%3D'.44'%20stroke-width%3D'1.2'%2F%3E%3Cpath%20d%3D'M48%2029%2067%2048%2048%2067%2029%2048Z'%20fill%3D'none'%20stroke%3D'%23fff'%20stroke-opacity%3D'.44'%20stroke-width%3D'1.2'%2F%3E%3Cpath%20d%3D'M48%2038%2058%2048%2048%2058%2038%2048Z'%20fill%3D'%23fff'%20fill-opacity%3D'.6'%2F%3E%3Cpath%20d%3D'M48%2044.5%2051.5%2048%2048%2051.5%2044.5%2048Z'%20fill%3D'%23fff'%20fill-opacity%3D'.26'%2F%3E%3Cpath%20d%3D'M24%2019%2029%2024%2024%2029%2019%2024Z'%20fill%3D'%23fff'%20fill-opacity%3D'.34'%2F%3E%3Cpath%20d%3D'M72%2019%2077%2024%2072%2029%2067%2024Z'%20fill%3D'%23fff'%20fill-opacity%3D'.34'%2F%3E%3Cpath%20d%3D'M24%2067%2029%2072%2024%2077%2019%2072Z'%20fill%3D'%23fff'%20fill-opacity%3D'.34'%2F%3E%3Cpath%20d%3D'M72%2067%2077%2072%2072%2077%2067%2072Z'%20fill%3D'%23fff'%20fill-opacity%3D'.34'%2F%3E%3Cpath%20d%3D'M24%2024%2034%2034M72%2024%2062%2034M24%2072%2034%2062M72%2072%2062%2062'%20fill%3D'none'%20stroke%3D'%23fff'%20stroke-opacity%3D'.38'%20stroke-width%3D'1'%2F%3E%3Cpath%20d%3D'M48%200v5M48%2091v5M0%2048h5M91%2048h5'%20fill%3D'none'%20stroke%3D'%23fff'%20stroke-opacity%3D'.44'%20stroke-width%3D'1.2'%2F%3E%3C%2Fsvg%3E");
  color-scheme: light;
}

[data-theme="dark"] {
  --paper: #1f110d;
  --paper-2: #291711;
  --panel: #341d15;
  --panel-2: #3d2319;
  --ink: #f6eee0;
  --muted: #c6ab96;
  --line: #4e2e22;
  --line-strong: #65402f;
  --rail: #170d0a;
  --rail-2: #3d2318;
  --rail-3: #5c3526;
  --rail-ink: #f8f1e4;
  --rail-muted: #c9ac97;
  --clay: #d0896f;
  --ok: #86c9a3;
  --warn: #d9b06a;
  --danger: #e69385;
  --info: #8dbece;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.35);
  --accent-soft: color-mix(in srgb, var(--accent) 18%, #341d15);
  --accent-line: color-mix(in srgb, var(--accent) 45%, #4e2e22);
  --imig-ink: #d9a98f;
  --nav-ink: #F4EBD9;
  --nav-ink-dim: #B9AC8F;
  --nav-active-ink: color-mix(in srgb, var(--accent) 55%, #F6E9C9);
  --nav-label-ink: #FFFFFF;
  --nav-label-shadow: 0 1px 2px rgba(8, 6, 4, .95), 0 0 4px rgba(8, 6, 4, .75);
  --nav-card-ground: color-mix(in srgb, var(--panel) 94%, var(--accent) 6%);
  --nav-card-edge: color-mix(in srgb, var(--accent) 32%, var(--line));
  --nav-card-shadow: 0 28px 58px -30px rgba(0, 0, 0, .92), 0 2px 10px rgba(0, 0, 0, .55);
  --nav-disc-ground: var(--panel);
  --nav-disc-ink: color-mix(in srgb, var(--accent) 68%, #F4E7C4);
  --nav-disc-edge: inset 0 1px 0 rgba(255, 255, 255, .08);
  --nav-disc-shadow: 0 8px 16px -10px rgba(0, 0, 0, .9);
  --nav-band-ground: color-mix(in srgb, var(--panel) 84%, var(--accent) 16%);
  --nav-imig-ink: color-mix(in srgb, var(--accent) 58%, #F6E9C9);
  --nav-imig-opacity: .52;
  --page-imig-ink: color-mix(in srgb, var(--accent) 55%, #F6E9C9);
  --page-imig-opacity: .34;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100dvh;
}
/* Canvas-level Imigongo: the approved nested-diamond weave, painted through
   its alpha mask with the tenant's accent-major ink. Same 96px cell as the
   sidebar and the module cards, faded so the whole lattice stays discernible
   without competing with content in either theme. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--page-imig-ink);
  opacity: var(--page-imig-opacity);
  -webkit-mask-image: var(--imig-weave);
          mask-image: var(--imig-weave);
  -webkit-mask-size: var(--imig-cell) var(--imig-cell);
          mask-size: var(--imig-cell) var(--imig-cell);
  -webkit-mask-repeat: repeat;
          mask-repeat: repeat;
}
a { color: var(--accent); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.18; font-weight: 700; }
p { margin: 0 0 10px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 75%, var(--ink)); outline-offset: 2px; border-radius: 6px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 14px; top: -60px; z-index: 200; background: var(--rail); color: var(--rail-ink);
  padding: 10px 16px; border-radius: 10px; text-decoration: none; transition: top .15s ease;
}
.skip-link:focus { top: 12px; }
.boot { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); }
.boot-mark {
  width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center;
  font: 700 34px/1 var(--serif); background: var(--accent); color: var(--accent-ink);
  animation: breathe 1.6s ease-in-out infinite;
}
@keyframes breathe { 0%,100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.06); opacity: 1; } }

/* ---------- shared primitives ---------- */
.imigongo {
  background-color: transparent;
  background-image: var(--imig-dark-bg);
  background-size: var(--imig-cell) var(--imig-cell);
  background-repeat: repeat;
}
.eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--accent); margin: 0 0 6px;
}
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.stack { display: grid; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.grow { flex: 1 1 auto; min-width: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; min-height: 42px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--panel); color: var(--ink); font-weight: 650; font-size: 14px;
  text-decoration: none; transition: background .15s ease, border-color .15s ease, transform .1s ease, box-shadow .15s ease;
}
.btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 28%, transparent); }
.btn.primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.soft { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.btn.danger { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); color: var(--danger); background: transparent; }
.btn.danger:hover { background: color-mix(in srgb, var(--danger) 10%, var(--panel)); border-color: var(--danger); }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: 12.5px; }
.btn.block { width: 100%; }
.icon-btn {
  width: 42px; height: 42px; min-height: 42px; padding: 0; border-radius: 999px;
  display: inline-grid; place-items: center; border: 1px solid var(--line-strong);
  background: var(--panel); color: var(--ink); font-size: 17px; line-height: 1;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn.small { width: 34px; height: 34px; min-height: 34px; font-size: 14px; }

.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .field-label { font-size: 12px; font-weight: 650; color: var(--muted); letter-spacing: .2px; }
.field input, .field select, .field textarea, .input {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 11px;
  background: var(--panel); color: var(--ink); padding: 10px 12px; min-height: 42px;
}
.field textarea, textarea.input { min-height: 92px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line-strong)); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.field .error, .field-error { color: var(--danger); font-size: 12px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.help { font-size: 12px; color: var(--muted); }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 20px; position: relative; overflow: hidden;
}
/* Cards carry the approved Imigongo weave, not a drawn diamond: the band
   mask is painted in the tenant ink and faded by a radial mask so the
   artwork stays a quiet corner of the surface in either theme. */
.card::after {
  content: ""; position: absolute; right: -22px; bottom: -26px; width: 168px; height: 168px;
  pointer-events: none; opacity: .42; background-color: var(--page-imig-ink);
  -webkit-mask-image: var(--imig-band), radial-gradient(circle at 76% 76%, #000 0 18%, transparent 72%);
          mask-image: var(--imig-band), radial-gradient(circle at 76% 76%, #000 0 18%, transparent 72%);
  -webkit-mask-size: 120px 120px, 100% 100%;
          mask-size: 120px 120px, 100% 100%;
  -webkit-mask-repeat: repeat, no-repeat;
          mask-repeat: repeat, no-repeat;
  -webkit-mask-position: center, center;
          mask-position: center, center;
  -webkit-mask-composite: source-in;
          mask-composite: intersect;
}
.card > * { position: relative; z-index: 1; }
.card.flush { padding: 0; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.card-head h2, .card-head h3 { font: 700 17px/1.25 var(--serif); letter-spacing: -.2px; }
.card-head .sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .2px; white-space: nowrap;
  background: var(--panel-2); color: var(--muted); border: 1px solid var(--line);
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill.plain::before { display: none; }
.pill.good, .pill.paid, .pill.delivered, .pill.active { background: color-mix(in srgb, var(--ok) 13%, var(--panel)); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, var(--line)); }
.pill.warn, .pill.pending, .pill.partial, .pill.processing { background: color-mix(in srgb, var(--warn) 14%, var(--panel)); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 32%, var(--line)); }
.pill.info, .pill.confirmed, .pill.ready, .pill.scheduled { background: color-mix(in srgb, var(--info) 12%, var(--panel)); color: var(--info); border-color: color-mix(in srgb, var(--info) 30%, var(--line)); }
.pill.bad, .pill.cancelled, .pill.refunded, .pill.unpaid, .pill.inactive { background: color-mix(in srgb, var(--danger) 12%, var(--panel)); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); }
.pill.out_for_delivery { background: color-mix(in srgb, var(--accent) 12%, var(--panel)); color: var(--accent); }

.empty { padding: 34px 18px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font: 700 17px/1.3 var(--serif); margin-bottom: 5px; }

/* ---------- app shell / mahogany Imigongo rail ---------- */
/* ---------- curved SADA module rail ---------- */
/* The canonical SADA lockup: one white-master PNG used as a mask so the mark
   takes the tenant ink on cream discs and the accent on dark ones. */
.sada-mask {
  display: block; background-color: var(--accent);
  -webkit-mask: url("/assets/brand/sada-logo-white.png") center / contain no-repeat;
          mask: url("/assets/brand/sada-logo-white.png") center / contain no-repeat;
}
.shell { display: grid; grid-template-columns: var(--ref-rail-width) minmax(0, 1fr); min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; height: 100dvh; z-index: 30;
  display: flex; flex-direction: column; gap: 6px;
  padding: 12px 8px 12px; overflow: hidden; color: var(--nav-ink);
}
/* The navigation surface is one circled card, not a rectangular strip: its
   ground and weave are clipped to a single true circle whose rim is the only
   border, and layout publishes --rail-rim-r/-cx/-cy from the solved arc. */
.sidebar::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(130% 46% at 100% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 62%),
    var(--nav-card-ground);
  clip-path: circle(var(--rail-rim-r, 900px) at var(--rail-rim-cx, -900px) var(--rail-rim-cy, 50%));
}
/* Chrome drops an element's mask when it also carries a clip-path, so the
   weave sits on its own layer inside the clipped wrapper. */
.sidebar-imig-clip {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  clip-path: circle(var(--rail-rim-r, 900px) at var(--rail-rim-cx, -900px) var(--rail-rim-cy, 50%));
}
.sidebar-imig { position: absolute; inset: 0; opacity: .34; }
.sidebar-imig::after {
  content: ""; position: absolute; inset: 0; background-color: var(--nav-imig-ink);
  -webkit-mask-image: var(--imig-weave); mask-image: var(--imig-weave);
  -webkit-mask-size: var(--imig-cell) var(--imig-cell);
          mask-size: var(--imig-cell) var(--imig-cell);
  -webkit-mask-repeat: repeat; mask-repeat: repeat;
}

.sidebar-brand {
  position: relative; z-index: 2; display: flex; align-items: center; gap: 9px;
  padding: 4px 10px 8px; text-decoration: none; color: var(--nav-ink);
}
.sidebar-brand .mark {
  width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center;
  border-radius: 50%; background: #fbf8ef; box-sizing: border-box;
  border: 2px solid color-mix(in srgb, var(--accent) 62%, #FFFFFF);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .22), 0 10px 22px -14px rgba(0, 0, 0, .8);
}
.sidebar-brand .mark .sada-mask { width: 72%; height: 72%; background-color: var(--accent); }
.sidebar-brand strong {
  display: block; font: 900 13px/1 var(--serif); letter-spacing: .18em;
}
.sidebar-brand small {
  display: block; color: var(--nav-ink-dim); font-size: 9px; font-weight: 800;
  letter-spacing: .11em; text-transform: uppercase; margin-top: 3px;
}

.sada-rail-nav { position: relative; z-index: 2; display: flex; flex: 1 1 auto; min-height: 0; min-width: 0; }
.sada-rail { position: relative; flex: 1 1 auto; min-width: 0; min-height: 0; overflow: hidden; }
.sada-rail-curve { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.sada-rail-curve path { fill: none; stroke-linecap: round; }
.sada-rail-curve .sada-rail-glow {
  stroke: color-mix(in srgb, var(--accent) 26%, transparent);
  stroke-width: 7; opacity: .5; filter: blur(3px);
}
.sada-rail-curve .sada-rail-rim { stroke-width: 1.8; }
.sada-rail-curve .sada-rail-rim-stop { stop-color: var(--accent); }
.sada-rail-curve .sada-rail-inner {
  stroke: color-mix(in srgb, var(--accent) 44%, transparent);
  stroke-width: 1.2; opacity: 1;
}

.sada-rail-band {
  position: absolute; z-index: 0; pointer-events: none;
  inset: calc(var(--rail-bleed-t, 0px) * -1) calc(var(--rail-bleed-r, 0px) * -1) calc(var(--rail-bleed-b, 0px) * -1) calc(var(--rail-bleed-l, 0px) * -1);
}
.sada-rail-band-fade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--accent) 7%, transparent) 40%, color-mix(in srgb, var(--accent) 2%, transparent) 64%, transparent 100%),
    var(--nav-band-ground);
}
.sada-rail-band-imig {
  position: absolute; inset: 0; background-color: var(--nav-imig-ink);
  -webkit-mask-image: var(--imig-band); mask-image: var(--imig-band);
  -webkit-mask-size: var(--nav-imig-cell) var(--nav-imig-cell);
          mask-size: var(--nav-imig-cell) var(--nav-imig-cell);
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-repeat: repeat; mask-repeat: repeat;
  opacity: var(--nav-imig-opacity); pointer-events: none;
}
.sada-rail[data-rail-mode="wheel"] .sada-rail-band,
.sada-rail[data-rail-mode="wheel"] .sada-rail-inner { display: none; }
.sada-rail[data-rail-mode="wheel"] .sada-rail-glow { stroke-width: 6; opacity: .55; }

.sada-rail-scroll {
  position: absolute; inset: 0; overflow-x: hidden; overflow-y: auto;
  scrollbar-width: none; -ms-overflow-style: none; overscroll-behavior: contain;
  touch-action: pan-y; cursor: grab; -webkit-overflow-scrolling: touch;
  -webkit-user-select: none; user-select: none;
}
.sada-rail-scroll::-webkit-scrollbar { width: 0; height: 0; }
.sada-rail.dragging .sada-rail-scroll { cursor: grabbing; }
.sada-rail-track {
  position: relative; display: flex; flex-direction: column;
  gap: var(--rail-gap, 30px); padding: 20px 0 32px;
}
.sada-rail-item {
  position: relative; display: flex; flex-direction: column; align-items: center;
  width: var(--rail-disc, 48px); min-height: var(--rail-disc, 48px);
  color: var(--nav-ink-dim); text-decoration: none; opacity: var(--rail-fade, 1);
  transform: translateX(var(--rail-x, 0px)) scale(var(--rail-scale, 1));
  transform-origin: 50% 50%;
  transition: transform .16s ease-out, opacity .16s ease-out, color .18s;
  -webkit-tap-highlight-color: transparent; -webkit-user-drag: none;
}
.sada-rail-more {
  appearance: none; -webkit-appearance: none; margin: 0; padding: 0;
  border: 0; background: transparent; font: inherit; cursor: pointer;
}
.sada-rail-disc {
  width: var(--rail-disc, 48px); height: var(--rail-disc, 48px);
  flex: 0 0 var(--rail-disc, 48px); display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--nav-card-edge);
  background: radial-gradient(circle at 34% 26%, color-mix(in srgb, var(--nav-disc-ground) 86%, #FFFFFF), var(--nav-disc-ground) 72%);
  color: var(--nav-disc-ink);
  box-shadow: var(--nav-disc-edge), var(--nav-disc-shadow);
  transition: background .18s, border-color .18s, color .18s, box-shadow .18s;
}
.sada-rail-disc svg { width: calc(var(--rail-disc, 48px) * .42); height: calc(var(--rail-disc, 48px) * .42); }
.sada-rail-label {
  position: absolute; top: calc(100% + 3px); left: 50%;
  transform: translateX(-50%); width: max-content; max-width: var(--rail-label-w, 108px);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: clamp(12px, calc(var(--rail-disc, 48px) * .27), 13px);
  font-weight: 800; letter-spacing: .05em; line-height: 1.3; text-align: center;
  text-transform: uppercase; text-shadow: var(--nav-label-shadow);
  color: var(--nav-label-ink); pointer-events: none;
}
.sada-rail[data-rail-mode="scroll"].rail-tight .sada-rail-label { display: none; }
.sada-rail-item:hover, .sada-rail-item:focus-visible { color: var(--nav-ink); }
.sada-rail-item:hover .sada-rail-disc,
.sada-rail-item:focus-visible .sada-rail-disc {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, var(--nav-disc-ground));
  color: var(--nav-active-ink);
}
.sada-rail-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 10px; }
.sada-rail-item.active { color: var(--nav-active-ink); }
.sada-rail-item.active .sada-rail-disc {
  background: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, #FFFFFF);
  color: var(--accent-ink);
  box-shadow:
    0 0 0 5px color-mix(in srgb, var(--accent) 16%, transparent),
    0 12px 26px -12px color-mix(in srgb, var(--accent) 70%, transparent);
}
[data-rail-dir="1"] .sada-rail-track { align-items: flex-start; padding-left: 10px; }
[data-rail-dir="-1"] .sada-rail-track { align-items: flex-end; padding-right: 10px; }

.sidebar-foot {
  position: relative; z-index: 2; display: grid; gap: 3px; padding: 8px;
  border: 1px solid var(--nav-card-edge); border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  box-shadow: var(--nav-card-shadow);
}
.sidebar-foot .who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sidebar-foot .who > span { min-width: 0; font-size: 11.5px; color: var(--nav-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-foot .avatar, .topbar .avatar {
  width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center;
  border-radius: 50%; background: color-mix(in srgb, var(--accent) 16%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--accent) 44%, var(--line));
  color: var(--accent-ink); font-size: 10.5px; font-weight: 800; letter-spacing: .04em;
}
.sidebar-foot small { display: block; color: var(--nav-ink-dim); font-size: 10px; }
.sidebar-link {
  display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 8px;
  color: var(--nav-ink-dim); font-size: 11.5px; text-decoration: none;
  background: none; border: 0; text-align: left; width: 100%;
}
.sidebar-link:hover { color: var(--nav-ink); background: color-mix(in srgb, var(--accent) 12%, transparent); }

/* ---------- the More selector: one true circle, SADA at its centre ---------- */
.sada-rail-overlay { position: fixed; inset: 0; z-index: 2600; }
.sada-rail-overlay[hidden] { display: none; }
.sada-rail-backdrop {
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0;
  background: rgba(6, 5, 3, .58); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); cursor: pointer;
}
.sada-rail-panel {
  position: absolute; top: 50%; left: 0; width: 280px; height: 280px;
  padding: 0; border: 0; background: transparent; box-shadow: none; overflow: visible;
  transform: translate(14px, -50%); opacity: 0;
  transition: transform .2s ease-out, opacity .2s ease-out;
}
.sada-rail-panel::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid var(--nav-card-edge);
  background:
    radial-gradient(120% 100% at 50% 4%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 62%),
    var(--nav-card-ground);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, .05),
    var(--nav-card-shadow);
}
.sada-rail-panel::after {
  content: ""; position: absolute; inset: 0; z-index: 0; border-radius: 50%;
  background-image: var(--imig-dark-bg); background-size: var(--imig-cell) var(--imig-cell);
  background-repeat: repeat; opacity: .16; pointer-events: none;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, transparent 0 30%, #000 58% 100%);
          mask-image: radial-gradient(circle at 50% 50%, transparent 0 30%, #000 58% 100%);
}
[data-theme="light"] .sada-rail-panel::after { background-image: var(--imig-light-bg); }
.sada-rail-overlay.open .sada-rail-panel { transform: translate(0, -50%); opacity: 1; }
.sada-rail-centre {
  position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: grid; place-items: center; pointer-events: none;
}
.sada-rail-centre-mark {
  display: grid; place-items: center;
  width: clamp(36px, calc(var(--rail-radius, 160px) * .27), 60px);
  height: clamp(36px, calc(var(--rail-radius, 160px) * .27), 60px);
  border-radius: 50%; background: #fbf8ef;
  border: 2px solid color-mix(in srgb, var(--accent) 62%, #FFFFFF);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .28), 0 10px 22px -12px rgba(0, 0, 0, .9);
  box-sizing: border-box;
}
.sada-rail-centre-mark .sada-mask { width: 70%; height: 70%; background-color: var(--accent); }
.sada-rail-centre-copy {
  position: absolute; left: 50%; top: calc(100% + 3px); transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  text-align: center; width: max-content; max-width: 24ch;
}
.sada-rail-centre-copy strong {
  color: var(--nav-active-ink); font-family: var(--serif);
  font-size: clamp(9px, calc(var(--rail-radius, 160px) * .06), 12px);
  font-weight: 900; letter-spacing: .18em; line-height: 1;
}
.sada-rail-centre-copy small {
  max-width: 16ch; color: var(--nav-ink-dim);
  font-size: clamp(8px, calc(var(--rail-radius, 160px) * .05), 10px);
  font-weight: 800; letter-spacing: .12em; line-height: 1.2; text-transform: uppercase;
}
.sada-rail-panel-head {
  position: absolute; z-index: 3;
  top: max(14px, env(safe-area-inset-top, 0px));
  right: max(14px, env(safe-area-inset-right, 0px));
  display: flex; align-items: center; justify-content: flex-end; gap: 6px;
}
.sada-rail-panel-title {
  color: var(--nav-ink-dim); font-size: 11px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase; text-shadow: var(--nav-label-shadow);
}
.sada-rail-close {
  appearance: none; flex: 0 0 32px; width: 32px; height: 32px;
  display: grid; place-items: center; padding: 0;
  border: 1px solid var(--line-strong); border-radius: 50%;
  background: var(--nav-disc-ground); color: var(--nav-active-ink); cursor: pointer;
  box-shadow: 0 8px 20px -12px rgba(0, 0, 0, .9);
}
.sada-rail-close:hover, .sada-rail-close:focus-visible {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}
.sada-rail-panel .sada-rail-nav { position: absolute; inset: 0; z-index: 1; margin: 0; }
.sada-rail-panel .sada-rail { height: 100%; overflow: visible; }
.sada-rail[data-rail-mode="wheel"] .sada-rail-scroll {
  overflow: visible; touch-action: none; overscroll-behavior: contain; cursor: grab;
}
.sada-rail[data-rail-mode="wheel"] .sada-rail-track {
  position: absolute; inset: 0; display: block; padding: 0;
}
.sada-rail[data-rail-mode="wheel"] .sada-rail-item {
  position: absolute; left: 50%; top: 50%; width: var(--rail-disc, 48px); min-height: 0; margin: 0;
  clip-path: circle(50%);
  transform: translate(-50%, -50%) translate(var(--rail-x, 0px), var(--rail-y, 0px)) scale(var(--rail-scale, 1));
}
.sada-rail[data-rail-mode="wheel"] .sada-rail-item:focus-visible { border-radius: 50%; outline-offset: -2px; }
.sada-rail[data-rail-mode="wheel"] .sada-rail-disc {
  width: var(--rail-disc, 48px); height: var(--rail-disc, 48px);
  flex: 0 0 var(--rail-disc, 48px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; padding: 4px 3px;
}
.sada-rail[data-rail-mode="wheel"] .sada-rail-disc svg {
  width: calc(var(--rail-disc, 48px) * .3); height: calc(var(--rail-disc, 48px) * .3);
}
.sada-rail[data-rail-mode="wheel"] .sada-rail-label {
  position: static; left: auto; top: auto; transform: none;
  width: 100%; max-width: 100%; margin: 0;
  font-size: var(--rail-label-size, clamp(6px, calc(var(--rail-disc, 48px) * .125), 8px));
  letter-spacing: .02em; line-height: 1.05; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: none;
}
.sada-rail-panel--wheel .sada-rail-panel-title { display: none; }
.sada-rail.dragging .sada-rail-item { transition: none; }
body.rail-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .sada-rail-item, .sada-rail-panel { transition: none !important; }
}

.admin-main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; min-height: 72px; display: flex; align-items: center; gap: 14px;
  padding: 10px clamp(16px, 2.4vw, 34px);
  background:
    radial-gradient(140% 190% at 0% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 46%),
    linear-gradient(135deg, #1a1510, #17130D 62%, #0D0B08);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 0;
  color: #F5ECD8;
  overflow: hidden;
  box-shadow: 0 22px 44px -30px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .06);
}
[data-theme="dark"] .topbar {
  background:
    radial-gradient(140% 190% at 0% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 46%),
    linear-gradient(135deg, #2a1f16, #1a1510 62%, #0D0B08);
  border-color: rgba(255, 255, 255, .06);
}
.topbar-imigongo {
  position: absolute; left: 0; right: 0; bottom: 0; height: 6px; pointer-events: none;
  background-image: var(--imig-band);
  background-size: 48px 48px;
  background-repeat: repeat-x;
  background-position: center;
  opacity: .52;
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,.7), transparent);
          mask-image: linear-gradient(to top, rgba(0,0,0,.7), transparent);
}
.topbar-brand {
  display: flex; align-items: center; gap: 10px; min-width: 0; flex: 0 0 auto;
}
.topbar-sada-lockup {
  display: flex; align-items: center; gap: 8px;
}
.topbar-sada-mark {
  flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid color-mix(in srgb, var(--accent) 62%, #FFFFFF);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .2);
  display: grid; place-items: center; overflow: hidden;
}
.topbar-sada-mark .sada-mask {
  width: 72%; height: 72%; background-color: var(--accent);
}
.topbar-sada-copy { display: flex; flex-direction: column; gap: 0; }
.topbar-sada-copy strong {
  color: #F6EAC8; font-family: var(--serif); font-size: 12px; font-weight: 900;
  letter-spacing: .18em; line-height: 1;
}
.topbar-sada-copy small {
  color: #A99C81; font-size: 8px; font-weight: 750; letter-spacing: .14em;
  text-transform: uppercase; line-height: 1.25; white-space: nowrap;
}
.topbar-brand-rule {
  width: 1px; height: 34px; flex: 0 0 1px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .12), transparent);
}
.topbar-business-lockup {
  display: flex; align-items: center; gap: 8px; min-width: 0;
}
.topbar-business-logo {
  flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(145deg, #272013, #0D0B08);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .25);
  display: grid; place-items: center; overflow: hidden;
}
.topbar-business-logo .mark {
  width: 28px; height: 28px; border-radius: 50%;
  background: #fbf8ef; box-sizing: border-box;
  border: 2px solid color-mix(in srgb, var(--accent) 62%, #FFFFFF);
  display: grid; place-items: center;
}
.topbar-business-logo .mark .sada-mask { width: 72%; height: 72%; background-color: var(--accent); }
.topbar-business-logo.has-image { background: var(--panel); }
.topbar-business-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.topbar-business-copy { min-width: 0; }
.topbar-business-copy strong {
  display: block; color: #F5ECD8; font-size: 12px; font-weight: 700;
  letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 22ch;
}
.topbar-business-copy small {
  display: block; color: #A99C81; font-size: 10px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 26ch;
}
.topbar-business-copy small:empty { display: none; }
.topbar-title { min-width: 0; flex: 1 1 auto; }
.topbar-title h1 { font: 700 clamp(17px, 1.6vw, 22px)/1.2 var(--serif); letter-spacing: -.3px; color: #F5ECD8; margin: 0; }
.crumb { font-size: 11px; color: #A99C81; margin-bottom: 2px; }
.crumb a { color: #A99C81; text-decoration: none; }
.crumb a:hover { color: var(--accent); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.status-cluster { display: flex; align-items: center; gap: 10px; }
.status-clock { text-align: right; font-size: 11.5px; color: #A99C81; line-height: 1.35; }
.status-clock strong { display: block; color: #F5ECD8; font-weight: 650; font-variant-numeric: tabular-nums; }
.status-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 750; letter-spacing: .2px; white-space: nowrap; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .06); color: #A99C81; }
.status-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 16%, transparent); }
.status-chip[data-state="open"] { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 36%, rgba(255,255,255,.1)); background: color-mix(in srgb, var(--ok) 10%, rgba(255,255,255,.04)); }
.status-chip[data-state="closed"] { color: var(--clay); border-color: color-mix(in srgb, var(--clay) 36%, rgba(255,255,255,.1)); background: color-mix(in srgb, var(--clay) 10%, rgba(255,255,255,.04)); }
.net-chip, .sync-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 700; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .06); color: #A99C81; white-space: nowrap; }
.net-chip .dot, .sync-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 7px; }
.net-chip[data-state="online"], .sync-chip[data-state="saved"] { color: var(--ok); }
.net-chip[data-state="offline"], .sync-chip[data-state="failed"] { color: var(--danger); }
.sync-chip[data-state="saving"] { color: #A99C81; }
.topbar .icon-btn { color: #A99C81; }
.topbar .icon-btn:hover { color: #F5ECD8; background: rgba(255, 255, 255, .08); }
.icon-btn.has-badge { position: relative; }
.badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 800; line-height: 1; display: grid; place-items: center; box-shadow: 0 0 0 2px rgba(0, 0, 0, .4); }
.badge[hidden] { display: none; }
.staff-chip { display: flex; align-items: center; gap: 8px; padding-left: 8px; border-left: 1px solid rgba(255, 255, 255, .1); min-width: 0; }
.staff-chip .avatar { width: 36px; height: 36px; flex: 0 0 36px; }
.staff-chip strong { display: block; font-size: 12.5px; line-height: 1.2; max-width: 15ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #F5ECD8; }
.staff-chip small { display: block; color: #A99C81; font-size: 10px; text-transform: capitalize; }
.admin-content { padding: clamp(16px, 2.2vw, 30px) clamp(16px, 2.4vw, 34px) 60px; max-width: 1560px; width: 100%; margin: 0 auto; }

.phonebar { display: none; }
.mobile-head { display: none; }
.drawer-back { position: fixed; inset: 0; z-index: 80; background: rgba(6, 12, 8, .5); display: grid; align-items: end; }
.drawer {
  background: var(--panel); border-top-left-radius: 24px; border-top-right-radius: 24px;
  padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); max-height: 86dvh; overflow: auto;
  animation: rise .18s ease-out;
}
@keyframes rise { from { transform: translateY(28px); opacity: .4; } }

/* ---------- storefront ---------- */
.store-shell { min-height: 100dvh; display: flex; flex-direction: column; }
.store-head {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px;
  min-height: 72px; padding: 10px clamp(14px, 3vw, 40px);
  background: color-mix(in srgb, var(--panel) 93%, transparent); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.store-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.store-brand .mark {
  width: 42px; height: 42px; border-radius: 13px; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font: 800 23px/1 var(--serif); flex: 0 0 42px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}
.store-brand strong { display: block; font: 700 17px/1.1 var(--serif); letter-spacing: -.2px; }
.store-brand small { display: block; color: var(--muted); font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; }
.store-nav { display: flex; align-items: center; gap: 4px; margin-left: 18px; }
.store-nav a { color: var(--muted); text-decoration: none; font-size: 13.5px; font-weight: 600; padding: 8px 12px; border-radius: 999px; }
.store-nav a:hover, .store-nav a.active { color: var(--accent); background: var(--accent-soft); }
.store-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.select-mini { border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink); border-radius: 999px; padding: 8px 10px; min-height: 38px; font-size: 12.5px; }
.cart-btn { position: relative; }
.cart-count {
  position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 10.5px; font-weight: 800;
  display: grid; place-items: center;
}
.store-body { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 clamp(14px, 3vw, 40px); flex: 1; }
.hero {
  position: relative; overflow: hidden; margin-top: clamp(16px, 3vw, 30px);
  border-radius: 28px; border: 1px solid var(--line); background: var(--panel);
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); min-height: 340px;
  box-shadow: var(--shadow);
}
.hero-copy { padding: clamp(24px, 4vw, 52px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 12px; }
.hero-copy h1 { font: 700 clamp(32px, 4.4vw, 58px)/1.03 var(--serif); letter-spacing: -1.8px; }
.hero-copy p { color: var(--muted); max-width: 54ch; font-size: 15px; }
.hero-art { position: relative; background-color: var(--rail); overflow: hidden; }
.hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .92; }
.hero-art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--panel) 92%, transparent), transparent 55%);
}
.hero-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--accent); }
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 18%, transparent); }
.hero-badge.closed .dot { background: var(--clay); box-shadow: 0 0 0 4px color-mix(in srgb, var(--clay) 18%, transparent); }

.ad-banner {
  margin-top: 18px; position: relative; overflow: hidden; border-radius: 22px;
  border: 1px solid var(--line); background: var(--rail); color: var(--rail-ink);
  min-height: 190px; display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); background-color: var(--rail);
}
.ad-banner img { width: 100%; height: 100%; object-fit: cover; min-height: 190px; }
.ad-banner.no-image { grid-template-columns: 1fr; }
.ad-banner .ad-copy { padding: clamp(20px, 3vw, 34px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 8px; }
.ad-banner h2 { font: 700 clamp(22px, 2.6vw, 34px)/1.1 var(--serif); letter-spacing: -.6px; }
.ad-banner p { color: rgba(244, 241, 230, .78); font-size: 13.5px; margin: 0; }
.ad-banner .btn { background: #f4f1e6; border-color: #f4f1e6; color: #14201a; margin-top: 4px; }
.ad-dots { position: absolute; right: 14px; bottom: 12px; display: flex; gap: 6px; z-index: 2; }
.ad-dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .35); padding: 0; }
.ad-dots button[aria-current="true"] { background: #f4f1e6; width: 20px; border-radius: 999px; }

.store-section { margin-top: clamp(22px, 3vw, 36px); }
.store-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.store-section-head h2 { font: 700 clamp(22px, 2.4vw, 30px)/1.1 var(--serif); letter-spacing: -.6px; }
.store-section-head p { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.filters { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink);
  border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600; min-height: 38px;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--rail); border-color: var(--rail); color: var(--rail-ink); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 14px 0 16px; }
.search-box { position: relative; flex: 1 1 260px; min-width: 0; }
.search-box input { width: 100%; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--panel); padding: 11px 16px 11px 40px; min-height: 44px; }
.search-box::before { content: "⌕"; position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 17px; }
.search-box input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(216px, 1fr)); gap: 16px; }
.product-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.product-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow-sm); }
.product-media {
  position: relative; aspect-ratio: 4 / 3; background: var(--panel-2); overflow: hidden;
  display: grid; place-items: center;
}
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.product-card:hover .product-media img { transform: scale(1.03); }
.product-media .sample {
  position: absolute; left: 9px; bottom: 9px; font-size: 9.5px; letter-spacing: .4px;
  background: color-mix(in srgb, var(--panel) 92%, transparent); color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 7px;
}
.stock-flag { position: absolute; right: 9px; top: 9px; font-size: 10px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--rail); color: var(--rail-ink); }
.stock-flag.low { background: var(--warn); color: #fff; }
.stock-flag.out { background: var(--danger); color: #fff; }
.product-body { padding: 13px 14px 14px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.product-body h3 { font: 700 15.5px/1.25 var(--sans); letter-spacing: -.15px; }
.product-body .cat { color: var(--muted); font-size: 11px; letter-spacing: .5px; text-transform: uppercase; }
.product-price { font: 700 19px/1.2 var(--serif); color: var(--accent); font-variant-numeric: tabular-nums; }
.product-price small { font: 500 11px/1 var(--sans); color: var(--muted); margin-left: 3px; }
.product-foot { margin-top: auto; display: flex; gap: 7px; align-items: center; padding-top: 4px; }
.product-foot select { flex: 1; min-width: 0; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--panel); padding: 8px; font-size: 12px; min-height: 36px; }
.product-foot .add { border: 0; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-weight: 750; padding: 0 13px; min-height: 36px; font-size: 12.5px; }
.product-foot .add:disabled { background: var(--line-strong); color: var(--muted); cursor: not-allowed; }
.product-title-link { color: inherit; text-decoration: none; }
.product-title-link:hover { color: var(--accent); }

.detail { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(20px, 3vw, 40px); margin-top: 22px; align-items: start; }
.detail-media { border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: var(--panel-2); position: relative; }
.detail-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.detail-copy { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.detail-copy h1 { font: 700 clamp(28px, 3.4vw, 42px)/1.06 var(--serif); letter-spacing: -1px; }
.detail-copy .price { font: 700 28px/1 var(--serif); color: var(--accent); }
.variant-picker { display: grid; gap: 8px; width: 100%; }
.variant-option {
  display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-strong);
  border-radius: 13px; padding: 11px 13px; background: var(--panel); text-align: left; width: 100%;
}
.variant-option:hover { border-color: var(--accent); }
.variant-option[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.variant-option .vpack { font-weight: 650; font-size: 14px; }
.variant-option .vprice { margin-left: auto; font-weight: 750; font-variant-numeric: tabular-nums; }
.variant-option .vstock { font-size: 11px; color: var(--muted); }
.variant-option:disabled { opacity: .5; cursor: not-allowed; }
.qty-row { display: flex; align-items: center; gap: 10px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; background: var(--panel); }
.stepper button { width: 38px; height: 40px; border: 0; background: transparent; font-size: 18px; }
.stepper button:hover { background: var(--accent-soft); color: var(--accent); }
.stepper input { width: 48px; height: 40px; border: 0; text-align: center; background: transparent; font-weight: 700; }
.detail-note { font-size: 12px; color: var(--muted); border-left: 3px solid var(--accent-line); padding-left: 10px; }

.cart-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr); gap: 20px; margin-top: 22px; align-items: start; }
.cart-lines { display: grid; gap: 10px; }
.cart-line { display: grid; grid-template-columns: 68px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.cart-line img { width: 68px; height: 58px; object-fit: cover; border-radius: 9px; background: var(--panel-2); }
.cart-line h3 { font-size: 14px; }
.cart-line .meta { font-size: 11.5px; color: var(--muted); }
.cart-line .line-total { font-weight: 750; font-variant-numeric: tabular-nums; text-align: right; }
.summary { position: sticky; top: 90px; display: grid; gap: 10px; }
.summary-row { display: flex; justify-content: space-between; gap: 14px; font-size: 13.5px; }
.summary-row.total { border-top: 1px solid var(--line); padding-top: 11px; font-size: 18px; font-weight: 800; }
.summary-row.total span:last-child { font-family: var(--serif); color: var(--accent); }
.notice {
  padding: 12px 14px; border-radius: 11px; font-size: 12.5px; line-height: 1.5;
  border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--ink);
}
.notice.warn { border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); background: color-mix(in srgb, var(--warn) 10%, var(--panel)); }
.notice.danger { border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); background: color-mix(in srgb, var(--danger) 9%, var(--panel)); }
.order-confirm { max-width: 760px; margin: clamp(20px, 4vw, 48px) auto; text-align: center; }
.order-confirm .tick { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; background: color-mix(in srgb, var(--ok) 15%, var(--panel)); color: var(--ok); font-size: 34px; border: 2px solid color-mix(in srgb, var(--ok) 40%, transparent); }
.order-confirm h1 { font: 700 clamp(28px, 3.6vw, 42px)/1.05 var(--serif); letter-spacing: -1px; }
.order-confirm .number { font: 700 17px var(--sans); letter-spacing: 1px; color: var(--accent); margin: 6px 0 10px; }
.order-summary { text-align: left; margin-top: 20px; }
.track-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 0; text-align: left; }
.track-step { display: grid; grid-template-columns: 30px 1fr; gap: 12px; position: relative; padding-bottom: 18px; }
.track-step::before { content: ""; position: absolute; left: 14px; top: 26px; bottom: 0; width: 2px; background: var(--line); }
.track-step:last-child::before { display: none; }
.track-step .dot { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--panel); display: grid; place-items: center; font-size: 12px; color: var(--muted); z-index: 1; }
.track-step.done .dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.track-step.current .dot { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.track-step strong { font-size: 13.5px; }
.track-step small { color: var(--muted); font-size: 11.5px; }

.auth-wrap { max-width: 460px; margin: clamp(24px, 5vw, 64px) auto; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); margin-bottom: 16px; }
.auth-tabs button { border: 0; border-radius: 999px; padding: 8px 12px; background: transparent; font-weight: 650; font-size: 13px; color: var(--muted); }
.auth-tabs button[aria-selected="true"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow-sm); }
.account-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 20px; margin-top: 22px; align-items: start; }
.account-orders { display: grid; gap: 8px; }
.account-order { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); flex-wrap: wrap; }
.account-order .num { font-weight: 750; font-size: 13px; }
.account-order small { display: block; color: var(--muted); font-size: 11.5px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font: 700 clamp(26px, 3vw, 36px)/1.05 var(--serif); letter-spacing: -1px; }
.page-head p { color: var(--muted); font-size: 13.5px; margin: 5px 0 0; max-width: 70ch; }
.store-foot { margin-top: 48px; border-top: 1px solid var(--line); background: var(--panel-2); }
.store-foot-inner { max-width: 1440px; margin: 0 auto; padding: 28px clamp(14px, 3vw, 40px); display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 24px; }
.store-foot h3 { font: 700 15px/1.3 var(--serif); margin-bottom: 6px; }
.store-foot p, .store-foot li { font-size: 12.5px; color: var(--muted); }
.store-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.store-foot .fine { border-top: 1px solid var(--line); padding: 12px clamp(14px, 3vw, 40px); font-size: 11px; color: var(--muted); text-align: center; }
.toasts { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: min(440px, calc(100vw - 24px)); pointer-events: none; }
.toast { background: var(--rail); color: var(--rail-ink); border-radius: 12px; padding: 12px 16px; box-shadow: 0 14px 40px rgba(0, 0, 0, .35); font-size: 13px; display: flex; gap: 9px; align-items: flex-start; animation: rise .18s ease-out; }
.toast.good { border-left: 4px solid var(--ok); }
.toast.bad { border-left: 4px solid var(--danger); }

/* ---------- admin ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; position: relative; overflow: hidden; box-shadow: var(--shadow-sm); }
.kpi::before {
  content: ""; position: absolute; right: -18px; top: -22px; width: 118px; height: 118px;
  pointer-events: none; opacity: .38; background-color: var(--page-imig-ink);
  -webkit-mask-image: var(--imig-band), radial-gradient(circle at 72% 26%, #000 0 16%, transparent 70%);
          mask-image: var(--imig-band), radial-gradient(circle at 72% 26%, #000 0 16%, transparent 70%);
  -webkit-mask-size: 108px 108px, 100% 100%;
          mask-size: 108px 108px, 100% 100%;
  -webkit-mask-repeat: repeat, no-repeat;
          mask-repeat: repeat, no-repeat;
  -webkit-mask-position: center, center;
          mask-position: center, center;
  -webkit-mask-composite: source-in;
          mask-composite: intersect;
}
.kpi > * { position: relative; z-index: 1; }
.kpi label { display: block; color: var(--muted); font-size: 11.5px; font-weight: 650; letter-spacing: .3px; text-transform: uppercase; }
.kpi strong { display: block; font: 700 clamp(22px, 2.2vw, 29px)/1.2 var(--serif); margin: 8px 0 2px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi small { color: var(--muted); font-size: 11.5px; }
.kpi.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.kpi.accent label, .kpi.accent small { color: color-mix(in srgb, var(--accent-ink) 80%, transparent); }
.kpi.accent strong { color: var(--accent-ink); }
.kpi.accent::before { background-color: var(--accent-ink); opacity: .22; }
.split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.split.side { grid-template-columns: minmax(0, 1fr) 300px; }
.split.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack-16 { display: grid; gap: 16px; }

.bars { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding-top: 12px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; height: 100%; justify-content: flex-end; }
.bar-col .bar { width: 100%; max-width: 42px; min-height: 3px; border-radius: 6px 6px 3px 3px; background: color-mix(in srgb, var(--accent) 72%, var(--panel)); position: relative; transition: height .3s ease; }
.bar-col:hover .bar { background: var(--accent); }
.bar-col .bval { font-size: 9.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-col .blabel { font-size: 9.5px; color: var(--muted); white-space: nowrap; }
.pipeline { display: grid; gap: 8px; }
.pipeline-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.pipeline-row .track { flex: 1; height: 8px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.pipeline-row .fill { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.pipeline-row .n { min-width: 24px; text-align: right; font-weight: 750; }

.table-wrap { overflow: auto; border-radius: 14px; border: 1px solid var(--line); }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
table.data th {
  text-align: left; font-size: 10.5px; letter-spacing: .8px; text-transform: uppercase; color: var(--muted);
  padding: 10px 12px; background: var(--panel-2); border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
table.data td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tbody tr:hover { background: color-mix(in srgb, var(--accent) 4%, var(--panel)); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tr.clickable { cursor: pointer; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
table.data .thumb { width: 40px; height: 34px; border-radius: 7px; object-fit: cover; background: var(--panel-2); display: block; }
table.data .strong { font-weight: 650; }
table.data .sub { display: block; color: var(--muted); font-size: 11px; }
.toolbar-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar-row .search-box { flex: 1 1 220px; }
.toolbar-row select, .toolbar-row input[type="date"] { border: 1px solid var(--line-strong); border-radius: 10px; background: var(--panel); padding: 9px 11px; min-height: 40px; }
.tabs { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs button { border: 1px solid transparent; background: transparent; color: var(--muted); border-radius: 999px; padding: 7px 13px; font-size: 12.5px; font-weight: 650; }
.tabs button:hover { color: var(--accent); background: var(--accent-soft); }
.tabs button[aria-selected="true"] { background: var(--rail); color: var(--rail-ink); }

.modal-back { position: fixed; inset: 0; z-index: 120; background: rgba(5, 10, 7, .58); display: grid; place-items: center; padding: 16px; overflow: auto; }
.modal {
  width: min(760px, 100%); max-height: 90dvh; overflow: auto; background: var(--panel);
  border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .4);
  padding: 22px; animation: rise .16s ease-out;
}
.modal.wide { width: min(980px, 100%); }
.modal.narrow { width: min(460px, 100%); }
.modal-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.modal-head h2 { font: 700 22px/1.2 var(--serif); letter-spacing: -.3px; }
.modal-head .close { margin-left: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.detail-grid .kv { display: grid; gap: 2px; min-width: 0; }
.detail-grid .k { font-size: 10.5px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.detail-grid .v { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.section-label { font: 700 12px/1.3 var(--sans); letter-spacing: .9px; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.variant-editor { display: grid; gap: 8px; }
.variant-edit-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .9fr) minmax(0, .8fr) minmax(0, .8fr) auto; gap: 7px; align-items: end; }
.variant-edit-row .field label { font-size: 10.5px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.inline-form .field { flex: 1 1 150px; }
.inline-form .field.narrow { flex: 0 1 110px; }
.image-drop { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 12px; display: grid; gap: 8px; background: var(--panel-2); }
.image-drop img { max-height: 120px; border-radius: 9px; object-fit: contain; justify-self: start; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 10px; background: var(--panel); font-size: 12px; }
.tag button { border: 0; background: transparent; color: var(--muted); width: 20px; height: 20px; border-radius: 50%; }
.tag button:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.ad-mini { display: grid; grid-template-columns: 160px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.ad-mini img { width: 160px; height: 78px; object-fit: cover; border-radius: 9px; background: var(--panel-2); }
.ad-mini h3 { font-size: 14px; }
.ad-mini p { font-size: 12px; color: var(--muted); margin: 2px 0 0; }
.integration { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.integration:last-child { border-bottom: 0; }
.integration .glyph { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 20px; }
.integration h3 { font-size: 14.5px; }
.integration p { font-size: 12.5px; color: var(--muted); margin: 3px 0 0; }

.hours-grid { display: grid; gap: 7px; }
.hours-row { display: grid; grid-template-columns: 90px 1fr 1fr auto; gap: 8px; align-items: center; }
.hours-row .day { font-size: 12.5px; font-weight: 650; }
.hours-row input[type="time"] { border: 1px solid var(--line-strong); border-radius: 9px; background: var(--panel); padding: 7px 9px; min-height: 38px; }
.hours-row input:disabled { opacity: .45; }

.audit-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.audit-row:last-child { border-bottom: 0; }
.audit-row .when { color: var(--muted); font-size: 11.5px; }
.audit-row .what { min-width: 0; }
.audit-row .what strong { font-size: 12.5px; }
.audit-row .who { color: var(--muted); font-size: 11px; text-align: right; }
.chart-legend { display: flex; gap: 12px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.dot-legend { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 5px; }

.payment-total { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.payment-total .box { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.payment-total .box span { display: block; color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; }
.payment-total .box strong { display: block; font: 700 16px/1.3 var(--serif); margin-top: 3px; overflow-wrap: anywhere; }

/* ---------- notifications and messages ---------- */
.notif-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-size: 12.5px; color: var(--muted); }
.notif-list { display: grid; gap: 6px; max-height: 60dvh; overflow: auto; }
.notif { display: grid; grid-template-columns: 34px minmax(0, 1fr) 10px; gap: 10px; align-items: start; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); color: var(--ink); }
.notif:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.notif.unread { background: color-mix(in srgb, var(--accent) 6%, var(--panel)); border-color: color-mix(in srgb, var(--accent) 22%, var(--line)); }
.notif-kind { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.notif-text { min-width: 0; display: grid; gap: 2px; }
.notif-text strong { font-size: 13px; }
.notif-text small { color: var(--muted); font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notif-text time { color: var(--muted); font-size: 10.5px; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 5px; }
.conv-list { display: grid; gap: 6px; max-height: 64dvh; overflow: auto; }
.conv { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 10px 12px; text-align: left; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); color: var(--ink); }
.conv:hover { border-color: var(--accent-line); }
.conv.unread { background: color-mix(in srgb, var(--accent) 6%, var(--panel)); border-color: color-mix(in srgb, var(--accent) 22%, var(--line)); }
.conv-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 13px; }
.conv-text { min-width: 0; display: grid; gap: 2px; }
.conv-text strong { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 13px; }
.conv-text strong time { color: var(--muted); font-size: 10px; font-weight: 500; white-space: nowrap; }
.conv-text small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv .badge { position: static; box-shadow: none; }
.thread { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 10px; height: min(62dvh, 520px); }
.thread-head { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.thread-head div { min-width: 0; }
.thread-head strong { display: block; font-size: 14px; }
.thread-head small { color: var(--muted); font-size: 11px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-since { margin-left: auto; color: var(--muted); font-size: 10.5px; white-space: nowrap; }
.thread-body { overflow: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px 2px; }
.bubble { max-width: min(78%, 560px); border-radius: 14px; padding: 8px 12px; border: 1px solid var(--line); background: var(--panel-2); }
.bubble.staff { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.bubble-meta { display: block; font-size: 10px; opacity: .72; margin-bottom: 3px; }
.bubble p { margin: 0; font-size: 13px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.thread-compose { display: flex; gap: 8px; align-items: flex-end; border-top: 1px solid var(--line); padding-top: 10px; }
.thread-compose textarea { flex: 1; min-height: 44px; max-height: 120px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--panel); color: var(--ink); padding: 9px 11px; resize: vertical; }
.thread-compose .btn { min-height: 44px; }

/* ---------- storefront logo + chat ---------- */
.store-brand .store-logo-img { width: 42px; height: 42px; border-radius: 13px; object-fit: cover; flex: 0 0 42px; }
.store-brand .mark { width: 42px; height: 42px; border-radius: 13px; background: var(--accent); display: grid; place-items: center; flex: 0 0 42px; }
.store-brand .mark .sada-mask { width: 72%; height: 72%; background-color: var(--accent-ink); }
.chat-launcher { position: fixed; bottom: 24px; right: 24px; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); border: none; cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,.18); display: grid; place-items: center; z-index: 100; transition: transform .15s ease; }
.chat-launcher:hover { transform: scale(1.08); }
.chat-panel { position: fixed; bottom: 92px; right: 24px; width: 360px; max-width: calc(100vw - 48px); max-height: min(520px, calc(100dvh - 116px)); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 40px rgba(0,0,0,.2); display: flex; flex-direction: column; z-index: 101; overflow: hidden; }
.chat-panel[hidden], .chat-messages[hidden] { display: none; }
.chat-head { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--line); background: var(--accent); color: var(--accent-ink); }
.chat-head strong { font-size: 15px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-close { flex: 0 0 auto; width: 40px; height: 40px; min-height: 40px; padding: 0; background: transparent; border: 1px solid transparent; color: inherit; cursor: pointer; display: grid; place-items: center; border-radius: 10px; }
.chat-close:hover { background: rgba(255,255,255,.16); }
.chat-close:active { background: rgba(255,255,255,.24); }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; min-height: 240px; }
.chat-start { display: flex; flex-direction: column; gap: 12px; }
.chat-welcome { font-size: 14px; color: var(--muted); margin: 0; }
.chat-start .field { display: flex; flex-direction: column; gap: 4px; }
.chat-start label { font-size: 12px; font-weight: 600; color: var(--muted); }
.chat-start input { border: 1px solid var(--line-strong); border-radius: 10px; background: var(--panel); color: var(--ink); padding: 9px 11px; font-size: 13px; }
.chat-start .btn { margin-top: 4px; }
.chat-messages { display: flex; flex-direction: column; gap: 10px; }
.chat-bubble { display: flex; flex-direction: column; max-width: 85%; }
.chat-bubble.customer { align-self: flex-end; }
.chat-bubble.staff { align-self: flex-start; }
.chat-bubble-body { padding: 9px 12px; border-radius: 14px; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.chat-bubble.customer .chat-bubble-body { background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.chat-bubble.staff .chat-bubble-body { background: var(--panel-2); color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-bubble-meta { font-size: 10px; color: var(--muted); margin-top: 3px; padding: 0 4px; }
.chat-empty { font-size: 13px; color: var(--muted); text-align: center; margin: auto; }
.chat-compose { display: flex; gap: 8px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--panel); }
.chat-compose input { flex: 1; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--panel); color: var(--ink); padding: 9px 11px; font-size: 13px; min-height: 40px; }
.chat-compose .btn { min-height: 40px; min-width: 40px; padding: 0; display: grid; place-items: center; }

/* ---------- print ---------- */
.print-sheet { display: none; }
@media print {
  @page { margin: 12mm; }
  body { background: #fff !important; color: #000 !important; }
  body::before, body::after { display: none !important; }
  .shell, .store-head, .store-foot, .topbar, .toasts, .modal-back, .skip-link { display: none !important; }
  .print-sheet { display: block !important; color: #000; font-family: var(--sans); max-width: 190mm; margin: 0 auto; }
  .print-sheet h1 { font: 700 22px/1.2 var(--serif); margin: 0 0 2px; }
  .print-sheet .print-brand { display: flex; justify-content: space-between; border-bottom: 2px solid #000; padding-bottom: 8px; margin-bottom: 12px; }
  .print-sheet table { width: 100%; border-collapse: collapse; font-size: 12px; }
  .print-sheet th, .print-sheet td { border-bottom: 1px solid #999; padding: 6px 4px; text-align: left; }
  .print-sheet th.num, .print-sheet td.num { text-align: right; }
  .print-sheet .totals { margin-top: 10px; width: 60mm; margin-left: auto; font-size: 12px; }
  .print-sheet .totals div { display: flex; justify-content: space-between; padding: 2px 0; }
  .print-sheet .totals .grand { border-top: 1px solid #000; font-weight: 700; padding-top: 4px; }
  .print-sheet .print-note { margin-top: 14px; font-size: 10px; color: #444; border-top: 1px dashed #999; padding-top: 8px; }
}

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  :root { --disc: 42px; --ref-rail-width: 156px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .staff-chip span { display: none; }
  .staff-chip { border-left: 0; padding-left: 0; }
}
@media (max-width: 1120px) {
  .net-chip [data-net-label], .sync-chip [data-sync-label] { display: none; }
  .net-chip, .sync-chip { padding: 5px 7px; }
  .clock-tz { display: none; }
}
@media (max-width: 1080px) {
  .split, .split.side, .cart-layout, .account-grid, .detail { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
  .hero-art { min-height: 200px; }
  .hero-art::after { background: linear-gradient(0deg, var(--panel), transparent 55%); }
  .summary { position: relative; top: auto; }
  .store-foot-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  :root { --disc: 38px; --ref-rail-width: 144px; }
  .status-clock .clock-sub { display: none; }
  .sidebar { padding: 10px 6px 10px; }
  .sidebar-brand strong { font-size: 11.5px; letter-spacing: .14em; }
  .sidebar-brand small { font-size: 8px; }
  .store-nav { display: none; }
  .ad-banner { grid-template-columns: 1fr; }
  .ad-banner img { min-height: 150px; max-height: 190px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .variant-edit-row { grid-template-columns: 1fr 1fr; }
  .payment-total { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Phones — portrait or rotated — surrender the rail for the same bar, so a
   short landscape viewport never keeps a desktop shell it cannot show. */
@media (max-width: 1100px) {
  .topbar-title { display: none; }
  .topbar-brand-rule { display: none; }
  .topbar-sada-copy { display: none; }
}
@media (max-width: 768px), (max-height: 520px) and (max-width: 1024px) {
  body { font-size: 14.5px; }
  .shell { display: block; }
  .sidebar { display: none; }
  .admin-main { min-height: 100dvh; }
  .mobile-head {
    display: grid; gap: 6px; position: sticky; top: 0; z-index: 40;
    padding: 8px 14px 9px;
    background:
      radial-gradient(140% 190% at 0% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 46%),
      linear-gradient(135deg, #1a1510, #17130D 62%, #0D0B08);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    color: #F5ECD8;
  }
  [data-theme="dark"] .mobile-head {
    background:
      radial-gradient(140% 190% at 0% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 46%),
      linear-gradient(135deg, #2a1f16, #1a1510 62%, #0D0B08);
  }
  .mh-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .mh-row .row { margin-left: auto; gap: 6px; flex-wrap: nowrap; }
  .mobile-head .brand-mark { width: 28px; height: 28px; flex-basis: 28px; }
  .mobile-head .brand-mark .mark { width: 28px; height: 28px; }
  .mh-status { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
  .mh-status .status-clock { display: inline-flex; align-items: baseline; gap: 5px; text-align: left; font-size: 10.5px; color: #A99C81; }
  .mh-status .status-clock strong { display: inline; font-size: 11.5px; color: #F5ECD8; }
  .mh-status .status-chip, .mh-status .net-chip, .mh-status .sync-chip { font-size: 10px; padding: 3px 8px; }
  .mh-status .clock-tz { display: none; }
  .mobile-head .mh-brand { display: flex; align-items: center; gap: 6px; min-width: 0; }
  .mh-sada-mark {
    flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%;
    background: #FFFFFF; border: 2px solid color-mix(in srgb, var(--accent) 62%, #FFFFFF);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .2);
    display: grid; place-items: center; overflow: hidden;
  }
  .mh-sada-mark .sada-mask { width: 72%; height: 72%; background-color: var(--accent); }
  .mh-brand-text { display: flex; flex-direction: column; gap: 0; }
  .mh-brand-text strong { color: #F6EAC8; font-size: 10px; font-weight: 900; letter-spacing: .14em; line-height: 1; }
  .mh-brand-text small { color: #A99C81; font-size: 7px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; line-height: 1.2; }
  .mh-rule { width: 1px; height: 22px; flex: 0 0 1px; background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .12), transparent); }
  .mobile-head .mark { width: 28px; height: 28px; border-radius: 50%; background: #fbf8ef; box-sizing: border-box; border: 2px solid color-mix(in srgb, var(--accent) 62%, #FFFFFF); display: grid; place-items: center; flex: 0 0 28px; }
  .mobile-head .mark .sada-mask { width: 72%; height: 72%; background-color: var(--accent); }
  .mobile-head strong { font: 700 13px/1.1 var(--serif); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #F5ECD8; }
  .mobile-head small { font-size: 9px; color: #A99C81; letter-spacing: .7px; text-transform: uppercase; display: block; }
  .mobile-head .row { margin-left: auto; gap: 6px; }
  .topbar { display: none; }
  .admin-content { padding: 16px 14px calc(var(--tabbar-reserve, 96px) + env(safe-area-inset-bottom)); }
  /* The phone bar is the same navigation language as the rail: one card in
     the same Imigongo, with the permanent destinations and More as circular
     discs. Six controls share the bar; the caption is sized from the disc so
     a rotated phone gives up height, not legibility. */
  .phonebar {
    display: flex; position: fixed; left: 8px; right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 50; align-items: stretch; justify-content: space-around;
    gap: var(--tab-gap, 2px); padding: var(--tab-pad, 6px);
    border: 1px solid var(--nav-card-edge); border-radius: 22px;
    background:
      radial-gradient(140% 150% at 50% 0%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 68%),
      var(--nav-card-ground);
    box-shadow: var(--nav-card-shadow);
    overflow: hidden; isolation: isolate;
  }
  .phonebar::before {
    content: ""; position: absolute; inset: 0; z-index: 0; border-radius: inherit;
    background-color: var(--nav-imig-ink);
    -webkit-mask-image: var(--imig-band); mask-image: var(--imig-band);
    -webkit-mask-size: var(--nav-imig-cell) var(--nav-imig-cell);
            mask-size: var(--nav-imig-cell) var(--nav-imig-cell);
    -webkit-mask-position: center; mask-position: center;
    -webkit-mask-repeat: repeat; mask-repeat: repeat;
    opacity: calc(var(--nav-imig-opacity) * .8); pointer-events: none;
  }
  .sada-tab {
    position: relative; z-index: 1; flex: 1 1 0; min-width: 0;
    display: flex; flex-direction: column; align-items: center;
    gap: var(--tab-tail, 3px); padding: var(--tab-inner-pad, 4px) 1px;
    border: 0; border-radius: 14px; background: transparent;
    color: var(--nav-ink-dim); text-decoration: none;
    font-size: var(--tab-label, 10px); font-weight: 800; letter-spacing: 0;
    line-height: 1.2; text-transform: uppercase; white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
  }
  .sada-tab-icon {
    width: var(--tab-disc, 34px); height: var(--tab-disc, 34px);
    display: grid; place-items: center; border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--nav-card-edge) 72%, transparent);
    background: color-mix(in srgb, var(--nav-disc-ground) 88%, transparent);
    color: var(--nav-disc-ink);
  }
  .sada-tab-icon svg { width: calc(var(--tab-disc, 34px) * .42); height: calc(var(--tab-disc, 34px) * .42); }
  .sada-tab-label { color: var(--nav-label-ink); text-shadow: var(--nav-label-shadow); }
  .sada-tab[aria-current="page"], .sada-tab.active { color: var(--nav-active-ink); }
  .sada-tab[aria-current="page"] .sada-tab-icon, .sada-tab.active .sada-tab-icon {
    background: var(--accent);
    border-color: color-mix(in srgb, var(--accent) 55%, #FFFFFF);
    color: var(--accent-ink);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
  }
  .sada-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .phonebar.tab-tight .sada-tab-label { display: none; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .kpi { padding: 12px 13px; }
  .kpi strong { font-size: 21px; }
  .split.even { grid-template-columns: 1fr; }
  .card { padding: 15px; border-radius: 16px; }
  .card-head { margin-bottom: 12px; }
  .store-head { padding: 8px 12px; min-height: 62px; gap: 8px; flex-wrap: wrap; }
  .store-brand .mark { width: 36px; height: 36px; flex-basis: 36px; font-size: 19px; }
  .store-brand strong { font-size: 15px; }
  .store-brand small { font-size: 9px; }
  .store-tools { gap: 6px; }
  .store-tools .select-mini { padding: 7px 8px; min-height: 34px; font-size: 11.5px; }
  .store-body { padding: 0 12px; }
  .hero { border-radius: 20px; min-height: 0; }
  .hero-copy { padding: 22px 18px; }
  .hero-copy h1 { font-size: clamp(30px, 9vw, 40px); }
  .hero-art { display: none; }
  .ad-banner { min-height: 0; border-radius: 16px; }
  .ad-banner .ad-copy { padding: 18px; }
  .ad-banner img { display: none; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .product-body { padding: 10px 10px 11px; gap: 5px; }
  .product-body h3 { font-size: 13.5px; }
  .product-price { font-size: 16px; }
  .product-media .sample { font-size: 8.5px; padding: 2px 5px; }
  .stock-flag { font-size: 8.5px; padding: 2px 6px; }
  .product-foot { flex-wrap: wrap; }
  .product-foot select { flex-basis: 100%; }
  .product-foot .add { flex: 1; }
  .detail { margin-top: 14px; gap: 16px; }
  .detail-media { border-radius: 18px; }
  .cart-line { grid-template-columns: 54px minmax(0, 1fr); }
  .cart-line img { width: 54px; height: 48px; }
  .cart-line .line-total { grid-column: 2; text-align: left; }
  .store-foot-inner { grid-template-columns: 1fr; gap: 16px; padding: 20px 14px; }
  .store-shell { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .store-phonebar { border-top-color: var(--line); }
  .modal { padding: 16px; border-radius: 18px; max-height: 92dvh; }
  .thread { height: min(58dvh, 460px); }
  .bubble { max-width: 88%; }
  .thread-since { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
  .variant-edit-row { grid-template-columns: 1fr 1fr; }
  .ad-mini { grid-template-columns: 1fr; }
  .ad-mini img { width: 100%; height: 110px; }
  .audit-row { grid-template-columns: 1fr auto; }
  .audit-row .when { grid-column: 1 / -1; }
  .hours-row { grid-template-columns: 74px 1fr 1fr auto; gap: 5px; }
  .page-head h1 { font-size: 26px; }
  .toasts { bottom: calc(var(--tabbar-reserve, 96px) - 8px + env(safe-area-inset-bottom)); }
  .store-shell .toasts { bottom: calc(18px + env(safe-area-inset-bottom)); }
  table.data { min-width: 560px; }
  .toolbar-row { gap: 7px; }
  .toolbar-row .search-box { flex-basis: 100%; }
  .chat-launcher { width: 50px; height: 50px; bottom: 88px; right: 16px; }
  .chat-panel { bottom: 148px; right: 16px; width: calc(100vw - 32px); max-width: 400px; max-height: min(60dvh, calc(100dvh - 176px)); }
  .chat-close { width: 44px; height: 44px; min-height: 44px; }
  .chat-body { min-height: 200px; }
}
@media (max-width: 400px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi strong { font-size: 22px; }
  .filters { gap: 5px; }
  .chip { padding: 7px 11px; font-size: 12px; }
  .payment-total { grid-template-columns: 1fr; }
  .store-brand small { display: none; }
  .cart-btn, .icon-btn { width: 38px; height: 38px; min-height: 38px; }
  .mh-row a[href="#/"] { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
