/* ==========================================================================
   AUREUS — components
   ========================================================================== */

/* ------------------------------------------------------------------ badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.3em 0.7em;
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: var(--r-pill);
    border: 1px solid var(--line-strong);
    color: var(--ink-soft);
    background: var(--surface);
    white-space: nowrap;
}
.badge--ok     { color: var(--success); background: var(--success-tint); border-color: transparent; }
.badge--danger { color: var(--danger);  background: var(--danger-tint);  border-color: transparent; }
.badge--warn   { color: var(--warn);    background: var(--warn-tint);    border-color: transparent; }
.badge--info   { color: var(--info);    background: var(--info-tint);    border-color: transparent; }
.badge--muted  { color: var(--muted);   background: var(--surface-2);    border-color: transparent; }
.badge--gold   { color: var(--bronze);  background: var(--gold-tint);    border-color: var(--gold-bright); }
.badge__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.pill-caps {
    font-size: var(--fs-xs);
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
}

/* ------------------------------------------------------------------ card */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: var(--sp-5);
}
.card--pad-lg { padding: clamp(1.5rem, 3vw, 2.25rem); }
.card--flush { padding: 0; overflow: hidden; }
.card--elevated { box-shadow: var(--shadow-md); }
.card--hover { transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), border-color var(--dur-2); }
.card--hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: var(--sp-4);
}
.card__title { font-size: var(--fs-md); font-weight: 650; }
.card__sub { font-size: var(--fs-sm); color: var(--muted); margin-top: 0.15rem; }

/* ------------------------------------------------------------- stat card */
.stat {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: var(--sp-5);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 100%;
}
.stat__label {
    font-size: var(--fs-xs);
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.45em;
}
.stat__value {
    font-size: clamp(1.5rem, 1rem + 1.6vw, 2rem);
    font-weight: 600;
    letter-spacing: var(--tracking-tight);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}
.stat__meta {
    font-size: var(--fs-sm);
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 0.4em;
    flex-wrap: wrap;
}
.stat__delta { display: inline-flex; align-items: center; gap: 0.3em; font-weight: 600; }
.stat__delta--up   { color: var(--success); }
.stat__delta--down { color: var(--danger); }
.stat__delta--flat { color: var(--muted); }
.stat--accent { background: linear-gradient(180deg, var(--gold-tint), var(--surface) 62%); border-color: var(--gold-bright); }

/* ---------------------------------------------------------- data table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.table {
    width: 100%;
    font-size: var(--fs-sm);
    border-collapse: collapse;
}
.table caption { text-align: left; padding: var(--sp-4) var(--sp-5); font-weight: 650; color: var(--ink); }
.table thead th {
    position: sticky;
    top: 0;
    text-align: left;
    font-size: var(--fs-xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
    padding: var(--sp-3) var(--sp-4);
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.table tbody td {
    padding: var(--sp-4);
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
    color: var(--ink-soft);
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--dur-1) var(--ease); }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
.table .strong { color: var(--ink); font-weight: 600; }
.table--comfy tbody td { padding-block: calc(var(--sp-4) + 2px); }

/* --------------------------------------------------------------- forms */
.field { display: block; margin-bottom: var(--sp-4); }
.field__label {
    display: block;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.4rem;
}
.field__hint { font-size: var(--fs-xs); color: var(--muted); margin-top: 0.35rem; }
.field__error {
    font-size: var(--fs-xs);
    color: var(--danger);
    margin-top: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.35em;
}
.input, .select, .textarea {
    width: 100%;
    padding: 0.8em 0.95em;
    font-size: var(--fs-base);
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-sm);
    transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease), background var(--dur-1);
    appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: var(--ring);
}
.input:disabled, .select:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px var(--danger-tint);
}
.textarea { min-height: 7rem; resize: vertical; line-height: 1.6; }
.select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b6a70' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9em center;
    padding-right: 2.5em;
}
.input-group { position: relative; display: flex; align-items: stretch; }
.input-group .input { border-radius: var(--r-sm); }
.input-group__affix {
    display: inline-flex;
    align-items: center;
    padding-inline: 0.9em;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--muted);
    background: var(--surface-2);
    border: 1px solid var(--line-strong);
}
.input-group__affix:first-child { border-right: 0; border-radius: var(--r-sm) 0 0 var(--r-sm); }
.input-group__affix:last-child  { border-left: 0;  border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.input-group .input:not(:first-child) { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.input-group .input:not(:last-child)  { border-radius: var(--r-sm) 0 0 var(--r-sm); }

.checkbox, .radio {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    font-size: var(--fs-sm);
    color: var(--ink-soft);
    cursor: pointer;
}
.checkbox input, .radio input { margin-top: 0.15rem; width: 1.05rem; height: 1.05rem; accent-color: var(--gold); flex: none; }

.input-affix-wrap { position: relative; }
.input-affix-wrap .input { padding-right: 2.75rem; }
.input-affix-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    padding: 0.4rem;
    border-radius: var(--r-xs);
}
.input-affix-btn:hover { color: var(--ink); background: var(--surface-2); }

/* segmented control (chart periods, order side, tabs) */
.segmented {
    display: inline-flex;
    padding: 3px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    gap: 2px;
}
.segmented__btn {
    padding: 0.45em 0.95em;
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--muted);
    border-radius: var(--r-pill);
    transition: color var(--dur-1) var(--ease), background var(--dur-1) var(--ease), box-shadow var(--dur-1);
}
.segmented__btn:hover { color: var(--ink); }
.segmented__btn[aria-pressed="true"], .segmented__btn.is-active {
    color: var(--ink);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.segmented--buysell .segmented__btn.is-active[data-side="BUY"]  { color: var(--success); }
.segmented--buysell .segmented__btn.is-active[data-side="SELL"] { color: var(--danger); }

/* ---------------------------------------------------------- site header */
.site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line);
    transition: box-shadow var(--dur-2) var(--ease), background var(--dur-2);
}
.site-header.is-stuck { box-shadow: var(--shadow-sm); background: color-mix(in srgb, var(--paper) 96%, transparent); }
.site-header__bar {
    display: flex;
    align-items: center;
    gap: var(--sp-6);
    height: var(--header-h);
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-display);
    font-size: 1.35rem;
    letter-spacing: 0.14em;
    font-weight: 600;
    color: var(--ink);
    text-transform: uppercase;
}
.brand__mark {
    width: 30px; height: 30px;
    display: grid; place-items: center;
    color: var(--gold);
}
.brand__mark svg { width: 26px; height: 26px; }
.brand:hover { color: var(--ink); }

.primary-nav { display: flex; align-items: center; gap: 0.15rem; margin-inline: auto; }
.primary-nav__item { position: relative; }
.primary-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.6rem 0.85rem;
    font-size: var(--fs-sm);
    font-weight: 550;
    color: var(--ink-soft);
    border-radius: var(--r-sm);
    transition: color var(--dur-1) var(--ease), background var(--dur-1);
}
.primary-nav__link:hover { color: var(--ink); background: var(--surface-2); }
.primary-nav__link.is-active { color: var(--ink); }
.primary-nav__link.is-active::after {
    content: "";
    position: absolute;
    left: 0.85rem; right: 0.85rem;
    bottom: 0.15rem;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
}
.primary-nav__link .icon { transition: transform var(--dur-2) var(--ease); }
.primary-nav__item.is-open .primary-nav__link .icon { transform: rotate(180deg); }

.header-actions { display: flex; align-items: center; gap: 0.75rem; }

/* mega menu */
.mega {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    width: min(680px, 90vw);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--sp-5);
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: var(--sp-5);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease-out), visibility var(--dur-2);
}
.primary-nav__item.is-open .mega,
.primary-nav__item:focus-within .mega {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
.mega__col h4 {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: var(--tracking-caps);
    color: var(--muted);
    margin-bottom: 0.85rem;
}
.mega__link {
    display: flex;
    gap: 0.85rem;
    padding: 0.7rem;
    border-radius: var(--r-sm);
    transition: background var(--dur-1) var(--ease);
}
.mega__link:hover { background: var(--surface-2); }
.mega__link .icon { color: var(--gold-strong); margin-top: 0.15rem; }
.mega__link h5 { font-size: var(--fs-sm); font-weight: 650; color: var(--ink); }
.mega__link p { font-size: var(--fs-xs); color: var(--muted); margin-top: 0.15rem; }
.mega__feature {
    background: linear-gradient(160deg, var(--charcoal), var(--charcoal-2));
    color: #fff;
    border-radius: var(--r-md);
    padding: var(--sp-5);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
}
.mega__feature .pill-caps { color: var(--gold-bright); }
.mega__feature h5 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 500; }
.mega__feature p { color: rgba(255,255,255,0.7); font-size: var(--fs-sm); }

/* ---------------------------------------------------------- price ticker */
.ticker {
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    overflow: hidden;
}
.ticker__track {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    padding: 0.55rem 0;
    font-size: var(--fs-sm);
    white-space: nowrap;
    animation: ticker-scroll 40s linear infinite;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__item { display: inline-flex; align-items: center; gap: 0.6rem; }
.ticker__name { font-weight: 600; color: var(--ink); }
.ticker__price { font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.ticker__chg { font-weight: 600; display: inline-flex; align-items: center; gap: 0.25em; }
.ticker__chg--up { color: var(--success); }
.ticker__chg--down { color: var(--danger); }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
    .ticker__track { animation: none; flex-wrap: wrap; white-space: normal; gap: 1rem 2rem; }
}

/* ---------------------------------------------------------- live price card */
.price-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: var(--sp-5);
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
}
.price-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.price-card__name { font-weight: 650; font-size: var(--fs-md); }
.price-card__purity { font-size: var(--fs-xs); color: var(--muted); }
.price-card__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.price-cell {
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: var(--sp-3) var(--sp-4);
    background: var(--surface-2);
}
.price-cell__label {
    font-size: var(--fs-xs);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
}
.price-cell__value {
    font-size: var(--fs-lg);
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    margin-top: 0.2rem;
    transition: color var(--dur-2) var(--ease);
}
.price-cell--buy  { border-left: 3px solid var(--success); }
.price-cell--sell { border-left: 3px solid var(--gold); }
.price-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--fs-xs);
    color: var(--muted);
}
.price-delta { font-weight: 650; display: inline-flex; align-items: center; gap: 0.3em; }
.price-delta--up { color: var(--success); }
.price-delta--down { color: var(--danger); }
.price-delta--flat { color: var(--muted); }
.flash-up { animation: flash-green 0.9s var(--ease); }
.flash-down { animation: flash-red 0.9s var(--ease); }
@keyframes flash-green { 0% { color: var(--success); } 100% { color: inherit; } }
@keyframes flash-red { 0% { color: var(--danger); } 100% { color: inherit; } }

/* ---------------------------------------------------------- chart frame */
.chart-frame {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: var(--sp-5);
}
.chart-frame__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: var(--sp-4);
}
.chart-price { font-size: clamp(1.8rem, 1.2rem + 2vw, 2.4rem); font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: var(--tracking-tight); }
.chart-sub { font-size: var(--fs-sm); color: var(--muted); display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.chart-canvas-wrap { position: relative; width: 100%; }
.chart-canvas-wrap canvas { width: 100%; height: auto; display: block; }
.chart-tooltip {
    position: absolute;
    pointer-events: none;
    background: var(--ink);
    color: #fff;
    font-size: var(--fs-xs);
    padding: 0.5rem 0.7rem;
    border-radius: var(--r-sm);
    box-shadow: var(--shadow-md);
    transform: translate(-50%, -120%);
    white-space: nowrap;
    opacity: 0;
    transition: opacity var(--dur-1);
    z-index: 3;
}
.chart-tooltip strong { color: #fff; display: block; font-variant-numeric: tabular-nums; }
.chart-tooltip span { color: rgba(255,255,255,0.6); }
.chart-legend { display: flex; gap: 1.25rem; font-size: var(--fs-xs); color: var(--muted); margin-top: var(--sp-3); }
.chart-legend__key { display: inline-flex; align-items: center; gap: 0.4em; }
.chart-legend__swatch { width: 14px; height: 3px; border-radius: 2px; background: var(--gold); }

/* --------------------------------------------------------- trading panel */
.trade-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
}
.trade-panel__tabs { display: grid; grid-template-columns: 1fr 1fr; }
.trade-panel__tab {
    padding: 1rem;
    font-weight: 650;
    font-size: var(--fs-sm);
    color: var(--muted);
    border-bottom: 2px solid var(--line);
    transition: color var(--dur-1), border-color var(--dur-1), background var(--dur-1);
}
.trade-panel__tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); background: var(--surface); }
.trade-panel__tab[data-side="BUY"][aria-selected="true"]  { color: var(--success); border-bottom-color: var(--success); }
.trade-panel__tab[data-side="SELL"][aria-selected="true"] { color: var(--danger);  border-bottom-color: var(--danger); }
.trade-panel__body { padding: var(--sp-5); }
.trade-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 0;
    font-size: var(--fs-sm);
    border-bottom: 1px dashed var(--line);
}
.trade-row:last-of-type { border-bottom: 0; }
.trade-row__label { color: var(--muted); display: inline-flex; align-items: center; gap: 0.4em; }
.trade-row__value { font-weight: 650; font-variant-numeric: tabular-nums; color: var(--ink); }
.trade-total { display: flex; align-items: baseline; justify-content: space-between; margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--line); }
.trade-total__amt { font-size: var(--fs-xl); font-weight: 700; font-variant-numeric: tabular-nums; }
.trade-disclaimer { font-size: var(--fs-xs); color: var(--muted); margin-top: var(--sp-4); line-height: 1.6; }
.balance-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    font-size: var(--fs-xs);
    color: var(--muted);
    background: var(--surface-2);
    border-radius: var(--r-pill);
    padding: 0.3em 0.7em;
}

/* --------------------------------------------------------- product card */
.product-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
    transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), border-color var(--dur-2);
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.product-card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: radial-gradient(120% 120% at 30% 20%, var(--gold-tint), var(--surface-2) 70%);
    display: grid;
    place-items: center;
    overflow: hidden;
}
.product-card__media img { width: 100%; height: 100%; object-fit: contain; }
.product-card__media .content-visual-icon,
.article-card__media .content-visual-icon,
.product-visual .content-visual-icon { color: var(--gold-strong); opacity: 0.55; }
.product-visual .content-visual-icon { color: #fff; opacity: 0.85; }
.product-card__tag { position: absolute; top: 0.8rem; left: 0.8rem; }
.product-card__body { padding: var(--sp-4); display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.product-card__name { font-weight: 650; font-size: var(--fs-sm); color: var(--ink); }
.product-card__spec { font-size: var(--fs-xs); color: var(--muted); display: flex; gap: 0.75rem; flex-wrap: wrap; }
.product-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: var(--sp-3); }
.product-card__price { font-weight: 700; font-variant-numeric: tabular-nums; }
.product-card__stock { font-size: var(--fs-xs); }

/* --------------------------------------------------------- article card */
.article-card { display: flex; flex-direction: column; gap: 0.9rem; }
.article-card__media {
    aspect-ratio: 16 / 10;
    border-radius: var(--r-md);
    overflow: hidden;
    background: linear-gradient(160deg, var(--surface-2), var(--gold-tint));
    border: 1px solid var(--line);
}
.article-card__media img { width: 100%; height: 100%; object-fit: cover; }
.article-card__meta { font-size: var(--fs-xs); color: var(--muted); display: flex; gap: 0.6rem; align-items: center; }
.article-card__title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 500; line-height: 1.25; color: var(--ink); }
.article-card:hover .article-card__title { color: var(--gold-strong); }
.article-card__excerpt { font-size: var(--fs-sm); color: var(--muted); }

/* --------------------------------------------------------- feature row */
.feature {
    display: flex;
    gap: 1rem;
    padding: var(--sp-5);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--surface);
}
.feature__icon {
    flex: none;
    width: 44px; height: 44px;
    display: grid; place-items: center;
    border-radius: var(--r-sm);
    background: var(--gold-tint);
    color: var(--gold-strong);
    border: 1px solid var(--gold-bright);
}
.feature h4 { font-size: var(--fs-md); }
.feature p { font-size: var(--fs-sm); color: var(--muted); margin-top: 0.3rem; }

/* --------------------------------------------------------- breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: var(--fs-xs);
    color: var(--muted);
    margin-bottom: var(--sp-3);
}
.breadcrumb a { color: var(--muted); transition: color var(--dur-1) var(--ease); }
.breadcrumb a:hover { color: var(--gold-strong); }
.breadcrumb__sep { color: var(--line-strong); }
.breadcrumb__current { color: var(--ink-soft); font-weight: 550; }

/* --------------------------------------------------------- language switch */
.lang-switch { position: relative; }
.lang-switch__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    padding: 0.5em 0.65em;
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--ink-soft);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-pill);
    background: var(--surface);
    transition: color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), background var(--dur-1);
}
.lang-switch__toggle:hover { color: var(--ink); background: var(--surface-2); }
.lang-switch__toggle .icon { width: 14px; height: 14px; transition: transform var(--dur-2) var(--ease); }
.lang-switch__toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
.lang-switch__code { letter-spacing: 0.04em; }
.lang-switch__menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 11rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-lg);
    padding: 0.4rem;
    z-index: var(--z-dropdown);
    display: grid;
    gap: 1px;
}
.lang-switch__menu a {
    display: flex;
    align-items: center;
    gap: 0.6em;
    padding: 0.55rem 0.7rem;
    font-size: var(--fs-sm);
    color: var(--ink-soft);
    border-radius: var(--r-sm);
    transition: background var(--dur-1) var(--ease), color var(--dur-1);
}
.lang-switch__menu a:hover { background: var(--surface-2); color: var(--ink); }
.lang-switch__menu a.is-active { color: var(--gold-strong); font-weight: 650; background: var(--gold-tint); }

/* --------------------------------------------------------- steps */
.steps { display: flex; gap: 0.5rem; counter-reset: step; }
.steps__item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: var(--fs-xs);
    color: var(--muted);
    padding: 0.7rem 0;
    border-top: 2px solid var(--line);
}
.steps__item::before {
    counter-increment: step;
    content: counter(step);
    width: 22px; height: 22px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--surface-3);
    color: var(--ink-soft);
    font-weight: 700;
    flex: none;
}
.steps__item.is-active { color: var(--ink); border-top-color: var(--gold); }
.steps__item.is-active::before { background: var(--gold); color: #1c1500; }
.steps__item.is-done::before {
    background: var(--success);
    color: #fff;
    content: "✓";
}

/* --------------------------------------------------------- modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    background: var(--overlay);
    backdrop-filter: blur(3px);
    display: grid;
    place-items: center;
    padding: var(--gutter);
    opacity: 0;
    transition: opacity var(--dur-2) var(--ease);
}
.modal-overlay.is-open { opacity: 1; }
.modal {
    width: min(480px, 100%);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    padding: clamp(1.5rem, 4vw, 2.25rem);
    transform: translateY(12px) scale(0.98);
    transition: transform var(--dur-2) var(--ease-out);
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
}
.modal-overlay.is-open .modal { transform: translateY(0) scale(1); }
.modal--wide { width: min(640px, 100%); }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: var(--sp-4); }
.modal__title { font-size: var(--fs-lg); font-weight: 650; }
.modal__close { padding: 0.4rem; border-radius: var(--r-sm); color: var(--muted); }
.modal__close:hover { color: var(--ink); background: var(--surface-2); }
.modal__foot { display: flex; gap: 0.75rem; margin-top: var(--sp-5); }
.modal__foot .btn { flex: 1; }
.modal-icon {
    width: 56px; height: 56px;
    border-radius: 50%;
    display: grid; place-items: center;
    margin-bottom: var(--sp-4);
}
.modal-icon--ok { background: var(--success-tint); color: var(--success); }
.modal-icon--warn { background: var(--warn-tint); color: var(--warn); }
.modal-icon--danger { background: var(--danger-tint); color: var(--danger); }

/* --------------------------------------------------------- toast */
.toast-stack {
    position: fixed;
    right: var(--gutter);
    bottom: var(--gutter);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: min(360px, calc(100vw - 2rem));
}
.toast {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 3px solid var(--muted);
    border-radius: var(--r-sm);
    box-shadow: var(--shadow-lg);
    padding: var(--sp-4);
    font-size: var(--fs-sm);
    transform: translateX(120%);
    transition: transform var(--dur-3) var(--ease-out), opacity var(--dur-2);
}
.toast.is-shown { transform: translateX(0); }
.toast.is-hiding { transform: translateX(120%); opacity: 0; }
.toast--success { border-left-color: var(--success); }
.toast--error   { border-left-color: var(--danger); }
.toast--info    { border-left-color: var(--info); }
.toast__icon { flex: none; margin-top: 0.1rem; }
.toast--success .toast__icon { color: var(--success); }
.toast--error .toast__icon { color: var(--danger); }
.toast--info .toast__icon { color: var(--info); }
.toast__body { flex: 1; }
.toast__title { font-weight: 650; color: var(--ink); }
.toast__msg { color: var(--muted); margin-top: 0.1rem; }
.toast__close { color: var(--muted); padding: 0.15rem; }

/* --------------------------------------------------------- skeleton */
.skeleton {
    background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface-3) 50%, var(--surface-2) 70%);
    background-size: 200% 100%;
    animation: skeleton 1.4s ease-in-out infinite;
    border-radius: var(--r-xs);
}
@keyframes skeleton { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* --------------------------------------------------------- empty state */
.empty {
    text-align: center;
    padding: clamp(2rem, 6vw, 4rem);
    border: 1px dashed var(--line-strong);
    border-radius: var(--r-md);
    color: var(--muted);
}
.empty__icon {
    width: 52px; height: 52px;
    margin: 0 auto var(--sp-4);
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--muted);
}
.empty h3 { font-size: var(--fs-md); color: var(--ink); }
.empty p { font-size: var(--fs-sm); margin-top: 0.4rem; }
.empty .btn { margin-top: var(--sp-4); }

/* --------------------------------------------------------- alert box */
.alert {
    display: flex;
    gap: 0.75rem;
    padding: var(--sp-4);
    border-radius: var(--r-sm);
    font-size: var(--fs-sm);
    border: 1px solid var(--line);
    background: var(--surface-2);
}
.alert__icon { flex: none; margin-top: 0.1rem; }
.alert--info    { background: var(--info-tint);    border-color: transparent; color: var(--info); }
.alert--success { background: var(--success-tint); border-color: transparent; color: var(--success); }
.alert--warn    { background: var(--warn-tint);    border-color: transparent; color: var(--warn); }
.alert--danger  { background: var(--danger-tint);  border-color: transparent; color: var(--danger); }
.alert strong { color: inherit; }
.alert p { color: inherit; opacity: 0.95; }

/* --------------------------------------------------------- tabs */
.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs__btn {
    padding: 0.8rem 1rem;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color var(--dur-1), border-color var(--dur-1);
}
.tabs__btn:hover { color: var(--ink); }
.tabs__btn[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--gold); }

/* --------------------------------------------------------- avatar */
.avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: var(--gold-tint);
    color: var(--bronze);
    font-weight: 700;
    font-size: var(--fs-sm);
    border: 1px solid var(--gold-bright);
    flex: none;
}
.avatar--lg { width: 56px; height: 56px; font-size: var(--fs-md); }

/* --------------------------------------------------------- kbd hint / qr */
.qr-box {
    width: 180px; height: 180px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-md);
    padding: 12px;
    background: #fff;
    display: grid; place-items: center;
}
.qr-box svg { width: 100%; height: 100%; }

/* --------------------------------------------------------- disclosure */
.disclosure { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.disclosure + .disclosure { margin-top: 0.6rem; }
.disclosure > summary {
    padding: var(--sp-4);
    font-weight: 600;
    font-size: var(--fs-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.disclosure > summary .icon { transition: transform var(--dur-2); color: var(--muted); }
.disclosure[open] > summary .icon { transform: rotate(180deg); }
.disclosure__body { padding: 0 var(--sp-4) var(--sp-4); font-size: var(--fs-sm); color: var(--muted); line-height: 1.7; }

/* --------------------------------------------------------- site footer */
.site-footer {
    background: var(--charcoal);
    color: rgba(255,255,255,0.72);
    padding-block: clamp(3rem, 6vw, 5rem) 2rem;
    font-size: var(--fs-sm);
}
.site-footer a { color: rgba(255,255,255,0.72); }
.site-footer a:hover { color: #fff; }
.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, 1fr);
    gap: var(--sp-6);
    padding-bottom: var(--sp-8);
    border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-brand .brand { color: #fff; }
.footer-brand p { color: rgba(255,255,255,0.55); margin-top: 1rem; max-width: 30ch; font-size: var(--fs-sm); }
.footer-col h5 {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: var(--tracking-caps);
    color: rgba(255,255,255,0.4);
    margin-bottom: 1rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    color: rgba(255,255,255,0.45);
    font-size: var(--fs-xs);
}
.footer-disclaimer {
    margin-top: 1.5rem;
    padding: var(--sp-4);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--r-sm);
    color: rgba(255,255,255,0.5);
    font-size: var(--fs-xs);
    line-height: 1.7;
}

/* --------------------------------------------------------- mobile drawer + bottom nav */
.nav-toggle { display: none; }

/* --------------------------------------------------------- misc layout helpers */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.media-frame {
    border-radius: var(--r-lg);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--surface-2);
}
.trust-logos { display: flex; flex-wrap: wrap; gap: 2rem 3rem; align-items: center; opacity: 0.7; }
.trust-logos span { font-weight: 600; letter-spacing: 0.06em; color: var(--muted); font-size: var(--fs-sm); }

/* --------------------------------------------------------- notification bell */
.notif-bell { position: relative; }
.notif-bell__toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-pill);
    background: var(--surface);
    color: var(--ink-soft);
    transition: color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), background var(--dur-1);
}
.notif-bell__toggle:hover { color: var(--ink); background: var(--surface-2); }
.notif-bell__badge {
    position: absolute;
    top: -0.3rem;
    right: -0.3rem;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background: var(--danger);
    border-radius: var(--r-pill);
    border: 2px solid var(--surface);
}
.sidebar-badge { margin-left: auto; padding: 0 0.4rem; font-size: 0.65rem; line-height: 1.5; }
.notif-bell__badge.is-new { animation: badge-pulse 1.2s var(--ease); }
@keyframes badge-pulse {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.35); }
    60%  { transform: scale(0.95); }
    100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .notif-bell__badge.is-new { animation: none; }
}
.notif-bell__menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: min(22rem, 90vw);
    max-height: 26rem;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-dropdown);
    overflow: hidden;
}
.notif-bell__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-3) var(--sp-4);
    border-bottom: 1px solid var(--line);
    font-size: var(--fs-sm);
}
.link-btn { color: var(--gold-strong); font-weight: 600; font-size: var(--fs-xs); }
.link-btn:hover { text-decoration: underline; }
.notif-bell__list { overflow-y: auto; flex: 1; }
.notif-bell__empty { padding: var(--sp-6) var(--sp-4); text-align: center; color: var(--muted); font-size: var(--fs-sm); }
.notif-bell__viewall {
    display: block;
    text-align: center;
    padding: var(--sp-3);
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--gold-strong);
    border-top: 1px solid var(--line);
}
.notif-bell__viewall:hover { background: var(--surface-2); }

.notif-item {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    padding: var(--sp-3) var(--sp-4);
    border-bottom: 1px solid var(--line);
    transition: background var(--dur-1) var(--ease);
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--surface-2); }
.notif-item--unread { background: var(--gold-tint); }
/* Standalone full-page list (dashboard/notifications.php) presents each row as its own
   card rather than a border-bottom-separated dropdown list — same item/icon/body markup,
   different container treatment for that different context. */
.notif-item--boxed { border: 1px solid var(--line); border-radius: var(--r-md); border-bottom: 1px solid var(--line); }
.notif-item__icon {
    flex: none;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-pill);
    background: var(--surface-2);
    color: var(--gold-strong);
}
.notif-item--unread .notif-item__icon { background: var(--gold-tint); }
.notif-item__icon .icon { width: 16px; height: 16px; }
.notif-item__body { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; font-size: var(--fs-sm); }
.notif-item__body strong { color: var(--ink); font-weight: 650; }
.notif-item__body span { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.notif-item__body time { color: var(--muted); font-size: var(--fs-xs); }

/* --------------------------------------------------------- live chat */
.chat-shell {
    display: grid;
    grid-template-rows: 1fr auto;
    height: min(70vh, 640px);
    height: min(70dvh, 640px);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--surface);
    overflow: hidden;
    /* Set by chat.js from visualViewport on mobile when the keyboard opens; 0 otherwise. */
    margin-bottom: var(--chat-keyboard-inset, 0px);
}
.chat-shell__messages {
    overflow-y: auto;
    padding: var(--sp-5);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.chat-msg { display: flex; flex-direction: column; max-width: 78%; }
.chat-msg--enter { animation: chat-msg-in 200ms var(--ease); }
@keyframes chat-msg-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
    .chat-msg--enter { animation: none; }
}
.chat-msg--mine { align-self: flex-end; align-items: flex-end; }
.chat-msg--theirs { align-self: flex-start; align-items: flex-start; }
.chat-msg__bubble {
    padding: 0.6rem 0.85rem;
    border-radius: var(--r-md);
    background: var(--surface-2);
    color: var(--ink);
    font-size: var(--fs-sm);
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}
.chat-msg--mine .chat-msg__bubble { background: var(--gold-strong); color: #fff; }
.chat-msg__bubble--system { background: transparent; border: 1px dashed var(--line-strong); color: var(--muted); font-style: italic; }
.chat-msg__time { margin-top: 0.2rem; font-size: 0.68rem; color: var(--muted); display: flex; align-items: center; gap: 0.4rem; }
.chat-msg--pending .chat-msg__bubble { opacity: 0.6; }
.chat-msg--pending .chat-msg__time::before {
    content: "";
    width: 0.55rem;
    height: 0.55rem;
    border-radius: var(--r-pill);
    border: 1.5px solid var(--muted);
    border-top-color: transparent;
    animation: chat-pending-spin 0.8s linear infinite;
}
@keyframes chat-pending-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .chat-msg--pending .chat-msg__time::before { animation: none; }
}
.chat-msg--failed .chat-msg__bubble { border: 1px solid var(--danger); }
.chat-msg--failed .chat-msg__time { color: var(--danger); }
.chat-msg__retry {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--gold-strong);
    text-decoration: underline;
}
.chat-shell__composer {
    display: flex;
    align-items: flex-end;
    gap: 0.6rem;
    padding: var(--sp-3);
    border-top: 1px solid var(--line);
    background: var(--surface);
}
.chat-shell__composer textarea {
    flex: 1;
    resize: none;
    max-height: 8rem;
    min-height: 2.6rem;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-md);
    background: var(--surface-2);
    color: var(--ink);
    font: inherit;
    font-size: var(--fs-sm);
}
.chat-shell__composer button {
    flex: none;
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-pill);
    background: var(--gold-strong);
    color: #fff;
}
.chat-shell__composer button:disabled { opacity: 0.5; }
.chat-typing { padding: 0 var(--sp-5) 0.4rem; font-size: var(--fs-xs); color: var(--muted); font-style: italic; }
.chat-state { padding: var(--sp-8) var(--sp-5); text-align: center; color: var(--muted); font-size: var(--fs-sm); }
.chat-state--error { color: var(--danger); }

.chat-shell__attach {
    flex: none;
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-pill);
    background: var(--surface-2);
    color: var(--ink-soft);
    border: 1px solid var(--line-strong);
    transition: color var(--dur-1) var(--ease), background var(--dur-1);
}
.chat-shell__attach:hover { color: var(--ink); background: var(--line); }
.chat-msg__attachment {
    display: block;
    max-width: 12rem;
    max-height: 12rem;
    border-radius: var(--r-sm);
    cursor: zoom-in;
    margin-bottom: 0.4rem;
}
.chat-composer-preview {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem var(--sp-3) 0;
}
.chat-composer-preview img { width: 3rem; height: 3rem; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line-strong); }
.chat-composer-preview__meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    font-size: var(--fs-xs);
}
.chat-composer-preview__meta strong { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-composer-preview__meta small { color: var(--muted); }
.chat-composer-preview button {
    flex: none;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-pill);
    background: var(--surface-2);
    color: var(--ink-soft);
    border: 1px solid var(--line-strong);
    transition: color var(--dur-1) var(--ease), background var(--dur-1);
}
.chat-composer-preview button:hover { color: var(--ink); background: var(--line); }
.chat-lightbox {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    background: rgba(0, 0, 0, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-6);
    cursor: zoom-out;
    animation: chat-lightbox-in var(--dur-2) var(--ease);
}
.chat-lightbox img { max-width: min(90vw, 40rem); max-height: 85vh; border-radius: var(--r-md); box-shadow: var(--shadow-lg); }
@keyframes chat-lightbox-in { from { opacity: 0; } to { opacity: 1; } }

.chat-layout { display: grid; grid-template-columns: 20rem 1fr; gap: var(--sp-5); align-items: start; }
.chat-layout > .card:first-child { max-height: 70vh; overflow-y: auto; padding: 0; }
.chat-list-item { display: flex; gap: 0.75rem; align-items: center; padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line); transition: background var(--dur-1) var(--ease); }
.chat-list-item:hover { background: var(--surface-2); }
.chat-list-item.is-active { background: var(--gold-tint); }
.chat-list-item__meta { min-width: 0; flex: 1; }
.chat-list-item__meta strong { display: block; color: var(--ink); font-size: var(--fs-sm); }
.chat-list-item__meta span { display: block; color: var(--ink-soft); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-summary dt { color: var(--muted); font-size: var(--fs-xs); margin-top: var(--sp-3); }
.chat-summary dd { color: var(--ink); font-size: var(--fs-sm); font-weight: 600; }

/* --------------------------------------------------------- body scroll lock */
body.no-scroll { overflow: hidden; }

/* --------------------------------------------------------- admin mobile header */
.dash-header__menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    margin-right: 0.5rem;
    border-radius: var(--r-sm);
    color: var(--ink-soft);
}
.dash-header__menu-toggle:hover { background: var(--surface-2); color: var(--ink); }
.dash-header__menu-toggle .icon { width: 22px; height: 22px; }

/* --------------------------------------------------------- admin "More" drawer */
.admin-drawer { position: fixed; inset: 0; z-index: var(--z-drawer); }
.admin-drawer__overlay { position: absolute; inset: 0; background: rgba(20, 17, 10, 0.45); opacity: 0; transition: opacity var(--dur-2) var(--ease); }
.admin-drawer.is-open .admin-drawer__overlay { opacity: 1; }
.admin-drawer__panel {
    position: absolute;
    top: 0; bottom: 0; left: 0;
    width: min(20rem, 86vw);
    display: flex;
    flex-direction: column;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    transform: translateX(-100%);
    transition: transform var(--dur-2) var(--ease-out);
}
.admin-drawer.is-open .admin-drawer__panel { transform: translateX(0); }
.admin-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-4);
    border-bottom: 1px solid var(--line);
    flex: none;
}
.admin-drawer__body { overflow-y: auto; padding: var(--sp-3); flex: 1; }
.admin-drawer__link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0.75rem;
    border-radius: var(--r-sm);
    color: var(--ink-soft);
    font-size: var(--fs-sm);
}
.admin-drawer__link:hover, .admin-drawer__link.is-active { background: var(--gold-tint); color: var(--gold-strong); }
.admin-drawer__link .sidebar-badge { margin-left: auto; }
.admin-drawer__logout { padding: var(--sp-4) var(--sp-2) var(--sp-2); }

/* --------------------------------------------------------- admin bottom nav */
.admin-bottom-nav {
    display: none;
    position: fixed;
    inset: auto 0 0;
    z-index: var(--z-header);
    justify-content: space-around;
    align-items: center;
    height: 64px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--surface);
    border-top: 1px solid var(--line);
    box-shadow: 0 -4px 16px -8px rgba(24, 21, 12, 0.12);
}
.admin-bottom-nav a, .admin-bottom-nav button {
    display: grid;
    justify-items: center;
    gap: 2px;
    font-size: 0.62rem;
    color: var(--muted);
    padding: 0.4rem 0.5rem;
    border-radius: var(--r-sm);
}
.admin-bottom-nav .icon { width: 20px; height: 20px; }
.admin-bottom-nav a.is-active, .admin-bottom-nav button.is-active { color: var(--gold-strong); }
.admin-bottom-nav__icon-wrap { position: relative; display: inline-flex; }
.bottom-nav-dot {
    position: absolute;
    top: -0.35rem;
    right: -0.5rem;
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background: var(--warn);
    border-radius: var(--r-pill);
    border: 2px solid var(--surface);
}

/* --------------------------------------------------------- admin quick menus */
.admin-quick-menu {
    position: fixed;
    inset: auto 1rem calc(64px + env(safe-area-inset-bottom, 0px) + 0.75rem);
    z-index: var(--z-dropdown);
    width: min(18rem, calc(100vw - 2rem));
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
}
.admin-quick-menu__title { padding: 0.5rem 0.6rem; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.admin-quick-menu a { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem; border-radius: var(--r-sm); color: var(--ink-soft); font-size: var(--fs-sm); }
.admin-quick-menu a:hover { background: var(--surface-2); color: var(--ink); }
.admin-quick-menu a .badge { margin-left: auto; }

.admin-fab {
    display: none;
    position: fixed;
    right: 1rem;
    bottom: calc(64px + env(safe-area-inset-bottom, 0px) + 1rem);
    z-index: var(--z-header);
    width: 3rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-pill);
    background: var(--gold-strong);
    color: #fff;
    box-shadow: var(--shadow-gold);
}

/* --------------------------------------------------------- mobile filter sheet */
.mobile-filters-toggle { display: none; }
.mobile-filters-sheet {
    position: fixed;
    inset: auto 0 0;
    z-index: var(--z-modal);
    max-height: 80vh;
    overflow-y: auto;
    background: var(--surface);
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    box-shadow: var(--shadow-lg);
    padding: var(--sp-5);
    padding-bottom: calc(var(--sp-5) + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-wrap: wrap;
    transform: translateY(100%);
    visibility: hidden;
    transition: transform var(--dur-2) var(--ease-out), visibility 0s var(--dur-2);
}
.mobile-filters-sheet--open { transform: translateY(0); visibility: visible; transition: transform var(--dur-2) var(--ease-out); }
