/* =============================================================
   NOD — Ninja On Demand — portal styles
   Mobile-first, fluid (clamp/min/max), responsive across the
   full width continuum. Brand blue #019AFF.
   ============================================================= */

*, *::before, *::after { box-sizing: border-box; }

/* authored display values (flex/grid) beat the UA [hidden] rule — re-assert it */
[hidden] { display: none !important; }

:root {
  --nod-blue: #019AFF;
  --nod-blue-dark: #0177c4;
  --nod-blue-soft: rgba(1, 154, 255, 0.1);
  --nod-ink: #0f172a;
  --nod-ink-soft: #475569;
  --nod-line: #e2e8f0;
  --nod-bg: #f6f8fb;
  --nod-card: #ffffff;
  --nod-danger: #dc2626;
  --nod-radius: 14px;

  --fs-0: clamp(0.8125rem, 0.78rem + 0.2vw, 0.9375rem);
  --fs-1: clamp(0.9375rem, 0.9rem + 0.25vw, 1.0625rem);
  --fs-2: clamp(1.25rem, 1.05rem + 1vw, 1.9rem);
  --fs-3: clamp(1.6rem, 1.2rem + 2vw, 2.6rem);
  --sp: clamp(1rem, 0.8rem + 1vw, 1.75rem);
}

html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--nod-ink);
  font-size: var(--fs-1);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* ---------- brand logo ---------- */
.nod-logo {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 900; letter-spacing: 0.02em;
  font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem);
}
.nod-logo--light { color: #fff; }
.nod-logo--dark { color: var(--nod-ink); }
/* head-icon mark next to the NOD wordmark (white-bg surfaces) */
.nod-logo-img { height: clamp(34px, 2rem + 0.8vw, 44px); width: auto; flex: 0 0 auto; display: block; }
.auth-brand-logo .nod-logo-img { height: clamp(64px, 5rem + 1vw, 96px); }
.nod-mark-img { width: clamp(30px, 2rem + 0.6vw, 38px); height: auto; flex: 0 0 auto; display: block; }
/* stylized NOD wordmark image (replaces the plain "NOD" text on white surfaces) */
.nod-wordmark { height: clamp(20px, 1.1rem + 0.7vw, 26px); width: auto; flex: 0 0 auto; display: block; }
/* NOD lockup (head mark + wordmark) on the blue brand panel */
.auth-brand-logo { display: inline-flex; align-items: center; gap: 14px; margin-bottom: 2px; }
.auth-brand-logo .nod-mark-img { width: clamp(56px, 4.5rem + 1vw, 84px); }
.auth-brand-logo .nod-wordmark { height: clamp(34px, 2.4rem + 1vw, 52px); }

/* =============================================================
   AUTH (login / signup)
   ============================================================= */
/* ---------- shared address widget (NodAddress) — global so auth/admin/checkout all get it ---------- */
.nod-addr { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.nod-addr-span { grid-column: 1 / -1; }
.nod-addr-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.nod-addr-field > span { font-size: var(--fs-0); font-weight: 700; color: var(--nod-ink); }
.nod-addr-field > span i { font-style: normal; font-weight: 600; color: var(--nod-ink-soft); font-size: 0.82em; }
.nod-addr-field input { min-height: 46px; padding: 10px 12px; border: 1px solid var(--nod-line); border-radius: 11px; font: inherit; font-size: var(--fs-0); background: var(--nod-card); color: var(--nod-ink); width: 100%; }
.nod-addr-field input:focus { outline: 2px solid var(--nod-blue-soft); border-color: var(--nod-blue); }
.nod-addr-row3 { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.8rem; }
@media (max-width: 560px) { .nod-addr, .nod-addr-row3 { grid-template-columns: 1fr; } }
.nod-co-country { position: relative; }
.nod-co-countrybtn { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 46px; padding: 8px 12px; border: 1px solid var(--nod-line); border-radius: 11px; background: var(--nod-card); color: var(--nod-ink); font: inherit; font-size: var(--fs-0); cursor: pointer; text-align: left; }
.nod-co-countrybtn:focus { outline: 2px solid var(--nod-blue-soft); border-color: var(--nod-blue); }
.nod-co-flag { width: 26px; height: 18px; border-radius: 3px; flex: 0 0 auto; box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12); overflow: hidden; display: block; }
.nod-co-flag svg { width: 100%; height: 100%; display: block; }
.nod-co-cname { flex: 1 1 auto; font-weight: 600; }
.nod-co-cchev { width: 16px; height: 16px; color: var(--nod-ink-soft); flex: 0 0 auto; }
.nod-co-countrymenu { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; background: var(--nod-card); border: 1px solid var(--nod-line); border-radius: 12px; box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16); padding: 6px; }
.nod-co-countrymenu[hidden] { display: none; }
.nod-co-copt { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 10px; border: none; background: none; border-radius: 8px; font: inherit; font-size: var(--fs-0); color: var(--nod-ink); cursor: pointer; text-align: left; min-height: 42px; }
.nod-co-copt:hover, .nod-co-copt.is-on { background: var(--nod-blue-soft); color: var(--nod-blue-dark); }
.nod-co-addr { position: relative; }
.nod-co-suggest { position: absolute; left: 0; right: 0; top: 100%; z-index: 25; margin: 4px 0 0; padding: 6px; list-style: none; background: var(--nod-card); border: 1px solid var(--nod-line); border-radius: 12px; box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16); max-height: 260px; overflow-y: auto; }
.nod-co-suggest[hidden] { display: none; }
.nod-co-sopt { display: flex; flex-direction: column; gap: 1px; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.nod-co-sopt:hover { background: var(--nod-blue-soft); }
.nod-co-sopt strong { font-size: var(--fs-0); color: var(--nod-ink); font-weight: 700; }
.nod-co-sopt span { font-size: 0.78rem; color: var(--nod-ink-soft); }
.nod-co-suggest-note { padding: 4px 10px 6px; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--nod-ink-soft); }

.auth-subhead { margin: 0.6rem 0 0.2rem; font-size: var(--fs-0); font-weight: 800; color: var(--nod-ink); }
.auth-subhead i { display: block; font-style: normal; font-weight: 600; color: var(--nod-ink-soft); font-size: 0.82em; margin-top: 2px; }

.auth-body { min-height: 100svh; background: var(--nod-bg); }
.auth-split {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .auth-split { grid-template-columns: 1.05fr 1fr; }
  /* pin the brand panel: the (long) form scrolls, the left column stays put */
  .auth-brand { position: sticky; top: 0; align-self: start; height: 100svh; min-height: 0; overflow: hidden; }
}

/* brand panel — full-screen landing on mobile (with CTAs), left column on desktop */
.auth-brand {
  display: flex; flex-direction: column; align-items: flex-start;
  background: linear-gradient(150deg, #0177c4 0%, var(--nod-blue) 55%, #38b6ff 100%);
  color: #fff;
  padding: clamp(1.75rem, 1rem + 4vw, 4.5rem);
  position: relative; overflow: hidden;
  min-height: 100svh;
}
.auth-brand::after {
  content: ""; position: absolute; right: -120px; bottom: -120px;
  width: 360px; height: 360px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.auth-brand-inner { position: relative; z-index: 1; max-width: 30rem; }
/* mobile CTAs (shown only while the brand panel is the landing) */
.auth-brand-cta { display: flex; flex-direction: column; gap: 0.65rem; max-width: 30rem; margin: 0 0 1.75rem; }
.auth-brand-btn { width: 100%; min-height: 52px; border-radius: 12px; border: none; font: inherit; font-weight: 800; font-size: var(--fs-1); cursor: pointer; }
.auth-brand-btn--primary { background: #fff; color: var(--nod-blue-dark); }
.auth-brand-btn--ghost { background: rgba(255, 255, 255, 0.14); color: #fff; border: 1.5px solid rgba(255, 255, 255, 0.65); }
.auth-back { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 0.9rem; padding: 0; background: none; border: none; font: inherit; font-size: var(--fs-0); font-weight: 700; color: var(--nod-blue-dark); cursor: pointer; }
@media (min-width: 900px) { .auth-brand-cta, .auth-back { display: none; } }
.auth-brand-tag { margin: 6px 0 0; font-weight: 600; opacity: 0.85; letter-spacing: 0.08em; text-transform: uppercase; font-size: var(--fs-0); }
.auth-brand-h { font-size: var(--fs-3); line-height: 1.1; margin: clamp(1.5rem, 1rem + 2vw, 2.5rem) 0 0.75rem; }
.auth-brand-sub { font-size: var(--fs-1); opacity: 0.92; margin: 0 0 1.75rem; }
.auth-brand-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.auth-brand-list li { display: flex; align-items: center; gap: 10px; opacity: 0.95; }
.auth-brand-list li svg { flex: 0 0 auto; }
/* reseller value props (signed-out marketing panel) */
.auth-brand-feats { list-style: none; margin: 0 0 1.5rem; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.auth-brand-feats li { display: flex; align-items: flex-start; gap: 12px; }
.auth-brand-feat-ic { width: 40px; height: 40px; border-radius: 11px; background: rgba(255, 255, 255, 0.16); display: grid; place-items: center; flex: 0 0 auto; }
.auth-brand-feats strong { display: block; font-size: var(--fs-1); font-weight: 800; }
.auth-brand-feats div span { display: block; margin-top: 2px; font-size: var(--fs-0); opacity: 0.85; line-height: 1.45; }
/* desktop: three benefit tags side by side in one row; stack on narrow widths */
.auth-brand-list--compact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.55rem 0.85rem; }
.auth-brand-list--compact li { align-items: flex-start; font-size: 0.8rem; gap: 7px; line-height: 1.3; }
.auth-brand-list--compact li svg { margin-top: 2px; }
@media (max-width: 700px) { .auth-brand-list--compact { grid-template-columns: 1fr; } }

/* auth form pane */
.auth-pane {
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp);
  min-height: 100svh;
}
/* mobile: land on the brand panel; a CTA reveals the matching auth form */
@media (max-width: 899.98px) {
  .auth-pane { display: none; }
  body.nod-show-form .auth-brand { display: none; }
  body.nod-show-form .auth-pane { display: flex; }
}
.auth-card {
  width: 100%; max-width: 26rem;
  background: var(--nod-card);
  border: 1px solid var(--nod-line);
  border-radius: 18px;
  padding: clamp(1.5rem, 1rem + 2.5vw, 2.5rem);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}
.auth-card-logo { margin-bottom: clamp(1.25rem, 1rem + 1vw, 1.75rem); }

.auth-tabs {
  display: flex; gap: 4px; padding: 4px;
  background: var(--nod-bg); border-radius: 12px; margin-bottom: 1.25rem;
}
.auth-tab {
  flex: 1 1 0; padding: 10px; min-height: 44px;
  border: none; background: transparent; border-radius: 9px;
  font: inherit; font-weight: 700; color: var(--nod-ink-soft); cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.auth-tab.is-on { background: var(--nod-card); color: var(--nod-ink); box-shadow: 0 1px 3px rgba(15,23,42,0.1); }

.auth-error {
  margin: 0 0 1rem; padding: 10px 14px;
  background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
  border-radius: 10px; font-size: var(--fs-0); font-weight: 600;
}

.auth-form { display: flex; flex-direction: column; }
.auth-h { margin: 0 0 4px; font-size: var(--fs-2); }
.auth-p { margin: 0 0 1.25rem; color: var(--nod-ink-soft); font-size: var(--fs-0); }
.auth-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 1rem; }
.auth-field span { font-size: var(--fs-0); font-weight: 700; color: var(--nod-ink-soft); }
.auth-field input {
  width: 100%; min-height: 48px; padding: 12px 14px;
  border: 1px solid var(--nod-line); border-radius: 10px;
  font: inherit; font-size: var(--fs-1); color: var(--nod-ink); background: #fff;
}
.auth-field input:focus { outline: none; border-color: var(--nod-blue); box-shadow: 0 0 0 3px var(--nod-blue-soft); }

.auth-btn {
  width: 100%; min-height: 50px; margin-top: 0.5rem;
  border: none; border-radius: 11px;
  background: var(--nod-blue); color: #fff;
  font: inherit; font-weight: 800; font-size: var(--fs-1); cursor: pointer;
  transition: background 0.15s ease;
}
.auth-btn:hover { background: var(--nod-blue-dark); }
.auth-btn:disabled { opacity: 0.6; cursor: default; }
.auth-btn:focus-visible { outline: 2px solid var(--nod-blue); outline-offset: 2px; }

.auth-foot { margin: 1.5rem 0 0; text-align: center; font-size: var(--fs-0); color: #94a3b8; }

/* ===== Create-account form (wide, two-column) ===== */
/* widen the card only while the signup form is showing */
.auth-card:has(form[data-form="signup"]:not([hidden])) { max-width: 40rem; }
.auth-section { margin: 0 0 0.75rem; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--nod-ink-soft); }
.auth-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 560px) { .auth-grid2 { grid-template-columns: 1fr; } }
.auth-field span i { font-style: normal; font-weight: 600; color: var(--nod-ink-soft); }
.auth-hint { margin: -2px 0 2px; font-size: 0.82em; font-weight: 400; color: var(--nod-ink-soft); }
/* forgot-password link + reset notice (sign-in) */
.auth-forgot { align-self: flex-end; margin: -2px 0 1rem; padding: 0; border: none; background: none; font: inherit; font-size: var(--fs-0); font-weight: 700; color: var(--nod-blue-dark); cursor: pointer; }
.auth-forgot:hover { text-decoration: underline; }
.auth-note { margin: 0 0 1rem; padding: 0.7rem 0.9rem; border-radius: 10px; background: #ecfdf3; border: 1px solid #bbf7d0; color: #15803d; font-size: var(--fs-0); line-height: 1.45; }
/* return-address card */
.auth-addrcard { margin: 0.25rem 0 1.25rem; padding: 1.1rem; border-radius: 16px; background: var(--nod-blue-soft); border: 1px solid #cfe4ff; }
.auth-addrcard-title { display: block; color: var(--nod-ink); font-size: var(--fs-1); font-weight: 800; }
.auth-addrcard-desc { margin: 4px 0 0.95rem; font-size: var(--fs-0); font-weight: 400; color: var(--nod-ink-soft); line-height: 1.45; }

/* =============================================================
   APP (dashboard)
   ============================================================= */
.app-body { background: var(--nod-bg); min-height: 100svh; }

.app-topbar {
  display: flex; align-items: center; gap: var(--sp);
  padding: 0.75rem var(--sp);
  background: #fff; border-bottom: 1px solid var(--nod-line);
  position: sticky; top: 0; z-index: 20;
}
.app-burger { display: none; border: none; background: none; cursor: pointer; color: var(--nod-ink); padding: 4px; }
.app-top-right { margin-left: auto; display: flex; align-items: center; gap: clamp(0.5rem, 1vw, 1rem); }
.app-user { font-size: var(--fs-0); font-weight: 600; color: var(--nod-ink-soft); }
@media (max-width: 520px) { .app-user { display: none; } }
.app-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--nod-blue); color: #fff;
  display: grid; place-items: center; font-weight: 800; flex: 0 0 auto;
}
.app-logout {
  text-decoration: none; font-size: var(--fs-0); font-weight: 700;
  color: var(--nod-ink-soft); padding: 8px 12px; border: 1px solid var(--nod-line); border-radius: 9px;
}
.app-logout:hover { border-color: var(--nod-blue); color: var(--nod-blue); }
/* persistent "Start a new order" button in the header (data-new-order → order-builder panel) */
.app-newbtn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  text-decoration: none; font-size: var(--fs-0); font-weight: 700; line-height: 1;
  color: #fff; background: var(--nod-blue); border: none; border-radius: 9px;
  padding: 9px 14px; cursor: pointer; white-space: nowrap;
}
.app-newbtn:hover { filter: brightness(0.93); }
.app-newbtn svg { flex: 0 0 auto; }
.app-newbtn .nb-short { display: none; }
@media (pointer: coarse) { .app-newbtn { min-height: 44px; } }
/* the header gets crowded on small screens: shorten the label, then go icon-only */
@media (max-width: 640px) { .app-newbtn .nb-full { display: none; } .app-newbtn .nb-short { display: inline; } }
@media (max-width: 460px) { .app-newbtn .nb-short { display: none; } .app-newbtn { padding: 9px 11px; } }

.app-shell { display: grid; grid-template-columns: 1fr; }
@media (min-width: 860px) {
  .app-shell { grid-template-columns: 300px minmax(0, 1fr); }
  /* keep the left menu in view while the page scrolls (header is already sticky) */
  .app-sidebar { position: sticky; top: 63px; align-self: start; max-height: calc(100svh - 63px); overflow-y: auto; }
}

.app-sidebar {
  display: flex; flex-direction: column; gap: 2px;
  padding: var(--sp);
  background: #fff; border-right: 1px solid var(--nod-line);
}
/* drawer on small screens */
@media (max-width: 859.98px) {
  .app-burger { display: inline-flex; align-items: center; }
  .app-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: min(82vw, 280px); z-index: 40;
    transform: translateX(-100%); transition: transform 0.2s ease;
    box-shadow: 0 0 60px rgba(15,23,42,0.25); padding-top: 1.25rem;
  }
  .app-sidebar.is-open { transform: translateX(0); }
}
.app-nav {
  display: flex; align-items: center; gap: 11px;
  text-decoration: none; padding: 11px 14px; border-radius: 10px;
  color: var(--nod-ink-soft); font-weight: 700; font-size: var(--fs-0);
}
.app-nav svg { flex: 0 0 auto; }
.app-nav:hover { background: var(--nod-bg); color: var(--nod-ink); }
.app-nav.is-on { background: var(--nod-blue-soft); color: var(--nod-blue-dark); }

/* ---- multi-store switcher (top of sidebar) ---- */
.nod-ss { position: relative; margin: 0 0 6px; padding: 0 0 8px; border-bottom: 1px solid var(--nod-line); }
.nod-ss-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 1px solid var(--nod-line); border-radius: 12px; background: var(--nod-card); cursor: pointer; text-align: left; font: inherit; }
.nod-ss-btn:hover { border-color: #cdd7e5; background: var(--nod-bg); }
.nod-ss-btn:focus-visible { outline: 2px solid var(--nod-blue); outline-offset: 2px; }
.nod-ss-ava { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 9px; background: var(--nod-blue-soft); color: var(--nod-blue-dark); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.95rem; overflow: hidden; }
.nod-ss-ava.has-img, .nod-ss-optava.has-img { background: #fff; }
.nod-ss-ava img, .nod-ss-optava img { width: 100%; height: 100%; object-fit: contain; }
.nod-ss-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.nod-ss-k { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--nod-ink-soft); }
.nod-ss-name { font-size: var(--fs-0); font-weight: 800; color: var(--nod-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nod-ss-chev { flex: 0 0 auto; margin-left: auto; color: var(--nod-ink-soft); }
.nod-ss-menu { margin: 6px 0 2px; padding: 6px; background: var(--nod-card); border: 1px solid var(--nod-line); border-radius: 12px; box-shadow: 0 12px 30px rgba(15,23,42,0.12); display: flex; flex-direction: column; gap: 1px; }
.nod-ss-menu[hidden] { display: none; }
.nod-ss-head { padding: 4px 8px 6px; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--nod-ink-soft); }
.nod-ss-opt { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 8px; border: none; background: none; border-radius: 9px; cursor: pointer; text-align: left; font: inherit; color: var(--nod-ink); }
.nod-ss-opt:hover { background: var(--nod-bg); }
.nod-ss-opt.is-on { background: var(--nod-blue-soft); }
.nod-ss-optava { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 7px; background: var(--nod-blue-soft); color: var(--nod-blue-dark); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.78rem; overflow: hidden; }
.nod-ss-optname { flex: 1 1 auto; min-width: 0; font-size: var(--fs-0); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nod-ss-optname i { font-style: normal; font-weight: 700; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--nod-ink-soft); margin-left: 4px; }
.nod-ss-check { flex: 0 0 auto; color: var(--nod-blue); }
.nod-ss-sep { height: 1px; background: var(--nod-line); margin: 5px 2px; }
.nod-ss-new { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px; border: none; background: none; border-radius: 9px; cursor: pointer; font: inherit; font-size: var(--fs-0); font-weight: 800; color: var(--nod-blue-dark); }
.nod-ss-new:hover { background: var(--nod-blue-soft); }
.nod-ss-new svg { flex: 0 0 auto; }

/* ---- new-store onboarding page ---- */
.ns-wrap { min-height: 100svh; display: flex; align-items: flex-start; justify-content: center; padding: clamp(1.25rem, 0.8rem + 3vw, 3rem) 1.25rem; }
.ns-card { width: 100%; max-width: 40rem; }
.ns-back { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 1rem; padding: 0; background: none; border: none; font: inherit; font-size: var(--fs-0); font-weight: 700; color: var(--nod-blue-dark); text-decoration: none; cursor: pointer; }
.ns-back:hover { text-decoration: underline; }
.ns-profhead { display: flex; align-items: baseline; gap: 8px; }
.ns-profhead i { font-style: normal; font-weight: 600; text-transform: none; letter-spacing: 0; font-size: 0.82em; color: var(--nod-ink-soft); }
.ns-profile { border: 1px solid var(--nod-line); border-radius: 12px; overflow: hidden; }
.ns-prow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; font-size: var(--fs-0); }
.ns-prow + .ns-prow { border-top: 1px solid var(--nod-line); }
.ns-prow span { color: var(--nod-ink-soft); font-weight: 600; }
.ns-prow b { color: var(--nod-ink); font-weight: 700; text-align: right; word-break: break-word; }

.app-main { padding: clamp(1.25rem, 0.8rem + 2vw, 2.5rem); min-width: 0; }
.app-welcome { margin-bottom: var(--sp); }
.app-welcome-head { display: flex; align-items: center; flex-wrap: wrap; gap: clamp(0.6rem, 2vw, 1.1rem); }
.app-h1 { margin: 0 0 4px; font-size: var(--fs-2); }
.app-sub { margin: 0; color: var(--nod-ink-soft); font-size: var(--fs-0); }
/* "View your store" — link by the greeting to the current store's branded guest storefront */
.app-viewstore {
  display: inline-flex; align-items: center; gap: 0.4rem; margin-bottom: 4px;
  text-decoration: none; font-size: var(--fs-0); font-weight: 700; white-space: nowrap;
  color: var(--nod-blue); background: #fff; border: 1px solid var(--nod-line); border-radius: 9px;
  padding: 7px 13px;
}
.app-viewstore:hover { border-color: var(--nod-blue); background: #f0f7ff; }
.app-viewstore svg { flex: 0 0 auto; }
@media (pointer: coarse) { .app-viewstore { min-height: 44px; } }

.app-cards {
  display: grid; gap: var(--sp);
  grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr));
  margin-bottom: var(--sp);
}
.app-card {
  background: var(--nod-card); border: 1px solid var(--nod-line); border-radius: var(--nod-radius);
  padding: clamp(1rem, 0.8rem + 1vw, 1.5rem);
  display: flex; flex-direction: column; gap: 4px;
}
.app-card-k { font-size: var(--fs-0); font-weight: 700; color: var(--nod-ink-soft); }
.app-card-v { font-size: clamp(1.6rem, 1.3rem + 1.5vw, 2.2rem); font-weight: 900; line-height: 1.1; }
.app-card-v--sm { font-size: var(--fs-1); font-weight: 800; overflow-wrap: anywhere; }
.app-card-note { font-size: var(--fs-0); color: #94a3b8; }
.app-card--accent { background: linear-gradient(150deg, var(--nod-blue) 0%, #38b6ff 100%); color: #fff; border-color: transparent; }
.app-card--accent .app-card-k, .app-card--accent .app-card-note { color: rgba(255,255,255,0.85); }

.app-panel {
  background: var(--nod-card); border: 1px solid var(--nod-line); border-radius: var(--nod-radius);
  padding: clamp(1.25rem, 1rem + 1.5vw, 2rem); margin-bottom: var(--sp);
}
.app-panel-h { margin: 0 0 0.5rem; font-size: var(--fs-1); font-weight: 800; }
.app-panel-p { margin: 0 0 1.25rem; color: var(--nod-ink-soft); font-size: var(--fs-0); max-width: 46ch; }
.app-cta {
  display: inline-flex; align-items: center; gap: 8px;
  border: none; border-radius: 11px; background: var(--nod-blue); color: #fff;
  font: inherit; font-weight: 800; padding: 13px 22px; min-height: 48px; cursor: pointer;
}
.app-cta:hover { background: var(--nod-blue-dark); }
.app-panel-soon { margin: 0.75rem 0 0; color: var(--nod-blue-dark); font-weight: 700; font-size: var(--fs-0); }

.app-empty { text-align: center; padding: clamp(1.5rem, 1rem + 3vw, 3rem) 1rem; color: var(--nod-ink-soft); }
.app-empty-t { margin: 0 0 4px; font-weight: 800; }
.app-empty-s { margin: 0; font-size: var(--fs-0); color: #94a3b8; }

/* scrim behind the mobile drawer */
.app-scrim { position: fixed; inset: 0; background: rgba(15,23,42,0.4); z-index: 35; border: none; }

@media (prefers-reduced-motion: reduce) {
  .auth-tab, .auth-btn, .app-sidebar { transition: none; }
}

/* ===== shared confirm dialog (delete / delete all / clear cart) ===== */
.nod-confirm-scrim { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 1.2rem; background: rgba(15, 23, 42, 0.5); backdrop-filter: blur(2px); }
.nod-confirm { width: min(380px, 100%); background: var(--nod-card, #fff); border-radius: 16px; padding: 1.4rem 1.4rem 1.2rem; box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3); }
.nod-confirm-h { margin: 0 0 0.4rem; font-size: 1.15rem; font-weight: 800; color: var(--nod-ink, #0f172a); }
.nod-confirm-body { margin: 0 0 1.1rem; font-size: 0.92rem; line-height: 1.5; color: var(--nod-ink-soft, #64748b); }
.nod-confirm-btns { display: flex; gap: 0.6rem; justify-content: flex-end; }
.nod-confirm-btns button { border-radius: 11px; padding: 9px 16px; font: inherit; font-weight: 700; font-size: 0.9rem; cursor: pointer; border: 1px solid var(--nod-line, #e2e8f0); }
.nod-confirm-cancel { background: var(--nod-card, #fff); color: var(--nod-ink, #0f172a); }
.nod-confirm-cancel:hover { background: var(--nod-bg, #f1f5f9); }
.nod-confirm-ok { background: var(--nod-blue, #019aff); border-color: var(--nod-blue, #019aff); color: #fff; }
.nod-confirm-ok.is-danger { background: var(--nod-danger, #dc2626); border-color: var(--nod-danger, #dc2626); }
.nod-confirm-ok:hover { filter: brightness(0.94); }

/* ===== Edit with AI modal (Ideogram edit-lite via server proxy) ===== */
.nod-ai-scrim { position: fixed; inset: 0; z-index: 210; display: grid; place-items: center; padding: 1rem; background: rgba(15, 23, 42, 0.55); backdrop-filter: blur(2px); overflow-y: auto; }
.nod-ai-modal { width: min(560px, 100%); background: var(--nod-card, #fff); border-radius: 20px; box-shadow: 0 30px 70px rgba(15, 23, 42, 0.35); overflow: hidden; }
.nod-ai-head { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.3rem 0.5rem; }
.nod-ai-head h2 { margin: 0; font-size: 1.15rem; font-weight: 800; color: var(--nod-ink, #0f172a); }
.nod-ai-x { border: none; background: none; cursor: pointer; color: var(--nod-ink, #0f172a); width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; }
.nod-ai-x:hover { background: var(--nod-bg, #f1f5f9); }
.nod-ai-x svg { width: 20px; height: 20px; }
.nod-ai-body { padding: 0.5rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: 0.9rem; }
.nod-ai-stage { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 1 / 1; display: grid; place-items: center; padding: 10px; }
.nod-ai-stage img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.nod-ai-stage.is-loading { background: var(--nod-bg, #f1f5f9); gap: 0.7rem; color: var(--nod-ink-soft, #64748b); font-weight: 700; grid-auto-flow: row; }
.nod-ai-stage.is-loading .nod-ob-spin { width: 30px; height: 30px; border-width: 3px; }
.nod-ai-help { margin: 0; text-align: center; font-size: 0.95rem; line-height: 1.45; color: var(--nod-ink-soft, #64748b); }
.nod-ai-promptbox { position: relative; }
.nod-ai-input { width: 100%; min-height: 110px; resize: vertical; padding: 14px 56px 14px 16px; border: 2px solid var(--nod-blue, #019aff); border-radius: 16px; font: inherit; font-size: 1rem; color: var(--nod-ink, #0f172a); line-height: 1.5; }
.nod-ai-input:focus { outline: none; box-shadow: 0 0 0 3px var(--nod-blue-soft, #e0f2ff); }
.nod-ai-send { position: absolute; right: 12px; bottom: 12px; width: 44px; height: 44px; border: none; border-radius: 50%; cursor: pointer; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #7c3aed, #2563eb); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35); }
.nod-ai-send:hover { filter: brightness(1.05); }
.nod-ai-send svg { width: 20px; height: 20px; }
.nod-ai-toggle { display: flex; gap: 4px; align-self: center; background: var(--nod-bg, #f1f5f9); border-radius: 999px; padding: 4px; }
.nod-ai-tg { border: none; background: none; border-radius: 999px; padding: 9px 22px; font: inherit; font-weight: 800; font-size: 0.92rem; color: var(--nod-ink-soft, #64748b); cursor: pointer; }
.nod-ai-tg[data-ai-show="ai"].is-on { background: #7c3aed; color: #fff; }
.nod-ai-tg[data-ai-show="original"].is-on { background: var(--nod-blue, #019aff); color: #fff; }
.nod-ai-apply, .nod-ai-useorig { width: 100%; }
.nod-ai-redo { margin: 0.1rem 0 0; text-align: center; font-size: 0.9rem; color: var(--nod-ink-soft, #64748b); }
.nod-ai-startover { border: none; background: none; padding: 0; font: inherit; font-weight: 800; font-size: 0.95rem; color: var(--nod-blue, #019aff); cursor: pointer; }
.nod-ai-startover:hover { text-decoration: underline; }

/* Catalog category sections (each spans the old grid and holds its own card grid) */
.nod-cat-section { grid-column: 1 / -1; margin-bottom: clamp(1rem, 2.5vw, 1.8rem); }
.nod-cat-secth { margin: 0 0 0.8rem; font-size: calc(var(--fs-2) * 0.9); font-weight: 800; color: var(--nod-ink); }
.nod-cat-cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(17rem, 100%), 1fr)); }

/* "Start a new order" store picker (multi-store) */
.nod-orderpick { position: fixed; z-index: 70; min-width: 250px; background: #fff; border: 1px solid var(--nod-line); border-radius: 13px; box-shadow: 0 14px 44px rgba(15, 23, 42, 0.16); padding: 7px; }
.nod-orderpick-h { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--nod-ink-soft); padding: 6px 9px 5px; }
.nod-orderpick-opt { display: flex; align-items: center; gap: 9px; width: 100%; border: none; background: none; padding: 8px 9px; border-radius: 9px; cursor: pointer; font-size: var(--fs-0); font-weight: 700; color: var(--nod-ink); text-align: left; min-height: 44px; }
.nod-orderpick-opt:hover { background: #f0f7ff; }
.nod-orderpick-ava { width: 26px; height: 26px; border-radius: 50%; background: var(--nod-blue); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: 0 0 auto; overflow: hidden; }
.nod-orderpick-ava.has-img { background: #fff; border: 1px solid var(--nod-line); }
.nod-orderpick-ava img { width: 100%; height: 100%; object-fit: contain; }
.nod-orderpick-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
