/* One stylesheet for storefront, account and admin.
   Store themes set --brand, --accent, --bg, --text, --radius, --font in the page head. */
:root {
  --brand: #1d4ed8; --accent: #f59e0b; --bg: #ffffff; --text: #0f172a; --radius: 8px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --muted: #64748b; --line: #e2e8f0; --soft: #f8fafc; --soft2: #f1f5f9;
  --ok: #15803d; --ok-bg: #dcfce7; --warn: #b45309; --warn-bg: #fef3c7; --err: #b91c1c; --err-bg: #fee2e2; --info: #1d4ed8; --info-bg: #dbeafe;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .06);
  --shadow-lg: 0 10px 40px rgba(15, 23, 42, .18);
  --side-w: 240px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); font-size: 15px; line-height: 1.5; }
body.is-admin { background: var(--soft2); --bg: var(--soft2); }
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.1rem; } h4 { font-size: 1rem; }
p { margin: 0 0 .8em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
.muted { color: var(--muted); } .small { font-size: .85em; } .pre { white-space: pre-line; }
.ta-right { text-align: right; } .ta-center { text-align: center; }
.row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; } .gap-s { gap: 6px; } .grow { flex: 1; }
.stack > * + * { margin-top: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.linkish { background: none; border: 0; color: var(--brand); cursor: pointer; padding: 0; font: inherit; }
.nowrap { white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 8px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; color: var(--text); font: inherit; font-weight: 500; cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { background: var(--soft); border-color: #cbd5e1; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, .csel-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand); filter: brightness(1.08); border-color: var(--brand); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #111; }
.btn-danger { background: #fff; color: var(--err); border-color: #fca5a5; }
.btn-danger:hover { background: var(--err-bg); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgba(15, 23, 42, .05); }
.btn-sm { min-height: 30px; padding: 4px 10px; font-size: .88em; }
.btn-lg { min-height: 48px; padding: 12px 22px; font-size: 1.05em; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid currentColor; border-color: var(--muted) transparent var(--muted) transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-primary.is-busy::after { border-color: #fff transparent #fff transparent; }
.icon-btn { background: none; border: 0; font-size: 1.15rem; padding: 6px 8px; cursor: pointer; border-radius: 6px; color: inherit; line-height: 1; }
.icon-btn:hover { background: rgba(15, 23, 42, .06); }

input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]), select, textarea, .csel-btn {
  width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: var(--radius); background: #fff; color: var(--text); font: inherit;
}
textarea { resize: vertical; min-height: 70px; }
input:disabled, select:disabled, textarea:disabled, .csel-btn:disabled { background: var(--soft2); color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid.cols-1 { grid-template-columns: 1fr; }
.span-2 { grid-column: 1 / -1; }
.cols-1 .span-2 { grid-column: auto; }
.field label { display: block; font-weight: 500; margin-bottom: 4px; font-size: .92em; }
.field .req { color: var(--err); margin-left: 2px; }
.field .help { color: var(--muted); font-size: .85em; margin-top: 4px; }
.field-err { color: var(--err); font-size: .85em; margin-top: 3px; }
.field-err:empty { display: none; }
.field.has-err input, .field.has-err select, .field.has-err textarea, .field.has-err .csel-btn { border-color: var(--err); }
.form-heading { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 1rem; }
.form-note { background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; font-size: .9em; color: var(--muted); }
.form-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; align-items: center; }
.input-affix { display: flex; align-items: stretch; }
.input-affix > span { display: flex; align-items: center; padding: 0 10px; border: 1px solid #cbd5e1; border-right: 0; border-radius: var(--radius) 0 0 var(--radius); background: var(--soft2); color: var(--muted); }
.input-affix > input { border-radius: 0 var(--radius) var(--radius) 0 !important; }
.input-affix.affix-r > span { order: 2; border-right: 1px solid #cbd5e1; border-left: 0; border-radius: 0 var(--radius) var(--radius) 0; }
.input-affix.affix-r > input { border-radius: var(--radius) 0 0 var(--radius) !important; }
.checks, .radios { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.check, .radio { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 400 !important; }
.switch { display: inline-flex !important; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 38px; height: 22px; border-radius: 22px; background: #cbd5e1; position: relative; flex: none; transition: background .15s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 2px solid var(--brand); outline-offset: 2px; }
.field-bool { align-self: end; padding-bottom: 6px; }
.secret { display: flex; gap: 6px; }
.color-input { display: flex; gap: 6px; align-items: center; }
.color-input input[type=color] { width: 44px; height: 38px; border: 1px solid #cbd5e1; border-radius: var(--radius); padding: 2px; background: #fff; }
.color-input .hex { max-width: 120px; }
.image-input { display: flex; gap: 12px; align-items: center; }
.image-input .thumb { width: 72px; height: 72px; border: 1px dashed #cbd5e1; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; background: var(--soft) repeating-conic-gradient(#eef2f7 0 25%, #fff 0 50%) 0 0/16px 16px; overflow: hidden; }
.image-input .thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.addr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

/* ---------- Cards, pages ---------- */
.page { max-width: 1180px; margin: 0 auto; padding: 24px 20px 48px; }
.page.narrow { max-width: 560px; }
.page-wide { max-width: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-block; font-size: .9em; margin-bottom: 4px; color: var(--muted); }
.card { background: #fff; border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: 20px; box-shadow: var(--shadow); }
.card + .card, .card + section, section + .card { margin-top: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h3 { margin: 0; }
.auth-card { max-width: 440px; margin: 0 auto; }
.error-card { border-color: #fecaca; }
.notice { background: var(--info-bg); color: #1e3a8a; padding: 10px 14px; border-radius: var(--radius); }
.alert { padding: 12px 14px; border-radius: var(--radius); margin-bottom: 14px; border: 1px solid; }
.alert-warn { background: var(--warn-bg); border-color: #fcd34d; color: #78350f; }
.alert-err { background: var(--err-bg); border-color: #fca5a5; color: #7f1d1d; }
.alert-ok { background: var(--ok-bg); border-color: #86efac; color: #14532d; }
.alert-info { background: var(--info-bg); border-color: #93c5fd; color: #1e3a8a; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: 16px; box-shadow: var(--shadow); }
.stat .label { color: var(--muted); font-size: .85em; } .stat .value { font-size: 1.6rem; font-weight: 700; margin-top: 2px; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.spin-wrap { display: flex; justify-content: center; padding: 40px; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
.boot-loading { display: flex; justify-content: center; align-items: center; min-height: 60vh; }
@keyframes spin { to { transform: rotate(360deg); } }
[data-content].is-loading { opacity: .55; transition: opacity .2s .15s; pointer-events: none; }

/* ---------- Badges, tabs ---------- */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .78em; font-weight: 600; background: var(--soft2); color: #334155; white-space: nowrap; }
.b-green { background: var(--ok-bg); color: var(--ok); } .b-amber { background: var(--warn-bg); color: var(--warn); }
.b-red { background: var(--err-bg); color: var(--err); } .b-blue { background: var(--info-bg); color: var(--info); }
.b-gray { background: var(--soft2); color: var(--muted); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tab { background: none; border: 0; padding: 10px 14px; cursor: pointer; font: inherit; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tab.active { color: var(--text); border-bottom-color: var(--brand); font-weight: 600; }
.tab .count { background: var(--soft2); border-radius: 999px; padding: 0 7px; font-size: .8em; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); }
.card .table-wrap { border: 0; border-radius: 0; margin: 0 -20px; }
.table { width: 100%; border-collapse: collapse; font-size: .93em; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th { font-weight: 600; color: var(--muted); font-size: .85em; background: var(--soft); white-space: nowrap; }
.table th.sortable { cursor: pointer; user-select: none; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--soft); }
.table td.sel, .table th.sel { width: 34px; }
.table .empty-cell { text-align: center; color: var(--muted); padding: 28px; }
.table .ta-right { text-align: right; }
.table tr.muted-row td { color: var(--muted); }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 12px 0; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar input[type=search], .toolbar .search { max-width: 280px; }
.toolbar select, .toolbar .csel-btn { width: auto; }

/* ---------- Modals, toasts ---------- */
.modal-wrap { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: flex; align-items: flex-start; justify-content: center; z-index: 1000; padding: 5vh 12px; overflow-y: auto; animation: fade .15s; }
.modal-wrap.out { opacity: 0; transition: opacity .15s; }
.modal { background: #fff; border-radius: calc(var(--radius) + 6px); box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; display: flex; flex-direction: column; max-height: 90vh; }
.modal-sm { max-width: 420px; } .modal-lg { max-width: 820px; } .modal-xl { max-width: 1100px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }
@keyframes fade { from { opacity: 0; } }
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 2000; width: min(92vw, 440px); }
.toast { background: #0f172a; color: #fff; padding: 12px 16px; border-radius: var(--radius); box-shadow: var(--shadow-lg); animation: up .2s; }
.toast-err { background: var(--err); } .toast-ok { background: #0f172a; } .toast-info { background: var(--info); }
.toast.out { opacity: 0; transform: translateY(8px); transition: all .3s; }
@keyframes up { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Store shell ---------- */
.store-shell, .platform-shell { min-height: 100vh; display: flex; flex-direction: column; }
.store-shell > main, .platform-shell > main { flex: 1; }
.store-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.top-banner { background: var(--brand); color: #fff; text-align: center; padding: 6px 12px; font-size: .9em; }
.top-banner a { color: #fff; }
.hdr-inner { max-width: 1180px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; font-weight: 700; font-size: 1.2rem; color: var(--text); text-decoration: none !important; }
.brand img { max-height: 44px; width: auto; }
.store-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.store-nav a { color: var(--text); font-weight: 500; }
.hdr-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.hdr-search input { width: 200px !important; min-height: 34px !important; }
.hdr-link { color: var(--text); font-weight: 500; }
.hdr-cart { position: relative; font-size: 1.2rem; color: var(--text); text-decoration: none !important; }
.cart-count { position: absolute; top: -8px; right: -12px; background: var(--accent); color: #111; font-size: .7rem; font-weight: 700; border-radius: 999px; padding: 1px 6px; }
.menu-toggle { display: none; }
.store-footer { background: var(--soft); border-top: 1px solid var(--line); margin-top: 40px; }
.ftr-inner { max-width: 1180px; margin: 0 auto; padding: 28px 20px; display: grid; grid-template-columns: 2fr 1.5fr 1fr; gap: 20px; }
.ftr-inner nav { display: flex; flex-direction: column; gap: 6px; }
.ftr-bottom { max-width: 1180px; margin: 0 auto; padding: 12px 20px 20px; font-size: .85em; }
.store-closed { max-width: 560px; margin: 15vh auto; text-align: center; padding: 20px; }
.account-wrap { max-width: 1180px; margin: 0 auto; width: 100%; display: grid; grid-template-columns: 210px 1fr; gap: 24px; padding: 24px 20px; flex: 1; }
.account-wrap > main .page { padding: 0; }
.account-nav { display: flex; flex-direction: column; gap: 2px; }
.account-nav a, .account-nav .linkish { padding: 8px 12px; border-radius: var(--radius); color: var(--text); text-align: left; }
.account-nav a.active { background: var(--soft2); font-weight: 600; }
.account-nav a:hover { background: var(--soft); text-decoration: none; }

/* ---------- Storefront pieces (used by store screens) ---------- */
.hero { position: relative; border-radius: calc(var(--radius) + 6px); overflow: hidden; background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 60%, #000)); color: #fff; padding: 56px 40px; background-size: cover; background-position: center; }
.hero h1 { font-size: 2.2rem; } .hero p { font-size: 1.1rem; opacity: .95; max-width: 640px; }
.hero.has-image::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.4); }
.hero > * { position: relative; }
.block { margin: 28px 0; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.product-card { background: #fff; border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); overflow: hidden; display: flex; flex-direction: column; color: var(--text); text-decoration: none !important; transition: box-shadow .15s, transform .15s; }
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.product-card .img { aspect-ratio: 4/3; background: var(--soft2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-card .img img { width: 100%; height: 100%; object-fit: contain; }
.product-card .body { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.product-card .name { font-weight: 600; } .product-card .from { color: var(--muted); font-size: .9em; margin-top: auto; }
.cat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.cat-tile { background: var(--soft); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: 16px; text-align: center; color: var(--text); font-weight: 600; }
.cat-tile img { aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); margin-bottom: 8px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.feature { padding: 18px; background: var(--soft); border-radius: calc(var(--radius) + 4px); }
.configurator { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 28px; align-items: start; }
.price-box { position: sticky; top: 84px; }
.price-big { font-size: 2rem; font-weight: 700; }
.opt-group { margin-bottom: 16px; }
.opt-group > label { font-weight: 600; display: block; margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid #cbd5e1; background: #fff; border-radius: 999px; padding: 6px 14px; cursor: pointer; font: inherit; }
.chip.active, .chip[aria-pressed=true] { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, #fff); color: var(--brand); font-weight: 600; }
.gallery .main-img { aspect-ratio: 4/3; background: var(--soft2); border-radius: calc(var(--radius) + 4px); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.gallery .main-img img { width: 100%; height: 100%; object-fit: contain; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 2px solid transparent; cursor: pointer; }
.thumbs img.active { border-color: var(--brand); }
.dropzone { border: 2px dashed #cbd5e1; border-radius: calc(var(--radius) + 4px); padding: 20px; text-align: center; background: var(--soft); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone.drag { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, #fff); }
.progress { height: 6px; background: var(--line); border-radius: 6px; overflow: hidden; }
.progress > div { height: 100%; background: var(--brand); width: 0; transition: width .2s; }
.file-row { display: flex; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.file-row img { width: 48px; height: 48px; object-fit: contain; background: var(--soft2); border-radius: 4px; }
.cart-line { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-line img { width: 72px; height: 72px; object-fit: contain; border-radius: var(--radius); background: var(--soft2); }
.summary-row { display: flex; justify-content: space-between; padding: 4px 0; }
.summary-row.total { font-weight: 700; font-size: 1.15em; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
.steps { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.steps .step { padding: 6px 12px; border-radius: 999px; background: var(--soft2); color: var(--muted); font-size: .9em; }
.steps .step.active { background: var(--brand); color: #fff; }
.steps .step.done { background: var(--ok-bg); color: var(--ok); }
.choice { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; background: #fff; }
.choice + .choice { margin-top: 8px; }
.choice.active { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.choice.disabled { opacity: .55; cursor: not-allowed; }
.choice .price { margin-left: auto; font-weight: 600; white-space: nowrap; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 14px 20px; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); }
.timeline .when { color: var(--muted); font-size: .85em; }
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.cta { background: var(--soft); border-radius: calc(var(--radius) + 6px); padding: 32px; text-align: center; }
.image-text { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
.image-text.reverse > :first-child { order: 2; }
.testimonials { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.testimonial { background: var(--soft); padding: 18px; border-radius: calc(var(--radius) + 4px); font-style: italic; }
.testimonial cite { display: block; margin-top: 8px; font-style: normal; color: var(--muted); }

/* ---------- Platform landing ---------- */
.landing-hero { text-align: center; padding: 72px 20px 48px; max-width: 860px; margin: 0 auto; }
.landing-hero h1 { font-size: 2.6rem; }

/* ---------- Bare layout ---------- */
.bare-shell { min-height: 100vh; background: var(--soft2); display: flex; flex-direction: column; align-items: center; padding: 8vh 16px 40px; }
.bare-brand { font-weight: 700; font-size: 1.4rem; color: var(--text); margin-bottom: 24px; }
.bare-brand img { max-height: 56px; }
.bare-shell main { width: 100%; }

/* ---------- Admin shell ---------- */
.admin-shell { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; }
.admin-side { background: #0f172a; color: #cbd5e1; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-brand { display: flex; align-items: center; gap: 10px; padding: 16px 18px; color: #fff; font-weight: 700; text-decoration: none !important; border-bottom: 1px solid rgba(255,255,255,.08); }
.admin-brand img { max-height: 28px; }
.admin-nav { padding: 8px 0 24px; }
.nav-group { padding: 6px 0; }
.nav-group-title { font-size: .72em; text-transform: uppercase; letter-spacing: .06em; color: #64748b; padding: 8px 18px 4px; }
.admin-nav a { display: flex; align-items: center; gap: 10px; padding: 7px 18px; color: #cbd5e1; font-size: .93em; text-decoration: none !important; border-left: 3px solid transparent; }
.admin-nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.admin-nav a.active { background: rgba(255,255,255,.08); color: #fff; border-left-color: #60a5fa; }
.admin-nav .ico { width: 18px; text-align: center; }
.admin-main { min-width: 0; display: flex; flex-direction: column; }
.admin-main > main { flex: 1; }
.admin-top { display: flex; align-items: center; gap: 12px; padding: 10px 20px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.store-switch { width: auto !important; min-width: 220px; font-weight: 600; }
.acting-store .admin-top { background: #fffbeb; border-bottom-color: #fcd34d; }
.ctx-pill { background: var(--soft2); border-radius: 999px; padding: 4px 12px; font-weight: 600; font-size: .9em; }
.board { display: flex; gap: 12px; overflow-x: auto; align-items: flex-start; padding-bottom: 12px; }
.board-col { background: #e9eef5; border-radius: calc(var(--radius) + 4px); min-width: 270px; width: 270px; flex: none; padding: 10px; }
.board-col h4 { display: flex; justify-content: space-between; margin: 2px 4px 10px; font-size: .9em; }
.board-card { background: #fff; border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow); margin-bottom: 8px; font-size: .9em; cursor: pointer; border-left: 4px solid transparent; }
.board-card.rush { border-left-color: var(--err); }
.board-card.late { background: #fff5f5; }
.board-card .meta { color: var(--muted); font-size: .85em; }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.item-card { border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: 14px; background: #fff; }
.item-card + .item-card { margin-top: 12px; }
.item-card.cancelled { opacity: .6; }
.thumb-sm { width: 56px; height: 56px; object-fit: contain; background: var(--soft2); border-radius: 6px; border: 1px solid var(--line); }
.matrix { overflow-x: auto; }
.matrix table td input { min-width: 80px; }
.block-editor .blk { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 10px; }
.block-editor .blk-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--soft); border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.block-editor .blk-body { padding: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .configurator, .split, .image-text { grid-template-columns: 1fr; }
  .price-box { position: static; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-wrap { grid-template-columns: minmax(0, 1fr); }
  .account-nav { flex-direction: row; overflow-x: auto; gap: 4px; }
  .account-nav a { white-space: nowrap; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 100; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .admin-side { transform: none; box-shadow: var(--shadow-lg); }
  .menu-toggle { display: inline-block; }
  .ftr-inner { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 15px; }
  .form-grid, .grid-2, .grid-3, .grid-4, .addr-grid { grid-template-columns: 1fr; }
  .hdr-inner { gap: 10px; padding: 8px 14px; flex-wrap: wrap; }
  .store-nav { display: none; width: 100%; flex-direction: column; gap: 10px; padding: 8px 0; }
  body.nav-open .store-nav { display: flex; order: 5; }
  .hdr-search { display: none; }
  .page { padding: 16px 14px 40px; }
  .hero { padding: 36px 22px; } .hero h1 { font-size: 1.7rem; }
  .table.stack-sm thead { display: none; }
  .table.stack-sm tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .table.stack-sm td { display: flex; justify-content: space-between; border: 0; padding: 4px 12px; }
  .table.stack-sm td::before { content: attr(data-label); color: var(--muted); font-size: .85em; margin-right: 10px; }
  .store-switch { min-width: 0; max-width: 46vw; }
  /* 2.9.0: room for the bell on phones */
  .admin-top { gap: 6px; padding: 8px 10px; }
  .admin-top .hdr-link { max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .admin-top .btn-sm { padding-left: 8px; padding-right: 8px; }
  .modal-wrap { padding: 0; align-items: flex-end; }
  .modal { max-height: 94vh; border-radius: 14px 14px 0 0; }
}

/* ---------- Print (invoices, packing slips, job tickets) ---------- */
@media print {
  .admin-side, .admin-top, .store-header, .store-footer, .no-print, .toasts, .page-actions { display: none !important; }
  body, body.is-admin { background: #fff; }
  .admin-shell { display: block; }
  .card { box-shadow: none; border: 0; padding: 0; }
  .page { padding: 0; max-width: none; }
  a { color: inherit; }
}

/* ===== admin-setup: generic lists, product editor, store builder, settings, system ===== */
.link-list { list-style: none; margin: 0; padding: 0; } .link-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.res-view .toolbar select, .res-view .toolbar .csel-btn { max-width: 260px; }
.rows-editor .table input { min-width: 70px; }
.matrix-table th { vertical-align: bottom; } .matrix-table td { min-width: 120px; } .matrix-table td:first-child, .matrix-table td:nth-child(2) { min-width: 100px; }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.img-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; background: #fff; display: flex; flex-direction: column; gap: 6px; }
.img-card img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--soft2, #f8fafc); border-radius: 6px; }
.price-lines .pl { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.price-lines .pl strong { font-size: 1.05em; white-space: nowrap; }
.lbl-sm { display: block; font-size: .85em; font-weight: 600; margin-bottom: 4px; }
.tester-controls .field { margin: 0; }
.tester-controls > * + * { margin-top: 10px; }
.sp-table td input.sp-in { width: 90px; }
.sp-margin-low { color: #b91c1c; font-weight: 600; }
.pb-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.pb-preview { border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); background: #fff; overflow: hidden; position: sticky; top: 70px; }
.pb-preview-bar { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--soft); }
.pb-frame { max-height: 75vh; overflow: auto; margin: 0 auto; transition: max-width .2s; }
.pb-frame.phone { max-width: 390px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.pb-frame .pb-inner { padding: 0 12px 16px; pointer-events: none; }
.block-editor .blk-head .grow { font-weight: 600; }
.block-editor .blk.collapsed .blk-body { display: none; }
.item-rows > * + * { margin-top: 8px; } .item-row { border: 1px dashed var(--line); border-radius: var(--radius); padding: 8px; }
.menu-row { display: grid; grid-template-columns: 1fr 1fr auto auto auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.perm-group { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.perm-group h5 { margin: 0 0 6px; font-size: .9em; }
.settings-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.settings-nav { position: sticky; top: 70px; display: flex; flex-direction: column; gap: 2px; }
.settings-nav a { padding: 7px 10px; border-radius: 6px; color: inherit; text-decoration: none; font-size: .95em; }
.settings-nav a.active, .settings-nav a:hover { background: var(--soft); }
.settings-save-bar { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 10px 16px; display: flex; gap: 10px; align-items: center; justify-content: flex-end; z-index: 5; margin: 0 -20px -20px; border-radius: 0 0 var(--radius) var(--radius); }
.check-pass { color: #15803d; font-weight: 600; } .check-optional { color: #b45309; font-weight: 600; } .check-blocking { color: #b91c1c; font-weight: 600; }
.path-list code { display: inline-block; margin: 2px 0; }
@media (max-width: 960px) {
  .pb-layout, .settings-layout { grid-template-columns: minmax(0, 1fr); }
  .pb-preview, .settings-nav { position: static; }
  .settings-nav { flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 720px) {
  .menu-row { grid-template-columns: 1fr 1fr; }
  .matrix-table td { min-width: 100px; }
}

/* =====================================================================
   Storefront screens (storefront agent): blocks, listing, product configurator,
   artwork uploader, cart, checkout, account. Mobile-first additions only.
   ===================================================================== */
.d-block { display: block; } .min0 { min-width: 0; } .ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt { margin-top: 20px; } .mt-s { margin-top: 10px; } .mb { margin-bottom: 14px; } .mb-s { margin-bottom: 8px; }
.ok-text { color: var(--ok); } .warn-text { color: var(--warn); } .danger-text { color: var(--err) !important; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lead { font-size: 1.05rem; }
.narrow-md { max-width: 760px; }
.stack > .card + .card { margin-top: 0; }
.rich { line-height: 1.65; } .rich img { border-radius: var(--radius); } .rich h2, .rich h3 { margin-top: 1em; }
.rounded { border-radius: calc(var(--radius) + 4px); }
.ph-icon { font-size: 2.2rem; opacity: .5; } .ph-icon.big { font-size: 4rem; }
.crumbs { color: var(--muted); margin-bottom: 10px; } .crumbs a { color: var(--muted); }

/* blocks */
.page-blocks .block:first-child { margin-top: 0; }
.block-title-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.block-note { border: 1px dashed #cbd5e1; border-radius: var(--radius); padding: 14px; color: var(--muted); text-align: center; background: var(--soft); }
.skeleton-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.skeleton-grid > div { height: 220px; border-radius: calc(var(--radius) + 4px); background: linear-gradient(90deg, var(--soft2), #fff, var(--soft2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.hero .row { margin-top: 18px; } .hero-btn2 { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.4); }
.feature-icon { font-size: 1.6rem; margin-bottom: 6px; }
.img-ph { aspect-ratio: 16/9; background: var(--soft2); border-radius: calc(var(--radius) + 4px); }
.block-figure { margin: 0; } .block-img { width: 100%; } .block-figure figcaption { margin-top: 6px; text-align: center; }
.banner-strip { background: var(--accent); color: #111; border-radius: var(--radius); padding: 12px 18px; text-align: center; font-weight: 500; }
.banner-strip a { color: #111; }
.contact-block { max-width: 640px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.faq-a { padding-top: 8px; color: #334155; }
.cat-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 72px; }
.cat-tile:hover { border-color: var(--brand); text-decoration: none; }
.product-card .img .ph-icon { font-size: 2.6rem; }
.product-card .from strong { color: var(--text); }

/* listing */
.list-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.list-head h1 { margin: 0; }
.list-search input { width: 280px !important; }
.cat-pills { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 16px; -webkit-overflow-scrolling: touch; }
.cat-pills .chip { white-space: nowrap; color: var(--text); text-decoration: none; }
.span-all { grid-column: 1 / -1; }

/* product page + configurator */
.product-page h1 { margin-bottom: 4px; }
.cfg { margin-top: 16px; }
.opt-group label input, .opt-group label textarea, .opt-group label select, .opt-group label .csel-btn { font-weight: 400; margin-top: 4px; }
.chip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.chip:hover { border-color: var(--brand); }
.custom-size { margin-top: 10px; }
.size-inputs { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.size-inputs .lbl-sm { font-size: .85em; font-weight: 500; color: var(--muted); display: flex; flex-direction: column; gap: 3px; width: 110px; }
.size-inputs .lbl-sm select, .size-inputs .lbl-sm input, .size-inputs .lbl-sm .csel-btn { color: var(--text); }
.size-inputs .x { padding-bottom: 9px; color: var(--muted); }
.qty-row { display: flex; gap: 10px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.qty-input { width: 130px !important; }
.turn-list .choice { width: 100%; text-align: left; font: inherit; color: inherit; }
.price-box { margin-top: 16px; transition: opacity .15s; }
.price-box.is-pricing .price-big, .is-pricing { opacity: .55; }
.price-box .due { margin: 8px 0; font-size: .95em; }
.breakdown { margin: 8px 0 14px; font-size: .92em; }
.breakdown summary { cursor: pointer; color: var(--brand); }
.bd-rows { padding-top: 6px; }
.art-section { margin: 18px 0; }
.mobile-only { display: none; } .mobile-buy-bar { display: none; }

/* artwork uploader */
.art-modes { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.art-slot + .art-slot { margin-top: 12px; }
.art-slot-head { margin-bottom: 6px; }
.dropzone .dz-ico { font-size: 1.6rem; color: var(--brand); }
.artwork-up.compact .dropzone { padding: 14px; }
.uploading { padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.uploading .progress { margin-top: 8px; }
.progress.lg { height: 10px; margin-top: 6px; }
.file-row + .file-row { margin-top: 6px; }
.file-ico { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: var(--soft2); border-radius: 4px; font-size: .8em; font-weight: 700; color: var(--muted); flex: none; }
.pf-msgs { margin: 6px 0 8px; padding-left: 20px; }
.pf-warn .file-row { background: #fffdf5; }
.design-box { border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: 16px; background: var(--soft); }

/* cart */
.cart-grid, .checkout-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.cart-summary, .checkout-summary { position: sticky; top: 84px; }
.cart-lines { padding-top: 6px; padding-bottom: 6px; }
.cart-line:last-child { border-bottom: 0; }
.cart-line .thumb-ph { width: 72px; height: 72px; border-radius: var(--radius); background: var(--soft2); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; }
.cart-line.has-error .thumb-ph { background: var(--err-bg); color: var(--err); font-weight: 700; }
.price-col { white-space: nowrap; }
.art-status { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.art-pill { border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; background: #fff; }
.art-pill.ok { border-color: #86efac; } .art-pill.missing { border-color: #fcd34d; background: #fffbeb; }
.art-pill em { font-style: normal; color: var(--warn); }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.list-row:last-child { border-bottom: 0; }
a.list-row:hover { background: var(--soft); text-decoration: none; }
.order-row { padding: 12px 8px; margin: 0 -8px; border-radius: var(--radius); }

/* checkout */
.checkout-grid .stack > * + * { margin-top: 16px; }
.choice input[type=radio] { margin-top: 3px; accent-color: var(--brand); }
.addr-wrap h4 { margin-top: 6px; }
.sum-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sum-items { margin-bottom: 10px; }
.checkout-summary .btn-block { margin-top: 14px; }
.done-card { padding: 32px 20px; }
.done-check { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); font-size: 2rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; font-weight: 700; }
.next-steps { padding-left: 20px; margin: 0; } .next-steps li { margin-bottom: 6px; }
.pay-fallback .choice { cursor: default; }

/* account */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 16px; }
a.stat { color: var(--text); } a.stat:hover { border-color: var(--brand); text-decoration: none; }
.status-chip { display: inline-flex; align-items: center; gap: 6px; font-size: .82em; font-weight: 600; padding: 2px 10px 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--c, #64748b) 14%, #fff); color: color-mix(in srgb, var(--c, #64748b) 80%, #000); white-space: nowrap; }
.status-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, #64748b); }
.order-meta { margin-bottom: 14px; gap: 8px; }
.item-top { align-items: flex-start; }
.item-card .files { margin-top: 10px; }
.item-card .alert { margin: 10px 0 0; }
.art-area:not(:empty) { margin-top: 12px; }
.attention { border-color: #fcd34d; background: #fffbeb; }
.change-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; }
.diff-box { background: var(--soft); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; transition: opacity .15s; }
.addr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.addr-cards .card + .card { margin-top: 0; }
.prefs-table td:first-child { min-width: 180px; }
.quote-notes { margin-top: 12px; padding: 12px; background: var(--soft); border-radius: var(--radius); }
.split > aside > .card:first-child, .split > div > .card:first-child { margin-top: 0; }

@media (max-width: 960px) {
  .cart-grid, .checkout-grid, .change-grid { grid-template-columns: 1fr; }
  .cart-summary, .checkout-summary { position: static; }
}
@media (max-width: 720px) {
  .desktop-only { display: none; } .mobile-only { display: block; }
  .product-page { padding-bottom: 96px; }
  .mobile-buy-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #fff; border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); align-items: center; justify-content: space-between; gap: 12px; box-shadow: 0 -4px 16px rgba(15,23,42,.08); }
  .mobile-buy-bar strong { font-size: 1.25rem; }
  .list-search, .list-search input { width: 100% !important; }
  .list-head { align-items: stretch; }
  .cart-line { grid-template-columns: 56px 1fr; }
  .cart-line img, .cart-line .thumb-ph { width: 56px; height: 56px; }
  .cart-line .price-col { grid-column: 2; text-align: left; }
  .size-inputs .lbl-sm { width: calc(50% - 18px); }
  .size-inputs .lbl-sm:last-child { width: 100%; }
  .hdr-right { gap: 10px; }
  .card { padding: 16px; }
  .card .table-wrap { margin: 0 -16px; }
  .stat .value { font-size: 1.3rem; }
  .file-row { flex-wrap: wrap; }
}
.settings-save-bar-wrap { position: sticky; bottom: 8px; z-index: 5; padding: 12px 16px; box-shadow: 0 -2px 12px rgba(15,23,42,.08); }
.opt-group label :is(input, textarea, select), .size-inputs .lbl-sm :is(input, select), .opt-group label :is(input, textarea, .csel-btn), .size-inputs .lbl-sm :is(input, .csel-btn) { font-weight: 400 !important; }
.crumbs .sep { margin: 0 6px; }

/* ===== admin-ops: orders, production board, customers, quotes ===== */
.status-dot { display: inline-flex; align-items: center; gap: 6px; font-size: .9em; font-weight: 600; }
.status-dot i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.late-text { color: var(--err); font-weight: 600; }
.warn-text { color: var(--warn); }
.danger-text { color: var(--err); }
.note-box { background: var(--warn-bg); border-radius: var(--radius); padding: 6px 10px; }
.item-card > * + * { margin-top: 10px; }
.item-card .item-head { align-items: flex-start; }
.item-title { font-size: 1.05rem; margin: 0; }
.item-status { align-items: center; }
.status-ctl select, .status-ctl input, .status-ctl .csel-btn { width: auto; max-width: 220px; }
.art-rows > * + * { margin-top: 6px; }
.file-row .thumb-ph { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: var(--soft2); border-radius: 4px; font-size: 1.3em; flex: none; }
.file-row .grow { min-width: 0; overflow-wrap: anywhere; }
.hist summary { cursor: pointer; }
.hist .timeline { margin-top: 8px; }
.order-badges { align-items: center; }
.inline-date { display: inline-flex; align-items: center; gap: 4px; }
.inline-date input { width: auto; }
.pick-list { display: flex; flex-direction: column; gap: 4px; max-height: 50vh; overflow: auto; }
.pick { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; cursor: pointer; font: inherit; color: inherit; }
.pick:hover, .pick:focus { border-color: var(--brand); background: var(--soft); }
.line-row { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; background: #fff; }
.line-row .grow { min-width: 0; }
.sticky-side { position: sticky; top: 70px; }
.lc > * + * { margin-top: 10px; }
.lc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.lc-row { display: flex; gap: 10px; flex-wrap: wrap; }
.lc-row .field { flex: 1 1 150px; margin: 0; }
.lc-grid .field { margin: 0; }
.lc-price { background: var(--soft); border-radius: var(--radius); padding: 10px 12px; }
.lc-price.is-loading { opacity: .6; }
.diff-box:empty { display: none; }
/* production board */
.prod-bar { position: sticky; top: 0; z-index: 6; background: var(--soft2); padding: 8px 0; }
.bulk-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: #1e293b; color: #fff; padding: 8px 12px; border-radius: var(--radius); }
.bulk-bar select, .bulk-bar .csel-btn { width: auto; }
.bulk-bar .btn { background: #fff; }
.board-col .col-count { background: #fff; border-radius: 999px; padding: 0 8px; font-weight: 600; }
.board-col .col-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.board-card { position: relative; }
.board-card:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.board-card.selected { box-shadow: 0 0 0 2px var(--brand); }
.board-card.held { border-left-color: #7c3aed; }
.board-card .bc-top { display: flex; gap: 6px; align-items: flex-start; }
.board-card .bc-top input { margin-top: 3px; }
.board-card .bc-thumb { width: 44px; height: 44px; object-fit: contain; background: var(--soft2); border-radius: 4px; flex: none; }
.board-card .bc-warn { color: var(--warn); font-size: .82em; margin-top: 4px; }
.board-card .bc-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 6px; }
.board-card .bc-next { font-size: .8em; padding: 2px 8px; }
.kbd-help kbd { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; font-size: .85em; }
/* customers */
.cust-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.addr-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; background: #fff; }
.q-line { display: grid; grid-template-columns: minmax(0, 1fr) 110px 120px auto; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; background: #fff; }
.q-line + .q-line { margin-top: 6px; }
.q-line .input-affix input { min-width: 0; }
@media (max-width: 960px) { .sticky-side { position: static; } }
@media (max-width: 720px) {
  .cust-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .q-line { grid-template-columns: 1fr 1fr; }
  .q-line > :first-child { grid-column: 1 / -1; }
  .item-card .item-head { flex-wrap: wrap; }
  .status-ctl select, .status-ctl input, .status-ctl .csel-btn { max-width: none; flex: 1 1 140px; }
  .board-col { min-width: 82vw; width: 82vw; }
  .line-row { flex-wrap: wrap; }
}
@media (max-width: 960px) { .product-editor .split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) { .product-editor .form-grid, .modal .form-grid, .settings-layout .form-grid, .pb-layout .form-grid { grid-template-columns: minmax(0, 1fr); } .rows-editor .table input { min-width: 56px; } }
.path-list code, .path-list dd, .alert code { overflow-wrap: anywhere; word-break: break-word; }
@media (max-width: 720px) { .page .grid-2 > .card, .page .grid-2 > section { min-width: 0; } }
@media (max-width: 720px) {
  .file-row > .grow { flex: 1 1 calc(100% - 64px); }
  .file-row > .badge { margin-left: 58px; }
}
.ml-s { margin-left: 6px; }
.art-pill { display: inline-flex; align-items: center; gap: 4px; }
@media (max-width: 720px) {
  .item-top { flex-direction: column; align-items: stretch; gap: 4px; }
  .item-top > .ta-right { text-align: left; display: flex; gap: 10px; align-items: center; }
}

/* ===================== Payments (lib/pay.js + admin/60_money.js) ===================== */
.pay-box { display: flex; flex-direction: column; gap: 12px; }
.pay-choices { display: flex; flex-direction: column; gap: 6px; }
.pay-choice { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer; }
.pay-choice:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.pay-element { padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; min-height: 44px; }
.pay-element.pay-square { padding: 0; border: 0; min-height: 90px; }
.pay-save { font-size: .92em; }
.pay-note { margin: 0; }
.pay-hosted-wrap { display: flex; flex-direction: column; gap: 8px; }
.pay-hosted { width: 100%; height: 540px; max-height: 70vh; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.pay-code { font-size: .82em; background: var(--soft); padding: 4px 8px; border-radius: 6px; word-break: break-all; }
.pay-gw.is-off { opacity: .7; }
.pay-grid { align-items: start; }
.pay-cards, .pay-statements { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.pay-cards li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.pay-balance .value { font-size: 1.8em; font-weight: 700; }
.pay-methods { display: flex; flex-direction: column; gap: 10px; }
.pay-methods .radio { align-items: flex-start; }
.pay-failed .table-wrap { background: #fff; border-radius: var(--radius); margin-top: 8px; }
.pay-intro { display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 720px) { .pay-grid { grid-template-columns: 1fr; } .pay-hosted { height: 480px; } }
@media (max-width: 720px) { .prod-bar { position: static; } }
.pay-rule { font-weight: 600; margin-top: 6px; }

/* ---------- Reports (reports agent: assets/js/admin/80_reports.js) ---------- */
.rep-section h2 { margin-top: 8px; }
.rep-group { margin-bottom: 14px; }
.rep-group-title { text-transform: uppercase; letter-spacing: .06em; margin: 6px 0 8px; }
.rep-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.rep-card { display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: 14px 16px; color: var(--text); box-shadow: var(--shadow); text-decoration: none !important; }
.rep-card:hover, .rep-card:focus-visible { border-color: var(--brand); }
.rep-filters .row { gap: 10px; }
.rep-dates select, .rep-dates .csel-btn { width: auto; }
.rep-result.is-loading { opacity: .55; transition: opacity .2s .1s; }
.rep-period { margin: 0; }
.rep-result tfoot td { font-weight: 700; border-top: 2px solid var(--text); background: var(--soft); }
.rep-result .neg { color: var(--err); }
.viz { --viz-1: #2a78d6; --viz-2: #eb6834; --viz-grid: #e7e7e4; position: relative; }
.viz-wrap { position: relative; }
.viz-svg { width: 100%; height: auto; display: block; overflow: visible; }
.viz-grid { stroke: var(--viz-grid); stroke-width: 1; }
.viz-axis { stroke: #cbd5e1; stroke-width: 1; }
.viz-tick { fill: var(--muted); font-size: 11px; }
.viz-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz-dot { stroke: #fff; stroke-width: 2; }
.viz-cross { stroke: #94a3b8; stroke-width: 1; }
.viz-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .85em; color: var(--muted); margin-bottom: 8px; }
.viz-key { display: inline-flex; align-items: center; gap: 6px; }
.viz-key i, .viz-tip-r i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.viz-tip { position: absolute; z-index: 5; pointer-events: none; background: #0f172a; color: #fff; border-radius: 8px; padding: 8px 10px; font-size: .82em; box-shadow: var(--shadow-lg); min-width: 140px; }
.viz-tip-t { font-weight: 700; margin-bottom: 4px; }
.viz-tip-r { display: flex; align-items: center; gap: 6px; } .viz-tip-r span { flex: 1; } .viz-tip-r b { font-variant-numeric: tabular-nums; }
.viz-hrow { display: grid; grid-template-columns: minmax(90px, 200px) 1fr; gap: 10px; align-items: center; padding: 4px 0; border-radius: 6px; }
.viz-hrow:hover, .viz-hrow:focus-visible { background: var(--soft); outline: none; }
.viz-hlabel { font-size: .88em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viz-hbars-col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.viz-hbar-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.viz-hbar { display: block; flex: none; height: 14px; border-radius: 0 4px 4px 0; }
.viz-hval { font-size: .8em; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 640px) { .viz-hrow { grid-template-columns: 90px 1fr; } .rep-filters .row > .grow { display: none; } }

/* ===================== Logistics (admin/40_logistics.js): labels, deliveries, pickups, tax, domains ===================== */
.lg-addr { font-style: normal; line-height: 1.4; }
.lg-code { background: var(--soft2); padding: 2px 6px; border-radius: 4px; overflow-wrap: anywhere; }
.lg-details summary { cursor: pointer; }
.lg-split { align-items: start; }
.lg-pk-head, .lg-pk { display: grid; grid-template-columns: minmax(0, 1fr) 90px 36px; gap: 8px; align-items: center; }
.lg-pk input { width: 100%; min-width: 0; }
.lg-dims { flex-wrap: nowrap; } .lg-dims input { width: 64px; }
.lg-rates { display: grid; gap: 8px; }
.lg-rate { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer; }
.lg-rate.on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.lg-ship { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; background: #fff; }
.lg-ship > * + * { margin-top: 6px; }
.lg-events { margin: 6px 0 0; padding-left: 18px; }
.lg-items { margin: 0; padding-left: 18px; }
.lg-driver { max-width: 760px; }
.lg-stop { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; box-shadow: var(--shadow); }
.lg-stop > * + * { margin-top: 8px; }
.lg-stop.lg-out { border-color: var(--info); }
.lg-stop.lg-delivered { opacity: .85; }
.lg-stop-head { display: flex; gap: 12px; align-items: flex-start; }
.lg-seq { flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; }
.lg-delivered .lg-seq { background: var(--ok); }
.lg-deliver-as { background: var(--soft2); border-radius: 6px; padding: 4px 8px; display: inline-block; }
.lg-stop-addr a, .lg-stop a[href^="tel:"] { font-size: 1.05em; }
.lg-stop-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lg-stop-actions .btn { min-height: 44px; }
.lg-proof { max-width: 140px; max-height: 110px; border: 1px solid var(--line); border-radius: 6px; display: block; margin-top: 6px; }
.lg-sig-img { background: #fff; }
.lg-sig-wrap .lg-sig { width: 100%; height: auto; aspect-ratio: 3 / 1; border: 1px dashed #94a3b8; border-radius: 8px; touch-action: none; background: #fff; display: block; }
.lg-w-s { width: 70px; } .lg-w-m { width: 90px; }
.lg-domain .card-head h3 { overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .lg-split { grid-template-columns: minmax(0, 1fr); }
  .lg-pk-head { display: none; }
  .lg-pk { grid-template-columns: minmax(0, 1fr) 80px 36px; }
  .lg-dims input { width: 52px; }
  .lg-stop-actions .btn { flex: 1 1 auto; }
}
.lg-test { flex-wrap: wrap; } .lg-test input.lg-w-s { flex: 0 0 70px; width: 70px; } .lg-test input.lg-w-m { flex: 0 0 90px; width: 90px; }

/* ===================== Notify: platform website, signup, notification admin, resellers, setup wizard ===================== */
.plat-landing { max-width: 1100px; margin: 0 auto; padding: 0 16px 40px; }
.plat-section { margin: 40px 0; }
.plat-section > h2 { text-align: center; margin-bottom: 20px; }
.plat-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.plat-step { background: #fff; border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: 20px; }
.plat-num { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; margin-bottom: 10px; }
.signup-page { margin: 24px auto; }
.signup-page .done-check, .done-card .done-check { font-size: 2.4rem; color: var(--ok); }
.mail-frame { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: #f1f5f9; }
.ph-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ph-chips .chip { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .8em; padding: 3px 9px; }
.sms-bubble { background: var(--soft2); border-radius: 16px 16px 16px 4px; padding: 10px 14px; max-width: 420px; white-space: pre-line; }
.checklist { list-style: none; padding: 0; margin: 0; } .checklist li { padding: 5px 0; }
.list-search { max-width: 320px; }
.chip .count { background: var(--soft2); border-radius: 999px; padding: 0 7px; font-size: .8em; margin-left: 4px; }
.setup-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; max-height: 480px; overflow: auto; }
.setup-prod { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; cursor: pointer; background: #fff; }
.setup-prod img, .setup-prod .img-ph { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; flex: 0 0 44px; background: var(--soft2); }
.steps a.step { text-decoration: none; }
@media (max-width: 640px) { .plat-landing .landing-hero h1 { font-size: 1.9rem; } }

/* ===== Help bubbles (the little "?" beside fields) ===== */
.label-row { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; min-height: 22px; }
.label-row > label { margin-bottom: 0 !important; display: block; }
.field-bool .label-row { margin-bottom: 0; }
.help-tip { flex: none; width: 17px; height: 17px; padding: 0; border-radius: 50%; border: 1.5px solid #94a3b8; background: #fff; color: #64748b; font-weight: 700; font-size: 11px; line-height: 1; font-family: inherit; display: inline-flex; align-items: center; justify-content: center; cursor: help; transition: background .12s, color .12s, border-color .12s; }
.help-tip:hover, .help-tip.open, .help-tip:focus-visible { background: var(--brand); border-color: var(--brand); color: #fff; outline: none; }
.help-pop { position: fixed; z-index: 3000; max-width: min(260px, calc(100vw - 16px)); background: #0f172a; color: #f8fafc; font-size: 12.5px; line-height: 1.4; padding: 7px 10px; border-radius: 8px; box-shadow: 0 6px 18px rgba(15, 23, 42, .28); pointer-events: none; }

/* ===== Reorder arrows (lists with a sort order) ===== */
.table th.reorder-col, .table td.reorder-cell { width: 64px; white-space: nowrap; padding-right: 0; }
.reorder-btns { display: inline-flex; gap: 4px; }
.btn-arrow { width: 26px; height: 26px; padding: 0; border: 1px solid var(--line); background: #fff; color: var(--text); border-radius: 6px; font-size: 11px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.btn-arrow:hover:not(:disabled) { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-arrow:disabled { opacity: .3; cursor: default; }
@media (max-width: 720px) { .btn-arrow { width: 34px; height: 34px; font-size: 13px; } }

/* ===== Approve each order first (approval popup + banner) ===== */
.ap-amount { border: 1px solid var(--line, #e2e8f0); border-radius: 12px; padding: 12px 16px; background: var(--bg-soft, rgba(100,116,139,.08)); }
.ap-amount-label { font-size: .8rem; color: var(--muted, #64748b); }
.ap-amount-value { font-size: 1.9rem; font-weight: 700; line-height: 1.2; }
.ap-breakdown { margin-top: 6px; }
.ap-breakdown .summary-row { padding: 2px 0; }
.ap-via .radio { padding: 8px 0; }
.ap-err { margin: 0; }
.ap-banner .mt-s { margin-top: 8px; }
.ap-body .pay-box { max-width: 100%; }
@media (max-width: 520px) { .ap-amount-value { font-size: 1.6rem; } }

/* 2.2.0 — New order: "who is it for?" choice */
.order-for { margin: 0 !important; display: flex; gap: 14px; align-items: flex-start; text-decoration: none; color: inherit; border: 2px solid transparent; transition: border-color .15s, box-shadow .15s; }
.order-for:hover, .order-for:focus-visible { border-color: var(--brand); box-shadow: var(--shadow); }
.order-for h3 { margin: 0 0 4px; font-size: 1.05rem; }
.order-for p { margin: 0; }
.order-for-icon { font-size: 2rem; line-height: 1; }
.sp-blocked { opacity: .65; }

/* ---- Display cards (2.3.0): read-only card + prominent ✎ Edit button that opens a popup ---- */
.btn-edit { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 45%, #fff); background: color-mix(in srgb, var(--brand) 7%, #fff); font-weight: 600; }
.btn-edit:hover { background: color-mix(in srgb, var(--brand) 14%, #fff); border-color: var(--brand); }
.btn-edit svg { flex: none; }
.display-card .card-head { flex-wrap: wrap; }
.display-card .card-head h3 { display: flex; align-items: center; gap: 6px; }
.display-card .kv dd { overflow-wrap: anywhere; }
.stack-s { display: flex; flex-direction: column; gap: 10px; }
.swatch { display: inline-block; width: 18px; height: 18px; border-radius: 4px; border: 1px solid var(--line); vertical-align: middle; }
.kv-thumb { max-height: 48px; max-width: 160px; border-radius: 4px; border: 1px solid var(--line); background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0 / 12px 12px; }
.kv-long { display: block; max-height: 7.5em; overflow: hidden; }
.dc-list { display: flex; flex-direction: column; gap: 8px; }
.dc-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.dc-row:first-child { border-top: 0; padding-top: 0; }
.dc-row .grow { min-width: 0; }
@media (max-width: 640px) { .kv { grid-template-columns: 1fr; gap: 2px 0; } .kv dd { margin-bottom: 8px; } }
.card .card.card-inner { box-shadow: none; padding: 14px; background: var(--bg-soft, #f8fafc); }

/* ---- Item builds and the total sq ft calculator (2.3.5) ---- */
button.img-card { cursor: pointer; font: inherit; color: inherit; align-items: stretch; justify-content: center; min-height: 90px; }
.img-card.active { outline: 3px solid var(--brand); outline-offset: 1px; }
.text-amber { color: var(--warn); }
.alert.row { margin-bottom: 12px; }
.price-warn { color: var(--err); font-weight: 600; }
.warn-cell { background: var(--err-bg); }
.alert-loss { background: var(--err-bg); border-color: #fca5a5; color: var(--err); font-weight: 600; }
.build-select select option:disabled, .build-select .csel-btn option:disabled { color: #94a3b8; }
.size-row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.size-row .lbl-sm { font-size: .85em; font-weight: 500; color: var(--muted); display: flex; flex-direction: column; gap: 3px; width: 120px; }
.size-row .lbl-sm :is(input, select), .size-row .lbl-sm :is(input, .csel-btn) { color: var(--text); font-weight: 400; }
.size-row .x { padding-bottom: 9px; color: var(--muted); }
.size-presets { margin-top: 8px; }
.bm-table input { width: 96px; }
.bm-table select, .bm-table .csel-btn { width: auto; }
@media (max-width: 640px) { .size-row .lbl-sm { width: calc(50% - 18px); } .size-row .lbl-sm.unit { width: 100%; } }

/* 2.3.6: filters + "n builds selected" actions stay on screen while the build list scrolls */
.bulk-sticky { position: sticky; top: var(--admin-top-h, 61px); z-index: 20; background: var(--soft2); padding: 8px 0 2px; margin-top: -8px; }
.bulk-sticky .toolbar { margin-bottom: 8px; }
.bulk-sticky .alert { margin-bottom: 8px; box-shadow: var(--shadow); }
.bulk-sticky.in-modal { top: -20px; background: #fff; margin-top: 0; padding-top: 4px; }
.bulk-sticky.in-modal:empty, .bulk-sticky.in-modal:has(> .alert[hidden]) { padding: 0; }

/* ---------- Checkboxes (Natser's pick, 2026-10-12): style G "green glow circle" with tick #1 (slight tail that leaves the circle) ---------- */
input[type=checkbox] {
  --cb: 19.8px; /* 26px in 2.3.7, 22px in 2.3.8, 10% smaller again in 2.3.10; ring, glow and tick all scale from this */
  appearance: none; -webkit-appearance: none; flex: none; position: relative; cursor: pointer;
  width: var(--cb); height: var(--cb); margin: 0; vertical-align: middle;
  border-radius: 50%; border: calc(var(--cb) * .077) solid #cbd5e1; background: #fff; transition: background .15s, box-shadow .15s, border-color .15s;
}
input[type=checkbox]::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: calc(var(--cb) * 1.22); height: calc(var(--cb) * 1.22);
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2056%2056%22%3E%3Cpath%20d%3D%22M13%2031%20L24%2042%20L47%2011%22%20fill%3D%22none%22%20stroke%3D%22%23047857%22%20stroke-width%3D%2211%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M13%2031%20L24%2042%20L47%2011%22%20fill%3D%22none%22%20stroke%3D%22%23fff%22%20stroke-width%3D%226%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat;
  transform: translate(-44%, -54%) scale(0); transition: transform .15s; pointer-events: none;
}
input[type=checkbox]:checked { background: #10b981; border-color: #10b981; box-shadow: 0 0 0 calc(var(--cb) * .154) rgba(16, 185, 129, .22); }
input[type=checkbox]:checked::after { transform: translate(-44%, -54%) scale(1); }
input[type=checkbox]:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
input[type=checkbox]:disabled { cursor: not-allowed; opacity: .55; }
label.check, .checks label { display: inline-flex; align-items: center; gap: 10px; }
.table td.sel, .table th.sel { width: 38px; }

/* Phone: lists with row checkboxes become cards: name on top, tick centred on the left, the other info on the right */
@media (max-width: 720px) {
  .table.has-sel { --cb: 26px; }
  .table.has-sel thead { display: block; }
  .table.has-sel thead tr { display: flex; align-items: center; padding: 8px 12px; background: var(--soft); border-bottom: 1px solid var(--line); }
  .table.has-sel thead th { display: none; background: none; border: 0; padding: 0; }
  .table.has-sel thead th.sel { display: flex; align-items: center; gap: 10px; width: auto; }
  .table.has-sel thead th.sel::after { content: "Select all"; color: var(--muted); font-weight: 600; font-size: .9em; }
  .table.has-sel, .table.has-sel tbody { display: block; }
  .table.has-sel tbody tr { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 6px; align-items: center; padding: 12px 12px 10px; border-bottom: 1px solid var(--line); }
  .table.has-sel td { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 0; padding: 4px 0; grid-column: 2; min-width: 0; }
  .table.has-sel td::before { content: attr(data-label); color: var(--muted); font-size: .85em; flex: none; }
  .table.has-sel td.card-title { grid-column: 1 / -1; grid-row: 1; font-weight: 700; font-size: 1.02em; padding: 0 0 8px; justify-content: flex-start; }
  .table.has-sel td.card-title::before { display: none; }
  .table.has-sel td.sel { grid-column: 1; grid-row: 2 / span 20; justify-self: center; align-self: center; padding: 0; width: auto; }
  .table.has-sel td.sel::before { display: none; }
  .table.has-sel td.empty-cell { grid-column: 1 / -1; display: block; }
  .table.has-sel td.empty-cell::before { display: none; }
}

/* ---------- 2.3.9: on phones the build action bar keeps its buttons in a drop-down under a gear ---------- */
.bulk-bar-box .bar-gear { display: none; }
.bulk-bar-box .bar-actions { display: contents; }
@media (max-width: 720px) {
  .bulk-bar-box { position: relative; flex-wrap: nowrap; align-items: center; padding: 8px 10px; }
  .bulk-bar-box .grow { display: none; }
  .bulk-bar-box > .muted { flex: 1; min-width: 0; }
  .bulk-bar-box .bar-gear {
    display: block; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid #93c5fd; cursor: pointer; padding: 0;
    background: #fff url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%231d4ed8%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%223%22%2F%3E%3Cpath%20d%3D%22M19.4%2015a1.65%201.65%200%200%200%20.33%201.82l.06.06a2%202%200%200%201%200%202.83%202%202%200%200%201-2.83%200l-.06-.06a1.65%201.65%200%200%200-1.82-.33%201.65%201.65%200%200%200-1%201.51V21a2%202%200%200%201-2%202%202%202%200%200%201-2-2v-.09A1.65%201.65%200%200%200%209%2019.4a1.65%201.65%200%200%200-1.82.33l-.06.06a2%202%200%200%201-2.83%200%202%202%200%200%201%200-2.83l.06-.06a1.65%201.65%200%200%200%20.33-1.82%201.65%201.65%200%200%200-1.51-1H3a2%202%200%200%201-2-2%202%202%200%200%201%202-2h.09A1.65%201.65%200%200%200%204.6%209a1.65%201.65%200%200%200-.33-1.82l-.06-.06a2%202%200%200%201%200-2.83%202%202%200%200%201%202.83%200l.06.06a1.65%201.65%200%200%200%201.82.33H9a1.65%201.65%200%200%200%201-1.51V3a2%202%200%200%201%202-2%202%202%200%200%201%202%202v.09a1.65%201.65%200%200%200%201%201.51%201.65%201.65%200%200%200%201.82-.33l.06-.06a2%202%200%200%201%202.83%200%202%202%200%200%201%200%202.83l-.06.06a1.65%201.65%200%200%200-.33%201.82V9a1.65%201.65%200%200%200%201.51%201H21a2%202%200%200%201%202%202%202%202%200%200%201-2%202h-.09a1.65%201.65%200%200%200-1.51%201z%22%2F%3E%3C%2Fsvg%3E") center / 17px 17px no-repeat; box-shadow: var(--shadow);
  }
  .bulk-bar-box.menu-open .bar-gear { background-color: #dbeafe; border-color: #1d4ed8; }
  .bulk-bar-box .bar-actions {
    display: none; position: absolute; right: 8px; top: calc(100% - 4px); z-index: 30; width: min(260px, calc(100vw - 48px));
    flex-direction: column; gap: 2px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg);
  }
  .bulk-bar-box.menu-open .bar-actions { display: flex; }
  .bulk-bar-box .bar-actions .btn { width: 100%; justify-content: flex-start; text-align: left; border: 0; background: transparent; padding: 12px 14px; font-size: 1rem; }
  .bulk-bar-box .bar-actions .btn:hover, .bulk-bar-box .bar-actions .btn:active { background: var(--soft); }
  /* a tapped card row no longer stays grey */
  .table.has-sel tr.clickable:hover td { background: transparent; }
}

/* ---------- 2.4.0: Builds & prices on phones: filters behind one button in the list header; Options tab "Add from library" centred ---------- */
.add-center { display: flex; justify-content: center; }
.bld-filter-btn { display: none; }
@media (max-width: 720px) {
  .hint-tick { display: none; }
  .bld-filters { display: none; grid-template-columns: 1fr 1fr; gap: 8px; }
  .bld-filters.open { display: grid; }
  .bld-filters select, .bld-filters .csel-btn { width: 100%; min-width: 0; }
  .table.has-sel thead th.sel .bld-filter-btn { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; order: 3; }
  .table.has-sel thead th.sel::after { order: 1; }
  .table.has-sel thead th.sel { flex: 1; }
  .fcount { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: #e2e8f0; color: #475569; font-size: 12px; font-weight: 700; }
  .fcount.on { background: var(--brand); color: #fff; }
}

/* ===================== 2.5.0: three-step checkout, pickup times, opening hours ===================== */
.btn-link { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; text-decoration: underline; cursor: pointer; }
.err-text { color: var(--err); }
.mt-xs { margin-top: 4px; }
.h-sm { font-size: 1rem; margin: 0 0 4px; }
.wrap { flex-wrap: wrap; }
.co-progress { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; }
.co-dot { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; background: var(--soft2); color: var(--muted); border: 2px solid var(--line); }
.co-dot.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.co-dot.done { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.co-progress-txt { margin-left: 4px; font-weight: 600; font-size: .92rem; }
.co-step h3 { margin-top: 0; }
.co-done { display: flex; align-items: center; gap: 12px; }
.co-check { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.co-later { color: var(--muted); }
.co-nav { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.co-nav .btn[disabled] { opacity: .5; }
.choice-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.choice-row .choice + .choice { margin-top: 0; }
.choice-lg { padding: 16px; }
.choice-lg strong { font-size: 1.05rem; }
.choice-sm { padding: 8px 12px; }
.place-block strong { display: block; }
.pickup-group, .deliv-group, .review-group { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: #fff; }
.card-inset { background: var(--soft); }
.group-head { font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin-bottom: 4px; }
.deliv-result { margin-top: 4px; }
.deliv-group.ok { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.deliv-group.bad { border-color: color-mix(in srgb, var(--err) 45%, var(--line)); background: var(--err-bg); }
.price-tag { font-weight: 700; font-size: 1.05rem; }
.review-group + .review-group { margin-top: 8px; }
.slot-picker { margin-top: 6px; }
.slot-days { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: thin; }
.slot-day { flex: 0 0 auto; border: 1px solid #cbd5e1; background: #fff; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .88rem; cursor: pointer; white-space: nowrap; }
.slot-day.active { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, #fff); color: var(--brand); font-weight: 600; }
.slot-day.has-pick::after { content: " ●"; color: var(--ok); }
.slot-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.slot-time { border: 1px solid var(--line); background: #fff; border-radius: var(--radius); padding: 8px 10px; font: inherit; font-size: .9rem; cursor: pointer; text-align: center; }
.slot-time.active { border-color: var(--brand); background: var(--brand); color: #fff; font-weight: 600; }
.slot-left { display: block; font-size: .75rem; color: var(--warn); }
.slot-time.active .slot-left { color: #fff; }
.appt-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--info-bg); color: var(--info); font-weight: 600; font-size: .85rem; }
.pickup-row + .pickup-row { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.hours-input { display: grid; gap: 12px; }
.hours-grid { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; align-items: center; }
.hours-day { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.hours-times { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hours-times input { width: 120px; }
.hours-times input:disabled { opacity: .45; }
.hours-closed { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.hours-closed .chip { cursor: default; padding: 3px 6px 3px 12px; }
.chip-x { border: 0; background: none; font: inherit; cursor: pointer; padding: 0 4px; color: var(--muted); }
@media (max-width: 720px) {
  .co-progress-txt { font-size: .85rem; }
  .co-nav .btn { width: 100%; }
  .choice-row { grid-template-columns: 1fr; }
  .slot-times { grid-template-columns: repeat(2, 1fr); }
  .hours-grid { grid-template-columns: 1fr; gap: 2px; }
  .hours-times { margin: 0 0 8px 26px; }
}
.checkout-grid > *, .co-step, .pickup-group, .slot-picker { min-width: 0; max-width: 100%; }
.h-sm .muted, .h-sm .req { margin-left: 4px; font-weight: 400; }

/* ===================== 2.5.0: the app's own file viewer ===================== */
.modal-viewer { max-width: min(1200px, 96vw); height: 92vh; max-height: 92vh; }
.modal-viewer .modal-body { padding: 0; display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
.vw { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.vw-files { display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px 0; }
.vw-files:empty { display: none; }
.vw-tab { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 12px; font: inherit; font-size: .85rem; cursor: pointer; white-space: nowrap; }
.vw-tab.active { border-color: var(--brand); color: var(--brand); font-weight: 600; }
.vw-bar { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--soft); }
.vw-group { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.vw-btn { min-width: 36px; height: 34px; padding: 0 10px; border: 1px solid var(--line); background: #fff; border-radius: var(--radius); font: inherit; font-size: .95rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: var(--text); }
.vw-btn:disabled { opacity: .4; cursor: default; }
.vw-btn.on { border-color: var(--brand); color: var(--brand); font-weight: 600; }
.vw-page-in { width: 56px; height: 34px; text-align: center; }
.vw-page-of { color: var(--muted); font-size: .9rem; margin-right: 2px; }
.vw-stage { position: relative; flex: 1; min-height: 240px; overflow: hidden; background: #e5e7eb; touch-action: none; user-select: none; cursor: grab; outline: none; }
.vw-stage:focus-visible { box-shadow: inset 0 0 0 2px var(--brand); }
.vw-canvas { position: absolute; left: 50%; top: 50%; transform-origin: center center; box-shadow: 0 2px 12px rgba(0,0,0,.25); background: #fff; }
.vw-img { display: block; width: 100%; height: 100%; pointer-events: none; }
.vw-guides { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.vw-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(229,231,235,.6); }
.vw-loading[hidden] { display: none; }
.vw-cant { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; padding: 20px; text-align: center; }
.vw-pf { padding: 6px 12px; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-top: 1px solid var(--line); }
.vw-pf.ok { color: var(--ok); } .vw-pf.warn { color: var(--warn); background: var(--warn-bg); } .vw-pf.bad { color: var(--err); background: var(--err-bg); }
.vw-note { padding: 4px 12px 8px; }
.vw-note:empty { display: none; }
@media (max-width: 720px) {
  .vw-wrap { padding: 0 !important; }
  .modal-viewer { height: 100vh; max-height: 100vh; max-width: 100vw; border-radius: 0; }
  .vw-bar { gap: 6px; justify-content: center; }
  .vw-btn { min-width: 34px; height: 32px; padding: 0 8px; }
}
.btn-xs { min-height: 24px; padding: 1px 8px; font-size: .8em; }
.file-row img.clickable, .file-row .file-ico.clickable { cursor: zoom-in; }
.vw-group { flex-wrap: nowrap; }
.vw .vw-page-in { width: 56px; min-width: 0; flex: 0 0 56px; padding: 4px; }
.hours-input .hours-times { flex-wrap: nowrap; }
.hours-input .hours-times input { width: 128px; flex: 0 0 128px; min-width: 0; }
.hours-input .hours-closed-wrap input[type=date] { width: 170px; flex: 0 0 170px; }
@media (max-width: 720px) { .hours-input .hours-times input { width: 112px; flex-basis: 112px; } }

/* System → Errors (2.6.0, Natser only) */
.se-pre { display: block; white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow: auto; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; padding: 8px; margin: 0; }
.se-wrap { word-break: break-word; overflow-wrap: anywhere; }
.se-msg { word-break: break-word; overflow-wrap: anywhere; }
.se-switch { display: inline-flex; align-items: center; gap: 4px; font-size: .9em; }
.se-flabel { display: inline-flex; align-items: center; gap: 4px; min-width: 64px; }
.se-link { display: block; text-decoration: none; color: inherit; }
/* Printable pages in a popup (2.6.0): order documents, statements, reports */
.dp-stage { position: relative; flex: 1; min-height: 240px; background: #e5e7eb; }
.dp-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
@media (max-width: 640px) { .dp-hint { display: none; } }

/* ===== 2.7.0: quantity breaks (price per piece table) and side items on the item page ===== */
.qb-table { margin-top: 10px; border: 1px solid var(--border, #e2e8f0); border-radius: 10px; padding: 8px 10px; background: var(--surface-2, #f8fafc); }
.qb-table .qb-head { margin-bottom: 4px; }
.qb-table .qb-rows { display: flex; flex-wrap: wrap; gap: 6px; }
.qb-table .qb-row { display: flex; gap: 6px; align-items: baseline; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border, #e2e8f0); background: #fff; font-size: .92em; }
.qb-table .qb-row.on { border-color: var(--primary, #2563eb); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary, #2563eb) 18%, transparent); }
.qb-table .qb-row span { color: var(--muted, #64748b); }
.side-items { display: grid; gap: 4px; }
.side-items[hidden] { display: none; }
.side-item .side-qty { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.side-item .side-qty[hidden] { display: none; }
.side-item .side-qty .qty-input { max-width: 110px; }
.lc-sides[hidden], .lc-size[hidden], .size-group[hidden] { display: none; }

/* ===== 2.8.0: set quantity & price (one quantity dropdown) and multi location sizes ===== */
.set-qty { max-width: 360px; width: 100%; }
.set-qty[hidden], .qty-row[hidden], .locs-group[hidden], .lc-locs[hidden] { display: none; }
.locs-group .loc-row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px dashed var(--border, #e2e8f0); }
.locs-group .loc-row .lbl-sm { font-size: .85em; font-weight: 500; color: var(--muted); display: flex; flex-direction: column; gap: 3px; width: 120px; }
.locs-group .loc-row .lbl-sm.loc-name { width: 100%; }
.locs-group .loc-row .lbl-sm :is(input, select), .locs-group .loc-row .lbl-sm :is(input, .csel-btn) { color: var(--text); font-weight: 400; }
.locs-group .loc-row .x { padding-bottom: 9px; color: var(--muted); }
.locs-group .loc-row .loc-rm { margin-bottom: 4px; }
.locs-group .loc-tools { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-top: 8px; }
.locs-group .loc-tools .lbl-sm { font-size: .85em; color: var(--muted); display: flex; flex-direction: column; gap: 3px; width: 120px; }
@media (max-width: 640px) { .locs-group .loc-row .lbl-sm { width: calc(50% - 34px); } .locs-group .loc-row .lbl-sm.loc-name { width: 100%; } }
.set-rows input[type=radio] { width: 18px; height: 18px; }

/* ---------- 2.9.0: the bell (Urgent / All notifications) ---------- */
.bell-btn { position: relative; }
.bell-count { position: absolute; top: -2px; right: -4px; background: var(--err); color: #fff; font-size: .68rem; font-weight: 700; border-radius: 999px; padding: 1px 5px; line-height: 1.3; min-width: 18px; text-align: center; }
.bell-head { display: flex; align-items: flex-end; gap: 8px; justify-content: space-between; border-bottom: 1px solid var(--line); }
.bell-head .tabs { border-bottom: 0; margin-bottom: 0; }
.bell-list { list-style: none; margin: 0; padding: 0; }
.bell-item + .bell-item { border-top: 1px solid var(--line); }
.bell-link { display: grid; gap: 2px; width: 100%; text-align: left; background: none; border: 0; padding: 10px 6px; font: inherit; color: inherit; cursor: pointer; border-radius: 6px; }
.bell-link:hover, .bell-link:focus-visible { background: var(--soft2); }
.bell-title { font-weight: 500; overflow-wrap: anywhere; }
.bell-item.unread .bell-title { font-weight: 700; }
.bell-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-right: 6px; vertical-align: middle; }
.bell-body { color: var(--muted); font-size: .9em; overflow-wrap: anywhere; }
.bell-time { color: var(--muted); font-size: .8em; }
.store-header .bell-btn { font-size: 1.15rem; color: var(--text); }

/* ---------- 2.9.0: catalogues ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.cat-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: grid; gap: 6px; background: #fff; }
.cat-card.current { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.cat-prod { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.cat-prod img, .cat-prod .ph { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--soft2); display: block; }
.cat-prod .body { padding: 10px 12px; display: grid; gap: 4px; align-content: start; }
.cat-gallery { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.cat-gallery img { height: 140px; border-radius: 6px; border: 1px solid var(--line); flex: none; }
.pick-list { max-height: 55vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 8px; }
.pick-list .pick-group { font-weight: 600; margin: 10px 0 4px; color: var(--muted); font-size: .85em; text-transform: uppercase; letter-spacing: .03em; }
.pick-list label { display: flex; gap: 8px; align-items: center; padding: 4px 0; }
.sp-pending td { background: #fffbeb; }

/* 2.10.0: categories inside catalogues */
.thumb-xs { width: 40px; height: 40px; object-fit: contain; background: var(--soft2); border-radius: 6px; border: 1px solid var(--line); display: inline-block; flex: none; }
.folder-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft2); }
.folder-head h4 { margin: 0 0 4px; }
.folder-head p { margin: 2px 0; }
.pick-list label.item-pick { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.pick-list label.item-pick[hidden] { display: none; }
.menu-list .btn { width: 100%; justify-content: flex-start; }
.place-tree label { display: flex; gap: 8px; align-items: center; padding: 3px 0; }
.place-tree .pt-cat { font-weight: 600; margin: 10px 0 2px; }
.sp-folders td .f-name { display: inline-flex; gap: 6px; align-items: center; }
.cat-sub { margin: -4px 0 12px; }
@media (max-width: 640px) { .folder-head { padding: 8px; } .folder-head .row .btn { flex: 1 1 auto; } }
.fold-table td { vertical-align: middle; }
@media (max-width: 640px) { .fold-table th, .fold-table td { padding: 8px 6px; } .fold-table .reorder-col, .fold-table .reorder-cell { width: 64px; } }
/* 2.10.3 Item build options: collapsible label cards */
.bl-closed .card-head { margin-bottom: 0; }
.bl-chev { font-size: 15px; min-width: 32px; }
/* 2.11.0 3D flyer viewer (product gallery) */
.gallery .main-img { position: relative; }
.f3d { position: absolute; inset: 0; outline: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; overflow: hidden; }
.f3d:focus-visible { box-shadow: inset 0 0 0 3px var(--brand); }
.f3d-stage { position: absolute; inset: 0 0 52px 0; perspective: 1400px; touch-action: none; cursor: grab; }
.f3d.f3d-dragging .f3d-stage { cursor: grabbing; }
.f3d.f3d-moving .f3d-stage { cursor: move; }
.f3d-pan { position: absolute; inset: 0; transform-style: preserve-3d; transform-origin: 50% 50%; will-change: transform; }
.f3d-card { position: absolute; left: 50%; top: 50%; transform-style: preserve-3d; will-change: transform; }
.f3d-face, .f3d-edge { position: absolute; left: 50%; top: 50%; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.f3d-face { background: #fff; overflow: hidden; box-shadow: 0 0 0 1px rgba(15, 23, 42, .08); }
.f3d-edge { background: #e7e5e0; backface-visibility: visible; -webkit-backface-visibility: visible; }
.f3d-img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.f3d-plain { width: 100%; height: 100%; background: linear-gradient(135deg, #fff, #f3f4f6); }
.f3d-shade { position: absolute; inset: 0; background: #0f172a; opacity: 0; pointer-events: none; }
.f3d-shadow { position: absolute; left: 50%; bottom: 58px; height: 18px; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(15, 23, 42, .28), rgba(15, 23, 42, 0) 70%); pointer-events: none; transition: opacity .2s; }
.f3d-hint { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); background: rgba(15, 23, 42, .78); color: #fff; padding: 6px 12px; border-radius: 999px; font-size: .85rem; pointer-events: none; transition: opacity .4s; white-space: nowrap; }
.f3d-hint.f3d-hide { opacity: 0; }
.f3d-hint-ico { display: inline-block; animation: f3d-nudge 2.4s ease-in-out infinite; }
@keyframes f3d-nudge { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-40deg); } }
@media (prefers-reduced-motion: reduce) { .f3d-hint-ico { animation: none; } }
.f3d-note { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(15, 23, 42, .82); color: #fff; padding: 8px 14px; border-radius: 8px; font-size: .9rem; opacity: 0; pointer-events: none; transition: opacity .25s; }
.f3d-note.f3d-show { opacity: 1; }
.f3d-tools { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; padding: 0 8px; }
.f3d-btn { min-width: 38px; min-height: 36px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .95); color: var(--text); font: inherit; font-size: .9rem; cursor: pointer; box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }
.f3d-btn:hover:not(:disabled) { border-color: var(--brand); }
.f3d-btn:disabled { opacity: .45; cursor: default; }
@media (max-width: 420px) { .f3d-btn-t { display: none; } }
.f3d-flat { display: flex; align-items: center; justify-content: center; }
.f3d-flat-img { max-width: 100%; max-height: calc(100% - 52px); object-fit: contain; }
.f3d-badge { position: absolute; right: 3px; bottom: 3px; background: #0f172a; color: #fff; font-size: 10px; font-weight: 700; line-height: 1; padding: 3px 4px; border-radius: 4px; pointer-events: none; }
.f3d-preview { position: relative; aspect-ratio: 4/3; background: var(--soft2); border-radius: 10px; overflow: hidden; }
/* gallery: thumbnails as buttons, previous / next arrows, 3D mark */
.thumbs .thumb-btn { position: relative; padding: 0; border: 0; background: none; cursor: pointer; flex: 0 0 auto; border-radius: 6px; }
.thumbs .thumb-btn img { display: block; }
.thumbs .thumb-btn.active img { border-color: var(--brand); }
.gal-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, .9); font-size: 18px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text); }
.gal-nav.prev { left: 8px; } .gal-nav.next { right: 8px; }
.main-img.is-3d .gal-nav { top: auto; bottom: 8px; transform: none; }
.main-img > .gal-pic { width: 100%; height: 100%; object-fit: contain; touch-action: pan-y; }
.img-card { position: relative; }
.img-card .f3d-badge { right: auto; left: 8px; bottom: auto; top: 8px; font-size: 11px; padding: 4px 6px; }
.kind-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kind-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font: inherit; color: var(--text); }
.kind-opt:hover, .kind-opt:focus-visible { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29, 78, 216, .12); }
.kind-ico { font-size: 28px; }
@media (max-width: 520px) { .kind-pick { grid-template-columns: 1fr; } }
/* 2.12.0 folding 3D flyers */
.f3d-sheet { position: absolute; inset: 0; transform-style: preserve-3d; }
.f3d-panel { position: absolute; transform-style: preserve-3d; }
.f3d-pface { position: absolute; inset: 0; overflow: hidden; background: #fff; backface-visibility: hidden; -webkit-backface-visibility: hidden; transform: translateZ(.25px); box-shadow: 0 0 0 .5px rgba(15, 23, 42, .12); }
.f3d-pface.f3d-pin { transform: rotateY(180deg) translateZ(.25px); }
.f3d-slice { position: absolute; max-width: none; object-fit: fill; }
div.f3d-slice { inset: 0; width: 100% !important; height: 100% !important; left: 0 !important; top: 0 !important; }
.f3d-has-fold .f3d-stage { bottom: 92px; }
.f3d-has-fold .f3d-shadow { bottom: 98px; }
.f3d-foldbar { position: absolute; left: 50%; bottom: 52px; transform: translateX(-50%); width: min(320px, calc(100% - 24px)); display: flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .92); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }
.f3d-slider { flex: 1; min-width: 0; accent-color: var(--brand); touch-action: pan-x; }
.f3d-fold-l { font-size: .75rem; color: var(--muted); }
.f3d-foldmap { position: relative; display: inline-block; max-width: 100%; }
.f3d-foldmap img { display: block; max-width: 100%; max-height: 220px; border: 1px solid var(--line); }
.f3d-foldline { position: absolute; border: 0 dashed #dc2626; pointer-events: none; }
.f3d-foldline.v { top: 0; bottom: 0; border-left-width: 2px; }
.f3d-foldline.h { left: 0; right: 0; border-top-width: 2px; }
.f3d img.f3d-img { object-fit: cover; }
.f3d img.f3d-slice { object-fit: fill; }
/* 2.13.0 combined image builder */
.kind-pick-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .kind-pick-3 { grid-template-columns: 1fr; } }
.cb-wrap { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(300px, 1.4fr); gap: 20px; align-items: start; }
@media (max-width: 760px) { .cb-wrap { grid-template-columns: 1fr; } .cb-right { order: -1; } }
.cb-list { display: flex; flex-direction: column; gap: 8px; }
.cb-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 8px; align-items: center; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.cb-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 4px; background: var(--soft2); }
.cb-item input { min-width: 0; }
.cb-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.cb-settings .field:last-child { grid-column: 1 / -1; }
@media (max-width: 480px) { .cb-settings { grid-template-columns: 1fr; } }
.check-line { display: flex; align-items: center; gap: 8px; font-size: .92rem; }
.cb-preview { position: sticky; top: 0; background: repeating-conic-gradient(#f1f5f9 0% 25%, #fff 0% 50%) 50% / 20px 20px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; align-items: center; justify-content: center; min-height: 240px; }
.cb-canvas { max-width: 100%; max-height: 60vh; height: auto; display: block; }
.cb-empty { display: none; color: var(--muted); }
.cb-preview.cb-none .cb-canvas { display: none; }
.cb-preview.cb-none .cb-empty { display: block; }
.gap-xs { gap: 4px; }
@media (max-width: 760px) { .cb-preview { position: static; min-height: 160px; } .cb-canvas { max-height: 38vh; } }
/* 2.14.0 A-frame signs in the 3D viewer */
.f3d-aframe .f3d-shadow { display: none; }
.f3d-agroup { position: absolute; left: 50%; top: 0; width: 0; height: 0; transform-style: preserve-3d; }
.f3d-apanel { position: absolute; transform-style: preserve-3d; }
.f3d-aface { position: absolute; overflow: hidden; background: #fff; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 0 0 .5px rgba(15, 23, 42, .14); }
.f3d-aface.f3d-ain { background: linear-gradient(180deg, #f4f4f2, #e4e4e0); }
.f3d-ains { position: absolute; overflow: hidden; background: #fff; }
.f3d-aedge { position: absolute; background: #dcdad4; }
.f3d-af-tent .f3d-aedge { background: #eceae4; }
.f3d-af-aframe .f3d-aface.f3d-ain { background: linear-gradient(180deg, #f1f1ee, #dedcd6); }
.f3d-af-sidewalk .f3d-aface { background: #1f2937; border-radius: 4px; box-shadow: none; }
.f3d-af-sidewalk .f3d-aface.f3d-ain { background: linear-gradient(180deg, #273244, #18202c); }
.f3d-af-sidewalk .f3d-aedge { background: #111827; }
.f3d-leg { position: absolute; background: #1f2937; border-radius: 0 0 3px 3px; backface-visibility: visible; -webkit-backface-visibility: visible; }
.f3d-leaf { position: absolute; background: linear-gradient(180deg, #e5e7eb, #9ca3af); border-radius: 0 0 3px 3px; box-shadow: 0 1px 1px rgba(15, 23, 42, .25); }
.f3d-knuckle { position: absolute; top: 0; height: 0; transform-style: preserve-3d; }
.f3d-knuckle i { position: absolute; left: 0; display: block; background: linear-gradient(90deg, #9ca3af, #f3f4f6 45%, #6b7280); border-radius: 3px; backface-visibility: visible; -webkit-backface-visibility: visible; }
.f3d-floor { position: absolute; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(15, 23, 42, .26), rgba(15, 23, 42, 0) 68%); pointer-events: none; backface-visibility: visible; transition: opacity .2s; }
/* 2.15.0 cut-out 3D flyers (see-through PNG): only the picture's shape shows */
.f3d-cut .f3d-face, .f3d-cut .f3d-aface, .f3d-cut .f3d-aface.f3d-ain, .f3d-cut .f3d-ains { background: transparent !important; box-shadow: none !important; }
.f3d-cut .f3d-edge, .f3d-cut .f3d-aedge { display: none !important; }
.f3d.f3d-cut img.f3d-img { object-fit: fill; }
.f3d-cutlayer { position: absolute; left: 50%; top: 50%; background: #cfccc4; backface-visibility: visible; -webkit-backface-visibility: visible; pointer-events: none; }
.f3d-apanel > .f3d-cutlayer { left: 0; top: 0; }
.f3d-cutfill { position: absolute; inset: 0; background: linear-gradient(180deg, #f4f4f2, #e2e1dc); }

/* ---------- 2.16.0: popups and the side menu lock the page behind them; the menu opens from the right ---------- */
html.page-locked, html.page-locked body { overflow: hidden; }
.modal-wrap { overscroll-behavior: contain; }
.nav-head, .nav-backdrop { display: none; }
.nav-head { align-items: center; justify-content: space-between; gap: 10px; padding: 10px 10px 10px 18px; position: sticky; top: 0; z-index: 3; }
.nav-title { font-weight: 700; font-size: 1rem; }
.nav-close { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(148, 163, 184, .18); color: inherit; font-size: 1.15rem; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.nav-close:hover, .nav-close:focus-visible { background: rgba(148, 163, 184, .32); }
.nav-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); animation: fade .15s; }
@media (max-width: 1024px) {
  .admin-side { left: auto; right: 0; width: min(300px, 86vw); transform: translateX(100%); visibility: hidden; transition: transform .2s, visibility .2s; overscroll-behavior: contain; }
  body.nav-open .admin-side { transform: none; visibility: visible; }
  .admin-side .nav-head { display: flex; background: #0f172a; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  body.nav-open .admin-shell > .nav-backdrop { display: block; z-index: 99; }
  .admin-top .menu-toggle { margin-left: 2px; }
  .store-header .menu-toggle { display: none; }
}
@media (max-width: 720px) {
  .store-header .menu-toggle { display: inline-block; }
  .store-nav { display: flex; position: fixed; top: 0; right: 0; bottom: 0; width: min(300px, 86vw); flex-direction: column; gap: 0; padding: 0 0 24px; background: #fff;
    overflow-y: auto; overscroll-behavior: contain; z-index: 2; box-shadow: var(--shadow-lg); transform: translateX(100%); visibility: hidden; transition: transform .2s, visibility .2s; }
  body.nav-open .store-nav { display: flex; transform: none; visibility: visible; order: 0; }
  .store-nav a { padding: 13px 18px; border-bottom: 1px solid var(--line); }
  .store-nav .nav-head { display: flex; background: #fff; border-bottom: 1px solid var(--line); }
  body.nav-open .store-header { z-index: 900; }
  body.nav-open .store-header .nav-backdrop { display: block; z-index: 1; }
}

/* ===== 2.17.0 brand display: full logo / full logo with icon / icon with app name / app name only ===== */
.bmark { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; vertical-align: middle; }
.bmark img { display: block; width: auto; object-fit: contain; }
.bm-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.brand .bmark .bm-logo { max-height: 44px; max-width: min(240px, 46vw); }
.brand .bmark .bm-icon { height: 36px; max-width: 48px; }
.bare-brand { display: inline-flex; }
.bare-brand .bmark .bm-logo { max-height: 56px; max-width: min(300px, 80vw); }
.bare-brand .bmark .bm-icon { height: 48px; max-width: 64px; }
.admin-brand .bmark .bm-logo { max-height: 34px; max-width: 200px; }
.admin-brand .bmark .bm-icon { height: 28px; max-width: 40px; }
.nav-title { display: flex; align-items: center; min-width: 0; overflow: hidden; }
.nav-title .bmark .bm-logo { max-height: 34px; max-width: min(190px, 52vw); }
.nav-title .bmark .bm-icon { height: 30px; max-width: 40px; }
@media (max-width: 1024px) {
  .admin-side .admin-brand { display: none; } /* the brand sits in the menu's top bar instead (no double brand) */
}
@media (max-width: 420px) {
  /* a full logo with icon is too wide for a phone header: the full logo alone already carries the symbol */
  .brand .bm-show-logo_icon .bm-icon, .nav-title .bm-show-logo_icon .bm-icon { display: none; }
}

/* ===== 2.17.0 page library: templates and saved pages ===== */
.pl-h { font-size: .95rem; margin: 4px 0 8px; display: flex; align-items: center; gap: 4px; }
.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.pl-tile { border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 6px; background: #fff; min-width: 0; }
.pl-info { min-width: 0; }
.pl-info strong { display: block; overflow-wrap: anywhere; }
.pl-acts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; }
.pl-acts .btn { padding: 3px 8px; }
.pl-thumb-btn { border: 0; padding: 0; background: none; cursor: zoom-in; display: block; width: 100%; }
.tabs-sm .tab { font-size: .88rem; padding: 6px 10px; }
.tpl-thumb { display: flex; flex-direction: column; gap: 3px; height: 92px; padding: 6px; border-radius: 6px; background: var(--soft, #f1f5f9); overflow: hidden; }
.tpl-thumb i { display: block; flex: none; border-radius: 2px; }
.tpl-thumb .tt-hero { height: 26px; background: color-mix(in srgb, var(--brand) 70%, #fff); }
.tpl-thumb .tt-strip { height: 6px; background: #b91c1c; }
.tpl-thumb .tt-head { height: 6px; width: 55%; margin: 2px auto; background: #94a3b8; }
.tpl-thumb .tt-text { height: 10px; background: repeating-linear-gradient(#cbd5e1 0 2px, transparent 2px 4px); }
.tpl-thumb .tt-img { height: 16px; background: #cbd5e1; }
.tpl-thumb .tt-imgtext { height: 14px; display: flex; gap: 3px; }
.tpl-thumb .tt-imgtext.r { flex-direction: row-reverse; }
.tpl-thumb .tt-imgtext b { flex: 0 0 40%; background: #cbd5e1; border-radius: 2px; }
.tpl-thumb .tt-imgtext span { flex: 1; background: repeating-linear-gradient(#cbd5e1 0 2px, transparent 2px 4px); }
.tpl-thumb .tt-grid, .tpl-thumb .tt-cols { height: 12px; display: flex; gap: 3px; }
.tpl-thumb .tt-grid b, .tpl-thumb .tt-cols b { flex: 1; background: #e2e8f0; border: 1px solid #cbd5e1; border-radius: 2px; }
.tpl-thumb .tt-faq { height: 12px; background: repeating-linear-gradient(#94a3b8 0 2px, transparent 2px 5px); width: 80%; }
.tpl-thumb .tt-cta { height: 10px; width: 60%; margin: 1px auto; background: color-mix(in srgb, var(--accent) 60%, #fff); }
.tpl-thumb .tt-form { height: 14px; width: 70%; margin: 0 auto; border: 1px solid #94a3b8; background: #fff; }
@media (max-width: 720px) { .pl-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }
/* 2.17.0 import preview */
.kv .kv-row { display: contents; }
ul.tight { margin: 0; padding-left: 18px; }

/* ---------- Custom drop-down (2.18.0): our own picker instead of the browser's <select> ---------- */
select.csel-native { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; border: 0 !important; opacity: 0 !important; pointer-events: none !important; clip-path: inset(50%) !important; overflow: hidden !important; }
.csel-btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; cursor: pointer; line-height: 1.3; }
.csel-btn[hidden] { display: none !important; }
.csel-btn:disabled { cursor: not-allowed; }
.csel-btn .csel-val { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.csel-btn.csel-empty .csel-val { color: var(--muted); }
.csel-btn .csel-car { flex: none; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin: -4px 2px 0 0; }
.csel-ov { position: fixed; inset: 0; z-index: 1500; background: rgba(15, 23, 42, .45); display: flex; align-items: center; justify-content: center; padding: 16px 12px; animation: fade .12s; }
.csel-pop { background: #fff; width: 100%; max-width: 420px; max-height: min(80vh, 640px); border-radius: 12px; box-shadow: var(--shadow-lg, 0 12px 32px rgba(15, 23, 42, .3)); display: flex; flex-direction: column; overflow: hidden; color: var(--text); }
.csel-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 10px 12px 16px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 1.02rem; }
.csel-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.csel-x { flex: none; background: none; border: 0; font-size: 1.1rem; line-height: 1; padding: 6px 8px; border-radius: 6px; cursor: pointer; color: var(--muted); }
.csel-x:hover { background: rgba(15, 23, 42, .06); }
.csel-sbox { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.csel-sbox input.csel-srch { min-height: 40px; padding-left: 34px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Ccircle cx='7.5' cy='7.5' r='5.5'/%3E%3Cpath d='M12 12l5 5'/%3E%3C/svg%3E") 10px 50% no-repeat; }
.csel-list { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; flex: 1 1 auto; }
.csel-opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 11px 16px; border: 0; border-bottom: 1px solid #eef2f6; background: #fff; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.csel-opt:last-child { border-bottom: 0; }
.csel-opt:hover, .csel-opt.csel-hl { background: var(--soft, #f1f5f9); }
.csel-opt[aria-selected=true] { font-weight: 600; background: color-mix(in srgb, var(--brand) 9%, #fff); }
.csel-opt.csel-dis { opacity: .45; cursor: not-allowed; }
.csel-opt:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.csel-tx { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.csel-tx mark { background: #fde68a; color: inherit; padding: 0; border-radius: 2px; }
.csel-rad { flex: none; width: 20px; height: 20px; border: 2px solid #94a3b8; border-radius: 50%; position: relative; }
.csel-opt[aria-selected=true] .csel-rad { border-color: var(--brand); }
.csel-opt[aria-selected=true] .csel-rad::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--brand); }
.csel-grp { padding: 10px 16px 6px; font-size: .78em; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: var(--soft2, #f8fafc); border-bottom: 1px solid #eef2f6; }
.csel-none { padding: 22px 16px; text-align: center; color: var(--muted); }
.csel-cnt { padding: 6px 16px; font-size: .8em; color: var(--muted); border-top: 1px solid var(--line); background: var(--soft2, #f8fafc); }
