/* ==========================================================================
   Design system: pharmacy storefront & administration
   Tokens → base → layout → components → pages → admin → utilities → responsive
   ========================================================================== */

@font-face {
    font-family: "Inter";
    src: url("../fonts/inter-latin.woff2") format("woff2");
    font-weight: 400 700;
    font-display: swap;
}
@font-face {
    font-family: "Plus Jakarta Sans";
    src: url("../fonts/plus-jakarta-sans-latin.woff2") format("woff2");
    font-weight: 400 800;
    font-display: swap;
}

:root {
    /* Colour */
    --navy-950: #051c24;
    --navy-900: #0a2f3a;
    --navy-800: #0f3d4a;
    --teal-700: #0b5f63;
    --teal-600: #0e7a7a;
    --teal-500: #12918d;
    --teal-100: #dff2f0;
    --teal-50: #f0f9f8;
    --mint-400: #4fe0b6;
    --mint-300: #86ecce;
    --mint-100: #e3f8f1;
    --cyan-400: #38c6e8;
    --sand-100: #f7f2ea;
    --sand-200: #efe5d6;

    --bg: #f5f8f8;
    --surface: #ffffff;
    --surface-2: #f3f6f6;
    --well: #f6f7f8;
    --text: #0d1f26;
    --text-2: #3b4d54;
    --muted: #61737a;
    --border: #e1e8ea;
    --border-strong: #cdd8db;

    --primary: var(--teal-600);
    --primary-hover: var(--teal-700);
    --accent: var(--mint-400);
    --success: #12805c;
    --success-bg: #e4f5ee;
    --warning: #9a5b00;
    --warning-bg: #fdf3e1;
    --danger: #b42318;
    --danger-bg: #fdecea;
    --info: #155e8a;
    --info-bg: #e7f3fa;
    --focus: #1aa3c4;

    /* Typography */
    --font-body: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
    --font-display: "Plus Jakarta Sans", var(--font-body);
    --fs-xs: .75rem;
    --fs-sm: .875rem;
    --fs-base: 1rem;
    --fs-md: 1.125rem;
    --fs-lg: 1.375rem;
    --fs-xl: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
    --fs-2xl: clamp(1.9rem, 1.4rem + 2vw, 2.75rem);
    --fs-3xl: clamp(2.1rem, 1.4rem + 3vw, 3.5rem);
    --lh-tight: 1.15;
    --lh-base: 1.6;

    /* Spacing (4px scale) */
    --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.25rem;
    --s-6: 1.5rem; --s-8: 2rem; --s-10: 2.5rem; --s-12: 3rem; --s-16: 4rem; --s-20: 5rem;

    /* Shape & depth */
    --r-sm: 8px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px; --r-pill: 999px;
    --shadow-xs: 0 1px 2px rgba(10, 47, 58, .06);
    --shadow-sm: 0 1px 2px rgba(10, 47, 58, .05), 0 4px 12px rgba(10, 47, 58, .05);
    --shadow-md: 0 2px 4px rgba(10, 47, 58, .04), 0 12px 32px rgba(10, 47, 58, .08);
    --shadow-lg: 0 24px 60px rgba(5, 28, 36, .18);

    /* Motion */
    --t-fast: 140ms;
    --t-base: 220ms;
    --t-slow: 600ms;
    --ease: cubic-bezier(.2, .7, .2, 1);

    --container: 1280px;
    --header-h: 76px;
}
/* Breakpoints (documented; used in media queries below):
   sm 560px · md 820px · lg 1080px · xl 1280px */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0; font-family: var(--font-body); font-size: var(--fs-base); line-height: var(--lh-base);
    color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: var(--lh-tight); margin: 0 0 var(--s-3); letter-spacing: -.02em; color: var(--navy-900); }
h1 { font-size: var(--fs-2xl); font-weight: 750; }
h2 { font-size: var(--fs-xl); font-weight: 700; }
h3 { font-size: var(--fs-md); font-weight: 650; }
p { margin: 0 0 var(--s-3); }
a { color: var(--primary); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--primary-hover); text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--mint-300); color: var(--navy-950); }
address { font-style: normal; }
[hidden] { display: none !important; }
main { display: block; min-height: 50vh; }
main:focus { outline: none; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--s-6) 0; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(1rem, 3vw, 2rem); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 1000; background: var(--navy-900); color: #fff; padding: .6rem 1rem; border-radius: var(--r-sm); }
.skip-link:focus { top: 1rem; color: #fff; }

/* ---------- Icons ---------- */
.icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon--xs { width: 14px; height: 14px; }
.icon--sm { width: 18px; height: 18px; }
.icon--lg { width: 32px; height: 32px; }
.icon--xl { width: 48px; height: 48px; stroke-width: 1.4; }
.icon--star { color: #e9a400; fill: #f5b301; }

/* ---------- Buttons ---------- */
.btn {
    --btn-bg: var(--surface); --btn-fg: var(--text); --btn-bd: var(--border-strong);
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 44px; padding: .6rem 1.15rem; border-radius: var(--r-pill);
    border: 1px solid var(--btn-bd); background: var(--btn-bg); color: var(--btn-fg);
    font-weight: 600; font-size: var(--fs-sm); line-height: 1.2; white-space: nowrap; text-decoration: none;
    transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.btn:hover { text-decoration: none; color: var(--btn-fg); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled], .btn.is-loading { opacity: .55; pointer-events: none; }
.btn--primary { --btn-bg: var(--primary); --btn-fg: #fff; --btn-bd: var(--primary); box-shadow: 0 6px 16px rgba(14, 122, 122, .22); }
.btn--primary:hover { --btn-bg: var(--primary-hover); --btn-bd: var(--primary-hover); }
.btn--accent { --btn-bg: var(--mint-400); --btn-fg: var(--navy-950); --btn-bd: var(--mint-400); box-shadow: 0 8px 24px rgba(79, 224, 182, .3); }
.btn--accent:hover { --btn-bg: var(--mint-300); --btn-bd: var(--mint-300); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--navy-900); --btn-bd: var(--border-strong); }
.btn--ghost:hover { --btn-bg: var(--surface-2); }
.btn--light { --btn-bg: rgba(255,255,255,.92); --btn-fg: var(--navy-900); --btn-bd: transparent; }
.btn--danger { --btn-fg: var(--danger); }
.btn--danger:hover { --btn-bg: var(--danger-bg); --btn-bd: var(--danger); }
.btn--solid-danger { --btn-bg: var(--danger); --btn-fg: #fff; --btn-bd: var(--danger); }
.btn--sm { min-height: 34px; padding: .35rem .8rem; font-size: var(--fs-xs); }
.btn--lg { min-height: 52px; padding: .8rem 1.5rem; font-size: var(--fs-base); }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.icon-btn {
    display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: var(--r-pill);
    border: 0; background: transparent; color: var(--navy-900); transition: background var(--t-fast);
}
.icon-btn:hover { background: var(--surface-2); }
.round-btn {
    display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
    border: 1px solid var(--navy-900); background: var(--navy-900); color: #fff; transition: transform var(--t-fast), background var(--t-fast);
}
.round-btn:hover { transform: scale(1.06); background: var(--teal-600); border-color: var(--teal-600); }
.round-btn--outline { background: transparent; color: var(--navy-900); }
.round-btn--outline:hover { color: #fff; }
.round-btn[disabled] { opacity: .35; pointer-events: none; }
.link-arrow { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; font-size: var(--fs-sm); color: var(--navy-900); }

/* ---------- Forms ---------- */
.input {
    width: 100%; min-height: 44px; padding: .6rem .85rem; border: 1px solid var(--border-strong); border-radius: var(--r-sm);
    background: var(--surface); transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.input:hover { border-color: #b3c2c6; }
.input:focus { outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 4px rgba(18, 145, 141, .15); }
.input:disabled { background: var(--surface-2); color: var(--muted); }
.input--sm { min-height: 36px; padding: .35rem .6rem; font-size: var(--fs-sm); width: auto; }
textarea.input { min-height: 90px; resize: vertical; }
select.input { appearance: none; padding-right: 2.2rem; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.field { display: grid; gap: .35rem; font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); }
.field em { font-style: normal; font-weight: 400; color: var(--muted); }
.field--inline { grid-template-columns: 1fr 110px; align-items: center; font-weight: 500; }
.field-error { color: var(--danger); font-size: var(--fs-sm); margin: -.25rem 0 .25rem; font-weight: 500; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.field--full { grid-column: 1 / -1; }
.form-stack { display: grid; gap: var(--s-4); }
.check, .radio { display: flex; gap: .6rem; align-items: flex-start; font-size: var(--fs-sm); cursor: pointer; padding: .2rem 0; }
.check input, .radio input { width: 18px; height: 18px; margin-top: .15rem; accent-color: var(--primary); flex: none; }
.check--terms { margin-top: var(--s-4); color: var(--text-2); }

/* ---------- Badges, notices, flags ---------- */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .6rem; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--text-2); }
.badge--success { background: var(--success-bg); color: var(--success); }
.badge--warning { background: var(--warning-bg); color: var(--warning); }
.badge--danger { background: var(--danger-bg); color: var(--danger); }
.badge--info { background: var(--info-bg); color: var(--info); }
.notice { display: flex; gap: .6rem; align-items: flex-start; padding: .85rem 1rem; border-radius: var(--r-md); background: var(--info-bg); color: var(--info); font-size: var(--fs-sm); margin-bottom: var(--s-4); }
.notice p { margin: .2rem 0 0; }
.notice--warning { background: var(--warning-bg); color: var(--warning); }
.notice--error { background: var(--danger-bg); color: var(--danger); }
.notice--success { background: var(--success-bg); color: var(--success); }
.notice--restricted { background: var(--sand-100); color: var(--navy-900); border: 1px solid var(--sand-200); }
.flag { display: inline-flex; align-items: center; gap: .25rem; padding: .2rem .55rem; border-radius: var(--r-pill); font-size: 11px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.flag--sale { background: #ffe5e0; color: #b4361b; }
.flag--restricted { background: rgba(10, 47, 58, .88); color: #fff; }
.flag--rank { background: var(--navy-900); color: var(--mint-300); }
.eyebrow { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-600); margin-bottom: var(--s-2); }
.eyebrow--light { color: var(--mint-300); }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.center { text-align: center; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s-6); box-shadow: var(--shadow-xs); }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }

/* ---------- Announcement & header ---------- */
.announcement { background: var(--navy-950); color: #d9f4ec; font-size: var(--fs-sm); }
.announcement__inner { display: flex; justify-content: center; align-items: center; gap: .5rem; min-height: 38px; text-align: center; }
.announcement a { color: #fff; font-weight: 600; }

/* ---------- Contact bar (phone & email above the header; Settings → Store) ---------- */
.contact-bar { background: var(--teal-50); border-bottom: 1px solid var(--teal-100); color: var(--text-2); font-size: var(--fs-sm); }
.contact-bar__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 40px; }
.contact-bar__lead { display: inline-flex; align-items: center; gap: .45rem; margin: 0; font-weight: 500; }
.contact-bar__lead .icon { color: var(--primary); }
.contact-bar__links { display: flex; align-items: center; gap: var(--s-2); margin-left: auto; }
.contact-bar__link { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .75rem; border-radius: var(--r-pill); color: var(--navy-900); font-weight: 600; font-variant-numeric: tabular-nums; transition: background var(--t-fast); }
.contact-bar__link:hover { background: var(--teal-100); color: var(--navy-900); }
.contact-bar__link .icon { color: var(--primary); }
.contact-bar__short { display: none; }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid rgba(225, 232, 234, .8); }
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.site-header__bar { display: flex; align-items: center; gap: var(--s-6); min-height: var(--header-h); }
.site-header__menu { display: none; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--navy-900); text-decoration: none !important; flex: none; }
.brand__mark, .brand__logo { width: 38px; height: 38px; border-radius: 12px; }
.brand__name { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; letter-spacing: -.03em; }
.brand--light { color: #fff; }

.search { position: relative; flex: 1; display: flex; align-items: center; max-width: 640px; height: 50px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 4px 4px 4px 46px; transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast); }
.search:focus-within { background: var(--surface); border-color: var(--teal-500); box-shadow: 0 0 0 4px rgba(18, 145, 141, .14); }
.search__icon { position: absolute; left: 16px; color: var(--muted); }
.search__input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: none; font-size: var(--fs-base); }
.search__input::-webkit-search-cancel-button { display: none; }
.search__clear { border: 0; background: transparent; color: var(--muted); padding: .4rem; border-radius: 50%; }
.search__submit { height: 40px; }
.search__panel { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: var(--s-2); max-height: 70vh; overflow: auto; z-index: 60; }
.suggest__group { padding: .4rem .6rem .2rem; font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.suggest__item { display: grid; grid-template-columns: 44px 1fr auto; gap: .75rem; align-items: center; padding: .5rem .6rem; border-radius: var(--r-sm); color: var(--text); text-decoration: none !important; }
.suggest__item img { width: 44px; height: 44px; object-fit: contain; background: var(--well); border-radius: var(--r-sm); }
.suggest__item small { display: block; color: var(--muted); }
.suggest__item[aria-selected="true"], .suggest__item:hover { background: var(--teal-50); }
.suggest__cat { grid-template-columns: 1fr auto; }
.suggest__empty, .suggest__loading { padding: 1rem; color: var(--muted); font-size: var(--fs-sm); }
.suggest__all { display: block; text-align: center; padding: .6rem; font-weight: 600; font-size: var(--fs-sm); border-top: 1px solid var(--border); margin-top: .3rem; }

.header-actions { display: flex; align-items: center; gap: var(--s-1); margin-left: auto; }
.header-action { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; padding: .35rem .6rem; border-radius: var(--r-md); color: var(--navy-900); font-size: 11px; font-weight: 600; text-decoration: none !important; transition: background var(--t-fast); }
.header-action:hover { background: var(--surface-2); color: var(--navy-900); }
.header-action--staff { color: var(--teal-600); }
.cart-icon { position: relative; display: inline-flex; }
.cart-count { position: absolute; top: -7px; right: -10px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: var(--r-pill); background: var(--mint-400); color: var(--navy-950); font-size: 11px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }
.cart-count.bump { animation: bump 400ms var(--ease); }
@keyframes bump { 40% { transform: scale(1.35); } }

.main-nav { border-top: 1px solid var(--border); }
.main-nav__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 48px; }
.main-nav__list { display: flex; gap: var(--s-1); list-style: none; margin: 0; padding: 0; }
.main-nav__list > li > a, .main-nav__trigger { display: inline-flex; align-items: center; gap: .3rem; padding: .45rem .8rem; border-radius: var(--r-pill); color: var(--text-2); font-weight: 600; font-size: var(--fs-sm); border: 0; background: transparent; text-decoration: none !important; }
.main-nav__list > li > a:hover, .main-nav__trigger:hover, .main-nav__trigger[aria-expanded="true"] { background: var(--teal-50); color: var(--teal-700); }
.main-nav__note { margin: 0; display: inline-flex; align-items: center; gap: .4rem; font-size: var(--fs-xs); color: var(--muted); }
.has-mega { position: relative; }
.mega { position: absolute; top: calc(100% + 8px); left: 0; width: min(720px, 90vw); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: var(--s-4); z-index: 55; }
.mega__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-1); }
.mega__item { display: flex; align-items: center; gap: .7rem; padding: .5rem; border-radius: var(--r-md); color: var(--text); font-weight: 600; font-size: var(--fs-sm); text-decoration: none !important; }
.mega__item:hover { background: var(--teal-50); color: var(--teal-700); }
.mega__thumb { width: 44px; height: 44px; border-radius: var(--r-sm); background: var(--well); overflow: hidden; display: grid; place-items: center; }
.mega__thumb img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }
.mega__all { display: inline-flex; align-items: center; gap: .3rem; margin-top: var(--s-3); padding: .4rem .5rem; font-weight: 600; font-size: var(--fs-sm); }

.mobile-nav { position: fixed; inset: 0; z-index: 90; }
.mobile-nav__backdrop, .drawer__backdrop { position: absolute; inset: 0; background: rgba(5, 28, 36, .45); backdrop-filter: blur(2px); animation: fade var(--t-base) var(--ease); }
.mobile-nav__panel { position: absolute; inset: 0 auto 0 0; width: min(340px, 88vw); background: var(--surface); padding: var(--s-4); overflow-y: auto; display: flex; flex-direction: column; gap: 2px; animation: slide-in-left var(--t-base) var(--ease); }
.mobile-nav__panel > a { padding: .7rem .6rem; border-radius: var(--r-sm); color: var(--text); font-weight: 600; text-decoration: none; }
.mobile-nav__panel > a:hover { background: var(--teal-50); }
.mobile-nav__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s-3); }
.mobile-nav__label { margin: var(--s-4) .6rem var(--s-1); font-size: var(--fs-xs); font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide-in-left { from { transform: translateX(-100%); } }
@keyframes slide-in-right { from { transform: translateX(100%); } }

/* ---------- Hero slideshow ---------- */
.hero { padding-top: var(--s-6); }
.hero__frame { position: relative; }
.hero__track { position: relative; height: clamp(440px, 42vw, 520px); border-radius: var(--r-xl); overflow: hidden; background: var(--navy-900); box-shadow: var(--shadow-md); isolation: isolate; }
.slide { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; opacity: 0; visibility: hidden; transition: opacity var(--t-slow) var(--ease), visibility 0s linear var(--t-slow); }
.slide.is-active { opacity: 1; visibility: visible; transition: opacity var(--t-slow) var(--ease), visibility 0s; z-index: 1; }
.slide__content { position: relative; z-index: 2; padding: clamp(1.5rem, 4vw, 4rem); max-width: 600px; }
.slide__title { font-size: var(--fs-3xl); font-weight: 800; letter-spacing: -.035em; margin-bottom: var(--s-4); }
.slide__text { font-size: var(--fs-md); max-width: 46ch; margin-bottom: var(--s-6); }
.slide.is-active .slide__content > * { animation: rise 700ms var(--ease) both; }
.slide.is-active .slide__content > *:nth-child(2) { animation-delay: 60ms; }
.slide.is-active .slide__content > *:nth-child(3) { animation-delay: 120ms; }
.slide.is-active .slide__content > *:nth-child(4) { animation-delay: 180ms; }
.slide.is-active .slide__content > *:nth-child(5) { animation-delay: 240ms; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.slide--spotlight { background:
    radial-gradient(60% 80% at 80% 30%, rgba(79, 224, 182, .22), transparent 60%),
    radial-gradient(50% 60% at 10% 100%, rgba(56, 198, 232, .18), transparent 60%),
    linear-gradient(135deg, var(--navy-900) 0%, #0b4650 55%, var(--teal-700) 100%); }
.slide--spotlight::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(70% 70% at 70% 40%, #000, transparent); -webkit-mask-image: radial-gradient(70% 70% at 70% 40%, #000, transparent); }
.slide--spotlight .slide__title { color: #fff; }
.slide--spotlight .slide__text { color: rgba(226, 244, 240, .86); }
.slide__glow { position: absolute; right: 12%; top: 18%; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, rgba(79, 224, 182, .45), transparent 65%); filter: blur(10px); }
.slide__figure { position: relative; z-index: 1; height: 100%; min-width: 0; display: flex; align-items: flex-end; justify-content: center; }
.slide__figure img { height: 96%; width: auto; max-width: none; object-fit: contain; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .35)); }
.slide__chips { list-style: none; padding: 0; margin: var(--s-8) 0 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.slide__chips li { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .85rem; border-radius: var(--r-pill); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); color: #e5f6f2; font-size: var(--fs-sm); backdrop-filter: blur(8px); }

.slide--banner { background: #eef3f5; }
.slide__bg, .slide__bg img { position: absolute; inset: 0; width: 100%; height: 100%; }
.slide__bg img { object-fit: cover; object-position: 78% center; }
.slide--banner.slide--light::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.78) 34%, rgba(255,255,255,0) 62%); z-index: 1; }
.slide--banner.slide--dark::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,28,36,.9) 0%, rgba(5,28,36,.6) 38%, rgba(5,28,36,0) 66%); z-index: 1; }
.slide--banner.slide--dark .slide__title { color: #fff; }
.slide--banner.slide--dark .slide__text { color: rgba(255,255,255,.85); }
.slide--banner.slide--dark .eyebrow { color: var(--mint-300); }
.slide--banner .slide__content { grid-column: 1; }
.slide--banner .slide__text { color: var(--text-2); }
.preview-tag { position: absolute; top: 1rem; right: 1rem; z-index: 3; background: var(--warning); color: #fff; padding: .25rem .7rem; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 700; }
.preview-bar { margin-top: var(--s-4); padding: .6rem 1rem; background: var(--warning-bg); color: var(--warning); border-radius: var(--r-md); display: flex; gap: .5rem; align-items: center; font-size: var(--fs-sm); }

.hero__controls { position: absolute; z-index: 5; right: calc(clamp(1rem, 3vw, 2rem) + 1.25rem); bottom: 1.25rem; display: flex; align-items: center; gap: .5rem; padding: .35rem; background: rgba(255,255,255,.7); border-radius: var(--r-pill); backdrop-filter: blur(10px); box-shadow: var(--shadow-sm); }
.hero__controls .round-btn { width: 38px; height: 38px; }
.hero__controls [data-toggle-play] { background: transparent; color: var(--navy-900); border-color: transparent; }
.hero__controls [data-toggle-play].is-paused { color: var(--warning); }
.hero__dots { display: flex; gap: 6px; padding: 0 .3rem; }
.hero__dot { width: 9px; height: 9px; padding: 0; border-radius: var(--r-pill); border: 0; background: rgba(10, 47, 58, .3); transition: width var(--t-base) var(--ease), background var(--t-base); }
.hero__dot.is-active { width: 28px; background: var(--navy-900); }

/* ---------- Sections & rails ---------- */
.section { padding-block: clamp(2.5rem, 5vw, 4.5rem) 0; }
.section--tight { padding-block: var(--s-8) 0; margin-top: var(--s-6); }
.section--flush { padding-top: var(--s-6); }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-6); flex-wrap: wrap; }
.section__title { font-size: var(--fs-xl); margin: 0; }
.section__title--center { text-align: center; margin-bottom: var(--s-8); }
.section__sub { margin: .35rem 0 0; color: var(--muted); font-size: var(--fs-sm); }
.rail-controls { display: flex; align-items: center; gap: var(--s-2); }
.rail-controls .link-arrow { margin-right: var(--s-2); }
.rail { display: grid; grid-auto-flow: column; gap: var(--s-5); overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 4px 4px var(--s-4); margin: -4px; scrollbar-width: none; overscroll-behavior-x: contain; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.rail--products { grid-auto-columns: calc((100% - 3 * var(--s-5)) / 4); }
.rail--categories { grid-auto-columns: calc((100% - 5 * var(--s-5)) / 6); }

.cat-card { display: flex; flex-direction: column; align-items: center; gap: .5rem; text-decoration: none !important; color: var(--text); padding-bottom: .25rem; }
.cat-card__media { width: 100%; aspect-ratio: 1; border-radius: var(--r-lg); background: linear-gradient(160deg, #fff, var(--well)); border: 1px solid var(--border); display: grid; place-items: center; overflow: hidden; transition: transform var(--t-base) var(--ease), box-shadow var(--t-base), border-color var(--t-base); }
.cat-card__media img { width: 82%; height: 82%; object-fit: contain; mix-blend-mode: multiply; transition: transform var(--t-slow) var(--ease); }
.cat-card:hover .cat-card__media, .cat-card:focus-visible .cat-card__media { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--teal-100); }
.cat-card:hover img { transform: scale(1.06); }
.cat-card__name { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-base); text-align: center; }
.cat-card__count { font-size: var(--fs-xs); color: var(--muted); margin-top: -.35rem; }
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--s-6); }

/* ---------- Product cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); }
.product-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.product-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; transition: transform var(--t-base) var(--ease), box-shadow var(--t-base), border-color var(--t-base); min-width: 0; }
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--teal-100); }
.product-card__media { position: relative; aspect-ratio: 1; background: var(--well); margin: 8px 8px 0; border-radius: calc(var(--r-lg) - 6px); overflow: hidden; }
.product-card__media > a { display: grid; place-items: center; width: 100%; height: 100%; }
.product-card__media img { width: 80%; height: 80%; object-fit: contain; mix-blend-mode: multiply; border-radius: var(--r-md); transition: transform var(--t-slow) var(--ease); }
.product-card:hover .product-card__media img { transform: scale(1.05); }
.product-card__flags { position: absolute; top: 10px; left: 10px; display: flex; flex-wrap: wrap; gap: 4px; max-width: 75%; }
.wish-btn { position: absolute; top: 8px; right: 8px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--navy-900); display: grid; place-items: center; box-shadow: var(--shadow-xs); transition: transform var(--t-fast), color var(--t-fast); }
.wish-btn:hover { transform: scale(1.08); }
.wish-btn.is-saved, .wish-inline.is-saved { color: #d23c5a; }
.wish-btn.is-saved .icon, .wish-inline.is-saved .icon { fill: currentColor; }
.product-card__body { display: flex; flex-direction: column; gap: .35rem; padding: var(--s-4); flex: 1; }
.product-card__meta { display: flex; flex-wrap: nowrap; white-space: nowrap; overflow: hidden; gap: .4rem; font-size: var(--fs-xs); color: var(--muted); font-weight: 600; margin: 0; text-transform: uppercase; letter-spacing: .04em; }
.product-card__meta .dot::before { content: "•"; margin-right: .4rem; color: var(--border-strong); }
.product-card__meta span:first-child.dot::before { display: none; }
.product-card__meta span:last-child { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.product-card__title { font-size: var(--fs-base); font-weight: 650; margin: 0; overflow-wrap: anywhere; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.product-card__title a { color: var(--navy-900); }
.product-card__spec { font-size: var(--fs-sm); color: var(--muted); margin: 0; }
.product-card__foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin: auto 0 var(--s-3); padding-top: .4rem; }
.price { display: flex; align-items: baseline; gap: .45rem; flex-wrap: wrap; }
.price__now { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-md); color: var(--navy-900); font-variant-numeric: tabular-nums; }
.price__was { color: var(--muted); font-size: var(--fs-sm); }
.price--lg .price__now { font-size: 2rem; }
.stock { font-size: var(--fs-xs); font-weight: 600; display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; }
.stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.stock--in_stock { color: var(--success); }
.stock--low_stock { color: var(--warning); }
.stock--out_of_stock { color: var(--danger); }

/* ---------- Promo banners & trust ---------- */
.promo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
.promo { position: relative; display: flex; align-items: stretch; min-height: 220px; border-radius: var(--r-lg); overflow: hidden; padding: var(--s-6); }
.promo h3 { font-size: var(--fs-lg); max-width: 15ch; }
.promo p { font-size: var(--fs-sm); max-width: 32ch; }
.promo__body { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; }
.promo__body .btn { margin-top: auto; }
.promo--has-image .promo__body { max-width: 62%; }
.promo__img { position: absolute; right: -24px; bottom: 0; height: 100%; width: auto; max-width: 52%; object-fit: contain; object-position: bottom; }
.promo--teal { background: linear-gradient(140deg, var(--teal-600), var(--navy-900)); color: #e6f6f2; }
.promo--teal h3 { color: #fff; }
.promo--teal .eyebrow { color: var(--mint-300); }
.promo--mint { background: linear-gradient(140deg, var(--mint-100), #d3f1ec); }
.promo--sand { background: linear-gradient(140deg, var(--sand-100), var(--sand-200)); }
.promo--navy { background: var(--navy-900); color: #dbe9ec; }
.promo--navy h3 { color: #fff; }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
.trust-card { padding: var(--s-6); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); }
.trust-card p { color: var(--muted); font-size: var(--fs-sm); margin: 0; }
.trust-card__icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--mint-100); color: var(--teal-700); margin-bottom: var(--s-4); }

/* ---------- Empty states & skeletons ---------- */
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s-2); padding: clamp(2.5rem, 6vw, 4.5rem) var(--s-6); background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--r-lg); color: var(--muted); }
.empty-state h2, .empty-state h3 { margin: var(--s-2) 0 0; }
.empty-state p { max-width: 44ch; }
.empty-state .icon { color: var(--teal-500); }
.empty-state--compact { padding: var(--s-8) var(--s-4); border: 0; }
.empty-state--inline { flex-direction: row; text-align: left; gap: var(--s-5); padding: var(--s-6); }
.empty-state--inline div { flex: 1; }
.empty-state--inline p { margin: 0; }
.empty-state--page { margin: var(--s-12) 0; border: 0; background: transparent; }
.error-code { font-family: var(--font-display); font-size: 5rem; font-weight: 800; line-height: 1; margin: 0; background: linear-gradient(135deg, var(--teal-600), var(--mint-400)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.skeleton-list { display: grid; gap: var(--s-3); }
.skeleton-list span { height: 64px; border-radius: var(--r-md); background: linear-gradient(90deg, var(--surface-2), #fff, var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Page heads, breadcrumbs ---------- */
.page-head { padding: var(--s-8) 0 var(--s-6); background: linear-gradient(180deg, var(--teal-50), transparent); }
.page-head--slim { padding: var(--s-6) 0 var(--s-2); }
.page-head h1 { margin: 0; }
.page-head__lead { margin-top: var(--s-2); color: var(--muted); max-width: 70ch; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: .45rem; font-size: var(--fs-sm); color: var(--muted); margin-bottom: var(--s-3); }
.breadcrumb a { color: var(--text-2); }
.breadcrumb--page { padding-top: var(--s-6); }

/* ---------- Shop listing ---------- */
.shop { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: var(--s-8); align-items: start; padding-bottom: var(--s-12); }
.filters { position: sticky; top: calc(var(--header-h) + 64px); }
.filters__form { display: grid; gap: var(--s-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s-5); }
.filters__head { display: flex; justify-content: space-between; align-items: center; }
.filters__head h2 { display: flex; gap: .4rem; align-items: center; font-size: var(--fs-md); margin: 0; }
.filters__close, .filters-toggle { display: none; }
.filter-group { border: 0; margin: 0; padding: 0 0 var(--s-4); border-bottom: 1px solid var(--border); display: grid; gap: .2rem; }
.filter-group legend { font-weight: 700; font-size: var(--fs-sm); margin-bottom: .45rem; color: var(--navy-900); padding: 0; }
.price-range { display: grid; grid-template-columns: 1fr auto 1fr; gap: .4rem; align-items: center; }
.filters__actions { display: grid; gap: var(--s-2); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); margin-bottom: var(--s-4); flex-wrap: wrap; }
.toolbar__count { margin: 0; color: var(--muted); }
.toolbar__right { display: flex; gap: var(--s-2); align-items: center; }
.sort-form { display: flex; align-items: center; gap: .5rem; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); list-style: none; padding: 0; margin: 0 0 var(--s-4); }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .75rem; border-radius: var(--r-pill); background: var(--teal-50); color: var(--teal-700); font-size: var(--fs-sm); font-weight: 600; border: 1px solid var(--teal-100); }
.pagination { display: flex; justify-content: center; gap: .35rem; margin-top: var(--s-8); flex-wrap: wrap; }
.pagination__link { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 .6rem; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 600; font-size: var(--fs-sm); text-decoration: none !important; }
.pagination__link:hover { border-color: var(--teal-500); color: var(--teal-700); }
.pagination__link.is-current { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
.pagination__gap { align-self: center; color: var(--muted); }

/* ---------- Product detail ---------- */
.pdp { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); padding: var(--s-4) 0 var(--s-10); align-items: start; }
.pdp__gallery { position: sticky; top: calc(var(--header-h) + 64px); }
.pdp__stage { aspect-ratio: 1; border-radius: var(--r-xl); background: radial-gradient(70% 70% at 50% 40%, #fff, var(--well)); border: 1px solid var(--border); display: grid; place-items: center; overflow: hidden; }
.pdp__stage img { width: 74%; height: 74%; object-fit: contain; mix-blend-mode: multiply; }
.pdp__thumbs { display: flex; gap: var(--s-2); margin-top: var(--s-3); }
.pdp__thumb { width: 76px; height: 76px; padding: 4px; border-radius: var(--r-md); border: 2px solid var(--border); background: var(--well); }
.pdp__thumb.is-active { border-color: var(--teal-600); }
.pdp__thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.pdp__title { font-size: var(--fs-2xl); margin: var(--s-2) 0 var(--s-3); }
.pdp__lead { font-size: var(--fs-md); color: var(--text-2); }
.pdp__buy { display: grid; gap: var(--s-4); margin: var(--s-5) 0; }
.pdp__price-row { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.pdp__form { display: flex; gap: var(--s-3); }
.pdp__add { flex: 1; }

/* ---------- Size picker (products sold in several ml / g / pack sizes) ---------- */
.pdp__form--sizes { flex-wrap: wrap; }
.size-picker { flex: 1 0 100%; min-width: 0; margin: 0; padding: 0; border: 0; }
.size-picker__legend { display: flex; align-items: center; gap: .5rem; width: 100%; margin-bottom: var(--s-3); padding: 0; font-family: var(--font-display); font-weight: 700; color: var(--navy-900); }
.size-picker__req { padding: .1rem .5rem; border-radius: var(--r-pill); background: var(--teal-50); color: var(--teal-700); font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 600; }
.size-picker__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: var(--s-2); }
.size-option { position: relative; display: grid; gap: .15rem; padding: .7rem .85rem; border: 1.5px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface); cursor: pointer;
    transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), transform var(--t-fast); }
.size-option:hover { border-color: var(--teal-500); transform: translateY(-1px); }
.size-option__input { position: absolute; opacity: 0; pointer-events: none; }
.size-option__label { font-weight: 700; color: var(--navy-900); }
.size-option__price { font-size: var(--fs-sm); color: var(--text-2); font-variant-numeric: tabular-nums; }
.size-option__price s { color: var(--muted); font-size: var(--fs-xs); }
.size-option__note { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.size-option__note--low { color: var(--warning); }
.size-option__tick { position: absolute; top: .5rem; right: .5rem; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--primary); color: #fff; opacity: 0; transform: scale(.6); transition: opacity var(--t-fast), transform var(--t-fast); }
.size-option:has(:checked) { border-color: var(--primary); background: var(--teal-50); box-shadow: 0 0 0 3px rgba(14, 122, 122, .14); }
.size-option:has(:checked) .size-option__tick { opacity: 1; transform: none; }
.size-option:has(:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.size-option.is-unavailable { cursor: not-allowed; background: var(--surface-2); border-style: dashed; }
.size-option.is-unavailable:hover { transform: none; border-color: var(--border-strong); }
.size-option.is-unavailable .size-option__label, .size-option.is-unavailable .size-option__price { color: var(--muted); }
.size-picker__hint { display: flex; align-items: center; gap: .35rem; margin: var(--s-3) 0 0; font-size: var(--fs-sm); color: var(--muted); }
.size-picker--links { margin-bottom: var(--s-4); }
a.size-option { color: inherit; text-decoration: none; }
.size-option.is-current { border-color: var(--primary); background: var(--teal-50); box-shadow: 0 0 0 3px rgba(14, 122, 122, .14); }
.size-option.is-current .size-option__tick { opacity: 1; transform: none; }
.size-option:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.size-picker.is-invalid .size-option:not(.is-unavailable) { border-color: var(--danger); }
.size-picker.is-invalid .size-picker__hint { color: var(--danger); font-weight: 600; }
.price__from { font-size: var(--fs-sm); font-weight: 600; color: var(--muted); }
.pdp__add[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.product-card__sizes { display: inline-flex; align-items: center; gap: .3rem; color: var(--teal-700); font-weight: 600; }

/* ---------- Ask a pharmacist (product page; Settings → Store) ---------- */
.pharmacist-help { display: flex; gap: var(--s-4); margin: 0 0 var(--s-5); padding: var(--s-4) var(--s-5); border-radius: var(--r-lg); border: 1px solid var(--teal-100);
    background: linear-gradient(135deg, var(--teal-50), var(--mint-100)); }
.pharmacist-help__icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(135deg, var(--navy-950), var(--teal-700)); color: var(--mint-300); }
.pharmacist-help__body { display: grid; gap: .25rem; min-width: 0; }
.pharmacist-help__title { margin: 0; font-family: var(--font-display); font-weight: 700; color: var(--navy-900); }
.pharmacist-help__text { margin: 0; font-size: var(--fs-sm); color: var(--text-2); }
.pharmacist-help__links { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-2); }
.pharmacist-help__links .btn { background: var(--surface); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--r-pill); background: var(--surface); height: 52px; }
.qty__btn { width: 44px; height: 100%; border: 0; background: transparent; display: grid; place-items: center; color: var(--navy-900); border-radius: var(--r-pill); }
.qty__btn:hover { background: var(--surface-2); }
.qty__input { width: 46px; border: 0; text-align: center; font-weight: 700; background: transparent; -moz-appearance: textfield; appearance: textfield; }
.qty__input::-webkit-outer-spin-button, .qty__input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty__input:focus { outline: none; }
.qty--sm { height: 38px; }
.qty--sm .qty__btn { width: 34px; }
.qty--sm .qty__input { width: 36px; }
.rating { display: flex; align-items: center; gap: .35rem; color: #c98a00; margin: 0 0 var(--s-2); }
.spec-list { display: grid; gap: 0; margin: 0; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.spec-list div { display: grid; grid-template-columns: 170px 1fr; gap: var(--s-4); padding: .75rem 1rem; border-bottom: 1px solid var(--border); font-size: var(--fs-sm); }
.spec-list div:last-child { border-bottom: 0; }
.spec-list div:nth-child(odd) { background: var(--surface-2); }
.spec-list dt { color: var(--muted); font-weight: 600; }
.spec-list dd { margin: 0; color: var(--text); }
.pdp__details { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--s-8); align-items: start; }
.detail-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s-6); margin-bottom: var(--s-4); }
.detail-block h2 { font-size: var(--fs-lg); display: flex; align-items: center; gap: .5rem; }
.detail-block--warning { background: #fffaf2; border-color: #f1dfbf; }
.detail-block--warning h2 { color: var(--warning); }
.disclaimer { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4) var(--s-5); border-radius: var(--r-md); background: rgba(255,255,255,.06); color: inherit; font-size: var(--fs-sm); }
.disclaimer p { margin: 0; }
.disclaimer--inline { background: var(--info-bg); color: var(--info); margin-top: var(--s-4); }
.reviews { display: grid; gap: var(--s-4); }
.review { padding: var(--s-4) 0; border-bottom: 1px solid var(--border); }
.review h3 { margin: .2rem 0; font-size: var(--fs-base); }

/* ---------- Cart, checkout, order ---------- */
.cart-layout, .checkout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--s-8); align-items: start; padding: var(--s-4) 0 var(--s-12); }
.cart-list { list-style: none; margin: 0 0 var(--s-5); padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.cart-item { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto 100px auto; gap: var(--s-4); align-items: center; padding: var(--s-4); border-bottom: 1px solid var(--border); }
.cart-item:last-child { border-bottom: 0; }
.cart-item__media { width: 96px; height: 96px; border-radius: var(--r-md); background: var(--well); display: grid; place-items: center; }
.cart-item__media img { width: 80%; height: 80%; object-fit: contain; mix-blend-mode: multiply; }
.cart-item__name { font-weight: 650; color: var(--navy-900); }
.cart-item__info p { margin: .15rem 0 0; }
.cart-item__total { text-align: right; font-variant-numeric: tabular-nums; }
.summary { position: sticky; top: calc(var(--header-h) + 64px); display: grid; gap: var(--s-3); }
.summary h2 { font-size: var(--fs-lg); margin-bottom: var(--s-2); }
.summary-row { display: flex; justify-content: space-between; gap: var(--s-3); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.summary-row--discount { color: var(--success); }
.summary-row--total { padding-top: var(--s-3); border-top: 1px solid var(--border); font-size: var(--fs-md); font-weight: 800; color: var(--navy-900); }
.coupon { display: flex; gap: var(--s-2); }
.mini-cart { list-style: none; margin: 0 0 var(--s-3); padding: 0; display: grid; gap: var(--s-3); }
.mini-cart__item { display: grid; grid-template-columns: 56px 1fr auto; gap: var(--s-3); align-items: center; font-size: var(--fs-sm); }
.mini-cart__item > img, .mini-cart__thumb img { width: 56px; height: 56px; object-fit: contain; background: var(--well); border-radius: var(--r-sm); mix-blend-mode: multiply; }
.mini-cart__item p { margin: .1rem 0 0; }
.mini-cart__thumb { position: relative; }
.mini-cart__qty { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; border-radius: var(--r-pill); background: var(--navy-900); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.steps { display: flex; gap: var(--s-2); list-style: none; padding: 0; margin: 0 0 var(--s-3); font-size: var(--fs-sm); color: var(--muted); counter-reset: s; flex-wrap: wrap; }
.steps li { display: inline-flex; align-items: center; gap: .4rem; counter-increment: s; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border-strong); font-size: 11px; font-weight: 700; }
.steps li:not(:last-child)::after { content: ""; width: 28px; height: 1px; background: var(--border-strong); margin-left: .4rem; }
.steps .is-current { color: var(--navy-900); font-weight: 700; }
.steps .is-current::before { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
.steps .is-done::before { content: "✓"; background: var(--mint-100); color: var(--teal-700); border-color: var(--mint-300); }
.checkout__main { display: grid; gap: var(--s-5); }
.form-section { display: grid; gap: var(--s-4); }
.form-section h2 { display: flex; align-items: center; gap: .6rem; font-size: var(--fs-lg); margin: 0; }
.step-num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--mint-100); color: var(--teal-700); font-size: var(--fs-sm); }
.choice-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-3); }
.choice-row--stack { grid-template-columns: 1fr; }
.choice { display: flex; gap: .8rem; align-items: center; padding: var(--s-4); border: 1.5px solid var(--border); border-radius: var(--r-md); color: var(--text); background: var(--surface); text-decoration: none !important; cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast); }
.choice small { display: block; color: var(--muted); font-size: var(--fs-xs); font-weight: 400; margin-top: .1rem; }
.choice:hover { border-color: var(--teal-500); color: var(--text); }
.choice.is-selected, .choice:has(input:checked) { border-color: var(--teal-600); background: var(--teal-50); box-shadow: 0 0 0 3px rgba(14, 122, 122, .12); }
.choice .icon { color: var(--teal-600); }
.choice--radio input { accent-color: var(--primary); width: 18px; height: 18px; }
.order-hero { display: flex; align-items: center; gap: var(--s-5); padding: var(--s-6); border-radius: var(--r-xl); margin: var(--s-6) 0; flex-wrap: wrap; }
.order-hero > div { flex: 1; min-width: 240px; }
.order-hero h1 { font-size: var(--fs-xl); margin: 0 0 .25rem; }
.order-hero p:last-child { margin: 0; }
.order-hero__icon { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; }
.order-hero--ok { background: linear-gradient(135deg, var(--mint-100), #fff); border: 1px solid var(--mint-300); }
.order-hero--ok .order-hero__icon { background: var(--success); color: #fff; }
.order-hero--wait { background: linear-gradient(135deg, var(--warning-bg), #fff); border: 1px solid #f2dcb3; }
.order-hero--wait .order-hero__icon { background: var(--warning); color: #fff; }
.order-hero--bad { background: linear-gradient(135deg, var(--danger-bg), #fff); border: 1px solid #f4c7c2; }
.order-hero--bad .order-hero__icon { background: var(--danger); color: #fff; }
.order-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--s-6); align-items: start; }
.order-side { display: grid; gap: var(--s-5); }
.order-page { padding-bottom: var(--s-12); }
.order-page details summary { cursor: pointer; }
.order-page details[open] summary { margin-bottom: var(--s-4); }
.kv { display: grid; gap: .5rem; margin: 0 0 var(--s-4); }
.kv div { display: flex; justify-content: space-between; gap: var(--s-3); font-size: var(--fs-sm); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.timeline li { display: grid; grid-template-columns: 14px 1fr; gap: var(--s-3); position: relative; }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 6px; top: 16px; bottom: calc(-1 * var(--s-3)); width: 2px; background: var(--border); }
.timeline__dot { width: 14px; height: 14px; border-radius: 50%; background: var(--mint-300); border: 3px solid var(--teal-600); margin-top: 3px; }
.timeline p { margin: 0; }

/* ---------- Drawer & toasts ---------- */
.drawer { position: fixed; inset: 0; z-index: 95; }
.drawer__panel { position: absolute; inset: 0 0 0 auto; width: min(420px, 100vw); background: var(--surface); display: flex; flex-direction: column; animation: slide-in-right var(--t-base) var(--ease); box-shadow: var(--shadow-lg); }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--border); }
.drawer__head h2 { margin: 0; font-size: var(--fs-lg); }
.drawer__body { flex: 1; overflow-y: auto; padding: var(--s-5); display: flex; flex-direction: column; }
.drawer__foot { margin-top: auto; display: grid; gap: var(--s-2); padding-top: var(--s-4); border-top: 1px solid var(--border); }
.toast-region { position: fixed; z-index: 120; bottom: 1.25rem; left: 50%; transform: translateX(-50%); display: grid; gap: .5rem; width: min(440px, calc(100vw - 2rem)); pointer-events: none; }
.toast { display: flex; align-items: center; gap: .6rem; padding: .85rem 1.1rem; border-radius: var(--r-md); background: var(--navy-900); color: #fff; box-shadow: var(--shadow-lg); font-size: var(--fs-sm); font-weight: 500; animation: toast-in 260ms var(--ease); pointer-events: auto; }
.toast--success .icon { color: var(--mint-400); }
.toast--error { background: #6f1b14; }
.toast--info .icon { color: var(--cyan-400); }
.toast.is-leaving { opacity: 0; transform: translateY(8px); transition: all 240ms; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

/* ---------- Install-app prompt (PWA) ---------- */
.install-prompt {
    position: fixed; z-index: 90; right: 1.25rem; bottom: 1.25rem; width: min(400px, calc(100vw - 2rem));
    display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-4); padding-right: 2.75rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
    opacity: 0; transform: translateY(16px); transition: opacity 240ms var(--ease), transform 240ms var(--ease);
}
.install-prompt.is-visible { opacity: 1; transform: none; }
.install-prompt__icon { flex: none; width: 52px; height: 52px; border-radius: 14px; }
.install-prompt__body { display: grid; gap: var(--s-2); min-width: 0; }
.install-prompt__title { margin: 0; font-family: var(--font-display); font-weight: 700; color: var(--navy-900); line-height: 1.3; }
.install-prompt__text { margin: 0; font-size: var(--fs-sm); color: var(--text-2); line-height: 1.5; }
.install-prompt__key { display: inline-flex; align-items: center; gap: .25rem; font-weight: 600; color: var(--navy-900); white-space: nowrap; }
.install-prompt__key .icon { color: var(--primary); }
.install-prompt__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-1); }
.install-prompt__close { position: absolute; top: .4rem; right: .4rem; width: 36px; height: 36px; color: var(--muted); }
.install-prompt__close:hover { background: var(--surface-2); }
@media (max-width: 560px) {
    .install-prompt { left: .75rem; right: .75rem; bottom: calc(.75rem + env(safe-area-inset-bottom)); width: auto; }
}
@media (prefers-reduced-motion: reduce) {
    .install-prompt { transition: none; }
}

/* ---------- Account & auth ---------- */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-8); max-width: 1080px; margin: var(--s-10) auto var(--s-12); padding-inline: clamp(1rem, 3vw, 2rem); align-items: center; }
.auth--single { grid-template-columns: minmax(0, 480px); justify-content: center; }
.auth__card { padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: var(--r-xl); box-shadow: var(--shadow-md); }
.auth__card h1 { font-size: var(--fs-xl); }
.auth__alt { margin: var(--s-5) 0 0; text-align: center; font-size: var(--fs-sm); }
.auth__aside { border-radius: var(--r-xl); overflow: hidden; background: linear-gradient(160deg, var(--teal-600), var(--navy-900)); aspect-ratio: 1; display: flex; align-items: flex-end; justify-content: center; }
.auth__aside img { width: 92%; height: auto; }
.account-tabs { display: flex; gap: var(--s-1); flex-wrap: wrap; border-bottom: 1px solid var(--border); margin: var(--s-4) 0 var(--s-6); }
.account-tabs a, .account-tabs button { display: inline-flex; align-items: center; gap: .4rem; padding: .7rem 1rem; border: 0; background: none; color: var(--text-2); font-weight: 600; font-size: var(--fs-sm); border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none !important; }
.account-tabs a.is-active { color: var(--teal-700); border-bottom-color: var(--teal-600); }
.account-tabs__logout { margin-left: auto; }
.account-body { padding-bottom: var(--s-12); }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6); align-items: start; }
.address-list { display: grid; gap: var(--s-4); }
.prose-page { padding: var(--s-4) 0 var(--s-12); max-width: 900px; }
.prose p { font-size: var(--fs-md); color: var(--text-2); }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s-4); margin-bottom: var(--s-4); }
.contact-card .icon { color: var(--teal-600); margin-bottom: var(--s-3); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; padding: 0; }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th { text-align: left; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: .8rem 1rem; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.table td { padding: .8rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafcfc; }
.table .num { text-align: right; }
.table a.row-link { font-weight: 650; color: var(--navy-900); }
.table__thumb { width: 44px; height: 44px; object-fit: contain; background: var(--well); border-radius: var(--r-sm); mix-blend-mode: multiply; }

/* ---------- Footer ---------- */
.site-footer { margin-top: var(--s-20); background: var(--navy-950); color: #b8cdd2; padding: var(--s-10) 0 var(--s-6); font-size: var(--fs-sm); }
.site-footer a { color: #dbecef; }
.site-footer a:hover { color: var(--mint-300); }
.site-footer .disclaimer { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); margin-bottom: var(--s-10); }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: var(--s-8); }
.site-footer__grid h2 { color: #fff; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .1em; margin-bottom: var(--s-4); }
.site-footer__grid nav { display: grid; gap: .55rem; align-content: start; }
.site-footer__grid p { display: flex; gap: .5rem; align-items: flex-start; }
.site-footer__brand p { margin-top: var(--s-4); max-width: 32ch; }
.site-footer__base { display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.08); margin-top: var(--s-10); padding-top: var(--s-5); color: #7f989e; font-size: var(--fs-xs); }
.site-footer__pay { display: inline-flex; gap: .4rem; align-items: center; }

/* ==========================================================================
   Administration
   ========================================================================== */
.admin { background: #f3f6f7; }
.admin-shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(90deg, var(--navy-950) 252px, transparent 252px); }
.admin-side { position: sticky; top: 0; height: 100vh; align-self: start; overflow-y: auto; background: var(--navy-950); color: #a9c0c5; padding: var(--s-5) var(--s-3); display: flex; flex-direction: column; gap: var(--s-1); }
.admin-side .brand { padding: 0 var(--s-2) var(--s-5); color: #fff; }
.admin-side__label { margin: var(--s-4) var(--s-3) var(--s-1); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #5f7f87; }
.admin-side a { display: flex; align-items: center; gap: .7rem; padding: .55rem .75rem; border-radius: var(--r-sm); color: #c3d6da; font-weight: 500; font-size: var(--fs-sm); text-decoration: none !important; }
.admin-side a:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-side a.is-active { background: linear-gradient(90deg, rgba(79,224,182,.18), rgba(79,224,182,.04)); color: #fff; box-shadow: inset 2px 0 0 var(--mint-400); }
.admin-side a .icon { width: 18px; height: 18px; }
.admin-side__foot { margin-top: auto; padding-top: var(--s-4); border-top: 1px solid rgba(255,255,255,.08); }
.admin-main { min-width: 0; }
.admin-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: .8rem clamp(1rem, 3vw, 2rem); background: rgba(243,246,247,.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.admin-top h1 { font-size: var(--fs-lg); margin: 0; }
.admin-top__actions { display: flex; align-items: center; gap: var(--s-2); }
.admin-menu-btn { display: none; }
.admin-content { padding: clamp(1rem, 3vw, 2rem); display: grid; gap: var(--s-6); }
.admin-content > * { min-width: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s-4); }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s-5); display: grid; gap: .3rem; position: relative; overflow: hidden; }
.kpi__label { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: flex; align-items: center; gap: .4rem; }
.kpi__value { font-family: var(--font-display); font-size: 1.65rem; font-weight: 800; color: var(--navy-900); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi__hint { font-size: var(--fs-xs); color: var(--muted); }
.kpi--accent { background: linear-gradient(145deg, var(--navy-900), var(--teal-700)); border: 0; }
.kpi--accent .kpi__label, .kpi--accent .kpi__hint { color: #9fc8c6; }
.kpi--accent .kpi__value { color: #fff; }
.kpi--warn .kpi__value { color: var(--warning); }
.kpi--danger .kpi__value { color: var(--danger); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s-5); min-width: 0; }
.panel__head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); margin-bottom: var(--s-4); flex-wrap: wrap; }
.panel__head h2 { font-size: var(--fs-md); margin: 0; }
.panel--flush { padding: 0; overflow: hidden; }
.panel--flush .panel__head { padding: var(--s-4) var(--s-5) 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); }
.grid-main-side { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: var(--s-6); align-items: start; }
.filter-bar { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: end; }
.filter-bar .field { font-weight: 600; }
.filter-bar .input { min-width: 150px; }
.chart { width: 100%; min-height: 240px; }
.chart > svg { width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--font-body); font-size: 11px; fill: var(--muted); }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .bar { transition: opacity var(--t-fast); }
.chart .bar:hover { opacity: .8; }
.chart-legend { display: flex; flex-wrap: wrap; gap: var(--s-4); font-size: var(--fs-xs); color: var(--muted); margin-top: var(--s-2); }
.chart-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.swatch--1 { background: var(--teal-600); } .swatch--2 { background: var(--mint-400); } .swatch--3 { background: #e0795b; } .swatch--4 { background: var(--navy-900); } .swatch--5 { background: var(--cyan-400); } .swatch--6 { background: #c9a227; }
.chart-tip { position: fixed; z-index: 200; pointer-events: none; background: var(--navy-950); color: #fff; padding: .45rem .65rem; border-radius: var(--r-sm); font-size: var(--fs-xs); box-shadow: var(--shadow-md); white-space: nowrap; }
.hbar-list { display: grid; gap: var(--s-3); list-style: none; margin: 0; padding: 0; }
.hbar-list li { display: grid; gap: .3rem; font-size: var(--fs-sm); }
.hbar-list .row-between span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; }
.hbar { width: 100%; height: 8px; border-radius: var(--r-pill); overflow: hidden; background: var(--surface-2); display: block; }
.hbar svg { width: 100%; height: 8px; }
.admin-form { display: grid; gap: var(--s-5); }
.admin-form fieldset { border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s-5); margin: 0; background: var(--surface); display: grid; gap: var(--s-4); min-width: 0; }
.admin-form legend { font-family: var(--font-display); font-weight: 700; padding: 0 .4rem; color: var(--navy-900); }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sticky-actions { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; gap: var(--s-2); padding: var(--s-3); background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-md); }
.thumb-grid { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.thumb-tile { width: 120px; display: grid; gap: .35rem; font-size: var(--fs-xs); }
.thumb-tile img { width: 120px; height: 120px; object-fit: contain; background: var(--well); border-radius: var(--r-md); border: 1px solid var(--border); mix-blend-mode: multiply; }
.sort-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.sort-list li { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: var(--s-4); align-items: center; padding: var(--s-3); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.sort-list img { width: 96px; height: 54px; object-fit: cover; border-radius: var(--r-sm); background: var(--well); }
.token-box { font-family: ui-monospace, Consolas, monospace; background: var(--navy-950); color: var(--mint-300); padding: var(--s-4); border-radius: var(--r-md); word-break: break-all; }
.code { font-family: ui-monospace, Consolas, monospace; font-size: var(--fs-xs); background: var(--surface-2); padding: .1rem .35rem; border-radius: 4px; }
.inline-form { display: inline-flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; }
/* edit / delete buttons at the end of a list row */
.row-actions { display: inline-flex; gap: .4rem; align-items: center; justify-content: flex-end; }
.row-actions form { margin: 0; }
.row-action { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--teal-700); cursor: pointer; text-decoration: none !important; transition: background .15s, color .15s, border-color .15s; }
.row-action:hover, .row-action:focus-visible { background: var(--teal-700); border-color: var(--teal-700); color: #fff; }
.row-action--danger { color: var(--danger, #DC2626); }
.row-action--danger:hover, .row-action--danger:focus-visible { background: var(--danger, #DC2626); border-color: var(--danger, #DC2626); color: #fff; }
.stack-sm { display: grid; gap: var(--s-2); }
.admin .table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }


/* Chart series colours (SVG classes keep the CSP free of inline styles) */
.chart .line { fill: none; stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { stroke: none; opacity: .12; }
.chart .dot { stroke: #fff; stroke-width: 1.5; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .hit:hover { fill: rgba(10, 47, 58, .04); }
.s1 { fill: var(--teal-600); stroke: var(--teal-600); }
.s2 { fill: var(--mint-400); stroke: var(--mint-400); }
.s3 { fill: #e0795b; stroke: #e0795b; }
.s4 { fill: var(--navy-900); stroke: var(--navy-900); }
.s5 { fill: var(--cyan-400); stroke: var(--cyan-400); }
.s6 { fill: #c9a227; stroke: #c9a227; }
.chart .line.s1, .chart .line.s2, .chart .line.s3, .chart .line.s4, .chart .line.s5, .chart .line.s6 { fill: none; }
.donut-wrap { display: grid; grid-template-columns: minmax(140px, 200px) 1fr; gap: var(--s-5); align-items: center; }
.donut { width: 100%; max-width: 200px; }
.donut__track { fill: none; stroke: var(--surface-2); stroke-width: 26; }
.donut__seg { fill: none; stroke-width: 26; transition: stroke-width var(--t-fast); }
.donut__seg:hover { stroke-width: 30; }
.donut__total { font-family: var(--font-display); font-size: 20px; font-weight: 800; fill: var(--navy-900); }
.donut__caption { font-size: 11px; fill: var(--muted); }
.chart-legend--stack { flex-direction: column; gap: var(--s-2); font-size: var(--fs-sm); }
.chart-legend--stack strong { margin-left: auto; padding-left: var(--s-3); color: var(--text); font-variant-numeric: tabular-nums; }
.chart-legend--stack span { display: flex; }
.admin-side form { margin: 0; }
.admin-side__logout { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .55rem .75rem; border: 0; border-radius: var(--r-sm); background: none; color: #c3d6da; font-size: var(--fs-sm); text-align: left; }
.admin-side__logout:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-side__logout .icon { width: 18px; height: 18px; }
.admin-content > .notice { margin: 0; }
.filter-bar .muted { flex-basis: 100%; margin: 0; }
.status-tabs { display: flex; flex-wrap: wrap; gap: var(--s-1); }
.status-tabs a { padding: .35rem .8rem; border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); text-decoration: none !important; }
.status-tabs a.is-active { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
.status-tabs a span { color: var(--muted); font-weight: 500; margin-left: .25rem; }
.status-tabs a.is-active span { color: var(--mint-300); }
.help { font-size: var(--fs-xs); color: var(--muted); font-weight: 400; }
.danger-zone { border-color: #f1c6c1 !important; }
.danger-zone legend { color: var(--danger) !important; }

.admin .panel h2 { font-size: var(--fs-md); }
.admin-form > .grid-main-side > .admin-form:last-child { position: sticky; top: 76px; }
.grid-main-side .sticky-actions { position: static; box-shadow: none; }
.slide-preview { width: 100%; max-width: 320px; height: auto; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--well); }
.promo-swatch { width: 96px; height: 54px; border-radius: var(--r-sm); }
.sort-list--sections li { grid-template-columns: 140px minmax(0, 1fr) auto; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
    .rail--products { grid-auto-columns: calc((100% - 2 * var(--s-5)) / 3); }
    .rail--categories { grid-auto-columns: calc((100% - 3 * var(--s-5)) / 4.3); }
    .product-grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .main-nav__note { display: none; }
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
    .header-action--wish { display: none; }
    .grid-main-side, .pdp__details { grid-template-columns: 1fr; }
    .admin-shell { grid-template-columns: 1fr; background: none; }
    .admin-side { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 100; transform: translateX(-100%); transition: transform var(--t-base) var(--ease); }
    .admin-side.is-open { transform: none; box-shadow: var(--shadow-lg); }
    .admin-menu-btn { display: inline-grid; }
    .admin-form > .grid-main-side > .admin-form:last-child { position: static; }
}

/* Contact bar on small screens: short labels, lead text hidden. */
@media (max-width: 820px) {
    .contact-bar__lead { display: none; }
    .contact-bar__links { flex: 1; justify-content: center; }
    .contact-bar__inner { min-height: 36px; }
}
@media (max-width: 560px) {
    .contact-bar__full { display: none; }
    .contact-bar__short { display: inline; }
    .pharmacist-help { padding: var(--s-4); }
    /* The form stacks in a column here: no wrapping (it would start a second column) and no 100% basis (it would become a height). */
    .pdp__form--sizes { flex-wrap: nowrap; }
    .size-picker { flex: none; }
    .size-picker__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width: 820px) {
    :root { --header-h: 64px; }
    .site-header__bar { flex-wrap: wrap; gap: var(--s-2) var(--s-3); padding-block: var(--s-2); }
    .site-header__menu { display: inline-grid; margin-left: -8px; }
    .brand__name { font-size: 1.05rem; }
    .search { order: 5; flex-basis: 100%; max-width: none; height: 46px; }
    .search__submit { display: none; }
    .header-action span:not(.cart-icon):not(.cart-count) { display: none; }
    .header-action--staff { display: none; }
    .main-nav { display: none; }
    .hero { padding-top: var(--s-3); }
    .hero__track { height: auto; min-height: 560px; }
    .slide { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-items: start; }
    .slide--spotlight .slide__figure { position: absolute; inset: auto 0 0 auto; height: 52%; width: 100%; justify-content: flex-end; }
    .slide--spotlight .slide__figure img { height: 100%; }
    .slide--spotlight .slide__content { padding-bottom: 0; }
    .slide__chips { display: none; }
    .slide--banner .slide__bg { position: absolute; inset: auto 0 0 0; height: 55%; }
    .slide--banner .slide__bg img { object-position: center; }
    .slide--banner.slide--light::after { background: linear-gradient(180deg, #fff 0%, #fff 42%, rgba(255,255,255,0) 58%); }
    .slide--banner.slide--dark::after { background: linear-gradient(180deg, var(--navy-950) 0%, var(--navy-950) 42%, rgba(5,28,36,0) 60%); }
    .slide__title { font-size: 1.9rem; }
    .slide__text { font-size: var(--fs-base); margin-bottom: var(--s-4); }
    .hero__controls { left: 50%; right: auto; transform: translateX(-50%); bottom: .75rem; }
    .rail--products { grid-auto-columns: 46%; gap: var(--s-3); }
    .rail--categories { grid-auto-columns: 30%; gap: var(--s-3); }
    .rail-controls .round-btn { display: none; }
    .promo-grid, .trust-grid { grid-template-columns: 1fr; }
    .shop { grid-template-columns: 1fr; }
    .filters { position: fixed; inset: 0; z-index: 96; background: rgba(5,28,36,.45); display: none; padding: 0; }
    .filters.is-open { display: block; }
    .filters__form { position: absolute; inset: 0 0 0 auto; width: min(360px, 92vw); border-radius: 0; overflow-y: auto; animation: slide-in-right var(--t-base) var(--ease); }
    .filters__close, .filters-toggle { display: inline-flex; }
    .product-grid, .product-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
    .product-card__body { padding: var(--s-3); }
    .product-card__foot { flex-direction: column; align-items: flex-start; gap: .2rem; }
    .pdp, .cart-layout, .checkout, .order-grid, .auth, .two-col, .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .pdp__gallery, .summary, .filters { position: static; }
    .filters { position: fixed; }
    .auth__aside { display: none; }
    .cart-item { grid-template-columns: 72px minmax(0, 1fr) auto; grid-template-areas: "m i r" "m q t"; }
    .cart-item__media { grid-area: m; width: 72px; height: 72px; }
    .cart-item__info { grid-area: i; }
    .cart-item__qty { grid-area: q; }
    .cart-item__total { grid-area: t; }
    .cart-item > form:last-child { grid-area: r; justify-self: end; }
    .form-grid, .form-grid--3 { grid-template-columns: 1fr; }
    .choice-row { grid-template-columns: 1fr; }
    .spec-list div { grid-template-columns: 1fr; gap: .1rem; }
    .empty-state--inline { flex-direction: column; text-align: center; }
    .table--stack thead { display: none; }
    .table--stack tr { display: grid; padding: .6rem 0; border-bottom: 1px solid var(--border); }
    .table--stack td { border: 0; padding: .25rem 1rem; display: flex; justify-content: space-between; gap: 1rem; }
    .table--stack td[data-label]::before { content: attr(data-label); color: var(--muted); font-weight: 600; }
    .site-footer__grid { grid-template-columns: 1fr; }
    .sort-list li { grid-template-columns: 64px minmax(0, 1fr); }
    .sort-list li > :last-child { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
    .donut-wrap { grid-template-columns: 1fr; justify-items: center; }
    .header-actions { gap: 0; }
    .header-action { padding: .35rem .45rem; }
    .rail--products { grid-auto-columns: 72%; }
    .rail--categories { grid-auto-columns: 40%; }
    .pdp__form { flex-direction: column; }
    .qty { align-self: flex-start; }
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kpi__value { font-size: 1.3rem; }
    .section__head { align-items: flex-start; }
}

/* ---------- Futuristic stage: sign-in, registration, password and checkout pages ---------- */
@property --fx-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

.fx {
    --fx-text: #e9f7f5;
    --fx-muted: #9fbfc0;
    --fx-line: rgba(255, 255, 255, .12);
    --fx-glass: linear-gradient(160deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .025));
    --fx-glow: 0 0 0 1px rgba(79, 224, 182, .45), 0 0 28px rgba(79, 224, 182, .28);
    position: relative; isolation: isolate; overflow: hidden;
    margin-bottom: calc(-1 * var(--s-20));
    padding: clamp(2rem, 5vw, 4.5rem) 0 clamp(3rem, 7vw, 6rem);
    background: radial-gradient(1200px 600px at 85% -10%, rgba(56, 198, 232, .16), transparent 60%),
                radial-gradient(900px 600px at -10% 110%, rgba(79, 224, 182, .14), transparent 60%),
                var(--navy-950);
    color: var(--fx-text);
}
.fx__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.fx__orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; animation: fx-drift 18s var(--ease) infinite alternate; }
.fx__orb--1 { width: 460px; height: 460px; top: -140px; left: -120px; background: radial-gradient(circle, rgba(79, 224, 182, .55), transparent 65%); }
.fx__orb--2 { width: 520px; height: 520px; bottom: -220px; right: -160px; background: radial-gradient(circle, rgba(56, 198, 232, .5), transparent 65%); animation-duration: 22s; animation-direction: alternate-reverse; }
.fx__orb--3 { width: 300px; height: 300px; top: 40%; left: 45%; background: radial-gradient(circle, rgba(18, 145, 141, .55), transparent 65%); animation-duration: 26s; }
.fx__grid {
    position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
    animation: fx-grid 30s linear infinite;
}
@keyframes fx-drift { to { transform: translate3d(60px, 40px, 0) scale(1.15); } }
@keyframes fx-grid { to { background-position: 56px 56px, 56px 56px; } }

/* Typography */
.fx-eyebrow { display: inline-flex; align-items: center; gap: .55rem; margin: 0 0 var(--s-3); padding: .35rem .85rem; border: 1px solid var(--fx-line); border-radius: var(--r-pill); background: rgba(255, 255, 255, .05); color: var(--mint-300); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; backdrop-filter: blur(8px); }
.fx-pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--mint-400); box-shadow: 0 0 12px var(--mint-400); }
.fx-pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--mint-400); animation: fx-ping 1.8s ease-out infinite; }
@keyframes fx-ping { from { transform: scale(.6); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }
.fx-title { margin: 0 0 var(--s-3); font-family: var(--font-display); font-size: var(--fs-3xl); font-weight: 800; line-height: 1.05; letter-spacing: -.025em; color: #fff; }
.fx-gradient-text { background: linear-gradient(100deg, var(--mint-400), var(--cyan-400) 55%, #a5f3e4); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: fx-shimmer 6s ease-in-out infinite alternate; }
@keyframes fx-shimmer { to { background-position: 100% 0; } }
.fx-lead { max-width: 46ch; margin: 0; color: var(--fx-muted); font-size: var(--fs-md); }

/* Glass surfaces with an animated gradient edge */
.fx-card, .fx-panel { position: relative; background: var(--fx-glass); border: 1px solid var(--fx-line); border-radius: var(--r-xl); box-shadow: 0 30px 80px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .08); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); }
.fx-card { padding: clamp(1.5rem, 4vw, 2.5rem); }
.fx-panel { padding: clamp(1.25rem, 3vw, 1.75rem); border-radius: var(--r-lg); }
.fx-card--glow::before, .fx-panel--glow::before {
    content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
    background: conic-gradient(from var(--fx-angle), transparent 0 55%, var(--mint-400) 70%, var(--cyan-400) 80%, transparent 92%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    animation: fx-spin 6s linear infinite;
}
@keyframes fx-spin { to { --fx-angle: 360deg; } }
.fx-card__title { margin: 0 0 .35rem; font-size: var(--fs-xl); color: #fff; }
.fx-card__sub { margin: 0 0 var(--s-6); color: var(--fx-muted); }

/* Form controls on the dark stage */
.fx .field { align-content: start; color: rgba(233, 247, 245, .88); }
.fx .field em, .fx .muted, .fx .help { color: var(--fx-muted); }
.fx .input { background: rgba(3, 18, 24, .55); border-color: rgba(255, 255, 255, .14); color: var(--fx-text); }
.fx .input::placeholder { color: rgba(159, 191, 192, .6); }
.fx .input:hover { border-color: rgba(134, 236, 206, .45); }
.fx .input:focus { border-color: var(--mint-400); box-shadow: 0 0 0 4px rgba(79, 224, 182, .16), 0 0 26px rgba(79, 224, 182, .22); }
.fx select.input option { background: var(--navy-900); color: #fff; }
.fx .field-error { color: #ffb4ab; }
.fx a { color: var(--mint-300); }
.fx a:hover { color: #fff; }
.fx .check { color: rgba(233, 247, 245, .85); }
.fx .check input, .fx .choice--radio input { accent-color: var(--mint-400); }
.fx .notice { background: rgba(56, 198, 232, .1); color: #bfeaf6; border: 1px solid rgba(56, 198, 232, .25); }
.fx .notice--error { background: rgba(255, 99, 88, .12); color: #ffc2bb; border-color: rgba(255, 99, 88, .35); }
.fx .notice--warning { background: rgba(255, 184, 77, .12); color: #ffd99c; border-color: rgba(255, 184, 77, .35); }
.fx .auth__alt { color: var(--fx-muted); }

.fx .btn--primary { --btn-bg: linear-gradient(100deg, var(--mint-400), var(--cyan-400)); --btn-fg: var(--navy-950); --btn-bd: transparent; position: relative; overflow: hidden; background: var(--btn-bg); font-weight: 800; letter-spacing: .01em; box-shadow: 0 10px 30px rgba(79, 224, 182, .3), inset 0 1px 0 rgba(255, 255, 255, .5); }
.fx .btn--primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%); transform: translateX(-120%); transition: transform 700ms var(--ease); }
.fx .btn--primary:hover { --btn-fg: var(--navy-950); box-shadow: 0 14px 40px rgba(79, 224, 182, .45), inset 0 1px 0 rgba(255, 255, 255, .5); }
.fx .btn--primary:hover::after { transform: translateX(120%); }
.fx .btn--primary:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* Password show/hide and strength meter (added by app.js) */
.pw-wrap { position: relative; display: block; }
.pw-wrap .input { padding-right: 3.2rem; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: var(--r-sm); background: transparent; color: inherit; opacity: .7; cursor: pointer; }
.pw-toggle:hover, .pw-toggle[aria-pressed="true"] { opacity: 1; color: var(--mint-300); }
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: .45rem; }
.pw-meter i { height: 4px; border-radius: 4px; background: rgba(127, 150, 155, .3); transition: background var(--t-base), box-shadow var(--t-base); }
.pw-meter[data-level="1"] i:nth-child(-n+1) { background: #ff7a6b; }
.pw-meter[data-level="2"] i:nth-child(-n+2) { background: #ffc14d; }
.pw-meter[data-level="3"] i:nth-child(-n+3) { background: var(--cyan-400); }
.pw-meter[data-level="4"] i { background: var(--mint-400); box-shadow: 0 0 10px rgba(79, 224, 182, .6); }
.pw-meter__label { grid-column: 1 / -1; font-size: var(--fs-xs); font-weight: 500; color: var(--muted); }
.fx .pw-meter__label { color: var(--fx-muted); }

/* Auth layout */
.fx-auth__inner { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; max-width: 1180px; margin: 0 auto; padding-inline: clamp(1rem, 3vw, 2rem); }
.fx-auth .fx-card { max-width: 500px; width: 100%; justify-self: end; }
.fx-orbit { position: relative; width: 240px; height: 240px; margin: var(--s-8) 0 var(--s-6); }
.fx-orbit__ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(134, 236, 206, .22); animation: fx-rotate 14s linear infinite; }
.fx-orbit__ring i { position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--mint-400); box-shadow: 0 0 16px 3px rgba(79, 224, 182, .7); }
.fx-orbit__ring--2 { inset: 32px; border-style: dashed; border-color: rgba(56, 198, 232, .3); animation-duration: 9s; animation-direction: reverse; }
.fx-orbit__ring--2 i { background: var(--cyan-400); box-shadow: 0 0 16px 3px rgba(56, 198, 232, .7); }
.fx-orbit__ring--3 { inset: 64px; border-color: rgba(255, 255, 255, .14); animation-duration: 20s; }
.fx-orbit__ring--3 i { width: 6px; height: 6px; top: -3px; margin-left: -3px; background: #fff; }
.fx-orbit__core { position: absolute; inset: 88px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(134, 236, 206, .9), rgba(14, 122, 122, .9) 60%, rgba(10, 47, 58, 1)); box-shadow: 0 0 40px rgba(79, 224, 182, .55), inset 0 0 18px rgba(255, 255, 255, .25); color: #fff; animation: fx-breathe 4s ease-in-out infinite; }
.fx-orbit__core .icon { width: 28px; height: 28px; }
@keyframes fx-rotate { to { transform: rotate(360deg); } }
@keyframes fx-breathe { 50% { transform: scale(1.08); box-shadow: 0 0 60px rgba(79, 224, 182, .75), inset 0 0 18px rgba(255, 255, 255, .25); } }
.fx-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); list-style: none; margin: 0; padding: 0; }
.fx-chips li { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .85rem; border: 1px solid var(--fx-line); border-radius: var(--r-pill); background: rgba(255, 255, 255, .05); font-size: var(--fs-sm); color: var(--fx-text); }
.fx-chips .icon { color: var(--mint-400); }

/* Checkout */
.fx-checkout__head { margin-bottom: var(--s-6); }
.fx-steps { display: flex; flex-wrap: wrap; gap: var(--s-2); list-style: none; margin: 0 0 var(--s-6); padding: 0; counter-reset: s; font-size: var(--fs-sm); color: var(--fx-muted); }
.fx-steps li { display: inline-flex; align-items: center; gap: .5rem; counter-increment: s; }
.fx-steps li::before { content: counter(s); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--fx-line); font-size: 11px; font-weight: 700; }
.fx-steps li:not(:last-child)::after { content: ""; width: 40px; height: 2px; margin-left: .5rem; border-radius: 2px; background: var(--fx-line); }
.fx-steps .is-done::before { content: "✓"; background: rgba(79, 224, 182, .15); border-color: var(--mint-400); color: var(--mint-300); }
.fx-steps .is-done::after { background: linear-gradient(90deg, var(--mint-400), var(--cyan-400)) !important; box-shadow: 0 0 10px rgba(79, 224, 182, .6); }
.fx-steps .is-current { color: #fff; font-weight: 700; }
.fx-steps .is-current::before { background: linear-gradient(135deg, var(--mint-400), var(--cyan-400)); border-color: transparent; color: var(--navy-950); box-shadow: var(--fx-glow); }
.fx-checkout .checkout { padding-top: 0; padding-bottom: 0; }
.fx-checkout .form-section h2 { color: #fff; }
.fx-checkout .step-num { background: linear-gradient(135deg, var(--mint-400), var(--cyan-400)); color: var(--navy-950); box-shadow: 0 0 18px rgba(79, 224, 182, .45); }
.fx-checkout .choice { background: rgba(3, 18, 24, .45); border-color: rgba(255, 255, 255, .12); color: var(--fx-text); transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast); }
.fx-checkout .choice:hover { border-color: rgba(134, 236, 206, .5); color: #fff; transform: translateY(-1px); }
.fx-checkout .choice small { color: var(--fx-muted); }
.fx-checkout .choice .icon { color: var(--mint-400); }
.fx-checkout .choice.is-selected, .fx-checkout .choice:has(input:checked) { background: rgba(79, 224, 182, .1); border-color: var(--mint-400); box-shadow: var(--fx-glow); }
.fx-account { display: grid; gap: var(--s-3); padding: var(--s-5); border: 1px dashed rgba(134, 236, 206, .35); border-radius: var(--r-md); background: rgba(79, 224, 182, .05); }
.fx-account__head { display: flex; gap: .85rem; align-items: flex-start; }
.fx-account__head > .icon { flex: none; width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: rgba(79, 224, 182, .15); color: var(--mint-300); }
.fx-account__head strong { color: #fff; }
.fx-account__head em { font-style: normal; font-weight: 400; color: var(--fx-muted); }
.fx-account__head p { margin: .2rem 0 0; color: var(--fx-muted); }
.fx-signed-in { display: flex; align-items: center; gap: .5rem; margin: 0; padding: .7rem .9rem; border-radius: var(--r-md); background: rgba(79, 224, 182, .1); color: var(--mint-100); font-size: var(--fs-sm); }
.fx-signed-in .icon { flex: none; color: var(--mint-400); }
.fx-signed-in > span { min-width: 0; overflow-wrap: anywhere; }
.fx-checkout .summary h2 { color: #fff; }
.fx-checkout .mini-cart__thumb { background: #fff; border-radius: var(--r-sm); }
.fx-checkout .mini-cart__item { color: var(--fx-text); border-color: var(--fx-line); }
.fx-checkout .summary-row { color: rgba(233, 247, 245, .85); }
.fx-checkout .summary-row--discount { color: var(--mint-300); }
.fx-checkout .summary-row--total { border-top-color: var(--fx-line); color: #fff; font-size: var(--fs-lg); }
.fx-checkout .summary-row--total span:last-child { background: linear-gradient(100deg, var(--mint-400), var(--cyan-400)); -webkit-background-clip: text; background-clip: text; color: transparent; }

@media (max-width: 1080px) {
    .fx-auth__inner { grid-template-columns: 1fr; }
    .fx-auth .fx-card { justify-self: center; }
    .fx-auth__intro { text-align: center; }
    .fx-auth .fx-lead { margin-inline: auto; }
    .fx-orbit { display: none; }
    .fx-chips { justify-content: center; margin-top: var(--s-5); }
}
@media (max-width: 560px) {
    .fx-auth__intro .fx-lead, .fx-chips { display: none; }
    .fx-title { font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
    .fx__orb, .fx__grid, .fx-pulse::after, .fx-gradient-text, .fx-card--glow::before, .fx-panel--glow::before, .fx-orbit__ring, .fx-orbit__core { animation: none !important; }
}

/* ---------- Rich text: admin editor and storefront output ---------- */
.rte { border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface); overflow: hidden; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.rte.is-focused { border-color: var(--teal-500); box-shadow: 0 0 0 4px rgba(18, 145, 141, .15); }
.rte__bar { position: sticky; top: 0; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.rte__btn { min-width: 34px; height: 34px; padding: 0 .55rem; border: 1px solid transparent; border-radius: var(--r-sm); background: transparent; color: var(--navy-900); font: 600 var(--fs-sm) / 1 var(--font-body); cursor: pointer; transition: background var(--t-fast), border-color var(--t-fast); }
.rte__btn:hover { background: var(--surface); border-color: var(--border); }
.rte__btn.is-active { background: var(--teal-50); border-color: var(--teal-500); color: var(--teal-700); }
.rte__btn:disabled { opacity: .4; cursor: default; }
.rte__btn--bold { font-weight: 800; }
.rte__btn--italic { font-style: italic; font-family: Georgia, serif; }
.rte__btn--underline { text-decoration: underline; }
.rte__btn--strikeThrough { text-decoration: line-through; }
.rte__sep { width: 1px; height: 22px; margin: 0 4px; background: var(--border-strong); }
.rte__link { display: flex; gap: var(--s-2); align-items: center; padding: 6px; border-bottom: 1px solid var(--border); background: var(--teal-50); }
.rte__link .input { flex: 1; width: auto; }
.rte__area { min-height: 260px; max-height: 620px; overflow-y: auto; padding: var(--s-4) var(--s-5); outline: none; font-weight: 400; color: var(--text); }
.rte + .input, .rte ~ textarea { margin-top: var(--s-2); }
.rte__count { padding: .35rem .8rem; border-top: 1px solid var(--border); background: var(--surface-2); color: var(--muted); font-size: var(--fs-xs); font-weight: 500; text-align: right; }
.rte__count.is-over { color: var(--danger); }
.rte__area > :first-child, .rich-text > :first-child { margin-top: 0; }
.rte__area h3, .rich-text h3 { margin: 1.2em 0 .4em; font-size: var(--fs-lg); color: var(--navy-900); }
.rte__area h4, .rich-text h4 { margin: 1em 0 .35em; font-size: var(--fs-md); color: var(--navy-900); }
.rte__area p, .rich-text p { margin: 0 0 .8em; }
.rte__area ul, .rte__area ol, .rich-text ul, .rich-text ol { margin: 0 0 .9em; padding-left: 1.4em; }
.rte__area li, .rich-text li { margin: .25em 0; }
.rich-text ul li::marker { color: var(--teal-600); }
.rte__area blockquote, .rich-text blockquote { margin: 1em 0; padding: .6em 1em; border-left: 3px solid var(--mint-400); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--teal-50); color: var(--text-2); }
.rte__area a, .rich-text a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.rich-text { color: var(--text-2); }

/* ==========================================================================
   Luxe layer: storefront polish, best-seller band, promise, bank transfer,
   admin shell, product studio and admin controls
   ========================================================================== */
:root {
    --gold-300: #ecd9a6;
    --gold-500: #c9a45a;
    --lux-shadow: 0 1px 1px rgba(5, 28, 36, .04), 0 14px 30px -10px rgba(5, 28, 36, .16), 0 34px 70px -34px rgba(5, 28, 36, .28);
    --lux-card: 0 1px 2px rgba(5, 28, 36, .04), 0 18px 40px -28px rgba(5, 28, 36, .28);
}

/* ---------- Storefront ---------- */
body.store { background: radial-gradient(1400px 520px at 50% -240px, rgba(18, 145, 141, .09), transparent 70%), #f7f9f9; }
.section__eyebrow { display: inline-flex; align-items: center; gap: .6rem; margin: 0 0 .55rem; font-size: var(--fs-xs); font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--teal-600); }
.section__eyebrow::before { content: ""; width: 26px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--mint-400), var(--cyan-400)); }
.section__eyebrow--light { color: var(--mint-300); }
.section__title { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); letter-spacing: -.03em; line-height: 1.1; }
.section__sub { color: var(--muted); max-width: 62ch; margin: .55rem 0 0; }

.hero__track { height: clamp(540px, 45vw, 620px); border-radius: 32px; box-shadow: 0 44px 90px -44px rgba(5, 28, 36, .6); }
.slide__title { font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.5rem); line-height: 1.04; }
.slide__content { padding-bottom: clamp(5rem, 8vw, 6rem); }
.slide__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); }
.slide__actions .slide__chips { margin: 0; }
.hero__controls { background: rgba(5, 28, 36, .55); border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .5); }
.hero__controls [data-toggle-play] { color: #fff; }
.hero__dot { background: rgba(255, 255, 255, .35); }
.hero__dot.is-active { background: linear-gradient(90deg, var(--mint-400), var(--cyan-400)); }

.cat-card__media { border-radius: 50%; background: radial-gradient(circle at 50% 30%, #fff, #e8f3f2 78%); border-color: rgba(18, 145, 141, .12); box-shadow: inset 0 -12px 30px rgba(18, 145, 141, .07); }
.cat-card:hover .cat-card__media, .cat-card:focus-visible .cat-card__media { box-shadow: 0 0 0 5px rgba(79, 224, 182, .22), var(--lux-shadow); border-color: rgba(79, 224, 182, .6); }
.cat-card__media img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.product-card { border-color: rgba(10, 47, 58, .07); border-radius: 22px; box-shadow: 0 1px 2px rgba(5, 28, 36, .04); }
.product-card:hover { transform: translateY(-6px); box-shadow: var(--lux-shadow); border-color: rgba(18, 145, 141, .25); }
.product-card__media { background: radial-gradient(circle at 50% 35%, #fff, #edf3f4 78%); border-radius: 16px; }
.product-card__title a { color: var(--navy-950); }
.product-card .price__now { font-family: var(--font-display); font-size: 1.15rem; }
.product-card .btn--primary { --btn-bg: var(--navy-900); --btn-bd: var(--navy-900); box-shadow: none; }
.product-card .btn--primary:hover { --btn-bg: var(--teal-600); --btn-bd: var(--teal-600); box-shadow: 0 10px 24px -10px rgba(14, 122, 122, .7); }
.flag--rank { background: linear-gradient(135deg, var(--navy-950), var(--teal-700)); color: var(--mint-300); }
.flag--pick { background: linear-gradient(135deg, #fbf3dc, var(--gold-300)); color: #5b4213; }

/* Best sellers: dark band with period tabs */
.luxe-band { position: relative; isolation: isolate; overflow: hidden; margin-top: clamp(3rem, 6vw, 5rem); padding-block: clamp(3rem, 6vw, 5rem); background: var(--navy-950); color: #e9f7f5; }
.luxe-band__bg { position: absolute; inset: 0; z-index: -1; background: radial-gradient(700px 420px at 8% 0%, rgba(79, 224, 182, .2), transparent 60%), radial-gradient(800px 520px at 100% 100%, rgba(56, 198, 232, .16), transparent 60%); }
.luxe-band__bg::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, #000 20%, transparent 75%); }
.luxe-band .section__title { color: #fff; }
.luxe-band .section__sub { color: #9fbfc0; }
.luxe-band .link-arrow { color: var(--mint-300); }
.luxe-band .round-btn--outline { background: transparent; border-color: rgba(255, 255, 255, .3); color: #fff; }
.rail-controls--end { justify-content: flex-end; margin-bottom: var(--s-4); }
.seg { display: inline-flex; gap: 4px; padding: 5px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(10px); }
.seg__btn { border: 0; background: transparent; color: #cfe6e3; padding: .6rem 1.2rem; border-radius: var(--r-pill); font: 700 var(--fs-sm) / 1 var(--font-body); cursor: pointer; transition: background var(--t-base), color var(--t-base), box-shadow var(--t-base); }
.seg__btn:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.seg__btn.is-active { background: linear-gradient(100deg, var(--mint-400), var(--cyan-400)); color: var(--navy-950); box-shadow: 0 8px 24px rgba(79, 224, 182, .3); }
.seg__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.tab-panel[hidden] { display: none; }
.tab-panel:not([hidden]) .rail { animation: rise 500ms var(--ease) both; }

/* The pharmacy promise */
.promise { padding-top: clamp(3rem, 6vw, 5rem); }
.promise > .container { position: relative; isolation: isolate; overflow: hidden; border-radius: 36px; padding: clamp(2rem, 5vw, 4rem); color: #e9f7f5;
    background: radial-gradient(900px 500px at 0% 0%, rgba(79, 224, 182, .16), transparent 60%), radial-gradient(700px 500px at 100% 100%, rgba(201, 164, 90, .18), transparent 60%), linear-gradient(160deg, #06252d, var(--navy-950));
    box-shadow: 0 50px 100px -50px rgba(5, 28, 36, .65); }
.promise__head { text-align: center; max-width: 720px; margin: 0 auto var(--s-10); }
.promise__head .section__title { color: #fff; }
.promise__head .section__sub { color: #a9c4c4; margin-inline: auto; }
/* flex so a short last row (4 or 5 cards) sits centred */
.promise__grid { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-5); }
.promise__grid > .promise__card { flex: 0 1 calc((100% - 2 * var(--s-5)) / 3); min-width: 0; }
.promise__card { position: relative; padding: var(--s-6); border-radius: 22px; background: linear-gradient(160deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02)); border: 1px solid rgba(255, 255, 255, .1); transition: transform var(--t-base) var(--ease), border-color var(--t-base); }
.promise__card:hover { transform: translateY(-4px); border-color: rgba(134, 236, 206, .4); }
.promise__num { position: absolute; top: .9rem; right: 1.2rem; font-family: var(--font-display); font-size: 2.6rem; font-weight: 800; line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .16); }
.promise__icon { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: var(--s-4); border-radius: 16px; background: linear-gradient(135deg, rgba(79, 224, 182, .25), rgba(56, 198, 232, .12)); color: var(--mint-300); box-shadow: inset 0 0 0 1px rgba(134, 236, 206, .3); }
.promise__card h3 { margin: 0 0 .4rem; color: #fff; font-size: var(--fs-md); }
.promise__card p { margin: 0; color: #a9c4c4; font-size: var(--fs-sm); }
.promise__cta { display: flex; justify-content: center; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-10); }
.btn--glass { --btn-bg: rgba(255, 255, 255, .06); --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, .22); backdrop-filter: blur(8px); }
.btn--glass:hover { --btn-bg: rgba(255, 255, 255, .12); --btn-fg: #fff; }

/* Bank transfer panel on the order page */
.bank-pay { margin: 0 0 var(--s-6); padding: clamp(1.25rem, 3vw, 2rem); border-radius: 24px; color: #e9f7f5;
    background: radial-gradient(600px 300px at 100% 0%, rgba(79, 224, 182, .18), transparent 60%), linear-gradient(160deg, #062029, var(--navy-900)); box-shadow: 0 30px 60px -30px rgba(5, 28, 36, .6); }
.bank-pay__head { display: flex; gap: var(--s-4); align-items: flex-start; margin-bottom: var(--s-5); }
.bank-pay__head h2 { margin: 0 0 .25rem; color: #fff; font-size: var(--fs-lg); }
.bank-pay__head p { margin: 0; color: #a9c4c4; }
.bank-pay__head strong { color: #fff; }
.bank-pay__icon { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: linear-gradient(135deg, var(--mint-400), var(--cyan-400)); color: var(--navy-950); }
.bank-pay__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s-3); margin: 0; }
.bank-pay__grid > div { padding: .85rem 1rem; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.bank-pay__grid dt { margin-bottom: .35rem; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #8fb3b3; }
.bank-pay__grid dd { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: 0; color: #fff; font-weight: 700; font-size: var(--fs-md); overflow-wrap: anywhere; }
.bank-pay__grid .code { padding: 0; background: none; color: #fff; font-size: inherit; }
.bank-pay__ref { grid-column: 1 / -1; background: linear-gradient(100deg, rgba(79, 224, 182, .2), rgba(56, 198, 232, .08)) !important; border-color: rgba(134, 236, 206, .45) !important; }
.bank-pay__ref dd { font-size: 1.45rem; letter-spacing: .04em; }
.bank-pay .btn--ghost { --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, .3); --btn-bg: transparent; }
.bank-pay__note { margin: var(--s-4) 0 0; color: #cfe6e3; font-size: var(--fs-sm); }
.bank-pay__confirm { display: grid; gap: var(--s-3); margin-top: var(--s-5); padding-top: var(--s-5); border-top: 1px solid rgba(255, 255, 255, .1); }
.bank-pay__confirm .field { color: #e9f7f5; }
.bank-pay__confirm .field em, .bank-pay__confirm .muted { color: #8fb3b3; }
.bank-pay__confirm .input { background: rgba(3, 18, 24, .55); border-color: rgba(255, 255, 255, .16); color: #fff; }
.bank-pay__confirm .btn--primary { justify-self: start; --btn-bg: linear-gradient(100deg, var(--mint-400), var(--cyan-400)); --btn-fg: var(--navy-950); --btn-bd: transparent; background: var(--btn-bg); font-weight: 800; }
.bank-pay__done { display: flex; gap: .5rem; align-items: center; margin: var(--s-5) 0 0; padding: .8rem 1rem; border-radius: 14px; background: rgba(79, 224, 182, .12); color: var(--mint-100); }

/* ---------- Admin shell ---------- */
.admin { background: radial-gradient(1100px 520px at 100% -220px, rgba(18, 145, 141, .08), transparent 70%), #f2f5f6; }
@media (min-width: 1081px) {
    .admin-shell { grid-template-columns: 276px minmax(0, 1fr); background: linear-gradient(90deg, #04161c 276px, transparent 276px); }
}
.admin-side { gap: 2px; padding: var(--s-5) var(--s-3) var(--s-4); border-right: 1px solid rgba(255, 255, 255, .04); color: #b8cdd2;
    background: radial-gradient(320px 260px at 0% 0%, rgba(79, 224, 182, .14), transparent 70%), linear-gradient(180deg, #062029 0%, #04161c 100%); scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent; }
.admin-side .brand { padding: 0 var(--s-2) var(--s-4); }
.admin-side .brand__name small { display: block; margin-top: .1rem; font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--mint-300); }
.admin-side__label { margin: var(--s-4) var(--s-3) var(--s-2); color: #4f7179; letter-spacing: .18em; }
.admin-side a, .admin-side summary { display: flex; align-items: center; gap: .75rem; padding: .62rem .8rem; border-radius: 12px; color: #b8cdd2; font-weight: 550; font-size: var(--fs-sm); text-decoration: none !important; cursor: pointer; list-style: none; transition: background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast); }
.admin-side summary::-webkit-details-marker { display: none; }
.admin-side a > span:first-of-type, .admin-side summary > span:first-of-type { flex: 1; min-width: 0; }
.admin-side a:hover, .admin-side summary:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.admin-side a.is-active { background: linear-gradient(100deg, rgba(79, 224, 182, .22), rgba(56, 198, 232, .07)); color: #fff; box-shadow: inset 0 0 0 1px rgba(134, 236, 206, .2), 0 10px 26px -14px rgba(79, 224, 182, .6); }
.admin-side a.is-active .icon { color: var(--mint-400); }
.admin-side summary .icon, .admin-side a .icon { flex: none; width: 18px; height: 18px; }
.admin-side__group[open] > summary { color: #fff; }
.admin-side__chev { width: 14px !important; height: 14px !important; opacity: .6; transition: transform var(--t-base) var(--ease); }
.admin-side__group[open] .admin-side__chev { transform: rotate(180deg); }
.admin-side__sub { display: grid; gap: 2px; margin: 2px 0 6px 1.2rem; padding-left: .6rem; border-left: 1px solid rgba(255, 255, 255, .08); }
.admin-side__sub a { padding: .5rem .7rem; font-size: 13px; }
.admin-side__sub a .icon { width: 15px; height: 15px; }
.admin-side__count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: linear-gradient(135deg, var(--mint-400), var(--cyan-400)); color: var(--navy-950); font-size: 11px; font-weight: 800; }
.admin-side__foot { display: grid; gap: 2px; }
.admin-side__ext { width: 12px !important; height: 12px !important; opacity: .55; }
.admin-side__me { display: flex; align-items: center; gap: .7rem; margin-top: var(--s-3); padding: .65rem; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .06); }
.admin-side__avatar { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: linear-gradient(135deg, var(--mint-400), var(--cyan-400)); color: var(--navy-950); font-weight: 800; font-size: 13px; }
.admin-side__who { flex: 1; display: grid; min-width: 0; line-height: 1.25; }
.admin-side__who strong { color: #fff; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-side__who small { color: #7f9ea4; font-size: 11px; }
.admin-side__me .admin-side__logout { width: auto; padding: .45rem; border-radius: 10px; }
.admin-top { background: rgba(242, 245, 246, .78); backdrop-filter: blur(14px) saturate(140%); border-bottom-color: rgba(10, 47, 58, .06); }
.admin-top h1 { font-size: 1.35rem; letter-spacing: -.02em; }
.admin-top__date { font-size: var(--fs-sm); font-weight: 600; color: var(--muted); }
.admin .panel { border-radius: 20px; border-color: rgba(10, 47, 58, .07); box-shadow: var(--lux-card); }
.admin .table-wrap { border-radius: 18px; border-color: rgba(10, 47, 58, .07); box-shadow: var(--lux-card); }
.admin .table thead th { background: #f7fafa; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.admin .table tbody tr { transition: background var(--t-fast); }
.admin .table tbody tr:hover { background: #f5fbfa; }
.admin-form fieldset { border-radius: 20px; border-color: rgba(10, 47, 58, .07); box-shadow: var(--lux-card); }
.admin .pagination { margin-top: var(--s-4); }
/* dashboard panels with their own pager: pager sits at the bottom so side-by-side panels line up */
.panel--paged { display: flex; flex-direction: column; scroll-margin-top: var(--s-8); }
.panel--paged > .table-wrap { flex: 1 1 auto; }
.pagination--panel { margin: auto 0 0; padding: var(--s-3) var(--s-4); justify-content: flex-end; gap: .25rem; border-top: 1px solid var(--border); }
.admin .pagination--panel { margin-top: auto; }
.pagination--panel .pagination__link { min-width: 32px; height: 32px; padding: 0 .45rem; font-size: var(--fs-xs, .8rem); }
.table td.cell-wrap { min-width: 220px; overflow-wrap: anywhere; }
/* Most wanted (best sellers) admin page */
.mw-hero { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-5); padding: clamp(1.5rem, 3vw, 2.25rem); border-radius: 24px; color: #e9f7f5;
    background: radial-gradient(520px 300px at 0% 0%, rgba(79, 224, 182, .24), transparent 60%), radial-gradient(480px 320px at 100% 100%, rgba(201, 164, 90, .2), transparent 60%), linear-gradient(135deg, #062029, var(--navy-950));
    box-shadow: 0 30px 60px -30px rgba(5, 28, 36, .6); }
.mw-hero__text { max-width: 640px; }
.mw-hero__eyebrow { display: inline-flex; align-items: center; gap: .4rem; margin: 0; font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--mint-300); }
.mw-hero__title { margin: .3rem 0 .5rem; color: #fff; font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.3rem); letter-spacing: -.03em; }
.mw-hero__sub { margin: 0; color: #a9c4c4; }
.mw-hero__side { display: grid; justify-items: end; gap: var(--s-3); }
.mw-hero .btn--ghost { --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, .25); --btn-bg: rgba(255, 255, 255, .04); }
.mw-status { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .9rem; border-radius: var(--r-pill); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); font-size: var(--fs-sm); font-weight: 700; color: #cfe6e3; }
.mw-status__dot { width: 8px; height: 8px; border-radius: 50%; background: #8fa3a6; }
.mw-status.is-on { color: var(--mint-100); border-color: rgba(134, 236, 206, .4); }
.mw-status.is-on .mw-status__dot { background: var(--mint-400); box-shadow: 0 0 10px var(--mint-400); }
.mode-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
.mode-card { position: relative; display: block; cursor: pointer; }
.mode-card input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.mode-card__body { display: grid; gap: .3rem; height: 100%; padding: var(--s-4) var(--s-4) var(--s-4) var(--s-4); border: 1.5px solid var(--border); border-radius: 16px; background: #fbfdfd; transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast); }
.mode-card__body strong { color: var(--navy-950); font-size: var(--fs-base); }
.mode-card__body small { color: var(--muted); font-size: var(--fs-xs); line-height: 1.5; }
.mode-card__icon { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: .2rem; border-radius: 12px; background: var(--teal-50); color: var(--teal-700); }
.mode-card__body::after { content: ""; position: absolute; top: 14px; right: 14px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-strong); background: #fff; transition: all var(--t-fast); }
.mode-card:hover .mode-card__body { border-color: var(--teal-500); }
.mode-card input:checked + .mode-card__body { border-color: var(--teal-500); background: linear-gradient(160deg, #f1fbf8, #e6f6f2); box-shadow: 0 0 0 4px rgba(79, 224, 182, .15); }
.mode-card input:checked + .mode-card__body::after { border-color: var(--teal-600); background: radial-gradient(circle, var(--teal-600) 0 4px, #fff 5px); }
.mode-card input:checked + .mode-card__body .mode-card__icon { background: linear-gradient(135deg, var(--mint-400), var(--cyan-400)); color: var(--navy-950); }
.mode-card input:focus-visible + .mode-card__body { outline: 3px solid var(--focus); outline-offset: 2px; }
.admin-form fieldset.chips-field { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.admin-form fieldset.chips-field legend { font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); }
.mw-live__period { padding: var(--s-3) 0; border-top: 1px solid var(--border); }
.mw-live__period h3 { margin: 0 0 .4rem; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .08em; color: var(--teal-700); }
.mw-live__period p { margin: 0; }
.mw-live__list { margin: 0; padding-left: 1.1rem; display: grid; gap: .3rem; font-size: var(--fs-sm); }
.mw-live__list li { padding-left: .2rem; }
.mw-live__list li span:first-child { font-weight: 600; margin-right: .4rem; }
.mw-empty { display: flex; align-items: center; gap: .7rem; padding: var(--s-4); margin-bottom: var(--s-4); border: 1px dashed var(--border-strong); border-radius: 14px; color: var(--muted); }
.mw-empty p { margin: 0; }
.mw-empty .icon { color: var(--teal-600); }
.mw-add { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-3); margin-top: var(--s-2); }
.mw-add .field { flex: 1 1 320px; }
.mw-link { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-5); border-radius: 20px; text-decoration: none !important; color: #e9f7f5;
    background: radial-gradient(400px 200px at 0% 0%, rgba(79, 224, 182, .2), transparent 60%), linear-gradient(135deg, #062029, var(--navy-900)); box-shadow: var(--lux-card); transition: transform var(--t-base) var(--ease), box-shadow var(--t-base); }
.mw-link:hover { transform: translateY(-2px); box-shadow: var(--lux-shadow); color: #fff; }
.mw-link__icon { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(135deg, var(--mint-400), var(--cyan-400)); color: var(--navy-950); }
.mw-link__text { flex: 1; display: grid; gap: .2rem; min-width: 0; }
.mw-link__text strong { color: #fff; font-size: var(--fs-md); }
.mw-link__text span { color: #a9c4c4; font-size: var(--fs-sm); }
.mw-link__go { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); color: #fff; }
@media (max-width: 560px) {
    .mode-grid { grid-template-columns: 1fr; }
    .mw-hero__side { justify-items: start; }
}
/* Form fields keep their natural height when a card is stretched to match its neighbour; inputs in one row line up even when a label wraps. */
.admin-form fieldset { align-content: start; }
.admin-form .form-grid { align-items: stretch; align-content: start; }
.admin-form .form-grid > .field { grid-template-rows: 1fr auto; }
.admin-form .form-grid > .field > span { align-self: end; }
.admin-form .form-grid > .check { align-self: end; align-items: center; min-height: 44px; }
.admin-form .form-grid > .check input { margin-top: 0; }
/* Inputs never push past their column (date/time pickers have a wide built-in minimum). */
.field > *, .form-grid > * { min-width: 0; }
.input { min-width: 0; }
input.input[type="datetime-local"], input.input[type="date"] { font-size: var(--fs-sm); padding-inline: .7rem .55rem; }

/* Admin controls: switch, chip checkboxes, picks list */
.switch { position: relative; display: inline-flex; align-items: center; gap: .75rem; cursor: pointer; }
.switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch__track { position: relative; flex: none; width: 46px; height: 26px; border-radius: var(--r-pill); background: #cfd9db; transition: background var(--t-base); }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform var(--t-base) var(--ease); }
.switch input:checked + .switch__track { background: linear-gradient(100deg, var(--teal-600), var(--mint-400)); }
.switch input:checked + .switch__track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { outline: 3px solid var(--focus); outline-offset: 2px; }
.chips-field { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; border: 0; }
.chips-field legend { float: left; width: 100%; margin-bottom: .45rem; padding: 0; font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); }
.chip-check { position: relative; cursor: pointer; }
.chip-check input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.chip-check span { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .95rem; border: 1px solid var(--border-strong); border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); transition: all var(--t-fast); }
.chip-check span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.chip-check input:checked + span { border-color: var(--teal-500); background: var(--teal-50); color: var(--teal-700); }
.chip-check input:checked + span::before { background: var(--mint-400); box-shadow: 0 0 8px var(--mint-400); }
.chip-check input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.panel--feature { box-shadow: 0 0 0 1px rgba(79, 224, 182, .35), var(--lux-card); }
.panel__sub { margin: var(--s-6) 0 var(--s-3); font-size: var(--fs-base); }
.pick-list { display: grid; gap: .5rem; margin: 0 0 var(--s-3); padding: 0; list-style: none; }
.pick-list__item { display: grid; grid-template-columns: 48px minmax(0, 1fr) 90px auto; gap: var(--s-3); align-items: center; padding: .6rem .8rem; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
.pick-list__item img { width: 48px; height: 48px; border-radius: 10px; object-fit: contain; background: var(--well); }
.pick-list__item > div { display: grid; min-width: 0; }
.pick-list__item form { margin: 0; }
.size-admin-list { display: grid; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.size-admin-list__item { display: flex; justify-content: space-between; align-items: center; gap: var(--s-2); padding: .5rem .7rem; border: 1px solid var(--border); border-radius: var(--r-sm); font-size: var(--fs-sm); }
.size-admin-list__item.is-main { background: var(--teal-50); border-color: var(--teal-100); }
.app-icon-current { display: flex; align-items: center; gap: var(--s-3); grid-column: 1 / -1; }
.app-icon-current img { width: 64px; height: 64px; border-radius: 16px; border: 1px solid var(--border); object-fit: cover; }
/* Settings tabs: fieldsets are display:grid, so [hidden] needs restating. Favicon preview sits beside its upload field. */
.admin-form [data-settings-panel][hidden] { display: none; }
.favicon-field { display: flex; align-items: flex-end; gap: var(--s-3); }
.favicon-field > img { flex: none; width: 40px; height: 40px; padding: 4px; margin-bottom: 4px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); object-fit: contain; }
.favicon-field > .field { flex: 1; min-width: 0; }
.settings-sub { display: grid; gap: var(--s-3); margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px dashed var(--border-strong); }
.settings-sub h3 { margin: 0; font-size: var(--fs-base); }

/* ---------- Product studio ---------- */
.studio-head { position: relative; overflow: hidden; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s-5); align-items: center; padding: var(--s-6); border-radius: 24px; color: #e9f7f5;
    background: radial-gradient(600px 300px at 0% 0%, rgba(79, 224, 182, .22), transparent 60%), radial-gradient(500px 300px at 100% 100%, rgba(56, 198, 232, .18), transparent 60%), linear-gradient(135deg, #062029, var(--navy-900));
    box-shadow: 0 30px 60px -30px rgba(5, 28, 36, .6); }
.studio-head__media { display: grid; place-items: center; width: 96px; height: 96px; border-radius: 22px; background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .08); overflow: hidden; }
.studio-head__media img { width: 84%; height: 84%; object-fit: contain; }
.studio-head__eyebrow { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--mint-300); }
.studio-head__title { margin: .2rem 0 .45rem; color: #fff; font-size: clamp(1.4rem, 1rem + 1.4vw, 2rem); letter-spacing: -.02em; overflow-wrap: anywhere; }
.studio-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .9rem; margin: 0; color: #a9c4c4; font-size: var(--fs-sm); }
.studio-head .code { background: rgba(255, 255, 255, .08); color: #e9f7f5; }
.studio-head__side { display: grid; justify-items: end; gap: var(--s-3); }
.studio-head .btn--ghost { --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, .25); --btn-bg: rgba(255, 255, 255, .04); }
.meter { display: flex; align-items: center; gap: .7rem; }
.meter__ring { position: relative; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: conic-gradient(var(--mint-400) calc(var(--pct, 0) * 1%), rgba(255, 255, 255, .12) 0); transition: background var(--t-base); }
.meter__ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #082a33; }
.meter__value { position: relative; color: #fff; font-size: 13px; font-weight: 800; }
.meter__label { max-width: 72px; color: #a9c4c4; font-size: var(--fs-xs); font-weight: 600; line-height: 1.2; }
.studio-nav { position: sticky; top: 68px; z-index: 20; display: flex; flex-wrap: wrap; gap: .3rem; width: fit-content; max-width: 100%; padding: .4rem; border: 1px solid rgba(10, 47, 58, .08); border-radius: var(--r-pill); background: rgba(255, 255, 255, .85); backdrop-filter: blur(12px); box-shadow: 0 10px 30px -18px rgba(5, 28, 36, .35); }
.studio-nav a { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; border-radius: var(--r-pill); color: var(--navy-900); font-size: var(--fs-sm); font-weight: 600; text-decoration: none !important; transition: background var(--t-fast), color var(--t-fast); }
.studio-nav a:hover { background: var(--teal-50); color: var(--teal-700); }
.studio-card { padding: var(--s-6) !important; border-radius: 22px !important; scroll-margin-top: 140px; }
.studio-card legend { float: left; display: flex; align-items: center; gap: .65rem; width: 100%; margin-bottom: var(--s-1); padding: 0; font-size: var(--fs-md); }
.studio-card__num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: linear-gradient(135deg, var(--navy-950), var(--teal-700)); color: var(--mint-300); font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.studio .input { min-height: 46px; border-radius: 12px; background: #fbfdfd; }
.studio textarea.input { min-height: 0; }
.studio .input:focus { background: #fff; }
.studio .sticky-actions { padding: .6rem; border-radius: 18px; background: rgba(255, 255, 255, .85); backdrop-filter: blur(12px); border: 1px solid rgba(10, 47, 58, .08); box-shadow: var(--lux-card); }
.dropzone { position: relative; display: grid; justify-items: center; gap: .4rem; padding: var(--s-8) var(--s-5); border: 2px dashed rgba(18, 145, 141, .3); border-radius: 18px; background: linear-gradient(160deg, #f6fbfa, #eef6f5); text-align: center; cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast); }
.dropzone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone:hover, .dropzone.is-over { border-color: var(--teal-500); background: #e9f6f3; box-shadow: 0 0 0 6px rgba(79, 224, 182, .12); }
.dropzone:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.dropzone.has-files { border-style: solid; border-color: var(--mint-400); }
.dropzone__icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: linear-gradient(135deg, var(--mint-400), var(--cyan-400)); color: var(--navy-950); box-shadow: 0 10px 24px -10px rgba(79, 224, 182, .8); }
.dropzone__title { color: var(--navy-900); font-weight: 700; }
.dropzone__title u { color: var(--teal-600); }
.dropzone__hint { color: var(--muted); font-size: var(--fs-xs); }
.dropzone__files { color: var(--teal-700); font-size: var(--fs-sm); font-weight: 600; }

@media (max-width: 1080px) {
    .admin-side { width: 290px; }
    .promise__grid > .promise__card { flex-basis: calc((100% - var(--s-5)) / 2); }
    .studio-head { grid-template-columns: auto minmax(0, 1fr); }
    .studio-head__side { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
}
@media screen and (max-width: 820px) {
    .hero__track { min-height: 640px; }
    .slide__content { padding-bottom: 0; }
    .seg { max-width: 100%; overflow-x: auto; }
    .studio-nav { position: static; border-radius: 16px; }
    .pick-list__item { grid-template-columns: 48px minmax(0, 1fr) auto; }
    .pick-list__order { grid-column: 2; }
    .sort-list--sections li { grid-template-columns: minmax(0, 1fr); }
    .sort-list--sections li > .badge { justify-self: start; }
    .sort-list--sections li > :last-child { grid-column: auto; }
    .admin .row-between { flex-wrap: wrap; }
    .admin .row-between > p { flex: 1 1 260px; margin: 0; }
    .table--stack td:not([data-label]) { display: block; }
    /* Stacked rows: the label sits in a fixed left column and the value wraps beside it, so no cell can widen the table. */
    .table--stack, .table--stack tbody { display: block; width: 100%; }
    .table--stack tr { grid-template-columns: minmax(0, 1fr); }
    .table--stack td[data-label] { position: relative; display: block; min-height: 1.9rem; padding: .3rem 1rem .3rem calc(1rem + 7.5rem); overflow-wrap: anywhere; }
    .table--stack td[data-label]::before { position: absolute; left: 1rem; top: .3rem; width: 7rem; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; line-height: 1.9; }
    .table--stack td .code, .table--stack td .nowrap { white-space: normal; }
    .table--stack td .btn-row { justify-content: flex-start; }
    .table--stack td.num { text-align: left; }
    .table--stack td .input { width: 100%; max-width: 160px; }
    .admin-top__date { display: none; }
    .admin-top h1 { font-size: 1.15rem; line-height: 1.25; overflow-wrap: anywhere; }
    .filter-bar > .field { flex: 1 1 100%; }
    .filter-bar .input { width: 100%; min-width: 0; }
}
@media (max-width: 560px) {
    .promise__grid > .promise__card { flex-basis: 100%; }
    .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5) var(--s-4); }
    .promise > .container { border-radius: 24px; }
    .studio-head { grid-template-columns: 1fr; }
    .studio-head__media { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}

@media print {
    .site-header, .site-footer, .announcement, .drawer, .toast-region, .install-prompt, .admin-side, .admin-top { display: none !important; }
    body { background: #fff; }
}

/* ---------- API & integrations (admin/api-clients) ---------- */
.page-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-5); }
.page-intro__kicker { display: inline-flex; align-items: center; gap: .35rem; margin: 0 0 .35rem; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-700); }
.page-intro__title { font-size: 1.35rem; margin: 0 0 .3rem; }
.page-intro p.muted { margin: 0; max-width: 62ch; }
.api-state { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .9rem; border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 700; border: 1px solid var(--border); background: var(--surface); }
.api-state i { width: 9px; height: 9px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 4px var(--danger-bg); }
.api-state.is-on { color: var(--success); }
.api-state.is-on i { background: var(--success); box-shadow: 0 0 0 4px var(--success-bg); }
.api-state.is-off { color: var(--danger); }
.kpis--compact { margin-bottom: var(--s-5); }
.kpis--compact .kpi { padding: var(--s-4) var(--s-5); }
.kpi__value--sm { font-size: 1.15rem; }

.page-tabs { display: flex; gap: var(--s-1); box-shadow: inset 0 -1px 0 var(--border); margin-bottom: var(--s-5); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.page-tabs::-webkit-scrollbar { display: none; }
.page-tabs a { display: inline-flex; align-items: center; gap: .45rem; padding: .8rem 1.1rem; border-bottom: 2px solid transparent; color: var(--text-2); font-weight: 600; font-size: var(--fs-sm); white-space: nowrap; text-decoration: none !important; transition: color var(--t-fast), border-color var(--t-fast); }
.page-tabs a:hover { color: var(--teal-700); }
.page-tabs a.is-active { color: var(--navy-900); border-bottom-color: var(--teal-700); }
.page-tabs a span { min-width: 22px; padding: .05rem .45rem; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); font-size: var(--fs-xs); text-align: center; }
.page-tabs a.is-active span { background: var(--teal-50); color: var(--teal-700); }

.panel__head--tools { padding: var(--s-4) var(--s-5); margin: 0; border-bottom: 1px solid var(--border); justify-content: flex-start; flex-wrap: wrap; gap: var(--s-3); }
.panel__head--tools .status-tabs { margin-right: auto; }
.panel-search { position: relative; display: flex; align-items: center; }
.panel-search .icon { position: absolute; left: .7rem; color: var(--muted); pointer-events: none; }
.panel-search .input { padding-left: 2.1rem; width: 240px; }
.panel-select .input { min-width: 200px; }

.api-keys td { vertical-align: middle; }
.api-keys tr.is-muted td { color: var(--muted); }
.api-keys tr.is-muted strong { color: var(--text-2); }
.api-key__name { display: flex; align-items: center; gap: .75rem; }
.api-key__name > div { display: grid; gap: .1rem; }
.api-key__icon { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; flex: none; background: linear-gradient(145deg, var(--teal-50), var(--teal-100)); color: var(--teal-700); }
.api-key__icon.is-off { background: var(--surface-2); color: var(--muted); }
.code--key { font-size: var(--fs-xs); padding: .25rem .5rem; white-space: nowrap; }
.access-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .2rem; }
.access-tag { display: inline-flex; align-items: center; padding: .15rem .55rem; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; }
.access-tag--preset { background: linear-gradient(145deg, var(--navy-900), var(--teal-700)); color: #fff; }
.access-tag--write { background: var(--warning-bg); color: var(--warning); }
.access-tag--read { background: var(--info-bg); color: var(--info); }

.pager-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; padding: var(--s-3) var(--s-5); border-top: 1px solid var(--border); margin-top: auto; }
.pager-bar__summary { font-size: var(--fs-sm); color: var(--muted); font-variant-numeric: tabular-nums; }
.pager-bar .pagination, .pager-bar .pagination--panel { padding: 0; border: 0; margin: 0; }

.token-card { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: var(--s-6); margin-bottom: var(--s-5); color: #d9f4ec; background: radial-gradient(120% 140% at 100% 0, rgba(79, 224, 182, .18), transparent 55%), linear-gradient(145deg, var(--navy-950), var(--navy-900)); box-shadow: var(--shadow-md); }
.token-card__head { display: flex; gap: var(--s-4); align-items: flex-start; }
.token-card__head h2 { color: #fff; margin: 0 0 .25rem; font-size: var(--fs-md); }
.token-card__head p { margin: 0; color: #a9cfcb; }
.token-card__head strong { color: #fff; }
.token-card__icon { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; flex: none; background: rgba(79, 224, 182, .15); color: var(--mint-300); }
.token-card__box { display: flex; align-items: center; gap: var(--s-3); margin: var(--s-5) 0 var(--s-4); padding: .75rem .75rem .75rem 1rem; border-radius: var(--r-md); background: rgba(0, 0, 0, .28); border: 1px solid rgba(134, 236, 206, .25); }
.token-card__box code { flex: 1; font-family: ui-monospace, Consolas, monospace; font-size: .95rem; color: var(--mint-300); word-break: break-all; }
.token-card__next { margin: 0; padding-left: 1.2rem; display: grid; gap: .3rem; font-size: var(--fs-sm); color: #bfe0dc; }
.token-card__next strong { color: #fff; }

.api-create { padding: 0; }
.api-create__step { display: flex; gap: var(--s-4); padding: var(--s-5) var(--s-6); border-bottom: 1px solid var(--border); }
.api-create__num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex: none; background: var(--navy-900); color: #fff; font-weight: 800; font-size: var(--fs-sm); }
.api-create__body { flex: 1; min-width: 0; }
.api-create__body h2 { font-size: var(--fs-md); margin: .2rem 0 .25rem; }
.api-create__body > p.muted { margin: 0 0 var(--s-3); }
.api-create__body .field { margin-top: var(--s-3); }
.api-create__actions { display: flex; justify-content: flex-end; gap: var(--s-3); padding: var(--s-4) var(--s-6); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.preset-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--s-3); margin-top: var(--s-3); }
.preset-card { position: relative; cursor: pointer; }
.preset-card input { position: absolute; opacity: 0; pointer-events: none; }
.preset-card__body { display: grid; align-content: start; gap: .3rem; height: 100%; padding: var(--s-4); border: 1.5px solid var(--border); border-radius: var(--r-md); background: var(--surface); transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast); }
.preset-card__body strong { display: flex; align-items: center; gap: .4rem; color: var(--navy-900); }
.preset-card:hover .preset-card__body { border-color: var(--teal-500); }
.preset-card input:checked + .preset-card__body { border-color: var(--teal-700); background: var(--teal-50); box-shadow: 0 0 0 3px rgba(11, 95, 99, .12); }
.preset-card input:focus-visible + .preset-card__body { outline: 2px solid var(--teal-700); outline-offset: 2px; }
.preset-card__count { justify-self: start; margin-top: .2rem; padding: .1rem .5rem; border-radius: var(--r-pill); background: var(--surface-2); font-size: var(--fs-xs); font-weight: 700; color: var(--text-2); }
.scope-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s-3); }
.scope-group { margin: 0; padding: var(--s-3) var(--s-4) var(--s-2); border: 1px solid var(--border); border-radius: var(--r-md); }
.scope-group legend { padding: 0 .35rem; font-size: var(--fs-xs); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.scope { display: flex; gap: .65rem; align-items: flex-start; padding: .55rem 0; cursor: pointer; }
.scope + .scope { border-top: 1px dashed var(--border); }
.scope input { margin-top: .2rem; width: 17px; height: 17px; accent-color: var(--teal-700); flex: none; }
.scope__text { display: grid; gap: .15rem; }
.scope__name { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.api-aside { display: grid; align-content: start; gap: var(--s-4); }
.api-aside h2 { display: flex; align-items: center; gap: .45rem; font-size: var(--fs-md); margin: 0 0 var(--s-3); }
.steps-list { margin: 0 0 var(--s-3); padding-left: 1.2rem; display: grid; gap: .45rem; font-size: var(--fs-sm); }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; font-size: var(--fs-sm); }
.check-list li { position: relative; padding-left: 1.5rem; }
.check-list li::before { content: ""; position: absolute; left: 0; top: .3rem; width: 14px; height: 14px; border-radius: 50%; background: var(--teal-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b5f63' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4L18 8'/%3E%3C/svg%3E") center / 10px no-repeat; }
@media (max-width: 720px) {
    .panel-search .input { width: 100%; }
    .panel-search, .panel-select { flex: 1 1 100%; }
    .api-create__step { padding: var(--s-4); }
    .api-create__actions { padding: var(--s-4); }
}
.kpis--compact { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.api-keys td[data-label="Last used"], .api-keys td[data-label="Status"] { white-space: nowrap; }
.api-keys td[data-label="Last used"] .small { white-space: nowrap; }

.grant-toggle { margin: 0; }
.grant-toggle__btn { display: inline-flex; align-items: center; gap: .5rem; padding: .2rem .65rem .2rem .25rem; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface); font: inherit; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); cursor: pointer; }
.grant-toggle__btn i { position: relative; width: 30px; height: 18px; border-radius: var(--r-pill); background: var(--border-strong); transition: background var(--t-fast); }
.grant-toggle__btn i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-xs); transition: transform var(--t-fast); }
.grant-toggle__btn.is-on { color: var(--teal-700); border-color: var(--teal-100); background: var(--teal-50); }
.grant-toggle__btn.is-on i { background: var(--teal-700); }
.grant-toggle__btn.is-on i::after { transform: translateX(12px); }
.grant-toggle__btn:focus-visible { outline: 2px solid var(--teal-700); outline-offset: 2px; }

/* ---------- website till ---------- */
.till-today { display: grid; justify-items: end; gap: .1rem; padding: .7rem 1.1rem; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); }
.till-today span { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.till-today strong { font-family: var(--font-display); font-size: 1.35rem; color: var(--navy-900); }
.till-today small { color: var(--muted); }
.till { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(340px, 1fr); gap: var(--s-5); align-items: start; margin-bottom: var(--s-5); }
.till__pick { display: grid; gap: var(--s-4); }
.till__search { position: relative; display: flex; align-items: center; }
.till__search .icon { position: absolute; left: .9rem; color: var(--muted); pointer-events: none; }
.till__search .input { padding: .85rem 1rem .85rem 2.6rem; font-size: var(--fs-md); }
.till__results { display: grid; grid-auto-rows: max-content; align-content: start; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--s-3); max-height: 62vh; overflow-y: auto; padding: 2px; }
.till-product { position: relative; min-width: 0; overflow: hidden; overflow-wrap: anywhere; display: grid; gap: .25rem; align-content: start; text-align: left; padding: var(--s-3) var(--s-4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); font: inherit; color: inherit; cursor: pointer; transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast); }
.till-product:hover { border-color: var(--teal-500); box-shadow: var(--shadow-sm); }
.till-product:active { transform: scale(.98); }
.till-product:focus-visible { outline: 2px solid var(--teal-700); outline-offset: 2px; }
.till-product__name { font-weight: 700; color: var(--navy-900); line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.till-product__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .1rem .5rem; margin-top: auto; padding-top: .2rem; }
.till-product__flag { order: -1; justify-self: start; padding: .05rem .4rem; border-radius: var(--r-pill); background: var(--warning-bg); color: var(--warning); font-size: var(--fs-xs); font-weight: 800; }
.text-warning { color: var(--warning); font-weight: 700; }
.till__cart { position: sticky; top: var(--s-4); display: grid; gap: var(--s-4); }
.till__cart-head { display: flex; justify-content: space-between; align-items: center; }
.till__cart-head h2 { margin: 0; font-size: var(--fs-md); }
.till__lines { display: grid; gap: var(--s-2); max-height: 38vh; overflow-y: auto; }
.till__empty { display: grid; justify-items: center; gap: .3rem; padding: var(--s-6) var(--s-4); border: 1.5px dashed var(--border); border-radius: var(--r-md); color: var(--muted); text-align: center; }
.till__empty p { margin: 0; }
.till-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--s-3); align-items: center; padding: .6rem .7rem; border-radius: var(--r-sm); background: var(--surface-2); }
.till-line__name { display: grid; min-width: 0; }
.till-line__name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.till-line__qty { display: flex; align-items: center; gap: .25rem; }
.till-line__qty .input { width: 3.4rem; text-align: center; padding-inline: .2rem; }
.till-line__btn { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); font-weight: 800; color: var(--navy-900); cursor: pointer; }
.till-line__btn:hover { border-color: var(--teal-700); color: var(--teal-700); }
.till-line__total { min-width: 4.5rem; text-align: right; font-variant-numeric: tabular-nums; }
.till__totals { margin: 0; display: grid; gap: .35rem; padding-top: var(--s-3); border-top: 1px solid var(--border); }
.till__totals div { display: flex; justify-content: space-between; }
.till__totals dt { color: var(--muted); }
.till__totals dd { margin: 0; font-variant-numeric: tabular-nums; }
.till__total dt, .till__total dd { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; color: var(--navy-900); }
.till__pay { margin: 0; padding: 0; border: 0; display: grid; gap: var(--s-3); }
.till__pay legend { font-size: var(--fs-xs); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s-2); }
.till__methods { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-2); }
.till__method { position: relative; cursor: pointer; }
.till__method input { position: absolute; opacity: 0; }
.till__method span { display: block; padding: .6rem .3rem; text-align: center; border: 1.5px solid var(--border); border-radius: var(--r-sm); font-weight: 700; font-size: var(--fs-sm); }
.till__method input:checked + span { border-color: var(--teal-700); background: var(--teal-50); color: var(--teal-700); }
.till__method input:focus-visible + span { outline: 2px solid var(--teal-700); outline-offset: 2px; }
.till__cash { display: grid; grid-template-columns: 1fr auto; gap: var(--s-3); align-items: end; }
.till__cash[hidden] { display: none; }
.till__change { margin: 0 0 .6rem; color: var(--muted); }
.till__change strong { color: var(--success); font-size: 1.1rem; }
.till__more summary { cursor: pointer; font-weight: 600; color: var(--teal-700); }
.till__more .form-grid { margin-top: var(--s-3); }
.till-receipt { margin-bottom: var(--s-5); border: 1px solid var(--success); }
.till-receipt__head { display: flex; gap: var(--s-4); align-items: center; flex-wrap: wrap; }
.till-receipt__head h2 { margin: 0; font-size: var(--fs-md); }
.till-receipt__head p { margin: 0; }
.till-receipt__icon { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--success-bg); color: var(--success); }
.till-receipt__actions { margin-left: auto; display: flex; gap: var(--s-2); }
.till-receipt__lines { width: 100%; margin-top: var(--s-4); border-collapse: collapse; font-variant-numeric: tabular-nums; }
.till-receipt__lines td { padding: .35rem 0; border-bottom: 1px dashed var(--border); }
.till-receipt__total td { font-weight: 800; font-size: 1.1rem; border-bottom: 0; padding-top: .6rem; }
.till-receipt__change td { color: var(--success); font-weight: 700; border-bottom: 0; }
@media (max-width: 1000px) { .till { grid-template-columns: 1fr; } .till__cart { position: static; } }
@media (max-width: 560px) { .till__results { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); max-height: 52vh; } .till-product { padding: var(--s-3); } .till__methods { grid-template-columns: repeat(2, 1fr); } .till-today { justify-items: start; } }
@media print {
    body:has(.till-receipt) * { visibility: hidden; }
    .till-receipt, .till-receipt * { visibility: visible; }
    .till-receipt { position: absolute; inset: 0 auto auto 0; width: 80mm; border: 0; box-shadow: none; }
    .till-receipt__actions { display: none; }
}

/* ==========================================================================
   Admin on phones and tablets: an app-style shell (tab bar, drawer, chip rows, folded filters, card lists)
   ========================================================================== */
.admin-tabbar, .admin-top__avatar { display: none; }
.admin-scrim { position: fixed; inset: 0; z-index: 95; background: rgba(4, 22, 28, .5); backdrop-filter: blur(3px); animation: fade-in var(--t-fast) var(--ease); }
.admin-scrim[hidden] { display: none; }
@keyframes fade-in { from { opacity: 0; } }
.filter-bar__toggle { display: none; }
.filter-bar__toggle b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--r-pill); background: var(--teal-600); color: #fff; font-size: 11px; }
.admin .table-wrap { scrollbar-width: thin; }

@media (max-width: 1080px) {
    body.admin { padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
    body.menu-open { overflow: hidden; }
    .admin-side { width: min(320px, 86vw); z-index: 100; padding-top: calc(var(--s-5) + env(safe-area-inset-top)); padding-bottom: calc(var(--s-4) + env(safe-area-inset-bottom)); border-radius: 0 24px 24px 0; }
    .admin-menu-btn { display: none !important; }
    .admin-top { padding-top: calc(.7rem + env(safe-area-inset-top)); padding-inline: max(1rem, env(safe-area-inset-left)) max(1rem, env(safe-area-inset-right)); }
    .admin-top__avatar { order: 3; flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: linear-gradient(135deg, var(--mint-400), var(--cyan-400)); color: var(--navy-950); font-weight: 800; font-size: 13px; box-shadow: 0 6px 16px -8px rgba(18, 145, 141, .7); }
    .admin-top > .row-between { flex: 1; min-width: 0; }
    .admin-tabbar { position: fixed; inset: auto 0 0 0; z-index: 90; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
        padding: .4rem max(.5rem, env(safe-area-inset-left)) calc(.4rem + env(safe-area-inset-bottom)) max(.5rem, env(safe-area-inset-right));
        background: rgba(255, 255, 255, .9); backdrop-filter: blur(18px) saturate(160%); border-top: 1px solid rgba(10, 47, 58, .08); box-shadow: 0 -12px 30px -20px rgba(5, 28, 36, .35); }
    .admin-tabbar a, .admin-tabbar button { display: grid; justify-items: center; gap: .15rem; min-height: 54px; padding: .25rem .2rem; border: 0; border-radius: 14px; background: none; color: #5d7479; font: inherit; font-size: 11px; font-weight: 650; letter-spacing: .01em; text-decoration: none !important; cursor: pointer; -webkit-tap-highlight-color: transparent; }
    .admin-tabbar a > span:last-child, .admin-tabbar button > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .admin-tabbar__icon { position: relative; display: grid; place-items: center; width: 56px; height: 30px; border-radius: var(--r-pill); transition: background var(--t-fast), color var(--t-fast); }
    .admin-tabbar__icon .icon { width: 22px; height: 22px; }
    .admin-tabbar__icon b { position: absolute; top: -3px; right: 6px; display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill); background: #e5484d; color: #fff; font-size: 10px; font-weight: 800; box-shadow: 0 0 0 2px #fff; }
    .admin-tabbar a.is-active { color: var(--navy-950); }
    .admin-tabbar a.is-active .admin-tabbar__icon { background: linear-gradient(100deg, rgba(79, 224, 182, .35), rgba(56, 198, 232, .2)); color: var(--teal-700); }
    .admin-tabbar a:active .admin-tabbar__icon, .admin-tabbar button:active .admin-tabbar__icon { background: rgba(10, 47, 58, .08); }
    .admin .toast-region { bottom: calc(84px + env(safe-area-inset-bottom)); }
    .admin .sticky-actions { bottom: calc(74px + env(safe-area-inset-bottom)); }
}

@media screen and (max-width: 820px) {
    .admin-content { gap: var(--s-4); padding: .85rem max(.85rem, env(safe-area-inset-left)) var(--s-6) max(.85rem, env(safe-area-inset-right)); }
    .admin-top { flex-wrap: wrap; gap: .5rem .75rem; }
    .admin-top h1 { font-size: 1.25rem; }
    .admin-top__actions { order: 4; flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -.25rem; padding: 0 .25rem .1rem; }
    .admin-top__actions:not(:has(> :not(.admin-top__date))) { display: none; }
    .admin-top__actions::-webkit-scrollbar { display: none; }
    .admin-top__actions > * { flex: none; }
    .admin .panel { padding: var(--s-4); border-radius: 18px; }
    .admin .panel--flush { padding: 0; }
    .admin .panel--flush .panel__head { padding: var(--s-4) var(--s-4) 0; }
    .admin-content > .notice { padding: .6rem .8rem; font-size: var(--fs-xs); border-radius: 14px; }

    /* chip rows: one line that scrolls sideways, edge to edge */
    .status-tabs, .page-tabs { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; margin-inline: -.85rem; padding-inline: .85rem; scroll-padding-inline: .85rem;
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 .85rem, #000 calc(100% - 1.6rem), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 .85rem, #000 calc(100% - 1.6rem), transparent); }
    .status-tabs::-webkit-scrollbar { display: none; }
    .status-tabs a { flex: none; padding: .55rem 1rem; white-space: nowrap; box-shadow: 0 1px 2px rgba(5, 28, 36, .05); }
    .page-tabs a { padding: .75rem .9rem; }
    .panel__head--tools .status-tabs { margin-inline: 0; padding-inline: 0; }

    /* filters: the main field stays, the rest folds behind a button */
    .admin .filter-bar { gap: .6rem; }
    .filter-bar--fold > .filter-bar__main { flex: 1 1 0; }
    .filter-bar--fold > .filter-bar__toggle { display: inline-flex; flex: none; min-height: 40px; gap: .4rem; }
    .filter-bar--fold:not(.is-unfolded) > :not(.filter-bar__main):not(.filter-bar__toggle) { display: none; }
    .filter-bar--fold.is-unfolded > .filter-bar__toggle { background: var(--teal-50); border-color: var(--teal-500); color: var(--teal-700); }
    .filter-bar--fold.is-unfolded > .field:not(.filter-bar__main) { flex: 1 1 calc(50% - .3rem); }
    .filter-bar--fold.is-unfolded > .btn:not(.filter-bar__toggle) { flex: 1 1 calc(50% - .3rem); justify-content: center; }

    /* stacked tables become a list of cards: title on top, details two to a row, actions along the bottom */
    .admin .table-wrap:has(> .table--stack) { overflow: visible; background: none; border: 0; border-radius: 0; box-shadow: none; }
    .admin .panel--flush .table-wrap:has(> .table--stack) { padding: 0 var(--s-3) var(--s-3); }
    .admin .table--stack tbody { display: grid; gap: .7rem; }
    .admin .table--stack tr { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem 1rem; padding: 1rem; border: 1px solid rgba(10, 47, 58, .07); border-radius: 18px; background: #fff; box-shadow: var(--lux-card); }
    .admin .panel .table--stack tr { box-shadow: none; background: #fbfdfd; }
    .admin .table--stack tbody tr:hover { background: #fff; }
    .admin .table--stack td, .admin .table--stack td[data-label] { display: block; min-width: 0; min-height: 0; padding: 0; border: 0; text-align: left; overflow-wrap: anywhere; }
    .admin .table--stack td[data-label]::before { position: static; display: block; margin-bottom: .25rem; width: auto; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; line-height: 1.3; color: #7b9196; }
    .admin .table--stack td.cell-wrap { min-width: 0; }
    /* the first labelled cell is the card title */
    .admin .table--stack tr > td:first-child[data-label], .admin .table--stack tr > td:first-child:not([data-label]) + td[data-label] { grid-column: 1 / -1; padding-bottom: .7rem; border-bottom: 1px dashed rgba(10, 47, 58, .1); font-size: var(--fs-base); }
    .admin .table--stack tr > td:first-child[data-label]::before, .admin .table--stack tr > td:first-child:not([data-label]) + td[data-label]::before { display: none; }
    /* a thumbnail sits beside the title */
    .admin .table--stack tr > td:first-child:has(> .table__thumb) { position: absolute; top: 1rem; left: 1rem; }
    .admin .table--stack tr:has(> td:first-child > .table__thumb) > td:nth-child(2) { min-height: 44px; padding-left: 56px; }
    /* actions, forms and wide content take the whole width */
    .admin .table--stack td:not([data-label]):not(:has(> .table__thumb)), .admin .table--stack td:has(> form, > .btn-row, > .btn, > .input, > select, > textarea) { grid-column: 1 / -1; }
    .admin .table--stack tr > td:last-child:not([data-label]) { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-start; padding-top: .7rem; border-top: 1px dashed rgba(10, 47, 58, .1); }
    .admin .table--stack tr > td:last-child:not([data-label]):empty { display: none; }
    .admin .table--stack td .btn-row { flex-wrap: wrap; justify-content: flex-start; }
    .admin .table--stack td .input { max-width: none; }
    /* plain tables keep their columns and scroll inside their card */
    .admin .table-wrap:not(:has(> .table--stack)) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .admin .pagination { flex-wrap: wrap; justify-content: center; }
}
@media (max-width: 360px) {
    .admin .table--stack tr { grid-template-columns: minmax(0, 1fr); }
    .admin-tabbar a, .admin-tabbar button { font-size: 10px; }
    .admin-tabbar__icon { width: 46px; }
}
@media print {
    .admin-tabbar, .admin-scrim, .admin-top__avatar { display: none !important; }
}
.pick-list__order { display: block; min-width: 0; }
.pick-list__order .input { width: 100%; }
/* small laptops: tighter table cells so the common lists fit without sideways scrolling */
@media (min-width: 821px) and (max-width: 1440px) { .admin .table th, .admin .table td { padding-inline: .7rem; } }
@media (min-width: 600px) and (max-width: 820px) { .admin .table--stack tr { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Account menu on phones: one row of chips that scrolls sideways */
@media (max-width: 640px) {
    .account-tabs { flex-wrap: nowrap; gap: .5rem; overflow-x: auto; scrollbar-width: none; border-bottom: 0; margin-inline: calc(-1 * var(--gutter, 1rem)); padding: .2rem var(--gutter, 1rem) .4rem; }
    .account-tabs::-webkit-scrollbar { display: none; }
    .account-tabs a, .account-tabs button { flex: none; white-space: nowrap; margin: 0; padding: .55rem .95rem; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface); }
    .account-tabs a.is-active { border-color: var(--navy-900); background: var(--navy-900); color: #fff; }
    .account-tabs__logout { flex: none; margin-left: 0; }
}

/* Bulk actions above admin tables */
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); padding: var(--s-3) var(--s-4); margin-bottom: var(--s-3); }
.bulk-bar [data-bulk-submit] { margin-left: auto; }
.bulk-bar [data-bulk-submit]:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.col-check { width: 40px; }
.col-check input { width: 18px; height: 18px; accent-color: var(--teal-700); cursor: pointer; }

/* ---------- POS: the whole counter fits the screen; only the product grid and the sale lines scroll ---------- */
.pos-switch { display: none; }
.pos-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); }
.pos-bar__note { flex: 1; min-width: 220px; margin: 0; }
.pos-bar__today { display: flex; align-items: baseline; gap: .5rem; }
.pos-bar__today span { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pos-bar__today strong { font-family: var(--font-display); font-size: 1.2rem; color: var(--navy-900); }
.pos-bar__today small { color: var(--muted); }
.pos-recent { position: relative; }
.pos-recent > summary { list-style: none; }
.pos-recent > summary::-webkit-details-marker { display: none; }
.pos-recent__list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: min(380px, 90vw); display: grid; gap: .5rem; padding: var(--s-4); box-shadow: var(--shadow-lg, 0 18px 40px -18px rgba(5, 28, 36, .45)); }
.pos-recent__row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .6rem; align-items: baseline; padding-bottom: .4rem; border-bottom: 1px dashed var(--border); }
.pos-overlay { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 1rem; background: rgba(4, 22, 28, .55); backdrop-filter: blur(3px); }
.pos-overlay .till-receipt { width: min(520px, 100%); max-height: calc(100dvh - 2rem); overflow-y: auto; margin: 0; box-shadow: 0 30px 60px -20px rgba(4, 22, 28, .6); }

.admin--pos .admin-main { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.admin--pos .admin-content { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-3) clamp(.75rem, 1.6vw, 1.25rem); }
.admin--pos .admin-content > .notice:not(.notice--error) { display: none; } /* development banner */
.admin--pos .till { flex: 1; min-height: 0; margin: 0; grid-template-columns: minmax(0, 1fr) clamp(370px, 36vw, 430px); grid-template-rows: minmax(0, 1fr); gap: var(--s-3); align-items: stretch; }
.admin--pos .till > .panel { min-height: 0; padding: var(--s-4); }
.admin--pos .till__pick { display: flex; flex-direction: column; gap: var(--s-3); }
.admin--pos .till__results { flex: 1; min-height: 0; max-height: none; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.admin--pos .till__cart { position: static; display: flex; flex-direction: column; gap: var(--s-3); overflow-y: auto; }
.admin--pos .till__lines { flex: 1 1 0; min-height: 84px; max-height: none; }
.admin--pos .till__empty { padding: var(--s-4); }
.admin--pos .till__total dt, .admin--pos .till__total dd { font-size: 1.3rem; }
.admin--pos .till__pay { gap: var(--s-2); }
.admin--pos .till__cart > .help { display: none; } /* shown as the button tooltip instead */
.admin--pos .till__cart { gap: var(--s-2); }
.admin--pos .till__lines { min-height: 132px; align-content: start; }
.admin--pos .till__totals { margin: 0; }
.admin--pos .till__totals > div:first-child { display: none; } /* item count is in the sale header */
/* the Complete button stays in reach while the cart scrolls */
.admin--pos .till__cart > [data-till-submit] { position: sticky; bottom: 0; z-index: 1; flex-shrink: 0; box-shadow: 0 -10px 0 var(--surface); }
@keyframes pos-bump { 40% { transform: scale(1.06); } }
.pos-switch .is-bumped { animation: pos-bump .35s var(--ease, ease); }

@media (max-width: 1080px) {
    /* the admin tab bar stays at the bottom; the POS fills the space above it */
    .admin--pos .admin-shell { min-height: 0; }
    .admin--pos .admin-main { height: calc(100dvh - 74px - env(safe-area-inset-bottom)); }
}
@media (max-width: 1000px) {
    .admin--pos .pos-bar__note { display: none; }
    .admin--pos .till { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: var(--s-2); }
    .admin--pos .pos-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--border); }
    .pos-switch button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; border: 0; border-radius: var(--r-pill); background: none; font: inherit; font-weight: 700; color: var(--text-2); cursor: pointer; white-space: nowrap; }
    .pos-switch button[aria-selected="true"] { background: var(--surface); color: var(--navy-900); box-shadow: 0 2px 8px -4px rgba(5, 28, 36, .35); }
    .pos-switch b { min-width: 22px; padding: 0 .4rem; border-radius: var(--r-pill); background: var(--teal-700); color: #fff; font-size: var(--fs-xs); line-height: 22px; }
    .pos-switch span { font-variant-numeric: tabular-nums; }
    .admin--pos .till:not(.is-sale) .till__cart, .admin--pos .till.is-sale .till__pick { display: none; }
    .admin--pos .till > .panel { padding: var(--s-3); }
}
@media (max-width: 820px) {
    .admin--pos .admin-content { padding: .6rem max(.6rem, env(safe-area-inset-left)) .6rem max(.6rem, env(safe-area-inset-right)); gap: var(--s-2); }
    .admin--pos .till__results { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
}

/* Products list on phones: the bulk-select box sits top-right of each card, the thumbnail stays top-left */
@media (max-width: 820px) {
    .admin .table--stack tr > td.col-check { position: absolute; top: 1rem; right: 1rem; padding: 0; border: 0; }
    .admin .table--stack tr > td.col-check + td:has(> .table__thumb) { position: absolute; top: 1rem; left: 1rem; }
    .admin .table--stack tr:has(> td.col-check + td > .table__thumb) > td:nth-child(3) { min-height: 44px; padding-left: 56px; padding-right: 2.25rem; }
    .admin .table--stack tr > td.col-check + td:not([data-label]) + td[data-label]::before { display: none; }
}

/* ---------- Admin: pharmacy promise editor ---------- */
.promise-edit { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.promise-edit__card { display: grid; gap: var(--s-3); padding: var(--s-4); border: 1px solid var(--border); border-radius: var(--r-md, 14px); background: var(--surface); }
.promise-edit__card[hidden] { display: none; }
.promise-edit__card > .help { margin: 0; display: flex; align-items: center; gap: .4rem; color: var(--amber-700, #8a5a00); }
.promise-edit__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.promise-edit__icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--navy-900, #062029); color: var(--mint-400, #5fe3c0); }
.promise-edit__tools { display: inline-flex; gap: 4px; margin-left: auto; }
.promise-edit__card:first-of-type [data-promise-move="up"], .promise-edit__card.is-last [data-promise-move="down"] { visibility: hidden; }
.switch--sm { gap: .5rem; font-size: var(--fs-sm, .9rem); }
.icon-btn--danger { color: var(--danger, #b42318); }
.promise-vars { display: grid; gap: var(--s-3); margin: 0; }
.promise-vars dt { margin: 0 0 .15rem; }
.promise-vars dd { margin: 0; font-size: var(--fs-sm, .9rem); }
.promise-tips { margin: 0; padding-left: 1.1rem; display: grid; gap: .4rem; }

/* ==========================================================================
   Stock made simple: the stock card (product editor and stock page), stock history, notifications bell
   ========================================================================== */
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.btn-row--end { justify-content: flex-end; flex-wrap: nowrap; }
.stock-card { display: grid; gap: var(--s-4); margin-bottom: var(--s-5); border-left: 5px solid var(--success); scroll-margin-top: 150px; }
.stock-card--low { border-left-color: #e0a100; }
.stock-card--out { border-left-color: var(--danger); }
.stock-card__status { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-6); }
.stock-card__count { display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: .6rem; }
.stock-card__label { grid-column: 1 / -1; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.stock-card__num { font-size: 2.6rem; line-height: 1.05; font-weight: 800; color: var(--navy-900); font-variant-numeric: tabular-nums; }
.stock-card--out .stock-card__num { color: var(--danger); }
.stock-card--low .stock-card__num { color: var(--warning); }
.stock-card__unit { color: var(--text-2); font-weight: 500; }
.stock-card__meta { display: grid; gap: .3rem; justify-items: start; }
.stock-card__links { margin-left: auto; }
.stock-card__forms { display: grid; gap: var(--s-3); }
.stock-card__foot { margin: 0; display: flex; gap: .4rem; align-items: center; }
.stock-form { background: var(--well); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--s-4); }
.stock-form__title { display: flex; align-items: center; gap: .45rem; margin: 0 0 var(--s-3); font-size: var(--fs-md, 1rem); font-weight: 700; color: var(--navy-900); }
.stock-form--remove > summary { margin: 0; cursor: pointer; list-style: none; flex-wrap: wrap; }
.stock-form--remove > summary::-webkit-details-marker { display: none; }
.stock-form--remove[open] > summary { margin-bottom: var(--s-3); }
.stock-form__row { display: flex; flex-wrap: wrap; align-items: end; gap: var(--s-3); }
.stock-form__row .field { min-width: 150px; }
.stock-form__grow { flex: 1 1 220px; }
.input--qty { max-width: 140px; font-size: 1.1rem; font-weight: 700; }
.stock-form__more { margin-top: var(--s-3); }
.stock-form__more > summary { cursor: pointer; font-size: var(--fs-sm); font-weight: 600; color: var(--teal-700); margin-bottom: var(--s-3); }
.row-action--stock { background: var(--teal-600); border-color: var(--teal-600); color: #fff; }
.row-action--stock:hover { background: var(--teal-700); color: #fff; }
.kpis--compact .kpi { padding: var(--s-4); }
.history-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: var(--s-3); margin: var(--s-4) 0; }
.history-head h2 { margin: .15rem 0; }
.history-head p { margin: 0; }
.history-head__state { font-size: var(--fs-sm); padding: .35rem .85rem; }
.history-table tr.is-restock td { background: var(--success-bg); }
.admin-bell { position: relative; order: 2; flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--navy-900); text-decoration: none !important; }
.admin-bell:hover, .admin-bell.is-active { background: var(--teal-50); color: var(--teal-700); }
.admin-bell .icon { width: 20px; height: 20px; }
.admin-bell b { position: absolute; top: -6px; right: -6px; display: grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: var(--r-pill); background: #e5484d; color: #fff; font-size: 10px; font-weight: 800; box-shadow: 0 0 0 2px var(--surface); }
.admin-top > .admin-bell { margin-left: auto; }
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif + .notif { border-top: 1px solid var(--border); }
.notif__link { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-3); align-items: center; padding: var(--s-4) var(--s-5); color: inherit; text-decoration: none !important; }
.notif__link:hover { background: var(--surface-2); }
.notif.is-unread .notif__link { background: var(--teal-50); }
.notif__text { display: grid; gap: .15rem; min-width: 0; }
.notif__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--info-bg); color: var(--info); }
.notif__icon--warning { background: var(--warning-bg); color: var(--warning); }
.notif__icon--danger { background: var(--danger-bg); color: var(--danger); }
.notif__when { display: flex; align-items: center; gap: .5rem; white-space: nowrap; }
.notif__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--teal-500); }
@media (max-width: 560px) {
    .stock-card__num { font-size: 2.2rem; }
    .stock-card__links { margin-left: 0; width: 100%; }
    .stock-card__links .btn { width: 100%; justify-content: center; }
    .stock-form__row .field, .stock-form__row .btn { flex: 1 1 100%; min-width: 0; }
    .input--qty { max-width: none; }
    .notif__link { grid-template-columns: auto 1fr; padding: var(--s-3) var(--s-4); }
    .notif__when { grid-column: 2; }
    .btn-row--end { flex-wrap: wrap; justify-content: flex-start; }
}
@media print {
    .no-print, .admin-bell, .admin-tabbar { display: none !important; }
    .history-table tr.is-restock td { background: #eef8f3 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Admin: a calmer, smaller type scale (everything sized in rem shrinks with it) ---------- */
html:has(> body.admin) { font-size: 87.5%; }
:where(.admin) h1 { font-size: clamp(1.35rem, 1.1rem + .6vw, 1.7rem); }
:where(.admin) h2 { font-size: clamp(1.15rem, 1rem + .4vw, 1.4rem); }
:where(.admin) h3 { font-size: 1.05rem; }
.admin .admin-side a, .admin .admin-side summary { font-size: 13px; }
.admin .studio-head__title { font-size: clamp(1.25rem, 1rem + .9vw, 1.6rem); }
.admin .stock-card__num { font-size: 2.1rem; }

/* ---------- Tables split into pages in the browser (see app.js "table pager") ---------- */
tr.is-paged-out { display: none !important; }
.pager-bar--js { padding: var(--s-3) var(--s-4); }
.pager-bar--js .pagination { margin: 0; }
.pager-bar--js .pagination__link { font: inherit; cursor: pointer; }
.pager-bar--js .pagination__link:not(.is-current) { border: 1px solid var(--border); background: var(--surface); }
.pager-bar--js .pagination__link:disabled { opacity: .4; cursor: default; }

/* ---------- Printing any admin page: just the content, full width, every row ---------- */
@media print {
    html:has(> body.admin) { font-size: 11pt; }
    .admin-shell { display: block; min-height: 0; background: none !important; }
    .admin, .admin-main { background: #fff !important; padding: 0 !important; }
    .admin-main > * { max-width: none; }
    .pager-bar, .pagination, .filter-bar, .btn, .row-action, .link-arrow { display: none !important; }
    tr.is-paged-out { display: table-row !important; }
    .panel, .kpi { box-shadow: none !important; }
    .kpi { break-inside: avoid; padding: 8pt 10pt !important; }
    .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 8pt !important; margin-bottom: 10pt !important; }
    .kpi__value { font-size: 15pt !important; }
    .table-wrap { overflow: visible !important; }
    .table { width: 100% !important; min-width: 0 !important; table-layout: auto; }
    .table th, .table td { font-size: 8.5pt !important; padding: 4pt 5pt !important; }
    .table thead { display: table-header-group; }
    .table tr { break-inside: avoid; }
}
.print-only { display: none; }
.report-head { margin-bottom: var(--s-4); }
.report-head .btn-row { margin-left: auto; }
@media print {
    .print-only { display: block !important; margin: 0 0 8pt; }
    .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8pt !important; }
    .chart svg { max-height: 220px; }
    .grid-2 .panel, .panel:has(> .chart) { break-inside: avoid; }
    .kpis:has(> .kpi:nth-child(5)) { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
/* POS: empty product area until staff type or scan */
.till__hint { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--s-3); padding: var(--s-6) var(--s-4); color: var(--muted); }
.till__hint .icon { width: 28px; height: 28px; flex: none; color: var(--teal-600); }
.till__hint p { display: grid; gap: .15rem; margin: 0; }
.till__hint strong { color: var(--navy-900); }

/* ---------- Contact us page ---------- */
.prose-page:has(.contact-layout) { max-width: var(--container); }
.contact-intro { max-width: 62ch; color: var(--text-2); margin-bottom: var(--s-5); }
.contact-layout { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr); gap: var(--s-5); align-items: start; margin-bottom: var(--s-5); }
.contact-side { display: grid; gap: var(--s-3); }
.contact-side .contact-card { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4); }
.contact-side .contact-card .icon { flex: none; margin: 0; }
.contact-side .contact-card h2 { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 .2rem; }
.contact-side .contact-card p { margin: 0; font-weight: 600; color: var(--navy-900); }
.contact-form { padding: var(--s-6); }
.contact-form h2 { font-size: var(--fs-lg); margin-bottom: var(--s-4); }
.contact-form .form-grid { margin-bottom: var(--s-4); }
.contact-form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); }
.contact-form__foot p { margin: 0; }
@media (max-width: 820px) { .contact-layout { grid-template-columns: 1fr; } .contact-form { padding: var(--s-4); } }

/* ---------- Admin: contact messages ---------- */
.msg-list { list-style: none; margin: 0; padding: 0; }
.msg-list li + li { border-top: 1px solid var(--border); }
.msg-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .9rem; align-items: start; padding: var(--s-4) var(--s-5); color: inherit; text-decoration: none !important; }
.msg-row:hover { background: var(--surface-2); }
.msg-row__dot { width: 9px; height: 9px; margin-top: .45rem; border-radius: 50%; background: transparent; }
.msg-row.is-new .msg-row__dot { background: var(--teal-600); box-shadow: 0 0 0 4px var(--teal-50); }
.msg-row.is-new strong { color: var(--navy-950); }
.msg-row__main { display: grid; gap: .15rem; min-width: 0; }
.msg-row__preview { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-row__meta { display: grid; justify-items: end; gap: .3rem; white-space: nowrap; }
.msg-view { display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); gap: var(--s-5); align-items: start; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; margin: 0; }
.msg-reply { margin-top: var(--s-4); padding: var(--s-4); border-left: 3px solid var(--teal-600); background: var(--teal-50); border-radius: 0 var(--r-md) var(--r-md) 0; }
.msg-facts { display: grid; gap: .6rem; margin: 0; }
.msg-facts div { display: grid; gap: .1rem; }
.msg-facts dt { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.msg-facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 1080px) { .msg-view { grid-template-columns: 1fr; } .msg-row { padding: var(--s-3) var(--s-4); } }
.msg-form { display: grid; gap: var(--s-4); }
.msg-form .help { margin: 0; }
.msg-earlier { margin-top: var(--s-5); font-size: var(--fs-sm); }
.msg-view > div { display: grid; gap: var(--s-4); min-width: 0; }
