/* ========== Ditasol Lab — shared design system ==========
   Loaded in every layout AFTER apple-tokens.css and BEFORE theme.css.
   Design C "Warm Health" (2026-11-29): warm off-white + deep teal.
   Every colour here is a semantic token — no hardcoded hex for
   system surfaces. Type follows the HIG text styles (body 17/22 iOS,
   headline semibold; tracking none at body sizes, -0.01em only on
   headlines >=28px). Motion (verified Apple patterns — Emil Kowalski /
   apple-ui-craft press-feedback): press :active scale(0.97) 80-160ms
   var(--ease-apple-fluid); hover lift translateY(-2px) scale(1.01)
   100-150ms, pointer devices ONLY (@media hover:hover); focus ring
   2px teal; transform/opacity only; reduced-motion respected. The
   site-wide press rule lives in theme.css (loaded last) so it wins
   over view <style> hovers. */

:root {
    /* Motion tokens live in apple-tokens.css (canonical Apple values);
       --ease-out below is kept only so older rules keep working. */
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --radius-sm: var(--r-small);
    --radius-md: var(--r-control);
    --radius-lg: var(--r-card);
    --radius-xl: 20px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.10);
    --font-system: var(--font-text);
    /* Mirror finish (ditasol.com app.css — values verified from
       ditasol.com/assets/css/app.css, 2026-11-29): glossy white
       top-highlight gradient + inset top highlight + glow shadow.
       Defined once here; button rules below reference them. */
    --btn-mirror-gloss: linear-gradient(180deg, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0.10) 46%, rgba(255, 255, 255, 0) 54%);
    --btn-mirror-gloss-hover: linear-gradient(180deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.12) 46%, rgba(255, 255, 255, 0) 54%);
    --btn-mirror-gloss-active: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 54%);
    --btn-mirror-gloss-soft: linear-gradient(180deg, rgba(255, 255, 255, 0.20) 0%, rgba(255, 255, 255, 0.05) 46%, rgba(255, 255, 255, 0) 54%);
    --btn-mirror-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -1px 0 rgba(0, 0, 0, 0.12), 0 4px 14px rgba(14, 124, 123, 0.30);
    --btn-mirror-shadow-hover: inset 0 1px 0 rgba(255, 255, 255, 0.65), inset 0 -1px 0 rgba(0, 0, 0, 0.12), 0 8px 20px rgba(14, 124, 123, 0.35);
    --btn-mirror-shadow-active: inset 0 2px 5px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    --btn-mirror-shadow-dark: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -1px 0 rgba(0, 0, 0, 0.25), 0 4px 16px rgba(0, 0, 0, 0.45), 0 0 14px rgba(43, 197, 180, 0.22);
    --btn-mirror-shadow-dark-hover: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -1px 0 rgba(0, 0, 0, 0.25), 0 8px 22px rgba(0, 0, 0, 0.5), 0 0 18px rgba(43, 197, 180, 0.28);
}

/* ---- Type scale (HIG text styles; fluid clamp() sizes — auto-adjust
   360 → 1920; weight + size carry hierarchy). Headings balance across
   lines (text-wrap: balance) and never overflow narrow screens. ---- */
h1 { font-size: var(--fs-h1); line-height: var(--lh-heading); letter-spacing: -0.01em; font-weight: 600; text-wrap: balance; overflow-wrap: break-word; }
h2 { font-size: var(--fs-h2); line-height: 1.2; letter-spacing: -0.01em; font-weight: 600; text-wrap: balance; overflow-wrap: break-word; }
h3 { font-size: var(--fs-h3); line-height: 1.3; font-weight: 600; overflow-wrap: break-word; }
h4 { font-size: 15px; line-height: 1.33; font-weight: 600; }
p { line-height: var(--lh-body); }
@media (max-width: 768px) {
    h1 { font-size: var(--fs-h1); }
    h2 { font-size: var(--fs-h2); }
}

/* ---- Liquid Glass utilities (iOS 26) ----
   .glass = REAL frosted glass for floating chrome only (header, tab bar,
   drawer, dropdowns, sheets): translucent fill + backdrop blur + specular
   edge. .glass-card = the glass LOOK for content cards (translucent fill
   + specular edge + soft shadow, NO backdrop-filter — over the flat page
   there is nothing to blur, and blur is a GPU pass per surface).
   Never stack .glass on .glass. Reduce Transparency / Increase Contrast
   fall back to opaque fills (see the media queries at the end). ---- */
.glass {
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-filter);
    backdrop-filter: var(--glass-filter);
    border: var(--glass-border);
    box-shadow: var(--glass-edge), var(--glass-shadow);
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .glass { background: var(--glass-bg-solid); }
}
.glass-strong {
    background: var(--glass-fill-strong);
    -webkit-backdrop-filter: var(--glass-filter-strong);
    backdrop-filter: var(--glass-filter-strong);
    border: var(--glass-border-strong);
    box-shadow: var(--glass-edge-strong), var(--glass-shadow);
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .glass-strong { background: var(--glass-bg-solid); }
}
.glass-card {
    background: var(--glass-fill);
    border: var(--glass-border);
    box-shadow: var(--glass-edge), var(--glass-shadow);
}

/* ---- 3D hover (pointer devices only) ----
   Fixed tilt fallback: perspective(900px) rotateX(3deg) rotateY(-3deg)
   + lift -4px + deeper shadow + brighter edge. theme.js sets --rx/--ry
   from the pointer (max ±6deg) for pointer-follow tilt on the card
   classes it watches. transform/opacity only; press scale(0.97) in
   theme.css still wins while pressed. ---- */
@media (hover: hover) and (pointer: fine) {
    .tilt-3d { transition: transform 200ms var(--ease-apple-fluid), box-shadow 200ms var(--ease-apple-fluid), border-color 200ms var(--ease-apple-fluid); transform-style: preserve-3d; }
    .tilt-3d:hover {
        transform: perspective(var(--tilt-perspective)) rotateX(var(--rx, 3deg)) rotateY(var(--ry, -3deg)) translateY(-4px);
        box-shadow: var(--glass-edge-strong), var(--glass-shadow-lift);
    }
}

/* ---- Links: teal #0B6B6A light (5.91:1 on page) / #2BC5B4 dark (7.96:1 on base).
   NO underlines anywhere on this site — not on hover, focus or active
   either. Root cause of the reported line: style.css:31 underlined
   EVERY link on hover, including button-styled links, and this file
   never set text-decoration at all. Links stay recognisable by their
   teal colour alone. ---- */
a { color: var(--link); text-decoration: none; }
a:hover, a:focus, a:active { text-decoration: none; }

/* ---- Buttons: prominent fill teal #0E7C7B (white text 5.01:1, both modes).
   Accent teal itself is 4.69:1/4.94:1 on light page/card — fills, icons
   and large text only; small body text uses --link.
   MIRROR FINISH (ditasol.com app.css — verified 2026-11-29): a glossy
   top-highlight gradient (white .38 → .10 → 0) layered over the fill,
   an inset 1px top highlight + inset bottom shade, a soft glow shadow,
   and a diagonal shine sweep (::after) that crosses the button on
   hover. Teal identity kept — the mirror is the surface treatment,
   not a new colour. The gloss is strongest at the very top edge and
   ~0 at the vertical centre where the label sits, so white-text
   contrast stays 5.01:1. ---- */
.btn, button.btn-block, .auth-card .btn-block, .btn-book, .btn-view {
    transition: transform 120ms var(--ease-apple-fluid), background-color 160ms var(--ease-apple-fluid),
        border-color 160ms var(--ease-apple-fluid), color 160ms var(--ease-apple-fluid), filter 160ms var(--ease-apple-fluid),
        box-shadow 160ms var(--ease-apple-fluid);
}
.btn:active, .auth-card .btn-block:active { transform: scale(0.97); }
.btn:disabled, .btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn:focus-visible, a:focus-visible, button:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--link);
    outline-offset: 2px;
}
/* No underline on button-styled links, in any state. */
.btn, .btn:hover, .btn:focus, .btn:active { text-decoration: none; }
.btn-primary, .auth-card .btn-block, .btn-book, .btn-view {
    background-color: var(--btn-accent);
    background-image: var(--btn-mirror-gloss);
    color: #fff;
    box-shadow: var(--btn-mirror-shadow);
}
.btn-primary:hover, .auth-card .btn-block:hover, .btn-book:hover, .btn-view:hover {
    background-color: var(--btn-accent);
    background-image: var(--btn-mirror-gloss-hover);
    color: #fff;
    filter: none;
    box-shadow: var(--btn-mirror-shadow-hover);
}
.btn-primary:active, .auth-card .btn-block:active, .btn-book:active, .btn-view:active {
    background-image: var(--btn-mirror-gloss-active);
    box-shadow: var(--btn-mirror-shadow-active);
}
.btn-outline {
    border-color: var(--link);
    color: var(--link);
    background-image: var(--btn-mirror-gloss-soft);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.30);
}
.btn-outline:hover {
    background: var(--link);
    background-image: var(--btn-mirror-gloss-soft);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.30);
}
/* Shine sweep (ditasol.com): a diagonal light band crosses the button
   on hover. Pointer devices only; hidden on disabled buttons; the
   site-wide reduced-motion rule makes it instant. */
.btn-primary, .auth-card .btn-block, .btn-book, .btn-view {
    position: relative;
    overflow: hidden;
}
.btn-primary::after, .auth-card .btn-block::after, .btn-book::after, .btn-view::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 45%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform: translateX(-240%) skewX(-18deg);
    transition: transform 0.65s ease;
    pointer-events: none;
}
@media (hover: hover) {
    .btn-primary:hover::after, .auth-card .btn-block:hover::after,
    .btn-book:hover::after, .btn-view:hover::after {
        transform: translateX(340%) skewX(-18deg);
    }
    /* 3D hover lift for buttons (pointer devices only): a small forward
       tilt + lift, deeper shadow, brighter specular edge. Press
       scale(0.97) in theme.css wins while the button is held down. */
    .btn:hover { transform: perspective(800px) rotateX(4deg) translateY(-2px); }
    .btn-primary:hover, .auth-card .btn-block:hover, .btn-book:hover, .btn-view:hover {
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), inset 0 -1px 0 rgba(0, 0, 0, 0.12), 0 10px 24px rgba(14, 124, 123, 0.38);
    }
}
.btn-primary:disabled::after, .btn-book:disabled::after, .btn-view:disabled::after { display: none; }
/* Dark mode: same gloss (white highlights read on dark teal too);
   only the drop shadow deepens + a teal glow replaces the light shadow. */
html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .auth-card .btn-block,
html[data-theme="dark"] .btn-book,
html[data-theme="dark"] .btn-view {
    box-shadow: var(--btn-mirror-shadow-dark);
}
html[data-theme="dark"] .btn-primary:hover,
html[data-theme="dark"] .auth-card .btn-block:hover,
html[data-theme="dark"] .btn-book:hover,
html[data-theme="dark"] .btn-view:hover {
    box-shadow: var(--btn-mirror-shadow-dark-hover);
}

/* ---- Inputs: 44px touch target, 8px control radius, focus ring.
   Glass-look fill + specular inner top edge (light catches the rim). ---- */
.form-control, input.form-control, select.form-control, textarea.form-control {
    min-height: 44px;
    border-radius: var(--r-control);
    line-height: 1.4;
    background: var(--glass-fill);
    color: var(--label);
    border: 1px solid var(--separator-opaque);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
html[data-theme="dark"] .form-control, html[data-theme="dark"] input.form-control,
html[data-theme="dark"] select.form-control, html[data-theme="dark"] textarea.form-control {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
}
.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(14, 124, 123, 0.16);
}
/* Placeholder text must be READABLE: --text-secondary (5.38:1 light /
   7.01:1 dark on card), never label-3 (0.30 ≈ 1.73:1 in light). */
.form-control::placeholder { color: var(--text-secondary); }

/* ---- Cards / tables: grouped-list hierarchy, hairline separators ----
   Cards use the glass LOOK (translucent fill + specular edge + soft
   shadow, no backdrop-filter — see the .glass-card note above). ---- */
.card {
    background: var(--glass-fill);
    border: var(--glass-border);
    border-radius: var(--r-group);
    box-shadow: var(--glass-edge), var(--glass-shadow);
}
.table { border-collapse: collapse; width: 100%; }
.table th {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--separator);
}
.table td { padding: 10px 12px; border-bottom: 1px solid var(--separator); vertical-align: middle; }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (hover: hover) and (pointer: fine) {
    .table tbody tr:hover { background: var(--fill-4); }
}

/* ---- Flash messages ---- */
.flash-error, .flash-success, .flash-info { border-radius: var(--r-control); margin-bottom: 16px; }
.flash-error { background: var(--tint-red-bg); color: var(--text-red); }
.flash-success { background: var(--tint-green-bg); color: var(--text-green); }
.flash-info { background: var(--tint-blue-bg); color: var(--link); }

/* ---- Small shared components ---- */
.badge, .pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--r-pill);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}
.empty-state { text-align: center; color: var(--text-secondary); padding: 32px 16px; }
.page-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }

/* ---- Theme toggle: 44px hit area on touch, press feedback ---- */
.theme-toggle { min-height: 40px; min-width: 40px; border-radius: 50%; }
@media (pointer: coarse) {
    .theme-toggle { min-height: 44px; min-width: 44px; }
}
.theme-toggle:active { transform: scale(0.97); }

/* ---- Dark mode: glass fills already carry the dark values via tokens;
   keep the specular edge (never a flat shadow on dark glass). ---- */
html[data-theme="dark"] .card { box-shadow: var(--glass-edge), var(--glass-shadow); }

/* ---- Reduced motion: keep opacity/color feedback, drop movement ----
   Press/hover transforms become instant (0.01ms) — no animation, the
   state change itself still happens. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---- Reduce Transparency / Increase Contrast: glass becomes opaque.
   (prefers-reduced-transparency is Chromium-only; Safari honours
   prefers-contrast: more — both are covered.) ---- */
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
    .glass, .glass-strong { background: var(--glass-bg-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
    .glass-card, .card { background: var(--bg-cell); }
}

/* ---- Public mobile nav (main.php — pre-login pages) ----
   Bottom tab bar (5 sections) + hamburger in the header opening a
   frosted-glass slide-in drawer with every nav link. Thumb-friendly:
   every target is 44px or taller, safe-area insets respected, no
   horizontal scroll. Desktop nav is untouched (drawer + tab bar are
   display:none at >=1024px; the header links hide at <=1023px and live
   in the drawer instead). Closes on link tap, backdrop tap, close
   button, or Escape (app.js). ---- */
/* ---- Header logo 3D tilt (ditasol.com brand hover) ----
   ditasol.com tilts its logo on hover: perspective(320px)
   rotateY(-11deg) rotateX(5deg) scale(1.05) + glow. Same here, in
   teal. Pointer devices only; reduced-motion disables it (below). ---- */
.header-logo img { transition: transform .35s ease, box-shadow .35s ease; }
@media (hover: hover) and (pointer: fine) {
    .header-logo:hover img, .header-logo:focus-visible img {
        transform: perspective(320px) rotateY(-11deg) rotateX(5deg) translateY(-1px) scale(1.05);
        box-shadow: 0 0 0 2px rgba(14, 124, 123, .55), 0 0 16px rgba(14, 124, 123, .35), 0 10px 20px rgba(0, 0, 0, .25);
    }
    html[data-theme="dark"] .header-logo:hover img, html[data-theme="dark"] .header-logo:focus-visible img {
        box-shadow: 0 0 0 2px rgba(43, 197, 180, .75), 0 0 16px rgba(43, 197, 180, .45), 0 10px 20px rgba(0, 0, 0, .5);
    }
}

/* ---- Hamburger: ditasol.com's .nav-toggle is a glassy 3D pill button
   (vertical gloss gradient, inset top highlight + bottom shade, drop
   shadow). Same treatment here, in the site's glass tokens. The three
   SVG lines morph into an X when the drawer is open. ---- */
.public-menu-btn { display: none; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
.public-menu-btn.btn-outline {
    background-image: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .12) 50%, rgba(0, 0, 0, .04));
    border: var(--glass-border-strong);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65), inset 0 -1px 0 rgba(0, 0, 0, .08), 0 2px 8px rgba(0, 0, 0, .15);
    color: var(--label);
}
html[data-theme="dark"] .public-menu-btn.btn-outline {
    background-image: linear-gradient(180deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, .09) 47%, rgba(0, 0, 0, .32) 53%, rgba(255, 255, 255, .05));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .40), inset 0 -1px 0 rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .45);
}
@media (hover: hover) and (pointer: fine) {
    .public-menu-btn.btn-outline:hover {
        background-image: linear-gradient(180deg, rgba(255, 255, 255, .65), rgba(255, 255, 255, .18) 50%, rgba(14, 124, 123, .10));
        color: var(--link);
        transform: perspective(320px) rotateX(4deg) translateY(-1px);
    }
}
.public-menu-btn svg line { transition: transform .25s ease, opacity .2s ease; transform-box: fill-box; transform-origin: center; }
.public-menu-btn.open svg line:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.public-menu-btn.open svg line:nth-child(2) { opacity: 0; }
.public-menu-btn.open svg line:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
.public-menu-btn:active { transform: perspective(320px) rotateX(6deg) scale(.97); }
.public-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-filter);
    backdrop-filter: var(--glass-filter);
    border-top: 1px solid var(--separator);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 -2px 12px rgba(0, 0, 0, 0.08);
    z-index: 900;
    padding-bottom: env(safe-area-inset-bottom);
    width: 100%;
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .public-bottom-nav { background: var(--glass-bg-solid); }
}
html[data-theme="dark"] .public-bottom-nav {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 -2px 12px rgba(0, 0, 0, 0.4);
}
.public-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 998;
    display: none;
}
.public-overlay.open { display: block; }
/* Tab items: 5 equal columns, icon + label, 44px touch target. (The
   base .bottom-nav-item rule lives in the dashboard stylesheets, which
   main.php does NOT load — so the public bar defines its own.) */
.public-bottom-nav .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-height: 44px;
    justify-content: center;
    padding-top: 6px;
    color: var(--text-secondary);
    font-size: 10px;
    text-decoration: none;
    transition: transform 120ms var(--ease-apple-fluid), color 150ms var(--ease-apple-fluid);
}
.public-bottom-nav .bottom-nav-item svg { width: 20px; height: 20px; }
.public-bottom-nav .bottom-nav-item.active { color: var(--link); font-weight: 600; transform: perspective(400px) rotateX(-6deg) translateY(-2px); }
@media (hover: hover) and (pointer: fine) {
    .public-bottom-nav .bottom-nav-item:hover { transform: perspective(400px) rotateX(-4deg) translateY(-2px); color: var(--label); }
}
.public-drawer {
    position: fixed;
    top: 0; left: 0;
    width: 85%;
    max-width: 300px;
    height: 100vh;
    height: 100dvh;
    background: var(--glass-fill-strong);
    -webkit-backdrop-filter: var(--glass-filter-strong);
    backdrop-filter: var(--glass-filter-strong);
    border: var(--glass-border-strong);
    box-shadow: var(--glass-edge-strong), 4px 0 20px rgba(0, 0, 0, 0.15);
    /* 3D entrance (ditasol.com-style depth): the panel swings in from
       its left hinge with a slight perspective tilt. Hidden robustness
       for the live defect (drawer seen as a permanent strip): it is
       also visibility:hidden + pointer-events:none until .open, so it
       can never render in-flow even if the transform is ever ignored. */
    transform: translateX(-105%) perspective(900px) rotateY(-8deg);
    transform-origin: left center;
    visibility: hidden;
    pointer-events: none;
    transition: transform 320ms var(--ease-apple-fluid), visibility 0s linear 320ms;
    z-index: 999;
    padding: 20px 12px;
    padding-top: calc(20px + env(safe-area-inset-top));
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .public-drawer { background: var(--bg-cell); }
}
.public-drawer.open { transform: translateX(0) perspective(900px) rotateY(0deg); visibility: visible; pointer-events: auto; transition: transform 320ms var(--ease-apple-fluid), visibility 0s; }
.public-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
/* No logo inside the drawer: ditasol.com keeps its logo in the header
   only, and the nav panel holds links alone. The header row is just a
   "Menu" label + the close button. */
.public-drawer-title { font-size: 15px; font-weight: 700; color: var(--label); letter-spacing: .02em; }
.public-drawer-nav { display: flex; flex-direction: column; gap: 4px; }
.public-drawer-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--label);
    font-size: 16px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    /* ditasol.com .nav-link glassy pill: top gloss gradient + inset
       top highlight + inset 1px ring. Light theme uses a stronger
       white gloss (a faint one is invisible on near-white glass);
       dark uses the reference's white gloss at full strength. */
    background-image: linear-gradient(180deg, rgba(255, 255, 255, .35), rgba(255, 255, 255, .08) 55%, rgba(255, 255, 255, 0));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 0 0 1px rgba(74, 64, 55, .08);
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
/* ditasol.com shine sweep: a diagonal light band crosses the link. */
.public-drawer-nav a::after {
    content: "";
    position: absolute;
    top: 0; bottom: 0; left: 0;
    width: 45%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .45), transparent);
    transform: translateX(-240%) skewX(-18deg);
    transition: transform .65s ease;
    pointer-events: none;
}
.public-drawer-nav a:hover { background-color: rgba(14, 124, 123, .10); text-decoration: none; transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 0 0 1px rgba(14, 124, 123, .18), 0 4px 10px rgba(0, 0, 0, .10); }
.public-drawer-nav a:hover::after { transform: translateX(340%) skewX(-18deg); }
.public-drawer-nav a.active { background-color: rgba(14, 124, 123, .14); color: var(--link); font-weight: 600; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 0 0 1px rgba(14, 124, 123, .30), 0 0 12px rgba(14, 124, 123, .18); }
html[data-theme="dark"] .public-drawer-nav a {
    background-image: linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .02) 55%, rgba(255, 255, 255, 0));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 0 0 1px rgba(255, 255, 255, .06);
}
html[data-theme="dark"] .public-drawer-nav a:hover { background-color: rgba(43, 197, 180, .14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 0 0 1px rgba(43, 197, 180, .25), 0 4px 10px rgba(0, 0, 0, .35); }
html[data-theme="dark"] .public-drawer-nav a.active { background-color: rgba(0, 0, 0, .18); color: var(--link); font-weight: 600; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 0 0 1px rgba(43, 197, 180, .35), 0 0 12px rgba(43, 197, 180, .25); }
/* NOTE: the dark active tint is a darkened inset, NOT a teal tint —
   teal text on a teal-tinted glass bg is only ~3.7:1 (fails AA).
   The darkened inset keeps the teal active text at ~5.8:1. */
/* Staggered 3D entrance (ditasol.com-style depth, Liquid Glass
   language): each link flips in from a slight rotateX, one after
   another. `backwards` fill only — after the animation the link
   returns to its natural state so :hover lift keeps working. */
@keyframes drawer-link-in {
    from { opacity: 0; transform: perspective(600px) rotateX(-14deg) translateY(8px); }
    to { opacity: 1; transform: perspective(600px) rotateX(0deg) translateY(0); }
}
.public-drawer.open .public-drawer-nav > a { animation: drawer-link-in .35s var(--ease-apple-fluid) backwards; }
.public-drawer.open .public-drawer-nav > a:nth-child(2) { animation-delay: .04s; }
.public-drawer.open .public-drawer-nav > a:nth-child(3) { animation-delay: .08s; }
.public-drawer.open .public-drawer-nav > a:nth-child(4) { animation-delay: .12s; }
.public-drawer.open .public-drawer-nav > a:nth-child(5) { animation-delay: .16s; }
.public-drawer.open .public-drawer-nav > a:nth-child(6) { animation-delay: .20s; }
.public-drawer.open .public-drawer-nav > a:nth-child(7) { animation-delay: .24s; }
.public-drawer.open .public-drawer-nav > a:nth-child(8) { animation-delay: .28s; }
.public-drawer.open .public-drawer-nav > a:nth-child(9) { animation-delay: .32s; }
.public-drawer.open .public-drawer-nav > a:nth-child(10) { animation-delay: .36s; }
.public-drawer-nav .nav-icon { display: inline-flex; color: var(--text-secondary); }
.public-drawer-nav a.active .nav-icon { color: var(--link); }
.public-drawer .user-logout-form { margin-top: 16px; }
.public-drawer .user-logout-form .btn { width: 100%; min-height: 44px; }
@media (max-width: 1023px) {
    .public-menu-btn { display: inline-flex; }
    .public-bottom-nav { display: flex; }
    /* Desktop header links move into the drawer on mobile; the theme
       toggle stays visible in the header. */
    .header-nav > a, .header-nav .js-logout-btn { display: none; }
    .public-layout main { padding-bottom: 88px; } /* clear of the tab bar */
    .public-layout .footer-main { padding-bottom: 88px; }
}
@media (min-width: 1024px) {
    .public-bottom-nav, .public-drawer, .public-overlay { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
    .public-drawer { transition: none; }
    .public-drawer.open .public-drawer-nav > a { animation: none; }
    .header-logo img, .public-menu-btn svg line, .public-drawer-nav a::after { transition: none; }
    .header-logo:hover img, .header-logo:focus-visible img { transform: none; box-shadow: none; }
    .public-menu-btn.open svg line:nth-child(1), .public-menu-btn.open svg line:nth-child(3) { transform: none; }
}

/* ---- Icons: one monochrome line-icon set (unslop) ---------- */
/* All emoji-as-icons were replaced with inline SVGs (stroke currentColor,
   1.5px, round caps). Sizes follow the container: nav 20px, stat 26px,
   qa 20px, default 18px. */
.ic { width: 18px; height: 18px; flex-shrink: 0; vertical-align: -3px; }
.nav-icon .ic, .profile-menu-icon .ic, .bottom-nav-item .ic { width: 20px; height: 20px; }
.stat-icon .ic { width: 26px; height: 26px; }
.qa-icon .ic { width: 20px; height: 20px; }
.fab .ic { width: 22px; height: 22px; }
.gold-star .ic { width: 16px; height: 16px; }
.report-line .ic { width: 16px; height: 16px; }

/* Figures: one format, tabular numerals (unslop pass 5). */
.stat-number, .earnings-number, .hero-stat-value, .price-summary-row .val {
    font-variant-numeric: tabular-nums;
}
