/* Wellrest PH — design tokens derived from the logo (navy wordmark + gold slashes) */
:root {
    --navy-950: #0C1A2C;
    --navy-800: #16304F;
    --navy: #1C3B60;
    --navy-600: #2C5079;
    --gold: #C9962F;
    --gold-400: #E4BB63;
    --gold-100: #F7EDD8;
    --ink: #22303F;
    --mist: #64748B;
    --line: #E4E8EE;
    --cloud: #F5F7FA;
    --white: #FFFFFF;
    --danger: #B3372F;
    --ok: #2E7D4F;
    --radius: 10px;
    --shadow: 0 10px 30px rgba(12, 26, 44, 0.08);
    --font-display: 'Archivo', 'Segoe UI', sans-serif;
    --font-body: 'Hanken Grotesk', 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--white);
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--gold); }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--navy-800); line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
.container { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
.hidden { display: none !important; }

/* The hidden attribute must beat every layout rule below — several toggles
   (the admin More sheet, upload previews, the collapsed address form, filtered
   table rows) sit on elements that also carry a display declaration, and an
   author display rule silently overrides the browser's default for [hidden]. */
[hidden] { display: none !important; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff; padding: 0.5rem 1rem; z-index: 200; }
.skip-link:focus { left: 0; color: #fff; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* --- Brand marks --- */
.slash-mark { display: inline-flex; gap: 3px; margin-right: 0.55rem; vertical-align: -2px; }
.slash-mark span { width: 6px; height: 15px; transform: skewX(-20deg); border-radius: 1px;
    background: linear-gradient(180deg, var(--gold-400), var(--gold)); }
.slash-mark.lg { margin-right: 0.7rem; vertical-align: -3px; }
.slash-mark.lg span { width: 9px; height: 26px; }
.wordmark { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; letter-spacing: 0.04em;
    color: #fff; display: inline-flex; align-items: center; gap: 0.5rem; }
.wordmark.sm { font-size: 1.05rem; }
/* The slash was a stand-in drawn in CSS before there was a logo file. Replaced
   by the real mark; the rules stay so any page still emitting a .wm-slash keeps
   rendering something rather than collapsing to nothing. */
.wm-slash { width: 9px; height: 20px; transform: skewX(-20deg); border-radius: 1px;
    background: linear-gradient(180deg, var(--gold-400), var(--gold));
    box-shadow: 13px 0 0 0 var(--gold); }
/* Sized in em so it tracks the wordmark at both .wordmark and .wordmark.sm
   rather than needing a second rule per size. */
.wm-logo { width: auto; height: 1.5em; display: block; flex: none; }
/* WELLREST was set in caps by the CSS, not the markup — with the mark beside it
   the shouting is redundant, and the brand is written "Wellrest". */
.wordmark { text-transform: none; }

/* --- Buttons --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    background: var(--navy); color: #fff; border: 1px solid var(--navy);
    font: 600 0.95rem var(--font-body); padding: 0.65rem 1.3rem; border-radius: var(--radius);
    cursor: pointer; transition: background 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s; }
.btn:hover { background: var(--navy-600); border-color: var(--navy-600); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-gold { background: linear-gradient(135deg, var(--gold-400), var(--gold)); border-color: var(--gold); color: var(--navy-950); }
.btn-gold:hover { background: linear-gradient(135deg, var(--gold), var(--gold)); border-color: var(--gold); color: var(--navy-950); box-shadow: 0 6px 18px rgba(201, 150, 47, 0.35); }
.btn-outline { background: transparent; color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,0.5); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,0.12); border-color: #fff; color: #fff; }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.85rem; border-radius: 8px; }
.btn-lg { padding: 0.85rem 1.8rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn.disabled { opacity: 0.45; pointer-events: none; }
.btn-oauth { background: #fff; border: 1px solid var(--line); color: var(--ink); flex: 1; }
.btn-oauth:hover { border-color: var(--navy); color: var(--ink); background: var(--cloud); }

/* --- Header --- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.96);
    backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 1.5rem; height: 66px; }
.brand img { width: 150px; height: auto; }
.main-nav { display: flex; gap: 1.4rem; margin-left: auto; }
.main-nav a { font-weight: 600; font-size: 0.95rem; color: var(--ink); padding: 0.3rem 0; position: relative; }
.main-nav a.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px;
    background: linear-gradient(90deg, var(--gold-400), var(--gold)); border-radius: 2px; }
.main-nav a:hover { color: var(--navy); }
.header-actions { display: flex; align-items: center; gap: 0.9rem; }
.cart-link { position: relative; color: var(--navy-800); display: inline-flex; padding: 0.35rem; }
.cart-count { position: absolute; top: -4px; right: -7px; min-width: 18px; height: 18px; padding: 0 4px;
    background: var(--gold); color: var(--navy-950); font: 700 0.7rem var(--font-body);
    border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; }
.account-menu { position: relative; }
.account-btn { display: flex; align-items: center; gap: 0.5rem; background: none; border: none; cursor: pointer;
    font: 600 0.9rem var(--font-body); color: var(--ink); padding: 0.25rem; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font: 700 0.9rem var(--font-display); }
.account-drop { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow); min-width: 160px; padding: 0.4rem; display: none; }
.account-menu.open .account-drop { display: block; }
.account-drop a { display: block; padding: 0.5rem 0.8rem; border-radius: 6px; font-size: 0.92rem; color: var(--ink); }
.account-drop a:hover { background: var(--cloud); color: var(--navy); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--navy-800); margin: 5px 0; transition: 0.2s; }

/* --- Hero --- */
.hero { position: relative; overflow: hidden; color: #fff;
    background: radial-gradient(1200px 600px at 75% -10%, #24486F 0%, var(--navy-800) 45%, var(--navy-950) 100%); }
.hero-inner { padding: clamp(4rem, 10vw, 7.5rem) 0; position: relative; z-index: 1; max-width: 640px; }
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero h1 em { font-style: normal; background: linear-gradient(120deg, var(--gold-400), var(--gold));
    -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: 1.1rem; color: #C7D3E1; max-width: 480px; margin-bottom: 2rem; }
.hero-cta { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.hero-slash { position: absolute; right: -4%; top: 50%; transform: translateY(-50%) skewX(-20deg);
    display: flex; gap: clamp(1.4rem, 3vw, 2.6rem); opacity: 0.16; pointer-events: none; }
.hero-slash span { width: clamp(60px, 9vw, 120px); height: clamp(340px, 55vw, 560px); border-radius: 10px;
    background: linear-gradient(180deg, var(--gold-400), var(--gold)); }

/* --- Sections --- */
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section-alt { background: var(--cloud); }
.pt-0 { padding-top: 0; }
.section-head { margin-bottom: 2rem; }
.section-head.split { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.kicker { display: inline-flex; align-items: center; font: 700 0.85rem var(--font-display);
    color: var(--gold); margin-bottom: 0.5rem; }
.section-head h2 { margin-bottom: 0; }
.page-head { padding: clamp(2rem, 5vw, 3.2rem) 0 1.6rem; }
.page-head h1 { margin: 0; display: flex; align-items: center; }

/* --- Landing: intro / collections / stats / clips / reviews --- */
.intro-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 3rem; align-items: start; }
.intro-copy p:last-child { margin-bottom: 0; }
.collection-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.collection-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.2rem;
    display: flex; flex-direction: column; gap: 0.3rem; transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    background: #fff; position: relative; overflow: hidden; }
.collection-card::after { content: ''; position: absolute; right: -14px; top: -10px; width: 10px; height: 54px;
    transform: skewX(-20deg); background: linear-gradient(180deg, var(--gold-400), var(--gold));
    box-shadow: 16px 0 0 0 rgba(201,150,47,0.4); transition: right 0.25s; }
.collection-card:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: var(--shadow); }
.collection-card:hover::after { right: 22px; }
.collection-name { font: 700 1.05rem var(--font-display); color: var(--navy-800); }
.collection-meta { font-size: 0.85rem; color: var(--mist); }
.stats-band { background: var(--navy-950); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.stat { text-align: center; }
.stat strong { display: block; font: 800 clamp(1.8rem, 4vw, 2.6rem) var(--font-display);
    background: linear-gradient(120deg, var(--gold-400), var(--gold));
    -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: #A9B8C9; font-size: 0.92rem; }
.clip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.clip { border-radius: var(--radius); aspect-ratio: 9 / 12; object-fit: cover; background: var(--navy-950); width: 100%; }
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.2rem; }
.review-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.4rem; margin: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.review-card blockquote { margin: 0; font-size: 0.98rem; }
.review-card figcaption { font-size: 0.85rem; color: var(--mist); display: flex; flex-direction: column; gap: 0.1rem; }
.review-card figcaption strong { color: var(--ink); }

/* --- Stars --- */
.stars { display: inline-flex; gap: 2px; }
.star { position: relative; width: 15px; height: 15px; background: #D5DCE5;
    clip-path: polygon(50% 0%, 63% 34%, 100% 38%, 72% 61%, 81% 100%, 50% 78%, 19% 100%, 28% 61%, 0% 38%, 37% 34%); }
.star-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(180deg, var(--gold-400), var(--gold)); }
.rating-count { font-size: 0.82rem; color: var(--mist); margin-left: 0.45rem; }

/* --- Product cards --- */
.grid { display: grid; gap: 1.2rem; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
    display: flex; flex-direction: column; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #D3DAE3; }
.pcard-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--cloud); }
.pcard-media img { width: 100%; height: 100%; object-fit: cover; }
.pcard-tag { position: absolute; top: 10px; left: 10px; background: var(--navy-950); color: var(--gold-400);
    font: 600 0.72rem var(--font-body); padding: 0.25rem 0.55rem; border-radius: 6px; }
.pcard-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.pcard-cat { font-size: 0.75rem; font-weight: 600; color: var(--gold); }
.pcard-name { font-size: 0.98rem; margin: 0; min-height: 2.5em; }
.pcard-name a { color: var(--navy-800); }
.pcard-name a:hover { color: var(--gold); }
.pcard-rating { min-height: 18px; }
.pcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: auto; padding-top: 0.5rem; }
.pcard-price { font: 700 1.05rem var(--font-display); color: var(--navy-800); display: flex; flex-direction: column; line-height: 1.2; }
.pcard-price s { font: 400 0.8rem var(--font-body); color: var(--mist); }
.oos { color: var(--danger); font-weight: 600; font-size: 0.85rem; }
.oos.big { font-size: 1.05rem; }

/* --- Shop toolbar --- */
.shop-toolbar { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 1rem; }
.search-box { position: relative; flex: 1 1 260px; }
.search-box svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--mist); }
.search-box input { width: 100%; padding: 0.62rem 0.9rem 0.62rem 2.4rem; }
input, select, textarea { font: 500 0.95rem var(--font-body); color: var(--ink);
    border: 1px solid var(--line); border-radius: 8px; padding: 0.62rem 0.8rem; background: #fff; }
input:focus, select:focus, textarea:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px rgba(28,59,96,0.12); }
textarea { resize: vertical; width: 100%; }
.result-line { color: var(--mist); font-size: 0.9rem; margin-bottom: 1.4rem; }
.pagination { display: flex; gap: 0.4rem; justify-content: center; margin-top: 2.4rem; }
.pagination a { min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); border-radius: 8px; font-weight: 600; font-size: 0.9rem; }
.pagination a.current { background: var(--navy); border-color: var(--navy); color: #fff; }
.empty-state { text-align: center; padding: 3.5rem 1rem; color: var(--mist); }
.empty-state p { margin-bottom: 1.2rem; }
.empty-filter { color: var(--mist); padding: 1.5rem 0; }

/* --- Product page --- */
.crumbs { font-size: 0.85rem; color: var(--mist); margin-bottom: 1.6rem; }
.crumbs span { color: var(--ink); }
.product-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: start; }
.product-media { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--cloud); }
.product-media img { width: 100%; object-fit: cover; }
.product-buy h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0.2rem 0 0.6rem; }
.product-rating { margin-bottom: 0.9rem; }
.product-price { font: 800 1.8rem var(--font-display); color: var(--navy-800);
    display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 1rem; }
.product-price s { font: 400 1rem var(--font-body); color: var(--mist); }
.save-tag { font: 600 0.78rem var(--font-body); background: var(--gold-100); color: var(--gold);
    padding: 0.25rem 0.6rem; border-radius: 6px; }
.product-desc { color: var(--ink); }
.stock-line { color: var(--ok); font-weight: 600; font-size: 0.9rem; }
.buy-row { display: flex; gap: 0.7rem; flex-wrap: wrap; align-items: center; margin: 1rem 0 1.6rem; }
.qty-stepper { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.qty-stepper button { width: 38px; border: none; background: var(--cloud); font-size: 1.1rem; cursor: pointer; color: var(--navy-800); }
.qty-stepper button:hover { background: var(--line); }
.qty-stepper input { width: 52px; text-align: center; border: none; border-radius: 0; -moz-appearance: textfield; }
.qty-stepper input::-webkit-outer-spin-button, .qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.buyers { border-top: 1px solid var(--line); padding-top: 1.2rem; }
.buyers ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem 1.2rem; }
.buyers li { font-size: 0.88rem; color: var(--ink); display: flex; align-items: center; gap: 0.5rem; }
.buyers time { color: var(--mist); }
.buyer-dot { width: 7px; height: 15px; transform: skewX(-20deg); border-radius: 1px; flex: none;
    background: linear-gradient(180deg, var(--gold-400), var(--gold)); }
.muted-line { color: var(--mist); font-size: 0.92rem; }

/* Reviews & comments */
.review-form { max-width: 560px; margin-bottom: 2rem; }
.rate-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; margin-bottom: 0.4rem; }
.rate-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rate-input label { width: 26px; height: 26px; cursor: pointer; background: #D5DCE5;
    clip-path: polygon(50% 0%, 63% 34%, 100% 38%, 72% 61%, 81% 100%, 50% 78%, 19% 100%, 28% 61%, 0% 38%, 37% 34%); }
.rate-input input:checked ~ label,
.rate-input label:hover, .rate-input label:hover ~ label { background: linear-gradient(180deg, var(--gold-400), var(--gold)); }
.review-list, .comment-list { display: flex; flex-direction: column; gap: 1rem; max-width: 760px; }
.review-item, .comment-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.3rem; }
.review-item header, .comment-item header { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.4rem; flex-wrap: wrap; }
.review-item time, .comment-item time { color: var(--mist); font-size: 0.82rem; margin-left: auto; }
.review-item p, .comment-item p { margin: 0.4rem 0 0; }
.verified { font: 600 0.72rem var(--font-body); color: var(--ok); background: #E8F4EC; padding: 0.15rem 0.5rem; border-radius: 5px; }
.comment-item.is-staff { border-left: 3px solid var(--gold); }
.comment-form { max-width: 760px; display: flex; gap: 0.7rem; align-items: flex-start; margin-top: 1.2rem; }
.comment-form textarea { flex: 1; }

/* --- Cart --- */
.cart-layout { display: grid; grid-template-columns: 1.9fr 1fr; gap: 2rem; align-items: start; }
.cart-toolbar { display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.cart-toolbar input[type="search"] { flex: 1 1 180px; }
.check { display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; font-size: 0.92rem; font-weight: 600; }
.check input { width: 18px; height: 18px; accent-color: var(--gold); cursor: pointer; padding: 0; }
.cart-row { display: grid; grid-template-columns: auto auto 1fr auto auto auto; align-items: center; gap: 1rem;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9rem 1.1rem; margin-bottom: 0.8rem; }
.cart-thumb img { border-radius: 8px; object-fit: cover; width: 96px; height: 72px; }
.cart-info { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.cart-name { font-weight: 700; color: var(--navy-800); }
.cart-cat { font-size: 0.78rem; color: var(--gold); font-weight: 600; }
.cart-unit { font-size: 0.85rem; color: var(--mist); }
.cart-line { font: 700 1.02rem var(--font-display); color: var(--navy-800); min-width: 92px; text-align: right; }
.row-remove { background: none; border: none; color: var(--mist); cursor: pointer; padding: 0.4rem; border-radius: 6px; }
.row-remove:hover { color: var(--danger); background: #FBEDEC; }
.cart-summary { position: sticky; top: 86px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.sum-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.4rem 0; font-size: 0.95rem; }
.sum-row.total { border-top: 1px solid var(--line); margin-top: 0.5rem; padding-top: 0.8rem; font-size: 1.05rem; }
.sum-note { font-size: 0.84rem; color: var(--mist); margin: 0.8rem 0 1rem; }

/* --- Forms / checkout / auth --- */
.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack label { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 600; font-size: 0.9rem; flex: 1; }
.field-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.field-row label.narrow { flex: 0 1 130px; }
.optional { font-weight: 400; color: var(--mist); }
.form-error { background: #FBEDEC; color: var(--danger); border: 1px solid #F0CBC8;
    border-radius: 8px; padding: 0.65rem 0.9rem; font-size: 0.9rem; margin: 0; }
.confirm-note { background: var(--gold-100); border: 1px solid #EAD9B4; border-radius: var(--radius);
    padding: 0.9rem 1.1rem; font-size: 0.92rem; }
.auth-section { display: flex; justify-content: center; }
.auth-card { width: min(430px, 100%); background: #fff; border: 1px solid var(--line);
    border-radius: 14px; box-shadow: var(--shadow); padding: 2.2rem; }
.auth-card h1 { font-size: 1.6rem; margin-bottom: 1.4rem; }
.divider { display: flex; align-items: center; gap: 0.9rem; color: var(--mist); font-size: 0.82rem; margin: 1.4rem 0 1rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.oauth-row { display: flex; gap: 0.8rem; }
.auth-alt { text-align: center; font-size: 0.9rem; margin: 1.4rem 0 0; color: var(--mist); }
.profile-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; align-items: start; }

/* --- Orders / tracker --- */
.placed-banner { background: #E8F4EC; border: 1px solid #C4E2CF; color: var(--ok);
    border-radius: var(--radius); padding: 1rem 1.3rem; margin-bottom: 1.6rem; }
.order-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.5rem; margin-bottom: 1.3rem; }
.order-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.3rem; }
.order-head time { display: block; color: var(--mist); font-size: 0.85rem; }
.status-badge { font: 600 0.78rem var(--font-body); padding: 0.3rem 0.7rem; border-radius: 20px; white-space: nowrap; }
.s-pending { background: var(--gold-100); color: var(--gold); }
.s-approved { background: #E5EDF7; color: var(--navy-600); }
.s-waiting_courier { background: #E5EDF7; color: var(--navy-600); }
.s-shipped { background: #E5EDF7; color: var(--navy); }
.s-out_for_delivery { background: #E1E9F5; color: var(--navy-800); }
.s-delivered { background: #E8F4EC; color: var(--ok); }
.s-cancelled { background: #FBEDEC; color: var(--danger); }
.tracker { list-style: none; display: flex; margin: 0 0 1.4rem; padding: 0; }
.tracker li { flex: 1; text-align: center; position: relative; padding-top: 22px; }
.tracker li::before { content: ''; position: absolute; top: 7px; left: -50%; width: 100%; height: 3px; background: var(--line); }
.tracker li:first-child::before { display: none; }
.tracker .dot { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 17px; height: 17px;
    border-radius: 50%; background: #fff; border: 3px solid var(--line); z-index: 1; }
.tracker li.done::before, .tracker li.now::before { background: linear-gradient(90deg, var(--gold-400), var(--gold)); }
.tracker li.done .dot { border-color: var(--gold); background: var(--gold); }
.tracker li.now .dot { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(201,150,47,0.22); }
.step-label { font-size: 0.76rem; color: var(--mist); line-height: 1.25; display: inline-block; max-width: 90px; }
.tracker li.done .step-label, .tracker li.now .step-label { color: var(--navy-800); font-weight: 600; }
.cancel-line { color: var(--danger); }
.order-items { border-top: 1px solid var(--line); padding-top: 0.8rem; }
.order-item { display: flex; justify-content: space-between; gap: 1rem; padding: 0.3rem 0; font-size: 0.93rem; }
.order-item.total { border-top: 1px solid var(--line); margin-top: 0.5rem; padding-top: 0.7rem; font-weight: 700; }
.order-notes { color: var(--mist); font-style: italic; }

/* --- About --- */
.about-body { display: grid; grid-template-columns: 1.6fr 1fr; gap: 3rem; align-items: start; }
.lead { font-size: 1.15rem; font-weight: 600; color: var(--navy-800); }
.about-facts { display: flex; flex-direction: column; gap: 1rem; }
.fact { border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--radius);
    padding: 1.1rem 1.3rem; background: #fff; }
.fact strong { display: block; font-family: var(--font-display); color: var(--navy-800); }
.fact span { color: var(--mist); font-size: 0.9rem; }

/* --- Toasts --- */
.toasts { position: fixed; top: 78px; right: 1rem; z-index: 300; display: flex; flex-direction: column; gap: 0.5rem; }
.toast { background: var(--navy-950); color: #fff; padding: 0.7rem 1.1rem; border-radius: 8px;
    box-shadow: var(--shadow); font-size: 0.9rem; animation: toast-in 0.25s ease; border-left: 3px solid var(--gold); }
.toast-error { border-left-color: var(--danger); }
.toast-success { border-left-color: #4CAF7A; }
.toast.fade { opacity: 0; transform: translateY(-6px); transition: 0.4s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

/* --- Footer --- */
.site-footer { background: var(--navy-950); color: #B9C6D4; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 2.5rem; padding: 3.5rem 0 2.5rem; }
.footer-brand p { font-size: 0.92rem; margin: 1rem 0 1.2rem; }
.footer-col h4 { color: #fff; font-size: 0.95rem; margin-bottom: 0.9rem; }
.footer-col a, .footer-col span, .footer-col address { display: block; color: #B9C6D4; font-size: 0.92rem;
    margin-bottom: 0.5rem; font-style: normal; }
.footer-col a:hover { color: var(--gold-400); }
.socials { display: flex; gap: 0.7rem; }
.socials a { width: 38px; height: 38px; border: 1px solid rgba(255,255,255,0.2); border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center; color: #D7E0EA; }
.socials a:hover { border-color: var(--gold); color: var(--gold-400); }
.footer-bar { border-top: 1px solid rgba(255,255,255,0.1); padding: 1.1rem 0; font-size: 0.82rem; color: #7E8FA1; }

/* --- Reveal on scroll (only when JS is present) --- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .js .reveal { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
}

/* --- Admin --- */
.adm { background: var(--cloud); }
.adm-shell { display: grid; grid-template-columns: 225px minmax(0, 1fr); min-height: 100vh; }
/* Sticky, not fixed: the grid column keeps its 225px track, so the page body is
   never overlapped. It scrolls internally once the menu is taller than the
   viewport — otherwise the sign-out links at its foot become unreachable. */
.adm-side { background: var(--navy-950); padding: 1.6rem 1.1rem; display: flex; flex-direction: column; gap: 1.8rem;
    position: sticky; top: 0; align-self: start; height: 100vh; height: 100svh; overflow-y: auto; overscroll-behavior: contain; }
.adm-side nav { display: flex; flex-direction: column; gap: 0.25rem; }
.adm-side nav a { color: #B9C6D4; padding: 0.6rem 0.8rem; border-radius: 8px; font-weight: 600; font-size: 0.93rem; }
.adm-side nav a:hover { background: rgba(255,255,255,0.07); color: #fff; }
.adm-side nav a.active { background: linear-gradient(135deg, var(--gold-400), var(--gold)); color: var(--navy-950); }
.adm-side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 0.3rem; }
.adm-side-foot a { color: #7E8FA1; font-size: 0.85rem; padding: 0.3rem 0.8rem; }
.adm-side-foot a:hover { color: var(--gold-400); }
.adm-body { min-width: 0; padding: 2rem 2.4rem; }
.adm-page h1 { font-size: 1.7rem; margin-bottom: 1.4rem; }
.adm-page h2 { font-size: 1.15rem; margin: 2rem 0 0.9rem; }
.adm-page-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.adm-page-head h1 { margin: 0; }
.adm-head-actions { margin-left: auto; display: flex; gap: 0.6rem; }
.adm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; }
.adm-stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.3rem; display: block; }
.adm-stat strong { display: block; font: 800 1.5rem var(--font-display); color: var(--navy-800); }
.adm-stat span { color: var(--mist); font-size: 0.85rem; }
.adm-stat.attn { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,150,47,0.14); }
a.adm-stat:hover { border-color: var(--navy); }
.adm-tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.adm-tabs a { padding: 0.45rem 0.85rem; border-radius: 8px; font-weight: 600; font-size: 0.88rem;
    border: 1px solid var(--line); background: #fff; color: var(--ink); }
.adm-tabs a span { color: var(--mist); font-weight: 500; margin-left: 0.25rem; }
.adm-tabs a.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.adm-tabs a.active span { color: var(--gold-400); }
.adm-tablewrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 720px; }
.adm-table th { text-align: left; font: 600 0.78rem var(--font-body); color: var(--mist);
    padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); }
.adm-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--cloud); vertical-align: middle; }
.adm-table tr:last-child td { border-bottom: none; }
.adm-table tr.is-off td { opacity: 0.5; }
.adm-prod { display: flex; align-items: center; gap: 0.7rem; font-weight: 600; color: var(--navy-800); }
.adm-prod img { border-radius: 6px; object-fit: cover; width: 48px; height: 36px; }
.stock-low { color: var(--danger); font-weight: 700; }
.adm-empty { text-align: center; color: var(--mist); padding: 2rem !important; }
.pill { border: 1px solid var(--line); background: #fff; color: var(--mist); font: 600 0.78rem var(--font-body);
    padding: 0.3rem 0.7rem; border-radius: 16px; cursor: pointer; }
.pill.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.pill:hover { border-color: var(--navy); }
.adm-cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.adm-col { min-width: 0; display: flex; flex-direction: column; gap: 1.4rem; }
.adm-col .card h2 { margin-top: 0; }
.contact-big { font-size: 1.02rem; line-height: 1.7; }
.adm-log { list-style: none; margin: 0; padding: 0; }
.adm-log li { padding: 0.55rem 0 0.55rem 1.1rem; border-left: 2px solid var(--gold); margin-left: 0.3rem; font-size: 0.9rem; }
.adm-log li time { display: block; color: var(--mist); font-size: 0.8rem; }
.adm-form { max-width: 720px; }
.check-row { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.adm-form-actions { display: flex; gap: 0.7rem; }
.adm-current-img { border: 1px solid var(--line); border-radius: 8px; object-fit: cover; }
.adm-toasts { position: fixed; top: 1rem; right: 1rem; z-index: 300; display: flex; flex-direction: column; gap: 0.5rem; }

/* --- Responsive --- */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
    .intro-grid, .about-body { grid-template-columns: 1fr; gap: 1.5rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .adm-cols { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .product-layout, .cart-layout, .profile-grid { grid-template-columns: 1fr; gap: 1.6rem; }
    .cart-summary { position: static; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .nav-toggle { display: block; }
    .main-nav { display: none; position: absolute; top: 66px; left: 0; right: 0; background: #fff;
        border-bottom: 1px solid var(--line); flex-direction: column; gap: 0; padding: 0.5rem 1.25rem 1rem; }
    .main-nav.open { display: flex; }
    .main-nav a { padding: 0.7rem 0; border-bottom: 1px solid var(--cloud); }
    .account-name { display: none; }
    .cart-row { grid-template-columns: auto auto 1fr; grid-template-rows: auto auto; row-gap: 0.7rem; }
    .cart-row .qty-stepper { grid-column: 2; }
    .cart-row .cart-line { grid-column: 3; text-align: left; }
    .cart-row .row-remove { position: absolute; }
    .cart-row { position: relative; }
    .cart-row .row-remove { top: 0.6rem; right: 0.6rem; }
    .tracker { flex-direction: column; gap: 0.1rem; }
    .tracker li { text-align: left; padding: 0.25rem 0 0.25rem 30px; }
    .tracker li::before { left: 7px; top: -50%; width: 3px; height: 100%; }
    .tracker .dot { left: 0; top: 50%; transform: translateY(-50%); }
    .step-label { max-width: none; }
    .adm-shell { grid-template-columns: 1fr; }
    .adm-side { flex-direction: row; align-items: center; gap: 1rem; overflow-x: auto; padding: 0.9rem 1.1rem; }
    .adm-side nav { flex-direction: row; }
    .adm-side-foot { margin: 0 0 0 auto; flex-direction: row; }
    .adm-body { padding: 1.4rem 1.2rem; }
}
@media (max-width: 520px) {
    .grid-4 { grid-template-columns: 1fr; }
    .hero-slash { opacity: 0.1; }
    .stats-grid { gap: 1rem; }
    .oauth-row { flex-direction: column; }
    .buyers ul { grid-template-columns: 1fr; }
    .field-row { flex-direction: column; }
    .field-row label.narrow { flex: 1; }
}

/* ===== Spec-upgrade components ===== */

/* Wishlist hearts */
.pcard { position: relative; }
.wish-btn {
    position: absolute; top: 10px; right: 10px; z-index: 2;
    width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(12, 26, 44, 0.55); color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer; transition: background .2s, color .2s, transform .15s;
}
.wish-btn:hover { transform: scale(1.08); }
.wish-btn[aria-pressed="true"] { color: var(--gold-400); background: rgba(12, 26, 44, 0.8); }
.wish-btn[aria-pressed="true"] svg { fill: currentColor; }
.wish-btn.inline {
    position: static; width: 46px; height: 46px; border-radius: 12px;
    background: transparent; color: var(--navy); border: 1.5px solid var(--line, #d8dee7);
}
.wish-btn.inline[aria-pressed="true"] { color: var(--gold); border-color: var(--gold); }

/* Product gallery */
.thumb-strip { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.thumb {
    padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden;
    cursor: pointer; background: none; line-height: 0; opacity: .75; transition: opacity .2s, border-color .2s;
}
.thumb img { width: 84px; height: 63px; object-fit: cover; display: block; }
.thumb:hover { opacity: 1; }
.thumb.current { border-color: var(--gold); opacity: 1; }

/* Specifications */
.specs { margin-top: 22px; }
.specs h3 { font-size: 1rem; margin-bottom: 8px; }
.spec-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.spec-table th, .spec-table td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line, #e5e9f0); vertical-align: top; }
.spec-table th { width: 38%; color: var(--navy-800); font-weight: 600; }

/* Shop filter row */
.filter-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; width: 100%; margin-top: 10px; }
.filter-label { font-weight: 600; font-size: .88rem; color: var(--navy-800); }
.filter-row input[type="number"] { width: 96px; }
.filter-dash { color: var(--muted, #6b7a8c); }

/* Inline checkbox + auth row */
.check-inline { display: inline-flex; align-items: center; gap: 8px; font-size: .92rem; cursor: pointer; }
.check-inline input { width: 16px; height: 16px; accent-color: var(--gold); }
.auth-row { display: flex; justify-content: space-between; align-items: center; }
.auth-link { font-size: .9rem; color: var(--navy); text-decoration: underline; }

/* Payment methods */
/* Payment method chooser — whole row is the target, radio state drives the look */
.pay-methods { border: 1px solid var(--line); border-radius: 12px; padding: 0; margin: 0; overflow: hidden; }
.pay-option {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: center; gap: 0.5rem 0.85rem;
    padding: 1rem 1.1rem; cursor: pointer; position: relative;
    border-bottom: 1px solid var(--line);
    transition: background 0.15s ease;
    min-height: 64px;                       /* comfortable tap target */
}
.pay-option:last-child { border-bottom: 0; }
.pay-option:hover { background: rgba(28, 59, 96, 0.03); }
.pay-option input { position: absolute; opacity: 0; pointer-events: none; }
.pay-radio {
    width: 22px; height: 22px; border-radius: 50%; border: 2px solid #B7C2CF;
    display: grid; place-items: center; flex: none; transition: border-color 0.15s ease;
}
.pay-radio::after {
    content: ''; width: 11px; height: 11px; border-radius: 50%;
    background: var(--gold); transform: scale(0); transition: transform 0.15s ease;
}
.pay-option input:checked ~ .pay-radio { border-color: var(--gold); }
.pay-option input:checked ~ .pay-radio::after { transform: scale(1); }
.pay-option:has(input:checked) { background: rgba(201, 150, 47, 0.07); }
.pay-option.selected { background: rgba(201, 150, 47, 0.07); }
.pay-option input:focus-visible ~ .pay-radio { outline: 2px solid var(--gold); outline-offset: 3px; }
.pay-icon { color: var(--navy-800); display: grid; place-items: center; flex: none; }
.pay-text { min-width: 0; }
.pay-text strong { display: block; font-size: 1rem; color: var(--navy-950); }
.pay-text small { display: block; margin-top: 0.15rem; font-size: 0.85rem; color: var(--mist); line-height: 1.4; }
.pay-tags { display: flex; gap: 0.3rem; flex-wrap: wrap; justify-content: flex-end; }
.pay-tag {
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase;
    color: var(--navy-800); background: #EEF2F7; border: 1px solid var(--line);
    padding: 3px 7px; border-radius: 5px; white-space: nowrap;
}
.pay-methods-empty {
    margin: 0; padding: 1rem 1.1rem; color: #8A2226; background: rgba(164, 38, 44, 0.06);
    font-size: 0.9rem; line-height: 1.5;
}

/* Numbered checkout steps */
.step-head { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.2rem; }
.step-head h2 { margin: 0; }
.step-no {
    width: 30px; height: 30px; border-radius: 8px; flex: none;
    background: var(--navy-950); color: var(--gold-400);
    display: grid; place-items: center; font: 800 0.95rem var(--font-display);
}
.step-lead { color: var(--mist); margin: 0 0 0.8rem; }

/* Error summary */
.form-errors {
    background: rgba(164, 38, 44, 0.06); border: 1px solid rgba(164, 38, 44, 0.35);
    border-radius: 10px; padding: 0.85rem 1rem; color: #8A2226;
}
.form-errors strong { display: block; margin-bottom: 0.3rem; }
.form-errors ul { margin: 0; padding-left: 1.1rem; font-size: 0.92rem; }

.place-btn { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; }
.place-total { font-variant-numeric: tabular-nums; }
.sum-count { font: 600 0.8rem var(--font-body); color: var(--mist); margin-left: 0.4rem; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.pay-line { font-size: .88rem; color: var(--muted, #6b7a8c); margin: 2px 0 0; }
.pay-instructions {
    display: grid; gap: 4px; margin: 10px 0 4px; padding: 12px 14px;
    background: rgba(201, 150, 47, 0.08); border: 1px solid rgba(201, 150, 47, 0.35);
    border-radius: 10px; font-size: .92rem;
}

/* Profile extras */
.mini-order { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line, #e5e9f0); }
.mini-order time { display: block; font-size: .82rem; color: var(--muted, #6b7a8c); }

/* Legal pages */
.legal { max-width: 760px; }
.legal h2 { font-size: 1.12rem; margin: 22px 0 8px; }
.legal p { margin: 0 0 10px; line-height: 1.65; }

/* Admin additions */
.adm-longtext { max-width: 340px; }
.adm-inline-form { display: flex; gap: 8px; align-items: center; }
.adm-inline-form input[type="text"] { width: 160px; }
.pill.danger { color: #a4262c; border-color: rgba(164, 38, 44, 0.4); }
.pill.danger:hover { background: rgba(164, 38, 44, 0.08); }
.temp-pass { font-size: 1.05rem; font-weight: 700; letter-spacing: 1px; padding: 2px 8px; background: rgba(201, 150, 47, 0.15); border-radius: 6px; }
.adm-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.adm-subhead { font-size: 1rem; margin: 0 0 10px; }
.adm-gallery { display: flex; gap: 12px; flex-wrap: wrap; }
.adm-gal-item { display: grid; gap: 6px; justify-items: center; }
.adm-gal-item img { border-radius: 8px; object-fit: cover; }

@media (max-width: 820px) {
    .adm-cols { grid-template-columns: 1fr; }
    .filter-row input[type="number"] { width: 80px; }
}

/* ===== Brand-match redesign (wellrestph.com) ===== */

/* Hero slider over the store's real banners */
.hero-slider { min-height: clamp(420px, 62vh, 640px); display: flex; align-items: center; }
.hero-slides, .hero-shade { position: absolute; inset: 0; }
.hero-slide {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    /* 1.8s on the site's own easing curve: the outgoing photo is still moving
       when the incoming one arrives, so the two overlap instead of switching. */
    opacity: 0; transition: opacity 1.8s cubic-bezier(.22, .61, .36, 1);
    will-change: opacity, transform;
}
.hero-slide.current { opacity: 1; }
.hero-shade { background: linear-gradient(100deg, rgba(12, 26, 44, 0.88) 0%, rgba(12, 26, 44, 0.55) 52%, rgba(12, 26, 44, 0.18) 100%); }
.hero-slider .hero-inner { width: 100%; }
.hero-slider .hero-slash { opacity: 0.1; }
.hero-slider .hero-sub { color: #E4EAF2; }

/* Section sub-lines + testimonial score */
.section-sub { color: var(--mist, #6b7a8c); max-width: 560px; margin-top: 0.4rem; }
.big-score { font: 800 2rem var(--font-display); color: var(--gold); margin-top: 0.3rem; }

/* Celebrities' Choice */
.celeb-band { background: linear-gradient(180deg, #fff 0%, #F4F6F9 100%); }
.celeb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; }
.celeb-card { margin: 0; border-radius: var(--radius); overflow: hidden; position: relative; aspect-ratio: 3 / 4; background: var(--navy-950); }
.celeb-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.celeb-card:hover img { transform: scale(1.05); }
.celeb-card figcaption {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 1.6rem 0.9rem 0.7rem;
    background: linear-gradient(180deg, transparent, rgba(12, 26, 44, 0.85));
    color: #fff; font-size: 0.86rem; font-weight: 600;
}

/* Single featured clip fills wider */
.clip-grid.single { grid-template-columns: minmax(0, 720px); justify-content: center; }
.clip-grid.single .clip { aspect-ratio: 16 / 9; }

/* Sale badge, Shopify-style */
.pcard-tag { text-transform: uppercase; letter-spacing: 0.6px; font-weight: 700;
    background: linear-gradient(120deg, var(--gold-400), var(--gold)); color: var(--navy-950); }

/* Customer delivery confirmation */
.received-box {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    margin: 0.9rem 0; padding: 0.9rem 1.1rem; border-radius: 10px;
    background: rgba(201, 150, 47, 0.08); border: 1px dashed rgba(201, 150, 47, 0.5);
    font-size: 0.94rem;
}

/* Footer tagline */
.footer-tagline { font: 700 1.05rem var(--font-display); color: var(--gold-400); margin-bottom: 0.4rem; }

@media (max-width: 820px) {
    .celeb-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .hero-slider { min-height: 480px; }
}

/* Homepage media manager */
.hp .adm-page-head { align-items: flex-start; }
.hp .adm-page-head .muted-line { margin-top: 0.25rem; max-width: 52ch; }
.hp-blurb { color: var(--mist); margin: 0 0 1rem; }
.hp-panel { display: grid; gap: 1.4rem; }

.hp-upload {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.1rem; display: grid; gap: 0.9rem; max-width: 640px;
}
.hp-drop {
    display: block; border: 1.5px dashed rgba(28, 59, 96, 0.35); border-radius: 12px;
    padding: 1.4rem 1rem; text-align: center; cursor: pointer; transition: border-color .2s, background .2s;
}
.hp-drop:hover, .hp-drop.over { border-color: var(--gold); background: rgba(201, 150, 47, 0.06); }
.hp-drop-inner { display: grid; justify-items: center; gap: 0.35rem; color: var(--navy-800); }
.hp-drop-inner small { color: var(--mist); font-size: 0.8rem; }
.hp-drop-picked { display: block; font-weight: 600; color: var(--navy-800); font-size: 0.92rem; word-break: break-all; }

.hp-stage { display: grid; gap: 0.7rem; }
.hp-crop canvas {
    width: 100%; display: block; border-radius: 10px; background: var(--navy-950);
    cursor: grab; touch-action: none;
}
.hp-crop canvas.grabbing { cursor: grabbing; }
.hp-crop-controls { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; margin-top: 0.5rem; }
.hp-zoom { display: flex; align-items: center; gap: 0.5rem; font-size: 0.86rem; font-weight: 600; color: var(--navy-800); }
.hp-zoom input { width: 160px; accent-color: var(--gold); }
.hp-crop-hint { font-size: 0.82rem; color: var(--mist); }
.hp-preview-media { width: 100%; border-radius: 10px; display: block; background: var(--navy-950); object-fit: cover; }

.hp-upload-foot { display: flex; align-items: flex-end; gap: 0.8rem; flex-wrap: wrap; }
.hp-field { flex: 1; min-width: 220px; display: grid; gap: 0.3rem; font-size: 0.88rem; font-weight: 600; color: var(--navy-800); }
.hp-field .optional { font-weight: 400; }
.hp-hint { font-size: 0.82rem; color: var(--mist); margin: 0; }

.hp-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.hp-grid-banners { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.hp-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; display: grid; gap: 0.6rem; padding-bottom: 0.7rem;
}
.hp-thumb { position: relative; background: var(--navy-950); }
.hp-thumb img, .hp-thumb video { width: 100%; display: block; object-fit: cover; }
.hp-grid-banners .hp-thumb img, .hp-grid-banners .hp-thumb video { aspect-ratio: 8 / 3; }
.hp-grid-celebrities .hp-thumb img, .hp-grid-celebrities .hp-thumb video { aspect-ratio: 3 / 4; }
.hp-grid-videos .hp-thumb video { aspect-ratio: 16 / 9; }
.hp-pos {
    position: absolute; top: 8px; left: 8px; background: var(--navy-950); color: var(--gold-400);
    font-size: 0.74rem; font-weight: 700; padding: 2px 7px; border-radius: 999px;
}
.hp-card-name { display: flex; gap: 0.4rem; padding: 0 0.7rem; }
.hp-card-name input { flex: 1; min-width: 0; }
.hp-card-actions { display: flex; gap: 0.4rem; padding: 0 0.7rem; }
.hp-card-actions form { display: contents; }
.hp-card-actions .pill[disabled] { opacity: 0.35; cursor: default; }
.hp-card-actions .pill.danger { margin-left: auto; }
.hp-empty { color: var(--mist); background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); padding: 1.1rem; margin: 0; }

@media (max-width: 620px) {
    .hp-grid, .hp-grid-banners { grid-template-columns: 1fr; }
}

/* Landing clip captions */
.clip-item { margin: 0; }
.clip-item figcaption { margin-top: 0.45rem; font-size: 0.9rem; font-weight: 600; color: var(--navy-800); }

/* ===== Aesthetic pass — premium polish ===== */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Section headings: refined gold rule under every kicker */
.section-head .kicker {
    display: inline-flex; align-items: center; gap: 0.55rem;
    text-transform: uppercase; letter-spacing: 2.5px; font-size: 0.78rem; font-weight: 700;
}
.section-head .kicker::before {
    content: ""; width: 34px; height: 3px; border-radius: 2px;
    background: linear-gradient(90deg, var(--gold-400), var(--gold));
    transform: skewX(-20deg);
}
.section-head h2 { letter-spacing: -0.5px; }

/* Hero: slow Ken Burns drift on the active banner */
@media (prefers-reduced-motion: no-preference) {
    /* Was a single 6% push-in on every slide, which reads as one long static
       shot. These alternate: odd slides push in from the left, even ones pull
       back out to the right, so each change of photo also changes direction.
       12s deliberately outlasts the 7s rotation — the move is still travelling
       when the next dissolve begins, which is what stops it feeling like a
       slideshow. The drift on scroll rides .hero-slides, the parent, so the two
       transforms never touch the same element. */
    .hero-slide.current { animation: kenburnsIn 12s cubic-bezier(.22, .61, .36, 1) forwards; }
    .hero-slide.current:nth-child(even) { animation-name: kenburnsOut; }
}
@keyframes kenburnsIn {
    from { transform: scale(1.02) translate3d(-1.2%, 0.6%, 0); }
    to   { transform: scale(1.16) translate3d(1.4%, -1.2%, 0); }
}
@keyframes kenburnsOut {
    from { transform: scale(1.18) translate3d(1.6%, -1%, 0); }
    to   { transform: scale(1.03) translate3d(-1.4%, 0.8%, 0); }
}
.hero-slider .hero-sub { text-shadow: 0 1px 12px rgba(12, 26, 44, 0.5); }

/* Product cards: gentle lift, gold edge on hover */
.pcard { transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; }
.pcard:hover { transform: translateY(-5px); box-shadow: 0 16px 34px rgba(12, 26, 44, 0.14); border-color: rgba(201, 150, 47, 0.45); }
.collection-card { transition: transform .3s ease, box-shadow .3s ease; }
.collection-card:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(12, 26, 44, 0.12); }

/* Celebrities' Choice: deep navy showcase band */
.celeb-band {
    background:
        radial-gradient(900px 420px at 85% -10%, rgba(201, 150, 47, 0.14) 0%, transparent 55%),
        linear-gradient(180deg, var(--navy-800) 0%, var(--navy-950) 100%);
}
.celeb-band .section-head h2 { color: #fff; }
.celeb-band .section-sub { color: #B9C6D6; }
.gold-kicker { color: var(--gold-400); }
.celeb-band .kicker::before { background: linear-gradient(90deg, var(--gold-400), var(--gold)); }
.celeb-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1.1rem; }
.celeb-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
    transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.celeb-card:hover { transform: translateY(-6px); border-color: rgba(228, 187, 99, 0.65); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35); }
.celeb-card video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.celeb-card figcaption {
    font-family: var(--font-display); letter-spacing: 0.3px;
    padding-bottom: 0.8rem;
}
.celeb-card figcaption::after {
    content: ""; display: block; width: 26px; height: 2px; margin-top: 6px;
    background: linear-gradient(90deg, var(--gold-400), var(--gold));
}

/* Stats: gold numerals, quiet dividers */
.stats-band { background: linear-gradient(180deg, #F7F9FB 0%, #EEF2F6 100%); }
.stat strong { background: linear-gradient(120deg, var(--gold) 0%, #9a6f1c 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Testimonials: oversized quote mark, lift */
.review-card { position: relative; overflow: hidden; transition: transform .3s ease, box-shadow .3s ease; }
.review-card::before {
    content: "\201C"; position: absolute; top: -22px; right: 6px;
    font: 800 7rem/1 var(--font-display); color: rgba(201, 150, 47, 0.12); pointer-events: none;
}
.review-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(12, 26, 44, 0.1); }

/* Buttons: subtle gradient + lift on the primary action */
.btn-gold { background: linear-gradient(135deg, var(--gold-400) 0%, var(--gold) 100%); transition: transform .2s ease, box-shadow .2s ease, filter .2s ease; }
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(201, 150, 47, 0.4); filter: brightness(1.04); }
.btn { transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease; }

/* Footer: gold hairline on top */
.site-footer { border-top: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--gold-400), var(--gold), var(--navy-800)) 1; }

/* ===== "Wellrest up close" video carousel ===== */
.vcar-band { background: var(--navy-950); overflow: hidden; }
.vcar-head .kicker, .vcar-head h2 { color: #fff; }
.vcar-head .kicker { color: var(--gold-400); }
.vcar { position: relative; margin-top: 1.4rem; }
.vcar-stage { position: relative; height: clamp(300px, 46vw, 460px); }
.vcar-item {
    position: absolute; top: 50%; left: 50%; margin: 0;
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0; pointer-events: none; z-index: 1;
    transition: transform 0.45s ease, opacity 0.45s ease, filter 0.45s ease;
    text-align: center;
}
.vcar-item video {
    display: block; border-radius: 14px; background: #000;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.55);
}
.vcar-item.landscape video { width: min(680px, 82vw); aspect-ratio: 16 / 9; height: auto; object-fit: cover; }
.vcar-item.portrait  video { height: clamp(280px, 42vw, 430px); aspect-ratio: 9 / 16; width: auto; object-fit: cover; }
.vcar-item figcaption {
    margin-top: 0.7rem; color: #E4EAF2; font-weight: 600; font-size: 0.95rem;
    opacity: 0; transition: opacity 0.3s ease;
}
.vcar-item.is-active { transform: translate(-50%, -50%) scale(1); opacity: 1; pointer-events: auto; z-index: 3; }
.vcar-item.is-active figcaption { opacity: 1; }
.vcar-item.is-prev, .vcar-item.is-next {
    opacity: 0.5; filter: brightness(0.5); pointer-events: auto; cursor: pointer; z-index: 2;
}
.vcar-item.is-prev { transform: translate(calc(-50% - 58%), -50%) scale(0.62); }
.vcar-item.is-next { transform: translate(calc(-50% + 58%), -50%) scale(0.62); }
.vcar-nav {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
    width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(12, 26, 44, 0.7); color: #fff; font-size: 1.5rem; line-height: 1;
    display: grid; place-items: center; cursor: pointer; transition: background 0.2s, border-color 0.2s;
}
.vcar-nav:hover { background: var(--gold); border-color: var(--gold); color: var(--navy-950); }
.vcar-nav.prev { left: clamp(0px, 3vw, 26px); }
.vcar-nav.next { right: clamp(0px, 3vw, 26px); }

@media (max-width: 640px) {
    .vcar-stage { height: clamp(260px, 88vw, 420px); }
    .vcar-item.is-prev { transform: translate(calc(-50% - 68%), -50%) scale(0.5); }
    .vcar-item.is-next { transform: translate(calc(-50% + 68%), -50%) scale(0.5); }
    .vcar-item.landscape video { width: 88vw; }
}
@media (prefers-reduced-motion: reduce) {
    .vcar-item { transition: none; }
}

/* ===== Delivery map picker ===== */
.map-picker { display: grid; gap: 0.6rem; border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9rem; }
.map-picker-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.map-picker-head strong { display: block; font-size: 0.95rem; }
.map-picker-head .optional { display: block; font-size: 0.82rem; }
.map-search { display: flex; gap: 0.5rem; }
.map-search input { flex: 1; min-width: 0; }
.map-canvas { height: 300px; border-radius: 10px; overflow: hidden; background: #E8EDF3; z-index: 0; }
.map-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; }
.map-status { font-size: 0.84rem; color: var(--mist); }
.map-status.busy { color: var(--gold); }
.leaflet-container { font: inherit; }

/* ===== Payment status ===== */
.pay-chip {
    display: inline-block; margin-left: 0.5rem; padding: 2px 9px; border-radius: 999px;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase;
    background: rgba(28, 59, 96, 0.1); color: var(--navy-800);
}
.pay-chip.paid { background: rgba(31, 122, 76, 0.14); color: #1F7A4C; }
.pay-chip.awaiting { background: rgba(201, 150, 47, 0.18); color: #8A6413; }
.pay-chip.failed { background: rgba(164, 38, 44, 0.12); color: #A4262C; }
.pay-chip.refunded { background: rgba(28, 59, 96, 0.12); color: var(--navy-800); }
.pin-link { font-size: 0.86rem; font-weight: 600; }
.pay-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0.6rem 0 1rem; }
.pay-actions form { display: contents; }

/* ==========================================================================
   Responsive + usability pass — every screen from 320px up
   ========================================================================== */

/* Nothing may push the page sideways on a phone. */
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }
img, video, canvas, svg, iframe { max-width: 100%; }
.container { width: min(1200px, 100% - 2.5rem); }

/* Fluid headings instead of fixed jumps between breakpoints. */
h1 { font-size: clamp(1.9rem, 5.2vw, 3.1rem); }
h2 { font-size: clamp(1.35rem, 3.4vw, 2.1rem); }
.hero h1 { font-size: clamp(2.1rem, 7vw, 3.6rem); }

/* iOS zooms the page when a focused input is under 16px. */
input, select, textarea { font-size: 16px; }
@media (min-width: 700px) { input, select, textarea { font-size: 0.95rem; } }

/* Comfortable, thumb-sized controls everywhere. */
.btn, .pill, button, .nav-toggle { min-height: 40px; }
.btn-sm, .pill { min-height: 36px; }
.qty-stepper button { min-width: 36px; min-height: 36px; }

/* Wide tables scroll inside their card rather than stretching the page. */
.adm-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.adm-table { min-width: 640px; }

@media (max-width: 900px) {
    .adm-stats { grid-template-columns: repeat(2, 1fr); }
    .map-canvas { height: 260px; }
}

@media (max-width: 820px) {
    /* The order summary rides along at the bottom on small screens. */
    .cart-summary { position: static; }
    .place-btn { position: sticky; bottom: 0.6rem; z-index: 5; box-shadow: 0 8px 24px rgba(12, 26, 44, 0.25); }
    .hp-upload, .map-picker { max-width: none; }
    .pay-option { grid-template-columns: auto auto 1fr; padding: 0.9rem; }
    .pay-tags { grid-column: 3; justify-content: flex-start; margin-top: 0.35rem; }
}

@media (max-width: 620px) {
    .section { padding: 2.4rem 0; }
    .page-head { padding: 1.6rem 0 0.8rem; }
    .grid-4, .grid-3, .review-grid, .collection-grid { grid-template-columns: 1fr; }
    .celeb-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; gap: 1.6rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-cta { flex-direction: column; align-items: stretch; }
    .hero-cta .btn { width: 100%; text-align: center; }
    .section-head.split { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
    .map-picker-head { flex-direction: column; align-items: stretch; }
    .map-picker-head .btn { width: 100%; }
    .map-canvas { height: 230px; }
    .adm-page-head { flex-direction: column; align-items: flex-start; gap: 0.7rem; }
    .hp-dialog { width: 100%; max-height: 92vh; }
    .adm-tabs { overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 460px) {
    .container { width: min(1200px, 100% - 1.6rem); }
    .celeb-grid { grid-template-columns: 1fr 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .pay-option { padding: 0.85rem 0.75rem; gap: 0.4rem 0.65rem; }
    .pay-text strong { font-size: 0.95rem; }
    .pay-icon { display: none; }               /* text carries the meaning */
    .pay-option { grid-template-columns: auto 1fr; }
    .pay-tags { grid-column: 2; }
    .place-btn { flex-direction: column; gap: 0.2rem; }
    .adm-side { padding: 0.7rem 0.9rem; }
    .adm-body { padding: 1.1rem 0.9rem; }
}

/* Landscape phones: don't let a tall hero swallow the screen. */
@media (max-height: 500px) and (orientation: landscape) {
    .hero, .hero-slider { min-height: 420px; }
    .vcar-stage { height: 300px; }
}

/* Respect the notch / rounded corners on modern phones. */
@supports (padding: max(0px)) {
    .site-header, .site-footer, .container {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }
}

/* Keyboard users should always see where they are. */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* ==========================================================================
   Checkout — card layout (mobile first)
   ========================================================================== */
.co-head { padding-bottom: 0.4rem; }
.co-steps {
    display: flex; gap: 0.4rem; list-style: none; margin: 0.9rem 0 0; padding: 0;
    font-size: 0.8rem; font-weight: 600; color: var(--mist); flex-wrap: wrap;
}
.co-steps li { display: flex; align-items: center; gap: 0.4rem; padding-right: 0.5rem; }
.co-steps li + li::before { content: ''; width: 14px; height: 1px; background: var(--line); margin-right: 0.5rem; }
.co-steps span {
    width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
    background: #E5EAF1; color: var(--mist); font-size: 0.72rem; font-weight: 700;
}
.co-steps .done span { background: rgba(31, 122, 76, 0.16); color: #1F7A4C; }
.co-steps .current { color: var(--navy-950); }
.co-steps .current span { background: var(--navy-950); color: var(--gold-400); }

.co-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.5rem; align-items: start; }
.co-main { display: grid; gap: 1.1rem; min-width: 0; }

.co-card {
    background: #fff; border: 1px solid var(--line); border-radius: 14px;
    padding: 1.15rem 1.25rem 1.25rem; box-shadow: 0 1px 2px rgba(12, 26, 44, 0.04);
}
.co-card-head { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.co-card-head h2 { margin: 0; font-size: 1.1rem; }
.co-no {
    width: 26px; height: 26px; border-radius: 8px; flex: none;
    background: var(--navy-950); color: var(--gold-400);
    display: grid; place-items: center; font: 800 0.85rem var(--font-display);
}
.co-change { margin-left: auto; }
.co-lead { color: var(--mist); margin: 0 0 0.8rem; font-size: 0.92rem; }

.co-secure {
    margin-left: auto; display: inline-flex; align-items: center; gap: 0.35rem;
    font-size: 0.75rem; font-weight: 700; letter-spacing: 0.2px; color: #1F7A4C;
    background: rgba(31, 122, 76, 0.1); border: 1px solid rgba(31, 122, 76, 0.25);
    padding: 4px 9px; border-radius: 999px;
}

.co-saved { background: #F7F9FC; border: 1px solid var(--line); border-radius: 10px; padding: 0.8rem 0.9rem; }
.co-saved p { margin: 0; }
.co-saved-name { font-size: 0.95rem; }
.co-saved-line { color: var(--navy-800); font-size: 0.92rem; margin-top: 0.15rem !important; }
.co-pinned { margin-top: 0.45rem !important; font-size: 0.84rem; color: #1F7A4C; display: flex; align-items: center; gap: 0.4rem; }
.co-pinned.muted { color: var(--mist); }
.co-pin-dot { width: 8px; height: 8px; border-radius: 50%; background: #1F7A4C; flex: none; }
.co-fields { display: grid; gap: 0.7rem; margin-top: 0.2rem; }
.co-card .map-picker { margin-top: 0.9rem; }

.pay-divider {
    margin: 0; padding: 0.55rem 1.1rem; font-size: 0.74rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.6px; color: var(--mist);
    background: #F7F9FC; border-bottom: 1px solid var(--line);
}
.co-note { font-size: 0.85rem; color: var(--mist); margin: 0.75rem 0 0; }

.co-summary { position: sticky; top: 84px; }
.co-items { list-style: none; margin: 0 0 0.9rem; padding: 0; display: grid; gap: 0.75rem; }
.co-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 0.7rem; align-items: center; }
.co-item-img { border-radius: 8px; object-fit: contain; background: #fff; width: 56px; height: 56px; }
.co-item-text { min-width: 0; }
.co-item-text strong { display: block; font-size: 0.9rem; line-height: 1.3; }
.co-item-text small { color: var(--mist); font-size: 0.8rem; }
.co-item-sum { font-weight: 700; font-size: 0.9rem; white-space: nowrap; font-variant-numeric: tabular-nums; }

.co-totals { margin: 0 0 1rem; padding-top: 0.9rem; border-top: 1px solid var(--line); display: grid; gap: 0.45rem; }
.co-totals > div { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.92rem; }
.co-totals dt { color: var(--mist); margin: 0; }
.co-totals dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.co-free { color: #1F7A4C; font-weight: 700; }
.co-discount dd { color: #1F7A4C; }
.co-grand { padding-top: 0.55rem; margin-top: 0.2rem; border-top: 1px dashed var(--line); }
.co-grand dt { color: var(--navy-950); font-weight: 700; font-size: 1rem; }
.co-grand dd { font: 800 1.25rem var(--font-display); color: var(--navy-950); }
.co-fineprint { font-size: 0.76rem; color: var(--mist); margin: 0.7rem 0 0; text-align: center; }

@media (max-width: 960px) {
    .co-layout { grid-template-columns: 1fr; }
    .co-summary { position: static; }
}
@media (max-width: 620px) {
    .co-card { padding: 1rem; border-radius: 12px; }
    .co-card-head h2 { font-size: 1.02rem; }
    .co-change { margin-left: 0; width: 100%; }
    .co-secure { margin-left: 0; }
    .co-steps { font-size: 0.74rem; }
    .co-item { grid-template-columns: 44px 1fr auto; }
    .co-item-img { width: 44px; height: 44px; }
    /* Total and button stay reachable while the summary scrolls. */
    .co-summary .place-btn { position: sticky; bottom: 0.5rem; }
}

/* Payment result page */
.pay-result { max-width: 620px; margin: 0 auto; }
.pr-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 2rem 1.6rem; text-align: center; }
.pr-card h1 { font-size: clamp(1.5rem, 4vw, 2rem); margin: 0 0 0.5rem; }
.pr-mark {
    width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 1rem;
    display: grid; place-items: center; background: rgba(31, 122, 76, 0.12); color: #1F7A4C;
}
.pr-card.fail h1 { color: #A4262C; }
.pr-lead { color: var(--navy-800); margin: 0 auto 1.4rem; max-width: 46ch; }
.pr-facts { display: grid; gap: 0.5rem; margin: 0 0 1.2rem; text-align: left;
    background: #F7F9FC; border: 1px solid var(--line); border-radius: 10px; padding: 0.9rem 1rem; }
.pr-facts > div { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.9rem; }
.pr-facts dt { color: var(--mist); margin: 0; }
.pr-facts dd { margin: 0; font-weight: 600; }
.pr-items { list-style: none; margin: 0 0 1.2rem; padding: 0; text-align: left; display: grid; gap: 0.4rem; font-size: 0.9rem; }
.pr-items li { display: flex; justify-content: space-between; gap: 1rem; }
.pr-next { font-size: 0.88rem; color: var(--mist); margin: 0 0 1.2rem; }
.pr-actions { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; }
.pr-actions .btn { min-width: 170px; }
.pr-redirect { font-size: 0.78rem; color: var(--mist); margin: 1rem 0 0; }
@media (max-width: 480px) {
    .pr-card { padding: 1.4rem 1rem; }
    .pr-actions .btn { width: 100%; }
}

/* ==========================================================================
   Marketplace-style product cards + phone tab bar
   ========================================================================== */

/* Two per row on phones, like Shopee/Lazada — never a single stretched card. */
.grid-4, .grid-3 { display: grid; gap: 1rem; }
@media (max-width: 620px) {
    .grid-4, .grid-3, .collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
    .review-grid { grid-template-columns: 1fr; }
}
@media (max-width: 360px) {
    .grid-4, .grid-3 { gap: 0.5rem; }
}

.pcard-off {
    position: absolute; top: 0; right: 0; z-index: 2;
    background: #D4373F; color: #fff; font: 800 0.76rem var(--font-body);
    padding: 4px 7px; border-bottom-left-radius: 8px; letter-spacing: 0.2px;
}
.pcard-oos-veil {
    position: absolute; inset: 0; display: grid; place-items: center; z-index: 2;
    background: rgba(12, 26, 44, 0.55); color: #fff; font-weight: 700; font-size: 0.9rem;
}
.pcard-name {
    font-size: 0.92rem; margin: 0; min-height: 2.4em; line-height: 1.25;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pcard-price { display: flex; align-items: baseline; gap: 0.4rem; flex-wrap: wrap; }
.pcard-price strong { font: 800 1.08rem var(--font-display); color: var(--gold); }
.pcard-price s { font: 400 0.78rem var(--font-body); color: var(--mist); }
.pcard-chips { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.pchip {
    font-size: 0.63rem; font-weight: 700; letter-spacing: 0.2px; text-transform: uppercase;
    color: var(--navy-800); background: #EEF2F7; border-radius: 4px; padding: 2px 5px; white-space: nowrap;
}
.pchip.ship { color: #1F7A4C; background: rgba(31, 122, 76, 0.1); }
.pcard-meta { display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; color: var(--mist); }
.pcard-star { display: inline-flex; align-items: center; gap: 0.2rem; color: var(--gold); font-weight: 700; }
.pcard-star.new { color: var(--mist); font-weight: 600; }
.pcard-sold { margin-left: auto; }
.pcard-add { width: 100%; margin-top: 0.15rem; }
.pcard-body { padding: 0.75rem 0.8rem 0.85rem; gap: 0.4rem; }

@media (max-width: 620px) {
    .pcard-body { padding: 0.6rem 0.6rem 0.7rem; gap: 0.32rem; }
    .pcard-name { font-size: 0.84rem; }
    .pcard-price strong { font-size: 0.98rem; }
    .pcard-add { font-size: 0.78rem; padding: 0.45rem 0.5rem; min-height: 36px; }
    .wish-btn { width: 30px; height: 30px; top: 6px; right: 6px; }
}

/* Phone tab bar */
.tabbar { display: none; }
@media (max-width: 820px) {
    .tabbar {
        display: grid; grid-template-columns: repeat(5, 1fr);
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
        background: #fff; border-top: 1px solid var(--line);
        padding-bottom: env(safe-area-inset-bottom);
        box-shadow: 0 -2px 14px rgba(12, 26, 44, 0.07);
    }
    .tabbar a {
        display: grid; justify-items: center; gap: 2px; padding: 0.5rem 0.2rem 0.45rem;
        font-size: 0.66rem; font-weight: 600; color: var(--mist); text-decoration: none;
        min-height: 52px;
    }
    .tabbar a.active { color: var(--gold); }
    .tabbar a:active { background: rgba(201, 150, 47, 0.08); }
    .tabbar-bubble { position: relative; display: grid; place-items: center; }
    .tabbar-count {
        position: absolute; top: -5px; right: -9px; min-width: 17px; height: 17px; padding: 0 4px;
        border-radius: 999px; background: #D4373F; color: #fff;
        font-size: 0.62rem; font-weight: 700; display: grid; place-items: center;
    }
    .tabbar-count.hidden { display: none; }
    /* Keep the footer and sticky buttons clear of the bar. */
    body { padding-bottom: 62px; }
    .place-btn, .co-summary .place-btn { bottom: 68px; }
    .site-footer { margin-bottom: 0; }
    /* The header keeps Home/Shop/About for tablets; phones use the bar below. */
    .cart-link { display: none; }
}

/* ==========================================================================
   Phone navigation: header menu complements the bottom bar
   ========================================================================== */
@media (max-width: 820px) {
    /* The cinematic storefront owns the mobile header and expanded menu. */
    /* Profile stays top-right where people reach for it. */
    .header-actions { margin-left: auto; gap: 0.5rem; }
    .account-name { display: none; }
    .account-btn { padding: 0; }
    .avatar { width: 34px; height: 34px; font-size: 0.9rem; }
}

/* Smoother tab bar: transitions and a clear active state */
.tabbar a, .tabbar-more {
    transition: color 0.18s ease, background 0.18s ease;
    position: relative; background: none; border: 0; font: inherit; cursor: pointer;
}
.tabbar a svg, .tabbar-more svg { transition: transform 0.18s ease; }
.tabbar a.active svg, .tabbar-more.active svg { transform: translateY(-2px) scale(1.06); }
.tabbar a.active::before, .tabbar-more.active::before {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 26px; height: 3px; border-radius: 0 0 3px 3px;
    background: linear-gradient(90deg, var(--gold-400), var(--gold));
}
.tabbar-more { display: grid; justify-items: center; gap: 2px; padding: 0.5rem 0.2rem 0.45rem;
    font-size: 0.66rem; font-weight: 600; color: var(--mist); min-height: 52px; }
.tabbar-more.active { color: var(--gold); }

/* ==========================================================================
   Admin: top bar, account menu, mobile bottom nav, card tables
   ========================================================================== */
.adm-topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 0.6rem 0 1rem; margin-bottom: 0.4rem; border-bottom: 1px solid var(--line);
}
.adm-topbrand { display: none; align-items: center; gap: 0.5rem; font: 800 0.95rem var(--font-display);
    color: var(--navy-950); letter-spacing: 1px; text-transform: uppercase; }
/* No .wm-slash is emitted inside .adm-topbrand — that element renders the page
   title, not the brand. Rule removed rather than left as decoration for markup
   that does not exist. */
.adm-account { position: relative; margin-left: auto; }
.adm-avatar-btn { display: flex; align-items: center; gap: 0.5rem; background: none; border: 0; cursor: pointer;
    padding: 0.25rem 0.4rem; border-radius: 999px; }
.adm-avatar-btn:hover { background: rgba(28, 59, 96, 0.06); }
.adm-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
    background: var(--navy-950); color: var(--gold-400); font: 800 0.9rem var(--font-display); }
.adm-account-name { font-size: 0.88rem; font-weight: 600; color: var(--navy-800); }
.adm-account-drop {
    position: absolute; right: 0; top: calc(100% + 8px); min-width: 190px; z-index: 40;
    background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0.4rem;
    box-shadow: 0 12px 30px rgba(12, 26, 44, 0.16); display: none;
}
.adm-account.open .adm-account-drop { display: block; }
.adm-account-full { display: block; padding: 0.5rem 0.7rem 0.4rem; font-size: 0.8rem; color: var(--mist);
    border-bottom: 1px solid var(--line); margin-bottom: 0.3rem; }
.adm-account-drop a { display: block; padding: 0.5rem 0.7rem; border-radius: 8px; font-size: 0.9rem; color: var(--navy-800); }
.adm-account-drop a:hover { background: var(--cloud); }

.adm-toolbar { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.adm-search-wrap { position: relative; flex: 1; min-width: 210px; display: flex; align-items: center; }
.adm-search-wrap svg { position: absolute; left: 11px; color: var(--mist); pointer-events: none; }
.adm-search { width: 100%; padding-left: 34px; }
.adm-count { font-size: 0.8rem; color: var(--mist); white-space: nowrap; }
.adm-exports { display: flex; gap: 0.35rem; margin-left: auto; }
.adm-exports .pill { text-decoration: none; }
.adm-empty-row td { color: var(--mist); font-style: italic; }

.adm-create { border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 1rem; }
.adm-create > summary { padding: 0.8rem 1rem; font-weight: 700; cursor: pointer; font-size: 0.95rem; }
.adm-create[open] > summary { border-bottom: 1px solid var(--line); }
.adm-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0.8rem; padding: 1rem; align-items: end; }
.adm-form-grid label { display: grid; gap: 0.3rem; font-size: 0.85rem; font-weight: 600; color: var(--navy-800); }
.adm-form-grid label.wide { grid-column: 1 / -1; }
.adm-form-grid label.narrow { max-width: 190px; }
.adm-form-grid .btn { align-self: end; }

.adm-row-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; align-items: flex-start; }
.adm-inline-edit > summary { list-style: none; cursor: pointer; display: inline-flex; }
.adm-inline-edit > summary::-webkit-details-marker { display: none; }
.adm-inline-edit[open] { position: relative; }
.adm-inline-edit[open] > .adm-inline-form {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(330px, 78vw);
    background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0.7rem;
    box-shadow: 0 12px 30px rgba(12, 26, 44, 0.18); display: grid; gap: 0.45rem;
}
.adm-inline-edit textarea, .adm-inline-edit input, .adm-inline-edit select { width: 100%; }
/* The edit panel is absolutely positioned BELOW its row, but .adm-tablewrap has
   overflow-x: auto — and setting one axis to anything but visible makes the
   other clip too. So the panel was being cut off by its own scroll container,
   worst when a search leaves a single short row with nothing beneath it.
   While a panel is open the wrapper stops clipping; the rest of the time it
   keeps its horizontal scrolling for wide tables. */
/* padding-bottom leaves room beneath the last row, so the panel is not flush
   against the page edge when the table is short. */
.adm-tablewrap:has(.adm-inline-edit[open]) { overflow: visible; padding-bottom: 260px; }
/* Fallback for browsers without :has() — the panel opens ABOVE the row instead,
   where there is always the table to sit against rather than empty page. */
@supports not selector(:has(*)) {
    .adm-inline-edit[open] > .adm-inline-form { top: auto; bottom: calc(100% + 6px); }
}

.adm-keynote {
    display: flex; gap: 0.8rem; align-items: flex-start; margin-bottom: 1.1rem;
    background: rgba(201, 150, 47, 0.09); border: 1px solid rgba(201, 150, 47, 0.4);
    border-radius: 12px; padding: 0.9rem 1rem; color: var(--navy-800);
}
.adm-keynote svg { color: var(--gold); flex: none; margin-top: 2px; }
.adm-keynote strong { display: block; font-size: 0.93rem; }
.adm-keynote span { display: block; font-size: 0.86rem; color: var(--mist); margin-top: 0.15rem; }
.adm-keynote-warn { color: #A4262C !important; }

/* ---------- Admin app bar, section rail, and menu drawer ---------- */
.adm-menu-btn { display: none; }
.adm-rail { display: none; }

.adm-drawer { position: fixed; inset: 0; z-index: 80; background: rgba(12, 26, 44, 0.5); display: flex; }
.adm-drawer-panel {
    background: var(--navy-950); color: #fff; width: min(304px, 86vw); height: 100%;
    display: flex; flex-direction: column; overflow-y: auto;
    padding-bottom: env(safe-area-inset-bottom);
    animation: drawerIn 0.22s cubic-bezier(.2,.8,.3,1);
}
@keyframes drawerIn { from { transform: translateX(-16px); opacity: .4; } to { transform: none; opacity: 1; } }
.adm-drawer-head {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1.1rem 1rem 0.9rem; padding-top: max(1.1rem, env(safe-area-inset-top));
    border-bottom: 1px solid rgba(255, 255, 255, 0.12); flex: none;
}
.adm-drawer-close { background: none; border: 0; color: #B9C6D4; cursor: pointer;
    width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; }
.adm-drawer-close:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.adm-drawer-nav { display: flex; flex-direction: column; padding: 0.6rem 0.6rem 1.4rem; gap: 1px; }
.adm-drawer-group {
    font-size: 0.68rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
    color: #7E8FA1; padding: 0.9rem 0.7rem 0.35rem;
}
.adm-drawer-nav a {
    display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem;
    border-radius: 9px; color: #D5DEE9; font-weight: 600; font-size: 0.95rem; min-height: 46px;
}
.adm-drawer-nav a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.adm-drawer-nav a.active { background: linear-gradient(135deg, var(--gold-400), var(--gold)); color: var(--navy-950); }
body.drawer-open { overflow: hidden; }

@media (max-width: 820px) {
    .adm-side { display: none; }
    .adm-shell { grid-template-columns: 1fr; }
    .adm .tabbar { display: none; }

    /* A navy bar reads as a header; a white one reads as page content. */
    .adm-topbar {
        position: sticky; top: 0; z-index: 45;
        display: flex; align-items: center; gap: 0.7rem;
        margin: -0.9rem -1rem 0; padding: 0.6rem 0.9rem;
        padding-top: max(0.6rem, env(safe-area-inset-top));
        background: var(--navy-950); border: 0; box-shadow: 0 2px 10px rgba(12, 26, 44, 0.18);
    }
    .adm-menu-btn {
        display: inline-flex; align-items: center; gap: 0.4rem; flex: none;
        background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.28);
        color: #fff; border-radius: 999px; padding: 0.42rem 0.8rem 0.42rem 0.65rem;
        font: 700 0.82rem var(--font-body); min-height: 40px; cursor: pointer; margin-left: 0;
    }
    .adm-menu-btn:active { background: rgba(255, 255, 255, 0.24); }
    .adm-topbrand {
        display: block; color: #fff; font: 700 1rem var(--font-display);
        text-transform: none; letter-spacing: 0; flex: 1; min-width: 0;
        overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }

    .adm-account { margin-left: 0; }
    .adm-avatar-btn { padding: 0; }
    .adm-avatar-btn:hover { background: rgba(255, 255, 255, 0.12); }
    .adm-account-name { display: none; }
    .adm-avatar { border: 1px solid rgba(255, 255, 255, 0.3); }

    /* Every section, always visible — no navigation hidden behind an icon. */
    .adm-rail {
        display: flex; gap: 0.4rem; position: sticky; top: 52px; z-index: 44;
        margin: 0 -1rem 0.9rem; padding: 0.55rem 0.9rem;
        background: #fff; border-bottom: 1px solid var(--line);
        overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .adm-rail::-webkit-scrollbar { display: none; }
    .adm-rail a {
        display: inline-flex; align-items: center; gap: 0.35rem; flex: none;
        padding: 0.42rem 0.85rem; border-radius: 999px; min-height: 36px;
        background: var(--cloud); color: var(--navy-800);
        font: 600 0.84rem var(--font-body); border: 1px solid transparent;
    }
    .adm-rail a.active {
        background: linear-gradient(135deg, var(--gold-400), var(--gold));
        color: var(--navy-950); font-weight: 700;
    }
    .adm-rail-badge { background: #D4373F; color: #fff; font-size: 0.66rem; font-weight: 700;
        padding: 1px 6px; border-radius: 999px; }

    .adm-body { padding: 0.9rem 1rem calc(1.4rem + env(safe-area-inset-bottom)); }
    .adm-page-head h1 { font-size: 1.35rem; }
    .adm-page-head { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
    .adm-head-actions { width: 100%; flex-wrap: wrap; gap: 0.4rem; }
    .adm-head-actions .btn { flex: 1; min-width: 128px; justify-content: center; text-align: center; }
    .adm-stats { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
    .adm-stat { padding: 0.8rem 0.9rem; }
    .adm-stat strong { font-size: 1.25rem; }
    .adm-toolbar { gap: 0.5rem; }
    .adm-exports { margin-left: 0; width: 100%; }
    .adm-exports .pill { flex: 1; text-align: center; min-height: 40px; display: grid; place-items: center; }
    .adm-form-grid { grid-template-columns: 1fr; padding: 0.85rem; }
    .adm-form-grid label.narrow { max-width: none; }
    .adm-form-grid .btn { width: 100%; }
    .adm-tabs { overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .adm-tabs::-webkit-scrollbar { display: none; }

    /* Tables become cards: each cell labelled, nothing scrolls off screen. */
    .adm-table, .adm-table thead, .adm-table tbody, .adm-table tr, .adm-table td, .adm-table th { display: block; }
    .adm-table { min-width: 0; }
    .adm-table thead { display: none; }
    .adm-tablewrap { overflow: visible; }
    .adm-table tr {
        background: #fff; border: 1px solid var(--line); border-radius: 12px;
        padding: 0.85rem 0.95rem; margin-bottom: 0.7rem;
        box-shadow: 0 1px 2px rgba(12, 26, 44, 0.04);
    }
    .adm-table td {
        border: 0; padding: 0.32rem 0; display: grid; grid-template-columns: 40% 1fr;
        gap: 0.8rem; align-items: baseline; font-size: 0.92rem;
    }
    .adm-table td::before {
        content: attr(data-label); font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
        letter-spacing: 0.4px; color: var(--mist);
    }
    .adm-table td:not([data-label]) { display: block; }
    .adm-table td:not([data-label])::before { content: ''; }
    .adm-row-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; padding-top: 0.6rem; margin-top: 0.4rem;
        border-top: 1px solid var(--line); }
    .adm-row-actions .pill { flex: 1; min-width: 84px; text-align: center; min-height: 40px;
        display: grid; place-items: center; }
    .adm-row-actions .pill.danger { margin-left: 0; }
    .adm-inline-edit { flex: 1; min-width: 84px; }
    .adm-inline-edit > summary { width: 100%; justify-content: center; }
    .adm-inline-edit[open] > .adm-inline-form { position: static; width: 100%; box-shadow: none; margin-top: 0.4rem; }
    .adm-prod img { width: 40px; height: 40px; }
}

@media (max-width: 460px) {
    .adm-stats { grid-template-columns: 1fr; }
    .adm-table td { grid-template-columns: 1fr; gap: 0.1rem; }
    .adm-body { padding: 0.8rem 0.75rem calc(1.2rem + env(safe-area-inset-bottom)); }
    .adm-topbar { margin: -0.8rem -0.75rem 0; padding: 0.55rem 0.75rem; }
    .adm-rail { margin: 0 -0.75rem 0.8rem; padding: 0.5rem 0.75rem; }
    .adm-menu-btn span { display: none; }     /* the icon alone once space is tight */
    .adm-menu-btn { padding: 0.42rem 0.62rem; }
}

/* Branch listings */
.footer-branch { display: grid; gap: 0.1rem; margin-bottom: 0.7rem; }
.footer-branch strong { font-size: 0.88rem; color: var(--gold-400); }
.footer-branch address { font-style: normal; font-size: 0.85rem; }
.footer-branch span { font-size: 0.8rem; opacity: 0.75; }
.branch-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.9rem; margin-top: 1rem; }
.branch { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 0.8rem 0.9rem; display: grid; gap: 0.15rem; }
.branch strong { font-size: 0.92rem; }
.branch span { font-size: 0.85rem; color: var(--mist); }
.branch-hours { color: var(--gold) !important; font-weight: 600; }
.cat-branches { display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap; margin: 0 0 0.8rem; }
.cat-branches div { display: grid; gap: 0.1rem; font-size: 0.8rem; }
.cat-branches strong { font-size: 0.86rem; color: #0C1A2C; }

/* ==========================================================================
   Live chat — customer widget + admin console
   ========================================================================== */

/* ---- Launcher ---- */
.chat-fab {
    position: fixed; right: 20px; bottom: 20px; z-index: 120;   /* above .site-header (100) */
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.75rem 1.2rem; border: 0; border-radius: 999px; cursor: pointer;
    background: linear-gradient(135deg, #16304F, var(--navy-950));
    color: #fff; font: 700 0.9rem var(--font-body);
    box-shadow: 0 12px 30px rgba(12, 26, 44, 0.34);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.chat-fab:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(12, 26, 44, 0.4); }
.chat-fab:active { transform: translateY(0); }
.chat-fab svg { color: var(--gold-400); }
.chat-badge {
    position: absolute; top: -4px; right: -4px; min-width: 21px; height: 21px; padding: 0 6px;
    border-radius: 999px; background: #D4373F; color: #fff; border: 2px solid #fff;
    font-size: 0.66rem; font-weight: 700; display: grid; place-items: center;
}

/* ---- Panel ---- */
.chat-panel {
    position: fixed; right: 20px; bottom: 92px; z-index: 400;   /* over the sticky header and tab bar */
    width: min(392px, calc(100vw - 40px));
    height: min(620px, calc(100vh - 150px));
    background: #fff; border-radius: 20px; overflow: hidden;
    display: flex; flex-direction: column;
    box-shadow: 0 24px 64px rgba(12, 26, 44, 0.32), 0 2px 8px rgba(12, 26, 44, 0.1);
    animation: chatIn 0.22s cubic-bezier(.2,.8,.3,1);
}
@keyframes chatIn { from { transform: translateY(16px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }

.chat-head {
    display: flex; align-items: center; gap: 0.75rem; flex: none;
    padding: 0.95rem 0.95rem 0.95rem 1.05rem;
    background: linear-gradient(135deg, #1B3A5E 0%, var(--navy-950) 100%);
    color: #fff; padding-top: max(0.95rem, env(safe-area-inset-top));
    border-bottom: 2px solid var(--gold);
}
.chat-head-text { min-width: 0; flex: 1; }
.chat-row .chat-msg { min-width: 0; }
.chat-head strong { display: block; font: 700 1rem var(--font-display); line-height: 1.2; }
.chat-head span { display: block; font-size: 0.76rem; color: #A9BACD; margin-top: 0.12rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-close {
    display: inline-flex; align-items: center; gap: 0.35rem; flex: none; cursor: pointer;
    background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.26);
    color: #fff; border-radius: 999px; padding: 0.4rem 0.75rem 0.4rem 0.6rem;
    font: 700 0.78rem var(--font-body); min-height: 36px;
    transition: background 0.15s ease;
}
.chat-close:hover { background: rgba(255, 255, 255, 0.26); }
.chat-back { display: none; }

/* ---- Avatars ---- */
.chat-avatar {
    position: relative; width: 34px; height: 34px; border-radius: 50%; flex: none;
    display: grid; place-items: center; font: 800 0.85rem var(--font-display);
    background: linear-gradient(140deg, var(--gold-400), var(--gold)); color: var(--navy-950);
}
.chat-avatar.mine { background: #E4E9F0; color: var(--navy-800); }
.chat-avatar.lg { width: 54px; height: 54px; font-size: 1.35rem; }
.chat-dot {
    position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%;
    background: #3FBF6F; border: 2px solid var(--navy-950);
}
.chat-row .chat-avatar { width: 28px; height: 28px; font-size: 0.72rem; }

/* ---- Name step ---- */
.chat-intro {
    padding: 1.8rem 1.3rem; display: grid; gap: 0.75rem; justify-items: center; text-align: center;
    flex: none; background: linear-gradient(180deg, #F7F9FC, #fff);
    border-bottom: 1px solid var(--line);
}
.chat-intro-lead { margin: 0.3rem 0 0; font: 700 1.05rem var(--font-display); color: var(--navy-950); max-width: 22ch; line-height: 1.35; }
.chat-intro input { width: 100%; max-width: 290px; text-align: center; border-radius: 12px; min-height: 46px; }
.chat-intro .btn { width: 100%; max-width: 290px; min-height: 46px; }
.chat-intro-note { font-size: 0.75rem; color: var(--mist); max-width: 30ch; line-height: 1.5; }
/* Email step (2026-10-22): optional "send me offers" tick, and who the guest is chatting as. */
.chat-intro-offers { display: flex; gap: 0.6rem; align-items: flex-start; width: 100%; max-width: 290px; text-align: left; font-size: 0.82rem; line-height: 1.45; color: #3E4855; cursor: pointer; }
.chat-intro-offers input, body.cine .chat-intro .chat-intro-offers input { width: 20px; max-width: none; height: 20px; min-height: 0; margin: 0; padding: 0; flex: none; border-radius: 4px; accent-color: var(--navy-950); }
.chat-intro-opt { color: #6B7480; }
.chat-intro-note a { color: inherit; text-decoration: underline; }
.chat-as { margin: 0.8rem auto 0; width: fit-content; max-width: calc(100% - 2rem); padding: 0.3rem 0.75rem; border-radius: 999px; background: #E8ECF2; color: #3E4855; font-size: 0.75rem; text-align: center; overflow-wrap: anywhere; }

/* ---- Message list ---- */
.chat-scroll {
    flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch; background: #F4F7FB; scroll-behavior: smooth;
}
.chat-log { display: flex; flex-direction: column; gap: 0.25rem; padding: 1rem 0.9rem 1.1rem; min-height: 100%; }
.chat-empty { margin: auto; text-align: center; color: var(--mist); font-size: 0.9rem;
    display: grid; gap: 0.5rem; justify-items: center; padding: 0.5rem; }
.chat-empty p { margin: 0; max-width: 26ch; line-height: 1.5; }
.chat-empty-title { font: 700 1.05rem var(--font-display); color: var(--navy-950); }
.chat-hours-list { list-style: none; margin: 0.6rem 0 0; padding: 0.7rem 0.9rem; display: grid; gap: 0.3rem;
    background: #fff; border: 1px solid var(--line); border-radius: 12px; font-size: 0.78rem; text-align: left; }
.chat-hours-list strong { display: block; color: var(--navy-950); font-size: 0.8rem; }
.chat-day {
    align-self: center; font-size: 0.7rem; font-weight: 600; color: var(--mist);
    background: #E3E9F1; padding: 3px 12px; border-radius: 999px; margin: 0.7rem 0 0.45rem;
}

.chat-row { display: flex; align-items: flex-end; gap: 0.5rem; max-width: 86%; }
.chat-row.them { align-self: flex-start; }
.chat-row.me { align-self: flex-end; flex-direction: row-reverse; }
.chat-row.grouped { margin-top: -0.1rem; }
.chat-row.grouped.them { padding-left: calc(28px + 0.5rem); }
.chat-row.grouped.me { padding-right: calc(28px + 0.5rem); }
.chat-row .chat-avatar { align-self: flex-end; margin-bottom: 1px; }

.chat-msg { padding: 0.6rem 0.85rem; border-radius: 18px; max-width: 100%; flex: 0 1 auto; }
.chat-msg p { margin: 0; font-size: 0.92rem; line-height: 1.5; white-space: pre-wrap;
    overflow-wrap: break-word; word-break: normal; hyphens: none; }
.chat-msg time { display: block; font-size: 0.65rem; opacity: 0.55; margin-top: 0.25rem; }
.chat-row.me .chat-msg {
    background: linear-gradient(135deg, #1B3A5E, var(--navy-950)); color: #fff;
    border-bottom-right-radius: 6px; box-shadow: 0 2px 8px rgba(12, 26, 44, 0.18);
}
.chat-row.me.grouped .chat-msg { border-bottom-right-radius: 18px; border-top-right-radius: 7px; }
.chat-row.them .chat-msg {
    background: #fff; color: var(--navy-950); border: 1px solid #E3E9F1;
    border-bottom-left-radius: 6px; box-shadow: 0 1px 3px rgba(12, 26, 44, 0.06);
}
.chat-row.them.grouped .chat-msg { border-bottom-left-radius: 18px; border-top-left-radius: 7px; }
.chat-row.pending .chat-msg { opacity: 0.55; }
.chat-warn { align-self: center; font-size: 0.8rem; color: #A4262C; background: rgba(164,38,44,0.08);
    padding: 0.35rem 0.7rem; border-radius: 8px; }

/* ---- Jump to latest ---- */
.chat-jump {
    position: absolute; left: 50%; transform: translateX(-50%); bottom: 88px; z-index: 3;
    display: inline-flex; align-items: center; gap: 0.35rem;
    background: var(--navy-950); color: #fff; border: 0; border-radius: 999px;
    padding: 0.45rem 0.9rem; font: 700 0.76rem var(--font-body); cursor: pointer;
    box-shadow: 0 8px 22px rgba(12, 26, 44, 0.34);
}

/* ---- Composer ---- */
.chat-error {
    margin: 0; padding: 0.55rem 0.95rem; font-size: 0.8rem; flex: none;
    background: rgba(164, 38, 44, 0.08); color: #A4262C; border-top: 1px solid rgba(164, 38, 44, 0.22);
}
.chat-form { padding: 0.7rem; background: #fff; flex: none; border-top: 1px solid var(--line);
    padding-bottom: max(0.7rem, env(safe-area-inset-bottom)); }
.chat-field {
    display: flex; align-items: flex-end; gap: 0.4rem; padding: 0.25rem 0.25rem 0.25rem 0.35rem;
    background: #F4F7FB; border: 1px solid var(--line); border-radius: 24px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.chat-field:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 150, 47, 0.16); }
.chat-field textarea {
    flex: 1; resize: none; min-height: 40px; max-height: 120px; border: 0; background: none;
    padding: 0.55rem 0.6rem; line-height: 1.45; box-shadow: none;
}
.chat-field textarea:focus { outline: none; box-shadow: none; }
.chat-send {
    width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; cursor: pointer;
    background: linear-gradient(140deg, var(--gold-400), var(--gold)); color: var(--navy-950);
    display: grid; place-items: center; transition: transform 0.12s ease, filter 0.15s ease;
}
.chat-send:hover { filter: brightness(1.06); }
.chat-send:active { transform: scale(0.93); }
.chat-send:disabled { opacity: 0.45; cursor: default; }

/* ---- Tablet ---- */
@media (max-width: 900px) and (min-width: 621px) {
    .chat-panel { width: min(424px, calc(100vw - 40px)); height: min(660px, calc(100vh - 140px)); }
}

/* ---- Phone: full screen ---- */
@media (max-width: 620px) {
    .chat-fab { right: 14px; bottom: 76px; padding: 0.68rem 0.95rem; }
    .chat-fab-label { display: none; }
    .chat-panel {
        right: 0; left: 0; bottom: 0; top: 0; width: 100%; height: 100%;
        max-height: 100dvh; border-radius: 0; animation: chatSheet 0.2s ease;
    }
    @keyframes chatSheet { from { transform: translateY(20px); opacity: .5; } to { transform: none; opacity: 1; } }
    .chat-row { max-width: 90%; }
    .chat-jump { bottom: 96px; }
    body.chat-open { overflow: hidden; }
    body.chat-open .tabbar { display: none; }
}

/* ---- Landscape phone: give the messages the height ---- */
@media (max-height: 500px) and (orientation: landscape) {
    .chat-head { padding-top: 0.5rem; padding-bottom: 0.5rem; }
    .chat-head span { display: none; }
    .chat-intro { padding: 0.9rem; }
    .chat-hours-list { display: none; }
}

/* ==========================================================================
   Admin conversation console
   ========================================================================== */
.chat-console {
    display: grid; grid-template-columns: minmax(240px, 310px) 1fr; gap: 1rem;
    align-items: stretch; height: calc(100vh - 230px); min-height: 460px;
}
.chat-threads {
    background: #fff; border: 1px solid var(--line); border-radius: 14px;
    overflow: hidden; display: flex; flex-direction: column; min-height: 0;
}
.chat-threads-head { padding: 0.7rem; border-bottom: 1px solid var(--line); flex: none; }
.chat-thread-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; min-height: 0; }
.chat-thread {
    padding: 0.75rem 0.85rem; border-bottom: 1px solid var(--line); cursor: pointer;
    display: grid; grid-template-columns: 36px 1fr; gap: 0.15rem 0.65rem; align-items: center;
    transition: background 0.15s ease;
}
.chat-thread:hover { background: #F7F9FC; }
.chat-thread.active { background: rgba(201, 150, 47, 0.1); box-shadow: inset 3px 0 0 var(--gold); }
.chat-thread.closed strong { color: var(--mist); }
.chat-thread .chat-avatar { grid-row: span 2; width: 36px; height: 36px; }
.chat-thread-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; min-width: 0; }
.chat-thread-top strong { font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-thread-badge {
    background: #D4373F; color: #fff; font-size: 0.66rem; font-weight: 700; min-width: 19px; height: 19px;
    border-radius: 999px; display: grid; place-items: center; padding: 0 5px; flex: none;
}
.chat-thread-preview { font-size: 0.8rem; color: var(--mist); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-thread-empty { padding: 1.1rem 0.9rem; color: var(--mist); font-size: 0.88rem; }

.chat-room {
    background: #fff; border: 1px solid var(--line); border-radius: 14px;
    display: flex; flex-direction: column; overflow: hidden; min-height: 0;
}
.chat-room-head {
    display: flex; align-items: center; gap: 0.7rem; padding: 0.75rem 0.9rem;
    border-bottom: 1px solid var(--line); flex: none;
}
.chat-room-back { display: none; background: none; border: 0; cursor: pointer; color: var(--navy-800);
    width: 36px; height: 36px; border-radius: 50%; place-items: center; flex: none; }
.chat-room-head .chat-head-text { flex: 1; min-width: 0; }
.chat-room-head strong { display: block; font-size: 0.98rem; }
.chat-room-head span { font-size: 0.78rem; color: var(--mist); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.chat-room-actions { display: flex; gap: 0.4rem; flex: none; }
.chat-room .chat-scroll { border-radius: 0; }
.chat-room .chat-form { border-radius: 0 0 14px 14px; }
.chat-room .chat-send { background: var(--navy-950); color: #fff; }
.chat-room .chat-send:hover { background: var(--navy-800); }

.adm-nav-badge { background: #D4373F; color: #fff; font-size: 0.66rem; font-weight: 700;
    padding: 1px 6px; border-radius: 999px; margin-left: auto; }

/* Admin console on phones: list, then conversation, one at a time. */
@media (max-width: 820px) {
    .chat-console { grid-template-columns: 1fr; height: calc(100dvh - 190px); min-height: 420px; }
    .chat-console.viewing .chat-threads { display: none; }
    .chat-console:not(.viewing) .chat-room { display: none; }
    .chat-room-back { display: grid; }
}

/* Branch listings */
.footer-branch { display: grid; gap: 0.1rem; margin-bottom: 0.7rem; }
.footer-branch strong { font-size: 0.88rem; color: var(--gold-400); }
.footer-branch address { font-style: normal; font-size: 0.85rem; }
.footer-branch span { font-size: 0.8rem; opacity: 0.75; }
.branch-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.9rem; margin-top: 1rem; }
.branch { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 0.8rem 0.9rem; display: grid; gap: 0.15rem; }
.branch strong { font-size: 0.92rem; }
.branch span { font-size: 0.85rem; color: var(--mist); }
.branch-hours { color: var(--gold) !important; font-weight: 600; }
.cat-branches { display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap; margin: 0 0 0.8rem; }
.cat-branches div { display: grid; gap: 0.1rem; font-size: 0.8rem; }
.cat-branches strong { font-size: 0.86rem; color: #0C1A2C; }


/* ==========================================================================
   Admin notifications
   ========================================================================== */
.adm-notif { position: relative; }
.adm-bell {
    position: relative; background: none; border: 0; cursor: pointer; color: var(--navy-800);
    width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
    transition: background 0.15s ease;
}
.adm-bell:hover { background: rgba(28, 59, 96, 0.07); }
.adm-bell-badge {
    position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 999px; background: #D4373F; color: #fff; border: 2px solid #fff;
    font-size: 0.62rem; font-weight: 700; display: grid; place-items: center;
}
.adm-notif-panel {
    position: absolute; right: 0; top: calc(100% + 10px); width: min(360px, calc(100vw - 24px)); z-index: 60;
    background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
    box-shadow: 0 18px 44px rgba(12, 26, 44, 0.2);
}
.adm-notif-head {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line); background: #F7F9FC;
}
.adm-notif-head strong { font-size: 0.95rem; }
.adm-notif-list { list-style: none; margin: 0; padding: 0; max-height: min(420px, 60vh); overflow-y: auto; }
.adm-notif-item { border-bottom: 1px solid var(--line); }
.adm-notif-item:last-child { border-bottom: 0; }
.adm-notif-item a {
    display: grid; grid-template-columns: 32px 1fr; gap: 0.7rem; align-items: start;
    padding: 0.7rem 0.9rem; color: var(--navy-800); text-decoration: none;
}
.adm-notif-item a:hover { background: #F7F9FC; }
.adm-notif-item.unread { background: rgba(201, 150, 47, 0.07); }
.adm-notif-item.unread a::after {
    content: ''; position: absolute; left: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold);
}
.adm-notif-item { position: relative; }
.adm-notif-item.unread { box-shadow: inset 3px 0 0 var(--gold); }
.adm-notif-ico {
    width: 32px; height: 32px; padding: 7px; border-radius: 9px; fill: none;
    stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
    background: var(--cloud); color: var(--navy-800);
}
.adm-notif-ico.order { background: rgba(28, 59, 96, 0.1); }
.adm-notif-ico.payment { background: rgba(31, 122, 76, 0.12); color: #1F7A4C; }
.adm-notif-ico.message { background: rgba(201, 150, 47, 0.16); color: #8A6413; }
.adm-notif-ico.review { background: rgba(201, 150, 47, 0.12); color: var(--gold); fill: currentColor; stroke: none; }
.adm-notif-item strong { display: block; font-size: 0.88rem; line-height: 1.3; }
.adm-notif-item small { display: block; font-size: 0.8rem; color: var(--mist); margin-top: 0.1rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-notif-item time { display: block; font-size: 0.72rem; color: var(--mist); margin-top: 0.2rem; }
.adm-notif-empty { padding: 1.4rem 0.9rem; text-align: center; color: var(--mist); font-size: 0.88rem; }
.adm-notif-foot { padding: 0.5rem 0.9rem; border-top: 1px solid var(--line);
    font-size: 0.72rem; color: var(--mist); text-align: center; background: #F7F9FC; }

.adm-nav-badge.muted { background: rgba(28, 59, 96, 0.12); color: var(--navy-800); }
.adm-side nav a { display: flex; align-items: center; gap: 0.4rem; }
.adm-rail a .adm-nav-badge { margin-left: 0; }

@media (max-width: 820px) {
    .adm-bell { color: #fff; }
    .adm-bell:hover { background: rgba(255, 255, 255, 0.14); }
    .adm-bell-badge { border-color: var(--navy-950); }
    .adm-notif-panel { right: -52px; width: min(340px, calc(100vw - 20px)); }
}

/* ==========================================================================
   About — story / mission / vision
   ========================================================================== */
.page-lead { color: var(--mist); margin: 0.5rem 0 0; font-size: 1.02rem; }

.story-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.story-media { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--navy-950); }
.story-media img { width: 100%; height: 100%; display: block; object-fit: cover; aspect-ratio: 4 / 3; }
.story-copy h2 { margin: 0 0 0.7rem; }
.story-copy h2.mt { margin-top: 2rem; }
.story-copy p { color: var(--navy-800); line-height: 1.75; margin: 0 0 0.9rem; max-width: 52ch; }
.story-copy p:last-child { margin-bottom: 0; }
.story-copy strong { color: var(--navy-950); }

.about-cta {
    display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
    background: var(--navy-950); color: #fff; border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2.2rem);
}
.about-cta h2 { margin: 0 0 0.3rem; color: #fff; }
.about-cta p { margin: 0; color: #B9C6D4; }

@media (max-width: 820px) {
    /* Stack, and always put the photo above its text — including the flipped row. */
    .story-split { grid-template-columns: 1fr; gap: 1.2rem; }
    .story-split.flip .story-media { order: -1; }
    .story-media img { aspect-ratio: 16 / 10; }
    .about-cta { flex-direction: column; align-items: flex-start; }
    .about-cta .btn { width: 100%; text-align: center; }
}

/* Checkout shipping line */
.co-zone { display: block; font-size: 0.74rem; color: var(--mist); font-weight: 400; margin-top: 1px; }
.co-ship-warn {
    margin: 0 0 0.9rem; padding: 0.6rem 0.75rem; border-radius: 9px; font-size: 0.84rem;
    background: rgba(164, 38, 44, 0.08); color: #A4262C; border: 1px solid rgba(164, 38, 44, 0.28);
}
.place-btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ==========================================================================
   Admin: reports layout + product image manager
   ========================================================================== */
.adm-panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem 1.1rem; min-width: 0; }
.adm-panel .adm-subhead { margin-top: 0; }
.adm-panel .adm-tablewrap { border: 0; padding: 0; }
.rpt-filters { align-items: flex-end; flex-wrap: wrap; gap: 0.5rem; }
.rpt-date { display: grid; gap: 0.2rem; font-size: 0.76rem; font-weight: 600; color: var(--mist); }
.rpt-date input { min-width: 140px; }

.pi-block { border: 1px solid var(--line); border-radius: 12px; padding: 1rem; display: grid; gap: 0.7rem; }
.pi-title { font-size: 0.9rem; font-weight: 700; color: var(--navy-800); }
.pi-title.sub { margin-top: 0.4rem; }
.pi-main { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.pi-current { width: 190px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--cloud); }
.pi-empty { width: 190px; aspect-ratio: 4 / 3; border: 1px dashed var(--line); border-radius: 10px;
    display: grid; place-items: center; color: var(--mist); font-size: 0.84rem; text-align: center; padding: 0.5rem; }
.pi-main-actions { display: grid; gap: 0.45rem; align-content: start; }
.pi-main-actions .btn { cursor: pointer; }
.pi-crop canvas { display: block; margin: 0 auto; border-radius: 10px; background: var(--navy-950); touch-action: none; max-width: 100%; }
.pi-crop-bar { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin-top: 0.6rem; }
.pi-hint, .pi-out { font-size: 0.78rem; color: var(--mist); }
.pi-out { margin-left: auto; }

.pi-drop { display: grid; justify-items: center; gap: 0.3rem; text-align: center; cursor: pointer;
    border: 1.5px dashed rgba(28, 59, 96, 0.35); border-radius: 12px; padding: 1.2rem 1rem; transition: border-color .2s, background .2s; }
.pi-drop:hover, .pi-drop.over { border-color: var(--gold); background: rgba(201, 150, 47, 0.06); }
.pi-drop small { color: var(--mist); font-size: 0.78rem; }
.pi-previews, .pi-existing { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.6rem; }
.pi-item { position: relative; margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.pi-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.pi-item figcaption { font-size: 0.7rem; color: var(--mist); padding: 0.25rem 0.4rem; }
.pi-item.dragging { opacity: 0.45; }
.pi-x { position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; border-radius: 50%; border: 0;
    background: rgba(12, 26, 44, 0.72); color: #fff; font-size: 1.05rem; line-height: 1; cursor: pointer; }
.pi-handle { position: absolute; top: 5px; left: 5px; width: 26px; height: 26px; border-radius: 7px;
    display: grid; place-items: center; background: rgba(12, 26, 44, 0.65); color: #fff; cursor: grab; font-size: 13px; }
.pi-move { position: absolute; top: 5px; right: 5px; display: flex; gap: 4px; }
.pi-move button {
    width: 30px; height: 30px; padding: 0; display: grid; place-items: center;
    border: 1px solid rgba(255,255,255,.34); border-radius: 7px;
    background: rgba(12,26,44,.78); color: #fff; font: 700 14px var(--font-body);
    cursor: pointer;
}
.pi-move button:hover:not(:disabled) { background: var(--navy); }
.pi-move button:disabled { opacity: .38; cursor: default; }
/* The checkbox alone was a ~13px target next to 12px text with no visible
   result, which reads as a dead control. The whole strip is now the target, and
   the card shows what the checkbox is about to do. */
.pi-remove { display: flex; align-items: center; justify-content: center; gap: 0.4rem;
    font-size: 0.8rem; font-weight: 600; padding: 0.5rem 0.4rem; color: var(--navy-800);
    cursor: pointer; border-top: 1px solid var(--line); background: #fff; min-height: 38px;
    transition: background .15s, color .15s; }
.pi-remove:hover { background: #FDEDED; color: var(--danger); }
.pi-remove input { width: 16px; height: 16px; accent-color: var(--danger); cursor: pointer; margin: 0; }
/* Checked = this photo goes when you save. Say so plainly. */
.pi-item:has(.pi-remove input:checked) { border-color: var(--danger); }
.pi-item:has(.pi-remove input:checked) img { opacity: .35; filter: grayscale(1); }
.pi-remove:has(input:checked) { background: var(--danger); color: #fff; }
.pi-remove:has(input:checked)::after { content: ' on save'; font-weight: 500; }
.pi-warn { font-size: 0.82rem; color: #A4262C; margin: 0; }

@media (max-width: 620px) {
    .pi-main { flex-direction: column; }
    .pi-current, .pi-empty { width: 100%; }
    .pi-main-actions { width: 100%; }
    .pi-previews, .pi-existing { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
    .rpt-date input { min-width: 0; width: 100%; }
    .rpt-filters { width: 100%; }
}

/* Profile address actions + checkout "delivering to" label */
.profile-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.profile-actions .btn { flex: 1; min-width: 150px; }
.co-saved-tag { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase;
    color: var(--mist); margin-bottom: 0.25rem !important; }

/* Profile: what this address means for shipping */
.ship-preview {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    background: #F7F9FC; border: 1px solid var(--line); border-radius: 12px; padding: 0.8rem 1rem;
}
.ship-preview-tag { display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.5px;
    text-transform: uppercase; color: var(--mist); margin-bottom: 0.15rem; }
.ship-preview strong { font-size: 1rem; color: var(--navy-950); }
.ship-preview-fee { text-align: right; }
.ship-preview-fee strong { font: 800 1.2rem var(--font-display); color: var(--gold); }
.ship-preview-note { margin: 0.5rem 0 0; font-size: 0.84rem; color: #A4262C; }
.map-gaps { margin: 0; font-size: 0.82rem; color: #8A6413; background: rgba(201, 150, 47, 0.1);
    border: 1px solid rgba(201, 150, 47, 0.35); border-radius: 8px; padding: 0.45rem 0.65rem; }
@media (max-width: 520px) {
    .ship-preview { flex-direction: column; align-items: flex-start; }
    .ship-preview-fee { text-align: left; }
}

/* ==========================================================================
   Checkout: delivery address modal
   ========================================================================== */
.loc-modal {
    border: 0; border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 32px));
    max-height: min(88vh, 900px); overflow: hidden;
    box-shadow: 0 24px 64px rgba(12, 26, 44, 0.32);
}
.loc-modal::backdrop { background: rgba(12, 26, 44, 0.55); }
.loc-modal[open] { display: flex; flex-direction: column; }

.loc-head {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex: none;
    padding: 0.95rem 1.1rem; background: var(--navy-950); color: #fff;
    border-bottom: 2px solid var(--gold);
}
.loc-head strong { font: 700 1.02rem var(--font-display); }
.loc-x { background: none; border: 0; color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer;
    width: 36px; height: 36px; border-radius: 50%; }
.loc-x:hover { background: rgba(255, 255, 255, 0.16); }

.loc-body { flex: 1; min-height: 0; overflow-y: auto; padding: 1rem 1.1rem; display: grid; gap: 0.85rem; }
.loc-body .map-canvas { height: 260px; }

.loc-foot {
    flex: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    padding: 0.8rem 1.1rem; border-top: 1px solid var(--line); background: #F7F9FC;
    padding-bottom: max(0.8rem, env(safe-area-inset-bottom));
}
.loc-quote { font-size: 0.86rem; font-weight: 600; color: #1F7A4C; }
.loc-quote.bad { color: #A4262C; }
.loc-buttons { display: flex; gap: 0.5rem; margin-left: auto; }
.loc-buttons .btn { min-height: 44px; }

.co-pinned.muted .co-pin-dot { background: var(--mist); }

@media (max-width: 620px) {
    /* Full screen on phones, with the action bar always reachable. */
    .loc-modal {
        width: 100%; max-width: none; height: 100%; max-height: 100dvh;
        border-radius: 0; margin: 0; top: 0; left: 0;
    }
    .loc-body .map-canvas { height: 230px; }
    .loc-foot { flex-direction: column; align-items: stretch; }
    .loc-buttons { margin-left: 0; }
    .loc-buttons .btn { flex: 1; }
}

/* ==========================================================================
   Product main-image cropper — a full working surface, not a thumbnail
   ========================================================================== */
.crop-modal {
    border: 0; border-radius: 16px; padding: 0; background: #fff;
    width: min(1080px, 94vw); max-width: 94vw; max-height: 92vh;
    box-shadow: 0 30px 80px rgba(12, 26, 44, 0.35);
}
.crop-modal::backdrop { background: rgba(12, 26, 44, 0.6); }
.crop-shell { display: flex; flex-direction: column; max-height: 92vh; }

.crop-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
    padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); flex: none;
}
.crop-head strong { display: block; font: 700 1.05rem var(--font-display); }
.crop-head span { display: block; font-size: 0.84rem; color: var(--mist); margin-top: 0.15rem; max-width: 60ch; }
.crop-x { background: none; border: 0; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--mist); padding: 0 0.2rem; }
.crop-x:hover { color: var(--navy-950); }

.crop-body { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 1rem; padding: 1rem 1.2rem; min-height: 0; }
.crop-stage {
    background: #0F1D30; border-radius: 12px; min-height: 0;
    height: clamp(340px, 62vh, 640px);
    display: grid; place-items: center; overflow: hidden;
}
.crop-stage canvas { display: block; touch-action: none; cursor: default; max-width: 100%; max-height: 100%; }

.crop-side { display: grid; gap: 0.7rem; align-content: start; min-width: 0; }
.crop-side-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--mist); }
.crop-preview { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); background: var(--cloud); display: block; }
.crop-zoom { display: grid; gap: 0.3rem; font-size: 0.82rem; font-weight: 600; color: var(--navy-800); }
.crop-zoom input { width: 100%; accent-color: var(--gold); }
.crop-side-btns { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.crop-side-btns .pill { flex: 1; min-width: 92px; text-align: center; min-height: 38px; display: grid; place-items: center; }

.crop-foot {
    display: flex; justify-content: flex-end; gap: 0.6rem; flex: none;
    padding: 0.9rem 1.2rem; border-top: 1px solid var(--line); background: #F7F9FC;
    padding-bottom: max(0.9rem, env(safe-area-inset-bottom));
}
.crop-foot .btn { min-width: 140px; }

@media (max-width: 860px) {
    .crop-modal { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
    .crop-shell { max-height: 100dvh; height: 100dvh; }
    .crop-body { grid-template-columns: 1fr; overflow-y: auto; }
    .crop-stage { height: clamp(280px, 46vh, 460px); }
    .crop-preview { max-width: 220px; }
    .crop-foot .btn { flex: 1; min-width: 0; }
}

/* Crop dialog: shape presets */
.crop-preview-wrap { background: var(--cloud); border: 1px solid var(--line); border-radius: 10px;
    padding: 6px; display: grid; place-items: center; min-height: 90px; }
.crop-preview { width: 100%; height: auto; border-radius: 6px; display: block; background: #fff; }
.crop-ratios { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.ratio-chip {
    border: 1px solid var(--line); background: #fff; color: var(--navy-800); cursor: pointer;
    border-radius: 999px; padding: 0.35rem 0.7rem; font: 700 0.78rem var(--font-body); min-height: 34px;
}
.ratio-chip:hover { border-color: var(--navy); }
.ratio-chip.is-on { background: linear-gradient(135deg, var(--gold-400), var(--gold));
    border-color: var(--gold); color: var(--navy-950); }
.crop-side-btns .pill { cursor: pointer; }

/* Map picker: two actions side by side */
.map-picker-btns { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.map-picker-btns .btn { flex: 1; min-width: 150px; }
@media (max-width: 520px) { .map-picker-btns { width: 100%; } }

/* OAuth setup: copyable URLs */
.oauth-uri { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin: 0 0 1rem;
    background: #F7F9FC; border: 1px solid var(--line); border-radius: 10px; padding: 0.7rem 0.9rem; }
.oauth-uri code { font-size: 0.9rem; word-break: break-all; color: var(--navy-950); }
.oauth-uri .pill { cursor: pointer; flex: none; }

/* ── admin: making the upload flow legible ───────────────────────────────────
   The controls were all present but read as three unrelated widgets. Numbering
   them turns a pile of controls into one task, and the lede under each heading
   says which of the two content pages a person is standing on. */
.adm-lede {
    margin: 6px 0 0; max-width: 62ch; font-size: 14px; line-height: 1.55; color: #55606D;
}
.adm-lede a { color: #1F3A5F; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.adm-lede a:hover { color: #0F2540; }

.hp-step {
    display: flex; align-items: center; gap: 10px;
    margin: 18px 0 8px; font-size: 13px; font-weight: 700;
    letter-spacing: .04em; text-transform: uppercase; color: #33404F;
}
.hp-step:first-child { margin-top: 0; }
.hp-step > span {
    display: grid; place-items: center; width: 24px; height: 24px; flex: 0 0 24px;
    border-radius: 50%; background: #1F3A5F; color: #fff;
    font-size: 12px; font-weight: 700; letter-spacing: 0;
}
/* The submit carries its own step marker, so it reads as the end of the same
   sequence rather than a detached button. */
.hp-upload .btn[data-submit] > span {
    display: inline-grid; place-items: center; width: 20px; height: 20px;
    border-radius: 50%; background: rgba(255, 255, 255, .25);
    font-size: 11px; font-weight: 700;
}

/* Free-shape control for the celebrity uploader. */
.hp-shape { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.78rem; font-weight: 600; color: #33404F; }
.hp-shape input[type=range] { width: 130px; accent-color: #1F3A5F; }
.hp-shape output { font-variant-numeric: tabular-nums; font-weight: 500; color: #55606D; min-width: 78px; }

/* Grouped sidebar. The label is a quiet divider, not a competing heading. */
.adm-nav-group {
    display: block; margin: 1.15rem 0 0.35rem; padding: 0 0.25rem;
    font-size: 0.66rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
    color: rgba(255, 255, 255, 0.34);
}
.adm-side nav > .adm-nav-group:first-child { margin-top: 0; }
/* Every count reads the same now: the muted variant made three of the five
   invisible, which defeats the point of a count. */
.adm-nav-badge.muted { background: var(--danger); color: #fff; opacity: 1; }

/* ── Admin: shared surface, used by every page ───────────────────────────────
   These are the classes the whole panel already renders through — heading,
   card, table wrap, empty state — so improving them here restyles all 18 pages
   at once rather than editing each. New dashboard pieces follow. */
.adm-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.adm-page-head h1 { margin: 0; }

.adm-band { margin: 0 0 2.2rem; }
.adm-band-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.adm-band-title {
    margin: 0 0 0.9rem; font-size: 1.02rem; font-weight: 700; color: #1B2735;
    letter-spacing: -0.005em;
}
.adm-band-title small { font-weight: 500; color: #7A8797; font-size: 0.8rem; margin-left: 0.4rem; }

.adm-card {
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
    padding: 1.1rem 1.2rem 1.2rem;
    box-shadow: 0 1px 2px rgba(16, 27, 44, 0.04);
}
.adm-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.8rem; margin-bottom: 0.9rem; }
.adm-card-head h3 { margin: 0; font-size: 0.95rem; font-weight: 700; color: #1B2735; }
.adm-card-note { font-size: 0.76rem; color: #7A8797; }

.adm-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 1100px) { .adm-grid-3 { grid-template-columns: 1fr; } }

/* KPI row. The delta is the point — a number with nothing to compare it
   against does not tell you whether the month is going well. */
.adm-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 1100px) { .adm-kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .adm-kpis { grid-template-columns: 1fr; } }
.adm-kpi {
    background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem;
    display: grid; gap: 0.28rem; box-shadow: 0 1px 2px rgba(16, 27, 44, 0.04);
}
.adm-kpi-label { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #7A8797; }
.adm-kpi-value { font-size: 1.6rem; font-weight: 700; color: #14202E; line-height: 1.15; letter-spacing: -0.02em; }
.adm-kpi-delta { font-size: 0.78rem; font-weight: 700; }
.adm-kpi-delta.up { color: #1a7f4e; }
.adm-kpi-delta.down { color: var(--danger); }
.adm-kpi-note { font-size: 0.74rem; color: #8A96A5; }

/* Attention row: zero is calm, anything above zero is red and clickable. */
.adm-attn { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.7rem; }
@media (max-width: 1100px) { .adm-attn { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px)  { .adm-attn { grid-template-columns: repeat(2, 1fr); } }
.adm-attn-card {
    background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0.9rem 0.95rem;
    display: grid; gap: 0.2rem; text-decoration: none; color: inherit;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.adm-attn-card:hover { border-color: #C6D0DC; box-shadow: 0 4px 14px rgba(16, 27, 44, 0.08); transform: translateY(-1px); }
.adm-attn-card strong { font-size: 1.5rem; font-weight: 700; color: #9AA6B4; line-height: 1.1; }
.adm-attn-card span { font-size: 0.78rem; color: #55606D; }
.adm-attn-card.has { border-color: rgba(179, 38, 30, 0.35); background: #FEF7F6; }
.adm-attn-card.has strong { color: var(--danger); }

/* Charts. preserveAspectRatio="none" stretches the drawing to the box, and
   vector-effect keeps the stroke 2.5px however far it stretches. */
.adm-chart-wrap { width: 100%; }
.adm-chart { width: 100%; height: 200px; display: block; overflow: visible; }
.adm-chart-tick { font-size: 11px; fill: #8A96A5; font-family: inherit; }
.adm-chart-empty { margin: 0; padding: 2rem 0; text-align: center; color: #8A96A5; font-size: 0.85rem; }

.adm-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.adm-bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.2rem 0.8rem; align-items: center; }
.adm-bar-label { grid-column: 1; font-size: 0.82rem; color: #33404F; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-bar-val { grid-column: 2; grid-row: 1 / span 2; text-align: right; font-size: 0.85rem; font-weight: 700; color: #14202E; }
.adm-bar-val small { display: block; font-weight: 500; font-size: 0.72rem; color: #8A96A5; }
.adm-bar-track { grid-column: 1; height: 7px; border-radius: 999px; background: #EDF1F6; overflow: hidden; }
.adm-bar-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #1F3A5F, #3E6597); }

/* Staff form: grouped so a long HR record reads as sections, not one wall. */
.adm-staff-form .adm-fs {
    margin: 1.4rem 0 0.6rem; font-size: 0.74rem; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase; color: #7A8797;
    border-top: 1px solid var(--line); padding-top: 1rem;
}
.adm-staff-form .adm-fs:first-of-type { margin-top: 0; border-top: 0; padding-top: 0; }
.adm-staff-form .adm-form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
@media (max-width: 1000px) { .adm-staff-form .adm-form-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px)  { .adm-staff-form .adm-form-grid { grid-template-columns: 1fr; } }
.adm-staff-form label { display: grid; gap: 0.32rem; font-size: 0.78rem; font-weight: 600; color: #55606D; }
.adm-staff-form input, .adm-staff-form select, .adm-staff-form textarea {
    font: inherit; font-weight: 400; padding: 0.6rem 0.7rem;
    border: 1px solid var(--line); border-radius: 8px; background: #fff; width: 100%;
}
.adm-staff-form .adm-full { display: grid; gap: 0.32rem; margin-top: 1rem; }
.adm-form-actions { margin-top: 1.2rem; }
.adm-row-acts { display: flex; gap: 0.4rem; align-items: center; }
.adm-row-acts form { margin: 0; }

/* Audit log filters and pager. */
.adm-filters { display: flex; gap: 0.8rem; flex-wrap: wrap; align-items: end; margin-bottom: 1rem; }
.adm-filters label { display: grid; gap: 0.28rem; font-size: 0.76rem; font-weight: 600; color: #55606D; }
.adm-filters select { font: inherit; font-weight: 400; padding: 0.5rem 0.6rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.adm-pager { display: flex; gap: 0.35rem; margin-top: 1rem; }
.adm-pager a { padding: 0.4rem 0.7rem; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: #33404F; font-size: 0.82rem; }
.adm-pager a.on { background: #1F3A5F; border-color: #1F3A5F; color: #fff; font-weight: 700; }

/* Order pipeline board and the branch chooser. */
.adm-head-acts { display: flex; align-items: end; gap: 0.8rem; flex-wrap: wrap; }
.adm-branch-pick label { display: grid; gap: 0.28rem; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #7A8797; }
.adm-branch-pick select { font: inherit; font-weight: 500; padding: 0.45rem 0.7rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.adm-pipe { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.7rem; }
@media (max-width: 1100px) { .adm-pipe { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px)  { .adm-pipe { grid-template-columns: repeat(2, 1fr); } }
.adm-pipe-card {
    background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0.9rem 0.95rem;
    display: grid; gap: 0.15rem; text-decoration: none; color: inherit;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.adm-pipe-card:hover { border-color: #C6D0DC; box-shadow: 0 4px 14px rgba(16,27,44,.08); transform: translateY(-1px); }
.adm-pipe-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: #7A8797; }
.adm-pipe-card strong { font-size: 1.45rem; font-weight: 700; color: #14202E; line-height: 1.1; }
.adm-pipe-amt { font-size: 0.78rem; color: #55606D; }

/* Live chat console: a working surface, so the reading area gets the light and
   the chrome stays quiet. */
.chat-console { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 1px 2px rgba(16,27,44,.04); }
.chat-threads-head { padding: 0.85rem 0.9rem; border-bottom: 1px solid var(--line); background: #FAFBFD; }
.chat-room-actions { display: flex; gap: 0.4rem; margin-left: auto; }
.pill-danger { border-color: rgba(179,38,30,.4); color: var(--danger); }
.pill-danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }

/* Delete confirmation. Destructive, so it says what is lost before it asks. */
.chat-del { border: 0; border-radius: 14px; padding: 0; width: min(420px, calc(100vw - 32px)); box-shadow: 0 24px 60px -28px rgba(16,27,44,.5); }
.chat-del::backdrop { background: rgba(16, 27, 44, .55); }
.chat-del-in { padding: 1.3rem 1.4rem 1.2rem; display: grid; gap: 0.7rem; }
.chat-del-in h3 { margin: 0; font-size: 1.05rem; color: #14202E; }
.chat-del-in p { margin: 0; font-size: 0.85rem; line-height: 1.55; color: #55606D; }
.chat-del-in label { display: grid; gap: 0.3rem; font-size: 0.78rem; font-weight: 600; color: #55606D; }
.chat-del-in input { font: inherit; font-weight: 400; padding: 0.6rem 0.7rem; border: 1px solid var(--line); border-radius: 8px; }
.chat-del-error { color: var(--danger); font-weight: 600; font-size: 0.82rem; }
.chat-del-acts { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.4rem; }
@media (max-width: 620px) { .chat-del { width: calc(100vw - 24px); } }


/* The brand avatar carries the real logo, not a typed W. Applied via CSS so the
   bubbles JS builds at runtime inherit it too — patching only the PHP would
   have left every incoming message showing the letter. */
.chat-avatar.brand {
    background-image: url('../img/wellrest-chat.webp');
    background-size: cover; background-position: center; background-repeat: no-repeat;
    color: transparent; text-indent: -9999px; overflow: hidden;
}
.chat-avatar.brand .chat-dot { text-indent: 0; }

/* Branch picker in the chat intro. Buttons, not a <select>: on a phone a list
   of two or three tappable cards is faster and shows each address. */
.chat-branch-pick { display: grid; gap: 0.5rem; margin: 0.7rem 0 0.9rem; }
.chat-branch-opt {
    display: grid; gap: 0.15rem; text-align: left; cursor: pointer;
    padding: 0.7rem 0.8rem; border: 1px solid var(--line); border-radius: 10px; background: #fff;
    transition: border-color .15s, background .15s;
}
.chat-branch-opt strong { font-size: 0.9rem; color: #14202E; }
.chat-branch-opt small { font-size: 0.76rem; color: #7A8797; }
.chat-branch-opt:hover { border-color: #C6D0DC; }
.chat-branch-opt.on { border-color: #1F3A5F; background: #F4F7FB; }
.chat-back { background: none; border: 0; cursor: pointer; font: inherit; font-size: 0.8rem; color: #7A8797; text-decoration: underline; padding: 0.4rem; }
.chat-intro-error { color: var(--danger); font-size: 0.82rem; font-weight: 600; margin: 0.4rem 0 0; }
/* A transfer note is neither side of the conversation, so it reads as a note. */
.chat-msg.system { justify-content: center; }
.chat-msg.system .chat-bubble { background: #EEF2F7; color: #55606D; font-size: 0.8rem; font-style: italic; text-align: center; }

/* Bundle builder rows. */
.bundle-picker { display: grid; gap: 0.6rem; }
.bundle-row { display: grid; grid-template-columns: 1fr 110px; gap: 0.6rem; }
.bundle-row select, .bundle-row input { font: inherit; padding: 0.55rem 0.65rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.bundle-live { margin: 0.9rem 0 0; padding: 0.75rem 0.9rem; background: #F4F7FB; border-radius: 10px; font-size: 0.86rem; color: #33404F; }
.bundle-live strong { color: #14202E; }
@media (max-width: 620px) { .bundle-row { grid-template-columns: 1fr; } }

/* ═══ ADMIN REFRESH ══════════════════════════════════════════════════════════
   Navy and gold stay the only brand colours. What was missing was not colour
   but CONTRAST BETWEEN STATES: navy carried headings, buttons, links and table
   headers alike, so nothing stood out because everything competed.

   The rules below spend colour where it means something — one gold action per
   screen, semantic tints on status, navy for structure — and get depth from
   tinted surfaces and clearer borders rather than from new hues.
   ═════════════════════════════════════════════════════════════════════════ */

:root {
    /* Semantic set. These appear ONLY on status, never as decoration, so a
       colour on this screen always answers "what state is this in?". */
    --st-ok-bg:    #E8F5EE;  --st-ok-fg:    #17663F;  --st-ok-line:   #B7DCC7;
    --st-warn-bg:  #FDF3E2;  --st-warn-fg:  #8A5B12;  --st-warn-line: #EFD9AE;
    --st-info-bg:  #EAF0F9;  --st-info-fg:  #1C3B60;  --st-info-line: #C2D2E8;
    --st-bad-bg:   #FBECEB;  --st-bad-fg:   #9A2E27;  --st-bad-line:  #EFC5C1;
    /* Page and card surfaces, two steps apart so cards lift off the page
       without needing a heavy shadow. */
    --surface:     #F4F6FA;
    --surface-alt: #FAFBFD;
    --shadow-sm:   0 1px 2px rgba(12, 26, 44, .05);
    --shadow-md:   0 4px 16px -6px rgba(12, 26, 44, .14);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
/* Flat gold, not a gradient: a gradient reads as a 2013 button. The lift on
   hover does the work a gradient was standing in for. */
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--navy-950); font-weight: 700;
    box-shadow: var(--shadow-sm); transition: background .16s, box-shadow .16s, transform .16s; }
.btn-gold:hover { background: var(--gold-400); border-color: var(--gold-400); color: var(--navy-950);
    box-shadow: 0 6px 18px -6px rgba(201, 150, 47, .55); transform: translateY(-1px); }
.btn-gold:active { transform: none; box-shadow: var(--shadow-sm); }

/* Secondary reads as a real control, not a hairline. */
.btn-outline { background: #fff; border: 1px solid #C6D0DC; color: var(--navy-800); font-weight: 600;
    transition: border-color .16s, background .16s, color .16s; }
.btn-outline:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; font-weight: 600; }
.btn-danger:hover { background: #9A2E27; border-color: #9A2E27; }

/* ── Tabs ────────────────────────────────────────────────────────────────── */
/* The active tab sits on a gold underline rather than a filled navy block:
   a filled tab competes with the primary button for the eye. */
.adm-tabs { gap: 0.2rem; border-bottom: 1px solid var(--line); padding-bottom: 0; }
.adm-tabs a { border: 0; border-bottom: 2px solid transparent; border-radius: 8px 8px 0 0;
    padding: 0.6rem 0.95rem; color: var(--mist); background: none; transition: color .16s, border-color .16s, background .16s; }
.adm-tabs a:hover { color: var(--navy-800); background: var(--surface-alt); }
.adm-tabs a.active { background: none; color: var(--navy-950); border-bottom-color: var(--gold); font-weight: 700; }
.adm-tabs a.active span { color: var(--gold); font-weight: 700; }

/* ── Tables ──────────────────────────────────────────────────────────────── */
.adm-table th { background: var(--surface-alt); color: var(--navy-800); font-weight: 700;
    letter-spacing: .04em; text-transform: uppercase; font-size: 0.72rem;
    border-bottom: 1px solid var(--line); }
.adm-table tbody tr { transition: background .12s; }
.adm-table tbody tr:hover { background: var(--surface-alt); }
/* Zebra at a fraction of a percent: enough for the eye to track a row across a
   wide table, not enough to read as stripes. */
.adm-table tbody tr:nth-child(even) { background: rgba(28, 59, 96, .018); }
.adm-table tbody tr:nth-child(even):hover { background: var(--surface-alt); }

/* ── Status badges ───────────────────────────────────────────────────────── */
/* Tinted field, matching text, a border so it holds its shape on any surface —
   and never colour alone, since the label always says the state too. */
.status-badge { border: 1px solid var(--st-info-line); background: var(--st-info-bg); color: var(--st-info-fg);
    font-weight: 700; letter-spacing: .01em; }
.status-badge.s-delivered, .status-badge.s-completed, .status-badge.s-paid, .status-badge.s-super-admin {
    background: var(--st-ok-bg); color: var(--st-ok-fg); border-color: var(--st-ok-line); }
.status-badge.s-pending, .status-badge.s-awaiting, .status-badge.s-unpaid, .status-badge.s-branch-admin {
    background: var(--st-warn-bg); color: var(--st-warn-fg); border-color: var(--st-warn-line); }
.status-badge.s-cancelled, .status-badge.s-failed { background: var(--st-bad-bg); color: var(--st-bad-fg); border-color: var(--st-bad-line); }

/* ── Cards and surfaces ──────────────────────────────────────────────────── */
/* .adm-main does not exist in this markup — the content column is .adm-page.
   The original rule here targeted a class I assumed rather than checked, so the
   page surface was styling nothing at all. */
.adm-shell { background: var(--surface); }
.adm-page { background: transparent; }
.adm-card, .adm-panel, .adm-kpi, .adm-attn-card, .adm-pipe-card {
    border-color: var(--line); box-shadow: var(--shadow-sm);
}
.adm-card:hover, .adm-panel:hover { box-shadow: var(--shadow-md); }
.adm-tablewrap { box-shadow: var(--shadow-sm); }

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
/* The active item gets a gold spine — the one place navigation borrows the
   brand colour, so "where am I" is answered at a glance. */
.adm-side nav a { border-left: 2px solid transparent; border-radius: 0 8px 8px 0; transition: background .16s, border-color .16s, color .16s; }
.adm-side nav a:hover { background: rgba(255, 255, 255, .06); }
.adm-side nav a.active { background: rgba(201, 150, 47, .14); border-left-color: var(--gold); color: #fff; font-weight: 700; }

/* ── Pills ───────────────────────────────────────────────────────────────── */
.pill { transition: border-color .16s, color .16s, background .16s; }
.pill:hover { border-color: var(--navy-600); color: var(--navy-800); background: var(--surface-alt); }

/* ── Forms ───────────────────────────────────────────────────────────────── */
/* A visible focus ring: the previous border-only focus was hard to find when
   tabbing through a long form. */
.adm-staff-form input:focus, .adm-staff-form select:focus, .adm-staff-form textarea:focus,
.adm-filters select:focus, .adm-search:focus, .bundle-row select:focus, .bundle-row input:focus {
    outline: none; border-color: var(--navy-600);
    box-shadow: 0 0 0 3px rgba(28, 59, 96, .12);
}

/* ═══ ADMIN › STOREFRONT (content.php) ═══════════════════════════════════════
   Every sf- class on this page had NO styling at all — not one rule existed.
   Twenty-odd labels and inputs stacked in one column with no grouping, no
   spacing and no hierarchy, which is exactly why the page read as a wall of
   boxes with nothing to tell them apart.

   No markup changed: the form is a two-column grid and the existing group
   headings span it, so each section announces itself and the fields beneath it
   pair up instead of running on forever.
   ═════════════════════════════════════════════════════════════════════════ */

.sf-copy { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem 1.1rem; align-items: start; }
@media (max-width: 900px) { .sf-copy { grid-template-columns: 1fr; } }

/* Group heading: full width, with air above it and a rule, so a new section is
   unmistakable rather than another line of text. */
.sf-copy .sf-group {
    grid-column: 1 / -1; margin: 1.5rem 0 0.1rem; padding-top: 1.1rem;
    border-top: 1px solid var(--line);
    font: 700 0.74rem var(--font-body); letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--navy-800);
}
.sf-copy .sf-group:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }

.sf-field { display: grid; gap: 0.32rem; }
.sf-field > span { font: 600 0.8rem var(--font-body); color: var(--mist); }
.sf-field input, .sf-field textarea {
    font: inherit; width: 100%; padding: 0.6rem 0.7rem;
    border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
    transition: border-color .16s, box-shadow .16s;
}
.sf-field textarea { min-height: 68px; resize: vertical; line-height: 1.5; }
.sf-field input:focus, .sf-field textarea:focus {
    outline: none; border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(28, 59, 96, .12);
}
/* Placeholder text IS the live default, so it must read as a real example
   rather than as filler the admin should ignore. */
.sf-field input::placeholder, .sf-field textarea::placeholder { color: #A9B4C2; font-style: italic; }
/* Paragraphs need the full width; a two-line box in half a column wraps badly. */
.sf-field:has(textarea) { grid-column: 1 / -1; }

.sf-copy .adm-form-actions {
    grid-column: 1 / -1; margin-top: 1.4rem; padding-top: 1.1rem; border-top: 1px solid var(--line);
}

/* ── The homepage map ────────────────────────────────────────────────────── */
/* A numbered walk down the page, so "what shows and where" is answered by the
   order of the list rather than by reading every row. */
.sf-map { display: grid; gap: 0.4rem; }
.sf-row {
    display: grid; grid-template-columns: 2.2rem 1fr auto; gap: 0.9rem; align-items: center;
    padding: 0.7rem 0.9rem; border: 1px solid var(--line); border-radius: 10px;
    background: #fff; text-decoration: none; color: inherit;
    transition: border-color .16s, box-shadow .16s, transform .16s;
}
.sf-row:hover { border-color: var(--navy-600); box-shadow: var(--shadow-md); transform: translateX(2px); }
.sf-no { font: 700 0.78rem var(--font-body); color: var(--gold); letter-spacing: .06em; }
.sf-row strong { font-size: 0.92rem; color: var(--navy-950); }
.sf-row small, .sf-row span:not(.sf-no) { font-size: 0.8rem; color: var(--mist); }

/* ═══ ADMIN › PRODUCT VARIANTS ═══════════════════════════════════════════════
   Two panels: what varies, then the grid it generates. Kept visually apart
   because they are two different decisions — naming the axes is design work,
   filling the grid is data entry. */
.pv-block { margin-top: 2rem; }
.pv-attrs { display: grid; gap: 0.9rem; }
.pv-attr-row { display: grid; grid-template-columns: 220px 1fr; gap: 0.9rem; align-items: end; }
@media (max-width: 760px) { .pv-attr-row { grid-template-columns: 1fr; } }
.pv-attrs label { display: grid; gap: 0.3rem; font: 600 0.8rem var(--font-body); color: var(--mist); }
.pv-attrs input { font: inherit; font-weight: 400; padding: 0.6rem 0.7rem; border: 1px solid var(--line);
    border-radius: 8px; background: #fff; color: var(--ink); }
.pv-attrs input:focus { outline: none; border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(28,59,96,.12); }

.pv-grid-card { margin-top: 1rem; }
.pv-grid input[type="number"], .pv-grid input[type="text"] {
    font: inherit; width: 100%; min-width: 88px; padding: 0.45rem 0.55rem;
    border: 1px solid var(--line); border-radius: 7px; background: #fff;
}
.pv-grid input:focus { outline: none; border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(28,59,96,.12); }
.pv-grid td { vertical-align: middle; }
.pv-active { text-align: center; }
.pv-active input { width: 17px; height: 17px; accent-color: var(--navy); }
/* A sold-out row is tinted, so scanning a long grid answers "what has run out"
   without reading every number. */
.pv-grid tr.pv-out { background: var(--st-warn-bg); }
.pv-grid tr.pv-out:hover { background: var(--st-warn-bg); }

/* ═══ ADMIN › PRODUCT FORM ═══════════════════════════════════════════════════
   Numbered sections down one page. The form was fifteen controls in a flat
   column where nothing grouped the decisions that belong together. */
.adm-product-head {
    max-width: 980px;
    margin-bottom: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.adm-product-head h1 { margin: .1rem 0 0; }
.adm-eyebrow {
    color: var(--mist);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.adm-form.adm-product-form { max-width: 980px; }
.pf-sec { padding: 1.4rem 0; border-top: 1px solid var(--line); }
.pf-sec:first-of-type { padding-top: 0; border-top: 0; }
.pf-head {
    display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap;
    margin: 0 0 1.1rem; font-size: 1rem; font-weight: 700; color: var(--navy-950);
}
.pf-head small { font-weight: 500; font-size: 0.8rem; color: var(--mist); }
/* The number is the only gold on this page besides Save, so the eye follows
   the sequence rather than hunting for it. */
.pf-no {
    display: grid; place-items: center; width: 24px; height: 24px; flex: none;
    border-radius: 50%; background: var(--gold); color: var(--navy-950);
    font-size: 0.78rem; font-weight: 800;
}
.pf-content-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.pf-field-help {
    color: var(--mist);
    font-size: .76rem;
    line-height: 1.45;
    font-weight: 500;
}
.adm-product-form input[readonly] {
    background: var(--cloud);
    color: var(--mist);
    cursor: not-allowed;
}
.pf-placement-note {
    margin-top: .2rem;
    padding: .9rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--cloud);
}
.pf-placement-note > div { display: grid; gap: .18rem; }
.pf-placement-note strong { color: var(--navy-950); font-size: .86rem; }
.pf-placement-note span { color: var(--mist); font-size: .78rem; }

/* Sticky save. On a form this long the button was below the fold the moment
   you started typing. */
.pf-bar {
    position: sticky; bottom: 0; z-index: 20;
    display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap;
    margin: 0 -1.2rem -1.2rem; padding: 0.9rem 1.2rem;
    background: rgba(255, 255, 255, .96);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(6px);
}
.pf-hint { font-size: 0.8rem; color: var(--mist); }
@media (max-width: 760px) {
    .pf-content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
    .adm-product-head { align-items: flex-start; }
    .adm-product-head .btn { width: 100%; }
    .pf-placement-note { align-items: stretch; flex-direction: column; }
    .pf-placement-note .btn { width: 100%; }
    .pf-bar { margin: 0 -0.9rem -0.9rem; padding: 0.8rem 0.9rem; }
}
@media (max-width: 820px) {
    .pv-grid .pv-photo select { grid-column: 2; min-width: 0; width: 100%; max-width: none; }
}
@media (max-width: 460px) {
    .pv-grid .pv-photo select { grid-column: 1 / -1; }
}
@media print { .pf-bar { position: static; } }

/* Variant photo picker in the admin grid. */
.pv-photo { display: flex; align-items: center; gap: 0.5rem; }
.pv-photo img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); flex: none; }
.pv-photo select { font: inherit; padding: 0.4rem 0.5rem; border: 1px solid var(--line); border-radius: 7px; background: #fff; max-width: 150px; }

/* ═══ ADMIN › COUPONS ════════════════════════════════════════════════════════ */
.cp-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.9rem 1.1rem; align-items: end; }
.cp-form label { display: grid; gap: 0.3rem; font: 600 0.8rem var(--font-body); color: var(--mist); }
.cp-form input { font: inherit; font-weight: 400; padding: 0.6rem 0.7rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.cp-form input:focus { outline: none; border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(28,59,96,.12); }
.cp-form .adm-form-actions { grid-column: 1 / -1; margin: 0; }
/* The code is read aloud on streams and typed from memory, so it is set in a
   monospace face where similar glyphs stay distinguishable. */
.cp-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.04em; font-size: 0.95rem; }
.cp-inline { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.cp-inline input[type="number"] { width: 72px; font: inherit; padding: 0.35rem 0.4rem; border: 1px solid var(--line); border-radius: 7px; }

/* ═══ ADMIN › SALE ═══════════════════════════════════════════════════════════ */
.sale-bulk { display: flex; align-items: end; gap: 0.9rem; flex-wrap: wrap; margin-bottom: 1rem; }
.sale-bulk label { display: grid; gap: 0.3rem; font: 600 0.8rem var(--font-body); color: var(--mist); }
.sale-bulk input { font: inherit; font-weight: 400; width: 110px; padding: 0.6rem 0.7rem; border: 1px solid var(--line); border-radius: 8px; }
.sale-bulk input:focus { outline: none; border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(28,59,96,.12); }
/* A row already on sale is tinted, so a long list answers "what is discounted"
   without reading every price. */
.adm-table tr.sale-on { background: var(--st-ok-bg); }
.adm-table tr.sale-on:hover { background: var(--st-ok-bg); }

/* ==========================================================================
   ADMIN OPERATIONS — approved Dashboard + Orders workspace
   Every selector starts from the page body class. Products, Payments,
   Shipping, Content and the rest of admin deliberately remain untouched.
   ========================================================================== */
body.adm-view-dashboard,
body.adm-view-orders {
    --ops-navy: #09223b;
    --ops-navy-deep: #06192d;
    --ops-blue: #1368d8;
    --ops-gold: #d89a20;
    --ops-bg: #f6f5f2;
    --ops-line: #dce2e9;
    --ops-text: #10243b;
    --ops-muted: #6c7a8b;
    background: var(--ops-bg);
    color: var(--ops-text);
}

body.adm-view-dashboard .adm-shell,
body.adm-view-orders .adm-shell {
    grid-template-columns: 210px minmax(0, 1fr);
    background: var(--ops-bg);
}

body.adm-view-dashboard .adm-side,
body.adm-view-orders .adm-side {
    gap: 1.25rem;
    padding: 1.55rem .85rem 1.1rem;
    background: linear-gradient(165deg, #0b2948 0%, var(--ops-navy-deep) 72%);
    border-right: 1px solid rgba(255,255,255,.08);
    scrollbar-color: rgba(255,255,255,.24) transparent;
}

body.adm-view-dashboard .adm-side .wordmark,
body.adm-view-orders .adm-side .wordmark {
    padding: 0 .55rem 1rem;
    color: #fff;
    font-size: 1.05rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

body.adm-view-dashboard .adm-side .wm-logo,
body.adm-view-orders .adm-side .wm-logo { width: 30px; height: 30px; }

body.adm-view-dashboard .adm-side nav,
body.adm-view-orders .adm-side nav { gap: .12rem; }

body.adm-view-dashboard .adm-side nav a,
body.adm-view-orders .adm-side nav a {
    min-height: 39px;
    padding: .56rem .72rem;
    color: #c8d4e2;
    border-left: 3px solid transparent;
    border-radius: 7px;
    font-size: .84rem;
    font-weight: 600;
}

body.adm-view-dashboard .adm-side nav a:hover,
body.adm-view-orders .adm-side nav a:hover {
    color: #fff;
    background: rgba(255,255,255,.075);
}

body.adm-view-dashboard .adm-side nav a.active,
body.adm-view-orders .adm-side nav a.active {
    color: #fff;
    background: rgba(255,255,255,.1);
    border-left-color: var(--ops-gold);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.035);
}

body.adm-view-dashboard .adm-nav-group,
body.adm-view-orders .adm-nav-group {
    margin: .85rem .7rem .25rem;
    padding: 0;
    color: #74879c;
    font-size: .61rem;
}

body.adm-view-dashboard .adm-side-foot,
body.adm-view-orders .adm-side-foot { border-top: 1px solid rgba(255,255,255,.09); padding-top: .75rem; }

body.adm-view-dashboard .adm-body,
body.adm-view-orders .adm-body {
    min-width: 0;
    padding: 0;
    background: var(--ops-bg);
}

body.adm-view-dashboard .adm-topbar,
body.adm-view-orders .adm-topbar {
    position: sticky;
    top: 0;
    z-index: 46;
    display: grid;
    grid-template-columns: minmax(180px, auto) minmax(280px, 570px) auto;
    align-items: center;
    gap: 1.1rem;
    min-height: 74px;
    margin: 0;
    padding: 0 2rem;
    color: #fff;
    background: linear-gradient(105deg, #0c2c4d 0%, #09223b 100%);
    border: 0;
    box-shadow: 0 2px 12px rgba(6,25,45,.16);
}

body.adm-view-dashboard .adm-topbrand,
body.adm-view-orders .adm-topbrand {
    display: block;
    color: #fff;
    font: 700 .98rem var(--font-display);
    letter-spacing: 0;
    text-transform: none;
}

body.adm-view-dashboard .adm-topbrand::after,
body.adm-view-orders .adm-topbrand::after {
    content: 'Better Sleep. Brighter Days.';
    display: block;
    margin-top: .15rem;
    color: #9eb0c4;
    font: 500 .63rem var(--font-body);
}

body.adm-view-dashboard .adm-ops-search,
body.adm-view-orders .adm-ops-search {
    width: 100%;
    max-width: 570px;
    position: relative;
    display: flex;
    align-items: center;
}

body.adm-view-dashboard .adm-ops-search svg,
body.adm-view-orders .adm-ops-search svg {
    position: absolute;
    left: .8rem;
    color: #748397;
    pointer-events: none;
}

body.adm-view-dashboard .adm-ops-search input,
body.adm-view-orders .adm-ops-search input {
    width: 100%;
    height: 40px;
    padding: .55rem .85rem .55rem 2.25rem;
    color: #182b41;
    background: #fff;
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 7px;
    font: 500 .82rem var(--font-body);
    box-shadow: 0 1px 2px rgba(0,0,0,.1);
}

body.adm-view-dashboard .adm-ops-search input:focus,
body.adm-view-orders .adm-ops-search input:focus {
    outline: none;
    border-color: #e7b74f;
    box-shadow: 0 0 0 3px rgba(216,154,32,.22);
}

body.adm-view-dashboard .adm-account,
body.adm-view-orders .adm-account { justify-self: end; }

body.adm-view-dashboard .adm-avatar-btn,
body.adm-view-orders .adm-avatar-btn { color: #fff; }

body.adm-view-dashboard .adm-avatar,
body.adm-view-orders .adm-avatar {
    background: rgba(255,255,255,.2);
    color: #fff;
    border: 1px solid rgba(255,255,255,.2);
}

body.adm-view-dashboard .adm-account-name,
body.adm-view-orders .adm-account-name { color: #fff; }

body.adm-view-dashboard .adm-mobile-tabs,
body.adm-view-orders .adm-mobile-tabs { display: none; }

body.adm-view-dashboard .adm-page,
body.adm-view-orders .adm-page {
    width: 100%;
    max-width: 1680px;
    margin: 0 auto;
    padding: 1.65rem 1.8rem 2.4rem;
}

body.adm-view-dashboard .adm-page-head,
body.adm-view-orders .adm-page-head {
    align-items: flex-end;
    margin-bottom: 1rem;
}

body.adm-view-dashboard .adm-page-head h1,
body.adm-view-orders .adm-page-head h1 {
    color: var(--ops-text);
    font-size: 1.55rem;
    letter-spacing: -.025em;
}

body.adm-view-dashboard .adm-lede,
body.adm-view-orders .adm-lede {
    margin: .18rem 0 0;
    color: var(--ops-muted);
    font-size: .83rem;
}

body.adm-view-dashboard .btn,
body.adm-view-orders .btn { border-radius: 7px; }

/* Dashboard */
body.adm-view-dashboard .adm-band { margin-bottom: 1.45rem; }
body.adm-view-dashboard .adm-kpis { gap: .8rem; margin-bottom: .85rem; }
body.adm-view-dashboard .adm-kpi {
    min-height: 112px;
    padding: .95rem 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(9,34,59,.045);
}
body.adm-view-dashboard .adm-kpi-label { font-size: .67rem; }
body.adm-view-dashboard .adm-kpi-value { font-size: 1.48rem; }
body.adm-view-dashboard .adm-kpi-note { margin-top: auto; }
body.adm-view-dashboard .adm-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(285px, .7fr);
    gap: .85rem;
}
body.adm-view-dashboard .adm-dashboard-grid > * { min-width: 0; }
body.adm-view-dashboard .adm-card {
    border-radius: 10px;
    padding: 1rem 1.1rem;
    box-shadow: 0 2px 9px rgba(9,34,59,.045);
}
body.adm-view-dashboard .adm-card-head { align-items: flex-start; }
body.adm-view-dashboard .adm-revenue-card,
body.adm-view-dashboard .adm-branch-card { min-height: 250px; }
body.adm-view-dashboard .adm-chart { height: 175px; }
body.adm-view-dashboard .adm-chart-zero {
    min-height: 172px;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: .28rem;
    text-align: center;
    color: var(--ops-muted);
    background: linear-gradient(#fbfcfd, #f7f8fa);
    border: 1px dashed #d4dce6;
    border-radius: 8px;
}
body.adm-view-dashboard .adm-chart-zero-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--ops-blue);
    background: #eaf2fd;
    font-weight: 800;
}
body.adm-view-dashboard .adm-chart-zero strong { color: var(--ops-text); font-size: .86rem; }
body.adm-view-dashboard .adm-chart-zero small { font-size: .74rem; }
body.adm-view-dashboard .adm-branch-card .adm-bars { margin-top: 1.2rem; }
body.adm-view-dashboard .adm-band-head { align-items: flex-end; }
body.adm-view-dashboard .adm-band-title { margin: .18rem 0 .75rem; }
body.adm-view-dashboard .adm-band-head .adm-band-title { margin-bottom: 0; }
body.adm-view-dashboard .adm-text-link { color: var(--ops-navy); font-size: .8rem; font-weight: 700; }
body.adm-view-dashboard .adm-pipe { gap: .65rem; }
body.adm-view-dashboard .adm-pipe-card {
    min-height: 96px;
    padding: .78rem .86rem;
    border-left-width: 3px;
    border-radius: 9px;
}
body.adm-view-dashboard .adm-pipe-card.is-pending,
body.adm-view-dashboard .adm-pipe-card.is-unpaid { border-left-color: #c68a13; }
body.adm-view-dashboard .adm-pipe-card.is-transit { border-left-color: #2766b0; }
body.adm-view-dashboard .adm-pipe-card.is-complete,
body.adm-view-dashboard .adm-pipe-card.is-paid { border-left-color: #218553; }
body.adm-view-dashboard .adm-pipe-card.is-cancelled { border-left-color: #bf363b; }
body.adm-view-dashboard .adm-attn { gap: .65rem; }
body.adm-view-dashboard .adm-attn-card { border-radius: 9px; }
body.adm-view-dashboard .adm-dashboard-lower {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(265px, .65fr);
    align-items: start;
    gap: .85rem;
}
body.adm-view-dashboard .adm-latest-orders .adm-tablewrap {
    margin: 0 -1.1rem -1rem;
    border: 0;
    border-radius: 0 0 10px 10px;
    box-shadow: none;
}
body.adm-view-dashboard .adm-stock-list { display: grid; margin: 0; padding: 0; list-style: none; }
body.adm-view-dashboard .adm-stock-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    padding: .75rem 0;
    border-bottom: 1px solid #e8edf2;
}
body.adm-view-dashboard .adm-stock-list li:last-child { border-bottom: 0; }
body.adm-view-dashboard .adm-stock-list li > div { display: grid; gap: .12rem; }
body.adm-view-dashboard .adm-stock-list small { color: #a42f34; font-size: .72rem; }

/* Orders overview cards */
body.adm-view-orders .adm-order-stats {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .55rem;
    margin-bottom: .95rem;
}
body.adm-view-orders .adm-order-stat {
    position: relative;
    min-width: 0;
    min-height: 88px;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto 1fr auto;
    gap: .12rem .55rem;
    padding: .75rem .82rem;
    color: var(--ops-text);
    text-decoration: none;
    background: #fff;
    border: 1px solid var(--ops-line);
    border-radius: 8px;
    box-shadow: 0 1px 5px rgba(9,34,59,.04);
    overflow: hidden;
}
body.adm-view-orders .adm-order-stat::before {
    content: '';
    width: 8px;
    height: 8px;
    margin-top: .18rem;
    border-radius: 50%;
    background: #1f78e8;
}
body.adm-view-orders .adm-order-stat:hover { border-color: #9fb0c4; box-shadow: 0 5px 15px rgba(9,34,59,.08); }
body.adm-view-orders .adm-order-stat > span {
    min-width: 0;
    color: #36475a;
    font-size: .68rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.adm-view-orders .adm-order-stat strong {
    grid-column: 1 / -1;
    align-self: end;
    color: var(--ops-text);
    font-size: 1.32rem;
    line-height: 1;
}
body.adm-view-orders .adm-order-stat small {
    grid-column: 1 / -1;
    color: var(--ops-muted);
    font-size: .63rem;
}
body.adm-view-orders .adm-order-stat-new::before { background: #d99a21; }
body.adm-view-orders .adm-order-stat-payment::before { background: #2a83e8; }
body.adm-view-orders .adm-order-stat-processing::before { background: #50a7ec; }
body.adm-view-orders .adm-order-stat-ready::before { background: #5b59d8; }
body.adm-view-orders .adm-order-stat-complete::before { background: #21905a; }

/* Orders filter bar */
body.adm-view-orders .adm-order-filters {
    display: grid;
    grid-template-columns: repeat(5, minmax(125px, 1fr)) auto;
    gap: .55rem;
    align-items: end;
    margin-bottom: 1rem;
    padding: .72rem;
    background: #fff;
    border: 1px solid var(--ops-line);
    border-radius: 8px;
    box-shadow: 0 1px 5px rgba(9,34,59,.035);
}
body.adm-view-orders .adm-order-filters label {
    min-width: 0;
    display: grid;
    gap: .22rem;
    color: var(--ops-muted);
    font-size: .66rem;
    font-weight: 700;
}
body.adm-view-orders .adm-order-filters input,
body.adm-view-orders .adm-order-filters select {
    width: 100%;
    min-width: 0;
    height: 38px;
    padding: .45rem .62rem;
    color: var(--ops-text);
    background: #fff;
    border: 1px solid #cfd7e1;
    border-radius: 7px;
    font: 500 .76rem var(--font-body);
}
body.adm-view-orders .adm-order-search .adm-search-wrap { min-width: 0; }
body.adm-view-orders .adm-order-search .adm-search-wrap input { padding-left: 2rem; }
body.adm-view-orders .adm-order-detail.is-empty { display: none; }
body.adm-view-orders .adm-order-filter-actions { display: flex; align-items: center; gap: .35rem; }
body.adm-view-orders .adm-order-filter-actions .btn { min-height: 38px; white-space: nowrap; }
body.adm-view-orders .adm-order-filters input:focus,
body.adm-view-orders .adm-order-filters select:focus {
    outline: none;
    border-color: #376caa;
    box-shadow: 0 0 0 3px rgba(19,104,216,.1);
}

/* Orders data workspace */
body.adm-view-orders .adm-orders-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 0;
    background: #fff;
    border: 1px solid var(--ops-line);
    border-radius: 9px;
    box-shadow: 0 3px 14px rgba(9,34,59,.055);
    overflow: clip;
}
body.adm-view-orders .adm-orders-layout.has-detail { grid-template-columns: minmax(0, 1fr) 350px; }
body.adm-view-orders .adm-orders-layout.no-results { display: block; }
body.adm-view-orders .adm-orders-list { min-width: 0; padding: .8rem .8rem 0; }
body.adm-view-orders .adm-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    min-height: 34px;
    margin-bottom: .55rem;
}
body.adm-view-orders .adm-list-head h2 { margin: 0; font-size: .93rem; }
body.adm-view-orders .adm-list-head p { margin: .1rem 0 0; color: var(--ops-muted); font-size: .69rem; }
body.adm-view-orders .adm-exports { gap: .25rem; }
body.adm-view-orders .adm-exports .pill { padding: .22rem .55rem; font-size: .66rem; }
body.adm-view-orders .adm-tablewrap {
    margin: 0 -.8rem;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
body.adm-view-orders .adm-orders-table { min-width: 900px; font-size: .72rem; }
body.adm-view-orders .adm-orders-table th {
    padding: .6rem .64rem;
    color: #34465a;
    background: #f6f8fb;
    font-size: .61rem;
    letter-spacing: 0;
    text-transform: none;
}
body.adm-view-orders .adm-orders-table td {
    padding: .58rem .64rem;
    color: #27394d;
    line-height: 1.28;
    border-bottom-color: #e8edf2;
}
body.adm-view-orders .adm-orders-table td > strong,
body.adm-view-orders .adm-orders-table td > small,
body.adm-view-orders .adm-orders-table time > small { display: block; }
body.adm-view-orders .adm-orders-table td > small,
body.adm-view-orders .adm-orders-table time > small { margin-top: .12rem; color: var(--ops-muted); font-size: .63rem; }
body.adm-view-orders .adm-order-no { color: #0c5ab9; }
body.adm-view-orders .adm-orders-table tr.is-selected {
    background: #eaf3ff;
    box-shadow: inset 3px 0 0 var(--ops-blue);
}
body.adm-view-orders .adm-orders-table tr.is-selected:hover { background: #eaf3ff; }
body.adm-view-orders .adm-orders-table .status-badge,
body.adm-view-orders .adm-orders-table .pay-chip,
body.adm-view-orders .adm-detail-status .status-badge,
body.adm-view-orders .adm-detail-status .pay-chip {
    display: inline-flex;
    align-items: center;
    min-height: 21px;
    margin: 0;
    padding: .14rem .48rem;
    border-radius: 999px;
    font-size: .6rem;
    font-weight: 700;
    white-space: nowrap;
}
body.adm-view-orders .pay-chip.unpaid,
body.adm-view-orders .pay-chip.awaiting { color: #825600; background: #ffecbd; }
body.adm-view-orders .pay-chip.paid { color: #12623b; background: #bdebd1; }
body.adm-view-orders .pay-chip.failed { color: #fff; background: #e24b52; }
body.adm-view-orders .pay-chip.refunded { color: #4c5664; background: #e4e8ed; }
body.adm-view-orders .status-badge.s-pending { color: #805500; background: #ffe8ad; border-color: #f3d17f; }
body.adm-view-orders .status-badge.s-approved,
body.adm-view-orders .status-badge.s-out_for_delivery { color: #0e4e92; background: #cee5ff; border-color: #aed3fc; }
body.adm-view-orders .status-badge.s-waiting_courier,
body.adm-view-orders .status-badge.s-shipped { color: #263aa2; background: #d9e2ff; border-color: #bdccfb; }
body.adm-view-orders .status-badge.s-delivered { color: #12623b; background: #c7ecd6; border-color: #a8dbbd; }
body.adm-view-orders .status-badge.s-cancelled { color: #9d2f35; background: #fde0e1; border-color: #f5c0c2; }
body.adm-view-orders .adm-order-open { text-align: right; }
body.adm-view-orders .adm-order-open .btn { min-height: 29px; padding: .25rem .58rem; color: #0d57ad; border-color: #aacaf0; font-size: .65rem; }

/* Orders right detail drawer */
body.adm-view-orders .adm-order-detail {
    position: sticky;
    top: 74px;
    min-width: 0;
    max-height: calc(100vh - 74px);
    max-height: calc(100dvh - 74px);
    overflow-y: auto;
    padding: 0 1rem 1rem;
    background: #fff;
    border: 0;
    border-left: 1px solid var(--ops-line);
    border-radius: 0;
    box-shadow: -5px 0 16px rgba(9,34,59,.055);
    scroll-behavior: smooth;
    scroll-margin-top: 74px;
}
body.adm-view-orders .adm-order-detail-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    margin: 0 -1rem;
    padding: .9rem 1rem .7rem;
    background: rgba(255,255,255,.97);
    border-bottom: 1px solid #edf0f4;
}
body.adm-view-orders .adm-order-detail-head span { color: var(--ops-muted); font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
body.adm-view-orders .adm-order-detail-head h2 { margin: .08rem 0; color: var(--ops-text); font-size: .98rem; }
body.adm-view-orders .adm-order-detail-head small { color: var(--ops-muted); font-size: .63rem; }
body.adm-view-orders .adm-detail-close { color: var(--ops-muted); font-size: 1.15rem; text-decoration: none; }
body.adm-view-orders .adm-detail-status { display: flex; gap: .4rem; margin: .75rem 0 .55rem; }
body.adm-view-orders .adm-detail-nav {
    position: sticky;
    top: 70px;
    z-index: 2;
    display: flex;
    gap: 1rem;
    margin: 0 -1rem .55rem;
    padding: .4rem 1rem 0;
    background: #fff;
    border-bottom: 1px solid var(--ops-line);
}
body.adm-view-orders .adm-detail-nav a {
    padding: .48rem 0 .42rem;
    color: #3f4e60;
    border-bottom: 2px solid transparent;
    font-size: .66rem;
    font-weight: 600;
}
body.adm-view-orders .adm-detail-nav a:first-child { color: var(--ops-blue); border-bottom-color: var(--ops-blue); }
body.adm-view-orders .adm-order-facts { display: grid; margin: 0; }
body.adm-view-orders .adm-order-facts > div {
    display: grid;
    grid-template-columns: 75px minmax(0, 1fr);
    gap: .6rem;
    padding: .42rem 0;
}
body.adm-view-orders .adm-order-facts dt { color: #526174; font-size: .66rem; font-weight: 600; }
body.adm-view-orders .adm-order-facts dd { margin: 0; color: var(--ops-text); font-size: .7rem; line-height: 1.4; overflow-wrap: anywhere; }
body.adm-view-orders .adm-order-facts dd small { display: block; margin-top: .08rem; font-size: .63rem; }
body.adm-view-orders .adm-detail-section { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--ops-line); scroll-margin-top: 120px; }
body.adm-view-orders .adm-detail-section h3 { margin: 0 0 .55rem; font-size: .76rem; }
body.adm-view-orders .adm-detail-items { display: grid; gap: .48rem; margin: 0; padding: 0; list-style: none; }
body.adm-view-orders .adm-detail-items li { display: flex; justify-content: space-between; gap: .6rem; font-size: .68rem; }
body.adm-view-orders .adm-detail-items li > div { display: grid; gap: .08rem; }
body.adm-view-orders .adm-detail-items small { color: var(--ops-muted); font-size: .61rem; }
body.adm-view-orders .adm-detail-total { display: flex; justify-content: space-between; margin-top: .65rem; padding-top: .55rem; border-top: 1px dashed var(--ops-line); font-size: .71rem; }
body.adm-view-orders .adm-order-timeline { display: grid; margin: 0; padding: 0; list-style: none; }
body.adm-view-orders .adm-order-timeline li { position: relative; display: grid; grid-template-columns: 13px 1fr; gap: .48rem; min-height: 48px; }
body.adm-view-orders .adm-order-timeline li::before { content: ''; position: absolute; left: 5px; top: 12px; bottom: -2px; width: 1px; background: #cfd6df; }
body.adm-view-orders .adm-order-timeline li:last-child::before { display: none; }
body.adm-view-orders .adm-order-timeline li > span { position: relative; z-index: 1; width: 11px; height: 11px; margin-top: 2px; border: 3px solid #d8e9ff; border-radius: 50%; background: var(--ops-blue); }
body.adm-view-orders .adm-order-timeline div { display: grid; gap: .05rem; }
body.adm-view-orders .adm-order-timeline strong { color: var(--ops-text); font-size: .68rem; }
body.adm-view-orders .adm-order-timeline small,
body.adm-view-orders .adm-order-timeline time { color: var(--ops-muted); font-size: .6rem; line-height: 1.35; }
body.adm-view-orders .adm-detail-action { width: 100%; justify-content: center; margin-top: .8rem; color: #fff; background: var(--ops-gold); border-color: var(--ops-gold); }
body.adm-view-orders .adm-orders-empty { min-height: 290px; display: grid; place-content: center; justify-items: center; gap: .35rem; padding: 2rem; text-align: center; }
body.adm-view-orders .adm-orders-empty-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; color: var(--ops-blue); background: #eaf2fd; font-size: 1.35rem; }
body.adm-view-orders .adm-orders-empty h3 { margin: .1rem 0 0; font-size: .95rem; }
body.adm-view-orders .adm-orders-empty p { max-width: 46ch; margin: 0; color: var(--ops-muted); font-size: .76rem; }

@media (max-width: 1380px) {
    body.adm-view-orders .adm-order-filters { grid-template-columns: repeat(3, minmax(125px, 1fr)) auto; }
    body.adm-view-orders .adm-orders-layout.has-detail { grid-template-columns: minmax(0, 1fr) 325px; }
    body.adm-view-orders .adm-order-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
    body.adm-view-dashboard .adm-dashboard-grid,
    body.adm-view-dashboard .adm-dashboard-lower { grid-template-columns: 1fr; }
    body.adm-view-orders .adm-orders-layout.has-detail { grid-template-columns: 1fr; }
    body.adm-view-orders .adm-order-detail { position: static; max-height: none; border-top: 1px solid var(--ops-line); border-left: 0; }
}

@media (max-width: 820px) {
    body.adm-view-dashboard .adm-shell,
    body.adm-view-orders .adm-shell { display: block; }
    body.adm-view-dashboard .adm-topbar,
    body.adm-view-orders .adm-topbar {
        position: sticky;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: .6rem;
        min-height: 62px;
        margin: 0;
        padding: max(.55rem, env(safe-area-inset-top)) .85rem .55rem;
        background: linear-gradient(105deg, #0c2c4d, #09223b);
    }
    body.adm-view-dashboard .adm-menu-btn,
    body.adm-view-orders .adm-menu-btn {
        display: grid;
        place-items: center;
        width: 38px;
        height: 38px;
        min-height: 38px;
        padding: 0;
        background: transparent;
        border: 0;
        border-radius: 7px;
        grid-column: 2;
        grid-row: 1;
    }
    body.adm-view-dashboard .adm-menu-btn span,
    body.adm-view-orders .adm-menu-btn span { display: none; }
    body.adm-view-dashboard .adm-topbrand,
    body.adm-view-orders .adm-topbrand { grid-column: 1; grid-row: 1; text-align: left; }
    body.adm-view-dashboard .adm-topbrand::after,
    body.adm-view-orders .adm-topbrand::after { display: none; }
    body.adm-view-dashboard .adm-ops-search,
    body.adm-view-orders .adm-ops-search { display: none; }
    body.adm-view-dashboard .adm-ops-search input,
    body.adm-view-orders .adm-ops-search input { height: 39px; }
    body.adm-view-dashboard .adm-account,
    body.adm-view-orders .adm-account { display: none; }
    body.adm-view-dashboard .adm-rail,
    body.adm-view-orders .adm-rail { display: none; }
    body.adm-view-dashboard .adm-page,
    body.adm-view-orders .adm-page { padding: 1rem .85rem calc(1.3rem + env(safe-area-inset-bottom)); }
    body.adm-view-dashboard .adm-mobile-tabs,
    body.adm-view-orders .adm-mobile-tabs {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 55;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        min-height: 61px;
        padding-bottom: env(safe-area-inset-bottom);
        background: rgba(255,255,255,.98);
        border-top: 1px solid #d7dee7;
        box-shadow: 0 -5px 18px rgba(9,34,59,.08);
    }
    body.adm-view-dashboard .adm-mobile-tabs a,
    body.adm-view-dashboard .adm-mobile-tabs button,
    body.adm-view-orders .adm-mobile-tabs a,
    body.adm-view-orders .adm-mobile-tabs button {
        position: relative;
        display: grid;
        place-content: center;
        justify-items: center;
        gap: .16rem;
        min-width: 0;
        padding: .45rem .15rem;
        color: #68778a;
        background: transparent;
        border: 0;
        font: 600 .6rem var(--font-body);
        cursor: pointer;
    }
    body.adm-view-dashboard .adm-mobile-tabs a.active,
    body.adm-view-orders .adm-mobile-tabs a.active { color: var(--ops-navy); font-weight: 700; }
    body.adm-view-dashboard .adm-mobile-tabs a.active::before,
    body.adm-view-orders .adm-mobile-tabs a.active::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        width: 30px;
        height: 3px;
        border-radius: 0 0 3px 3px;
        background: var(--ops-gold);
        transform: translateX(-50%);
    }
    body.adm-view-dashboard .adm-mobile-tabs b,
    body.adm-view-orders .adm-mobile-tabs b {
        position: absolute;
        top: 5px;
        left: calc(50% + 7px);
        min-width: 17px;
        height: 17px;
        display: grid;
        place-items: center;
        padding: 0 4px;
        color: #fff;
        background: #df424a;
        border: 2px solid #fff;
        border-radius: 999px;
        font-size: .52rem;
    }
    body.adm-view-dashboard .adm-page,
    body.adm-view-orders .adm-page { padding-bottom: calc(5.2rem + env(safe-area-inset-bottom)); }
    body.adm-view-dashboard .adm-page-head,
    body.adm-view-orders .adm-page-head { flex-direction: row; align-items: flex-end; }
    body.adm-view-dashboard .adm-page-head h1,
    body.adm-view-orders .adm-page-head h1 { font-size: 1.35rem; }
    body.adm-view-dashboard .adm-page-head .btn,
    body.adm-view-orders .adm-page-head .btn { width: auto; }
    body.adm-view-dashboard .adm-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); gap: .6rem; }
    body.adm-view-dashboard .adm-kpi { min-height: 100px; }
    body.adm-view-dashboard .adm-pipe { grid-template-columns: repeat(2, minmax(0,1fr)); }
    body.adm-view-dashboard .adm-attn { grid-template-columns: repeat(2, minmax(0,1fr)); }
    body.adm-view-dashboard .adm-latest-orders .adm-tablewrap { margin: 0; }
    body.adm-view-orders .adm-order-stats { display: none; }
    body.adm-view-orders .adm-order-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: .65rem; }
    body.adm-view-orders .adm-order-search { grid-column: 1 / -1; }
    body.adm-view-orders .adm-order-filter-actions { grid-column: 1 / -1; }
    body.adm-view-orders .adm-order-filter-actions .btn { flex: 1; justify-content: center; }
    body.adm-view-orders .adm-orders-layout { border: 0; background: transparent; box-shadow: none; overflow: visible; }
    body.adm-view-orders .adm-orders-list { padding: 0; }
    body.adm-view-orders .adm-list-head { padding: .1rem 0; }
    body.adm-view-orders .adm-tablewrap { margin: 0; }
    body.adm-view-orders .adm-orders-table { min-width: 0; }
    body.adm-view-orders .adm-orders-table tr {
        position: relative;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: .14rem .75rem;
        margin: 0 0 .65rem;
        padding: .78rem .85rem;
        background: #fff;
        border: 1px solid var(--ops-line);
        border-radius: 9px;
        box-shadow: 0 2px 9px rgba(9,34,59,.05);
    }
    body.adm-view-orders .adm-orders-table tr.is-selected { background: #eef5ff; box-shadow: inset 3px 0 0 var(--ops-blue), 0 2px 9px rgba(9,34,59,.05); }
    body.adm-view-orders .adm-orders-table td {
        display: block;
        padding: 0;
        border: 0;
        font-size: .78rem;
    }
    body.adm-view-orders .adm-orders-table td::before { display: none; }
    body.adm-view-orders .adm-orders-table td[data-label="Order"] { grid-column: 1; grid-row: 1; font-size: .88rem; }
    body.adm-view-orders .adm-orders-table td[data-label="Customer"] { grid-column: 1; grid-row: 2; }
    body.adm-view-orders .adm-orders-table td[data-label="Customer"] small { display: none; }
    body.adm-view-orders .adm-orders-table td[data-label="Total"] { grid-column: 2; grid-row: 1; text-align: right; font-size: .88rem; }
    body.adm-view-orders .adm-orders-table td[data-label="Payment"] { grid-column: 1; grid-row: 3; margin-top: .32rem; }
    body.adm-view-orders .adm-orders-table td[data-label="Payment"] small { display: none; }
    body.adm-view-orders .adm-orders-table td[data-label="Fulfilment"] { grid-column: 2; grid-row: 3; margin-top: .32rem; text-align: right; }
    body.adm-view-orders .adm-orders-table td[data-label="Items"] { grid-column: 1; grid-row: 4; margin-top: .3rem; color: var(--ops-muted); font-size: .67rem; }
    body.adm-view-orders .adm-orders-table td[data-label="Items"]::after { content: ' item(s)'; }
    body.adm-view-orders .adm-orders-table td[data-label="Branch"] { grid-column: 1; grid-row: 4; margin: .3rem 0 0 2.8rem; color: var(--ops-muted); font-size: .67rem; }
    body.adm-view-orders .adm-orders-table td[data-label="Branch"]::before { content: '• '; display: inline; }
    body.adm-view-orders .adm-orders-table td[data-label="Placed"] { grid-column: 2; grid-row: 2; color: var(--ops-muted); text-align: right; font-size: .65rem; }
    body.adm-view-orders .adm-orders-table td[data-label="Placed"] small { display: inline; margin-left: .2rem; }
    body.adm-view-orders .adm-order-open { position: absolute; inset: 0; margin: 0; padding: 0 !important; border: 0 !important; }
    body.adm-view-orders .adm-order-open .btn { width: 100%; height: 100%; padding: 0; color: transparent; background: transparent; border: 0; }
    body.adm-view-orders .adm-order-open .btn:focus-visible { outline: 3px solid var(--ops-blue); outline-offset: 2px; }
    body.adm-view-orders .adm-order-detail {
        position: fixed;
        inset: 0;
        z-index: 70;
        max-height: none;
        padding: 0 1rem 1rem;
        border: 0;
        overflow-y: auto;
    }
    body.adm-view-orders .adm-order-detail-head { top: 0; padding-top: max(.9rem, env(safe-area-inset-top)); }
    body.adm-view-orders .adm-detail-nav { top: 71px; }
}

@media (max-width: 520px) {
    body.adm-view-dashboard .adm-page,
    body.adm-view-orders .adm-page { padding-inline: .7rem; }
    body.adm-view-dashboard .adm-page-head,
    body.adm-view-orders .adm-page-head { align-items: flex-start; }
    body.adm-view-dashboard .adm-page-head .btn,
    body.adm-view-orders .adm-page-head .btn { display: none; }
    body.adm-view-dashboard .adm-lede,
    body.adm-view-orders .adm-lede { font-size: .75rem; }
    body.adm-view-dashboard .adm-kpis { grid-template-columns: 1fr 1fr; }
    body.adm-view-dashboard .adm-kpi { min-height: 92px; padding: .75rem; }
    body.adm-view-dashboard .adm-kpi-value { font-size: 1.22rem; }
    body.adm-view-dashboard .adm-grid-3 { grid-template-columns: 1fr; }
    body.adm-view-orders .adm-order-filters { grid-template-columns: 1fr 1fr; }
    body.adm-view-orders .adm-date-filter { display: none; }
    body.adm-view-orders .adm-list-head { align-items: flex-start; }
    body.adm-view-orders .adm-list-head .adm-exports { display: none; }
}

@media (min-width: 821px) {
    body.adm-view-orders .adm-order-search { display: none; }
}

/* ==========================================================================
   ADMIN OPERATIONS — approved Payments + Shipping workspaces
   Deliberately scoped: these rules cannot restyle catalogue/content pages.
   ========================================================================== */
body:is(.adm-view-payments, .adm-view-shipping) {
    --ops-navy: #09223b;
    --ops-navy-deep: #06192d;
    --ops-blue: #1368d8;
    --ops-gold: #d89a20;
    --ops-bg: #f6f5f2;
    --ops-line: #dce2e9;
    --ops-text: #10243b;
    --ops-muted: #6c7a8b;
    color: var(--ops-text);
    background: var(--ops-bg);
}
body:is(.adm-view-payments, .adm-view-shipping) .adm-shell { grid-template-columns: 210px minmax(0, 1fr); background: var(--ops-bg); }
body:is(.adm-view-payments, .adm-view-shipping) .adm-side {
    gap: 1.25rem;
    padding: 1.55rem .85rem 1.1rem;
    background: linear-gradient(165deg, #0b2948 0%, var(--ops-navy-deep) 72%);
    border-right: 1px solid rgba(255,255,255,.08);
    scrollbar-color: rgba(255,255,255,.24) transparent;
}
body:is(.adm-view-payments, .adm-view-shipping) .adm-side .wordmark { padding: 0 .55rem 1rem; color: #fff; font-size: 1.05rem; border-bottom: 1px solid rgba(255,255,255,.1); }
body:is(.adm-view-payments, .adm-view-shipping) .adm-side .wm-logo { width: 30px; height: 30px; }
body:is(.adm-view-payments, .adm-view-shipping) .adm-side nav { gap: .12rem; }
body:is(.adm-view-payments, .adm-view-shipping) .adm-side nav a {
    min-height: 39px;
    padding: .56rem .72rem;
    color: #c8d4e2;
    border-left: 3px solid transparent;
    border-radius: 7px;
    font-size: .84rem;
    font-weight: 600;
}
body:is(.adm-view-payments, .adm-view-shipping) .adm-side nav a:hover { color: #fff; background: rgba(255,255,255,.075); }
body:is(.adm-view-payments, .adm-view-shipping) .adm-side nav a.active { color: #fff; background: rgba(255,255,255,.1); border-left-color: var(--ops-gold); }
body:is(.adm-view-payments, .adm-view-shipping) .adm-nav-group { margin: .85rem .7rem .25rem; padding: 0; color: #74879c; font-size: .61rem; }
body:is(.adm-view-payments, .adm-view-shipping) .adm-side-foot { padding-top: .75rem; border-top: 1px solid rgba(255,255,255,.09); }
body:is(.adm-view-payments, .adm-view-shipping) .adm-body { min-width: 0; padding: 0; background: var(--ops-bg); }
body:is(.adm-view-payments, .adm-view-shipping) .adm-topbar {
    position: sticky;
    top: 0;
    z-index: 46;
    display: grid;
    grid-template-columns: minmax(180px, auto) minmax(280px, 570px) auto;
    align-items: center;
    gap: 1.1rem;
    min-height: 74px;
    margin: 0;
    padding: 0 2rem;
    color: #fff;
    background: linear-gradient(105deg, #0c2c4d, #09223b);
    border: 0;
    box-shadow: 0 2px 12px rgba(6,25,45,.16);
}
body:is(.adm-view-payments, .adm-view-shipping) .adm-topbrand { display: block; color: #fff; font: 700 .98rem var(--font-display); letter-spacing: 0; text-transform: none; }
body:is(.adm-view-payments, .adm-view-shipping) .adm-topbrand::after { content: 'Better Sleep. Brighter Days.'; display: block; margin-top: .15rem; color: #9eb0c4; font: 500 .63rem var(--font-body); }
body:is(.adm-view-payments, .adm-view-shipping) .adm-ops-search { position: relative; width: 100%; max-width: 570px; display: flex; align-items: center; }
body:is(.adm-view-payments, .adm-view-shipping) .adm-ops-search svg { position: absolute; left: .8rem; color: #748397; pointer-events: none; }
body:is(.adm-view-payments, .adm-view-shipping) .adm-ops-search input {
    width: 100%; height: 40px; padding: .55rem .85rem .55rem 2.25rem;
    color: #182b41; background: #fff; border: 1px solid rgba(255,255,255,.4);
    border-radius: 7px; font: 500 .82rem var(--font-body); box-shadow: 0 1px 2px rgba(0,0,0,.1);
}
body:is(.adm-view-payments, .adm-view-shipping) .adm-ops-search input:focus { outline: none; border-color: #e7b74f; box-shadow: 0 0 0 3px rgba(216,154,32,.22); }
body:is(.adm-view-payments, .adm-view-shipping) .adm-account { justify-self: end; }
body:is(.adm-view-payments, .adm-view-shipping) .adm-avatar-btn,
body:is(.adm-view-payments, .adm-view-shipping) .adm-account-name { color: #fff; }
body:is(.adm-view-payments, .adm-view-shipping) .adm-avatar { color: #fff; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.2); }
body:is(.adm-view-payments, .adm-view-shipping) .adm-mobile-tabs { display: none; }
body:is(.adm-view-payments, .adm-view-shipping) .adm-page { width: 100%; max-width: 1680px; margin: 0 auto; padding: 1.65rem 1.8rem 2.4rem; }
body:is(.adm-view-payments, .adm-view-shipping) .adm-page-head { align-items: flex-end; margin-bottom: 1rem; }
body:is(.adm-view-payments, .adm-view-shipping) .adm-page-head h1 { color: var(--ops-text); font-size: 1.55rem; letter-spacing: -.025em; }
body:is(.adm-view-payments, .adm-view-shipping) .adm-lede { margin: .18rem 0 0; color: var(--ops-muted); font-size: .83rem; }
body:is(.adm-view-payments, .adm-view-shipping) .btn { border-radius: 7px; }
body:is(.adm-view-payments, .adm-view-shipping) .adm-list-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; min-height: 34px; margin-bottom: .55rem; }
body:is(.adm-view-payments, .adm-view-shipping) .adm-list-head h2 { margin: 0; font-size: .93rem; }
body:is(.adm-view-payments, .adm-view-shipping) .adm-list-head p { margin: .1rem 0 0; color: var(--ops-muted); font-size: .69rem; }
body:is(.adm-view-payments, .adm-view-shipping) .adm-tablewrap { margin: 0 -.8rem; border: 0; border-radius: 0; box-shadow: none; }
body:is(.adm-view-payments, .adm-view-shipping) .adm-order-no { color: #0c5ab9; }
body:is(.adm-view-payments, .adm-view-shipping) .adm-detail-close { color: var(--ops-muted); font-size: 1.15rem; text-decoration: none; }
body:is(.adm-view-payments, .adm-view-shipping) .adm-search-wrap { position: relative; display: block; }
body:is(.adm-view-payments, .adm-view-shipping) .adm-search-wrap svg { position: absolute; top: 50%; left: .65rem; color: #718094; transform: translateY(-50%); pointer-events: none; }
body:is(.adm-view-payments, .adm-view-shipping) .adm-search-wrap input { padding-left: 2rem; }

/* Payment overview and filter bar */
body.adm-view-payments .adm-integration-state { display: flex; align-items: center; gap: .6rem; margin: -.15rem 0 .85rem; padding: .5rem .7rem; color: #506174; background: #eef2f6; border: 1px solid #dce3eb; border-radius: 7px; }
body.adm-view-payments .adm-integration-state > span { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #8793a1; }
body.adm-view-payments .adm-integration-state.is-live > span { background: #218553; box-shadow: 0 0 0 4px rgba(33,133,83,.12); }
body.adm-view-payments .adm-integration-state.is-test > span { background: var(--ops-gold); }
body.adm-view-payments .adm-integration-state div { display: flex; align-items: baseline; gap: .45rem; min-width: 0; }
body.adm-view-payments .adm-integration-state strong { color: var(--ops-text); font-size: .7rem; }
body.adm-view-payments .adm-integration-state small { font-size: .66rem; }
body.adm-view-payments .adm-payment-stats,
body.adm-view-shipping .adm-shipping-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .55rem; margin-bottom: .95rem; }
body.adm-view-payments .adm-payment-stat,
body.adm-view-shipping .adm-shipping-stat { position: relative; min-width: 0; min-height: 91px; display: grid; align-content: space-between; gap: .22rem; padding: .72rem .78rem .68rem .9rem; background: #fff; border: 1px solid var(--ops-line); border-radius: 8px; box-shadow: 0 1px 5px rgba(9,34,59,.04); overflow: hidden; }
body.adm-view-payments .adm-payment-stat::before,
body.adm-view-shipping .adm-shipping-stat::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: #2778d3; }
body.adm-view-payments .adm-payment-stat > span,
body.adm-view-shipping .adm-shipping-stat > span { color: #526174; font-size: .63rem; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; }
body.adm-view-payments .adm-payment-stat strong,
body.adm-view-shipping .adm-shipping-stat strong { min-width: 0; color: var(--ops-text); font-size: 1.16rem; line-height: 1; overflow: hidden; text-overflow: ellipsis; }
body.adm-view-payments .adm-payment-stat small,
body.adm-view-shipping .adm-shipping-stat small { color: var(--ops-muted); font-size: .62rem; }
body.adm-view-payments .adm-payment-stat.is-collected::before,
body.adm-view-payments .adm-payment-stat.is-online::before,
body.adm-view-shipping .adm-shipping-stat.is-active::before { background: #218553; }
body.adm-view-payments .adm-payment-stat.is-awaiting::before,
body.adm-view-payments .adm-payment-stat.is-manual::before,
body.adm-view-shipping .adm-shipping-stat.is-fallback::before { background: var(--ops-gold); }
body.adm-view-payments .adm-payment-stat.is-failed::before { background: #d34249; }
body.adm-view-payments .adm-payment-stat.is-refunded::before,
body.adm-view-shipping .adm-shipping-stat.is-inactive::before { background: #8793a1; }

body.adm-view-payments .adm-payment-filters,
body.adm-view-shipping .adm-shipping-filters { display: grid; gap: .55rem; align-items: end; margin-bottom: 1rem; padding: .72rem; background: #fff; border: 1px solid var(--ops-line); border-radius: 8px; box-shadow: 0 1px 5px rgba(9,34,59,.035); }
body.adm-view-payments .adm-payment-filters { grid-template-columns: minmax(190px, 1.5fr) repeat(5, minmax(118px, 1fr)) auto; }
body.adm-view-shipping .adm-shipping-filters { grid-template-columns: minmax(220px, 1.8fr) repeat(2, minmax(140px, .8fr)) auto; }
body:is(.adm-view-payments, .adm-view-shipping) :is(.adm-payment-filters, .adm-shipping-filters) label { min-width: 0; display: grid; gap: .22rem; color: var(--ops-muted); font-size: .66rem; font-weight: 700; }
body:is(.adm-view-payments, .adm-view-shipping) :is(.adm-payment-filters, .adm-shipping-filters) :is(input, select) { width: 100%; min-width: 0; height: 38px; padding: .45rem .62rem; color: var(--ops-text); background: #fff; border: 1px solid #cfd7e1; border-radius: 7px; font: 500 .76rem var(--font-body); }
body:is(.adm-view-payments, .adm-view-shipping) :is(.adm-payment-filters, .adm-shipping-filters) :is(input, select):focus { outline: none; border-color: #376caa; box-shadow: 0 0 0 3px rgba(19,104,216,.1); }
body:is(.adm-view-payments, .adm-view-shipping) :is(.adm-payment-filter-actions, .adm-shipping-filter-actions) { display: flex; align-items: center; gap: .35rem; }
body:is(.adm-view-payments, .adm-view-shipping) :is(.adm-payment-filter-actions, .adm-shipping-filter-actions) .btn { min-height: 38px; white-space: nowrap; }

/* Payment data workspace and drawer */
body.adm-view-payments .adm-payments-layout,
body.adm-view-shipping .adm-shipping-layout { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; background: #fff; border: 1px solid var(--ops-line); border-radius: 9px; box-shadow: 0 3px 14px rgba(9,34,59,.055); overflow: clip; }
body.adm-view-payments .adm-payments-layout.has-detail,
body.adm-view-shipping .adm-shipping-layout.has-editor { grid-template-columns: minmax(0, 1fr) 350px; }
body.adm-view-payments .adm-payments-list,
body.adm-view-shipping .adm-shipping-list { min-width: 0; padding: .8rem .8rem 0; }
body.adm-view-payments .adm-payments-table { min-width: 920px; font-size: .7rem; }
body.adm-view-shipping .adm-shipping-table { min-width: 850px; font-size: .71rem; }
body:is(.adm-view-payments, .adm-view-shipping) :is(.adm-payments-table, .adm-shipping-table) th { padding: .6rem .62rem; color: #34465a; background: #f6f8fb; font-size: .6rem; letter-spacing: 0; text-transform: none; }
body:is(.adm-view-payments, .adm-view-shipping) :is(.adm-payments-table, .adm-shipping-table) td { padding: .58rem .62rem; color: #27394d; line-height: 1.28; border-bottom-color: #e8edf2; }
body:is(.adm-view-payments, .adm-view-shipping) :is(.adm-payments-table, .adm-shipping-table) td > :is(strong, small),
body:is(.adm-view-payments, .adm-view-shipping) :is(.adm-payments-table, .adm-shipping-table) time > small { display: block; }
body:is(.adm-view-payments, .adm-view-shipping) :is(.adm-payments-table, .adm-shipping-table) td > small,
body:is(.adm-view-payments, .adm-view-shipping) :is(.adm-payments-table, .adm-shipping-table) time > small { margin-top: .1rem; color: var(--ops-muted); font-size: .61rem; }
body:is(.adm-view-payments, .adm-view-shipping) :is(.adm-payments-table, .adm-shipping-table) tr.is-selected { background: #eaf3ff; box-shadow: inset 3px 0 0 var(--ops-blue); }
body.adm-view-payments .adm-payments-table .pay-chip,
body.adm-view-payments .adm-payment-detail .pay-chip { display: inline-flex; align-items: center; min-height: 21px; margin: 0; padding: .14rem .48rem; border-radius: 999px; font-size: .59rem; font-weight: 700; white-space: nowrap; }
body.adm-view-payments .pay-chip.unpaid,
body.adm-view-payments .pay-chip.awaiting { color: #825600; background: #ffecbd; }
body.adm-view-payments .pay-chip.paid { color: #12623b; background: #bdebd1; }
body.adm-view-payments .pay-chip.failed { color: #fff; background: #e24b52; }
body.adm-view-payments .pay-chip.refunded { color: #4c5664; background: #e4e8ed; }
body.adm-view-payments .adm-payment-reference { display: block; max-width: 125px; overflow: hidden; color: #526174; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .61rem; text-overflow: ellipsis; white-space: nowrap; }
body.adm-view-payments .adm-payment-open { text-align: right; }
body.adm-view-payments .adm-payment-open .btn,
body.adm-view-shipping .adm-rate-actions > .btn { min-height: 29px; padding: .25rem .58rem; color: #0d57ad; border-color: #aacaf0; font-size: .65rem; }
body.adm-view-payments .adm-payment-detail,
body.adm-view-shipping .adm-shipping-editor { position: sticky; top: 74px; min-width: 0; max-height: calc(100dvh - 74px); overflow-y: auto; padding: 0 1rem 1rem; background: #fff; border-left: 1px solid var(--ops-line); box-shadow: -5px 0 16px rgba(9,34,59,.055); scroll-behavior: smooth; }
body.adm-view-payments .adm-payment-detail-head,
body.adm-view-shipping .adm-shipping-editor-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; margin: 0 -1rem; padding: .9rem 1rem .7rem; background: rgba(255,255,255,.97); border-bottom: 1px solid #edf0f4; }
body:is(.adm-view-payments, .adm-view-shipping) :is(.adm-payment-detail-head, .adm-shipping-editor-head) > div > span { color: var(--ops-muted); font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
body:is(.adm-view-payments, .adm-view-shipping) :is(.adm-payment-detail-head, .adm-shipping-editor-head) h2 { margin: .08rem 0; color: var(--ops-text); font-size: .98rem; }
body:is(.adm-view-payments, .adm-view-shipping) :is(.adm-payment-detail-head, .adm-shipping-editor-head) small { color: var(--ops-muted); font-size: .63rem; }
body.adm-view-payments .adm-detail-status { display: flex; gap: .4rem; margin: .75rem 0 .55rem; }
body.adm-view-payments .adm-method-chip { display: inline-flex; align-items: center; min-height: 21px; padding: .14rem .48rem; color: #284b70; background: #dceafb; border-radius: 999px; font-size: .59rem; font-weight: 700; }
body.adm-view-payments .adm-detail-section { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--ops-line); }
body.adm-view-payments .adm-detail-section h3 { margin: 0 0 .55rem; font-size: .76rem; }
body.adm-view-payments :is(.adm-payment-facts, .adm-payment-breakdown) { display: grid; margin: 0; }
body.adm-view-payments :is(.adm-payment-facts, .adm-payment-breakdown) > div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: .6rem; padding: .38rem 0; }
body.adm-view-payments :is(.adm-payment-facts, .adm-payment-breakdown) dt { color: #526174; font-size: .66rem; font-weight: 600; }
body.adm-view-payments :is(.adm-payment-facts, .adm-payment-breakdown) dd { margin: 0; color: var(--ops-text); font-size: .7rem; text-align: right; }
body.adm-view-payments .adm-payment-facts dd small { display: block; margin-top: .08rem; color: var(--ops-muted); font-size: .61rem; }
body.adm-view-payments .adm-payment-breakdown .is-total { margin-top: .2rem; padding-top: .55rem; border-top: 1px dashed var(--ops-line); }
body.adm-view-payments .adm-payment-breakdown .is-total :is(dt, dd) { color: var(--ops-text); font-weight: 800; }
body.adm-view-payments .adm-wrap-anywhere { overflow-wrap: anywhere; }
body.adm-view-payments .adm-payment-timeline { display: grid; margin: 0; padding: 0; list-style: none; }
body.adm-view-payments .adm-payment-timeline li { position: relative; display: grid; grid-template-columns: 13px 1fr; gap: .48rem; min-height: 45px; }
body.adm-view-payments .adm-payment-timeline li::before { content: ''; position: absolute; left: 5px; top: 12px; bottom: -2px; width: 1px; background: #cfd6df; }
body.adm-view-payments .adm-payment-timeline li:last-child::before { display: none; }
body.adm-view-payments .adm-payment-timeline li > span { position: relative; z-index: 1; width: 11px; height: 11px; margin-top: 2px; border: 3px solid #d9e0e7; border-radius: 50%; background: #8e99a6; }
body.adm-view-payments .adm-payment-timeline li.is-complete > span { border-color: #d8e9ff; background: var(--ops-blue); }
body.adm-view-payments .adm-payment-timeline div { display: grid; gap: .05rem; }
body.adm-view-payments .adm-payment-timeline strong { font-size: .68rem; }
body.adm-view-payments .adm-payment-timeline time { color: var(--ops-muted); font-size: .6rem; }
body.adm-view-payments .adm-payment-actions { display: grid; gap: .45rem; margin-top: .8rem; }
body.adm-view-payments .adm-payment-actions :is(form, button),
body.adm-view-payments .adm-view-order { width: 100%; justify-content: center; }
body.adm-view-payments .adm-view-order { margin-top: .45rem; }
body.adm-view-payments .adm-payment-events { margin-top: 1rem; padding: .8rem; background: #fff; border: 1px solid var(--ops-line); border-radius: 9px; box-shadow: 0 3px 14px rgba(9,34,59,.04); }
body.adm-view-payments .adm-payment-events .adm-table { font-size: .71rem; }
body.adm-view-payments .adm-events-empty { margin: 0; padding: 1rem; color: var(--ops-muted); text-align: center; font-size: .75rem; }

/* Shipping directory and rate editor */
body.adm-view-shipping .adm-shipping-stat.is-province::before { background: #275f9f; }
body.adm-view-shipping .adm-shipping-stat.is-city::before { background: #2f83d2; }
body.adm-view-shipping .adm-shipping-stat.is-barangay::before { background: #54a5df; }
body.adm-view-shipping .adm-keynote { margin: -.15rem 0 .85rem; }
body.adm-view-shipping .adm-level-chip,
body.adm-view-shipping .adm-rate-status { display: inline-flex; align-items: center; min-height: 21px; padding: .14rem .48rem; border-radius: 999px; font-size: .59rem; font-weight: 700; white-space: nowrap; }
body.adm-view-shipping .adm-level-chip { color: #214a76; background: #dceafa; }
body.adm-view-shipping .adm-level-chip.level-default { color: #795a12; background: #fff0c8; }
body.adm-view-shipping .adm-rate-status.is-active { color: #12623b; background: #bdebd1; }
body.adm-view-shipping .adm-rate-status.is-inactive { color: #4c5664; background: #e4e8ed; }
body.adm-view-shipping .adm-rate-actions { display: flex; align-items: center; justify-content: flex-end; gap: .32rem; white-space: nowrap; }
body.adm-view-shipping .adm-rate-actions form { margin: 0; }
body.adm-view-shipping .adm-rate-actions .pill { padding: .26rem .48rem; font-size: .6rem; }
body.adm-view-shipping .adm-shipping-form { display: grid; gap: .7rem; padding-top: .85rem; }
body.adm-view-shipping .adm-shipping-form > label { display: grid; gap: .28rem; color: #4f5f72; font-size: .67rem; font-weight: 700; }
body.adm-view-shipping .adm-shipping-form :is(input[type="text"], select, textarea) { width: 100%; min-width: 0; padding: .56rem .62rem; color: var(--ops-text); background: #fff; border: 1px solid #cad4df; border-radius: 7px; font: 500 .73rem var(--font-body); resize: vertical; }
body.adm-view-shipping .adm-shipping-form :is(input, select, textarea):focus { outline: none; border-color: #376caa; box-shadow: 0 0 0 3px rgba(19,104,216,.1); }
body.adm-view-shipping .adm-shipping-form [hidden] { display: none; }
body.adm-view-shipping .adm-rate-toggle { grid-template-columns: auto 1fr !important; align-items: flex-start; gap: .55rem !important; padding: .65rem; background: #f6f8fb; border: 1px solid var(--ops-line); border-radius: 7px; }
body.adm-view-shipping .adm-rate-toggle input { margin-top: .12rem; }
body.adm-view-shipping .adm-rate-toggle span { display: grid; gap: .08rem; }
body.adm-view-shipping .adm-rate-toggle strong { color: var(--ops-text); font-size: .7rem; }
body.adm-view-shipping .adm-rate-toggle small { color: var(--ops-muted); font-size: .61rem; font-weight: 500; }
body.adm-view-shipping .adm-shipping-form > .btn { width: 100%; justify-content: center; }
body.adm-view-shipping .adm-editor-secondary { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin-top: .45rem; padding-top: .7rem; border-top: 1px solid var(--ops-line); }
body.adm-view-shipping .adm-editor-secondary :is(form, button) { width: 100%; }
body.adm-view-shipping .adm-editor-secondary button { justify-content: center; padding-inline: .35rem; font-size: .65rem; }
body:is(.adm-view-payments, .adm-view-shipping) :is(.adm-payments-empty, .adm-shipping-empty) { min-height: 285px; display: grid; place-content: center; justify-items: center; gap: .35rem; padding: 2rem; text-align: center; }
body:is(.adm-view-payments, .adm-view-shipping) :is(.adm-payments-empty, .adm-shipping-empty) > span { width: 46px; height: 46px; display: grid; place-items: center; color: var(--ops-blue); background: #eaf2fd; border-radius: 50%; font-size: 1.2rem; font-weight: 800; }
body:is(.adm-view-payments, .adm-view-shipping) :is(.adm-payments-empty, .adm-shipping-empty) h3 { margin: .1rem 0 0; font-size: .95rem; }
body:is(.adm-view-payments, .adm-view-shipping) :is(.adm-payments-empty, .adm-shipping-empty) p { max-width: 46ch; margin: 0; color: var(--ops-muted); font-size: .76rem; }

@media (max-width: 1380px) {
    body.adm-view-payments .adm-payment-stats,
    body.adm-view-shipping .adm-shipping-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    body.adm-view-payments .adm-payment-filters { grid-template-columns: repeat(3, minmax(125px, 1fr)) auto; }
    body.adm-view-shipping .adm-shipping-layout.has-editor,
    body.adm-view-payments .adm-payments-layout.has-detail { grid-template-columns: minmax(0, 1fr) 325px; }
}

@media (max-width: 1100px) {
    body.adm-view-payments .adm-payments-layout.has-detail,
    body.adm-view-shipping .adm-shipping-layout.has-editor { grid-template-columns: 1fr; }
    body.adm-view-payments .adm-payment-detail,
    body.adm-view-shipping .adm-shipping-editor { position: static; max-height: none; border-top: 1px solid var(--ops-line); border-left: 0; }
}

@media (max-width: 820px) {
    body:is(.adm-view-payments, .adm-view-shipping) .adm-shell { display: block; }
    body:is(.adm-view-payments, .adm-view-shipping) .adm-topbar { position: sticky; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; min-height: 62px; margin: 0; padding: max(.55rem, env(safe-area-inset-top)) .85rem .55rem; background: linear-gradient(105deg, #0c2c4d, #09223b); }
    body:is(.adm-view-payments, .adm-view-shipping) .adm-menu-btn { display: grid; place-items: center; width: 38px; height: 38px; min-height: 38px; padding: 0; background: transparent; border: 0; border-radius: 7px; grid-column: 2; grid-row: 1; }
    body:is(.adm-view-payments, .adm-view-shipping) .adm-menu-btn span { display: none; }
    body:is(.adm-view-payments, .adm-view-shipping) .adm-topbrand { grid-column: 1; grid-row: 1; text-align: left; }
    body:is(.adm-view-payments, .adm-view-shipping) .adm-topbrand::after,
    body:is(.adm-view-payments, .adm-view-shipping) .adm-ops-search,
    body:is(.adm-view-payments, .adm-view-shipping) .adm-account,
    body:is(.adm-view-payments, .adm-view-shipping) .adm-rail { display: none; }
    body:is(.adm-view-payments, .adm-view-shipping) .adm-page { padding: 1rem .85rem calc(5.2rem + env(safe-area-inset-bottom)); }
    body:is(.adm-view-payments, .adm-view-shipping) .adm-mobile-tabs { position: fixed; right: 0; bottom: 0; left: 0; z-index: 55; display: grid; grid-template-columns: repeat(4, 1fr); min-height: 61px; padding-bottom: env(safe-area-inset-bottom); background: rgba(255,255,255,.98); border-top: 1px solid #d7dee7; box-shadow: 0 -5px 18px rgba(9,34,59,.08); }
    body:is(.adm-view-payments, .adm-view-shipping) .adm-mobile-tabs :is(a, button) { position: relative; display: grid; place-content: center; justify-items: center; gap: .16rem; min-width: 0; padding: .45rem .15rem; color: #68778a; background: transparent; border: 0; font: 600 .6rem var(--font-body); cursor: pointer; }
    body:is(.adm-view-payments, .adm-view-shipping) .adm-mobile-tabs a.active { color: var(--ops-navy); font-weight: 700; }
    body:is(.adm-view-payments, .adm-view-shipping) .adm-mobile-tabs a.active::before { content: ''; position: absolute; top: 0; left: 50%; width: 30px; height: 3px; border-radius: 0 0 3px 3px; background: var(--ops-gold); transform: translateX(-50%); }
    body:is(.adm-view-payments, .adm-view-shipping) .adm-mobile-tabs b { position: absolute; top: 5px; left: calc(50% + 7px); min-width: 17px; height: 17px; display: grid; place-items: center; padding: 0 4px; color: #fff; background: #df424a; border: 2px solid #fff; border-radius: 999px; font-size: .52rem; }
    body:is(.adm-view-payments, .adm-view-shipping) .adm-page-head { flex-direction: row; align-items: flex-end; }
    body:is(.adm-view-payments, .adm-view-shipping) .adm-page-head h1 { font-size: 1.35rem; }
    body.adm-view-payments .adm-integration-state div { display: grid; gap: .08rem; }
    body.adm-view-payments .adm-payment-stats,
    body.adm-view-shipping .adm-shipping-stats { display: none; }
    body.adm-view-payments .adm-payment-filters,
    body.adm-view-shipping .adm-shipping-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: .65rem; }
    body:is(.adm-view-payments, .adm-view-shipping) :is(.adm-payment-search, .adm-shipping-search) { grid-column: 1 / -1; }
    body:is(.adm-view-payments, .adm-view-shipping) :is(.adm-payment-filter-actions, .adm-shipping-filter-actions) { grid-column: 1 / -1; }
    body:is(.adm-view-payments, .adm-view-shipping) :is(.adm-payment-filter-actions, .adm-shipping-filter-actions) .btn { flex: 1; justify-content: center; }
    body.adm-view-payments .adm-payments-layout,
    body.adm-view-shipping .adm-shipping-layout { border: 0; background: transparent; box-shadow: none; overflow: visible; }
    body.adm-view-payments .adm-payments-list,
    body.adm-view-shipping .adm-shipping-list { padding: 0; }
    body:is(.adm-view-payments, .adm-view-shipping) .adm-list-head { padding: .1rem 0; }
    body:is(.adm-view-payments, .adm-view-shipping) .adm-tablewrap { margin: 0; }
    body:is(.adm-view-payments, .adm-view-shipping) :is(.adm-payments-table, .adm-shipping-table) { min-width: 0; }
    body:is(.adm-view-payments, .adm-view-shipping) :is(.adm-payments-table, .adm-shipping-table) tr { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .14rem .75rem; margin: 0 0 .65rem; padding: .78rem .85rem; background: #fff; border: 1px solid var(--ops-line); border-radius: 9px; box-shadow: 0 2px 9px rgba(9,34,59,.05); }
    body:is(.adm-view-payments, .adm-view-shipping) :is(.adm-payments-table, .adm-shipping-table) tr.is-selected { background: #eef5ff; box-shadow: inset 3px 0 0 var(--ops-blue), 0 2px 9px rgba(9,34,59,.05); }
    body:is(.adm-view-payments, .adm-view-shipping) :is(.adm-payments-table, .adm-shipping-table) td { display: block; padding: 0; border: 0; font-size: .78rem; }
    body:is(.adm-view-payments, .adm-view-shipping) :is(.adm-payments-table, .adm-shipping-table) td::before { display: none; }
    body.adm-view-payments .adm-payments-table td[data-label="Order"],
    body.adm-view-shipping .adm-shipping-table td[data-label="Location"] { grid-column: 1; grid-row: 1; font-size: .88rem; }
    body.adm-view-payments .adm-payments-table td[data-label="Customer"] { grid-column: 1; grid-row: 2; }
    body.adm-view-payments .adm-payments-table td[data-label="Total"],
    body.adm-view-shipping .adm-shipping-table td[data-label="Shipping fee"] { grid-column: 2; grid-row: 1; text-align: right; font-size: .88rem; }
    body.adm-view-payments .adm-payments-table td[data-label="Payment"],
    body.adm-view-shipping .adm-shipping-table td[data-label="Status"] { grid-column: 1; grid-row: 3; margin-top: .32rem; }
    body.adm-view-payments .adm-payments-table td[data-label="Method"],
    body.adm-view-shipping .adm-shipping-table td[data-label="Rate type"] { grid-column: 2; grid-row: 3; margin-top: .32rem; text-align: right; }
    body.adm-view-payments .adm-payments-table td[data-label="Reference"],
    body.adm-view-shipping .adm-shipping-table td[data-label="Within"] { grid-column: 1; grid-row: 4; margin-top: .3rem; color: var(--ops-muted); font-size: .67rem; }
    body.adm-view-payments .adm-payments-table td[data-label="Received"],
    body.adm-view-shipping .adm-shipping-table td[data-label="Added"] { grid-column: 2; grid-row: 2; color: var(--ops-muted); text-align: right; font-size: .65rem; }
    body.adm-view-payments .adm-payment-open,
    body.adm-view-shipping .adm-rate-actions { position: absolute; inset: 0; margin: 0; padding: 0 !important; border: 0 !important; }
    body.adm-view-payments .adm-payment-open .btn,
    body.adm-view-shipping .adm-rate-actions > .btn { width: 100%; height: 100%; padding: 0; color: transparent; background: transparent; border: 0; }
    body.adm-view-shipping .adm-rate-actions form { display: none; }
    body.adm-view-payments .adm-payment-detail,
    body.adm-view-shipping .adm-shipping-editor { position: fixed; inset: 0; z-index: 70; max-height: none; padding: 0 1rem 1rem; border: 0; overflow-y: auto; }
    body.adm-view-payments .adm-payment-events { display: none; }
}

@media (max-width: 520px) {
    body:is(.adm-view-payments, .adm-view-shipping) .adm-page { padding-inline: .7rem; }
    body:is(.adm-view-payments, .adm-view-shipping) .adm-page-head { align-items: flex-start; }
    body:is(.adm-view-payments, .adm-view-shipping) .adm-page-head .btn { display: none; }
    body:is(.adm-view-payments, .adm-view-shipping) .adm-lede { font-size: .75rem; }
    body:is(.adm-view-payments, .adm-view-shipping) .adm-date-filter { display: none; }
}

@media (min-width: 821px) {
    body.adm-view-payments .adm-payment-search,
    body.adm-view-shipping .adm-shipping-search { display: none; }
}

/* Checkout: the amount inside the pay button was dark text on the dark button. */
body.cine[data-page="checkout"] .place-btn .place-total {
    margin-left: auto; padding-left: 18px; border-left: 1px solid rgba(255, 255, 255, .28);
    color: inherit; font-family: var(--sans, 'Inter', sans-serif); font-size: 17px; font-weight: 600;
    font-variant-numeric: tabular-nums; letter-spacing: 0;
}
body.cine[data-page="checkout"] .place-btn .place-arrow { margin-left: 14px; }

/* Checkout payment choices: brand tiles and accepted-card / bank logos. */
body.cine[data-page="checkout"] .pay-icon { width: 40px; height: 40px; border-radius: 9px; background: #F4F0E9; color: var(--ink, #0A1626); }
body.cine[data-page="checkout"] .pay-icon-logo { background: none; }
body.cine[data-page="checkout"] .pay-icon-logo img { display: block; width: 40px; height: 40px; border-radius: 9px; }
body.cine[data-page="checkout"] .pay-brands { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; max-width: 250px; }
body.cine[data-page="checkout"] .pay-brands img { display: block; width: auto; height: 20px; }
body.cine[data-page="checkout"] .pay-brands-many { gap: 8px 10px; max-width: 230px; }
body.cine[data-page="checkout"] .pay-brands-many img { height: 16px; }
@media (max-width: 820px) {
    body.cine[data-page="checkout"] .pay-icon,
    body.cine[data-page="checkout"] .pay-icon-logo img { width: 34px; height: 34px; border-radius: 8px; }
    /* Logos move under the name on phones so the text keeps its width. */
    body.cine[data-page="checkout"] .pay-brands { grid-column: 3 / -1; justify-content: flex-start; max-width: none; margin-top: -2px; }
    body.cine[data-page="checkout"] .pay-brands img { height: 15px; }
    body.cine[data-page="checkout"] .pay-brands-many img { height: 13px; }
}
/* Card titles stay next to their step number even when there is no badge on the right. */
body.cine[data-page="checkout"] .co-card-head { justify-content: flex-start; }
body.cine[data-page="checkout"] .co-card-head h2 { margin-right: auto; }

/* My Orders: cancel an unpaid order, auto-cancel notice (2026-10-02) */
.cancel-box { display: flex; justify-content: flex-end; margin: 8px 0 0; }
.unpaid-deadline { display: block; margin-top: 4px; font-size: .8rem; color: #6b7280; }