/* =====================================================================
   VIYA — black & gold theme
   Change the brand colours here.
   ===================================================================== */
/* Fonts are bundled in assets/fonts so the app works offline */
@font-face { font-family: 'Cinzel'; font-style: normal; font-weight: 500; font-display: swap; src: url('../assets/fonts/cinzel-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cinzel'; font-style: normal; font-weight: 600; font-display: swap; src: url('../assets/fonts/cinzel-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cinzel'; font-style: normal; font-weight: 700; font-display: swap; src: url('../assets/fonts/cinzel-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../assets/fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('../assets/fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('../assets/fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('../assets/fonts/inter-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 800; font-display: swap; src: url('../assets/fonts/inter-latin-800-normal.woff2') format('woff2'); }

:root {
  --gold: #c9a227;
  --gold-light: #ecd182;
  --gold-deep: #9c7414;
  --gold-grad: linear-gradient(135deg, #f7e08f 0%, #d9ac2f 45%, #a57a12 100%);
  --ink: #12100c;
  --ink-2: #1c1914;
  --ink-3: #2a261e;
  --bg: #f7f4ec;
  --card: #ffffff;
  --text: #1a1712;
  --muted: #6e675a;
  --border: #e9e2d2;
  --soft: #faf6ea;
  --error: #c62828;
  --error-soft: #fdeeee;
  --success: #2e7d32;
  --success-soft: #edf7ee;
  --warn: #9a6200;
  --warn-soft: #fff6e0;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(18, 16, 12, .05), 0 8px 24px rgba(18, 16, 12, .07);
  --serif: 'Cinzel', Georgia, 'Times New Roman', serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--text); background: var(--bg); line-height: 1.5; font-size: 15px; }
a { color: var(--gold-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.01em; }
h1 { font-size: 1.65rem; }
h2 { font-size: 1.2rem; }
img { max-width: 100%; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.center { text-align: center; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(201, 162, 39, .55); outline-offset: 2px; }
.gold-text { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ic.xl { width: 44px; height: 44px; stroke-width: 1.4; }
.logo-mark { width: 34px; height: 34px; object-fit: contain; }
.wordmark { font-family: var(--serif); font-weight: 700; letter-spacing: .18em; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wordmark.xl { font-size: clamp(2rem, 7vw, 3.4rem); letter-spacing: .16em; }

/* ================= Splash ================= */
#splash { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #2a2213 0%, var(--ink) 60%); transition: opacity .6s ease, visibility .6s; }
#splash.hide { opacity: 0; visibility: hidden; }
.splash-inner { text-align: center; }
.splash-logo { width: 150px; height: 150px; animation: rise .9s ease-out both, glow 2.4s ease-in-out infinite alternate; }
.splash-name { font-family: var(--serif); font-size: 1.9rem; font-weight: 700; letter-spacing: .32em; margin: 18px 0 18px .32em; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; animation: rise .9s .2s ease-out both; }
.splash-line { width: 140px; height: 2px; margin: 0 auto; background: rgba(201, 162, 39, .2); border-radius: 2px; overflow: hidden; }
.splash-line span { display: block; height: 100%; width: 40%; background: var(--gold-grad); animation: load 1.2s ease-in-out infinite; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes glow { from { filter: drop-shadow(0 0 6px rgba(232, 199, 102, .25)); } to { filter: drop-shadow(0 0 22px rgba(232, 199, 102, .55)); } }
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* ================= Public layout ================= */
#app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar, .appbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(201, 162, 39, .22); }
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: #d8cfb8; font-weight: 500; }
.back-link .ic { width: 18px; height: 18px; }
.page { flex: 1; padding: 32px 16px 56px; }
.page-dark { background: radial-gradient(ellipse at 50% -10%, #3a2d10 0%, rgba(18, 16, 12, 0) 55%), radial-gradient(circle at 90% 80%, #251d0c 0%, rgba(18, 16, 12, 0) 40%), var(--ink); color: #f1ead8; }
.container { width: 100%; max-width: 720px; margin: 0 auto; }
.page-dark .container { max-width: 1060px; }
.footer { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; align-items: center; padding: 18px 20px; color: #a79e88; font-size: .84rem; background: var(--ink); border-top: 1px solid rgba(201, 162, 39, .15); }
.footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.footer a { color: #cfc5ad; }

/* Welcome */
.hero { text-align: center; padding: 8px 0 36px; }
.hero-logo .logo-mark { width: 132px; height: 132px; }
.float { animation: float 5s ease-in-out infinite, glow 3s ease-in-out infinite alternate; }
@keyframes float { 50% { transform: translateY(-8px); } }
.hero h1 { margin: 14px 0 6px; }
.hero-tag { font-family: var(--serif); letter-spacing: .14em; text-transform: uppercase; font-size: .8rem; color: var(--gold-light); margin: 0 0 16px; }
.lead { font-size: 1.05rem; color: var(--muted); max-width: 560px; margin: 0 auto; }
.page-dark .lead { color: #c9bfa7; }
.section-title { text-align: center; font-size: .82rem; text-transform: uppercase; letter-spacing: .16em; color: var(--gold-light); font-weight: 600; margin-bottom: 18px; display: flex; align-items: center; gap: 14px; }
.section-title::before, .section-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(201, 162, 39, .45), transparent); }

.role-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.role-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-align: left; padding: 24px; border-radius: var(--radius); border: 1px solid rgba(201, 162, 39, .22); background: linear-gradient(160deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02)); color: #f1ead8; cursor: pointer; font: inherit; transition: transform .2s, border-color .2s, box-shadow .2s, background .2s; backdrop-filter: blur(6px); }
.role-card:hover { transform: translateY(-3px); border-color: rgba(201, 162, 39, .5); }
.role-card.selected { border-color: var(--gold); background: linear-gradient(160deg, rgba(201, 162, 39, .18), rgba(201, 162, 39, .04)); box-shadow: 0 0 0 1px var(--gold), 0 16px 40px rgba(201, 162, 39, .18); }
.role-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--gold-grad); color: var(--ink); }
.role-icon .ic { width: 26px; height: 26px; }
.role-title { font-family: var(--serif); font-weight: 700; font-size: 1.25rem; letter-spacing: .06em; color: #fff; }
.role-desc { color: #c9bfa7; font-size: .93rem; }
.role-points { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.role-points span { font-size: .74rem; padding: 4px 10px; border-radius: 999px; background: rgba(201, 162, 39, .14); color: var(--gold-light); border: 1px solid rgba(201, 162, 39, .25); }
.role-check { position: absolute; top: 16px; right: 16px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-grad); color: var(--ink); opacity: 0; transform: scale(.5); transition: .2s; }
.role-check .ic { width: 15px; height: 15px; stroke-width: 3; }
.role-card.selected .role-check { opacity: 1; transform: scale(1); }
.cta { text-align: center; margin-top: 30px; }
.cta-note { color: #a79e88; margin: 0 0 14px; }
.cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.legal-note { text-align: center; color: #8f8670; font-size: .84rem; margin-top: 20px; }
.page-dark a { color: var(--gold-light); }

/* ================= Buttons ================= */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 12px; border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; transition: transform .1s, filter .15s, background .15s, border-color .15s, opacity .15s; text-decoration: none !important; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn .ic { width: 18px; height: 18px; }
.btn-gold, .btn-primary { background: var(--gold-grad); color: var(--ink); box-shadow: 0 6px 18px rgba(201, 162, 39, .28); }
.btn-gold:not(:disabled):hover, .btn-primary:not(:disabled):hover { filter: brightness(1.06); }
.btn-secondary { background: var(--ink); color: var(--gold-light); }
.btn-ghost { background: rgba(255, 255, 255, .06); color: #f1ead8; border-color: rgba(201, 162, 39, .45); }
.btn-ghost:not(:disabled):hover { background: rgba(201, 162, 39, .12); }
.btn-outline { background: var(--card); color: var(--text); border-color: var(--border); }
.btn-outline:not(:disabled):hover { border-color: var(--gold); }
.btn-danger { background: var(--card); color: var(--error); border-color: #f2c7c7; }
.btn-danger:hover { background: var(--error-soft); }
.btn-lg { padding: 14px 26px; font-size: 1rem; min-width: 190px; }
.btn-sm { padding: 8px 14px; font-size: .88rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-inline { border-radius: 0 12px 12px 0; padding: 0 16px; min-width: 116px; box-shadow: none; }
.link-btn { background: none; border: 0; padding: 0; color: var(--gold-deep); font: inherit; font-weight: 600; cursor: pointer; font-size: .88rem; display: inline-flex; align-items: center; gap: 6px; }
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: transparent; border: 0; color: inherit; cursor: pointer; }
.icon-btn:hover { background: rgba(201, 162, 39, .12); text-decoration: none; }

/* ================= Cards & forms ================= */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.form-head { margin-bottom: 22px; }
.form-head h1 { font-family: var(--serif); letter-spacing: .02em; }
.login-logo { width: 84px; height: 84px; margin-bottom: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 8px; border-radius: 999px; background: var(--ink); color: var(--gold-light); font-weight: 600; font-size: .84rem; margin-bottom: 12px; }
.pill .ic { width: 17px; height: 17px; }
.form-section { font-size: .76rem; text-transform: uppercase; letter-spacing: .12em; color: var(--gold-deep); margin: 28px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); font-weight: 700; }
.form > .form-section:first-child, section[data-step] > .form-section:first-child, .card > .form-section:first-child { margin-top: 0; }

.field { margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
.field label, .field legend { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 7px; padding: 0; }
.req { color: var(--error); margin-left: 2px; }
.opt { color: var(--muted); font-weight: 400; font-size: .8rem; margin-left: 4px; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input:not([type]), select, textarea {
  width: 100%; padding: 12px 13px; border: 1.5px solid var(--border); border-radius: 12px; font: inherit; color: var(--text); background: #fff; transition: border-color .15s, box-shadow .15s; min-height: 46px;
}
textarea { resize: vertical; min-height: 84px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(201, 162, 39, .16); }
input[readonly] { background: var(--soft); }
input[type=file] { width: 100%; padding: 12px; border: 1.5px dashed #d9cfb5; border-radius: 12px; background: var(--soft); font: inherit; }
input[type=range] { width: 100%; accent-color: var(--gold); }
.input-group { display: flex; align-items: stretch; }
.input-group input { border-radius: 0; flex: 1; min-width: 0; }
.input-group input:first-child { border-radius: 12px 0 0 12px; }
.input-group input:last-child { border-radius: 0 12px 12px 0; }
.input-group .prefix { display: grid; place-items: center; padding: 0 12px; border: 1.5px solid var(--border); border-right: 0; border-radius: 12px 0 0 12px; background: var(--soft); color: var(--muted); font-weight: 600; }
.hint { margin: 6px 0 0; font-size: .8rem; color: var(--muted); }
.hint-top { margin: -2px 0 10px; }
.hint.warn { background: var(--warn-soft); color: var(--warn); padding: 10px 12px; border-radius: 10px; }
.error { margin: 6px 0 0; font-size: .82rem; color: var(--error); font-weight: 500; }
.error:empty { display: none; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--error); background: var(--error-soft); }
.field.invalid .prefix { border-color: var(--error); }

.radio-row { display: flex; gap: 8px; flex-wrap: wrap; }
.field .radio, .radio-row .radio { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer; font-weight: 500; margin: 0; background: #fff; transition: .15s; user-select: none; }
.radio input { accent-color: var(--gold-deep); margin: 0; }
.radio:has(input:checked) { border-color: var(--gold); background: #fbf3d9; }
.chips-row .radio { border-radius: 999px; padding: 8px 16px; }
.chips-row .radio input { position: absolute; opacity: 0; pointer-events: none; }
.chips-row .radio:has(input:checked) { background: var(--ink); color: var(--gold-light); border-color: var(--ink); }
.chips-row .radio:has(input:focus-visible) { outline: 3px solid rgba(201, 162, 39, .55); }
.sizes .radio { min-width: 54px; justify-content: center; padding: 10px 12px; border-radius: 12px; font-weight: 700; }
.field.invalid .radio { border-color: var(--error); }
.check { display: flex !important; align-items: flex-start; gap: 10px; font-weight: 400 !important; cursor: pointer; }
.check input { width: 19px; height: 19px; margin-top: 2px; accent-color: var(--gold-deep); flex-shrink: 0; }
.field-check.invalid .check { color: var(--error); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1.2fr 1.2fr; gap: 0 16px; }
.otp-row { background: var(--soft); padding: 14px 14px 2px; border-radius: 14px; margin: -4px 0 16px; border: 1px solid var(--border); }
.verified-badge { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: -6px 0 16px; padding: 10px 14px; background: var(--success-soft); color: var(--success); border-radius: 12px; font-weight: 600; font-size: .9rem; }
.form-foot { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.form-foot .btn-block { margin: 8px 0 14px; }
.derived { background: var(--soft); border: 1px solid var(--border); padding: 10px 14px; border-radius: 12px; margin: -6px 0 16px; font-size: .9rem; }
.note { background: var(--warn-soft); color: var(--warn); padding: 10px 14px; border-radius: 12px; font-size: .88rem; }
.inline-form { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--border); }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* Stepper */
.stepper { list-style: none; display: flex; padding: 0; margin: 0 0 18px; }
.stepper li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; color: var(--muted); font-size: .8rem; font-weight: 600; }
.stepper li::before { content: ""; position: absolute; top: 16px; left: -50%; width: 100%; height: 2px; background: var(--border); }
.stepper li:first-child::before { display: none; }
.stepper .dot { position: relative; z-index: 1; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 2px solid var(--border); font-weight: 700; }
.stepper li.active { color: var(--text); }
.stepper li.active .dot { border-color: var(--gold); color: var(--gold-deep); box-shadow: 0 0 0 4px rgba(201, 162, 39, .15); }
.stepper li.done .dot { background: var(--ink); border-color: var(--ink); color: var(--gold-light); }
.stepper li.done::before, .stepper li.active::before { background: var(--gold); }
.step-nav { display: flex; justify-content: space-between; gap: 12px; margin: 24px 0 14px; padding-top: 20px; border-top: 1px solid var(--border); }
.step-nav [data-next], .step-nav [data-submit] { margin-left: auto; }
.review { background: var(--soft); border-radius: 14px; padding: 16px; margin-bottom: 20px; }
.review h3 { display: flex; justify-content: space-between; font-size: .95rem; margin: 18px 0 8px; }
.review h3:first-child { margin-top: 0; }
.review dl, .kv { margin: 0; display: grid; gap: 8px; }
.review dl div, .kv div { display: grid; grid-template-columns: 140px 1fr; gap: 10px; font-size: .9rem; }
.review dt, .kv dt { color: var(--muted); }
.review dd, .kv dd { margin: 0; word-break: break-word; }

/* Segmented control */
.seg { display: flex; gap: 4px; padding: 4px; background: #efe9da; border-radius: 14px; margin-bottom: 20px; }
.seg-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 8px; border: 0; border-radius: 10px; background: transparent; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; font-size: .9rem; text-decoration: none !important; white-space: nowrap; }
.seg-btn .ic { width: 18px; height: 18px; }
.seg-btn.active { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.seg.small { margin: 0; display: inline-flex; }
.seg.small .seg-btn { padding: 7px 14px; font-size: .85rem; }

/* Results */
.result { padding: 40px 24px; }
.result .lead { margin-bottom: 14px; }
.result-icon { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 16px; font-size: 2rem; }
.result-icon .ic { width: 38px; height: 38px; stroke-width: 2.4; }
.result-icon.ok { background: var(--gold-grad); color: var(--ink); box-shadow: 0 10px 30px rgba(201, 162, 39, .35); }
.result-icon.pending { background: var(--warn-soft); }
.ref { margin: 8px 0; }
.status-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.status-chip.pending, .status-chip.submitted, .status-chip.placed, .status-chip.unpaid { background: var(--warn-soft); color: var(--warn); }
.status-chip.active, .status-chip.accepted, .status-chip.delivered, .status-chip.paid, .status-chip.confirmed { background: var(--success-soft); color: var(--success); }
.status-chip.quoted, .status-chip.in_production, .status-chip.shipped { background: #fbf0cf; color: #7a5a06; }
.status-chip.rejected, .status-chip.declined { background: var(--error-soft); color: var(--error); }
.demo-note { background: var(--warn-soft); color: var(--warn); padding: 10px 14px; border-radius: 12px; font-size: .85rem; }
.empty { padding: 32px 20px; text-align: center; color: var(--muted); }
.empty.big { display: grid; justify-items: center; gap: 8px; padding: 48px 20px; }
.empty.big .ic { color: var(--gold); }

/* Admin */
.seg-wide { flex-wrap: wrap; }
.admin-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.admin-top h3 { margin: 0; }
.admin-top p { margin: 2px 0 0; font-size: .84rem; }
.design-admin { display: grid; grid-template-columns: 200px 1fr; gap: 20px; }
.design-thumb { background: var(--soft); border-radius: 14px; padding: 10px; }
.prompt { font-style: italic; color: var(--muted); }
.quote-form { display: grid; grid-template-columns: 160px 1fr auto; gap: 10px; align-items: end; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
.quote-form .field { margin: 0; }
.order-lines { list-style: none; padding: 0; margin: 0 0 8px; }
.order-lines li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: .9rem; }
.order-total { margin: 4px 0; }
.badge-count { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--gold-grad); color: var(--ink); font-size: .7rem; font-weight: 800; display: grid; place-items: center; }
.badge-count.static { position: static; display: inline-grid; margin-left: 4px; }

.prose h1 { font-family: var(--serif); }
.prose h2 { font-size: 1.05rem; margin-top: 24px; }
.prose p, .prose li { color: #3d382e; }
.prose ul { padding-left: 20px; }

/* Toasts */
#toasts { position: fixed; top: 72px; right: 16px; left: 16px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; z-index: 500; pointer-events: none; }
.toast { pointer-events: auto; max-width: 380px; padding: 12px 16px; border-radius: 14px; background: var(--ink); color: #f1ead8; box-shadow: 0 12px 32px rgba(0, 0, 0, .25); font-size: .9rem; animation: tin .2s ease-out; transition: opacity .3s, transform .3s; border: 1px solid rgba(201, 162, 39, .3); }
.toast a { color: var(--gold-light); font-weight: 600; }
.toast small { opacity: .75; }
.toast .mono { color: var(--gold-light); font-size: 1.05rem; }
.toast-error { background: var(--error); border-color: transparent; color: #fff; }
.toast-success { background: #1f3b22; border-color: rgba(129, 199, 132, .4); }
.toast.out { opacity: 0; transform: translateY(-6px); }
@keyframes tin { from { opacity: 0; transform: translateY(-6px); } }

/* ================= App shell ================= */
#app.in-app { padding-bottom: calc(76px + var(--safe-b)); }
.appbar { padding: 10px 16px; }
.appbar .logo-mark { width: 30px; height: 30px; }
.appbar-actions { display: flex; align-items: center; gap: 6px; color: #f1ead8; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-grad); color: var(--ink); font-weight: 800; text-decoration: none !important; }
.avatar.xl { width: 64px; height: 64px; font-size: 1.6rem; flex-shrink: 0; }
.app-main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 20px 16px 24px; }
.app-main.wide { max-width: 1080px; }
.screen-title { font-family: var(--serif); font-size: 1.45rem; letter-spacing: .02em; margin-bottom: 16px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: space-around; background: rgba(18, 16, 12, .97); backdrop-filter: blur(10px); border-top: 1px solid rgba(201, 162, 39, .25); padding: 6px 8px calc(6px + var(--safe-b)); }
.tab-item { flex: 1; max-width: 140px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px; border-radius: 12px; color: #9d9480; font-size: .72rem; font-weight: 600; text-decoration: none !important; }
.tab-item .ic { width: 23px; height: 23px; }
.tab-item.active { color: var(--gold-light); }
.tab-item.active .ic { filter: drop-shadow(0 0 8px rgba(232, 199, 102, .5)); }

/* ================= Business ================= */
.hello { margin-bottom: 14px; }
.hello p { margin: 0; }
.hello h1 { font-family: var(--serif); margin: 2px 0 6px; }
.gst-line { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--ink); color: #f1ead8; border-radius: 16px; padding: 14px; display: grid; gap: 4px; border: 1px solid rgba(201, 162, 39, .25); }
.stat span { font-size: .74rem; color: #a79e88; }
.stat strong { font-size: 1.2rem; color: var(--gold-light); }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 22px; }
.quick-btn { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--text); font-weight: 700; text-decoration: none !important; }
.quick-btn .ic { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--gold-grad); color: var(--ink); }
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: 6px; background: var(--card); border: 1.5px solid var(--border); border-radius: 12px; padding: 0 10px; color: var(--muted); flex: 1; max-width: 260px; }
.search input { border: 0; min-height: 38px; padding: 6px 0; box-shadow: none !important; background: transparent; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none !important; }
.list-row:last-child { border-bottom: 0; }
a.list-row:hover { background: var(--soft); }
.list-row.static { padding: 12px 0; }
.lr-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: #f4ecd4; color: var(--gold-deep); flex-shrink: 0; overflow: hidden; }
.lr-icon img { width: 100%; height: 100%; object-fit: cover; }
.lr-main { flex: 1; min-width: 0; display: grid; }
.lr-main strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-main small { color: var(--muted); font-size: .8rem; }
.lr-end { display: grid; justify-items: end; gap: 4px; }
.profile-card { display: flex; align-items: center; gap: 16px; }
.profile-card h2 { margin: 0; }
.profile-card p { margin: 2px 0 0; }

/* Invoice form */
.inv-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.inv-no { font-size: 1.15rem; font-weight: 700; }
.items { display: grid; gap: 12px; margin-bottom: 12px; }
.item-row { position: relative; display: grid; grid-template-columns: 2.4fr .9fr .7fr .8fr 1fr .8fr 1fr 36px; gap: 8px; align-items: end; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--soft); }
.item-row label { display: block; font-size: .72rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.item-row input, .item-row select { min-height: 40px; padding: 8px 10px; border-radius: 10px; }
.item-row input.bad { border-color: var(--error); background: var(--error-soft); }
.ir-amt output { display: block; padding: 9px 0; font-weight: 700; white-space: nowrap; }
.ir-del { color: var(--muted); }
.row-err { grid-column: 1 / -1; margin: 0; }
.totals { margin: 0; display: grid; gap: 6px; }
.totals div { display: flex; justify-content: space-between; gap: 10px; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; font-weight: 600; }
.totals .grand { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 4px; font-size: 1.2rem; }
.totals .grand dt { color: var(--text); font-weight: 700; }
.totals .grand dd { font-weight: 800; }
.words { margin: 10px 0 0; font-size: .85rem; color: var(--muted); font-style: italic; }
.totals-card { background: var(--ink); color: #f1ead8; border-color: rgba(201, 162, 39, .3); }
.totals-card .totals dt, .totals-card .words { color: #a79e88; }
.totals-card .totals .grand { border-color: rgba(201, 162, 39, .3); }
.totals-card .totals .grand dt { color: #f1ead8; }
.totals-card .totals .grand dd { color: var(--gold-light); }

/* Invoice document (also used for printing) */
.doc-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.invoice-doc { background: #fff; color: #1a1712; border-radius: 6px; padding: 36px; box-shadow: var(--shadow); border-top: 6px solid var(--gold); font-size: .9rem; }
.doc-head { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 2px solid #1a1712; }
.doc-head h2 { font-family: var(--serif); font-size: 1.4rem; margin-bottom: 6px; }
.doc-head p { margin: 2px 0; }
.doc-title { text-align: right; }
.doc-title h1 { font-family: var(--serif); font-size: 1.3rem; letter-spacing: .1em; color: var(--gold-deep); }
.doc-title p { margin: 2px 0; }
.paid-stamp { display: inline-block; margin-top: 8px !important; padding: 4px 14px; border: 3px solid var(--success); color: var(--success); font-weight: 900; letter-spacing: .2em; transform: rotate(-6deg); border-radius: 6px; }
.doc-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 16px 0; }
.doc-parties h3 { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 4px; }
.doc-parties p { margin: 2px 0; }
.table-wrap { overflow-x: auto; }
.doc-table, .slab { width: 100%; border-collapse: collapse; }
.doc-table th, .slab th { background: #1a1712; color: #f1ead8; text-align: left; padding: 8px 10px; font-size: .78rem; font-weight: 600; }
.doc-table td, .slab td { padding: 9px 10px; border-bottom: 1px solid #ece6d6; vertical-align: top; }
.r { text-align: right !important; }
.doc-bottom { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; margin-top: 18px; }
.doc-notes p { margin: 0 0 12px; }
.slab { margin-bottom: 12px; font-size: .82rem; }
.slab th { background: #efe9da; color: #1a1712; }
.doc-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-top: 28px; padding-top: 14px; border-top: 1px solid #ece6d6; font-size: .8rem; color: var(--muted); }
.sign { text-align: right; color: #1a1712; }
.made-with { text-align: center; font-size: .72rem; color: #b3aa94; letter-spacing: .12em; margin: 18px 0 0; text-transform: uppercase; }
.purchase-view { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 24px; }
.scan-img { border-radius: 12px; border: 1px solid var(--border); width: 100%; }

/* Scan */
.scan-start { text-align: center; padding: 40px 24px; }
.scan-hero { width: 96px; height: 96px; border-radius: 28px; margin: 0 auto 16px; display: grid; place-items: center; background: var(--ink); color: var(--gold-light); box-shadow: 0 12px 30px rgba(18, 16, 12, .25); }
.scan-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 22px 0 14px; }
.scan-progress { display: grid; grid-template-columns: 140px 1fr; gap: 20px; align-items: center; }
.scan-progress img { width: 140px; height: 180px; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); }
.bar { height: 8px; background: #efe9da; border-radius: 6px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--gold-grad); transition: width .3s; }
.review-head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.review-head img { width: 64px; height: 84px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.review-head h2 { margin: 0; }
.review-head p { margin: 2px 0 0; }
.raw { margin: 6px 0 4px; font-size: .85rem; }
.raw pre { white-space: pre-wrap; background: var(--soft); padding: 12px; border-radius: 10px; max-height: 240px; overflow: auto; font-size: .78rem; }

/* ================= Customer ================= */
.home-hero { position: relative; display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 8px; padding: 24px; border-radius: 24px; background: radial-gradient(circle at 85% 30%, #3b2e10 0%, rgba(18, 16, 12, 0) 55%), var(--ink); color: #f1ead8; overflow: hidden; margin-bottom: 16px; border: 1px solid rgba(201, 162, 39, .3); }
.hh-hi { margin: 0; color: #c9bfa7; }
.home-hero h1 { font-family: var(--serif); font-size: clamp(1.6rem, 5vw, 2.3rem); margin: 4px 0 8px; color: #fff; }
.home-hero p { color: #c9bfa7; margin: 0 0 12px; }
.hh-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.hh-chips span { font-size: .74rem; padding: 4px 10px; border-radius: 999px; background: rgba(201, 162, 39, .15); color: var(--gold-light); border: 1px solid rgba(201, 162, 39, .3); }
.hh-art { filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .5)); transform: rotate(4deg); }
.alert-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: #fbf0cf; color: #5c4405; margin-bottom: 16px; text-decoration: none !important; border: 1px solid #ecd182; }
.alert-card span { flex: 1; display: grid; }
.alert-card small { color: #7a5a06; }
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.feature-tile { position: relative; display: grid; gap: 4px; padding: 18px; border-radius: 20px; color: #fff; text-decoration: none !important; overflow: hidden; min-height: 140px; align-content: end; }
.feature-tile::after { content: ""; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.ft-ar { background: linear-gradient(140deg, #1c1914, #3a2d10); border: 1px solid rgba(201, 162, 39, .35); }
.ft-ai { background: linear-gradient(140deg, #a57a12, #d9ac2f 55%, #f0d27a); color: var(--ink); }
.ft-icon { position: absolute; top: 16px; left: 18px; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .14); }
.ft-ai .ft-icon { background: rgba(18, 16, 12, .12); }
.feature-tile strong { font-family: var(--serif); font-size: 1.1rem; letter-spacing: .03em; }
.feature-tile small { opacity: .85; font-size: .8rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin: 8px 0 12px; }
.section-head h2 { font-family: var(--serif); font-size: 1.15rem; margin: 0; letter-spacing: .02em; }
.section-head a { font-weight: 600; font-size: .88rem; }
.h-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 200px); gap: 12px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 20px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.h-scroll > * { scroll-snap-align: start; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.product-card { display: flex; flex-direction: column; border-radius: 18px; background: var(--card); border: 1px solid var(--border); overflow: hidden; color: var(--text); text-decoration: none !important; transition: transform .15s, box-shadow .15s; box-shadow: var(--shadow); }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(18, 16, 12, .12); }
.pc-img { position: relative; background: radial-gradient(circle at 50% 40%, #fff 0%, #f1ebdd 100%); padding: 14px 14px 6px; }
.pc-badge { position: absolute; top: 10px; left: 10px; z-index: 1; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 4px 8px; border-radius: 8px; background: var(--ink); color: var(--gold-light); }
.pc-badge.static { position: static; display: inline-block; margin-bottom: 8px; }
.pc-body { display: grid; gap: 3px; padding: 10px 12px 14px; }
.pc-tag { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold-deep); font-weight: 700; }
.pc-name { font-size: .95rem; line-height: 1.3; }
.pc-price { font-weight: 800; }
.pc-price s, .pd-price s { color: #a39b88; font-weight: 400; font-size: .85em; margin-left: 4px; }
.pc-price em, .pd-price em { color: var(--success); font-style: normal; font-size: .78em; font-weight: 700; margin-left: 4px; }
.pc-swatches { display: flex; gap: 4px; margin-top: 4px; }
.pc-swatches i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); }
.shirt-svg { display: block; width: 100%; height: auto; }
.chip-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; scrollbar-width: none; }
.filter-chip { flex-shrink: 0; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--card); color: var(--text); font-weight: 600; font-size: .86rem; text-decoration: none !important; cursor: pointer; font-family: inherit; }
.filter-chip.active { background: var(--ink); color: var(--gold-light); border-color: var(--ink); }
.filter-chip.sm { padding: 6px 12px; font-size: .8rem; font-weight: 500; }
.sort { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--muted); }
.sort select { min-height: 38px; padding: 6px 10px; width: auto; }
.banner-ai { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 18px; background: var(--ink); color: #f1ead8; text-decoration: none !important; border: 1px solid rgba(201, 162, 39, .35); }
.banner-ai span { flex: 1; }
.banner-ai .ic:first-child { color: var(--gold-light); }
.back-inline { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 12px; font-weight: 600; }
.pd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.pd-img { background: radial-gradient(circle at 50% 40%, #fff 0%, #ece4d2 100%); border-radius: 24px; padding: 28px; position: sticky; top: 80px; align-self: start; }
.pd-info h1 { font-family: var(--serif); font-size: 1.6rem; }
.pd-info h3 { font-size: .95rem; margin: 18px 0 10px; }
.pd-price { font-size: 1.5rem; font-weight: 800; margin: 4px 0 0; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatches.center { justify-content: center; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 2px solid #fff; background: var(--sw); box-shadow: 0 0 0 1.5px var(--border); cursor: pointer; padding: 0; transition: .15s; }
.swatch.active { box-shadow: 0 0 0 2.5px var(--gold); transform: scale(1.08); }
.qty-row { display: flex; align-items: center; gap: 14px; margin: 18px 0; font-weight: 600; }
.stepper-input { display: inline-flex; align-items: center; border: 1.5px solid var(--border); border-radius: 12px; overflow: hidden; background: #fff; }
.stepper-input button { width: 40px; height: 40px; border: 0; background: transparent; font-size: 1.2rem; cursor: pointer; color: var(--text); }
.stepper-input output { min-width: 32px; text-align: center; font-weight: 700; }
.stepper-input.sm button { width: 32px; height: 32px; }
.pd-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pd-actions .btn-lg { min-width: 0; }
.pd-points { color: var(--muted); font-size: .88rem; padding-left: 18px; margin-top: 18px; }
.bag-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.bag-line { display: flex; gap: 12px; align-items: center; padding: 14px; border-bottom: 1px solid var(--border); }
.bag-line:last-child { border-bottom: 0; }
.bl-img { width: 72px; flex-shrink: 0; background: var(--soft); border-radius: 12px; padding: 6px; }
.bl-main { flex: 1; display: grid; gap: 2px; min-width: 0; }
.bl-main small { color: var(--muted); }
.bl-main span { font-weight: 700; }
.bl-end { display: grid; justify-items: end; gap: 6px; }
.req-row { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.req-row:last-child { border-bottom: 0; }
.req-img { width: 92px; flex-shrink: 0; background: var(--soft); border-radius: 12px; padding: 6px; }
.req-main { flex: 1; display: grid; gap: 4px; align-content: start; justify-items: start; }
.quote { margin: 4px 0 0; }

/* ================= AR Try-On ================= */
.tryon { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.stage { position: relative; aspect-ratio: 3 / 4; max-height: 76vh; width: 100%; border-radius: 24px; overflow: hidden; background: radial-gradient(circle at 50% 30%, #2f2512 0%, var(--ink) 70%); border: 1px solid rgba(201, 162, 39, .35); }
.stage video { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; touch-action: none; }
.stage-intro { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; padding: 24px; color: #f1ead8; gap: 6px; }
.si-icon { width: 92px; height: 92px; border-radius: 28px; display: grid; place-items: center; background: var(--gold-grad); color: var(--ink); margin-bottom: 8px; box-shadow: 0 12px 40px rgba(201, 162, 39, .35); }
.stage-intro h2 { font-family: var(--serif); font-size: 1.5rem; color: #fff; }
.stage-intro p { color: #c9bfa7; max-width: 320px; margin: 0 0 8px; }
.si-btns { display: grid; gap: 10px; margin: 10px 0; }
.si-preview { background: rgba(201, 162, 39, .14); border: 1px solid rgba(201, 162, 39, .35); color: var(--gold-light) !important; padding: 8px 12px; border-radius: 12px; font-size: .85rem; }
.btn.armed { background: var(--error); color: #fff; border-color: var(--error); }
.si-note { font-size: .8rem; color: #a79e88 !important; }
.stage-hint { position: absolute; top: 58px; left: 50%; transform: translateX(-50%); background: rgba(18, 16, 12, .8); color: var(--gold-light); padding: 8px 14px; border-radius: 999px; font-size: .84rem; font-weight: 600; white-space: nowrap; border: 1px solid rgba(201, 162, 39, .35); }
.stage-loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--gold-light); background: rgba(18, 16, 12, .55); font-weight: 600; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(201, 162, 39, .25); border-top-color: var(--gold); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.stage-controls { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; justify-content: center; align-items: center; gap: 28px; }
.round-btn { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 0; background: rgba(18, 16, 12, .65); color: #fff; cursor: pointer; backdrop-filter: blur(6px); }
.round-btn.labelled { width: 58px; height: 58px; display: grid; place-content: center; justify-items: center; gap: 1px; font-size: .62rem; font-weight: 700; letter-spacing: .04em; color: var(--gold-light); border: 1px solid rgba(201, 162, 39, .45); }
.round-btn.labelled .ic { width: 22px; height: 22px; color: #fff; }
.cam-pick { margin: 6px 0 4px; background: rgba(255, 255, 255, .08); }
.cam-pick .seg-btn { color: #c9bfa7; }
.cam-pick .seg-btn.active { background: var(--gold-grad); color: var(--ink); }
.cam-label { position: absolute; top: 16px; left: 16px; background: rgba(18, 16, 12, .75); color: var(--gold-light); padding: 6px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700; border: 1px solid rgba(201, 162, 39, .35); }
.shutter { width: 70px; height: 70px; border-radius: 50%; border: 4px solid #fff; background: var(--gold-grad); cursor: pointer; box-shadow: 0 6px 20px rgba(0, 0, 0, .4); }
.shutter:active { transform: scale(.94); }
.tryon-panel { background: var(--card); border: 1px solid var(--border); border-radius: 24px; padding: 18px; box-shadow: var(--shadow); }
.tp-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.tp-head h2 { font-family: var(--serif); font-size: 1.1rem; margin: 0; }
.tryon-panel .swatches { margin-bottom: 14px; }
.thumbs { grid-auto-columns: 92px; margin-bottom: 12px; }
.thumb { display: grid; gap: 4px; padding: 6px; border-radius: 14px; border: 2px solid var(--border); background: var(--soft); cursor: pointer; font: inherit; }
.thumb span { font-size: .66rem; line-height: 1.2; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-align: center; }
.thumb.active { border-color: var(--gold); background: #fbf3d9; }
.sliders { display: grid; gap: 10px; }
.sliders label, .range-label { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 10px; font-size: .86rem; font-weight: 600; color: var(--muted); }
.range-label { margin: 14px 0 16px; grid-template-columns: 90px 1fr; }
.modal { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, .75); display: grid; place-items: center; padding: 16px; }
.modal-card { background: var(--card); border-radius: 20px; padding: 16px; max-width: 520px; width: 100%; }
.modal-card img { border-radius: 14px; width: 100%; max-height: 64vh; object-fit: contain; background: #000; }

/* ================= AI Design ================= */
.ai-hero { text-align: center; padding: 8px 0 18px; }
.ai-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: var(--ink); color: var(--gold-light); font-weight: 700; font-size: .82rem; }
.ai-badge .ic { width: 16px; height: 16px; }
.ai-hero h1 { font-family: var(--serif); font-size: clamp(1.5rem, 5vw, 2.2rem); margin: 14px 0 8px; }
.ai-hero p { color: var(--muted); max-width: 560px; margin: 0 auto; }
.idea-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: -6px 0 18px; }
.gen-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.gen-tile { aspect-ratio: 1; border-radius: 18px; border: 2px solid var(--border); background: repeating-conic-gradient(#f3eee2 0 25%, #fff 0 50%) 0 0 / 20px 20px; display: grid; place-content: center; justify-items: center; gap: 8px; cursor: pointer; padding: 6px; overflow: hidden; font: inherit; color: var(--muted); transition: .15s; }
.gen-tile img { width: 100%; height: 100%; object-fit: contain; }
.gen-tile:not(:disabled):hover { border-color: var(--gold); transform: translateY(-2px); }
.gen-tile.picked { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 162, 39, .3); }
.gen-tile.loading { cursor: wait; }
.gen-tile.failed { color: var(--error); cursor: default; }
.studio { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 10px; }
.studio-preview { position: sticky; top: 80px; background: radial-gradient(circle at 50% 40%, #fff 0%, #ece4d2 100%); border-radius: 24px; padding: 24px; border: 1px solid var(--border); }
.studio-shirt { max-width: 420px; margin: 0 auto 16px; }
.studio .seg.small { display: flex; }

/* ================= Phones ================= */
@media (max-width: 860px) {
  .tryon, .studio, .pd, .bag-layout { grid-template-columns: minmax(0, 1fr); }
  .pd-img, .studio-preview { position: static; }
  .stage { max-height: 70vh; }
  .item-row { grid-template-columns: 1fr 1fr 1fr; }
  .ir-desc { grid-column: 1 / -1; }
  .ir-del { position: absolute; top: 6px; right: 6px; }
  .gen-grid { grid-template-columns: 1fr 1fr; }
  .design-admin { grid-template-columns: 1fr; }
  .design-thumb { max-width: 220px; }
}
@media (max-width: 680px) {
  body { font-size: 15px; }
  .role-grid { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .btn-lg { width: 100%; }
  .cta-buttons .btn-lg { width: 100%; }
  .stepper .label { font-size: .7rem; }
  .review dl div, .kv div { grid-template-columns: 1fr; gap: 0; }
  .seg-btn { font-size: .82rem; padding: 9px 4px; }
  .seg-btn .ic { display: none; }
  .home-hero { grid-template-columns: 1fr .8fr; padding: 18px; }
  .stats { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .stat { padding: 10px; }
  .stat strong { font-size: 1rem; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .invoice-doc { padding: 18px; }
  .doc-head, .doc-foot { flex-direction: column; }
  .doc-title { text-align: left; }
  .doc-parties, .doc-bottom, .purchase-view { grid-template-columns: 1fr; }
  .scan-progress { grid-template-columns: 90px 1fr; }
  .scan-progress img { width: 90px; height: 120px; }
  .quote-form { grid-template-columns: 1fr; }
  .wordmark { letter-spacing: .12em; }
  .search { max-width: none; }
  .pd-actions { grid-template-columns: 1fr; }
}

/* ================= Printing (invoices) ================= */
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; }
  .appbar, .tabbar, .no-print, #toasts, .topbar, .footer { display: none !important; }
  #app.in-app { padding: 0; }
  .app-main { max-width: none; padding: 0; }
  .invoice-doc { box-shadow: none; padding: 0; border-top: 0; font-size: 11pt; }
  .doc-table th, .slab th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ================= Showroom (retailer & distributor products) ================= */
.showroom-hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 12px; align-items: center; padding: 24px; border-radius: 24px; background: radial-gradient(circle at 85% 30%, #3b2e10 0%, rgba(18, 16, 12, 0) 55%), var(--ink); color: #f1ead8; margin-bottom: 14px; border: 1px solid rgba(201, 162, 39, .3); }
.showroom-hero h1 { font-family: var(--serif); font-size: clamp(1.4rem, 4.5vw, 2rem); color: #fff; margin: 12px 0 8px; }
.showroom-hero p { color: #c9bfa7; margin: 0; }
.sh-art { filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .5)); transform: rotate(-4deg); }
.trade-row { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); }
.trade-row strong { color: var(--text); }
.margin-chip { justify-self: start; margin-top: 4px; font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 8px; background: var(--success-soft); color: var(--success); }
.price-panel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 6px; }
.price-panel div { display: grid; gap: 2px; padding: 12px; border-radius: 14px; background: var(--soft); border: 1px solid var(--border); }
.price-panel span { font-size: .74rem; color: var(--muted); }
.price-panel strong { font-size: 1.15rem; }
.price-panel .hl { background: var(--ink); border-color: var(--ink); }
.price-panel .hl span { color: #a79e88; }
.price-panel .hl strong { color: var(--gold-light); }
.price-panel small { font-size: .7em; font-weight: 600; }
.size-list { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.size-list span { min-width: 44px; text-align: center; padding: 6px 10px; border-radius: 10px; border: 1.5px solid var(--border); font-weight: 700; font-size: .85rem; }
.showcase { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: radial-gradient(ellipse at 50% 35%, #3a2d10 0%, rgba(18, 16, 12, 0) 60%), var(--ink); color: #f1ead8; overflow-y: auto; }
.sc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; }
.sc-shop { font-family: var(--serif); color: var(--gold-light); letter-spacing: .08em; font-size: .9rem; text-align: center; }
.sc-stage { display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; align-items: center; padding: 0 8px; min-height: 0; }
.sc-shirt { position: relative; max-width: 440px; width: 100%; margin: 0 auto; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .6)) drop-shadow(0 0 28px rgba(232, 199, 102, .28)); }
.sc-shirt::before { content: ""; position: absolute; inset: 4% -8% 0; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, rgba(236, 209, 130, .30), rgba(236, 209, 130, 0)); }
.sc-shirt.pop { animation: pop .45s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.96); } }
.sc-nav { width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(201, 162, 39, .45); background: rgba(255, 255, 255, .06); color: var(--gold-light); display: grid; place-items: center; cursor: pointer; }
.sc-info { text-align: center; padding: 6px 18px calc(22px + var(--safe-b)); display: grid; justify-items: center; gap: 8px; }
.sc-info h1 { font-family: var(--serif); font-size: clamp(1.5rem, 5vw, 2.3rem); color: #fff; margin: 0; }
.sc-desc { color: #c9bfa7; margin: 0; max-width: 520px; }
.sc-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; justify-content: center; }
.sc-price strong { font-size: 2rem; color: var(--gold-light); }
.sc-price s { color: #8f8670; }
.sc-price em { color: #81c784; font-style: normal; font-weight: 700; }
.sc-price span { color: #c9bfa7; font-size: .9rem; }
.sc-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.sc-dots { display: flex; gap: 6px; margin-top: 4px; }
.sc-dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; background: rgba(201, 162, 39, .3); cursor: pointer; }
.sc-dots button.on { background: var(--gold); width: 22px; border-radius: 4px; }
@media (max-width: 680px) {
  .showroom-hero { grid-template-columns: 1fr; }
  .sh-art { display: none; }
  .price-panel { grid-template-columns: 1fr 1fr 1fr; }
  .price-panel div { padding: 10px 8px; }
  .price-panel strong { font-size: .98rem; }
  .sc-stage { grid-template-columns: 44px minmax(0, 1fr) 44px; }
  .sc-nav { width: 40px; height: 40px; }
  .tab-item { font-size: .66rem; }
}

/* =====================================================================
   VIYA PEARL & GOLD — bright luxury theme
   Change the colours here.
   ===================================================================== */
:root {
  --gold: #c9971c;
  --gold-light: #f3d27a;
  --gold-deep: #9a6f0e;
  --gold-grad: linear-gradient(135deg, #fff1bd 0%, #f4cd55 34%, #dca62e 68%, #f8de8e 100%);
  --gold-text: linear-gradient(180deg, #c99a2e 0%, #8c620a 100%);
  --sunrise: linear-gradient(135deg, #fff7dc 0%, #ffe7a3 45%, #f6c85d 100%);
  --ink: #2a1f12;
  --bg: #fbf7ef;
  --card: #ffffff;
  --soft: #f8f1e2;
  --field: #ffffff;
  --text: #241a0f;
  --muted: #7b6d58;
  --border: rgba(176, 134, 40, 0.18);
  --border-strong: rgba(176, 134, 40, 0.45);
  --error: #d64545;
  --error-soft: #fdeeee;
  --success: #24894a;
  --success-soft: #e9f7ee;
  --warn: #a86a00;
  --warn-soft: #fff4dc;
  --shadow: 0 1px 2px rgba(120, 84, 10, 0.06), 0 14px 36px -18px rgba(150, 105, 15, 0.28);
  --studio: radial-gradient(120% 95% at 50% 28%, #ffffff 0%, #fbf3e1 55%, #f1e2bf 100%);
  color-scheme: light;
}
body { background: radial-gradient(1100px 520px at 90% -10%, rgba(244, 205, 85, 0.22), transparent 60%), radial-gradient(900px 480px at -10% 105%, rgba(244, 205, 85, 0.16), transparent 60%), var(--bg); background-attachment: fixed; color: var(--text); }
a { color: var(--gold-deep); }
::selection { background: rgba(244, 205, 85, .45); }
.wordmark { background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gold-text { background: linear-gradient(135deg, #e0a52b, #b07a0c); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Splash */
#splash { background: radial-gradient(circle at 50% 42%, #ffffff 0%, #fbf3e1 55%, #f3e3bc 100%); }
.splash-name { background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.splash-line { background: rgba(176, 134, 40, .2); }

/* Header, footer, tab bar: white glass */
.topbar, .appbar { background: rgba(255, 255, 255, 0.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: var(--text); border-bottom: 1px solid var(--border); box-shadow: 0 6px 24px -18px rgba(150, 105, 15, 0.5); }
.appbar-actions { color: var(--text); }
.back-link { color: var(--muted); }
.footer { background: transparent; border-top: 1px solid var(--border); color: var(--muted); }
.footer a { color: var(--muted); }
.tabbar { background: rgba(255, 255, 255, 0.94); border-top: 1px solid var(--border); box-shadow: 0 -10px 30px -20px rgba(150, 105, 15, 0.45); }
.tab-item { position: relative; color: #9b8d76; }
.tab-item.active { color: var(--gold-deep); }
.tab-item.active .ic { filter: none; }
.tab-item.active::before { content: ""; position: absolute; top: -7px; width: 30px; height: 3px; border-radius: 3px; background: var(--gold-grad); }

/* Welcome page is bright too */
.page-dark { background: transparent; color: var(--text); }
.page-dark .lead, .page-dark .cta-note, .legal-note { color: var(--muted); }
.page-dark a { color: var(--gold-deep); }
.hero-tag { color: var(--gold-deep); }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:not(:disabled):hover { background: var(--soft); }

/* Surfaces */
.card { background: var(--card); border-color: var(--border); box-shadow: var(--shadow); }
.form-section { color: var(--gold-deep); letter-spacing: .2em; font-size: .7rem; border-bottom-color: var(--border); }
.form-head h1, .screen-title, .pd-info h1, .section-head h2, .dash-head h1 { background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.screen-title { letter-spacing: .05em; }
.pill { background: var(--sunrise); color: var(--ink); border: 1px solid var(--border-strong); }

/* Fields */
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input:not([type]), select, textarea { background: var(--field); border: 1px solid var(--border-strong); color: var(--text); border-radius: 14px; }
input::placeholder, textarea::placeholder { color: #ad9f88; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(244, 205, 85, 0.30); }
input[readonly] { background: var(--soft); color: var(--muted); }
select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b8860b' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; }
.input-group .prefix { background: var(--soft); border: 1px solid var(--border-strong); border-right: 0; color: var(--gold-deep); }
.field.invalid .dd-btn { border-color: var(--error); background: var(--error-soft); }
.otp-row, .derived, .review { background: var(--soft); border: 1px solid var(--border); }

/* Buttons */
.btn { border-radius: 14px; letter-spacing: .01em; }
.btn-gold, .btn-primary { background: var(--gold-grad); background-size: 200% 200%; color: #2a1f12; box-shadow: 0 10px 24px -10px rgba(214, 160, 30, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.7); }
.btn-gold:not(:disabled):hover, .btn-primary:not(:disabled):hover { background-position: 100% 0; filter: none; }
.btn-secondary { background: var(--ink); color: #ffe39a; }
.btn-outline { background: #fff; color: var(--text); border-color: var(--border-strong); }
.btn-outline:not(:disabled):hover { border-color: var(--gold); background: #fffaf0; }
.link-btn { color: var(--gold-deep); }

/* Segmented controls & chips */
.seg { background: var(--soft); border: 1px solid var(--border); }
.seg-btn.active { background: #fff; color: var(--gold-deep); box-shadow: 0 4px 14px -8px rgba(150, 105, 15, 0.6); }
.filter-chip { background: #fff; border: 1px solid var(--border-strong); color: var(--text); }
.filter-chip.active { background: var(--gold-grad); color: #2a1f12; border-color: transparent; box-shadow: 0 8px 18px -10px rgba(214, 160, 30, 0.8); }
.status-chip.quoted, .status-chip.in_production, .status-chip.shipped { background: #fff1c7; color: #8a5d00; }

/* Highlight cards become bright gold */
.home-hero, .showroom-hero { background: radial-gradient(90% 120% at 100% 0%, rgba(255, 255, 255, 0.65), transparent 55%), var(--sunrise); color: var(--ink); border: 1px solid var(--border-strong); box-shadow: 0 24px 50px -28px rgba(214, 160, 30, 0.8); }
.home-hero h1, .showroom-hero h1 { color: var(--ink); }
.home-hero p, .hh-hi, .showroom-hero p { color: #5d4a2a; }
.hh-chips span { background: rgba(255, 255, 255, 0.7); color: var(--ink); border-color: rgba(176, 134, 40, 0.35); }
.hh-art, .sh-art { filter: drop-shadow(0 20px 26px rgba(120, 80, 0, 0.35)); }
.ai-badge { background: var(--ink); color: #ffe39a; }
.ft-ar { background: linear-gradient(140deg, #ffffff, #fff4d6); color: var(--ink); border: 1px solid var(--border-strong); }
.ft-ar .ft-icon { background: var(--gold-grad); color: var(--ink); }
.ft-ai { background: linear-gradient(140deg, #f6c85d, #e7a83a 60%, #d58d22); color: #2a1f12; }
.feature-tile::after { background: rgba(255, 255, 255, 0.25); }
.banner-ai { background: var(--sunrise); color: var(--ink); border-color: var(--border-strong); }
.banner-ai .ic:first-child { color: var(--gold-deep); }
.alert-card { background: var(--sunrise); color: var(--ink); border-color: var(--border-strong); }
.alert-card small { color: #6d5630; }
.stat { background: #fff; color: var(--text); border: 1px solid var(--border); }
.stat span { color: var(--muted); }
.stat strong { color: var(--gold-deep); }
.scan-hero { background: var(--sunrise); color: var(--ink); }
.totals-card { background: var(--sunrise); color: var(--ink); border-color: var(--border-strong); }
.totals-card .totals dt, .totals-card .words { color: #6d5630; }
.totals-card .totals .grand dt { color: var(--ink); }
.totals-card .totals .grand dd { color: var(--ink); }
.price-panel div { background: #fff; border-color: var(--border); }
.price-panel .hl { background: var(--gold-grad); border-color: transparent; }
.price-panel .hl span, .price-panel .hl strong { color: #2a1f12; }
.chips-row .radio:has(input:checked) { background: var(--gold-grad); color: var(--ink); border-color: transparent; }

/* Lists & stats */
.stepper .dot { background: #fff; border-color: var(--border-strong); }
.stepper li.done .dot { background: var(--gold-grad); border-color: transparent; color: #2a1f12; }
.stepper li::before { background: var(--border); }
.lr-icon { background: #fff4d6; color: var(--gold-deep); }
a.list-row:hover { background: #fffaf0; }
.list-row { border-bottom-color: var(--border); }
.quick-btn { background: #fff; border-color: var(--border); color: var(--text); }
.search { background: #fff; border: 1px solid var(--border-strong); }
.item-row { background: var(--soft); border-color: var(--border); }
.stepper-input { background: #fff; border: 1px solid var(--border-strong); }
.stepper-input button { color: var(--gold-deep); }

/* Products on bright studio backdrops */
.pc-img, .pd-img, .studio-preview, .bl-img, .req-img, .design-thumb, .thumb { background: var(--studio); }
.pc-img { border-bottom: 1px solid var(--border); }
.product-card { background: #fff; border-color: var(--border); }
.product-card:hover { border-color: var(--border-strong); box-shadow: 0 24px 46px -24px rgba(214, 160, 30, 0.65); }
.pc-img .shirt-svg, .pd-img .shirt-svg, .studio-shirt .shirt-svg { filter: drop-shadow(0 16px 18px rgba(120, 80, 0, 0.22)); }
.pc-badge { background: var(--ink); color: #ffe39a; }
.pc-tag { color: var(--gold-deep); }
.swatch { border-color: #fff; box-shadow: 0 0 0 1px var(--border-strong); }
.swatch.active { box-shadow: 0 0 0 2.5px var(--gold); }
.thumb.active { border-color: var(--gold); }
.gen-tile { background: repeating-conic-gradient(#f8f1e2 0 25%, #fff 0 50%) 0 0 / 20px 20px; border-color: var(--border); }
.tryon-panel { background: #fff; border-color: var(--border); }
.size-list span { border-color: var(--border-strong); color: var(--gold-deep); }
.margin-chip { background: var(--success-soft); }
.modal-card { background: #fff; }
.raw pre { background: var(--soft); color: var(--muted); }
.prose p, .prose li { color: #4a3d2a; }
.prose h2 { color: var(--gold-deep); }

/* Present mode: bright showroom with a golden spotlight */
.showcase { background: radial-gradient(70% 55% at 50% 36%, #ffffff 0%, #fdf3da 45%, #f4dfa8 100%); color: var(--ink); }
.sc-shop { color: var(--gold-deep); }
.sc-info h1 { color: var(--ink); }
.sc-desc, .sc-price span { color: #6d5630; }
.sc-price strong { color: var(--gold-deep); }
.sc-price em { color: var(--success); }
.sc-nav { background: rgba(255, 255, 255, 0.8); color: var(--gold-deep); border-color: var(--border-strong); }
.sc-shirt { filter: drop-shadow(0 30px 36px rgba(120, 80, 0, 0.3)); }
.sc-shirt::before { background: radial-gradient(closest-side, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0)); }
.sc-dots button { background: rgba(176, 134, 40, 0.3); }
.showcase .round-btn { background: rgba(255, 255, 255, 0.85); color: var(--ink); }
.showcase .btn-ghost { background: #fff; }

/* Invoices stay on white paper */
.invoice-doc { --text: #1a1712; --muted: #6e675a; --border: #e9e2d2; color: #1a1712; }
.slab th { background: #f6eedb; }

/* ================= Dropdown (custom, used for every choice) ================= */
.dd { position: relative; }
.dd-btn { width: 100%; min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border-strong); background: var(--field); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.dd-btn:hover { border-color: var(--border-strong); }
.dd.open .dd-btn, .dd-btn:focus-visible { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(244, 205, 85, 0.3); outline: none; }
.dd-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-value.placeholder { color: #ad9f88; }
.dd-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.dd-tags span { font-size: .78rem; padding: 3px 10px; border-radius: 999px; background: #fff1c7; color: #7a5300; border: 1px solid var(--border); }
.dd-chev { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; transition: transform .2s; }
.dd.open .dd-chev { transform: rotate(180deg); }
.dd-panel { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 80; max-height: 320px; overflow: auto; padding: 6px; border-radius: 16px; background: #fff; border: 1px solid var(--border-strong); box-shadow: 0 30px 60px -24px rgba(120, 80, 0, 0.45); animation: ddIn .16s ease-out; }
.dd-panel.up { top: auto; bottom: calc(100% + 8px); }
@keyframes ddIn { from { opacity: 0; transform: translateY(-4px); } }
.dd-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 12px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.dd-opt:hover, .dd-opt.focus, .dd-opt:focus-visible { background: #fff6dc; outline: none; }
.dd-opt[aria-selected="true"] { color: var(--gold-deep); font-weight: 600; }
.dd-opt .tick { width: 20px; height: 20px; border-radius: 6px; border: 1px solid var(--border-strong); display: grid; place-items: center; flex-shrink: 0; }
.dd-opt[aria-selected="true"] .tick { background: var(--gold-grad); border-color: transparent; }
.dd-opt .tick svg { width: 13px; height: 13px; fill: none; stroke: #2a1f12; stroke-width: 3; opacity: 0; }
.dd-opt[aria-selected="true"] .tick svg { opacity: 1; }
.dd.single .dd-opt .tick { border-radius: 50%; }
.dd-sub { display: block; font-size: .78rem; color: var(--muted); }
.dd-foot { position: sticky; bottom: -6px; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 8px 6px; margin-top: 4px; background: #fff; border-top: 1px solid var(--border); font-size: .8rem; color: var(--muted); }
.dd-search { width: 100%; margin-bottom: 6px; min-height: 40px !important; }
.dd-backdrop { display: none; }
@media (max-width: 680px) {
  /* On phones the list opens as an elegant bottom sheet */
  .dd-panel { position: fixed; left: 0; right: 0; bottom: 0; top: auto; max-height: 70vh; border-radius: 22px 22px 0 0; padding: 10px 10px calc(14px + var(--safe-b)); animation: sheetIn .22s ease-out; }
  .dd-panel::before { content: attr(data-title); display: block; text-align: center; font-family: var(--serif); letter-spacing: .08em; color: var(--gold-deep); padding: 8px 0 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
  .dd-backdrop { display: block; position: fixed; inset: 0; z-index: 79; background: rgba(60, 40, 5, 0.35); backdrop-filter: blur(3px); }
  .dd-opt { padding: 15px 14px; }
}
@keyframes sheetIn { from { transform: translateY(30px); opacity: 0; } }

/* ================= Minimal welcome ================= */
.welcome { max-width: 560px; margin: 0 auto; text-align: center; padding: 8px 0 24px; }
.welcome .hero-logo .logo-mark { width: 116px; height: 116px; }
.welcome .wordmark.xl { font-size: clamp(2.6rem, 11vw, 3.8rem); letter-spacing: .32em; margin-left: .32em; }
.welcome .lead { font-size: .98rem; margin-top: 10px; }
.role-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 30px 0 14px; }
.role-tile { position: relative; display: grid; justify-items: center; gap: 10px; padding: 18px 8px 16px; border-radius: 18px; border: 1px solid var(--border-strong); background: #fff; box-shadow: var(--shadow); color: var(--text); font: inherit; cursor: pointer; transition: border-color .2s, transform .2s, background .2s; }
.role-tile:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.role-tile .rt-icon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border-strong); color: var(--gold-deep); background: #fff8e4; transition: .2s; }
.role-tile .rt-icon .ic { width: 22px; height: 22px; }
.role-tile span:last-child { font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; }
.role-tile.selected { border-color: var(--gold); background: var(--sunrise); box-shadow: 0 18px 36px -18px rgba(214, 160, 30, 0.8); }
.role-tile.selected .rt-icon { background: var(--ink); color: #ffe39a; border-color: transparent; }
.role-note { min-height: 44px; color: var(--muted); font-size: .9rem; margin: 0 auto 6px; max-width: 420px; }
.welcome .cta-buttons { flex-direction: column; align-items: stretch; max-width: 360px; margin: 14px auto 0; }
.welcome .cta-buttons .btn-lg { width: 100%; }
.gold-rule { width: 64px; height: 1px; margin: 18px auto 0; background: var(--gold-grad); }

/* ================= Business dashboard ================= */
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 18px; }
.dash-head p { margin: 0; color: var(--muted); font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; }
.dash-head h1 { font-family: var(--serif); margin: 4px 0 0; font-size: clamp(1.4rem, 4.4vw, 1.9rem); background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kpi-hero { position: relative; overflow: hidden; padding: 22px; border-radius: 22px; margin-bottom: 12px; border: 1px solid var(--border-strong); background: radial-gradient(90% 120% at 100% 0%, rgba(255, 255, 255, 0.7), transparent 55%), var(--sunrise); box-shadow: 0 24px 50px -28px rgba(214, 160, 30, 0.85); }
.kpi-hero .label { color: #6d5630; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
.kpi-hero .big { font-family: var(--serif); font-size: clamp(2rem, 8vw, 2.8rem); margin: 6px 0 4px; background: linear-gradient(180deg, #3a2a12, #7a5300); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.trend { display: inline-flex; align-items: center; gap: 4px; font-size: .82rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.trend.up { color: var(--success); background: var(--success-soft); }
.trend.down { color: var(--error); background: var(--error-soft); }
.trend.flat { color: #6d5630; background: rgba(255, 255, 255, 0.7); }
.kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.kpi { padding: 14px; border-radius: 16px; box-shadow: var(--shadow); background: var(--card); border: 1px solid var(--border); display: grid; gap: 4px; }
.kpi span { font-size: .72rem; color: var(--muted); letter-spacing: .06em; }
.kpi strong { font-size: 1.15rem; color: var(--text); font-variant-numeric: tabular-nums; }
.kpi small { font-size: .72rem; color: var(--muted); }
.chart-card h2, .dash-card h2 { font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-deep); margin: 0 0 14px; font-family: Inter, sans-serif; }
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-size: 11px; font-family: Inter, sans-serif; }
.chart .val { fill: var(--gold-deep); font-weight: 700; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; }
.top-item { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.top-item:last-child { border-bottom: 0; }
.top-item .meter { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.top-item .meter i { display: block; height: 100%; background: var(--gold-grad); border-radius: 4px; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.quick-grid a { display: grid; justify-items: center; gap: 8px; padding: 14px 6px; border-radius: 16px; box-shadow: var(--shadow); background: var(--card); border: 1px solid var(--border); color: var(--text); font-size: .78rem; font-weight: 600; text-decoration: none !important; text-align: center; }
.quick-grid a .ic { width: 40px; height: 40px; padding: 9px; border-radius: 50%; background: var(--gold-grad); color: #2a1f12; box-shadow: 0 8px 16px -8px rgba(214, 160, 30, 0.8); }
.quick-grid a:hover { border-color: var(--border-strong); }
@media (max-width: 860px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 680px) { .kpi-grid { grid-template-columns: 1fr 1fr; } .kpi-grid .kpi:last-child { grid-column: 1 / -1; } .role-pick { gap: 8px; } }

/* ================= Admin product manager ================= */
.admin-prod { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.admin-prod:last-child { border-bottom: 0; }
.admin-prod .thumbimg { width: 92px; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--studio); display: grid; place-items: center; }
.admin-prod .thumbimg img { width: 100%; height: 100%; object-fit: cover; }
.admin-prod h3 { margin: 0 0 2px; font-size: 1rem; }
.admin-prod p { margin: 0; font-size: .82rem; color: var(--muted); }
.photo-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.photo-row .ph { position: relative; width: 72px; height: 72px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.photo-row .ph img { width: 100%; height: 100%; object-fit: cover; }
.photo-row .ph button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, 0.7); color: #fff; cursor: pointer; display: grid; place-items: center; padding: 0; }
.photo-row .ph button .ic { width: 12px; height: 12px; }
.photo-add { width: 72px; height: 72px; border-radius: 12px; border: 1px dashed var(--border-strong); display: grid; place-items: center; color: var(--gold-deep); background: #fffaf0; cursor: pointer; }
.pc-photo { width: 100%; aspect-ratio: 400 / 440; object-fit: cover; display: block; border-radius: 10px; }
.own-chip { justify-self: start; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 8px; border: 1px solid var(--border-strong); color: var(--gold-deep); background: #fff6dc; }
.mini-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; margin-top: 12px; }
.mini-form .field { margin: 0; }

.sort { min-width: 220px; }
.sort .field { margin: 0; }
.sort .field label { display: none; }
.pd-size { max-width: 280px; }
.pd-size .field { margin-bottom: 4px; }

.pd-media { position: sticky; top: 80px; align-self: start; display: grid; gap: 10px; }
.pd-media .pd-img { position: static; }
.pd-photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pd-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); }
@media (max-width: 860px) { .pd-media { position: static; } }
.chart-tip { position: absolute; z-index: 5; min-width: 140px; padding: 8px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--border-strong); box-shadow: 0 14px 30px -12px rgba(120, 80, 0, .45); pointer-events: none; display: grid; gap: 2px; }
.chart-tip strong { color: var(--gold-deep); font-variant-numeric: tabular-nums; }
.chart-tip span { font-size: .78rem; color: var(--muted); }
.chart .bar.hot path { filter: brightness(1.25); }
.chart .bar { cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pc-swatches i { border: 1px solid rgba(120, 80, 0, 0.25); }
.feature-tile { min-height: 168px; padding-top: 74px; }
.cam-pick .seg-btn { color: #eadcbc; }
.cam-pick .seg-btn.active { background: var(--gold-grad); color: #2a1f12; }
.stage { background: radial-gradient(circle at 50% 30%, #4a3a1c 0%, #22190d 70%); }

.set-price-chip { justify-self: start; margin-top: 4px; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 8px; background: #fff1c7; color: #7a5300; border: 1px dashed var(--border-strong); }
.price-panel.two { grid-template-columns: 1fr 1fr; }

.admin-who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .88rem; color: var(--muted); }
.admin-who .ic { width: 16px; height: 16px; color: var(--gold-deep); }
.wa-btn { margin-top: 10px; }
/* AR try-on: bright intro around the camera */
.stage { background: radial-gradient(120% 90% at 50% 30%, #ffffff 0%, #fbf0d6 55%, #f0dcaa 100%); border: 1px solid var(--border-strong); }
.stage.live { background: #1a140b; }
.stage-intro { color: var(--ink); }
.stage-intro h2 { color: var(--ink); background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stage-intro p { color: #6d5630; }
.si-note { color: #8a7a5e !important; }
.si-icon { background: var(--gold-grad); color: var(--ink); box-shadow: 0 14px 30px -12px rgba(214, 160, 30, 0.8); }
.si-preview { background: #fff4d6; border-color: var(--border-strong); color: #7a5300 !important; }
.cam-pick { background: #fff; border: 1px solid var(--border-strong); }
.cam-pick .seg-btn { color: var(--muted); }
.cam-pick .seg-btn.active { background: var(--gold-grad); color: #2a1f12; }
.stage-loading { background: rgba(255, 250, 238, 0.85); color: var(--gold-deep); }
.stage.live .stage-loading { background: rgba(26, 20, 11, 0.6); color: #ffe39a; }

.side-seg { display: flex; max-width: 260px; margin: 0 auto 8px; }
.side-hint { text-align: center; margin: 0 0 6px; }
.side-thumbs { display: flex; justify-content: center; margin-top: 4px; }
.side-thumb { width: 92px; display: grid; gap: 2px; justify-items: center; padding: 6px; border-radius: 14px; border: 1px solid var(--border-strong); background: #fff; cursor: pointer; font: inherit; font-size: .72rem; color: var(--muted); }
.design-thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: start; }
.design-thumbs .design-thumb { display: grid; justify-items: center; font-size: .72rem; color: var(--muted); }
.design-admin { grid-template-columns: 260px 1fr; }
.req-img { position: relative; }
.req-back { position: absolute; right: -6px; bottom: -6px; width: 46%; background: #fff; border-radius: 8px; border: 1px solid var(--border); padding: 2px; }
@media (max-width: 860px) { .design-admin { grid-template-columns: 1fr; } .design-thumbs { max-width: 320px; } }

.view-seg { display: flex; margin: 4px 0 4px; }
.view-note { margin: 0 0 10px; }
.real-chip { font-size: .78rem; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: #fff1c7; color: #7a5300; border: 1px solid var(--border-strong); }
.thumb img { width: 100%; aspect-ratio: 400 / 440; object-fit: cover; border-radius: 8px; }

.garment-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 6px; }
.garment-slot { display: grid; justify-items: center; gap: 8px; padding: 12px; border-radius: 14px; border: 1px dashed var(--border-strong); background: #fffaf0; }
.gs-img { width: 100%; aspect-ratio: 1; border-radius: 10px; background: #fff; display: grid; place-items: center; overflow: hidden; color: var(--gold-deep); }
.gs-img img { width: 100%; height: 100%; object-fit: contain; }
.pd-ph { padding: 0; border: 0; background: none; cursor: pointer; }
.pd-img img.pc-photo { aspect-ratio: auto; max-height: 520px; object-fit: contain; background: #fff; }
.pc-img img.pc-photo { background: #fff; }

/* ================= Motion ================= */
@keyframes screenIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes rippleOut { from { transform: scale(0); opacity: .45; } to { transform: scale(1); opacity: 0; } }
@keyframes tabPop { 0% { transform: scale(1); } 40% { transform: scale(1.28) translateY(-2px); } 100% { transform: scale(1); } }
@keyframes ringOut { from { transform: scale(.4); opacity: .9; } to { transform: scale(2.6); opacity: 0; } }
@keyframes iconIn { 0% { transform: scale(.3) rotate(-20deg); opacity: 0; } 60% { transform: scale(1.12) rotate(4deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }
@keyframes textIn { from { opacity: 0; transform: translateY(16px); letter-spacing: .3em; } to { opacity: 1; transform: none; } }
@keyframes shimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }
.screen-in { animation: screenIn .42s cubic-bezier(.2, .8, .2, 1) both; }
.stagger { animation: riseIn .55s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 55ms + 80ms); }
.ripple { position: absolute; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(244, 205, 85, .55) 0%, rgba(244, 205, 85, .18) 45%, transparent 70%); animation: rippleOut .6s ease-out forwards; z-index: 0; }
.btn, .role-tile, .quick-grid a, .quick-btn, .tab-item, .product-card, .seg-btn, .filter-chip, .feature-tile, .list-row, .dd-btn, .dd-opt, .thumb, .gen-tile, .alert-card, .banner-ai { position: relative; overflow: hidden; transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease; }
.btn:active:not(:disabled), .role-tile:active, .quick-grid a:active, .quick-btn:active, .product-card:active, .feature-tile:active, .filter-chip:active, .seg-btn:active, .gen-tile:active, .thumb:active { transform: scale(.96); }
.product-card .pc-img > * { transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.product-card:hover .pc-img > :not(.pc-badge) { transform: scale(1.05); }
.tab-item.active .ic { animation: tabPop .45s cubic-bezier(.3, 1.6, .5, 1); }
.role-tile.selected .rt-icon { animation: iconIn .5s cubic-bezier(.3, 1.4, .5, 1); }
.btn-gold:not(:disabled)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%); background-size: 200% 100%; animation: shimmer 3.2s ease-in-out infinite; pointer-events: none; }
.welcome .wordmark.xl { animation: textIn .9s cubic-bezier(.2, .8, .2, 1) both .15s; }
.welcome .hero-tag, .welcome .gold-rule { animation: screenIn .7s ease both .35s; }
.welcome .role-tile { animation: riseIn .6s cubic-bezier(.2, .8, .2, 1) both; }
.welcome .role-tile:nth-child(2) { animation-delay: .08s; } .welcome .role-tile:nth-child(3) { animation-delay: .16s; }
.home-hero .hh-art, .showroom-hero .sh-art { animation: float 6s ease-in-out infinite; }

/* Entrance overlay (after login / sign-up) */
.enter-overlay { position: fixed; inset: 0; z-index: 900; display: grid; place-content: center; justify-items: center; gap: 18px; background: radial-gradient(circle at 50% 42%, #ffffff 0%, #fdf3da 45%, #f2d995 100%); transition: opacity .6s ease, transform .6s ease; }
.enter-overlay.out { opacity: 0; transform: scale(1.06); }
.eo-rings { position: absolute; top: 50%; left: 50%; width: 120px; height: 120px; margin: -96px 0 0 -60px; }
.eo-rings i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(201, 151, 28, .55); animation: ringOut 1.6s ease-out infinite; }
.eo-rings i:nth-child(2) { animation-delay: .35s; } .eo-rings i:nth-child(3) { animation-delay: .7s; }
.eo-icon { position: relative; width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-grad); color: var(--ink); box-shadow: 0 24px 50px -16px rgba(214, 160, 30, .9); animation: iconIn .7s cubic-bezier(.3, 1.4, .5, 1) both; }
.eo-icon .ic { width: 50px; height: 50px; stroke-width: 1.6; }
.eo-text { text-align: center; display: grid; gap: 4px; animation: textIn .7s cubic-bezier(.2, .8, .2, 1) both .25s; }
.eo-text small { color: #6d5630; font-size: .95rem; letter-spacing: .08em; }
.eo-text strong { font-family: var(--serif); font-size: clamp(1.8rem, 7vw, 2.6rem); background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: .06em; }
.eo-logo { width: 44px; height: 44px; opacity: .9; animation: screenIn .6s ease both .5s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.tab-item { overflow: visible; }
.tab-item .ripple { display: none; }

.eo-rings { position: absolute; inset: 0; width: auto; height: auto; margin: 0; top: 0; left: 0; z-index: -1; }
.eo-rings i { animation-name: ringOut2; }
@keyframes ringOut2 { from { transform: scale(1); opacity: .8; } to { transform: scale(2.2); opacity: 0; } }
.eo-icon { margin-bottom: 26px; }

/* ================= Smoothness & native-feel transitions ================= */
body { background-attachment: scroll; }
.appbar, .topbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(255, 255, 255, 0.97); view-transition-name: topbar; }
.tabbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; view-transition-name: tabbar; }
::view-transition-old(root) { animation: vtOut .2s cubic-bezier(.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: vtIn .34s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes vtOut { to { opacity: 0; transform: translateX(calc(var(--vt-dir, 1) * -18px)); } }
@keyframes vtIn { from { opacity: 0; transform: translateX(calc(var(--vt-dir, 1) * 28px)); } }
/* Lighter, GPU-friendly entrances */
@keyframes riseIn { from { opacity: 0; transform: translate3d(0, 10px, 0); } to { opacity: 1; transform: none; } }
@keyframes screenIn { from { opacity: 0; transform: translate3d(0, 8px, 0); } to { opacity: 1; transform: none; } }
.stagger { animation: riseIn .42s cubic-bezier(.22, 1, .36, 1) both; animation-delay: calc(var(--i, 0) * 45ms + 40ms); }
.screen-in { animation: screenIn .34s cubic-bezier(.22, 1, .36, 1) both; }
.btn, .role-tile, .quick-grid a, .quick-btn, .tab-item, .product-card, .seg-btn, .filter-chip, .feature-tile, .list-row, .dd-btn, .dd-opt, .thumb, .gen-tile, .alert-card, .banner-ai { transition: transform .18s cubic-bezier(.22, 1, .36, 1); -webkit-tap-highlight-color: transparent; }
.btn:active:not(:disabled), .role-tile:active, .quick-grid a:active, .quick-btn:active, .product-card:active, .feature-tile:active, .filter-chip:active, .seg-btn:active, .gen-tile:active, .thumb:active, .list-row:active { transform: scale(.965); transition-duration: .08s; }
/* Sheen on gold buttons: transform-only, so it's smooth on phones */
.btn-gold:not(:disabled)::after { background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .5) 50%, transparent 65%); background-size: auto; transform: translateX(-120%); animation: sheen 4s ease-in-out infinite; }
@keyframes sheen { 0%, 65% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.home-hero .hh-art, .showroom-hero .sh-art { will-change: transform; }
.ripple { will-change: transform, opacity; }
.dd-panel { animation-duration: .2s; animation-timing-function: cubic-bezier(.22, 1, .36, 1); }
@keyframes sheetIn { from { transform: translate3d(0, 100%, 0); } to { transform: none; } }
@media (max-width: 680px) { .dd-panel { animation: sheetIn .32s cubic-bezier(.22, 1, .36, 1) both; } }
/* Keep clear of phone notches / status bars in browsers and installed web app */
.appbar, .topbar { padding-top: max(10px, env(safe-area-inset-top)); }

.ripple { opacity: 0; animation-fill-mode: both; }

/* ================= Bubble splash ================= */
#splash { overflow: hidden; background: radial-gradient(circle at 50% 46%, #ffffff 0%, #fdf3da 50%, #f2d995 100%); clip-path: circle(150% at 50% 44%); transition: clip-path .75s cubic-bezier(.7, 0, .3, 1), opacity .4s ease .45s; }
#splash.hide { clip-path: circle(0% at 50% 44%); opacity: 0; visibility: visible; }
.bubbles { position: absolute; inset: 0; pointer-events: none; }
.bubbles i { position: absolute; bottom: -40px; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .95), rgba(244, 205, 85, .55) 45%, rgba(201, 151, 28, .35) 70%, rgba(201, 151, 28, .05)); box-shadow: inset 0 0 6px rgba(255, 255, 255, .8), 0 4px 10px rgba(201, 151, 28, .25); animation: bubbleUp var(--t) cubic-bezier(.3, .1, .3, 1) var(--d) both; opacity: 0; }
@keyframes bubbleUp { 0% { transform: translate3d(0, 0, 0) scale(.6); opacity: 0; } 15% { opacity: .95; } 50% { transform: translate3d(12px, -50vh, 0) scale(1); } 100% { transform: translate3d(-10px, -110vh, 0) scale(1.15); opacity: 0; } }
.splash-orb { width: 128px; height: 128px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 32% 28%, #ffffff 0%, #fff6dc 40%, #f6d77c 100%); box-shadow: inset 0 -8px 18px rgba(201, 151, 28, .35), inset 0 6px 14px rgba(255, 255, 255, .9), 0 22px 50px -12px rgba(201, 151, 28, .7); animation: orbRise 1s cubic-bezier(.2, 1.3, .4, 1) both; }
.splash-orb::after { content: ""; position: absolute; width: 128px; height: 128px; border-radius: 50%; border: 2px solid rgba(201, 151, 28, .45); animation: orbRing 1.6s ease-out .7s infinite; }
@keyframes orbRise { 0% { transform: translate3d(0, 45vh, 0) scale(.55); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; } }
@keyframes orbRing { from { transform: scale(1); opacity: .9; } to { transform: scale(1.9); opacity: 0; } }
.splash-orb .splash-logo { width: 86px; height: 86px; animation: none; filter: drop-shadow(0 3px 6px rgba(150, 105, 15, .35)); }
.splash-name { font-size: 1.7rem; margin: 20px 0 4px .32em; animation: textIn .7s cubic-bezier(.2, .8, .2, 1) .55s both; }
.splash-tag { font-family: var(--serif); font-size: .78rem; letter-spacing: .3em; text-transform: uppercase; color: #8c620a; animation: screenIn .6s ease .85s both; }
.splash-line { display: none; }

/* ================= Welcome: smaller logo & name ================= */
.welcome { padding-top: 0; }
.welcome .hero-logo .logo-mark { width: 72px; height: 72px; }
.welcome h1 { margin: 6px 0 2px; }
.welcome .wordmark.xl { font-size: clamp(1.8rem, 7.5vw, 2.4rem); letter-spacing: .28em; margin-left: .28em; }
.welcome .hero-tag { font-size: .7rem; margin-bottom: 10px; }
.welcome .gold-rule { margin-top: 8px; }
.welcome .role-pick { margin-top: 18px; }

/* ================= Gliding designs strip ================= */
.dm-viewport { overflow: hidden; margin: 0 -16px; padding: 6px 0 10px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.dm-track { display: flex; gap: 12px; width: max-content; animation: marquee 38s linear infinite; will-change: transform; }
.dm-viewport:hover .dm-track, .dm-viewport:active .dm-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }
.dm-item { flex: 0 0 auto; width: 118px; display: grid; gap: 6px; justify-items: center; padding: 8px; border-radius: 16px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--text); text-decoration: none !important; font-size: .72rem; font-weight: 600; text-align: center; }
.dm-item .shirt-svg, .dm-item img { width: 100%; aspect-ratio: 400 / 440; object-fit: cover; border-radius: 10px; background: var(--studio); }
.dm-item span { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.welcome-strip { margin: 18px -16px 0; }
.welcome-strip .dm-item { width: 92px; padding: 6px; }
.design-marquee { margin-bottom: 14px; }
.design-marquee .section-head { margin-top: 4px; }

/* ================= Offers carousel ================= */
.offers { position: relative; margin-bottom: 16px; }
.offer-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 22px; box-shadow: 0 20px 44px -26px rgba(150, 105, 15, .75); }
.offer-track::-webkit-scrollbar { display: none; }
.offer-slide { flex: 0 0 100%; scroll-snap-align: start; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 10px; min-height: 168px; padding: 18px 18px 18px 22px; color: var(--ink); text-decoration: none !important; position: relative; overflow: hidden; }
.offer-slide::before { content: ""; position: absolute; right: -40px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, .22); }
.offer-text { display: grid; gap: 6px; justify-items: start; position: relative; z-index: 1; }
.offer-text strong { font-family: var(--serif); font-size: clamp(1.15rem, 4.8vw, 1.5rem); line-height: 1.15; letter-spacing: .02em; }
.offer-text small { font-size: .84rem; opacity: .85; }
.offer-tag { font-size: .7rem; font-weight: 800; letter-spacing: .14em; padding: 4px 10px; border-radius: 999px; background: var(--ink); color: #ffe39a; }
.offer-cta { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-weight: 700; font-size: .86rem; padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, .85); color: var(--ink); }
.offer-cta .ic { width: 14px; height: 14px; }
.offer-art { position: relative; z-index: 1; justify-self: end; width: 100%; max-width: 150px; }
.offer-art img, .offer-art .shirt-svg { width: 100%; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 14px 18px rgba(60, 40, 5, .35)); border-radius: 14px; }
.theme-gold { background: linear-gradient(135deg, #fff1bd, #f4cd55 55%, #dca62e); }
.theme-black { background: linear-gradient(135deg, #2a2116, #14100a); color: #fff6dc; }
.theme-black .offer-tag { background: var(--gold-grad); color: var(--ink); }
.theme-black .offer-cta { background: var(--gold-grad); }
.theme-black::before { background: rgba(244, 205, 85, .12); }
.theme-lavender { background: linear-gradient(135deg, #efe8ff, #c9b8ec 60%, #a993d6); }
.theme-maroon { background: linear-gradient(135deg, #8a2f3c, #5b1d26); color: #fff1e6; }
.theme-maroon .offer-tag, .theme-bottlegreen .offer-tag { background: var(--gold-grad); color: var(--ink); }
.theme-bottlegreen { background: linear-gradient(135deg, #2f6b4d, #1f4a34); color: #eefaf2; }
.theme-beige { background: linear-gradient(135deg, #fbf3e3, #e3cfaa); }
.offer-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.offer-dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 4px; background: rgba(176, 134, 40, .3); cursor: pointer; transition: width .3s ease, background .3s ease; }
.offer-dots button.on { width: 22px; background: var(--gold); }
.admin-offer .ao-preview .offer-slide { border-radius: 18px; }

/* =====================================================================
   VIYA AURORA — colourful theme (violet · rose · coral · teal · gold)
   Change the colours here. Later rules win, so this restyles the app.
   ===================================================================== */
:root {
  --violet: var(--c1);
  --plum: var(--ink-deep);
  --rose: var(--c3);
  --coral: #ff8a5b;
  --amber: #f5a524;
  --teal: #12b3a6;
  --sky: #4f8bff;
  --brand-grad: linear-gradient(120deg, var(--c1) 0%, var(--c2) 38%, var(--c3) 66%, #ff9a4d 100%);
  --brand-soft: linear-gradient(135deg, #f3edff 0%, #ffeef4 55%, #fff3e6 100%);
  --night-grad: linear-gradient(135deg, var(--ink-deep) 0%, #5b2aa6 48%, var(--c2) 100%);
  --teal-grad: linear-gradient(135deg, #0fa89c 0%, #3ccfb4 100%);
  --sky-grad: linear-gradient(135deg, #4f8bff 0%, #8a6bff 100%);
  --sun-grad: linear-gradient(135deg, #ff8a5b 0%, #f5a524 100%);
  --gold-text: linear-gradient(100deg, var(--c1) 0%, var(--c2) 55%, #ff7a45 100%);
  --bg: #fbf9ff;
  --soft: #f4f0ff;
  --text: #1d1530;
  --muted: #6f6688;
  --border: rgba(var(--c1-rgb), 0.12);
  --border-strong: rgba(var(--c1-rgb), 0.32);
  --shadow: 0 1px 2px rgba(var(--ink-deep-rgb), 0.05), 0 16px 36px -20px rgba(var(--c1-rgb), 0.35);
  --studio: radial-gradient(120% 95% at 50% 28%, #ffffff 0%, #f6f1ff 55%, #ece3ff 100%);
}
body { background: var(--bg); color: var(--text); }
/* Soft colour glows drifting behind every screen */
body::before {
  content: ""; position: fixed; inset: -20vmax; z-index: -1; pointer-events: none;
  background:
    radial-gradient(36vmax 36vmax at 12% 18%, rgba(var(--c1-rgb), 0.16), transparent 60%),
    radial-gradient(34vmax 34vmax at 88% 12%, rgba(var(--c3-rgb), 0.14), transparent 60%),
    radial-gradient(38vmax 38vmax at 80% 88%, rgba(18, 179, 166, 0.12), transparent 60%),
    radial-gradient(30vmax 30vmax at 15% 92%, rgba(255, 138, 91, 0.12), transparent 60%);
  animation: aurora 26s ease-in-out infinite alternate;
}
@keyframes aurora {
  0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50% { transform: translate3d(3vmax, -2vmax, 0) rotate(8deg) scale(1.06); }
  100% { transform: translate3d(-3vmax, 2vmax, 0) rotate(-6deg) scale(1.02); }
}
a { color: var(--violet); }
::selection { background: rgba(var(--c3-rgb), .25); }
:focus-visible { outline-color: rgba(var(--c1-rgb), .5); }

/* Brand wordmark & headings: moving colour gradient */
.wordmark, .splash-name, .form-head h1, .screen-title, .pd-info h1, .section-head h2, .dash-head h1, .gold-text {
  background: linear-gradient(100deg, var(--c1), var(--c2), #ff7a45, var(--c2), var(--c1)); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: inkFlow 9s linear infinite;
}
@keyframes inkFlow { to { background-position: 300% 0; } }

/* Header with a living colour line underneath */
.topbar, .appbar { background: rgba(255, 255, 255, 0.97); border-bottom: 0; box-shadow: 0 10px 30px -22px rgba(var(--c1-rgb), 0.55); }
.topbar::after, .appbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--c1), var(--c3), #ff9a4d, #12b3a6, var(--c1)); background-size: 300% 100%; animation: inkFlow 8s linear infinite; opacity: .85; }
.avatar { background: var(--brand-grad); color: #fff; box-shadow: 0 8px 18px -8px rgba(var(--c2-rgb), 0.7); }

/* Buttons */
.btn-gold, .btn-primary { background: var(--brand-grad); background-size: 180% 180%; color: #fff; border: 0; box-shadow: 0 12px 26px -12px rgba(var(--c2-rgb), 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.35); text-shadow: 0 1px 1px rgba(var(--ink-deep-rgb), 0.2); animation: btnFlow 6s ease-in-out infinite; }
.btn-gold .ic, .btn-primary .ic { color: #fff; }
.btn-gold:not(:disabled):hover, .btn-primary:not(:disabled):hover { background-position: 100% 50%; filter: brightness(1.05); }
@keyframes btnFlow { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.btn-outline { border-color: var(--border-strong); color: var(--violet); background: rgba(255, 255, 255, 0.85); }
.btn-outline:not(:disabled):hover { background: #f4efff; border-color: var(--violet); }
.btn-ghost { border-color: var(--border-strong); }
.pill { background: var(--brand-soft); color: var(--violet); border: 1px solid var(--border-strong); }

/* Cards: frosted white with a colour edge on hover */
.card, .kpi, .quick-grid a, .dm-item, .product-card, .role-tile { background: rgba(255, 255, 255, 0.88); border-color: var(--border); box-shadow: var(--shadow); }
.card { backdrop-filter: none; -webkit-backdrop-filter: none; } /* no blur: it would trap dropdown sheets inside the card on phones */
.product-card:hover { border-color: rgba(var(--c2-rgb), .35); box-shadow: 0 26px 46px -24px rgba(var(--c1-rgb), 0.55); }
.product-card .pc-img, .dm-item .shirt-svg, .dm-item img { background: var(--studio); }
/* Each product tile gets its own soft colour backdrop */
.product-grid > :nth-child(5n+1) .pc-img, .dm-track > :nth-child(5n+1) .shirt-svg { background: radial-gradient(110% 90% at 50% 25%, #fff, #efe7ff 60%, #e0d2ff); }
.product-grid > :nth-child(5n+2) .pc-img, .dm-track > :nth-child(5n+2) .shirt-svg { background: radial-gradient(110% 90% at 50% 25%, #fff, #ffe9f1 60%, #ffd3e3); }
.product-grid > :nth-child(5n+3) .pc-img, .dm-track > :nth-child(5n+3) .shirt-svg { background: radial-gradient(110% 90% at 50% 25%, #fff, #e3f8f5 60%, #c9efe9); }
.product-grid > :nth-child(5n+4) .pc-img, .dm-track > :nth-child(5n+4) .shirt-svg { background: radial-gradient(110% 90% at 50% 25%, #fff, #fff0e4 60%, #ffdcc4); }
.product-grid > :nth-child(5n+5) .pc-img, .dm-track > :nth-child(5n+5) .shirt-svg { background: radial-gradient(110% 90% at 50% 25%, #fff, #e8f0ff 60%, #d3e1ff); }

/* Segmented tabs & chips */
.seg { background: rgba(var(--soft-rgb), 0.9); border-color: var(--border); }
.seg-btn.active { background: #fff; color: var(--violet); box-shadow: 0 6px 16px -8px rgba(var(--c1-rgb), 0.6); }
.cam-pick .seg-btn.active { background: var(--brand-grad); color: #fff; }
.filter-chip.active, .chip.active { background: var(--brand-grad); color: #fff; border-color: transparent; }

/* Tab bar: colourful active tab with a glowing pill */
.tabbar { background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--border); box-shadow: 0 -12px 30px -22px rgba(var(--c1-rgb), 0.6); }
.tab-item { color: #9a91b3; }
.tab-item.active { color: var(--violet); }
.tab-item.active .ic { color: var(--rose); filter: drop-shadow(0 4px 8px rgba(var(--c3-rgb), .35)); }
.tab-item.active::before { background: var(--brand-grad); width: 34px; box-shadow: 0 2px 10px rgba(var(--c3-rgb), .6); }

/* Customer home hero & showroom hero: night-sky gradient with floating glows */
.home-hero, .showroom-hero { background: radial-gradient(60% 80% at 90% 10%, rgba(255, 154, 77, 0.55), transparent 60%), radial-gradient(70% 90% at 0% 100%, rgba(18, 179, 166, 0.35), transparent 60%), var(--night-grad); border: 0; color: #fff; box-shadow: 0 30px 60px -30px rgba(var(--deep-rgb), 0.85); overflow: hidden; }
.home-hero h1, .showroom-hero h1 { color: #fff; background: none; -webkit-text-fill-color: #fff; }
.home-hero h1 .gold-text, .home-hero h1 span { background: linear-gradient(90deg, #ffd27a, #ff9ec2); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; animation: none; }
.home-hero p, .hh-hi, .showroom-hero p { color: rgba(255, 255, 255, 0.82); }
.home-hero .chip, .home-hero .tag, .home-hero .hh-tags > * { background: rgba(255, 255, 255, 0.14); color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.home-hero::after, .showroom-hero::after { content: ""; position: absolute; width: 220px; height: 220px; right: -60px; bottom: -80px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 70%); animation: drift 9s ease-in-out infinite alternate; pointer-events: none; }
@keyframes drift { to { transform: translate(-40px, -30px) scale(1.15); } }

/* Business dashboard */
.kpi-hero { background: radial-gradient(70% 90% at 100% 0%, rgba(255, 154, 77, 0.6), transparent 60%), radial-gradient(60% 80% at 0% 100%, rgba(18, 179, 166, 0.4), transparent 60%), var(--night-grad); border: 0; color: #fff; box-shadow: 0 30px 60px -30px rgba(var(--deep-rgb), 0.9); }
.kpi-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.18) 50%, transparent 65%); transform: translateX(-120%); animation: sheen 5s ease-in-out infinite; pointer-events: none; }
.kpi-hero .label { color: rgba(255, 255, 255, 0.78); }
.kpi-hero .big { background: none; color: #fff; -webkit-text-fill-color: #fff; text-shadow: 0 6px 24px rgba(var(--ink-deep-rgb), 0.4); }
.trend.flat { color: #fff; background: rgba(255, 255, 255, 0.18); }
.kpi-hero .trend.up { color: #0b5f3a; background: #c9f5df; }
.kpi-hero .trend.down { color: #8f1d3a; background: #ffd6e2; }
.kpi { position: relative; overflow: hidden; }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--brand-grad); }
.kpi-grid .kpi:nth-child(1)::before { background: var(--sun-grad); }
.kpi-grid .kpi:nth-child(2)::before { background: var(--teal-grad); }
.kpi-grid .kpi:nth-child(3)::before { background: var(--sky-grad); }
.kpi-grid .kpi:nth-child(1) strong { color: #d4570f; }
.kpi-grid .kpi:nth-child(2) strong { color: #0c8a80; }
.kpi-grid .kpi:nth-child(3) strong { color: #3a5fd6; }
.quick-grid a .ic { color: #fff; box-shadow: 0 10px 20px -10px rgba(var(--c1-rgb), 0.8); }
.quick-grid a:nth-child(4n+1) .ic { background: var(--brand-grad); }
.quick-grid a:nth-child(4n+2) .ic { background: var(--teal-grad); box-shadow: 0 10px 20px -10px rgba(18, 179, 166, 0.8); }
.quick-grid a:nth-child(4n+3) .ic { background: var(--sun-grad); box-shadow: 0 10px 20px -10px rgba(255, 138, 91, 0.8); }
.quick-grid a:nth-child(4n+4) .ic { background: var(--sky-grad); box-shadow: 0 10px 20px -10px rgba(79, 139, 255, 0.8); }
.chart-card h2, .dash-card h2 { color: var(--violet); }
.top-item .meter i { background: var(--brand-grad); }
.chart .val { fill: var(--rose); }

/* Welcome: one colour per role */
.role-tile .rt-icon { background: var(--soft); color: var(--violet); border-color: var(--border-strong); }
.role-tile[data-role=retailer] .rt-icon { color: var(--violet); }
.role-tile[data-role=distributor] .rt-icon { color: var(--teal); }
.role-tile[data-role=customer] .rt-icon { color: var(--rose); }
.role-tile.selected { border-color: transparent; color: #fff; box-shadow: 0 20px 40px -18px rgba(var(--c1-rgb), 0.8); }
.role-tile[data-role=retailer].selected { background: linear-gradient(135deg, var(--c1), var(--c1)); }
.role-tile[data-role=distributor].selected { background: linear-gradient(135deg, #0fa89c, #3d8bff); box-shadow: 0 20px 40px -18px rgba(18, 179, 166, 0.8); }
.role-tile[data-role=customer].selected { background: linear-gradient(135deg, var(--c3), #ff9a4d); box-shadow: 0 20px 40px -18px rgba(var(--c3-rgb), 0.8); }
.role-tile.selected .rt-icon { background: rgba(255, 255, 255, 0.22); color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.gold-rule { background: var(--brand-grad); width: 90px; height: 2px; border-radius: 2px; }

/* Splash: colourful bubbles on a soft violet-rose sky */
#splash { background: radial-gradient(circle at 50% 46%, #ffffff 0%, #f4ecff 45%, #ffd9e8 80%, #ffe3cc 100%); }
.bubbles i:nth-child(3n+1) { background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .95), rgba(var(--c1-rgb), .55) 60%, rgba(var(--c1-rgb), .25)); }
.bubbles i:nth-child(3n+2) { background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .95), rgba(var(--c3-rgb), .55) 60%, rgba(var(--c3-rgb), .25)); }
.bubbles i:nth-child(3n) { background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .95), rgba(80, 210, 195, .55) 60%, rgba(18, 179, 166, .25)); }
.splash-orb { box-shadow: 0 0 0 6px rgba(255, 255, 255, .6), 0 20px 60px -10px rgba(var(--c2-rgb), .55); }
.splash-orb::after { border-color: rgba(var(--c2-rgb), .45); }

/* Offer slides: default "gold" becomes a sunset */
.theme-gold { background: linear-gradient(135deg, #ffd27a 0%, #ff9a7a 55%, var(--c3) 100%); color: var(--ink-deep); }
.offer-dots button.on { background: var(--brand-grad); }

/* Lists & status */
.list-row:hover { background: rgba(var(--soft-rgb), 0.7); }
.lr-icon { background: var(--brand-soft); color: var(--violet); }

/* Screens float in with a little colour */
@media (prefers-reduced-motion: reduce) {
  body::before, .btn-gold, .btn-primary, .wordmark, .section-head h2, .topbar::after, .appbar::after, .kpi-hero::after, .home-hero::after { animation: none !important; }
}

/* ===== Luxe refinement: jewel tones + champagne gold (premium feel) ===== */
:root {
  --champagne: linear-gradient(135deg, #fff3d6 0%, var(--gold-hi) 40%, var(--gold-mid) 75%, #f6dfa6 100%);
  --brand-grad: linear-gradient(120deg, #4b1fa8 0%, #7a2fc4 35%, var(--c2) 70%, #e59a74 100%);
  --night-grad: linear-gradient(140deg, #1c0d3a 0%, var(--deep) 45%, var(--c2-deep) 100%);
}
.wordmark, .splash-name, .form-head h1, .screen-title, .pd-info h1, .section-head h2, .dash-head h1, .gold-text {
  background: linear-gradient(100deg, var(--deep), var(--c2-deep), var(--gold-mid), var(--c2-deep), var(--deep)); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* Gold details on the dark hero cards */
.kpi-hero .big, .home-hero h1 { background: var(--champagne); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; text-shadow: none; }
.kpi-hero, .home-hero, .showroom-hero { box-shadow: 0 30px 60px -30px rgba(var(--deep-rgb), 0.9), inset 0 0 0 1px rgba(var(--gold-hi-rgb), 0.35); }
.kpi-hero .label, .hh-hi { color: var(--gold-hi); letter-spacing: .16em; }
.avatar { background: var(--champagne); color: var(--deep); box-shadow: 0 8px 18px -8px rgba(var(--gold-mid-rgb), 0.8); }
/* Fine gold hairline on cards, like foil edging */
.card, .kpi, .product-card, .dm-item, .quick-grid a { border-color: rgba(var(--gold-mid-rgb), 0.22); }
.tab-item.active { color: var(--deep); }
.tab-item.active .ic { color: var(--c2-deep); }
.tab-item.active::before { background: var(--champagne); box-shadow: 0 2px 10px rgba(var(--gold-mid-rgb), .7); }
.topbar::after, .appbar::after { background: linear-gradient(90deg, var(--deep), var(--c2), var(--gold-hi), var(--c2), var(--deep)); background-size: 300% 100%; }
.pill { color: var(--deep); }
.theme-gold { background: radial-gradient(70% 90% at 100% 0%, rgba(var(--gold-hi-rgb), .55), transparent 60%), linear-gradient(135deg, var(--deep), var(--c2-deep)); color: #fff; }
.theme-gold .offer-tag { background: var(--champagne); color: var(--deep); }
.theme-gold::before { background: rgba(var(--gold-hi-rgb), .14); }

/* Try-on: which side of the tee is showing */
.side-badge { position: absolute; top: 16px; right: 16px; z-index: 2; padding: 6px 12px; border-radius: 999px; font-size: .76rem; font-weight: 700; letter-spacing: .04em; color: var(--deep); background: var(--champagne); box-shadow: 0 8px 20px -10px rgba(var(--deep-rgb), .8); }
.side-badge.back { color: #fff; background: var(--brand-grad); }
.side-badge.flip { animation: sideFlip .5s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes sideFlip { from { transform: rotateY(90deg) scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }

/* Invoices: logo on the document and in Profile */
.doc-brand { display: flex; gap: 14px; align-items: flex-start; }
.doc-logo { width: 72px; height: 72px; object-fit: contain; flex-shrink: 0; }
.logo-pick { display: flex; gap: 14px; align-items: center; margin: 14px 0; }
.logo-box { width: 76px; height: 76px; border-radius: 14px; border: 1px dashed var(--border-strong); display: grid; place-items: center; background: #fff; overflow: hidden; flex-shrink: 0; }
.logo-box img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
/* PDF: the invoice laid out at A4 width, whatever the phone */
.invoice-doc.pdf-mode { width: 794px; max-width: none; margin: 0; box-shadow: none; border: 0; border-radius: 0; padding: 36px 40px; background: #fff !important; color: #111; backdrop-filter: none; }
.invoice-doc.pdf-mode .doc-head { display: flex; justify-content: space-between; gap: 20px; }
.invoice-doc.pdf-mode .doc-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.invoice-doc.pdf-mode .doc-bottom { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.invoice-doc.pdf-mode .table-wrap { overflow: visible; }
.invoice-doc.pdf-mode .doc-table { min-width: 0; width: 100%; }

/* ================= VIYA Admin: tidy layout on phones ================= */
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 16px; }
.admin-head h1 { margin: 0; font-family: var(--serif); font-size: clamp(1.4rem, 5.5vw, 1.9rem); }
.admin-head .admin-who { margin: 4px 0 0; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .85rem; }
.admin-head .admin-who .ic { width: 16px; height: 16px; }
.admin-nav { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin: 0 0 18px; }
.an-tile { position: relative; display: grid; justify-items: center; gap: 6px; padding: 12px 4px 10px; border-radius: 16px; background: rgba(255, 255, 255, .9); border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--muted); font-size: .74rem; font-weight: 600; text-decoration: none !important; text-align: center; transition: transform .15s, border-color .15s, background .15s; }
.an-tile .ic { width: 22px; height: 22px; color: var(--violet); }
.an-tile span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.an-tile:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.an-tile.active { background: var(--brand-grad); color: #fff; border-color: transparent; box-shadow: 0 12px 24px -12px rgba(var(--c1-rgb), .8); }
.an-tile.active .ic { color: #fff; }
.an-badge { position: absolute; top: 6px; right: 8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--rose); color: #fff; font-size: .68rem; line-height: 18px; }
@media (max-width: 680px) { .admin-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Admin product rows: photo · details, buttons on their own line */
.admin-prod { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 12px 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.admin-prod:last-child { border-bottom: 0; }
.admin-prod .thumbimg { width: 76px; height: 76px; border-radius: 14px; overflow: hidden; background: var(--studio); display: grid; place-items: center; }
.admin-prod .thumbimg > * { width: 100%; height: 100%; object-fit: cover; }
.admin-prod .ap-info { min-width: 0; }
.admin-prod .ap-info h3 { margin: 0 0 2px; font-size: 1rem; line-height: 1.25; }
.admin-prod .ap-info p { margin: 0; color: var(--muted); font-size: .82rem; }
.admin-prod .ap-price { margin-top: 4px !important; }
.admin-prod .ap-price strong { color: var(--violet); font-size: .95rem; }
.admin-prod .ap-price span { margin-left: 6px; }
.admin-prod .ap-actions { margin: 0; flex-wrap: nowrap; }
@media (max-width: 680px) {
  .admin-prod { grid-template-columns: 64px minmax(0, 1fr); }
  .admin-prod .thumbimg { width: 64px; height: 64px; }
  .admin-prod .ap-actions { grid-column: 1 / -1; justify-content: flex-start; gap: 8px; }
}

/* ================= Offers tab ================= */
.offers-h { display: flex; align-items: center; gap: 8px; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; margin: 6px 0 12px; font-family: Inter, sans-serif; }
.offers-h .ic { width: 18px; height: 18px; color: var(--violet); }
.viya-offer-list { display: grid; gap: 12px; margin-bottom: 22px; }
.viya-offer-list .offer-slide { border-radius: 22px; box-shadow: var(--shadow); }
.poffer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-bottom: 22px; }
.poffer { position: relative; overflow: hidden; border-radius: 22px; padding: 16px 16px 14px; display: grid; gap: 6px; box-shadow: var(--shadow); }
.poffer.theme-gold, .poffer.theme-black, .poffer.theme-maroon, .poffer.theme-bottlegreen { color: #fff; }
.poffer.theme-lavender, .poffer.theme-beige { color: #241a0f; }
.poffer::before { content: ""; position: absolute; right: -50px; top: -60px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255, 255, 255, .18); pointer-events: none; }
.poffer.is-off { opacity: .55; filter: grayscale(.4); }
.poffer h3 { margin: 0; font-family: var(--serif); font-size: 1.25rem; line-height: 1.2; position: relative; }
.poffer p { margin: 0; opacity: .88; font-size: .9rem; position: relative; }
.po-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; position: relative; }
.po-shop { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 700; letter-spacing: .04em; opacity: .9; }
.po-shop .ic { width: 15px; height: 15px; }
.po-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; position: relative; }
.po-code { border: 1.5px dashed currentColor; background: rgba(255, 255, 255, .22); color: inherit; border-radius: 10px; padding: 5px 10px; font: 700 .86rem/1 ui-monospace, Menlo, monospace; letter-spacing: .08em; cursor: pointer; }
.po-code small { font-family: Inter, sans-serif; font-weight: 600; letter-spacing: 0; opacity: .75; margin-left: 4px; }
.po-valid { font-size: .76rem; opacity: .8; }
.po-prod { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: 14px; background: rgba(255, 255, 255, .85); color: var(--text); text-decoration: none !important; font-weight: 600; font-size: .86rem; position: relative; }
.po-prod > :first-child { width: 42px; height: 42px; border-radius: 10px; overflow: hidden; flex-shrink: 0; object-fit: cover; }
.po-prod span { flex: 1; }
.po-prod .ic { width: 16px; height: 16px; }
.po-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; position: relative; }
.po-actions:empty { display: none; }
.poffer .btn-outline { background: rgba(255, 255, 255, .9); }
.offers-intro { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.offers-intro h2 { margin: 0 0 2px; font-size: 1.05rem; }
.offers-intro p { margin: 0; }
/* Invoice QR codes: cashback + scan to pay */
.doc-qr { display: flex; flex-wrap: wrap; gap: 14px; margin: 18px 0 6px; padding-top: 14px; border-top: 1px dashed #ddd; }
.qr-box { display: flex; align-items: center; gap: 12px; flex: 1 1 260px; }
.qr-box .qr { width: 104px; height: 104px; flex-shrink: 0; background: #fff; padding: 2px; border: 1px solid #eee; border-radius: 8px; }
.qr-box .qr svg { width: 100%; height: 100%; display: block; }
.qr-box p { margin: 0; font-size: .78rem; color: #444; line-height: 1.4; }
.qr-box p strong { color: #111; font-size: .86rem; }

/* Admin cashback */
.cb-cam { position: relative; margin: 8px 0 12px; border-radius: 16px; overflow: hidden; background: #000; }
.cb-cam video { width: 100%; max-height: 360px; object-fit: cover; display: block; }
.cb-cam .btn { position: absolute; right: 10px; bottom: 10px; }
.cb-result { display: grid; gap: 12px; padding: 14px; border-radius: 18px; border: 1px solid var(--border-strong); background: var(--brand-soft); }
.cb-result.is-done { background: #f2f2f2; }
.cb-amount { display: grid; gap: 2px; }
.cb-amount span { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.cb-amount strong { font-family: var(--serif); font-size: 2rem; color: var(--violet); }
.cb-amount small { color: var(--muted); }
.cb-redeem { display: grid; grid-template-columns: 1fr 110px auto; gap: 8px; }
@media (max-width: 680px) { .cb-redeem { grid-template-columns: 1fr 100px; } .cb-redeem .btn { grid-column: 1 / -1; } }
.cb-cfg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 10px; }
.cb-cfg label { display: grid; gap: 4px; font-size: .8rem; color: var(--muted); font-weight: 600; }
.error-note { background: var(--error-soft); color: var(--error); }
.admin-nav { grid-template-columns: repeat(9, minmax(0, 1fr)); }
@media (max-width: 680px) { .admin-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); } .an-tile { font-size: .68rem; padding: 10px 2px 8px; } }
/* ================= Stock ================= */
.stock-kpis .kpi strong { font-size: 1.3rem; }
.low-card .form-section { display: flex; align-items: center; gap: 8px; }
.low-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.low-row:last-of-type { border-bottom: 0; margin-bottom: 10px; }
.low-row strong { color: #c46a00; white-space: nowrap; }
.low-row strong.out { color: var(--error); }
.stock-list { display: grid; gap: 12px; }
.stock-card .sc-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.stock-card .sc-head h3 { margin: 0; font-size: 1rem; }
.stock-card .sc-head p { margin: 2px 0 0; }
.sc-img { width: 52px; height: 52px; border-radius: 12px; overflow: hidden; background: var(--studio); flex-shrink: 0; }
.sc-img > * { width: 100%; height: 100%; object-fit: cover; }
.size-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.size-cell { border: 1px solid var(--border); border-radius: 14px; padding: 8px 6px 6px; text-align: center; background: #fff; display: grid; gap: 2px; }
.size-cell span { font-size: .72rem; font-weight: 700; color: var(--muted); letter-spacing: .06em; }
.size-cell strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.size-cell.low { border-color: #f0b35a; background: #fff8ec; }
.size-cell.out { border-color: #f1a3a3; background: #fff2f2; }
.size-cell.out strong { color: var(--error); }
.sc-btns { display: flex; justify-content: center; gap: 6px; }
.sc-btns button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border-strong); background: #fff; font-size: 1rem; line-height: 1; cursor: pointer; color: var(--violet); }
.size-inputs { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.size-inputs label { display: grid; gap: 4px; text-align: center; font-weight: 700; font-size: .78rem; color: var(--muted); }
.size-inputs input { text-align: center; }
.ir-stock { grid-column: 1 / -1; }
.ir-stock select { width: 100%; }
.search input, .search input:focus { border: 0 !important; box-shadow: none !important; background: transparent !important; padding-left: 4px; }
/* ================= Admin analytics ================= */
.an-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.an-filters .seg { margin: 0; }
.an-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 12px 0; }
.an-card h3 { margin: 0 0 10px; font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--violet); font-family: Inter, sans-serif; }
.donut-wrap { display: grid; grid-template-columns: 130px 1fr; gap: 14px; align-items: center; }
.donut { width: 130px; height: 130px; }
.donut path { transition: opacity .15s; } .donut:hover path { opacity: .75; } .donut path:hover { opacity: 1; }
.donut .d-total { font: 700 15px Inter, sans-serif; fill: var(--text); } .donut .d-sub { font: 11px Inter, sans-serif; fill: var(--muted); }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .82rem; }
.legend li { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: center; color: var(--text); }
.legend i { width: 12px; height: 12px; border-radius: 3px; }
.legend span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend b { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.an-table { width: 100%; border-collapse: collapse; font-size: .86rem; min-width: 560px; }
.an-table th { text-align: left; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--border); }
.an-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.an-table td small { display: block; color: var(--muted); font-size: .74rem; }
.an-table .r { text-align: right; font-variant-numeric: tabular-nums; }


/* =====================================================================
   COLOUR THEMES — pick in Profile → App colours. Each theme sets the same tokens.
   ===================================================================== */
:root, :root[data-palette="plum"] {
  --c1: #6c3ce1; --c1-rgb: 108, 60, 225; --c2: #c2389f; --c2-rgb: 194, 56, 159; --c3: #e8487f; --c3-rgb: 232, 72, 127;
  --deep: #3d1a78; --deep-rgb: 61, 26, 120; --c2-deep: #8a2a8c; --ink-deep: #2b1550; --ink-deep-rgb: 43, 21, 80;
  --gold-hi: #f1cf86; --gold-hi-rgb: 241, 207, 134; --gold-mid: #c9963a; --gold-mid-rgb: 201, 150, 58; --soft-rgb: 244, 240, 255;
}
:root[data-palette="emerald"] {
  --c1: #0e7c66; --c1-rgb: 14, 124, 102; --c2: #12957a; --c2-rgb: 18, 149, 122; --c3: #d98b2b; --c3-rgb: 217, 139, 43;
  --deep: #0a3f35; --deep-rgb: 10, 63, 53; --c2-deep: #0f5c4c; --ink-deep: #06261f; --ink-deep-rgb: 6, 38, 31;
  --gold-hi: #f3d58f; --gold-hi-rgb: 243, 213, 143; --gold-mid: #c99a3c; --gold-mid-rgb: 201, 154, 60; --soft-rgb: 234, 246, 241;
  --violet: #0e7c66; --rose: #d98b2b; --plum: #06261f;
  --brand-grad: linear-gradient(120deg, #0a4d3f 0%, #0e7c66 40%, #23a585 72%, #e2b24e 100%);
  --brand-soft: linear-gradient(135deg, #e9f7f1 0%, #f4f9ef 55%, #fff6e3 100%);
  --night-grad: linear-gradient(140deg, #06261f 0%, #0a4d3f 50%, #0f6e5a 100%);
  --gold-text: linear-gradient(100deg, #0a4d3f 0%, #0e7c66 55%, #c99a3c 100%);
  --bg: #f7fbf9; --soft: #eaf6f1; --text: #10231e; --muted: #5d716b;
  --border: rgba(14, 124, 102, 0.14); --border-strong: rgba(14, 124, 102, 0.34);
  --shadow: 0 1px 2px rgba(6, 38, 31, 0.05), 0 16px 36px -20px rgba(14, 124, 102, 0.4);
  --studio: radial-gradient(120% 95% at 50% 28%, #ffffff 0%, #eef8f3 55%, #ddefe6 100%);
}
:root[data-palette="midnight"] {
  --c1: #2b4fd0; --c1-rgb: 43, 79, 208; --c2: #5b46d8; --c2-rgb: 91, 70, 216; --c3: #ff6b5a; --c3-rgb: 255, 107, 90;
  --deep: #16245e; --deep-rgb: 22, 36, 94; --c2-deep: #2b2f8f; --ink-deep: #0b1233; --ink-deep-rgb: 11, 18, 51;
  --gold-hi: #ffd08a; --gold-hi-rgb: 255, 208, 138; --gold-mid: #e09a3e; --gold-mid-rgb: 224, 154, 62; --soft-rgb: 238, 241, 253;
  --violet: #2b4fd0; --rose: #ff6b5a; --plum: #0b1233;
  --brand-grad: linear-gradient(120deg, #16245e 0%, #2b4fd0 42%, #6a7dff 70%, #ff7a59 100%);
  --brand-soft: linear-gradient(135deg, #eef1fd 0%, #f3efff 55%, #fff1ec 100%);
  --night-grad: linear-gradient(140deg, #0b1233 0%, #16245e 50%, #2b4fd0 100%);
  --gold-text: linear-gradient(100deg, #16245e 0%, #2b4fd0 55%, #ff6b5a 100%);
  --bg: #f8f9ff; --soft: #eef1fd; --text: #121834; --muted: #626a8a;
  --border: rgba(43, 79, 208, 0.13); --border-strong: rgba(43, 79, 208, 0.32);
  --shadow: 0 1px 2px rgba(11, 18, 51, 0.05), 0 16px 36px -20px rgba(43, 79, 208, 0.4);
  --studio: radial-gradient(120% 95% at 50% 28%, #ffffff 0%, #f0f3ff 55%, #e1e7fd 100%);
}
:root[data-palette="sunset"] {
  --c1: #d23f5c; --c1-rgb: 210, 63, 92; --c2: #ee6a3c; --c2-rgb: 238, 106, 60; --c3: #f7a531; --c3-rgb: 247, 165, 49;
  --deep: #7a1f3d; --deep-rgb: 122, 31, 61; --c2-deep: #a3324a; --ink-deep: #3d0f1f; --ink-deep-rgb: 61, 15, 31;
  --gold-hi: #ffd98f; --gold-hi-rgb: 255, 217, 143; --gold-mid: #e0a03a; --gold-mid-rgb: 224, 160, 58; --soft-rgb: 255, 240, 236;
  --violet: #d23f5c; --rose: #ee6a3c; --plum: #3d0f1f;
  --brand-grad: linear-gradient(120deg, #b3264d 0%, #e04a4a 40%, #f7823b 72%, #ffc145 100%);
  --brand-soft: linear-gradient(135deg, #fff0ec 0%, #fff4e8 55%, #fff9e6 100%);
  --night-grad: linear-gradient(140deg, #3d0f1f 0%, #7a1f3d 50%, #b3264d 100%);
  --gold-text: linear-gradient(100deg, #7a1f3d 0%, #d23f5c 55%, #f08a2c 100%);
  --bg: #fffaf8; --soft: #fff0ec; --text: #2a1317; --muted: #7a5f63;
  --border: rgba(210, 63, 92, 0.13); --border-strong: rgba(210, 63, 92, 0.32);
  --shadow: 0 1px 2px rgba(61, 15, 31, 0.05), 0 16px 36px -20px rgba(210, 63, 92, 0.4);
  --studio: radial-gradient(120% 95% at 50% 28%, #ffffff 0%, #fff4f0 55%, #fde3dc 100%);
}
/* Headings follow the theme's ink gradient */
:root[data-palette="emerald"] .wordmark, :root[data-palette="emerald"] .splash-name, :root[data-palette="emerald"] .form-head h1, :root[data-palette="emerald"] .screen-title, :root[data-palette="emerald"] .pd-info h1, :root[data-palette="emerald"] .section-head h2, :root[data-palette="emerald"] .dash-head h1, :root[data-palette="emerald"] .gold-text,
:root[data-palette="midnight"] .wordmark, :root[data-palette="midnight"] .splash-name, :root[data-palette="midnight"] .form-head h1, :root[data-palette="midnight"] .screen-title, :root[data-palette="midnight"] .pd-info h1, :root[data-palette="midnight"] .section-head h2, :root[data-palette="midnight"] .dash-head h1, :root[data-palette="midnight"] .gold-text,
:root[data-palette="sunset"] .wordmark, :root[data-palette="sunset"] .splash-name, :root[data-palette="sunset"] .form-head h1, :root[data-palette="sunset"] .screen-title, :root[data-palette="sunset"] .pd-info h1, :root[data-palette="sunset"] .section-head h2, :root[data-palette="sunset"] .dash-head h1, :root[data-palette="sunset"] .gold-text {
  background: linear-gradient(100deg, var(--deep), var(--c1), var(--gold-mid), var(--c1), var(--deep)); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
}
:root[data-palette="emerald"] .theme-gold, :root[data-palette="midnight"] .theme-gold, :root[data-palette="sunset"] .theme-gold { background: radial-gradient(70% 90% at 100% 0%, rgba(var(--gold-hi-rgb), .5), transparent 60%), var(--night-grad); color: #fff; }
/* Theme picker */
.palette-pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.palette-pick button { display: grid; gap: 6px; justify-items: center; padding: 10px 4px; border-radius: 16px; border: 1.5px solid var(--border); background: #fff; font: inherit; font-size: .74rem; font-weight: 600; color: var(--text); cursor: pointer; }
.palette-pick button.active { border-color: var(--c1); box-shadow: 0 0 0 3px rgba(var(--c1-rgb), .18); }
.palette-pick i { width: 42px; height: 42px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6); }
:root[data-palette] .home-hero h1 .gold-text, :root[data-palette] .home-hero h1 span { background: linear-gradient(90deg, var(--gold-hi), #ffffff) !important; -webkit-background-clip: text !important; background-clip: text !important; color: transparent !important; -webkit-text-fill-color: transparent !important; animation: none !important; }
.showroom-hero, .home-hero, .kpi-hero { position: relative; overflow: hidden; }
html, body { overflow-x: clip; } /* nothing may ever make a screen slide sideways */

/* Dropdown sheets on phones: list scrolls on its own, search stays on top, page behind stays still */
.dd-panel { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.dd-search { position: sticky; top: -10px; z-index: 2; box-shadow: 0 -10px 0 #fff, 0 6px 10px -8px rgba(0,0,0,.15); }
html.dd-lock, html.dd-lock body { overflow: hidden; }

.dd-panel.single .dd-opt .tick { border-radius: 50%; }
.dd-panel.sheet { z-index: 1001; }
.dd-backdrop { z-index: 1000 !important; }

/* PDF safe mode: plain colours only (some phones can't render gradient text into the PDF) */
.pdf-safe, .pdf-safe * { background-image: none !important; -webkit-text-fill-color: currentColor !important; animation: none !important; transition: none !important; box-shadow: none !important; text-shadow: none !important; filter: none !important; }
.pdf-safe h1, .pdf-safe h2, .pdf-safe h3 { color: #111 !important; }

/* ---------- AR try-on: Tracking Debug Mode ---------- */
.stage canvas.debug-layer { pointer-events: none; z-index: 1; }
.stage-hint, .cam-label, .side-badge, .stage-loading, .stage-controls { z-index: 2; }
.debug-toggle { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: .9rem; font-weight: 600; cursor: pointer; }
.debug-toggle small { display: block; font-weight: 400; font-size: .8rem; }
.debug-toggle input { flex: none; width: 18px; height: 18px; accent-color: var(--c1, #0f6b5c); }

/* ---------- AR try-on: the live camera preview is the video itself; the tee is drawn on a see-through layer above it ---------- */
.stage.cam video { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 1; object-fit: cover; }
.stage.cam.mirror video { transform: scaleX(-1); }
.stage-hint { white-space: normal; width: max-content; max-width: 88%; text-align: center; border-radius: 16px; line-height: 1.35; }

/* ---------- AR try-on: size picker ---------- */
.size-pick { margin: 10px 0 4px; }
.size-pick .seg { display: flex; max-width: 320px; }
.size-pick .seg-btn { flex: 1; }
.size-pick p { margin: 6px 0 0; line-height: 1.45; }
.size-pick .unverified { color: #a3550a; font-weight: 600; }
.fitcat { display: grid; gap: 4px; margin: 8px 0; }
.fitcat select { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border-strong, #c9d6cf); background: #fff; font: inherit; }

.size-pick .sizenote { color: #5c6b64; font-size: .82rem; }

/* ---------- Admin: quotations tab ---------- */
.quote-head { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; }
.quote-head .qh-logo { width: 72px; height: 72px; flex: none; display: grid; place-items: center; border-radius: 14px; background: #fff; border: 1px solid var(--border-strong, #d9e2dc); overflow: hidden; text-align: center; padding: 4px; }
.quote-head .qh-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.quote-head .qh-text { display: grid; gap: 2px; min-width: 0; }

/* ---------- CRM (admin only) ---------- */
.crm-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.crm-head h1 { margin: 0; font-family: var(--serif); font-size: 1.5rem; }
.crm-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border-strong, #d9e2dc); }
.crm-nav a { font-weight: 600; text-decoration: none; padding: 6px 12px; border-radius: 999px; color: inherit; }
.crm-nav a.active { background: var(--c1, #0f6b5c); color: #fff; }
.crm-soon { font-size: .76rem; color: #7b877f; flex-basis: 100%; }
.crm-range { display: flex; max-width: 420px; margin: 0 0 8px; }
.crm-range .seg-btn { flex: 1; text-align: center; text-decoration: none; }
.crm-custom, .crm-search { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.crm-custom input, .crm-search input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border-strong, #c9d6cf); background: #fff; font: inherit; }
.crm-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 720px) { .crm-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.crm-kpi { background: #fff; border: 1px solid var(--border-strong, #d9e2dc); border-radius: 16px; padding: 12px 14px; display: grid; gap: 2px; }
.crm-kpi small { color: #5c6b64; font-size: .78rem; }
.crm-kpi strong { font-size: 1.5rem; line-height: 1.2; }
.crm-kpi em { font-style: normal; font-size: .7rem; color: #9aa59e; }
.crm-block { border: 1px solid var(--border-strong, #d9e2dc); border-radius: 14px; padding: 12px; margin: 0 0 12px; background: rgba(255,255,255,.6); }
.crm-block-head { display: flex; justify-content: space-between; align-items: center; margin: 0 0 8px; }
.crm-block select, .crm-block input:not([type=file]), .crm-block textarea { width: 100%; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--border-strong, #c9d6cf); background: #fff; font: inherit; box-sizing: border-box; }
.crm-sizes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.crm-sizes label { display: grid; gap: 4px; font-size: .8rem; font-weight: 600; text-align: center; }
.crm-sizes input { text-align: center; padding: 9px 4px !important; }
.crm-img img, .crm-pic { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border-strong, #d9e2dc); vertical-align: middle; }
.crm-pic { width: 96px; height: 96px; margin: 8px 8px 0 0; }
.crm-dl { display: grid; grid-template-columns: 1fr; gap: 6px 16px; margin: 10px 0 0; }
@media (min-width: 560px) { .crm-dl { grid-template-columns: 1fr 1fr; } }
.crm-dl div { display: grid; grid-template-columns: 120px 1fr; gap: 8px; }
.crm-dl dt { color: #5c6b64; font-size: .84rem; } .crm-dl dd { margin: 0; overflow-wrap: anywhere; }
.crm-item + .crm-item { border-top: 1px dashed var(--border-strong, #d9e2dc); margin-top: 12px; padding-top: 4px; }
.crm-denied { text-align: center; }
.crm-link { font-size: .85rem; }

.crm-who { font-size: .85rem; color: #5c6b64; }
.crm-staff .lr-side { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }

/* VIYA Admin → Enquiries tab: requirement blocks inside an enquiry card */
.enq-sub { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-strong, #d9e2dc); }
.enq-sub .form-section { margin-top: 0; }

/* Registered firm name under the brand on admin invoices */
.inv-legal { margin: 2px 0 4px; font-size: .92rem; color: var(--ink, #1b2a24); }

.inv-firm { text-transform: uppercase; letter-spacing: .04em; color: var(--gold-deep, #9a6b00); }
.inv-foot-logo { text-align: center; margin: 22px 0 0; }
.inv-foot-logo img { height: 64px; width: auto; }

/* Admin invoices / quotations: "saved online" line */
.sync-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sync-note.ok { color: var(--green-deep, #0f6b4f); }
.sync-note .icon { width: 16px; height: 16px; }

/* Editable invoice / quotation number */
.inv-no-edit { display: grid; gap: 4px; min-width: 0; flex: 1 1 200px; }
.inv-no-edit input.inv-no { width: 100%; max-width: 260px; padding: 8px 10px; border: 1.5px solid var(--border-strong, #d9e2dc); border-radius: 10px; background: #fff; color: inherit; font-size: 1.05rem; text-transform: uppercase; }
.inv-no-edit input.inv-no:focus { outline: none; border-color: var(--gold, #c9a227); box-shadow: 0 0 0 3px rgba(201, 162, 39, .18); }
.inv-no-edit input.inv-no.invalid { border-color: var(--error); background: var(--error-soft); }
.inv-no-edit .field-error { color: var(--error); font-size: .8rem; min-height: 0; }
.inv-no-hint { font-weight: 400; opacity: .8; }

/* VIYA CRM: Excel download / upload */
.excel-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.xl-card { margin: 0 0 14px; }
.xl-card details { margin: 8px 0; }
.xl-card summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.xl-list { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: .88rem; max-height: 320px; overflow: auto; }
.xl-bad { color: var(--error); }
.error-note { color: var(--error); }

/* VIYA CRM: assigning enquiries to employees (admin) */
.assign-box { display: grid; gap: 6px; margin: 12px 0 4px; }
.assign-box label { font-weight: 600; font-size: .9rem; }
.assign-box select, .assign-filter select { min-height: 44px; border: 1.5px solid var(--border-strong, #d9e2dc); border-radius: 10px; padding: 8px 10px; background: #fff; color: inherit; font: inherit; max-width: 100%; }
.assign-filter { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: .9rem; }
.assign-filter select { flex: 1 1 auto; min-width: 0; }
.assign-chip { color: var(--green-deep, #0f6b4f); font-weight: 600; }
.assign-chip.none { color: var(--gold-deep, #9c7414); }
.staff-perf a { color: inherit; text-decoration: underline; }
/* Employees screen: name + performance on top, buttons on their own line (no overlap on narrow phones) */
.list-row.crm-staff { flex-wrap: wrap; align-items: flex-start; row-gap: 8px; }
.list-row.crm-staff .lr-main { flex: 1 1 100%; min-width: 0; }
.list-row.crm-staff .lr-side { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-start; }
.assign-inline { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: .88rem; }
.assign-inline select { flex: 1 1 auto; min-width: 0; min-height: 40px; border: 1.5px solid var(--border-strong, #d9e2dc); border-radius: 10px; padding: 6px 10px; background: #fff; color: inherit; font: inherit; }
.acc-card .crm-dl a { color: inherit; }
/* CRM Customers: type filter wraps on narrow phones */
.acc-seg { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.acc-seg .seg-btn { flex: 0 0 auto; padding: 7px 12px; border-radius: 999px; border: 1.5px solid var(--border-strong, #d9e2dc); font-size: .85rem; white-space: nowrap; background: #fff; }
.acc-seg .seg-btn.active { background: var(--green-deep, #0f6b4f); border-color: var(--green-deep, #0f6b4f); color: #fff; }
/* AI Design: one design at a time, shown large */
.gen-grid.single, .gen-grid.single:only-child { grid-template-columns: minmax(0, 360px); justify-content: center; }
.gen-grid.single .gen-tile { aspect-ratio: 1 / 1; }

/* ===== Alignment & polish pass (all roles) ===== */
/* Welcome: the three account types fit their tiles on small phones */
.role-tile span:last-child { letter-spacing: .08em; font-size: .72rem; white-space: nowrap; }
@media (max-width: 360px) { .role-tile span:last-child { letter-spacing: .04em; font-size: .68rem; } }
/* AI Design: idea suggestions sit two to a row */
.idea-chips .filter-chip { padding: 6px 11px; font-size: .78rem; }
/* Footer: links centred and evenly wrapped */
.footer { justify-content: center; text-align: center; gap: 6px 18px; }
.footer nav { justify-content: center; gap: 6px 16px; }
/* Wide tables scroll sideways inside their card, with a soft edge showing there is more */
.table-wrap { -webkit-overflow-scrolling: touch; background: linear-gradient(90deg, transparent calc(100% - 24px), rgba(0,0,0,.04)); }
/* CRM: search box and buttons share the row evenly */
.crm-search { display: flex; gap: 8px; align-items: stretch; }
.crm-search input { flex: 1 1 auto; min-width: 0; }
.excel-bar .btn { flex: 1 1 auto; justify-content: center; }
/* Admin header: name + email on the left; CRM and Log out never squeezed */
.admin-head { flex-wrap: wrap; row-gap: 8px; }
.admin-head > div:first-child { flex: 1 1 180px; min-width: 0; }
.admin-head .admin-who { overflow-wrap: anywhere; }
.admin-head .btn, .admin-head .crm-link { white-space: nowrap; flex: 0 0 auto; }
/* Wide screens (website on a computer): the bottom menu stays compact and centred under the content */
@media (min-width: 760px) { .tabbar { padding-left: max(0px, calc(50% - 360px)); padding-right: max(0px, calc(50% - 360px)); } }
/* Search: the button always sits beside the box */
.crm-search { flex-wrap: nowrap; }
.crm-search .btn { flex: 0 0 auto; white-space: nowrap; }
/* Small phones: 4 admin tiles per row so every label shows in full */
@media (max-width: 380px) { .admin-nav { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } .admin-nav .an-tile span { font-size: .68rem; } }

/* ===================== VIYA Help chatbot ===================== */
/* Round launcher (like a shopping-app assistant): brand gradient, soft glow, a gentle sparkle */
.cb-fab { position: fixed; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 60; width: 60px; height: 60px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; color: #fff;
  background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.35), transparent 45%), linear-gradient(145deg, var(--c1, #0f6b4f), var(--c2, #1aa37a) 60%, #c9a227 130%);
  box-shadow: 0 12px 28px -8px rgba(var(--c1-rgb, 15,107,79), .65), 0 0 0 3px rgba(255,255,255,.85), 0 0 0 4px rgba(201,162,39,.45);
  display: grid; place-items: center; transition: transform .25s cubic-bezier(.2,.8,.2,1), opacity .2s, box-shadow .25s; }
.cb-fab.in-app { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
.cb-fab .ic { width: 27px; height: 27px; stroke-width: 2; }
.cb-fab span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.cb-fab::before { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(201,162,39,.55); opacity: 0; animation: cb-ring 3.2s ease-out infinite; }
.cb-fab::after { content: '✦'; position: absolute; top: 4px; right: 6px; font-size: 13px; color: #ffe39a; text-shadow: 0 0 6px rgba(255,227,154,.9); animation: cb-twinkle 2.6s ease-in-out infinite; }
.cb-fab:hover { transform: translateY(-2px) scale(1.05); }
.cb-fab:active { transform: scale(.94); }
.cb-fab.hide { opacity: 0; transform: scale(.6); pointer-events: none; }
@keyframes cb-ring { 0% { transform: scale(.85); opacity: .9; } 70%, 100% { transform: scale(1.25); opacity: 0; } }
@keyframes cb-twinkle { 0%, 100% { opacity: .35; transform: scale(.8) rotate(0deg); } 50% { opacity: 1; transform: scale(1.15) rotate(20deg); } }

/* Chat panel: a bottom sheet on phones, a floating card on computers */
.cb-panel { position: fixed; z-index: 70; left: 0; right: 0; bottom: 0; height: min(82vh, 680px); display: flex; flex-direction: column; background: #fbfaf6; border-radius: 24px 24px 0 0;
  box-shadow: 0 -24px 60px -20px rgba(18,16,12,.45); transform: translateY(105%); opacity: 0; pointer-events: none; transition: transform .38s cubic-bezier(.2,.9,.2,1), opacity .25s; overflow: hidden; }
.cb-panel.open { transform: none; opacity: 1; pointer-events: auto; }
@media (min-width: 640px) { .cb-panel { left: auto; right: 20px; bottom: 20px; width: 390px; height: min(640px, calc(100vh - 40px)); border-radius: 24px; transform: translateY(24px) scale(.96); transform-origin: bottom right; } .cb-panel.open { transform: none; } }
.cb-head { display: flex; align-items: center; gap: 10px; padding: 14px 12px 14px 16px; color: #fff; background: linear-gradient(135deg, var(--c1, #0f6b4f), var(--c2, #1aa37a)); }
.cb-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-grad); color: var(--ink); box-shadow: 0 0 0 2px rgba(255,255,255,.6); flex: 0 0 auto; }
.cb-avatar .ic { width: 21px; height: 21px; }
.cb-title { flex: 1 1 auto; display: grid; line-height: 1.2; min-width: 0; }
.cb-title strong { font-size: 1rem; letter-spacing: .02em; }
.cb-title small { font-size: .74rem; opacity: .85; }
.cb-icon-btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.14); border: 0; cursor: pointer; flex: 0 0 auto; }
.cb-icon-btn .ic { width: 18px; height: 18px; }
.cb-list { flex: 1 1 auto; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.cb-msg { max-width: 86%; animation: cb-in .28s ease-out both; }
.cb-msg p { margin: 0; padding: 10px 13px; border-radius: 16px; font-size: .92rem; line-height: 1.45; }
.cb-msg.bot { align-self: flex-start; }
.cb-msg.bot p { background: #fff; border: 1px solid var(--border, #e7e1cf); border-top-left-radius: 6px; color: var(--text, #1b2a24); box-shadow: 0 4px 14px -10px rgba(0,0,0,.25); }
.cb-msg.me { align-self: flex-end; }
.cb-msg.me p { background: linear-gradient(135deg, var(--c1, #0f6b4f), var(--c2, #1aa37a)); color: #fff; border-top-right-radius: 6px; }
@keyframes cb-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.cb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cb-chips .filter-chip { padding: 6px 11px; font-size: .78rem; text-align: left; white-space: normal; background: #fff; }
.cb-topics { margin: -2px 0 2px; }
.cb-care { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cb-care .btn { padding: 7px 12px; font-size: .8rem; }
.cb-form { padding: 10px 14px; border-top: 1px solid var(--border, #e7e1cf); background: #fff; display: grid; gap: 8px; }
.cb-form[hidden] { display: none; }
.cb-form-title { margin: 0; font-weight: 700; font-size: .9rem; }
.cb-form textarea, .cb-form input { width: 100%; padding: 9px 11px; border-radius: 12px; border: 1px solid var(--border-strong, #d9e2dc); font: inherit; font-size: .9rem; background: #fff; }
.cb-form-actions { display: flex; gap: 8px; }
.cb-input { display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border, #e7e1cf); background: #fff; }
.cb-input input { flex: 1 1 auto; min-width: 0; padding: 11px 14px; border-radius: 999px; border: 1px solid var(--border-strong, #d9e2dc); font: inherit; background: #fbfaf6; }
.cb-input .btn { width: 46px; height: 46px; border-radius: 50%; padding: 0; display: grid; place-items: center; flex: 0 0 auto; }
.cb-input .btn .ic { width: 20px; height: 20px; }
.cb-clear { position: absolute; top: 74px; right: 14px; font-size: .72rem; opacity: .7; }
@media (prefers-reduced-motion: reduce) { .cb-fab::before, .cb-fab::after, .cb-msg { animation: none; } .cb-panel { transition: none; } }
@media print { .cb-fab, .cb-panel { display: none !important; } }
/* Admin → Chatbot editor */
.faq-item { display: grid; gap: 8px; }
.faq-item.to-check { border-color: rgba(201,162,39,.6); box-shadow: 0 0 0 1px rgba(201,162,39,.35); }
.faq-top { display: flex; align-items: center; gap: 8px; }
.faq-top select { flex: 1 1 auto; min-height: 38px; border-radius: 10px; border: 1px solid var(--border-strong, #d9e2dc); padding: 6px 10px; font: inherit; background: #fff; }
.faq-l { display: grid; gap: 4px; font-size: .82rem; font-weight: 600; color: var(--muted); }
.faq-l input, .faq-l textarea { font: inherit; font-weight: 400; color: var(--text); padding: 9px 11px; border-radius: 12px; border: 1px solid var(--border-strong, #d9e2dc); background: #fff; width: 100%; }
.cb-clear { position: static; align-self: flex-end; margin: 6px 14px -6px; padding: 2px 4px; font-size: .74rem; opacity: .75; }

/* ===================== Try-On (photo) — premium, quiet ===================== */
.pt { max-width: 560px; margin: 0 auto; padding-bottom: 12px; }
.pt-head { text-align: center; margin: 8px 0 18px; }
.pt-head h1 { margin: 0; font-family: var(--serif); font-size: clamp(1.7rem, 7vw, 2.2rem); letter-spacing: .04em; background: linear-gradient(135deg, var(--c1, #0f6b4f), var(--c2, #1aa37a) 55%, #b8892a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pt-head p { margin: 6px 0 0; color: var(--muted); font-size: .95rem; letter-spacing: .01em; }

.pt-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pt-slot { position: relative; display: grid; justify-items: center; align-content: center; gap: 6px; aspect-ratio: 3 / 4; border-radius: 22px; cursor: pointer; color: var(--text);
  border: 1px solid rgba(201,162,39,.35); background: linear-gradient(160deg, #fff, #fbf7ec); box-shadow: 0 18px 40px -28px rgba(18,16,12,.45), inset 0 1px 0 #fff;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s; animation: pt-rise .6s cubic-bezier(.2,.8,.2,1) both; }
.pt-slot:nth-child(2) { animation-delay: .08s; opacity: .92; }
.pt-slot:active { transform: scale(.97); }
.pt-slot::after { content: ''; position: absolute; inset: 10px; border-radius: 16px; border: 1px dashed rgba(201,162,39,.35); pointer-events: none; }
.pt-slot-ic { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: var(--c1, #0f6b4f); background: rgba(var(--c1-rgb, 15,107,79), .08); margin-bottom: 4px; }
.pt-slot-ic .ic { width: 24px; height: 24px; }
.pt-slot strong { font-family: var(--serif); font-size: 1.05rem; letter-spacing: .03em; }
.pt-slot small { color: var(--muted); font-size: .8rem; }
.pt-tips { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; color: var(--muted); font-size: .8rem; }
.pt-tips li::before { content: '·'; margin-right: 6px; color: #c9a227; }

.pt-stage { position: relative; margin: 0; border-radius: 26px; overflow: hidden; background: #f3efe4; box-shadow: 0 30px 60px -36px rgba(18,16,12,.55); }
.pt-stage canvas { display: block; width: 100%; height: auto; max-height: 72vh; object-fit: contain; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  filter: saturate(1.04) contrast(1.02); transition: filter .5s; }
.pt-stage.working canvas { filter: saturate(.6) blur(1.5px) brightness(1.04); }
.pt-stage.pt-reveal canvas { animation: pt-reveal .7s cubic-bezier(.2,.8,.2,1); }
.pt-busy { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; color: #fff; background: linear-gradient(180deg, rgba(18,16,12,.05), rgba(18,16,12,.35)); }
.pt-busy small { font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.pt-dots { display: flex; gap: 7px; }
.pt-dots i { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pt-dot 1.1s ease-in-out infinite; }
.pt-dots i:nth-child(2) { animation-delay: .15s; } .pt-dots i:nth-child(3) { animation-delay: .3s; }
.pt-hold { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); padding: 5px 12px; border-radius: 999px; font-size: .72rem; letter-spacing: .06em; color: #fff; background: rgba(18,16,12,.38); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); pointer-events: none; }

.pt-controls { margin-top: 14px; display: grid; gap: 12px; animation: pt-rise .5s cubic-bezier(.2,.8,.2,1) both; }
.pt-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pt-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(18,16,12,.05); }
.pt-seg button { border: 0; background: transparent; padding: 6px 16px; border-radius: 999px; font: inherit; font-size: .82rem; color: var(--muted); cursor: pointer; transition: background .25s, color .25s; }
.pt-seg button.on { background: #fff; color: var(--text); box-shadow: 0 2px 8px -4px rgba(0,0,0,.3); }
.pt-seg button:disabled { opacity: .4; cursor: default; }
.pt-link { border: 0; background: none; color: var(--muted); font: inherit; font-size: .8rem; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; padding: 6px 2px; }
.pt-link .ic { width: 15px; height: 15px; }
.pt-label { margin: 0; text-align: center; font-family: var(--serif); font-size: .95rem; letter-spacing: .04em; color: var(--text); }
.pt-strip { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; scroll-snap-type: x proximity; }
.pt-strip::-webkit-scrollbar { display: none; }
.pt-thumb { flex: 0 0 auto; width: 54px; height: 54px; border-radius: 16px; padding: 3px; border: 1px solid transparent; background: #fff; cursor: pointer; scroll-snap-align: center; transition: border-color .25s, transform .25s; box-shadow: 0 6px 14px -10px rgba(0,0,0,.35); }
.pt-thumb img, .pt-thumb svg { width: 100%; height: 100%; object-fit: contain; border-radius: 12px; display: block; }
.pt-thumb.on { border-color: #c9a227; transform: translateY(-1px); }
.pt-dots-row { display: flex; justify-content: center; gap: 10px; }
.pt-dots-row:empty { display: none; }
.pt-dot { width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--sw); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); transition: transform .2s, box-shadow .2s; }
.pt-dot.on { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #c9a227; transform: scale(1.06); }
.pt-sizes { display: flex; justify-content: center; gap: 4px; }
.pt-sizes button { min-width: 40px; padding: 6px 8px; border: 0; border-bottom: 1.5px solid transparent; background: none; font: inherit; font-size: .82rem; letter-spacing: .06em; color: var(--muted); cursor: pointer; transition: color .2s, border-color .2s; }
.pt-sizes button.on { color: var(--text); border-bottom-color: #c9a227; font-weight: 600; }
.pt-adjust { border-top: 1px solid var(--border, #e7e1cf); padding-top: 8px; }
.pt-adjust summary { cursor: pointer; font-size: .8rem; color: var(--muted); letter-spacing: .04em; list-style: none; text-align: center; }
.pt-adjust summary::-webkit-details-marker { display: none; }
.pt-adjust summary::after { content: ' ▾'; font-size: .7rem; }
.pt-adjust[open] summary::after { content: ' ▴'; }
.pt-adjust label { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 10px; margin-top: 10px; font-size: .8rem; color: var(--muted); }
.pt-adjust input[type=range] { accent-color: #c9a227; }
.pt-note { margin: 10px 0 0; font-size: .78rem; color: var(--muted); text-align: center; }
.pt-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pt-actions .btn-gold { grid-column: 1 / -1; }
.pt-actions .btn { justify-content: center; }
.pt-privacy { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 18px 0 0; font-size: .74rem; color: var(--muted); }
.pt-privacy .ic { width: 14px; height: 14px; color: #c9a227; }

.pt-sheet { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; background: rgba(18,16,12,0); transition: background .25s; }
.pt-sheet.open { background: rgba(18,16,12,.38); }
.pt-sheet-card { width: min(520px, 100%); background: #fbfaf6; border-radius: 24px 24px 0 0; padding: 18px 16px calc(14px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 8px; transform: translateY(100%); transition: transform .32s cubic-bezier(.2,.9,.2,1); }
.pt-sheet.open .pt-sheet-card { transform: none; }
.pt-sheet-title { margin: 0 0 6px; text-align: center; font-family: var(--serif); letter-spacing: .03em; }
.pt-sheet-btn { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 16px; background: #fff; border: 1px solid var(--border, #e7e1cf); cursor: pointer; font-weight: 500; }
.pt-sheet-btn .ic { width: 20px; height: 20px; color: var(--c1, #0f6b4f); }
.pt-sheet-cancel { border: 0; background: none; padding: 12px; font: inherit; color: var(--muted); cursor: pointer; }

@keyframes pt-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pt-reveal { from { opacity: .35; transform: scale(1.015); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes pt-dot { 0%, 100% { opacity: .35; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .pt-slot, .pt-controls, .pt-stage.pt-reveal canvas, .pt-dots i { animation: none; } }

/* =====================================================================
   MOTION POLISH — one motion language for the whole app
   Quick (150ms) for presses, normal (240ms) for state changes, slow (420ms) for things arriving.
   ===================================================================== */
:root {
  --ease-out: cubic-bezier(.22, 1, .36, 1);      /* arriving: fast start, soft landing */
  --ease-in: cubic-bezier(.4, 0, 1, 1);          /* leaving */
  --ease-spring: cubic-bezier(.3, 1.35, .5, 1);  /* small playful overshoot (chips, badges) */
  --t-fast: 150ms; --t-base: 240ms; --t-slow: 420ms;
}

/* Everything tappable reacts the same way */
.btn, .seg-btn, .filter-chip, .role-tile, .quick-btn, .quick-grid a, .feature-tile, .list-row, .an-tile, .pt-thumb, .pt-dot, .swatch, .thumb, .tab-item, .dd-btn, .gen-tile, .product-card, .side-thumb, .pt-slot, .cb-icon-btn, .link-btn {
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-base) var(--ease-out), background-color var(--t-base) var(--ease-out),
              border-color var(--t-base) var(--ease-out), color var(--t-base) var(--ease-out), opacity var(--t-base) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn:active:not(:disabled), .seg-btn:active, .filter-chip:active, .role-tile:active, .quick-btn:active, .quick-grid a:active, .feature-tile:active, .an-tile:active, .pt-thumb:active, .pt-dot:active, .thumb:active, .gen-tile:active, .side-thumb:active, .list-row:active { transform: scale(.97); transition-duration: 80ms; }
/* Lift on hover only with a mouse (on phones a "hover" would get stuck after a tap) */
@media (hover: hover) and (pointer: fine) {
  .btn:hover:not(:disabled) { transform: translateY(-1px); }
  .list-row:hover { background-color: rgba(var(--c1-rgb, 15,107,79), .035); }
  .an-tile:hover, .feature-tile:hover, .role-tile:hover { transform: translateY(-2px); }
}
@media (hover: none) { .product-card:hover, .role-tile:hover, .role-card:hover { transform: none; } }

/* Screens and lists arrive with the same soft rise */
.screen-in { animation: screenIn var(--t-slow) var(--ease-out) both; }
.stagger { animation: riseIn var(--t-slow) var(--ease-out) both; animation-delay: calc(min(var(--i, 0), 10) * 40ms + 30ms); }
/* Cards further down the page float in the first time they are scrolled to */
.vc-reveal { opacity: 0; transform: translate3d(0, 14px, 0); }
.vc-reveal.in { opacity: 1; transform: none; transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }

/* Messages (toasts): drop in, then fade away */
.toast { animation: toastIn var(--t-slow) var(--ease-out) both; transition: opacity var(--t-base) var(--ease-in), transform var(--t-base) var(--ease-in); }
.toast.out { opacity: 0; transform: translateY(-8px) scale(.98); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px) scale(.97); } to { opacity: 1; transform: none; } }

/* Dropdowns, sheets and dialogs */
.dd-menu, .dd-sheet { animation-timing-function: var(--ease-out) !important; }
.status-chip, .an-badge { transition: background-color var(--t-base) var(--ease-out), color var(--t-base) var(--ease-out); }
.an-badge { animation: badgePop var(--t-slow) var(--ease-spring) both; }
@keyframes badgePop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* Keyboard users see where they are */
:focus-visible { outline: 2px solid rgba(201, 162, 39, .85); outline-offset: 2px; border-radius: 10px; }

/* Low-end phones (4 cores or fewer, or 3 GB or less): no glass blur, no endless background effects — everything stays smooth */
html.lite *, html.lite *::before, html.lite *::after { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
html.lite body::before, html.lite .wordmark, html.lite .splash-name, html.lite .form-head h1, html.lite .screen-title, html.lite .pd-info h1, html.lite .section-head h2,
html.lite .dash-head h1, html.lite .gold-text, html.lite .topbar::after, html.lite .appbar::after, html.lite .btn-gold, html.lite .btn-primary, html.lite .btn-gold::after,
html.lite .home-hero::after, html.lite .showroom-hero::after, html.lite .kpi-hero::after, html.lite .home-hero .hh-art, html.lite .showroom-hero .sh-art, html.lite .float { animation: none !important; }
html.lite .stagger { animation-duration: .3s; }
html.lite .topbar, html.lite .appbar { background: #fff; }
html.lite .tabbar { background: #fff; }

/* App in the background (or screen off): pause every looping animation to save battery */
html.paused *, html.paused *::before, html.paused *::after { animation-play-state: paused !important; }

/* "Reduce motion" turned on in the phone's settings: no movement, just instant changes */
@media (prefers-reduced-motion: reduce) {
  .vc-reveal { opacity: 1 !important; transform: none !important; }
  .btn:hover, .an-tile:hover, .feature-tile:hover, .role-tile:hover { transform: none !important; }
}

/* Admin → Chatbot: questions from customers */
.cq-list { display: grid; gap: 10px; }
.cq { border: 1px solid var(--border, #e7e1cf); border-radius: 16px; padding: 12px 14px; background: #fff; }
.cq.new { border-color: rgba(201,162,39,.55); box-shadow: 0 0 0 1px rgba(201,162,39,.25); }
.cq-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cq-top small { margin-left: auto; }
.cq-q { margin: 8px 0 10px; font-size: .95rem; line-height: 1.45; }
.cq-actions { display: flex; flex-wrap: wrap; gap: 6px; }

/* Document viewer (admin) */
.doc-viewer { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(18,16,12,0); transition: background var(--t-base, .24s); }
.doc-viewer.open { background: rgba(18,16,12,.55); }
.dv-card { width: min(640px, 100%); max-height: 90vh; overflow: auto; background: #fbfaf6; border-radius: 22px; box-shadow: 0 30px 70px -20px rgba(0,0,0,.5); transform: translateY(16px) scale(.98); opacity: 0; transition: transform var(--t-slow, .42s) var(--ease-out, ease), opacity var(--t-base, .24s); }
.doc-viewer.open .dv-card { transform: none; opacity: 1; }
.dv-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; background: #fbfaf6; border-bottom: 1px solid var(--border, #e7e1cf); }
.dv-close { width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(0,0,0,.06); cursor: pointer; font-size: 1rem; }
.dv-body { padding: 14px 16px 18px; display: grid; gap: 16px; }
.dv-doc { margin: 0; display: grid; gap: 8px; }
.dv-doc figcaption { font-size: .82rem; color: var(--muted); }
.dv-doc img { width: 100%; border-radius: 14px; border: 1px solid var(--border, #e7e1cf); background: #fff; }
.dv-pdf { display: grid; place-items: center; height: 120px; border-radius: 14px; border: 1px dashed var(--border-strong, #d9e2dc); color: var(--muted); background: #fff; }
.dv-actions { display: flex; gap: 8px; }

/* Photo try-on: realistic AI button + consent */
.pt-ai { margin: 6px 0 10px; }
.pt-ai .ic { width: 18px; height: 18px; }
.pt-consent-text { margin: 0 0 12px; font-size: .92rem; line-height: 1.5; color: var(--muted); }
.pt-controls > .pt-ai { margin: 2px 0 4px; min-height: 52px; font-size: 1.02rem; box-shadow: 0 10px 24px -12px rgba(201,162,39,.8); }
.pt-ai-hint { margin: 0 0 12px; text-align: center; font-size: .82rem; color: var(--muted); }
/* the realistic try-on button floats on the photo, so it is always in sight */
.pt-ai-float { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 3; display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border: 0; border-radius: 999px; cursor: pointer; white-space: nowrap;
  font: 600 1rem/1 inherit; font-family: inherit; color: #1d1606; background: linear-gradient(135deg, #f6e3a1, #d9b44a 55%, #b48a26); box-shadow: 0 12px 28px -10px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.5); animation: pt-ai-in .5s cubic-bezier(.2,.8,.2,1); }
.pt-ai-float .ic { width: 18px; height: 18px; }
.pt-ai-float:active { transform: translateX(-50%) scale(.96); }
.pt-ai-float:disabled { opacity: .6; }
.pt-ai-float:not([hidden]) ~ .pt-hold, .pt-stage:has(.pt-ai-float:not([hidden])) .pt-hold { bottom: 78px; }
@keyframes pt-ai-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .pt-ai-float { animation: none; } }
/* realistic picture being made (shown on the photo while the quick preview is visible) */
.pt-ai-pill { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 3; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-size: .8rem; font-weight: 600; color: #1d1606; background: linear-gradient(135deg, #f6e3a1, #d9b44a); box-shadow: 0 8px 20px -10px rgba(0,0,0,.5); white-space: nowrap; animation: pt-ai-in .4s ease; }
.pt-ai-spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(29,22,6,.25); border-top-color: #1d1606; animation: pt-spin .8s linear infinite; }
@keyframes pt-spin { to { transform: rotate(360deg); } }
@keyframes pt-ai-in { from { opacity: 0; } to { opacity: 1; } }
.pt-ai-switch { margin: 4px 0 10px; text-align: center; font-size: .85rem; color: var(--muted); }
.pt-ai-switch .ic { width: 14px; height: 14px; vertical-align: -2px; color: #b48a26; }
@media (prefers-reduced-motion: reduce) { .pt-ai-spin { animation-duration: 2s; } }
.pt-tag { position: absolute; top: 14px; left: 14px; z-index: 2; padding: 5px 10px; border-radius: 999px; font-size: .72rem; font-weight: 600; letter-spacing: .02em; color: #fff; background: rgba(18,16,12,.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); pointer-events: none; }
.pt-tag.real { color: #1d1606; background: linear-gradient(135deg, #f6e3a1, #d9b44a); }
.pt-stage:has(.pt-ai-pill:not([hidden])) .pt-tag { display: none; }

/* Continue with Google */
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 6px 0 4px; min-height: 50px; background: #fff; color: #1f1f1f; border: 1px solid #dadce0; font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.btn-google svg { width: 20px; height: 20px; }
.btn-google:active { background: #f4f4f4; }
.or-line { display: flex; align-items: center; gap: 10px; margin: 10px 0 6px; font-size: .8rem; color: var(--muted); }
.or-line::before, .or-line::after { content: ''; flex: 1; height: 1px; background: var(--border, #e7e1cf); }
/* Download button on the try-on picture */
.pt-dl { position: absolute; right: 14px; bottom: 14px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border: 0; border-radius: 999px; cursor: pointer; font: 600 .85rem/1 inherit; font-family: inherit; color: #fff; background: rgba(18,16,12,.62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 8px 20px -10px rgba(0,0,0,.6); }
.pt-dl .ic { width: 16px; height: 16px; }
.pt-dl:active { transform: scale(.95); }
.pt-stage:has(.pt-tag.real) .pt-dl { color: #1d1606; background: linear-gradient(135deg, #f6e3a1, #d9b44a); }
.pt-stage .pt-hold { left: 16px; transform: none; }
/* Realistic picture: waiting / could-not states on the photo */
.pt-ai-pill { top: 50%; transform: translate(-50%, -50%); padding: 12px 18px; font-size: .88rem; }
.pt-ai-pill.failed { color: #fff; background: rgba(18,16,12,.78); }
.pt-ai-retry { margin-left: 6px; padding: 7px 12px; border: 0; border-radius: 999px; font: 600 .8rem/1 inherit; font-family: inherit; color: #1d1606; background: linear-gradient(135deg, #f6e3a1, #d9b44a); cursor: pointer; }

/* Admin → bulk add products */
.bulk-list { margin: 0; padding-left: 20px; display: grid; gap: 14px; }
.bulk-list li { display: grid; gap: 6px; }
.bulk-list li > span { font-size: .88rem; color: var(--muted); }
.bulk-list li .btn { justify-self: start; }
.bulk-sum { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; }
.bulk-table { display: grid; gap: 8px; }
.bulk-row { border: 1px solid var(--border, #e7e1cf); border-radius: 14px; padding: 10px 12px; background: #fff; }
.bulk-row.bad { border-color: rgba(180,40,40,.35); background: #fff8f7; }
.br-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.br-top strong { flex: 1 1 auto; }
.br-meta { margin-top: 4px; font-size: .85rem; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.br-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--sw); border: 1px solid rgba(0,0,0,.15); }
.br-err { margin: 4px 0 0; font-size: .84rem; color: #b42828; }
.br-warn { margin: 4px 0 0; font-size: .84rem; color: #9a6b00; }

/* ---------- Product page: colour + size right under the photo ---------- */
.pd-pick { padding: 14px 16px; display: grid; gap: 4px; }
.pd-pick h3 { font-size: .92rem; margin: 6px 0 8px; }
.pd-pick-row + .pd-pick-row { border-top: 1px solid var(--border); padding-top: 6px; margin-top: 6px; }
.pd-pick .error { margin: 4px 0 0; }
.size-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.size-chip { min-width: 48px; height: 42px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--card); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; transition: .15s; }
.size-chip:hover { border-color: var(--gold); }
.size-chip.on { background: var(--ink); color: var(--gold-light); border-color: var(--ink); transform: translateY(-1px); }
.pd-photos { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
.pd-photos:empty { display: none; }
.pd-ph { padding: 0; border: 0; background: none; cursor: pointer; border-radius: 12px; }
.pd-ph.on img { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.pc-swatches { flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pc-swatches i { width: 18px; height: 18px; cursor: pointer; box-shadow: 0 0 0 2px var(--card); transition: .15s; }
.pc-swatches i.on { box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--gold); }
.return-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--card); }
.return-note > .ic { color: var(--success); flex-shrink: 0; margin-top: 2px; }
.return-note span { display: grid; gap: 2px; }
.return-note small { color: var(--muted); }
.return-box { margin: 10px 0; padding: 12px 14px; border-radius: 14px; background: rgba(201, 162, 39, .08); border: 1px dashed var(--gold); font-size: .88rem; }
.return-box label { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; cursor: pointer; }
.return-box input { margin-top: 3px; accent-color: var(--gold-deep); }
.order-card { border-top: 1px solid var(--border); padding: 12px 0; }
.order-card:first-of-type { border-top: 0; }
.order-card .oc-items { font-size: .86rem; color: var(--muted); margin: 4px 0; }
.ret-form { display: grid; gap: 10px; margin-top: 10px; padding: 12px; border-radius: 14px; background: var(--bg, #faf7ef); border: 1px solid var(--border); }
.ret-status { font-size: .86rem; margin-top: 6px; }

/* ---------- Admin: home carousel ---------- */
.car-list { display: grid; gap: 8px; }
.car-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); }
.car-img img, .car-img .shirt-svg { width: 56px; height: 62px; object-fit: cover; border-radius: 10px; background: var(--studio); display: block; }
.car-main { display: grid; gap: 4px; min-width: 0; }
.car-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.car-dots { display: flex; gap: 6px; flex-wrap: wrap; }
.car-act { display: flex; gap: 6px; }
.car-act .btn-sm { min-width: 36px; padding-inline: 10px; }
.car-preview .dm-track.car-still { animation: none; }
.car-preview .dm-viewport { overflow-x: auto; }
.car-save { position: sticky; bottom: 12px; z-index: 3; }
@media (max-width: 520px) { .car-row { grid-template-columns: 48px minmax(0, 1fr); } .car-act { grid-column: 1 / -1; justify-content: flex-end; } }

/* ---------- Admin: photo storage ---------- */
.st-state { display: flex; gap: 8px; align-items: center; font-weight: 600; margin: 4px 0 10px; }
.st-state.ok .ic { color: var(--success); }
.st-state.warn { color: #9a5b00; }
.st-code { display: block; margin-top: 4px; padding: 6px 8px; border-radius: 8px; background: rgba(0, 0, 0, .05); font-size: .78rem; word-break: break-all; }
.st-choice { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.st-choice .size-chip:disabled { opacity: .45; cursor: not-allowed; }
.st-usage { display: grid; gap: 10px; margin-bottom: 12px; }
.st-usage > div { display: grid; gap: 4px; }
.st-usage span { font-size: .85rem; color: var(--muted); }
.st-bar { height: 10px; border-radius: 99px; background: rgba(0, 0, 0, .07); overflow: hidden; }
.st-bar i { display: block; height: 100%; background: var(--gold-grad); border-radius: 99px; }
.st-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.st-table th, .st-table td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--border); }
.st-failed { display: grid; gap: 8px; margin-bottom: 10px; }
.st-frow { display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); }
.st-frow .error { margin: 0; font-size: .82rem; }
.st-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.st-head select { width: auto; min-height: 36px; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 10px 0; }
.st-item { display: grid; gap: 6px; padding: 8px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); min-width: 0; }
.st-item.busy { opacity: .5; pointer-events: none; }
.st-thumb { padding: 0; border: 0; background: var(--studio, #f3efe6); border-radius: 10px; cursor: zoom-in; aspect-ratio: 1; overflow: hidden; }
.st-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-meta { display: grid; min-width: 0; }
.st-meta strong { font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-act { display: flex; gap: 6px; }
.st-act .btn { flex: 1; padding-inline: 6px; }
.st-viewer { position: fixed; inset: 0; z-index: 90; background: rgba(10, 10, 8, .88); display: grid; place-items: center; align-content: center; gap: 10px; padding: 16px; }
.st-viewer img { max-width: 100%; max-height: 72vh; border-radius: 12px; background: #fff; }
.st-viewer p { color: #f1ead8; text-align: center; font-size: .88rem; margin: 0; }
.st-close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; font-size: 1.1rem; cursor: pointer; }
.st-email { word-break: break-all; }
.st-progress { display: grid; gap: 6px; margin-top: 10px; }

/* ---------- Photos: fade in when loaded, soft shimmer while waiting ---------- */
html.js-ld img.pc-photo { transition: opacity .35s ease; }
html.js-ld img.pc-photo:not(.ld) { opacity: 0; }
@keyframes ph-shimmer { 0% { background-position: 120% 0; } 100% { background-position: -20% 0; } }
html.js-ld .pc-img:has(> img.pc-photo:not(.ld)), html.js-ld .pd-img:has(> img.pc-photo:not(.ld)), html.js-ld .dm-item:has(> img.pc-photo:not(.ld)), html.js-ld .pd-ph:has(> img.pc-photo:not(.ld)), html.js-ld .bl-img:has(> img.pc-photo:not(.ld)), html.js-ld .car-img:has(> img.pc-photo:not(.ld)) {
  background-image: linear-gradient(100deg, rgba(0, 0, 0, .04) 30%, rgba(255, 255, 255, .55) 50%, rgba(0, 0, 0, .04) 70%);
  background-size: 250% 100%; animation: ph-shimmer 1.3s linear infinite;
}
@media (prefers-reduced-motion: reduce) { html.js-ld .pc-img, html.js-ld .pd-img, html.js-ld .dm-item, html.js-ld .pd-ph { animation: none !important; } }

/* ---------- Product photos: swipeable gallery ---------- */
.pd-gal { position: relative; }
.pd-gtrack { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; outline: none; border-radius: 14px; cursor: grab; }
.pd-gtrack::-webkit-scrollbar { display: none; }
.pd-gtrack:active { cursor: grabbing; }
.pd-slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: center; scroll-snap-stop: always; display: grid; place-items: center; }
.pd-slide img { user-select: none; -webkit-user-drag: none; }
.pd-gnav { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: #1b1b1b; font-size: 1.5rem; line-height: 1; cursor: pointer; box-shadow: 0 4px 14px -6px rgba(0, 0, 0, .4); display: grid; place-items: center; padding: 0 0 3px; }
.pd-gnav.prev { left: -12px; } .pd-gnav.next { right: -12px; }
@media (hover: none) { .pd-gnav { display: none; } }
.pd-gcount { position: absolute; right: 8px; bottom: 8px; padding: 3px 9px; border-radius: 99px; background: rgba(20, 18, 14, .62); color: #fff; font-size: .74rem; font-weight: 600; pointer-events: none; }
.pd-photos { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.pd-photos::-webkit-scrollbar { display: none; }
.pd-photos .pd-ph { flex: 0 0 64px; }
html.js-ld .pd-slide:has(> img.pc-photo:not(.ld)) { background-image: linear-gradient(100deg, rgba(0, 0, 0, .04) 30%, rgba(255, 255, 255, .55) 50%, rgba(0, 0, 0, .04) 70%); background-size: 250% 100%; animation: ph-shimmer 1.3s linear infinite; min-height: 280px; }

/* ---------- Full-screen photo zoom ---------- */
body.zm-open { overflow: hidden; }
.zm { position: fixed; inset: 0; z-index: 200; background: #0d0c0a; display: grid; animation: zm-in .18s ease; touch-action: none; }
.zm.closing { opacity: 0; transition: opacity .15s; }
@keyframes zm-in { from { opacity: 0; } to { opacity: 1; } }
.zm-stage { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; touch-action: none; cursor: zoom-in; }
.zm.zoomed .zm-stage { cursor: grab; }
.zm-img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; will-change: transform; transform-origin: center center; background: #fff; }
.zm-close { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); font-size: 1.15rem; cursor: pointer; z-index: 2; }
.zm-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .85); font-size: 1.6rem; line-height: 1; padding-bottom: 3px; cursor: pointer; z-index: 2; }
.zm-nav.prev { left: 10px; } .zm-nav.next { right: 10px; }
.zm.zoomed .zm-nav { opacity: 0; pointer-events: none; }
.zm-bar { position: absolute; left: 0; right: 0; bottom: calc(14px + env(safe-area-inset-bottom)); display: flex; justify-content: center; gap: 12px; color: #f1ead8; font-size: .82rem; pointer-events: none; z-index: 2; }
.zm-bar span:empty { display: none; }
.zm-bar span { padding: 4px 10px; border-radius: 99px; background: rgba(0, 0, 0, .5); }
.zm.zoomed .zm-hint { display: none; }
.pd-gtrack { cursor: zoom-in; }
.pd-zoomhint { position: absolute; left: 8px; bottom: 8px; padding: 3px 9px; border-radius: 99px; background: rgba(20, 18, 14, .55); color: #fff; font-size: .72rem; font-weight: 600; pointer-events: none; }

/* ---------- Carousel editor: photo picker ---------- */
.car-img { position: relative; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 10px; }
.car-n { position: absolute; right: -6px; top: -6px; min-width: 20px; height: 20px; border-radius: 99px; background: var(--gold-deep); color: #fff; font-size: .7rem; display: grid; place-items: center; padding: 0 5px; }
.car-choose { justify-self: start; display: inline-flex; gap: 4px; align-items: center; font-weight: 600; }
.car-sheet { position: fixed; inset: 0; z-index: 150; background: rgba(10, 10, 8, .55); display: grid; align-items: end; justify-items: center; }
.car-sheet[hidden] { display: none; }
.car-sheet-box { width: min(640px, 100%); max-height: 88vh; overflow-y: auto; background: var(--card); border-radius: 20px 20px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); animation: sheet-up .2s ease; }
@media (min-width: 700px) { .car-sheet { align-items: center; } .car-sheet-box { border-radius: 20px; } }
@keyframes sheet-up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.car-sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.car-x { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: var(--card); cursor: pointer; }
.car-col { display: flex; align-items: center; gap: 8px; font-size: .88rem; margin: 14px 0 8px; }
.car-col i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); }
.car-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.car-ph { position: relative; padding: 0; border: 2px solid var(--border); border-radius: 12px; background: #fff; cursor: pointer; overflow: hidden; display: grid; }
.car-ph img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.car-ph span { font-size: .7rem; padding: 3px 4px; color: var(--muted); }
.car-ph.on { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.car-ph b { position: absolute; top: 6px; left: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--gold-deep); color: #fff; font-size: .75rem; display: grid; place-items: center; }
.car-sheet-foot { position: sticky; bottom: -16px; background: var(--card); padding-top: 12px; margin-top: 12px; }

/* ---------- AI Design: background switch ---------- */
.bg-row { display: grid; gap: 6px; margin: 4px 0 14px; }
.bg-label { font-weight: 600; font-size: .9rem; }
.bg-row .seg-btn:disabled { opacity: .4; cursor: not-allowed; }
.bg-row [data-bg-clean] { justify-self: start; margin-top: 4px; }
.clean-sheet { position: fixed; inset: 0; z-index: 160; background: rgba(10, 10, 8, .6); display: grid; place-items: center; padding: 12px; }
.clean-sheet[hidden] { display: none; }
.clean-box { width: min(560px, 100%); max-height: 94vh; overflow-y: auto; background: var(--card); border-radius: 20px; padding: 16px; display: grid; gap: 10px; }
.clean-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.clean-stage { background: repeating-conic-gradient(#e6e1d6 0 25%, #fff 0 50%) 0 0 / 18px 18px; border-radius: 14px; display: grid; place-items: center; padding: 8px; }
.clean-stage canvas { max-width: 100%; max-height: 52vh; cursor: crosshair; touch-action: manipulation; }
.clean-tools { display: grid; gap: 6px; }

/* =====================================================================================================
 * Glassmorphism — frosted see-through panels over soft colour glows. Follows the chosen app colours.
 * Cards get their blur from a layer BEHIND them (::before), so drop-down sheets inside cards still open
 * full-screen on phones. Slower phones (html.lite) get the same look without the costly blur.
 * ===================================================================================================== */
:root {
  --glass: rgba(255, 255, 255, 0.52);
  --glass-strong: rgba(255, 255, 255, 0.7);
  --glass-soft: rgba(255, 255, 255, 0.34);
  --glass-line: rgba(255, 255, 255, 0.75);
  --glass-blur: 18px;
  --glass-shadow: 0 12px 34px -16px rgba(var(--ink-deep-rgb), 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.85), inset 0 -1px 0 rgba(255, 255, 255, 0.25);
  --field: rgba(255, 255, 255, 0.66);
}
/* richer colour behind the glass */
body::before {
  background:
    radial-gradient(40vmax 40vmax at 10% 12%, rgba(var(--c1-rgb), 0.30), transparent 62%),
    radial-gradient(36vmax 36vmax at 92% 10%, rgba(var(--c3-rgb), 0.26), transparent 62%),
    radial-gradient(42vmax 42vmax at 85% 85%, rgba(var(--c2-rgb), 0.24), transparent 62%),
    radial-gradient(34vmax 34vmax at 8% 90%, rgba(var(--gold-hi-rgb), 0.34), transparent 62%) !important;
}

/* ---- frosted cards (blur sits behind the card) ---- */
.card, .modal-card, .pt-sheet-card, .price-panel, .return-box, .assign-box, .qr-box, .tryon-panel, .pd-pick {
  position: relative; isolation: isolate;
  background: var(--glass) !important;
  border: 1px solid var(--glass-line) !important;
  box-shadow: var(--glass-shadow) !important;
}
.card::before, .modal-card::before, .pt-sheet-card::before, .price-panel::before, .assign-box::before, .tryon-panel::before, .pd-pick::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  backdrop-filter: blur(var(--glass-blur)) saturate(170%); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(170%);
}

/* ---- tiles, product cards and small panels: blur directly (nothing pops out of them) ---- */
.product-card, .dm-item, .feature-tile, .kpi, .quick-grid a, .role-tile, .alert-card, .admin-item, .admin-prod, .car-row, .st-item, .bulk-row, .order-card, .req-row, .bag-line, .list-row, .an-tile, .side-thumb, .gen-tile, .poffer, .offer-card {
  background: var(--glass) !important;
  border-color: var(--glass-line) !important;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%);
}
.product-card .pc-img, .dm-item img, .dm-item .shirt-svg { background-color: rgba(255, 255, 255, 0.55); }
.list-row { background: var(--glass-soft) !important; }

/* ---- bars ---- */
.topbar, .appbar {
  background: rgba(255, 255, 255, 0.55) !important; border-bottom: 1px solid var(--glass-line) !important;
  backdrop-filter: blur(22px) saturate(180%) !important; -webkit-backdrop-filter: blur(22px) saturate(180%) !important;
  box-shadow: 0 10px 30px -22px rgba(var(--ink-deep-rgb), 0.45) !important;
}
.tabbar {
  background: rgba(255, 255, 255, 0.58) !important; border-top: 1px solid var(--glass-line) !important;
  backdrop-filter: blur(24px) saturate(180%) !important; -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  box-shadow: 0 -14px 34px -24px rgba(var(--ink-deep-rgb), 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}
.admin-nav { background: transparent; }

/* ---- pop-ups and sheets ---- */
.dd-panel, .cb-panel, .car-sheet-box, .clean-box, .pt-sheet, .modal .modal-card {
  background: var(--glass-strong) !important; border: 1px solid var(--glass-line);
  backdrop-filter: blur(26px) saturate(180%); -webkit-backdrop-filter: blur(26px) saturate(180%);
  box-shadow: 0 24px 60px -24px rgba(var(--ink-deep-rgb), 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.toast { backdrop-filter: blur(16px) saturate(170%); -webkit-backdrop-filter: blur(16px) saturate(170%); }

/* ---- buttons, chips and fields ---- */
.btn-outline, .filter-chip:not(.active), .size-chip:not(.on), .seg, .stepper-input, .link-btn.pill, .pill {
  background: rgba(255, 255, 255, 0.5) !important; border-color: var(--glass-line) !important;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 4px 14px -10px rgba(var(--ink-deep-rgb), 0.35);
}
.seg-btn.active, .seg .seg-btn.active { background: rgba(255, 255, 255, 0.92) !important; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input:not([type]), select, textarea, input[type=file] {
  background: var(--field) !important; border-color: rgba(var(--c1-rgb), 0.18) !important;
  box-shadow: inset 0 1px 2px rgba(var(--ink-deep-rgb), 0.06);
}
input:focus, select:focus, textarea:focus { background: rgba(255, 255, 255, 0.9) !important; }

/* ---- photos keep a clean light backdrop so products look right ---- */
.pd-img, .studio-shirt, .pc-img { background-color: rgba(255, 255, 255, 0.6); }

/* ---- slower phones and "reduce transparency": same shapes, solid enough to read, no blur ---- */
html.lite .card, html.lite .product-card, html.lite .dm-item, html.lite .feature-tile, html.lite .kpi, html.lite .list-row, html.lite .admin-item, html.lite .tabbar, html.lite .topbar, html.lite .appbar,
html.lite .dd-panel, html.lite .cb-panel, html.lite .car-sheet-box, html.lite .clean-box, html.lite .pt-sheet { background: rgba(255, 255, 255, 0.86) !important; }
@media (prefers-reduced-transparency: reduce) {
  .card, .product-card, .dm-item, .feature-tile, .kpi, .list-row, .admin-item, .tabbar, .topbar, .appbar, .dd-panel, .cb-panel, .car-sheet-box, .clean-box, .pt-sheet { background: rgba(255, 255, 255, 0.94) !important; }
}
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .card, .product-card, .dm-item, .feature-tile, .kpi, .tabbar, .topbar, .appbar { background: rgba(255, 255, 255, 0.85) !important; }
}
/* printed / PDF invoices stay plain white */
.invoice-doc, .invoice-doc .card { background: #fff !important; backdrop-filter: none !important; box-shadow: none !important; }
.invoice-doc .card::before { display: none; }

/* Glass, round 2: more colour behind the glass, glassier panels */
body::before {
  background:
    radial-gradient(48vmax 48vmax at 6% 8%, rgba(var(--c1-rgb), 0.42), transparent 62%),
    radial-gradient(44vmax 44vmax at 96% 14%, rgba(var(--c3-rgb), 0.36), transparent 62%),
    radial-gradient(46vmax 46vmax at 60% 52%, rgba(var(--c2-rgb), 0.22), transparent 64%),
    radial-gradient(48vmax 48vmax at 92% 92%, rgba(var(--c2-rgb), 0.38), transparent 62%),
    radial-gradient(44vmax 44vmax at 4% 94%, rgba(var(--gold-hi-rgb), 0.5), transparent 62%) !important;
}
:root { --glass: linear-gradient(135deg, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0.36) 100%); --glass-soft: rgba(255, 255, 255, 0.3); }
.card, .product-card, .dm-item, .feature-tile, .kpi, .quick-grid a, .role-tile, .alert-card, .admin-item, .admin-prod, .car-row, .st-item, .order-card, .bag-line, .an-tile, .pd-pick, .price-panel, .tryon-panel, .gen-tile, .poffer, .offer-card {
  background: var(--glass) !important;
}
html.lite .card, html.lite .product-card, html.lite .dm-item, html.lite .feature-tile, html.lite .kpi, html.lite .admin-item { background: rgba(255, 255, 255, 0.8) !important; }
.tabbar { background: rgba(255, 255, 255, 0.7) !important; }
.tabbar a:not(.active), .tabbar .tab:not(.active) { color: rgba(var(--ink-deep-rgb), 0.62); }

/* ===================== Liquid glass: tab bubble + flowing screen changes ===================== */
.tabbar { position: fixed; }
.tab-item { z-index: 1; background: transparent !important; }
.tab-item.active::before { display: none !important; }            /* the bubble replaces the old line */
.tab-blob {
  position: absolute; left: 0; top: 50%; height: 54px; margin-top: calc(-27px - var(--safe-b, 0px) / 2);
  border-radius: 22px; z-index: 0; pointer-events: none; opacity: 0; transform-origin: center;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.35) 55%, rgba(255, 255, 255, 0.15) 100%),
    linear-gradient(180deg, rgba(var(--c1-rgb), 0.06), rgba(var(--c1-rgb), 0.16));
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 1), inset 0 -8px 14px -6px rgba(var(--c1-rgb), 0.28), 0 8px 20px -10px rgba(var(--c1-rgb), 0.55), 0 2px 6px -2px rgba(var(--ink-deep-rgb), 0.18);
  backdrop-filter: blur(4px) saturate(200%); -webkit-backdrop-filter: blur(4px) saturate(200%);
  transition: opacity .25s ease, width .3s ease;
  will-change: transform;
}
/* a small bright reflection on the top edge of the bubble */
.tab-blob::after { content: ""; position: absolute; left: 18%; right: 18%; top: 3px; height: 7px; border-radius: 6px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0)); }
.tab-item.active { color: var(--c1) !important; }
.tab-item.active .ic { transform: translateY(-1px); }

/* the tab bar stays put during a screen change — only the bubble moves (no double image) */
::view-transition-old(tabbar) { display: none; }
::view-transition-new(tabbar) { animation: none; }
::view-transition-old(topbar) { display: none; }
::view-transition-new(topbar) { animation: none; }

/* screens flow: the old one melts away, the new one flows in from the side you are going to, out of a soft blur */
::view-transition-old(root) { animation: liquidOut .26s cubic-bezier(.4, 0, .8, .4) both; }
::view-transition-new(root) { animation: liquidIn .48s cubic-bezier(.2, .9, .25, 1) both; }
@keyframes liquidOut { to { opacity: 0; transform: translateX(calc(var(--vt-dir, 1) * -26px)) scale(.985); filter: blur(6px); } }
@keyframes liquidIn {
  0% { opacity: 0; transform: translateX(calc(var(--vt-dir, 1) * 44px)) scale(1.015); filter: blur(10px); }
  60% { opacity: 1; filter: blur(0); }
  80% { transform: translateX(calc(var(--vt-dir, 1) * -3px)) scale(1); }
  100% { opacity: 1; transform: none; filter: none; }
}
/* slower phones: same flow without blur */
html.lite::view-transition-old(root) { animation: vtOut .2s cubic-bezier(.4, 0, 1, 1) both; }
html.lite::view-transition-new(root) { animation: vtIn .34s cubic-bezier(.22, 1, .36, 1) both; }
html.lite .tab-blob { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(255, 255, 255, 0.85); }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation: none; } }

/* =====================================================================================================
 * LIQUID GLASS (subtle) — works with liquid-glass.js
 * ===================================================================================================== */
/* ---- 1. Floating tab bar capsule ---- */
.tabbar {
  left: 12px !important; right: 12px !important; bottom: calc(10px + var(--safe-b)) !important;
  border-radius: 30px; padding: 6px 6px !important; border: 1px solid rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 18px 40px -18px rgba(var(--ink-deep-rgb), 0.45), 0 2px 6px -2px rgba(var(--ink-deep-rgb), 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(255, 255, 255, 0.35) !important;
  transform-origin: 50% 100%; transition: transform .45s cubic-bezier(.3, 1.3, .5, 1), opacity .3s ease;
  overflow: visible;
}
#app.in-app { padding-bottom: calc(96px + var(--safe-b)); }
.cb-fab.in-app { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.tab-blob { margin-top: -27px !important; }
/* lens edges where the phone supports it (the backdrop bends slightly at the rim) */
html.liquid-lens:not(.lite) .tabbar { backdrop-filter: blur(9px) saturate(185%) url(#viya-lens) !important; -webkit-backdrop-filter: blur(9px) saturate(185%) !important; }
/* reflection on the tab bar that follows the phone's tilt */
.tabbar::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(60% 140% at calc(50% + var(--tx, 0) * 35%) calc(-30% + var(--ty, 0) * 12%), rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 60%);
  mix-blend-mode: soft-light; transition: background-position .2s;
}
/* smaller pill while scrolling down */
body.tb-mini .tabbar { transform: translateY(4px) scale(.9); }
body.tb-mini .tab-item span { opacity: .0; transition: opacity .2s; }
.tab-item span { transition: opacity .25s ease .05s; }

/* ---- 2. Liquid buttons, chips and switches ---- */
.btn-gold, .btn-primary {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -3px 8px -2px rgba(0, 0, 0, 0.16), 0 10px 22px -12px rgba(var(--c1-rgb), 0.6) !important;
}
.btn-gold::before, .btn-primary::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(70% 120% at calc(30% + var(--tx, 0) * 25%) -10%, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0) 60%);
}
.seg-btn, .size-chip, .filter-chip { position: relative; overflow: hidden; }
/* press = squish (softly squashes, then springs back) */
.btn, .seg-btn, .size-chip, .filter-chip, .tab-item, .swatch, .product-card, .feature-tile, .pd-ph, .car-ph { transition: transform .5s cubic-bezier(.3, 1.6, .45, 1), box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease; }
.btn:active:not(:disabled), .seg-btn:active, .size-chip:active, .filter-chip:active, .tab-item:active, .swatch:active, .pd-ph:active, .car-ph:active { transform: scale(1.03, .93) !important; transition-duration: .09s; }
.product-card:active, .feature-tile:active { transform: scale(.985, .97) !important; transition-duration: .09s; }
/* the moving selection drop */
.liq-ghost { position: absolute; z-index: 0; pointer-events: none; will-change: transform; transform-origin: 0 0; }
.seg-btn, .size-chip { z-index: 1; }
.liq-flow { background: transparent !important; box-shadow: none !important; }
/* touch glow */
.liq-glow { position: absolute; border-radius: 50%; pointer-events: none; z-index: 2; background: radial-gradient(circle, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 60%); mix-blend-mode: soft-light; animation: liqGlow .65s ease-out forwards; }
@keyframes liqGlow { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.1); opacity: 0; } }
.tab-blob::after { transform: translateX(calc(var(--tx, 0) * 6px)); transition: transform .2s; }

/* ---- 3. Sheets and pop-ups grow out of the tapped spot ---- */
@keyframes liquidPop {
  0% { opacity: 0; transform: translate(var(--tap-dx, 0px), var(--tap-dy, 0px)) scale(.55); filter: blur(6px); }
  55% { opacity: 1; transform: translate(0, 0) scale(1.012, .99); filter: blur(0); }
  80% { transform: scale(.997, 1.004); }
  100% { opacity: 1; transform: none; filter: none; }
}
@keyframes liquidShrink { to { opacity: 0; transform: translate(var(--tap-dx, 0px), var(--tap-dy, 0px)) scale(.6); filter: blur(4px); } }
.car-sheet-box, .clean-box, .pt-sheet-card, .modal-card { animation: liquidPop .46s cubic-bezier(.2, .9, .25, 1) both !important; }
@media (max-width: 680px) { .dd-panel { animation: liquidPop .44s cubic-bezier(.2, .9, .25, 1) both !important; } }
.car-sheet.closing .car-sheet-box, .clean-sheet.closing .clean-box { animation: liquidShrink .22s cubic-bezier(.5, 0, .75, 0) both !important; }
.car-sheet.closing, .clean-sheet.closing { transition: background .22s; background: rgba(10, 10, 8, 0); }

/* ---- 5. Content glass polish: a thin bright rim and consistent soft depth ---- */
.card { border-radius: 22px; }
.card::after, .product-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 1px 0 0 rgba(255, 255, 255, 0.35), inset -1px 0 0 rgba(255, 255, 255, 0.25); }
.product-card { border-radius: 20px; }

/* ---- calm versions ---- */
html.lite .tabbar::after, html.lite .btn-gold::before, html.lite .btn-primary::before { display: none; }
html.lite .car-sheet-box, html.lite .clean-box, html.lite .pt-sheet-card, html.lite .modal-card, html.lite .dd-panel { animation-duration: .25s !important; }
@media (prefers-reduced-motion: reduce) {
  .tabbar, .tab-item span { transition: none; }
  body.tb-mini .tabbar { transform: none; } body.tb-mini .tab-item span { opacity: 1; }
  .car-sheet-box, .clean-box, .pt-sheet-card, .modal-card, .dd-panel { animation: none !important; }
  .btn:active:not(:disabled), .seg-btn:active, .size-chip:active, .tab-item:active { transform: none !important; }
}
@media (prefers-reduced-transparency: reduce) { .tabbar::after, .btn-gold::before { display: none; } }

/* =====================================================================================================
 * SPEED: same look, much less work for the phone
 * ===================================================================================================== */
/* the colour glows stay still (a moving background made the phone re-blur every glass panel on every frame) */
body::before { animation: none !important; will-change: auto; }
/* text gradients and button colours stop flowing continuously (they were repainted every frame) */
.btn-gold, .btn-primary { animation: none !important; }
.topbar::after, .appbar::after { animation: none !important; }
:root[data-palette] .wordmark, :root[data-palette] .form-head h1, :root[data-palette] .screen-title, :root[data-palette] .pd-info h1, :root[data-palette] .section-head h2, :root[data-palette] .dash-head h1, :root[data-palette] .gold-text,
.wordmark, .form-head h1, .screen-title, .pd-info h1, .section-head h2, .dash-head h1, .gold-text { animation: none !important; }
/* only a few big surfaces keep a real blur: the bars, the tab bubble and pop-up sheets.
   Cards, tiles, rows, buttons and fields keep the same glass look from see-through layers (no blur work). */
.card::before, .modal-card::before, .pt-sheet-card::before, .price-panel::before, .assign-box::before, .tryon-panel::before, .pd-pick::before { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; display: none; }
.product-card, .dm-item, .feature-tile, .kpi, .quick-grid a, .role-tile, .alert-card, .admin-item, .admin-prod, .car-row, .st-item, .bulk-row, .order-card, .req-row, .bag-line, .list-row, .an-tile, .side-thumb, .gen-tile, .poffer, .offer-card,
.btn-outline, .filter-chip, .size-chip, .seg, .stepper-input, .pill, .toast { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.card, .product-card, .dm-item, .feature-tile, .kpi { background: linear-gradient(135deg, rgba(255, 255, 255, 0.74) 0%, rgba(255, 255, 255, 0.5) 100%) !important; }
/* the tab bar: plain blur while scrolling; the lens edge only when the page is still */
html.liquid-lens:not(.lite) .tabbar { backdrop-filter: blur(14px) saturate(180%) !important; }
html.liquid-lens:not(.lite) .tabbar:not(.lens-moving) { backdrop-filter: blur(9px) saturate(185%) url(#viya-lens) !important; }
.tabbar::after { mix-blend-mode: normal; background: radial-gradient(60% 140% at calc(50% + var(--tx, 0) * 35%) calc(-30% + var(--ty, 0) * 12%), rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 60%); }
.btn-gold::before, .btn-primary::before { background: radial-gradient(70% 120% at 30% -10%, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 60%); }
.liq-glow { mix-blend-mode: normal; background: radial-gradient(circle, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0) 60%); }
/* screen changes: quick and light (no full-screen blur) */
::view-transition-old(root) { animation: liquidOut2 .14s cubic-bezier(.4, 0, 1, 1) both !important; }
::view-transition-new(root) { animation: liquidIn2 .26s cubic-bezier(.2, .9, .25, 1) both !important; }
@keyframes liquidOut2 { to { opacity: 0; transform: translateX(calc(var(--vt-dir, 1) * -14px)); } }
@keyframes liquidIn2 { from { opacity: 0; transform: translateX(calc(var(--vt-dir, 1) * 26px)); } to { opacity: 1; transform: none; } }
/* the tab bar never animates its size/opacity on screen change */
.tab-blob { transition: opacity .2s ease; }
.tab-item, .tab-item .ic { transition: color .15s ease, transform .4s cubic-bezier(.3, 1.6, .45, 1); }

/* =====================================================================================================
 * ALL PHONES FAST
 * ===================================================================================================== */
/* taps respond immediately (no double-tap-zoom wait) */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; }
a, button, [role="button"], input, select, textarea, label { touch-action: manipulation; }
/* long lists: rows far off-screen are not drawn until you scroll near them */
.product-grid > .product-card { content-visibility: auto; contain-intrinsic-size: auto 330px; }
.admin-prod, .admin-item, .st-item, .bulk-row, .order-card, .req-row, .car-row, .list-row { content-visibility: auto; contain-intrinsic-size: auto 96px; }
/* while a screen opens very early (its files still loading) */
.boot-wait { min-height: 60vh; display: grid; place-items: center; }
#splash.hide { transition-duration: .4s !important; }

/* Light look for slower phones: same layout and colours, nothing heavy */
html.lite body::before { display: none !important; }
html.lite body { background: linear-gradient(160deg, rgba(var(--soft-rgb), 1) 0%, var(--bg) 55%, rgba(var(--gold-hi-rgb), 0.18) 100%) fixed !important; }
html.lite .card, html.lite .product-card, html.lite .dm-item, html.lite .feature-tile, html.lite .kpi, html.lite .list-row, html.lite .admin-item, html.lite .admin-prod,
html.lite .btn, html.lite .btn-outline, html.lite .seg-btn.active, html.lite .size-chip, html.lite .filter-chip, html.lite .tabbar, html.lite .appbar, html.lite .topbar {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 10px -6px rgba(0, 0, 0, 0.12) !important;
}
html.lite .card::after, html.lite .product-card::after, html.lite .tabbar::after, html.lite .btn-gold::before, html.lite .btn-primary::before, html.lite .btn-gold::after { display: none !important; }
html.lite .card, html.lite .product-card, html.lite .dm-item, html.lite .feature-tile, html.lite .kpi { background: rgba(255, 255, 255, 0.9) !important; }
html.lite .tabbar, html.lite .appbar, html.lite .topbar { background: rgba(255, 255, 255, 0.96) !important; }
html.lite .home-hero::after, html.lite .showroom-hero::after, html.lite .kpi-hero::after, html.lite .cb-fab::before, html.lite .float, html.lite .hh-art, html.lite .sh-art { animation: none !important; }
html.lite .dm-track { animation-duration: 60s; }
html.lite .stagger, html.lite .screen-in { animation-duration: .18s !important; animation-delay: 0s !important; }
html.lite * { transition-duration: .12s !important; }
html.lite .tab-blob { transition: none; }

/* =====================================================================================================
 * DARK MODE — html[data-mode="dark"] (chosen in Profile → Appearance). Works with every app colour.
 * ===================================================================================================== */
.mode-title { font-size: .9rem; margin: 18px 0 8px; }
.mode-pick { margin-bottom: 6px; }
.mode-note { margin: 0; }
html:root[data-mode="dark"], html:root[data-mode="dark"][data-palette] {
  color-scheme: dark;
  --bg: #0e1016; --soft: #1a1e27; --soft-rgb: 26, 30, 39;
  --card: #161a22; --text: #eceef4; --muted: #a2a9ba; --ink: #eceef4;
  --border: rgba(255, 255, 255, 0.09); --border-strong: rgba(255, 255, 255, 0.18);
  --field: rgba(255, 255, 255, 0.06);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 16px 36px -20px rgba(0, 0, 0, 0.8);
  --studio: radial-gradient(120% 95% at 50% 28%, #f4f4f6 0%, #e4e5ea 60%, #d4d6dd 100%);
  --gold-text: linear-gradient(100deg, #ffffff 0%, rgba(var(--gold-hi-rgb), 1) 60%, rgba(var(--c3-rgb), 1) 100%);
  --glass: linear-gradient(135deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.04) 100%);
  --glass-strong: rgba(24, 27, 36, 0.9); --glass-soft: rgba(255, 255, 255, 0.05); --glass-line: rgba(255, 255, 255, 0.14);
  --glass-shadow: 0 14px 34px -16px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.10);
}
html[data-mode="dark"] body { background: var(--bg) !important; color: var(--text); }
html[data-mode="dark"] body::before {
  background:
    radial-gradient(48vmax 48vmax at 6% 8%, rgba(var(--c1-rgb), 0.30), transparent 62%),
    radial-gradient(44vmax 44vmax at 96% 14%, rgba(var(--c3-rgb), 0.16), transparent 62%),
    radial-gradient(48vmax 48vmax at 92% 92%, rgba(var(--c2-rgb), 0.26), transparent 62%),
    radial-gradient(44vmax 44vmax at 4% 94%, rgba(var(--gold-hi-rgb), 0.10), transparent 62%) !important;
}
html[data-mode="dark"].lite body { background: linear-gradient(160deg, #141823 0%, var(--bg) 60%, #121014 100%) fixed !important; }
/* glass surfaces */
html[data-mode="dark"] .card, html[data-mode="dark"] .product-card, html[data-mode="dark"] .dm-item, html[data-mode="dark"] .feature-tile, html[data-mode="dark"] .kpi,
html[data-mode="dark"] .quick-grid a, html[data-mode="dark"] .role-tile, html[data-mode="dark"] .alert-card, html[data-mode="dark"] .admin-item, html[data-mode="dark"] .admin-prod,
html[data-mode="dark"] .car-row, html[data-mode="dark"] .st-item, html[data-mode="dark"] .order-card, html[data-mode="dark"] .bag-line, html[data-mode="dark"] .an-tile, html[data-mode="dark"] .pd-pick,
html[data-mode="dark"] .price-panel, html[data-mode="dark"] .tryon-panel, html[data-mode="dark"] .gen-tile, html[data-mode="dark"] .poffer, html[data-mode="dark"] .offer-card, html[data-mode="dark"] .modal-card,
html[data-mode="dark"] .pt-sheet-card, html[data-mode="dark"] .return-box, html[data-mode="dark"] .assign-box, html[data-mode="dark"] .qr-box, html[data-mode="dark"] .req-row, html[data-mode="dark"] .bulk-row,
html[data-mode="dark"] .return-note, html[data-mode="dark"] .st-frow, html[data-mode="dark"] .clean-tools {
  background: var(--glass) !important; border-color: var(--glass-line) !important; color: var(--text);
}
html[data-mode="dark"] .card::after, html[data-mode="dark"] .product-card::after { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12); }
html[data-mode="dark"].lite .card, html[data-mode="dark"].lite .product-card, html[data-mode="dark"].lite .dm-item, html[data-mode="dark"].lite .feature-tile, html[data-mode="dark"].lite .kpi { background: #181c25 !important; }
html[data-mode="dark"] .list-row { background: rgba(255, 255, 255, 0.04) !important; color: var(--text); }
/* bars */
html[data-mode="dark"] .appbar, html[data-mode="dark"] .topbar { background: rgba(16, 18, 25, 0.72) !important; border-bottom-color: rgba(255, 255, 255, 0.08) !important; }
html[data-mode="dark"] .tabbar { background: rgba(24, 27, 36, 0.74) !important; border-color: rgba(255, 255, 255, 0.12) !important; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.10) !important; }
html[data-mode="dark"].lite .tabbar, html[data-mode="dark"].lite .appbar, html[data-mode="dark"].lite .topbar { background: rgba(20, 23, 31, 0.97) !important; }
html[data-mode="dark"] .tabbar a:not(.active), html[data-mode="dark"] .tab-item:not(.active) { color: rgba(236, 238, 244, 0.62) !important; }
html[data-mode="dark"] .tab-item.active { color: rgba(var(--gold-hi-rgb), 1) !important; }
html[data-mode="dark"] .tab-blob { background: radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.06) 60%), linear-gradient(180deg, rgba(var(--c1-rgb), 0.25), rgba(var(--c1-rgb), 0.45)); border-color: rgba(255, 255, 255, 0.22); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 8px 20px -10px rgba(0, 0, 0, 0.8); }
html[data-mode="dark"] .tab-blob::after { background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0)); }
html[data-mode="dark"] .tabbar::after { background: radial-gradient(60% 140% at calc(50% + var(--tx, 0) * 35%) -30%, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0) 60%); }
html[data-mode="dark"] .icon-btn, html[data-mode="dark"] .appbar .icon-btn { color: var(--text); }
/* text */
html[data-mode="dark"] h1, html[data-mode="dark"] h2, html[data-mode="dark"] h3, html[data-mode="dark"] strong, html[data-mode="dark"] label, html[data-mode="dark"] .pc-name, html[data-mode="dark"] .pd-price, html[data-mode="dark"] .pc-price { color: var(--text); }
html[data-mode="dark"] .muted, html[data-mode="dark"] small, html[data-mode="dark"] .hint, html[data-mode="dark"] .field-hint { color: var(--muted); }
html[data-mode="dark"] a:not(.btn):not(.tab-item):not(.product-card):not(.dm-item):not(.feature-tile):not(.an-tile):not(.list-row):not(.quick-grid a) { color: rgba(var(--gold-hi-rgb), 1); }
html[data-mode="dark"] .form-section, html[data-mode="dark"] .pc-tag { color: rgba(var(--gold-hi-rgb), 0.9) !important; }
/* buttons, chips, switches */
html[data-mode="dark"] .btn-outline, html[data-mode="dark"] .filter-chip:not(.active), html[data-mode="dark"] .size-chip:not(.on), html[data-mode="dark"] .stepper-input, html[data-mode="dark"] .pill, html[data-mode="dark"] .link-btn.pill {
  background: rgba(255, 255, 255, 0.07) !important; color: var(--text) !important; border-color: rgba(255, 255, 255, 0.16) !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}
html[data-mode="dark"] .seg { background: rgba(255, 255, 255, 0.06) !important; border-color: rgba(255, 255, 255, 0.1) !important; }
html[data-mode="dark"] .seg-btn { color: var(--muted); }
html[data-mode="dark"] .seg-btn.active, html[data-mode="dark"] .seg .seg-btn.active { background: rgba(255, 255, 255, 0.16) !important; color: #fff !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 4px 12px -6px rgba(0, 0, 0, 0.7) !important; }
html[data-mode="dark"] .size-chip.on { background: rgba(var(--gold-hi-rgb), 0.95) !important; color: #1b1406 !important; border-color: transparent !important; }
html[data-mode="dark"] .filter-chip.active { background: rgba(var(--gold-hi-rgb), 0.95) !important; color: #1b1406 !important; }
html[data-mode="dark"] .stepper-input button, html[data-mode="dark"] .stepper-input output { color: var(--text); }
html[data-mode="dark"] .swatch { border-color: #222733; }
/* fields */
html[data-mode="dark"] input[type=text], html[data-mode="dark"] input[type=email], html[data-mode="dark"] input[type=password], html[data-mode="dark"] input[type=search], html[data-mode="dark"] input[type=date], html[data-mode="dark"] input[type=tel], html[data-mode="dark"] input[type=number],
html[data-mode="dark"] input:not([type]), html[data-mode="dark"] select, html[data-mode="dark"] textarea, html[data-mode="dark"] input[type=file], html[data-mode="dark"] .dd-btn, html[data-mode="dark"] .dd-trigger {
  background: rgba(255, 255, 255, 0.06) !important; color: var(--text) !important; border-color: rgba(255, 255, 255, 0.16) !important;
}
html[data-mode="dark"] input:focus, html[data-mode="dark"] select:focus, html[data-mode="dark"] textarea:focus { background: rgba(255, 255, 255, 0.1) !important; }
html[data-mode="dark"] ::placeholder { color: rgba(236, 238, 244, 0.38); }
html[data-mode="dark"] input[readonly] { background: rgba(255, 255, 255, 0.03) !important; }
/* menus, sheets, pop-ups, chat, toasts */
html[data-mode="dark"] .dd-panel, html[data-mode="dark"] .cb-panel, html[data-mode="dark"] .car-sheet-box, html[data-mode="dark"] .clean-box, html[data-mode="dark"] .pt-sheet, html[data-mode="dark"] .modal .modal-card {
  background: rgba(22, 25, 33, 0.96) !important; color: var(--text); border-color: rgba(255, 255, 255, 0.12) !important;
}
html[data-mode="dark"] .dd-opt { color: var(--text); }
html[data-mode="dark"] .dd-opt:hover, html[data-mode="dark"] .dd-opt.active, html[data-mode="dark"] .dd-opt[aria-selected="true"] { background: rgba(255, 255, 255, 0.08) !important; }
html[data-mode="dark"] .cb-msg.bot p, html[data-mode="dark"] .cb-msg.bot { background: rgba(255, 255, 255, 0.07); color: var(--text); }
html[data-mode="dark"] .cb-head, html[data-mode="dark"] .cb-input, html[data-mode="dark"] .cb-foot { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.1); }
html[data-mode="dark"] .toast { background: rgba(30, 34, 44, 0.96) !important; color: var(--text) !important; border-color: rgba(255, 255, 255, 0.12) !important; }
/* tables, dividers */
html[data-mode="dark"] table th, html[data-mode="dark"] table td { border-color: rgba(255, 255, 255, 0.08) !important; color: var(--text); }
html[data-mode="dark"] hr, html[data-mode="dark"] .pd-pick-row + .pd-pick-row { border-color: rgba(255, 255, 255, 0.08); }
/* product photos keep a soft light backdrop so tees look true to colour */
html[data-mode="dark"] .pc-img, html[data-mode="dark"] .pd-img, html[data-mode="dark"] .dm-item img, html[data-mode="dark"] .dm-item .shirt-svg, html[data-mode="dark"] .studio-shirt, html[data-mode="dark"] .pd-ph img, html[data-mode="dark"] .car-img img, html[data-mode="dark"] .st-thumb { background-color: #e9eaee !important; }
html[data-mode="dark"] .pd-img { background: radial-gradient(circle at 50% 40%, #fafafb 0%, #dcdde3 100%) !important; }
html[data-mode="dark"] .pc-img img.pc-photo, html[data-mode="dark"] .pd-img img.pc-photo { background: #f4f4f6; }
/* status chips stay readable */
html[data-mode="dark"] .status-chip { filter: brightness(1.15) saturate(1.1); }
/* invoices and PDFs are always printed light */
html[data-mode="dark"] .invoice-doc { color-scheme: light; background: #fff !important; color: #1a1712 !important; }
html[data-mode="dark"] .invoice-doc * { color: inherit; }
/* dark mode: headings and the name use a light gold sheen (the themes' own dark ink would vanish on dark) */
html:root[data-mode="dark"] .wordmark, html:root[data-mode="dark"] .splash-name, html:root[data-mode="dark"] .form-head h1, html:root[data-mode="dark"] .screen-title, html:root[data-mode="dark"] .pd-info h1,
html:root[data-mode="dark"] .section-head h2, html:root[data-mode="dark"] .dash-head h1, html:root[data-mode="dark"] .gold-text, html:root[data-mode="dark"] .stage-intro h2 {
  background: linear-gradient(100deg, #ffffff 0%, rgba(var(--gold-hi-rgb), 1) 55%, rgba(var(--c3-rgb), 1) 100%) !important; -webkit-background-clip: text !important; background-clip: text !important; color: transparent !important;
}
html[data-mode="dark"] .btn-secondary { background: rgba(var(--gold-hi-rgb), 0.95) !important; color: #1b1406 !important; border-color: transparent !important; }
html[data-mode="dark"] .btn-ghost { background: rgba(255, 255, 255, 0.07) !important; color: var(--text) !important; border-color: rgba(255, 255, 255, 0.18) !important; }
html[data-mode="dark"] .btn:disabled { opacity: .55; }
html[data-mode="dark"] .palette-pick button { background: rgba(255, 255, 255, 0.06) !important; color: var(--text) !important; border-color: rgba(255, 255, 255, 0.14) !important; }
html[data-mode="dark"] .palette-pick button.active { border-color: rgba(var(--gold-hi-rgb), 0.9) !important; box-shadow: 0 0 0 3px rgba(var(--gold-hi-rgb), 0.2) !important; }
html[data-mode="dark"] .pc-badge, html[data-mode="dark"] .pc-badge.static { background: #1b1406; color: rgba(var(--gold-hi-rgb), 1); }
html[data-mode="dark"] .pt-slot { background: linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)) !important; border: 1px solid rgba(255, 255, 255, 0.14) !important; color: var(--text) !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important; }
html[data-mode="dark"] .pt-slot-ic { color: rgba(var(--gold-hi-rgb), 1); background: rgba(var(--gold-hi-rgb), 0.12); }
html[data-mode="dark"] .offer-cta { color: #1b1406 !important; background: rgba(255, 255, 255, 0.92) !important; }

/* =====================================================================================================
 * PREMIUM DASHBOARD UI (pro-ui.js) + CORAL THEME
 * ===================================================================================================== */
/* ---- Coral & white theme ---- */
:root[data-palette="coral"] {
  --c1: #e8513f; --c1-rgb: 232, 81, 63; --c2: #ff7a66; --c2-rgb: 255, 122, 102; --c3: #ffa877; --c3-rgb: 255, 168, 119;
  --deep: #a5302a; --deep-rgb: 165, 48, 42; --c2-deep: #c4402f; --ink-deep: #3b1512; --ink-deep-rgb: 59, 21, 18;
  --gold-hi: #ffd3b8; --gold-hi-rgb: 255, 211, 184; --gold-mid: #e88c5a; --gold-mid-rgb: 232, 140, 90; --soft-rgb: 255, 242, 238;
  --violet: #e8513f; --rose: #ff7a66; --plum: #3b1512;
  --brand-grad: linear-gradient(120deg, #c93a2e 0%, #e8513f 40%, #ff7a66 72%, #ffb085 100%);
  --brand-soft: linear-gradient(135deg, #fff2ee 0%, #fff6f1 55%, #fffaf3 100%);
  --night-grad: linear-gradient(140deg, #3b1512 0%, #7a2a22 50%, #c93a2e 100%);
  --gold-text: linear-gradient(100deg, #7a2a22 0%, #e8513f 55%, #f08a5c 100%);
  --bg: #fffaf8; --soft: #fff2ee; --text: #2b1513; --muted: #7b605c;
  --border: rgba(232, 81, 63, 0.13); --border-strong: rgba(232, 81, 63, 0.32);
  --shadow: 0 1px 2px rgba(59, 21, 18, 0.05), 0 16px 36px -20px rgba(232, 81, 63, 0.4);
  --studio: radial-gradient(120% 95% at 50% 28%, #ffffff 0%, #fff4f1 55%, #fde4dd 100%);
}
:root[data-palette="coral"] .wordmark, :root[data-palette="coral"] .splash-name, :root[data-palette="coral"] .form-head h1, :root[data-palette="coral"] .screen-title, :root[data-palette="coral"] .pd-info h1,
:root[data-palette="coral"] .section-head h2, :root[data-palette="coral"] .dash-head h1, :root[data-palette="coral"] .gold-text {
  background: linear-gradient(100deg, var(--deep), var(--c1), var(--gold-mid), var(--c1), var(--deep)); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
}
:root[data-palette="coral"] .theme-gold { background: radial-gradient(70% 90% at 100% 0%, rgba(var(--gold-hi-rgb), .5), transparent 60%), var(--night-grad); color: #fff; }

/* ---- stat cards ---- */
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 4px 0 18px; }
@media (min-width: 860px) { .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat-card {
  --tone: var(--c1); --tone-rgb: var(--c1-rgb);
  position: relative; display: grid; gap: 4px; padding: 14px 14px 12px; border-radius: 20px; overflow: hidden; text-decoration: none !important; color: var(--text);
  background: linear-gradient(150deg, rgba(var(--tone-rgb), 0.10) 0%, rgba(255, 255, 255, 0.72) 55%, rgba(255, 255, 255, 0.55) 100%);
  border: 1px solid rgba(255, 255, 255, 0.85); box-shadow: 0 12px 30px -18px rgba(var(--tone-rgb), 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform .35s cubic-bezier(.2, .9, .25, 1.2), box-shadow .25s ease;
}
.stat-card::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--tone-rgb), 0.18), transparent 70%); pointer-events: none; }
.stat-card.tone-c2 { --tone: var(--c2); --tone-rgb: var(--c2-rgb); }
.stat-card.tone-c3 { --tone: var(--c3); --tone-rgb: var(--c3-rgb); }
.stat-card.tone-gold { --tone: var(--gold-mid); --tone-rgb: var(--gold-mid-rgb); }
.stat-card.tone-warn { --tone: #e08a1e; --tone-rgb: 224, 138, 30; }
.stat-card.tone-good { --tone: #16a36a; --tone-rgb: 22, 163, 106; }
@media (hover: hover) { .stat-card:hover { transform: translateY(-5px); box-shadow: 0 22px 40px -20px rgba(var(--tone-rgb), 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.9); } }
.stat-card:active { transform: scale(.98); }
.sc-top { display: flex; justify-content: space-between; align-items: center; }
.sc-ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--tone), rgba(var(--tone-rgb), 0.7)); box-shadow: 0 6px 14px -6px rgba(var(--tone-rgb), 0.8); }
.sc-ic .ic { width: 18px; height: 18px; }
.sc-badge { font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 99px; }
.sc-badge.up { color: #0f7a4d; background: rgba(22, 163, 106, 0.14); }
.sc-badge.down { color: #b42318; background: rgba(217, 45, 32, 0.12); }
.sc-badge.flat { color: var(--muted); background: rgba(0, 0, 0, 0.05); }
.sc-title { font-size: .78rem; color: var(--muted); font-weight: 600; margin-top: 6px; }
.sc-value { font-size: 1.45rem; line-height: 1.15; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.sc-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; min-height: 28px; }
.sc-note { color: var(--muted); font-size: .72rem; line-height: 1.3; }
.spark { width: 62%; max-width: 120px; height: 34px; color: var(--tone); flex-shrink: 0; overflow: visible; }
.crm-kpis .stat-card { margin: 0; }
.muted-kpi { opacity: .75; }

/* ---- draw-in: trend lines, bar charts, donuts ---- */
.spark .spark-line { stroke-dasharray: 100; stroke-dashoffset: 100; }
.spark.drawn .spark-line { stroke-dashoffset: 0; transition: stroke-dashoffset .9s cubic-bezier(.3, .7, .25, 1) .1s; }
.spark .spark-fill, .spark circle { opacity: 0; }
.spark.drawn .spark-fill, .spark.drawn circle { opacity: 1; transition: opacity .6s ease .45s; }
.chart g path { transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0); }
.chart.drawn g path { transform: none; transition: transform .7s cubic-bezier(.2, .9, .25, 1.1); }
.chart.drawn g:nth-of-type(2) path { transition-delay: .04s; } .chart.drawn g:nth-of-type(3) path { transition-delay: .08s; } .chart.drawn g:nth-of-type(4) path { transition-delay: .12s; }
.chart.drawn g:nth-of-type(5) path { transition-delay: .16s; } .chart.drawn g:nth-of-type(6) path { transition-delay: .2s; } .chart.drawn g:nth-of-type(n+7) path { transition-delay: .24s; }
.chart g:hover path { filter: brightness(1.15); }
.donut path { transform-origin: 80px 80px; transform: scale(.6) rotate(-40deg); opacity: 0; }
.donut.drawn path { transform: none; opacity: 1; transition: transform .7s cubic-bezier(.2, .9, .25, 1.1), opacity .4s ease; }
.donut path:hover { filter: brightness(1.1); }
.instant, .instant * { transition: none !important; }

/* ---- avatars with status dots ---- */
.pro-avatar { position: relative; flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; color: hsl(var(--av-h), 45%, 30%); background: linear-gradient(135deg, hsl(var(--av-h), 80%, 90%), hsl(calc(var(--av-h) + 40), 75%, 82%)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7); }
.pro-avatar.xl { width: 64px; height: 64px; font-size: 1.25rem; }
.av-dot { position: absolute; right: 0; bottom: 0; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--card, #fff); background: #9aa3ae; }
.av-dot.online { background: #16a36a; } .av-dot.new { background: var(--c1); } .av-dot.busy { background: #e08a1e; }
.list-row .pro-avatar { margin-right: 4px; }
.list-row.active { background: rgba(var(--c1-rgb), 0.08) !important; box-shadow: inset 3px 0 0 var(--c1); }

/* ---- admin search ---- */
.admin-search { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 0 14px; border-radius: 16px; border: 1px solid var(--glass-line, var(--border)); background: rgba(255, 255, 255, 0.6); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8); }
.admin-search .ic { color: var(--muted); width: 18px; height: 18px; }
.admin-search input { flex: 1; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 12px 0; min-height: 0; }

/* ---- CRM: list | enquiry | customer, side by side on wide screens ---- */
.crm-split { display: grid; grid-template-columns: 320px minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.crm-pane { min-width: 0; }
.crm-list-pane { position: sticky; top: 84px; max-height: calc(100vh - 110px); overflow-y: auto; padding: 6px !important; }
.crm-pane-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 10px; }
.crm-side { position: sticky; top: 84px; display: grid; gap: 14px; justify-items: stretch; }
.crm-side-top { display: grid; justify-items: center; gap: 6px; text-align: center; padding-top: 6px; }
.crm-quick { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.crm-side-dl { display: grid; gap: 8px; margin: 0; }
.crm-side-dl div { display: flex; justify-content: space-between; gap: 8px; font-size: .86rem; border-top: 1px solid var(--border); padding-top: 8px; }
.crm-side-dl dt { color: var(--muted); } .crm-side-dl dd { margin: 0; text-align: right; font-weight: 600; }
#app.crm-wide .page, #app.crm-wide main, #app.crm-wide .public-main { max-width: 1400px !important; }

/* ---- lists and cards slide in, one after another ---- */
@keyframes proIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.stat-grid > *, .list > .list-row, .card.flush > .list-row { animation: proIn .45s cubic-bezier(.2, .9, .25, 1) both; }
.stat-grid > :nth-child(2), .list-row:nth-child(2) { animation-delay: .05s; } .stat-grid > :nth-child(3), .list-row:nth-child(3) { animation-delay: .1s; }
.stat-grid > :nth-child(4), .list-row:nth-child(4) { animation-delay: .15s; } .list-row:nth-child(5) { animation-delay: .2s; } .list-row:nth-child(n+6) { animation-delay: .24s; }

/* ---- dark mode + light (slow-phone) mode ---- */
html[data-mode="dark"] .stat-card { background: linear-gradient(150deg, rgba(var(--tone-rgb), 0.22) 0%, rgba(255, 255, 255, 0.06) 60%, rgba(255, 255, 255, 0.03) 100%) !important; border-color: rgba(255, 255, 255, 0.12) !important; color: var(--text); box-shadow: 0 14px 30px -18px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
html[data-mode="dark"] .sc-badge.up { color: #5ee0a6; background: rgba(22, 163, 106, 0.2); } html[data-mode="dark"] .sc-badge.down { color: #ff8b80; background: rgba(217, 45, 32, 0.22); }
html[data-mode="dark"] .admin-search { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.14); }
html[data-mode="dark"] .pro-avatar { color: hsl(var(--av-h), 70%, 88%); background: linear-gradient(135deg, hsl(var(--av-h), 40%, 32%), hsl(calc(var(--av-h) + 40), 40%, 26%)); }
html[data-mode="dark"] .av-dot { border-color: #161a22; }
html[data-mode="dark"] .list-row.active { background: rgba(255, 255, 255, 0.08) !important; }
html.lite .stat-card { background: rgba(255, 255, 255, 0.9) !important; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 10px -6px rgba(0, 0, 0, 0.12) !important; }
html.lite .stat-card::after { display: none; }
html[data-mode="dark"].lite .stat-card { background: #181c25 !important; }
html.lite .stat-grid > *, html.lite .list-row { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .stat-grid > *, .list-row { animation: none !important; } .chart g path, .donut path, .spark .spark-line { transform: none !important; stroke-dashoffset: 0 !important; opacity: 1 !important; } }
.palette-pick { grid-template-columns: repeat(auto-fit, minmax(68px, 1fr)) !important; }
/* the selected admin section keeps its colour over the glass */
.an-tile.active { background: var(--brand-grad) !important; color: #fff !important; border-color: transparent !important; box-shadow: 0 10px 22px -12px rgba(var(--c1-rgb), 0.7) !important; }
.an-tile.active .ic, .an-tile.active span { color: #fff !important; }
.sc-note { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 48%; }
.spark { width: 52%; }
/* CRM split view needs the full width of a computer screen */
@media (min-width: 1100px) { .container:has(.crm-split) { max-width: 1400px; } }
.crm-main-pane { min-width: 360px; }

/* =====================================================================
   ADMIN SIDE MENU (☰ or tap the VIYA logo) + MORE INTERACTION FEEL
   ===================================================================== */
.topbar.has-adm { gap: 6px; }
.menu-btn { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; border: 1px solid var(--border); background: rgba(255,255,255,.55); color: var(--ink); cursor: pointer; flex: none; -webkit-tap-highlight-color: transparent; transition: transform .18s var(--ease-out), background-color .2s; }
.menu-btn .ic { width: 22px; height: 22px; }
.menu-btn:active { transform: scale(.9); }
.menu-dot { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand-grad, #d9473a); color: #fff; font: 700 .64rem/18px system-ui, sans-serif; text-align: center; box-shadow: 0 0 0 2px var(--surface, #fff); }
@keyframes dotPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.brand-btn { background: none; border: 0; padding: 0; cursor: pointer; color: inherit; font: inherit; display: inline-flex; align-items: center; gap: 8px; -webkit-tap-highlight-color: transparent; transition: transform .18s var(--ease-out); }
.brand-btn:active { transform: scale(.95); }
.topbar.has-adm .back-link { margin-left: auto; }

/* Section bar on the admin page: shows where you are, opens the menu */
.adm-current { display: flex; align-items: center; gap: 10px; width: 100%; margin: 4px 0 16px; padding: 12px 14px; border-radius: 18px; border: 1px solid var(--border); background: rgba(255,255,255,.6); color: var(--ink); font: inherit; text-align: left; cursor: pointer; box-shadow: 0 10px 24px -18px rgba(0,0,0,.35); -webkit-tap-highlight-color: transparent; transition: transform .18s var(--ease-out), box-shadow .2s; }
.adm-current:active { transform: scale(.98); }
.adm-current > .ic:first-child { width: 20px; height: 20px; opacity: .7; }
.adm-cur-ic { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--brand-grad); color: #fff; }
.adm-cur-ic .ic { width: 18px; height: 18px; color: #fff; }
.adm-current strong { font-size: 1rem; }
.adm-current small { margin-left: auto; color: var(--muted); font-size: .78rem; }
.adm-current > .ic:last-child { width: 16px; height: 16px; opacity: .5; }

/* The drawer */
.adm-drawer { position: fixed; inset: 0; z-index: 1200; }
.adm-drawer { visibility: hidden; pointer-events: none; transition: visibility 0s linear .34s; }
.adm-drawer.open { visibility: visible; pointer-events: auto; transition: none; }
.adm-scrim { position: absolute; inset: 0; background: rgba(12, 10, 14, .38); opacity: 0; transition: opacity .3s ease; }
.adm-panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(84vw, 320px); display: flex; flex-direction: column; padding: max(14px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); background: #fffdfc; border-radius: 0 26px 26px 0; contain: layout paint; box-shadow: 18px 0 50px -20px rgba(0,0,0,.45); transform: translateX(-104%); transition: transform .34s cubic-bezier(.2, .9, .25, 1.04); overscroll-behavior: contain; will-change: transform; }
.adm-drawer.open .adm-scrim { opacity: 1; }
.adm-drawer.open .adm-panel { transform: translateX(0); }
body.adm-locked { overflow: hidden; }
.adm-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 8px; }
.adm-panel-head .brand { display: inline-flex; align-items: center; gap: 8px; }
.adm-x { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--border); background: transparent; color: var(--ink); cursor: pointer; transition: transform .25s var(--ease-out); }
.adm-x:active { transform: rotate(90deg) scale(.9); }
.adm-x .ic { width: 18px; height: 18px; }
.adm-who { display: flex; align-items: center; gap: 6px; margin: 0 4px 6px; color: var(--muted); font-size: .8rem; overflow: hidden; }
.adm-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-who .ic { width: 14px; height: 14px; flex: none; }
.adm-list { flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px 8px; -webkit-overflow-scrolling: touch; }
.adm-group { margin: 12px 10px 4px; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.adm-item { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 10px; border-radius: 14px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: .95rem; text-decoration: none; cursor: pointer; text-align: left; -webkit-tap-highlight-color: transparent; transition: background-color .2s, transform .16s var(--ease-out); }
.adm-item:hover { background: rgba(var(--c1-rgb, 200,80,60), .07); }
.adm-item:active { transform: scale(.97); background: rgba(var(--c1-rgb, 200,80,60), .12); }
.adm-ic { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: rgba(var(--c1-rgb, 200,80,60), .1); color: var(--violet, currentColor); flex: none; transition: transform .25s var(--ease-out); }
.adm-ic .ic { width: 18px; height: 18px; }
.adm-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-go .ic { width: 14px; height: 14px; opacity: .35; }
.adm-item .an-badge { position: static; }
.adm-item.active { background: var(--brand-grad); color: #fff; box-shadow: 0 12px 24px -14px rgba(var(--c1-rgb, 200,80,60), .9); }
.adm-item.active .adm-ic { background: rgba(255,255,255,.22); color: #fff; }
.adm-item.active .adm-go .ic { opacity: .8; color: #fff; }
.adm-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding-top: 8px; border-top: 1px solid var(--border); }
.adm-small { font-size: .85rem; padding: 8px; }
.adm-small .adm-ic { width: 30px; height: 30px; }
/* items glide in one after another when the menu opens */
html:not(.lite) .adm-drawer.open .adm-list .adm-item:nth-child(-n+10) { animation: admIn .3s cubic-bezier(.2, .9, .25, 1) both; animation-delay: calc(var(--i, 0) * 16ms); }
@keyframes admIn { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
html[data-mode="dark"] .menu-btn, html[data-mode="dark"] .adm-current { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); color: #f2eef0; }
html[data-mode="dark"] .adm-panel { background: rgba(22, 23, 30, .96); }
html[data-mode="dark"] .adm-item, html[data-mode="dark"] .adm-x { color: #f2eef0; }
html[data-mode="dark"] .adm-x, html[data-mode="dark"] .adm-foot { border-color: rgba(255,255,255,.12); }
html[data-mode="dark"] .adm-ic { background: rgba(255,255,255,.08); color: #ffb3a6; }
html[data-mode="dark"] .adm-item.active .adm-ic { color: #fff; }
.admin-nav { display: none !important; }

/* Tick boxes and radio buttons pop when chosen */
input.just-ticked { animation: tickPop .3s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes tickPop { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }
/* Chosen size / colour gives a little bounce */
html:not(.lite) .size-chip.on, html:not(.lite) .swatch.on { animation: chipPop .32s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes chipPop { 0% { transform: scale(.92); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
/* A wrong field shakes gently */
html:not(.lite) .invalid input, html:not(.lite) .invalid select, html:not(.lite) .invalid textarea { animation: fieldShake .36s ease; }
@keyframes fieldShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
/* Photo flies into the bag, then the bag count bounces */
.fly-bag { position: fixed; z-index: 2000; border-radius: 16px; overflow: hidden; pointer-events: none; background: var(--brand-grad); box-shadow: 0 14px 30px -10px rgba(0,0,0,.45); }
.fly-bag img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bump { animation: bagBump .5s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes bagBump { 0% { transform: scale(1); } 35% { transform: scale(1.45); } 100% { transform: scale(1); } }
/* "Order placed" tick pops in */
html:not(.lite) .result-icon.ok { animation: okPop .6s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes okPop { 0% { transform: scale(0) rotate(-30deg); opacity: 0; } 70% { transform: scale(1.12) rotate(4deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }
/* More things react to a press */
.stat-card, .size-chip, .admin-prod, .order-card, .car-row, .dm-item, .menu-btn { -webkit-tap-highlight-color: transparent; }
.stat-card:active, .size-chip:active, .swatch:active, .product-card:active, .dm-item:active, .car-row:active { transform: scale(.97); transition-duration: .12s; }
@media (prefers-reduced-motion: reduce) {
  .adm-panel, .adm-scrim { transition: none !important; }
  .adm-drawer.open .adm-list .adm-item, input.just-ticked, .size-chip.on, .swatch.on, .invalid input, .invalid select, .invalid textarea, .bump, .result-icon.ok, .menu-dot { animation: none !important; }
}

/* ---- Fixes: selected CRM filters readable in every theme; lighter scrolling ---- */
.acc-seg .seg-btn.active, .cam-pick .seg-btn.active,
html[data-mode="dark"] .acc-seg .seg-btn.active, html[data-mode="dark"] .cam-pick .seg-btn.active { background: var(--brand-grad) !important; border-color: transparent !important; color: #fff !important; box-shadow: 0 8px 18px -10px rgba(var(--c1-rgb, 200,80,60), .8) !important; }
.acc-seg .seg-btn.active *, .cam-pick .seg-btn.active * { color: #fff !important; }
.acc-seg .seg-btn:not(.active):active { color: var(--ink, #222) !important; }
/* The top bar keeps its frosted look with a much cheaper blur while scrolling */
.topbar, .appbar { backdrop-filter: blur(12px) !important; -webkit-backdrop-filter: blur(12px) !important; background: rgba(255, 255, 255, 0.78) !important; }
html[data-mode="dark"] .topbar, html[data-mode="dark"] .appbar { background: rgba(18, 19, 26, 0.82) !important; }
html[data-mode="dark"] .adm-panel { background: #17181f; }
button.back-link { background: none; border: 0; padding: 6px 2px; font: inherit; font-weight: 500; cursor: pointer; -webkit-tap-highlight-color: transparent; }
html[data-mode="dark"] .acc-seg .seg-btn:not(.active) { background: rgba(255, 255, 255, 0.06) !important; border-color: rgba(255, 255, 255, 0.16) !important; color: #f2eef0 !important; }

/* =====================================================================
   SIGNATURE SIDE MENU (Admin + CRM) · clock · top bar · fixed sidebar on big screens
   ===================================================================== */
.sig-panel { background: radial-gradient(120% 60% at 0% 0%, rgba(255, 122, 69, 0.10), transparent 60%), linear-gradient(180deg, #1e1815 0%, #151113 55%, #0f0c0e 100%) !important; color: #efe6dc; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), inset 0 0 0 1px rgba(255, 214, 170, 0.07), 18px 0 50px -20px rgba(0, 0, 0, 0.6); }
.sig-brand { display: inline-flex; align-items: center; gap: 10px; }
.sig-brand .logo-mark, .sig-brand svg { width: 38px; height: 38px; padding: 5px; border-radius: 12px; background: linear-gradient(180deg, #2c241f, #1b1613); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 4px 10px -4px rgba(0, 0, 0, 0.8); }
.sig-brand strong { display: block; font-size: 1.05rem; letter-spacing: .14em; color: #f6eadc; }
.sig-brand small { display: block; font: 600 .56rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .22em; text-transform: uppercase; color: rgba(246, 234, 220, 0.45); }
.sig-label { align-self: flex-start; margin: 4px 4px 6px; padding: 3px 10px; border-radius: 6px; background: linear-gradient(180deg, #f0d27a, #c9a227); color: #2a1f12; font: 800 .58rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .24em; text-transform: uppercase; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 3px 8px -3px rgba(201, 162, 39, 0.7); }
.sig-panel .adm-who { color: rgba(239, 230, 220, 0.55); }
.sig-panel .adm-group { color: rgba(239, 230, 220, 0.38); }
.sig-panel .adm-item { position: relative; margin-bottom: 6px; padding-left: 18px; color: #eee4da; background: linear-gradient(180deg, #2a2320, #1f1917); border: 1px solid rgba(255, 255, 255, 0.06); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 3px 8px -4px rgba(0, 0, 0, 0.75); }
.sig-panel .adm-item::before { content: ""; position: absolute; left: 7px; top: 50%; width: 3px; height: 16px; border-radius: 2px; transform: translateY(-50%); background: rgba(255, 255, 255, 0.14); transition: background .2s, box-shadow .2s; }
.sig-panel .adm-item:hover { background: linear-gradient(180deg, #312824, #241d1a); }
.sig-panel .adm-item:active { transform: scale(.98) translateY(1px); box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6); }
.sig-panel .adm-ic { background: rgba(255, 255, 255, 0.05); color: #ffb38a; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05); }
.sig-panel .adm-item.active, .sig-panel .adm-parent.here { color: #fff; background: linear-gradient(180deg, #3b2c25, #2a201c); box-shadow: inset 0 0 0 1px rgba(255, 140, 90, 0.32), 0 8px 18px -10px rgba(255, 110, 60, 0.6); }
.sig-panel .adm-item.active::before, .sig-panel .adm-parent.here::before { background: linear-gradient(#ffb15a, #ff5f3a); box-shadow: 0 0 10px #ff7a45; }
.sig-panel .adm-item.active .adm-ic, .sig-panel .adm-parent.here .adm-ic { background: rgba(255, 122, 69, 0.18); color: #ffd0b0; }
.sig-panel .adm-go .ic { color: rgba(255, 255, 255, 0.4); transition: transform .25s var(--ease-out); }
.adm-node.open .adm-parent .adm-go .ic { transform: rotate(90deg); }
.adm-sub { display: none; margin: -2px 2px 8px; padding: 6px; border-radius: 12px; background: #0b090a; box-shadow: inset 0 2px 7px rgba(0, 0, 0, 0.85), inset 0 0 0 1px rgba(255, 255, 255, 0.04); }
.adm-node.open .adm-sub { display: block; animation: subIn .26s var(--ease-out); }
@keyframes subIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.adm-subitem { position: relative; display: block; padding: 8px 10px 8px 24px; border-radius: 8px; color: rgba(239, 230, 220, 0.5); text-decoration: none; font: 700 .66rem/1.25 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .14em; text-transform: uppercase; transition: color .2s, background-color .2s; -webkit-tap-highlight-color: transparent; }
.adm-subitem::before { content: ""; position: absolute; left: 11px; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .45; transform: translateY(-50%); }
.adm-subitem:hover { color: #f3e4d6; }
.adm-subitem.on { color: #ffb070; background: rgba(255, 140, 80, 0.08); }
.adm-subitem.on::before { background: #ff8a4c; opacity: 1; box-shadow: 0 0 6px #ff8a4c; }
.sig-clock { margin: 8px 2px 10px; padding: 10px 12px 8px; border-radius: 14px; background: #070607; box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.05); }
.sig-clock b { font: 700 1.7rem/1 "Courier New", ui-monospace, monospace; color: #ff9a3c; text-shadow: 0 0 10px rgba(255, 140, 40, 0.55); letter-spacing: .05em; }
.sig-clock small { margin-left: 6px; font: 700 .8rem/1 "Courier New", ui-monospace, monospace; color: #ff9a3c; opacity: .7; }
.sig-clock p { display: flex; justify-content: space-between; align-items: center; margin: 6px 0 0; font: 700 .58rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.42); }
.sig-online { display: inline-flex; align-items: center; gap: 5px; color: #6fe3a2; }
.sig-online::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 8px #3ddc84; }
.sig-online.off { color: #ff8a80; } .sig-online.off::before { background: #ff5252; box-shadow: 0 0 8px #ff5252; }
.sig-panel .adm-foot { border-top-color: rgba(255, 255, 255, 0.08); }
.sig-panel .adm-x { color: #efe6dc; border-color: rgba(255, 255, 255, 0.12); }
html[data-mode="dark"] .sig-panel { background: radial-gradient(120% 60% at 0% 0%, rgba(255, 122, 69, 0.10), transparent 60%), linear-gradient(180deg, #1e1815 0%, #151113 55%, #0f0c0e 100%) !important; }
html[data-mode="dark"] .sig-panel .adm-item { color: #eee4da; }

/* Top bar on Admin / CRM pages */
.pro-top { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 10px 14px; align-items: center; margin: 2px 0 16px; padding: 14px 16px; border-radius: 22px; background: rgba(255, 255, 255, 0.72); border: 1px solid var(--glass-line, rgba(0, 0, 0, 0.06)); box-shadow: 0 14px 30px -24px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.9); z-index: 5; }
.pt-hello { min-width: 0; }
.pt-hello strong { display: block; font-size: 1.06rem; line-height: 1.25; color: var(--ink); }
.pt-hello small { display: block; margin-top: 2px; color: var(--muted); font-size: .76rem; }
.pt-search { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 14px; background: rgba(0, 0, 0, 0.035); border: 1px solid var(--border); }
.pt-search .ic { width: 17px; height: 17px; opacity: .55; flex: none; }
.pt-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: .9rem; color: inherit; outline: 0; }
.pt-actions { grid-row: 1; grid-column: 2; display: flex; align-items: center; gap: 8px; }
.pt-ic { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: rgba(255, 255, 255, 0.7); color: var(--ink); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .16s var(--ease-out); }
.pt-ic:active { transform: scale(.9); }
.pt-ic .ic { width: 18px; height: 18px; }
.pt-dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: #ff4d3d; box-shadow: 0 0 0 2px #fff; }
.pt-me { display: flex; align-items: center; gap: 8px; padding: 3px 12px 3px 3px; border-radius: 999px; background: rgba(0, 0, 0, 0.04); }
.pt-me .pro-avatar { width: 32px; height: 32px; }
.pt-me strong { display: block; font-size: .8rem; line-height: 1.1; }
.pt-me small { display: block; font-size: .64rem; color: var(--muted); }
@media (max-width: 560px) { .pt-me > span:last-child { display: none; } .pt-me { padding: 3px; } }
@media (min-width: 900px) { .pro-top { grid-template-columns: minmax(0, 1fr) minmax(220px, 360px) auto; } .pt-search { grid-column: 2; grid-row: 1; } .pt-actions { grid-column: 3; } }
.pt-pop { position: absolute; right: 12px; top: calc(100% + 6px); z-index: 60; width: min(320px, calc(100vw - 40px)); padding: 8px; border-radius: 18px; background: #fffdfc; border: 1px solid var(--border); box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.45); animation: popDown .2s var(--ease-out); }
.pt-pop p { margin: 8px; }
@keyframes popDown { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.pt-note { display: flex; align-items: center; gap: 10px; padding: 9px; border-radius: 12px; color: var(--ink); text-decoration: none; }
.pt-note:hover { background: rgba(0, 0, 0, 0.04); }
.pt-note > span:nth-child(2) { flex: 1; font-size: .88rem; }
html[data-mode="dark"] .pro-top { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.1); box-shadow: 0 14px 30px -24px rgba(0, 0, 0, 0.8); }
html[data-mode="dark"] .pt-hello strong, html[data-mode="dark"] .pt-ic, html[data-mode="dark"] .pt-note { color: #f2eef0; }
html[data-mode="dark"] .pt-ic { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.12); }
html[data-mode="dark"] .pt-search, html[data-mode="dark"] .pt-me { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.1); }
html[data-mode="dark"] .pt-pop { background: #1b1c24; border-color: rgba(255, 255, 255, 0.1); }
html[data-mode="dark"] .pt-dot { box-shadow: 0 0 0 2px #1b1c24; }

/* Tablets and computers: the menu stays open on the left, the page sits beside it */
@media (min-width: 1024px) {
  .adm-drawer { visibility: visible; pointer-events: none; transition: none; right: auto; width: 300px; z-index: 40; }
  .adm-drawer .adm-panel { pointer-events: auto; transform: none !important; transition: none; left: 12px; top: 12px; bottom: 12px; width: 276px; border-radius: 26px; }
  .adm-scrim, .adm-panel .adm-x, .topbar .menu-btn, .topbar .brand-btn, .adm-current, .topbar button.back-link { display: none !important; }
  body:has(.adm-drawer) .topbar, body:has(.adm-drawer) main.page, body:has(.adm-drawer) .footer { margin-left: 300px; }
  body:has(.adm-drawer) .topbar { min-height: 0; padding-top: 6px; padding-bottom: 6px; }
}
@media (min-width: 1024px) {
  body:has(.adm-drawer) .topbar { display: none !important; }
  body:has(.adm-drawer) main.page { padding-top: 16px; }
  body:has(.adm-drawer) main.page > .container { max-width: min(1180px, 100%); }
}

/* =====================================================================
   VIYA CRM v3 — login, PIN lock, location wait, status chips, follow-ups, history, punch, targets, attendance, security
   ===================================================================== */
.crm-gate { max-width: 440px; margin: 0 auto; }
.gate-head { text-align: center; margin: 6px 0 14px; }
.gate-head .gate-logo { width: 64px; height: 64px; padding: 9px; border-radius: 20px; background: linear-gradient(180deg, #241d19, #120e0f); box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1); }
.gate-head h1 { margin: 10px 0 2px; }
.gate-seg { display: flex; width: 100%; margin-bottom: 12px; }
.gate-seg .seg-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.gate-seg .seg-btn .ic { width: 16px; height: 16px; }
.gate-sent { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: rgba(61, 220, 132, 0.1); font-size: .88rem; }
.gate-sent .ic { width: 18px; height: 18px; flex: none; margin-top: 1px; }

.geo-wait, .pin-lock, .crm-sheet { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 20px; background: rgba(12, 10, 14, 0.55); animation: fadeIn .2s ease both; }
.geo-wait.out, .pin-lock.out, .crm-sheet.out { animation: fadeOut .2s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }
.geo-card, .pin-card { display: grid; justify-items: center; gap: 6px; width: min(340px, 100%); padding: 24px 20px; border-radius: 26px; text-align: center; background: linear-gradient(180deg, #1e1815, #110d0f); color: #f4e9de; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
.geo-card small, .pin-card small { color: rgba(244, 233, 222, 0.6); }
.geo-pulse, .pin-ic { position: relative; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: rgba(255, 122, 69, 0.18); color: #ffb38a; margin-bottom: 4px; }
.geo-pulse .ic, .pin-ic .ic { width: 26px; height: 26px; }
.geo-pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255, 122, 69, 0.6); animation: geoRing 1.4s ease-out infinite; }
@keyframes geoRing { from { transform: scale(1); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }
.pin-dots { display: flex; gap: 14px; margin: 10px 0 4px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 179, 138, 0.6); transition: background .15s, transform .15s; }
.pin-dots i.on { background: #ff9a5a; border-color: #ff9a5a; transform: scale(1.1); box-shadow: 0 0 10px rgba(255, 140, 70, 0.6); }
.pin-input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.pin-msg { min-height: 1.2em; margin: 0; font-size: .85rem; color: #ffb3a6; }
.pin-card .btn-ghost { color: rgba(244, 233, 222, 0.75); }
.pin-card.shake { animation: fieldShake .36s ease; }

.crm-sheet { place-items: end center; padding: 0; }
.crm-sheet-card { width: min(520px, 100%); max-height: 92vh; overflow-y: auto; display: grid; gap: 10px; padding: 20px 18px max(18px, env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: #fffdfc; box-shadow: 0 -20px 50px -20px rgba(0, 0, 0, 0.5); animation: sheetUp .32s cubic-bezier(.2, .9, .25, 1.02) both; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@media (min-width: 700px) { .crm-sheet { place-items: center; padding: 20px; } .crm-sheet-card { border-radius: 26px; } }
.cs-title { font-size: 1.1rem; }
.cs-outs { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; }
.cs-out { display: grid; justify-items: center; gap: 4px; padding: 12px 6px; border-radius: 16px; border: 1.5px solid var(--border); background: #fff; color: var(--ink); font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; transition: transform .15s, background .2s, border-color .2s; }
.cs-out .ic { width: 20px; height: 20px; }
.cs-out.on { background: var(--brand-grad); color: #fff; border-color: transparent; transform: scale(1.03); }
.cs-extra label, .cs-note { display: grid; gap: 4px; font-size: .85rem; font-weight: 600; }
.cs-extra input, .cs-note textarea { font: inherit; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: #fff; color: var(--ink); }
html[data-mode="dark"] .crm-sheet-card { background: #1b1c24; color: #f2eef0; }
html[data-mode="dark"] .cs-out, html[data-mode="dark"] .cs-extra input, html[data-mode="dark"] .cs-note textarea { background: rgba(255, 255, 255, 0.06); color: #f2eef0; border-color: rgba(255, 255, 255, 0.14); }

.st-chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; white-space: nowrap; background: #eef1f6; color: #3d4a5c; }
.st-new { background: #e8f0ff; color: #2c5cc5; } .st-contacted { background: #eef1f6; color: #3d4a5c; } .st-interested { background: #fff2d9; color: #a06000; }
.st-call-back { background: #ffe9dc; color: #b6461a; } .st-quotation-sent { background: #efe6ff; color: #6a3fc1; } .st-ordered { background: #dcf7e7; color: #11804a; } .st-not-interested { background: #f3e5e5; color: #9a3a3a; }
html[data-mode="dark"] .st-chip { filter: saturate(.9) brightness(.9); }
.list-row .st-chip { margin-left: auto; align-self: center; flex: none; }
.crm-act { display: grid; gap: 12px; }
.crm-act-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.crm-act-top .ord-val { margin-left: 6px; }
.st-pick select { font: inherit; font-size: .85rem; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--card, #fff); color: var(--ink); }
.crm-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.fu-box { display: grid; gap: 8px; padding: 12px; border-radius: 16px; background: rgba(0, 0, 0, 0.03); border: 1px solid var(--border); }
.fu-box.late { border-color: rgba(255, 82, 82, 0.5); background: rgba(255, 82, 82, 0.06); }
.fu-box strong { display: flex; align-items: center; gap: 6px; font-size: .9rem; } .fu-box strong .ic { width: 16px; height: 16px; }
.fu-row { display: grid; grid-template-columns: 150px 1fr; gap: 8px; }
@media (max-width: 480px) { .fu-row { grid-template-columns: 1fr; } }
.fu-row input { font: inherit; font-size: .9rem; padding: 9px 11px; border-radius: 12px; border: 1px solid var(--border); background: var(--card, #fff); color: var(--ink); min-width: 0; }
.fu-row-item.late .lr-main small { color: #c0392b; font-weight: 600; }
.late-h { color: #c0392b; }
.tl { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tl li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; position: relative; }
.tl li:not(:last-child)::before { content: ""; position: absolute; left: 16px; top: 34px; bottom: -12px; width: 2px; background: var(--border); }
.tl-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(var(--c1-rgb, 200, 80, 60), 0.12); color: var(--violet, #c93a2e); }
.tl-ic .ic { width: 16px; height: 16px; }
.tl strong { font-size: .9rem; } .tl p { margin: 2px 0; font-size: .86rem; } .tl small { color: var(--muted); font-size: .74rem; }

.myday-grid { display: grid; gap: 14px; margin-bottom: 14px; }
@media (min-width: 860px) { .myday-grid { grid-template-columns: 1fr 1fr; } }
.punch-card { display: grid; gap: 12px; background: linear-gradient(160deg, #1f1815, #100c0e) !important; color: #f4e9de; border: 0 !important; }
.punch-card .muted { color: rgba(244, 233, 222, 0.6) !important; }
.punch-top { display: flex; align-items: center; gap: 12px; }
.punch-top strong { display: block; font-size: 1.05rem; }
.punch-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: rgba(255, 122, 69, 0.18); color: #ffb38a; }
.punch-ic .ic { width: 22px; height: 22px; }
.punch-line { display: grid; grid-template-columns: 44px 76px 1fr; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid rgba(127, 127, 127, 0.18); }
.pl-k { font: 800 .66rem/1 ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; padding: 5px 0; text-align: center; border-radius: 8px; }
.pl-k.in { background: rgba(61, 220, 132, 0.16); color: #2fbf71; } .pl-k.out { background: rgba(255, 138, 76, 0.16); color: #ff8a4c; }
.pl-t { font-weight: 700; }
.pl-m { display: grid; gap: 2px; min-width: 0; }
.map-a { display: inline-flex; align-items: center; gap: 4px; font-size: .84rem; font-weight: 600; color: #ff9a5a; text-decoration: none; }
.map-a .ic { width: 14px; height: 14px; }
.att-row .map-a, .sec-row .map-a { color: var(--violet, #c93a2e); }
.coords { font-size: .72rem; color: inherit; opacity: .65; overflow-wrap: anywhere; }
.tgt { display: grid; gap: 5px; margin-bottom: 12px; }
.tgt-top { display: flex; justify-content: space-between; gap: 8px; font-size: .85rem; } .tgt-top small { color: var(--muted); font-weight: 500; }
.tgt-bar { height: 9px; border-radius: 99px; background: rgba(0, 0, 0, 0.07); overflow: hidden; }
.tgt-bar i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--brand-grad); transition: width .9s cubic-bezier(.2, .8, .2, 1); }
html[data-mode="dark"] .tgt-bar { background: rgba(255, 255, 255, 0.1); }
.team-board { display: grid; gap: 14px; }
.tb-row { display: grid; grid-template-columns: 26px 38px 1fr; gap: 10px; align-items: start; }
.tb-rank { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: rgba(0, 0, 0, 0.05); font-weight: 800; font-size: .8rem; margin-top: 6px; }
.tb-row:first-child .tb-rank { background: linear-gradient(180deg, #f0d27a, #c9a227); color: #2a1f12; }
.tb-main strong { display: block; } .tb-main .tgt { margin: 8px 0 0; }
.staff-more { grid-column: 1 / -1; display: grid; gap: 8px; width: 100%; padding-top: 8px; border-top: 1px dashed var(--border); }
.crm-staff { flex-wrap: wrap; }
.dot-on { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2fbf71; box-shadow: 0 0 6px #2fbf71; }
.tgt-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.tgt-form label { display: grid; gap: 3px; font-size: .74rem; font-weight: 600; color: var(--muted); }
.tgt-form input, .ho select { width: 120px; font: inherit; font-size: .88rem; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--card, #fff); color: var(--ink); }
.ho select { width: auto; max-width: 220px; }
.att-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 14px; }
.att-bar label { display: grid; gap: 4px; font-size: .78rem; font-weight: 600; color: var(--muted); }
.att-bar input, .att-bar select { font: inherit; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--card, #fff); color: var(--ink); }
.att-list { display: grid; gap: 10px; }
@media (min-width: 860px) { .att-list { grid-template-columns: 1fr 1fr; } }
.att-head { display: flex; gap: 10px; align-items: center; margin-bottom: 4px; } .att-head strong { display: block; }
.flag { display: inline-block; margin-top: 2px; padding: 2px 8px; border-radius: 99px; background: #ffe1dc; color: #b3261e; font-size: .68rem; font-weight: 700; }
.sec-row.red { background: rgba(255, 82, 82, 0.07) !important; }
.sec-row.red .adm-ic { background: rgba(255, 82, 82, 0.15); color: #d93025; }
.sec-row .lr-main { display: grid; gap: 2px; }
.va-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; padding: 12px 14px; border-radius: 16px; background: linear-gradient(90deg, #2a1f1a, #1a1416); color: #f4e9de; }
.va-banner .ic { width: 18px; height: 18px; color: #ffb38a; } .va-banner .btn { margin-left: auto; }
.shimmer-lines { display: grid; gap: 10px; padding: 6px; }
.shimmer-lines i { display: block; height: 16px; border-radius: 8px; background: linear-gradient(90deg, rgba(0, 0, 0, 0.06) 25%, rgba(0, 0, 0, 0.11) 37%, rgba(0, 0, 0, 0.06) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; }
.shimmer-lines i:nth-child(2) { width: 80%; } .shimmer-lines i:nth-child(3) { width: 60%; }
html[data-mode="dark"] .shimmer-lines i { background: linear-gradient(90deg, rgba(255, 255, 255, 0.06) 25%, rgba(255, 255, 255, 0.12) 37%, rgba(255, 255, 255, 0.06) 63%); background-size: 400% 100%; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
html.lite .shimmer-lines i { animation: none; }
.punch-card .btn-outline { background: rgba(255, 255, 255, 0.08) !important; color: #ffd0b0 !important; border: 1px solid rgba(255, 179, 138, 0.45) !important; box-shadow: none !important; }
.pin-card .btn-ghost { background: transparent !important; color: rgba(244, 233, 222, 0.85) !important; border: 1px solid rgba(255, 255, 255, 0.18) !important; box-shadow: none !important; }
.adm-foot:has(> :only-child) { grid-template-columns: 1fr; }
.adm-foot .adm-item { min-width: 0; }
.tl strong { display: block; }
/* Welcome page: the chosen role (Retailer / Distributor / Customer) keeps its colour — the glass style must not turn it white */
.role-tile.selected, html[data-mode="dark"] .role-tile.selected { color: #fff !important; border-color: transparent !important; }
.role-tile[data-role=retailer].selected { background: linear-gradient(135deg, var(--c1), var(--c2, var(--c1))) !important; }
.role-tile[data-role=distributor].selected { background: linear-gradient(135deg, #0fa89c, #3d8bff) !important; }
.role-tile[data-role=customer].selected { background: linear-gradient(135deg, var(--c3), #ff9a4d) !important; }
.role-tile.selected *, html[data-mode="dark"] .role-tile.selected * { color: #fff !important; }
.role-tile.selected .rt-icon { background: rgba(255, 255, 255, 0.22) !important; border-color: rgba(255, 255, 255, 0.5) !important; }
.prompt-count { margin: -6px 0 10px; text-align: right; font-variant-numeric: tabular-nums; }
.prompt-count.near { color: #c0392b; font-weight: 600; }
/* the tab bar takes the finger for sliding (it never scrolls), and the bubble follows without delay */
.tabbar { touch-action: none; }
.tabbar.tb-dragging .tab-blob { transition: none !important; will-change: transform; }
.tabbar.tb-dragging .tab-item { transition: color .12s ease; }
.tabbar, .tabbar a { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.xl-card { display: grid; gap: 12px; margin-bottom: 14px; }
.xl-card .form-section { display: flex; align-items: center; gap: 8px; margin: 0; }
.xl-card .form-section .ic { width: 18px; height: 18px; }
.xl-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 760px) { .xl-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.xl-filters label { display: grid; gap: 4px; font-size: .78rem; font-weight: 600; color: var(--muted); min-width: 0; }
.xl-filters input, .xl-filters select { font: inherit; font-size: .9rem; padding: 9px 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--card, #fff); color: var(--ink); min-width: 0; width: 100%; }
html[data-mode="dark"] .xl-filters input, html[data-mode="dark"] .xl-filters select { background: rgba(255, 255, 255, 0.06); color: #f2eef0; border-color: rgba(255, 255, 255, 0.14); }
.xl-card .excel-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* =====================================================================
   CURVED SIGNATURE SIDEBAR (Admin · CRM · Retailer · Distributor)
   dark curved glass · profile · "Menu" · tree lines · sliding glass pill · notice card · slim strip on big screens
   ===================================================================== */
.sig-panel { border-radius: 0 34px 34px 0; overflow: hidden; background: radial-gradient(130% 55% at -30% 18%, rgba(255, 140, 90, 0.16), transparent 60%), radial-gradient(120% 60% at 130% 85%, rgba(201, 162, 39, 0.10), transparent 60%), linear-gradient(180deg, #1d1714 0%, #141012 55%, #0e0b0d 100%) !important; box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.07), inset -1.5px 0 0 rgba(255, 220, 190, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.08), 22px 0 60px -24px rgba(0, 0, 0, 0.7) !important; }
/* the bent-glass sheen: a curved light band and soft edge glows */
.sig-glare { position: absolute; inset: 0; pointer-events: none; z-index: 0; background: radial-gradient(160% 70% at -40% 50%, rgba(255, 255, 255, 0.07) 0 40%, transparent 41%), linear-gradient(90deg, rgba(255, 255, 255, 0.05), transparent 14%, transparent 86%, rgba(255, 255, 255, 0.06)); border-radius: inherit; }
.sig-panel > *:not(.sig-glare) { position: relative; z-index: 1; }
.sig-panel .adm-panel-head { align-items: center; gap: 8px; }
.sig-pin { display: none; margin-left: auto; width: 30px; height: 30px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.05); color: #efe6dc; cursor: pointer; place-items: center; }
.sig-pin .ic { width: 14px; height: 14px; transition: transform .3s var(--ease-out); }
.pinned .sig-pin .ic { transform: rotate(180deg); }
.sig-profile { display: flex; align-items: center; gap: 10px; margin: 6px 2px 4px; padding: 10px; border-radius: 18px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.05); }
.sig-profile .pro-avatar { width: 40px; height: 40px; flex: none; }
.sig-profile strong { display: block; color: #f6eadc; font-size: .95rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sig-badge { display: inline-block; margin-top: 3px; padding: 2px 8px; border-radius: 99px; background: linear-gradient(180deg, #f0d27a, #c9a227); color: #2a1f12; font-size: .62rem; font-weight: 800; letter-spacing: .04em; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sig-txt { min-width: 0; }
.sig-menu { display: flex; align-items: center; gap: 10px; margin: 10px 6px 4px; font: 700 .6rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .3em; text-transform: uppercase; color: rgba(239, 230, 220, 0.42); }
.sig-menu::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.16), transparent); }
.sig-panel .adm-label-hidden { display: none; }
.sig-panel .sig-label, .sig-panel .adm-who { display: none; }
/* flat items like the reference: small glass icon tiles, the glass pill marks the current one */
.sig-panel .adm-list { position: relative; }
.sig-panel .adm-item { margin-bottom: 2px; padding: 8px 10px; background: transparent !important; border: 0 !important; box-shadow: none !important; color: rgba(239, 230, 220, 0.82); }
.sig-panel .adm-item::before { display: none; }
.sig-panel .adm-item:hover { color: #fff; }
.sig-panel .adm-item:active { transform: none; }
.sig-panel .adm-item.active, .sig-panel .adm-parent.here { color: #fff; }
.sig-panel .adm-ic { width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 4px 10px -6px rgba(0, 0, 0, 0.8); color: #ffc7a3; }
.sig-panel .adm-item.active .adm-ic, .sig-panel .adm-parent.here .adm-ic { background: linear-gradient(180deg, #fff6ef, #f1ddcf); color: #b8442c; box-shadow: 0 6px 14px -6px rgba(255, 140, 90, 0.7); }
.sig-pill { position: absolute; left: 0; top: 0; width: 0; height: 0; opacity: 0; z-index: 0; pointer-events: none; border-radius: 14px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.05)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.10), 0 8px 18px -10px rgba(0, 0, 0, 0.7); transition: transform .34s cubic-bezier(.3, 1.25, .45, 1), width .3s var(--ease-out), height .3s var(--ease-out), opacity .2s; }
.sig-panel .adm-item, .sig-panel .adm-subitem, .sig-panel .adm-group { position: relative; z-index: 1; }
/* sub-items hang from a thin tree line */
.sig-panel .adm-sub { display: none; position: relative; margin: 0 0 6px 25px; padding: 2px 0 2px 16px; background: none; box-shadow: none; border-radius: 0; }
.sig-panel .adm-node.open .adm-sub { display: block; }
.sig-panel .adm-sub::before { content: ""; position: absolute; left: 0; top: 0; bottom: 16px; width: 1.5px; border-radius: 2px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.12)); }
.sig-panel .adm-subitem { padding: 8px 12px; border-radius: 12px; font: 600 .86rem/1.2 inherit; font-family: inherit; letter-spacing: 0; text-transform: none; color: rgba(239, 230, 220, 0.62); }
.sig-panel .adm-subitem::before { left: -16px; top: 50%; width: 11px; height: 1.5px; border-radius: 0; background: rgba(255, 255, 255, 0.22); opacity: 1; transform: translateY(-50%); box-shadow: none; }
.sig-panel .adm-subitem::after { content: ""; position: absolute; left: -7px; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, 0.35); transform: translateY(-50%); }
.sig-panel .adm-subitem.on { color: #fff; background: none; }
.sig-panel .adm-subitem.on::after { background: #ffb070; box-shadow: 0 0 8px #ff9a5a; }
/* notice card */
.sig-notice { display: grid; grid-template-columns: 54px 1fr; gap: 10px; align-items: center; margin: 8px 2px 4px; padding: 10px; border-radius: 18px; text-decoration: none; color: #2a1f12; background: linear-gradient(120deg, #f7eee4 0%, #efe2d2 55%, #2a1f1a 55.2%, #17110f 100%); box-shadow: 0 12px 26px -14px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.7); overflow: hidden; }
.sig-notice .sn-art { grid-column: 1; grid-row: 1; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px; background: radial-gradient(circle at 50% 35%, rgba(255, 179, 120, 0.35), transparent 60%), #1b1411; }
.sig-notice .sn-art img { width: 38px; height: 38px; filter: drop-shadow(0 4px 10px rgba(255, 150, 80, 0.5)); }
.sig-notice small { display: block; font: 800 .56rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .2em; text-transform: uppercase; color: #8a5a3c; }
.sig-notice strong { display: block; margin-top: 2px; font-size: .92rem; line-height: 1.2; color: #2a1f12; }
.sig-notice em { display: block; margin-top: 2px; font-style: normal; font-size: .72rem; color: #6c5a4f; }
.sig-notice { background: linear-gradient(180deg, #f7eee4, #ecdccb); }
.sig-panel .sig-clock { margin-top: 6px; }
.sig-panel .adm-foot { gap: 6px; }
.sig-panel .adm-foot .adm-item { background: rgba(255, 255, 255, 0.04) !important; border-radius: 14px; }
/* retailer / distributor app bar: the ☰ button */
.appbar.has-adm { gap: 8px; }
.appbar.has-adm .brand { margin-right: auto; }

/* Tablets and computers: a slim icon strip that opens out (hover, or the arrow keeps it open) */
@media (min-width: 1024px) {
  .adm-drawer .adm-panel { width: 84px; padding-left: 10px; padding-right: 10px; transition: width .32s cubic-bezier(.2, .9, .25, 1); }
  .adm-drawer .adm-panel.wide, .adm-drawer.pinned .adm-panel { width: 280px; }
  .sig-pin { display: grid; }
  .adm-drawer .adm-panel:not(.wide) .sig-pin { margin: 0 auto; }
  body:has(.adm-drawer) .topbar, body:has(.adm-drawer) main.page, body:has(.adm-drawer) .footer, body:has(.adm-drawer) .app-main, body:has(.adm-drawer) .appbar { margin-left: 108px; }
  body:has(.adm-drawer.pinned) .topbar, body:has(.adm-drawer.pinned) main.page, body:has(.adm-drawer.pinned) .footer, body:has(.adm-drawer.pinned) .app-main, body:has(.adm-drawer.pinned) .appbar { margin-left: 300px; }
  body:has(.adm-drawer) .appbar .menu-btn { display: none; }
  /* slim: icons only */
  .adm-drawer:not(.pinned) .adm-panel:not(.wide) :is(.adm-label, .adm-go, .adm-group, .sig-txt, .sig-menu span, .adm-sub, .sig-brand .sig-txt) { display: none !important; }
  .adm-drawer:not(.pinned) .adm-panel:not(.wide) .adm-panel-head { flex-direction: column; gap: 10px; }
  .adm-drawer:not(.pinned) .adm-panel:not(.wide) .adm-item { justify-content: center; padding: 8px 0; }
  .adm-drawer:not(.pinned) .adm-panel:not(.wide) .adm-item .an-badge { position: absolute; top: 2px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; font-size: .6rem; line-height: 16px; }
  .adm-drawer:not(.pinned) .adm-panel:not(.wide) .sig-profile { justify-content: center; padding: 8px 0; }
  .adm-drawer:not(.pinned) .adm-panel:not(.wide) .sig-notice { grid-template-columns: 1fr; padding: 6px; justify-items: center; }
  .adm-drawer:not(.pinned) .adm-panel:not(.wide) .sig-clock { padding: 8px 4px; text-align: center; }
  .adm-drawer:not(.pinned) .adm-panel:not(.wide) .sig-clock b { font-size: 1rem; }
  .adm-drawer:not(.pinned) .adm-panel:not(.wide) .sig-clock small, .adm-drawer:not(.pinned) .adm-panel:not(.wide) .sig-clock p { display: none; }
  .adm-drawer:not(.pinned) .adm-panel:not(.wide) .adm-foot { grid-template-columns: 1fr; }
  .adm-drawer:not(.pinned) .adm-panel:not(.wide) .sig-menu { margin: 6px 0; }
  .adm-drawer:not(.pinned) .adm-panel:not(.wide) .sig-menu::after { flex: 1; }
}
html.lite .sig-glare { display: none; }
html.lite .sig-pill { transition: none; }
.sig-panel .adm-subitem { font-family: inherit; font-size: .88rem; font-weight: 600; line-height: 1.2; letter-spacing: 0; text-transform: none; color: rgba(239, 230, 220, 0.68); }
/* while a finger drags the menu in from the edge */
.adm-drawer.peek { visibility: visible; pointer-events: auto; transition: none; }
.adm-drawer.peek .adm-scrim { opacity: 0; }
/* Location setup (asked before the first punch / new enquiry) */
.ls-head { display: grid; grid-template-columns: 58px 1fr; gap: 12px; align-items: center; }
.ls-head .geo-pulse { margin: 0; background: rgba(255, 122, 69, 0.14); color: #d9532b; }
.ls-head small { display: block; margin-top: 4px; line-height: 1.4; }
.ls-list { list-style: none; margin: 4px 0; padding: 0; display: grid; gap: 8px; }
.ls-list li { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--border); }
.ls-list li.ok { background: rgba(47, 191, 113, 0.08); border-color: rgba(47, 191, 113, 0.3); }
.ls-list li.todo { background: rgba(255, 138, 76, 0.07); }
.ls-tick { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; }
.ls-list li.ok .ls-tick { background: #2fbf71; color: #fff; }
.ls-list li.todo .ls-tick { background: rgba(217, 83, 43, 0.14); color: #d9532b; }
.ls-tick .ic { width: 15px; height: 15px; }
.ls-t strong { display: block; font-size: .92rem; }
.ls-t small { display: block; margin-top: 2px; font-size: .78rem; color: var(--muted); line-height: 1.35; }
.ls-test { display: grid; gap: 4px; padding: 10px 12px; border-radius: 14px; background: rgba(0, 0, 0, 0.04); font-size: .88rem; }
.ls-good { display: inline-flex; align-items: center; gap: 6px; color: #11804a; font-weight: 700; } .ls-good .ic { width: 16px; height: 16px; }
.ls-bad { color: #b3261e; font-weight: 600; }
.loc-setup .row-actions { justify-content: flex-end; }
.loc-banner { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(255, 179, 138, 0.45); background: rgba(255, 122, 69, 0.14); color: #ffd9c2; font: inherit; text-align: left; cursor: pointer; }
.loc-banner .ic { width: 18px; height: 18px; flex: none; }
.loc-banner span { flex: 1; } .loc-banner strong { display: block; color: #fff; font-size: .9rem; } .loc-banner small { color: rgba(255, 217, 194, 0.8); font-size: .76rem; }
html[data-mode="dark"] .ls-list li { border-color: rgba(255, 255, 255, 0.12); }
html[data-mode="dark"] .ls-test { background: rgba(255, 255, 255, 0.06); }
.gen-why { display: block; margin-top: 6px; font-size: .74rem; opacity: .75; overflow-wrap: anywhere; }
/* Try-On pop-up questions (consent, tips): a soft dark layer behind — never the white glass — and always above the tab bar */
.pt-sheet { z-index: 1300 !important; background: rgba(14, 11, 12, 0) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); }
.pt-sheet.open { background: rgba(14, 11, 12, 0.55) !important; }
.pt-sheet > * { max-height: calc(100vh - 40px); overflow-y: auto; background: #fffdfc !important; box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.6) !important; border: 1px solid rgba(0, 0, 0, 0.06); }
@media (min-width: 700px) { .pt-sheet { align-items: center !important; } .pt-sheet > * { width: min(520px, 100%); border-radius: 24px !important; } }
html[data-mode="dark"] .pt-sheet > * { background: #1b1c24 !important; color: #f2eef0; border-color: rgba(255, 255, 255, 0.1); }

/* =====================================================================
   GLASS CODE ENTRY (every OTP / code in the app) — dark signature glass, digit boxes that circle while checking
   ===================================================================== */
.og { position: relative; display: grid; justify-items: center; gap: 8px; margin: 6px 0 10px; padding: 22px 16px 18px; border-radius: 26px; overflow: hidden; text-align: center; color: #f3e9de;
  background: radial-gradient(120% 70% at 10% -10%, rgba(255, 170, 90, 0.22), transparent 55%), radial-gradient(90% 60% at 110% 110%, rgba(201, 162, 39, 0.16), transparent 60%), linear-gradient(160deg, #221a16 0%, #120e10 60%, #0c0a0b 100%);
  box-shadow: 0 24px 50px -26px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.10), inset 0 0 0 1px rgba(255, 214, 170, 0.10); transition: background .5s ease; }
.og::before { content: ""; position: absolute; inset: -40% -20% auto auto; width: 70%; height: 90%; background: linear-gradient(115deg, transparent 40%, rgba(255, 196, 120, 0.10) 50%, transparent 60%); transform: rotate(12deg); pointer-events: none; }
.og-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; color: #ffcf7a; background: linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.03)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 6px 16px -8px rgba(255, 170, 60, 0.6); }
.og-ic svg { width: 21px; height: 21px; }
.og-title { margin: 2px 0 0; font-size: 1.15rem; font-weight: 800; color: #fff; letter-spacing: .01em; }
.og-title em { font-style: normal; background: linear-gradient(90deg, #ffd46b, #ff9a4c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.og-sub { margin: 0; font-size: .82rem; color: rgba(243, 233, 222, 0.62); line-height: 1.45; max-width: 320px; overflow-wrap: anywhere; }
.og-sub b { color: #ffd9b0; font-weight: 600; }
.og-field { position: relative; margin: 10px 0 2px; }
.og-boxes { display: flex; gap: 9px; justify-content: center; }
.og-box { display: grid; place-items: center; width: 44px; height: 52px; border-radius: 13px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), inset 0 0 0 1px rgba(255, 255, 255, 0.10), 0 8px 18px -12px rgba(0, 0, 0, 0.9); transition: transform .45s cubic-bezier(.3, 1.2, .4, 1), box-shadow .2s, opacity .35s; }
.og-box b { font: 800 1.35rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: #fff; }
.og-box.filled { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 0 0 1.5px rgba(255, 176, 90, 0.55), 0 8px 18px -10px rgba(255, 140, 60, 0.55); }
.og-box.filled b { animation: ogPop .22s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes ogPop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.og-box.now { box-shadow: inset 0 0 0 2px #ffc75a, 0 0 0 4px rgba(255, 199, 90, 0.18), 0 0 22px rgba(255, 190, 80, 0.35); }
.og-box.now::after { content: ""; width: 2px; height: 24px; border-radius: 2px; background: #ffd46b; animation: ogCaret 1s steps(1) infinite; grid-area: 1 / 1; }
.og-box.now.filled::after { display: none; }
@keyframes ogCaret { 50% { opacity: 0; } }
/* the real input sits invisibly over the boxes: typing, pasting and the phone's "fill code" all work */
.og-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; font-size: 16px; color: transparent; background: transparent; caret-color: transparent; cursor: text; }
.og.og-checking .og-input, .og.og-ok .og-input { pointer-events: none; }
/* checking: the boxes turn in a ring (each box stays upright) */
.og-boxes.og-orbit { animation: ogSpin 1.5s linear infinite; }
.og-boxes.og-orbit .og-box b { display: inline-block; animation: ogSpin 1.5s linear infinite reverse; }
@keyframes ogSpin { to { transform: rotate(360deg); } }
.og.og-checking .og-box { box-shadow: inset 0 0 0 1.5px rgba(255, 176, 90, 0.7), 0 0 18px rgba(255, 150, 60, 0.45); }
/* success: a green ring with a tick */
.og-done { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; display: grid; place-items: center; border-radius: 50%; color: #4ff0a2; opacity: 0; transform: scale(.4); transition: opacity .3s ease, transform .5s cubic-bezier(.3, 1.5, .4, 1); pointer-events: none; }
.og-done i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(79, 240, 162, 0.8); box-shadow: 0 0 24px rgba(79, 240, 162, 0.5), inset 0 0 18px rgba(79, 240, 162, 0.25); }
.og-done svg { width: 34px; height: 34px; }
.og.og-ok .og-done { opacity: 1; transform: scale(1); }
.og.og-ok .og-done i { animation: ogRing 1.2s ease-out; }
@keyframes ogRing { from { transform: scale(.6); opacity: .2; } to { transform: scale(1); opacity: 1; } }
.og.og-ok { background: radial-gradient(120% 70% at 50% 0%, rgba(60, 220, 140, 0.20), transparent 60%), linear-gradient(160deg, #10201a 0%, #0c130f 60%, #0a0d0b 100%); }
.og.og-ok .og-ic { color: #4ff0a2; }
.og.og-ok .og-title em { background: linear-gradient(90deg, #6ff7b5, #2fd68c); -webkit-background-clip: text; background-clip: text; }
/* wrong code: the boxes shake red */
.og.og-fail .og-boxes { animation: fieldShake .4s ease; }
.og.og-fail .og-box { box-shadow: inset 0 0 0 1.5px rgba(255, 90, 80, 0.85), 0 0 16px rgba(255, 80, 70, 0.4); }
.og .error { margin: 0; min-height: 0; color: #ff9a8e; font-size: .82rem; }
.og-resend { margin: 2px 0 0; font-size: .8rem; color: rgba(243, 233, 222, 0.6); }
.og-resend b { color: #ffcf7a; font-weight: 700; }
.og-link { padding: 0; border: 0; background: none; font: inherit; font-weight: 700; color: #ffcf7a; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.og-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; max-width: 320px; margin-top: 6px; padding: 13px 18px; border: 0; border-radius: 14px; cursor: pointer; font: inherit; font-weight: 800; color: #2a1d0c; background: linear-gradient(180deg, #ffd46b, #e8a93a); box-shadow: 0 12px 26px -12px rgba(255, 180, 60, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.6); transition: transform .15s, background .4s; }
.og-btn:active { transform: scale(.97); }
.og-btn:disabled { cursor: default; opacity: .92; }
.og-btn svg { width: 18px; height: 18px; }
.og.og-ok .og-btn { color: #062417; background: linear-gradient(180deg, #5ff3a8, #22c47a); box-shadow: 0 12px 26px -12px rgba(40, 210, 130, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.og-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(42, 29, 12, 0.3); border-top-color: #2a1d0c; animation: ogSpin .8s linear infinite; }
@media (max-width: 380px) { .og-box { width: 38px; height: 46px; } .og-boxes { gap: 6px; } }
html.lite .og::before { display: none; }
@media (prefers-reduced-motion: reduce) { .og-boxes.og-orbit, .og-boxes.og-orbit .og-box b, .og-box.filled b, .og.og-ok .og-done i { animation: none !important; } }
.otp-row { margin-top: 4px; }
/* boxes always fit the card; a smaller ring while checking */
.og-field { width: 100%; max-width: 340px; }
.og-boxes { width: 100%; }
.og-box { flex: 1 1 0; min-width: 0; max-width: 48px; width: auto; height: auto; aspect-ratio: 44 / 52; }
.og.og-checking .og-field { z-index: 2; }
.og.og-ok .og-resend { display: none; }
.og-field { transition: margin .3s ease; }
.og.og-checking .og-field { margin-top: 26px; margin-bottom: 22px; }
.ai-usage { margin-top: 14px; }
.ai-usage .form-section { display: flex; align-items: center; gap: 8px; }
.ai-usage .form-section .ic { width: 18px; height: 18px; }
.ai-usage .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.ai-usage .sc-note { max-width: 60%; white-space: normal; }
.ai-usage-note { margin: 8px 2px 0; }
/* "Beta" label for Photo Try-On */
.beta-tag { display: inline-flex; align-items: center; vertical-align: middle; margin-left: 6px; padding: 2px 7px; border-radius: 999px; font: 800 .58rem/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; text-transform: uppercase; color: #2a1d0c; background: linear-gradient(180deg, #ffd46b, #e8a93a); box-shadow: 0 2px 6px -2px rgba(232, 169, 58, 0.7); -webkit-text-fill-color: #2a1d0c; }
h1 .beta-tag { font-size: .62rem; transform: translateY(-3px); }
.btn .beta-tag { margin-left: 4px; }
.tab-item { position: relative; }
.tab-beta { position: absolute; top: 2px; left: 50%; margin-left: 6px; padding: 1px 5px; border-radius: 999px; font: 800 .46rem/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; font-style: normal; color: #2a1d0c; background: linear-gradient(180deg, #ffd46b, #e8a93a); pointer-events: none; }
.pt-beta-note { display: flex; gap: 8px; align-items: flex-start; max-width: 560px; margin: 10px auto 0; padding: 10px 12px; border-radius: 14px; text-align: left; font-size: .8rem; line-height: 1.45; color: var(--muted); background: rgba(232, 169, 58, 0.10); border: 1px solid rgba(232, 169, 58, 0.30); }
.pt-beta-note .ic { width: 16px; height: 16px; flex: none; margin-top: 2px; color: #c8891f; }
.pt-beta-note strong { color: var(--ink); }
html[data-mode="dark"] .pt-beta-note { background: rgba(232, 169, 58, 0.10); color: rgba(242, 238, 240, 0.75); }
html[data-mode="dark"] .pt-beta-note strong { color: #fff; }
/* AI Design: Beta note, tips, designs left today */
.ai-beta-note { margin: 0 auto 12px; }
.ai-tips { max-width: 760px; margin: 0 auto 12px; padding: 0 14px; border-radius: 14px; background: var(--card, #fff); border: 1px solid var(--border); }
.ai-tips summary { display: flex; align-items: center; gap: 8px; padding: 11px 0; cursor: pointer; font-weight: 700; font-size: .88rem; list-style: none; }
.ai-tips summary::-webkit-details-marker { display: none; }
.ai-tips summary::after { content: "+"; margin-left: auto; font-weight: 800; color: var(--muted); }
.ai-tips[open] summary::after { content: "–"; }
.ai-tips summary .ic { width: 16px; height: 16px; color: #c8891f; }
.ai-tips ul { margin: 0 0 12px; padding-left: 18px; display: grid; gap: 6px; font-size: .84rem; line-height: 1.45; color: var(--muted); }
.ai-tips li strong { color: var(--ink); }
.ai-quota { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; font-size: .84rem; color: var(--muted); }
.ai-quota .ic { width: 15px; height: 15px; color: #c8891f; }
.ai-quota strong { color: var(--ink); font-size: .95rem; }
.ai-quota.low strong { color: #c0392b; }
.ai-badge .beta-tag { margin-left: 6px; }
html[data-mode="dark"] .ai-tips { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.12); }
html[data-mode="dark"] .ai-tips li strong, html[data-mode="dark"] .ai-quota strong { color: #fff; }

/* ---- Online payment (Razorpay) ---- */
.pay-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: .76rem; font-weight: 700; background: var(--surface-2, rgba(127,127,127,.12)); color: var(--ink); vertical-align: middle; }
.pay-chip .ic { width: 14px; height: 14px; }
.pay-chip.ok { background: rgba(31, 138, 85, .14); color: #1f8a55; }
.pay-chip.wait { background: rgba(201, 120, 30, .14); color: #b0651a; }
[data-theme="dark"] .pay-chip.ok, .dark .pay-chip.ok { color: #4fd38f; }
[data-theme="dark"] .pay-chip.wait, .dark .pay-chip.wait { color: #f0a55a; }
.oc-pay { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 4px; }
.oc-pay .pay-actions, .result .pay-actions { margin: 4px 0 0; }
.result .pay-actions { justify-content: center; }
.pay-line { display: grid; gap: 6px; margin: 8px 0; }
.pay-line .refund-form { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.pay-line .refund-form .field { margin: 0; flex: 1 1 160px; }
.req-main .pay-chip { margin-top: 4px; }

/* =====================================================================
 * VIYA "Future Minimal" — modern fonts, calmer surfaces, product animations
 * Space Grotesk (SIL OFL 1.1, assets/fonts/LICENSE-SpaceGrotesk-OFL.txt) for headings, prices, buttons.
 * Inter stays for reading text; Cinzel only for the VIYA wordmark.
 * ===================================================================== */
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 400; font-display: swap; src: url('../assets/fonts/space-grotesk-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 500; font-display: swap; src: url('../assets/fonts/space-grotesk-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 600; font-display: swap; src: url('../assets/fonts/space-grotesk-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 700; font-display: swap; src: url('../assets/fonts/space-grotesk-latin-700-normal.woff2') format('woff2'); }
:root { --display: 'Space Grotesk', Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; }

/* ---- type: one modern display face ---- */
h1, h2, h3, .screen-title, .form-head h1, .pd-info h1, .section-head h2, .dash-head h1, .hello h1, .doc-head h2, .prose h1, .pt-head h1, .result h1 { font-family: var(--display); letter-spacing: -.025em; font-weight: 700; }
.form-section { font-family: var(--display); letter-spacing: .14em; }
.btn, .filter-chip, .tab-item span, .seg-btn, .size-chip, .pay-chip, .status-chip, .pc-badge, .badge-count, .stepper-input output { font-family: var(--display); }
.btn { letter-spacing: 0; font-weight: 600; }
.pc-price, .pd-price, .order-total strong, .totals dd, .price-panel strong, .ap-price strong, .lr-end strong, .stat-num, .kpi-num { font-family: var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* ---- minimal surfaces: fewer heavy shadows, hairline borders, rounder shapes ---- */
.btn { border-radius: 999px; }
.btn-gold, .btn-primary { box-shadow: 0 8px 22px -12px rgba(var(--c1-rgb, 201, 162, 39), .65); }
.filter-chip { border-radius: 999px; border: 1px solid var(--border); background: transparent; font-weight: 500; letter-spacing: .01em; transition: background .2s, color .2s, border-color .2s; }
.filter-chip.active { background: var(--text); color: var(--bg); border-color: var(--text); box-shadow: none; }
.size-chip { border-radius: 999px; }

/* ---- product cards: photo first, quiet text ---- */
.product-grid { gap: 14px 12px; }
.product-card { background: transparent !important; border: 0 !important; box-shadow: none !important; border-radius: 22px; overflow: visible; }
.product-card .pc-img { border: 1px solid var(--border) !important; border-radius: 22px; overflow: hidden; transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s; }
.product-card:hover { transform: none; }
.product-card:hover .pc-img { transform: translateY(-3px); box-shadow: 0 22px 40px -26px rgba(0, 0, 0, .45); }
.product-card:active .pc-img { transform: scale(.975); }
.pc-body { padding: 10px 4px 4px; gap: 2px; }
.pc-tag { font-size: .62rem; letter-spacing: .18em; color: var(--muted); font-weight: 600; }
.pc-name { font-family: var(--display); font-weight: 600; font-size: .98rem; letter-spacing: -.01em; }
.pc-price { font-weight: 700; font-size: 1rem; }
.pc-badge { background: rgba(255, 255, 255, .72); color: var(--text); border: 1px solid rgba(255, 255, 255, .8); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-radius: 999px; padding: 4px 10px; font-weight: 600; letter-spacing: .12em; font-size: .6rem; }
.pc-add { position: absolute; right: 10px; bottom: 10px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--text); color: var(--bg); box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .55); transition: transform .25s cubic-bezier(.3,1.6,.5,1), background .2s; cursor: pointer; }
.pc-add .ic { width: 18px; height: 18px; }
.pc-add:active { transform: scale(.86); }
.pc-add.done { background: var(--success); color: #fff; transform: scale(1.12); }

/* ---- product page ---- */
.pd-img { border-radius: 28px; border: 1px solid var(--border); }
.pd-info h1 { font-size: clamp(1.5rem, 5.4vw, 2.1rem); line-height: 1.1; }
.pd-price { font-size: 1.7rem; }
.pfx-tilt { transition: transform .5s cubic-bezier(.2,.8,.2,1); transform-style: preserve-3d; will-change: transform; }
.pfx-tilt::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(circle at var(--gx, 30%) var(--gy, 20%), rgba(255, 255, 255, .35), transparent 45%); opacity: .55; mix-blend-mode: soft-light; }
.pd-img { position: relative; }
.pfx-turn { position: absolute; top: 12px; right: 12px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .7); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #1a1712; font: 600 .78rem var(--display); cursor: pointer; box-shadow: 0 6px 16px -10px rgba(0, 0, 0, .5); }
.pfx-turn svg { width: 16px; height: 16px; transition: transform .45s; }
.pfx-turn:active svg { transform: rotate(-200deg); }

/* ---- 1. cards appear one by one ---- */
.pfx:not(.pfx-in) { opacity: 0; transform: translateY(22px) scale(.97); }
.pfx.pfx-in { transition: opacity .5s ease var(--pfx-d, 0ms), transform .6s cubic-bezier(.2,.8,.2,1) var(--pfx-d, 0ms); }
/* ---- 2. photo grows into the product page ---- */
.pfx-hero { position: fixed; z-index: 1500; overflow: hidden; border-radius: 18px; transform-origin: 0 0; pointer-events: none; background: var(--studio, #fff); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .5); }
.pfx-hero img, .pfx-hero svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.pfx-hidden { visibility: hidden; }
/* ---- 4. colour change ---- */
.pfx-ghost { position: absolute; z-index: 4; pointer-events: none; margin: 0; overflow: hidden; }
.pfx-ghost .pd-gnav, .pfx-ghost .pd-gcount, .pfx-ghost .pfx-turn, .pfx-ghost .pc-add { display: none; }
.swatch, .pc-swatches i { position: relative; }
.sw-pop::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid currentColor; color: var(--sw, var(--text)); animation: swPop .55s ease-out forwards; pointer-events: none; }
@keyframes swPop { from { transform: scale(.8); opacity: .9; } to { transform: scale(1.9); opacity: 0; } }
/* ---- flying into the bag ---- */
.fly-bag { border-radius: 22px; background: var(--studio, #fff); border: 1px solid rgba(255, 255, 255, .7); box-shadow: 0 24px 40px -18px rgba(0, 0, 0, .55); display: grid; place-items: center; color: var(--text); }
.bag-catch { animation: bagCatch .55s cubic-bezier(.3,1.7,.5,1); }
@keyframes bagCatch { 0% { transform: scale(1); } 30% { transform: scale(1.28) rotate(-8deg); } 60% { transform: scale(.94) rotate(5deg); } 100% { transform: scale(1) rotate(0); } }

/* ---- Admin: categories as cards + live preview ---- */
.cat-cards { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 12px; margin: 0 0 6px; scrollbar-width: none; }
.cat-cards::-webkit-scrollbar { display: none; }
.cat-card { flex: 0 0 116px; display: grid; gap: 2px; text-align: left; padding: 8px 8px 10px; border-radius: 20px; border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; font: inherit; transition: transform .25s cubic-bezier(.2,.8,.2,1), border-color .2s, box-shadow .25s; }
.cat-card .cc-img { display: block; height: 82px; border-radius: 14px; overflow: hidden; background: var(--studio, #f6f2ea); margin-bottom: 6px; }
.cat-card .cc-img img, .cat-card .cc-img svg { width: 100%; height: 100%; object-fit: cover; aspect-ratio: auto; border-radius: 0; }
.cat-card strong { font-family: var(--display); font-size: .9rem; letter-spacing: -.01em; }
.cat-card small { color: var(--muted); font-size: .72rem; }
.cat-card.on { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.cat-card:active { transform: scale(.96); }
.studio-side { display: grid; gap: 10px; align-content: start; }
.pv-label { margin: 6px 0 0; font: 600 .7rem var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.pv-card { max-width: 220px; pointer-events: none; }
.pv-card .pc-img { min-height: 120px; }
@media (max-width: 760px) { .studio { grid-template-columns: 1fr; } .studio-side { grid-template-columns: minmax(0, 1fr) minmax(0, 150px); align-items: end; } .studio-side .pv-label { grid-column: 1 / -1; order: 2; } .studio-side .pv-card { order: 3; } }

html.lite .pfx:not(.pfx-in) { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .pfx:not(.pfx-in) { opacity: 1; transform: none; } .pfx-tilt { transform: none !important; } .bag-catch, .sw-pop::after { animation: none; } }
html[data-mode="dark"] .pc-badge, html[data-mode="dark"] .pfx-turn { background: rgba(20, 20, 26, .6); color: #f3eee6; border-color: rgba(255, 255, 255, .14); }
.save-addr { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; font-size: .9rem; cursor: pointer; }
.save-addr input { width: 20px; height: 20px; accent-color: var(--c1, var(--gold)); }

/* ---- Admin: delivery charges ---- */
.deliv-card { padding: 0; overflow: hidden; }
.deliv-card > summary { list-style: none; display: grid; grid-template-columns: 40px minmax(0, 1fr) 20px; gap: 12px; align-items: center; padding: 14px 18px; cursor: pointer; }
.deliv-card > summary::-webkit-details-marker { display: none; }
.deliv-card > summary > span { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--soft); }
.deliv-card > summary strong { font-family: var(--display); display: block; }
.deliv-card > summary small { color: var(--muted); }
.deliv-card > summary > .ic:last-child { transition: transform .25s; }
.deliv-card[open] > summary > .ic:last-child { transform: rotate(90deg); }
.dl-form { padding: 0 18px 18px; }
.dl-label { display: block; font-weight: 600; margin: 6px 0 8px; }
.dl-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 36px; gap: 8px; margin-bottom: 8px; align-items: center; }
.dl-row select, .dl-row input { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); color: var(--text); font: inherit; }
.free-hint { margin: 6px 0 0; }

/* ---- Admin on a PC / Mac: wide product form, preview stays in view, drag & drop ---- */
.desk-only { display: none; }
.photo-add { width: 88px; height: 88px; border-radius: 16px; place-items: center; }
.photo-add .ic { width: 26px; height: 26px; }
.garment-slot.drop-on { outline: 2px dashed var(--c1, var(--gold)); outline-offset: 3px; background: var(--soft); }
.drop-veil { position: fixed; inset: 0; z-index: 2500; display: grid; place-items: center; background: rgba(10, 12, 16, .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); pointer-events: none; }
.drop-veil > div { display: grid; gap: 6px; justify-items: center; text-align: center; padding: 28px 36px; border-radius: 24px; border: 2px dashed rgba(255, 255, 255, .8); color: #fff; max-width: 420px; }
.drop-veil strong { font: 700 1.3rem var(--display); }
.drop-veil[hidden] { display: none; }
@media (min-width: 1024px) {
  .desk-only { display: inline; }
  .admin-prod-page { width: min(1180px, calc(100vw - 140px)); margin-left: 50%; transform: translateX(-50%); }
  .admin-prod-page .studio { grid-template-columns: 380px minmax(0, 1fr); gap: 28px; }
  .admin-prod-page .studio-side { position: sticky; top: 84px; }
  .admin-prod-page #prod { padding: 28px 32px; }
  .admin-prod-page .garment-row { grid-template-columns: repeat(2, minmax(0, 200px)); }
}

/* ---- Admin: one order ---- */
.ao { display: grid; gap: 14px; }
.ao-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ao-head h1 { margin: 8px 0 2px; font-size: 1.4rem; word-break: break-all; }
.ao-head p { margin: 0; }
.ao-grid { display: grid; gap: 14px; }
@media (min-width: 900px) { .ao { width: min(1100px, calc(100vw - 140px)); margin-left: 50%; transform: translateX(-50%); } .ao-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: start; } }
.ao .card { margin: 0; }
.ao-name { font: 700 1.15rem var(--display); margin: 0 0 2px; }
.ao-items { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 10px; }
.ao-items li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.ao-items .ao-img { width: 56px; height: 56px; border-radius: 12px; overflow: hidden; background: var(--studio, #f6f2ea); display: block; }
.ao-items .ao-img img, .ao-items .ao-img svg { width: 100%; height: 100%; object-fit: cover; aspect-ratio: auto; border-radius: 0; }
.ao-items small { display: block; color: var(--muted); }
.ao-items b { font-family: var(--display); }
.ao-cancelled { display: flex; gap: 12px; align-items: center; border-color: rgba(198, 40, 40, .35); background: var(--error-soft); }
.ao-cancel select { width: 100%; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); color: var(--text); font: inherit; }
.cancel-note { margin: 6px 0; color: var(--error); font-weight: 600; font-size: .88rem; display: flex; gap: 6px; align-items: center; }
.cancel-note .ic { width: 16px; height: 16px; }
.admin-top h3 a { color: inherit; text-decoration: none; }
.app-ver { opacity: .7; font-size: .78rem; }
