/* Amethyst L2 - website design system. No external fonts or assets; no inline styles (strict CSP). */

:root {
    --bg: #09080d;
    --bg-soft: #0f0c15;
    --surface: #15111d;
    --surface-2: #1c1727;
    --surface-3: #251d33;
    --border: #302645;
    --border-soft: #241d33;
    --border-strong: #3d3059;
    --text: #edeaf4;
    --muted: #a49db3;
    --faint: #756e87;
    --amethyst: #9d6fe0;
    --amethyst-bright: #c2a1f5;
    --amethyst-deep: #5f3b9c;
    --glow: rgba(157, 111, 224, 0.28);
    --glow-soft: rgba(157, 111, 224, 0.12);
    --success: #74c9a0;
    --danger: #e27d8d;
    --warning: #dcb56c;
    --radius: 14px;
    --radius-sm: 9px;
    --radius-pill: 999px;
    --font-display: "Palatino Linotype", "Book Antiqua", Palatino, "URW Palladio L", Georgia, serif;
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
    --shell: 1180px;
    --ring: 0 0 0 3px rgba(157, 111, 224, .22);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 18px 40px -26px rgba(0, 0, 0, .9);
    --shadow-glow: 0 18px 46px -24px rgba(95, 59, 156, .55);
    --ease: cubic-bezier(.4, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { color-scheme: dark; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background:
        radial-gradient(900px 420px at 12% -6%, rgba(95, 59, 156, .22), transparent 68%),
        radial-gradient(1100px 520px at 84% -12%, rgba(120, 78, 190, .18), transparent 70%),
        var(--bg);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: var(--amethyst-bright); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: #dcc8fc; text-decoration: underline; text-underline-offset: 3px; }
img, svg { max-width: 100%; }

:focus-visible { outline: 2px solid var(--amethyst-bright); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.18; margin: 0 0 .6em; letter-spacing: .005em; }
h1 { font-size: clamp(2.05rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 1.95rem); }
h3 { font-size: 1.22rem; }
p { margin: 0 0 1em; }
strong { color: var(--text); font-weight: 600; }
::selection { background: rgba(157, 111, 224, .35); color: #fff; }

.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding-inline: 22px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: var(--font-mono); font-size: .92em; }
.hash { overflow-wrap: anywhere; word-break: break-all; color: var(--text); }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- Header */
.site-header {
    position: sticky; top: 0; z-index: 20;
    background: rgba(9, 8, 13, .82);
    backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid var(--border-soft);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .02), 0 10px 30px -24px rgba(0, 0, 0, .9);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { color: var(--text); text-decoration: none; }
.brand-mark { width: 30px; height: 34px; filter: drop-shadow(0 0 12px var(--glow)); transition: filter .25s var(--ease); }
.brand:hover .brand-mark { filter: drop-shadow(0 0 18px rgba(157, 111, 224, .55)); }
.brand-name { font-family: var(--font-display); font-size: 1.24rem; letter-spacing: .15em; text-transform: uppercase; }
.brand-name span { color: var(--amethyst-bright); }

.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav a {
    position: relative; color: var(--muted); padding: 8px 13px; border-radius: var(--radius-sm);
    font-size: .94rem; transition: color .15s var(--ease), background .15s var(--ease);
}
.nav a:hover { color: var(--text); background: rgba(157, 111, 224, .08); text-decoration: none; }
.nav a.active { color: var(--text); background: rgba(157, 111, 224, .12); }
.nav a.active::after {
    content: ""; position: absolute; left: 13px; right: 13px; bottom: 3px; height: 2px; border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--amethyst-bright), transparent);
}
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: 14px; }
.nav-toggle, .nav-toggle-label { display: none; }

@media (max-width: 980px) {
    .nav-toggle-label {
        display: inline-flex; align-items: center; margin-left: auto; cursor: pointer; padding: 9px 13px;
        border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text);
        background: var(--surface-2); font-size: .9rem; font-weight: 600;
    }
    .nav-toggle-label:hover { border-color: var(--amethyst); }
    .nav {
        display: none; position: absolute; left: 0; right: 0; top: 72px;
        flex-direction: column; align-items: stretch; gap: 2px; padding: 14px 22px 20px;
        background: rgba(15, 12, 21, .98); border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
    }
    .nav a { padding: 12px 13px; }
    .nav a.active::after { display: none; }
    .nav-actions { margin: 12px 0 0; flex-wrap: wrap; }
    .nav-actions .btn { flex: 1 1 auto; }
    .nav-toggle:checked ~ .nav { display: flex; }
}

/* ---------------------------------------------------------------- Buttons & forms */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 19px; border-radius: var(--radius-sm); border: 1px solid var(--border);
    background: linear-gradient(180deg, var(--surface-3), var(--surface-2));
    color: var(--text); font: 600 .94rem var(--font-body); letter-spacing: .01em;
    cursor: pointer; box-shadow: var(--shadow-sm);
    transition: border-color .15s var(--ease), background .15s var(--ease), box-shadow .18s var(--ease), transform .12s var(--ease), color .15s var(--ease);
}
.btn:hover { border-color: var(--amethyst); text-decoration: none; color: #fff; transform: translateY(-1px); box-shadow: 0 10px 24px -16px rgba(0, 0, 0, .9); }
.btn:active { transform: translateY(0); }
.btn-primary {
    background: linear-gradient(180deg, #9a6ade 0%, #7b4cc4 55%, #66399f 100%);
    border-color: #a87ce8; color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 10px 26px -12px var(--glow);
}
.btn-primary:hover {
    background: linear-gradient(180deg, #a87ae8 0%, #8755d1 55%, #6f40ab 100%);
    border-color: var(--amethyst-bright); color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), 0 14px 32px -12px rgba(157, 111, 224, .55);
}
.btn-ghost { background: transparent; box-shadow: none; }
.btn-ghost:hover { background: rgba(157, 111, 224, .08); }
.btn-danger { border-color: rgba(226, 125, 141, .45); color: var(--danger); background: transparent; box-shadow: none; }
.btn-danger:hover { border-color: var(--danger); color: #f1a4b0; background: rgba(226, 125, 141, .08); }
.btn-sm { padding: 7px 13px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .45; cursor: not-allowed; pointer-events: none; box-shadow: none; transform: none; }

.form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field label { font-size: .86rem; color: var(--muted); font-weight: 500; letter-spacing: .02em; }
.input, select.input, textarea.input {
    width: 100%; max-width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: rgba(9, 8, 13, .7); color: var(--text);
    font: 1rem var(--font-body);
    transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background .15s var(--ease);
}
.input::placeholder { color: var(--faint); }
.input:hover { border-color: var(--border-strong); }
textarea.input { min-height: 220px; resize: vertical; font-family: var(--font-mono); font-size: .92rem; line-height: 1.6; }
.input:focus { outline: none; border-color: var(--amethyst); background: rgba(9, 8, 13, .9); box-shadow: var(--ring); }
.hint { font-size: .85rem; color: var(--faint); }
.check { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .92rem; }
.check input { accent-color: var(--amethyst); width: 16px; height: 16px; }
.error-text { color: var(--danger); font-size: .86rem; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }

/* ---------------------------------------------------------------- Surfaces */
main { flex: 1; min-width: 0; }
.section { padding-block: 60px; }
.section-tight { padding-block: 34px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head h1, .section-head h2 { margin-bottom: 0; }
.eyebrow {
    font-size: .76rem; letter-spacing: .24em; text-transform: uppercase;
    color: var(--amethyst-bright); margin-bottom: 10px; font-weight: 600;
}

.card {
    position: relative;
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg-soft) 100%);
    border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 26px;
    box-shadow: var(--shadow);
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.card::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; border-radius: var(--radius) var(--radius) 0 0;
    background: linear-gradient(90deg, transparent, rgba(194, 161, 245, .22), transparent);
}
.card-accent { border-color: var(--border); box-shadow: inset 0 1px 0 rgba(194, 161, 245, .07), var(--shadow-glow); }
.card-accent::before { background: linear-gradient(90deg, transparent, rgba(194, 161, 245, .5), transparent); }
.card h3 { margin-bottom: .45em; }
.card > :last-child { margin-bottom: 0; }
.grid { display: grid; gap: 20px; }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stack > * + * { margin-top: 18px; }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); border: 0; margin: 34px 0; }

.flash { padding: 14px 17px; border-radius: var(--radius-sm); border: 1px solid; margin-bottom: 24px; font-size: .95rem; }
.flash-success { border-color: rgba(116, 201, 160, .35); background: rgba(116, 201, 160, .07); color: #a9e3c7; }
.flash-error { border-color: rgba(226, 125, 141, .35); background: rgba(226, 125, 141, .07); color: #f0b1bb; }
.flash-info { border-color: rgba(157, 111, 224, .35); background: rgba(157, 111, 224, .08); color: #d3bdf6; }
.flash ul { margin: 0; padding-left: 18px; }
.flash > :last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- Hero */
.hero { position: relative; padding-block: 96px 72px; overflow: hidden; isolation: isolate; }
.hero::before {
    content: ""; position: absolute; z-index: -1; top: -28%; left: 50%; width: min(1000px, 130%); aspect-ratio: 2 / 1;
    transform: translateX(-50%);
    background: radial-gradient(closest-side, rgba(126, 82, 196, .26), transparent 72%);
    pointer-events: none;
}
.hero::after {
    content: ""; position: absolute; inset: auto 0 0 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(157, 111, 224, .45), transparent);
}
.hero-inner { display: grid; grid-template-columns: 1.25fr .9fr; gap: 52px; align-items: center; }
.hero h1 {
    font-size: clamp(2.6rem, 6vw, 4.2rem); letter-spacing: .045em; margin-bottom: .28em; line-height: 1.05;
    text-shadow: 0 0 60px rgba(157, 111, 224, .18);
}
.hero h1 span {
    background: linear-gradient(180deg, #e2d2fb 0%, var(--amethyst-bright) 45%, #8a5ed3 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--amethyst-bright);
}
.hero-lead { font-size: 1.1rem; color: var(--muted); max-width: 34em; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-gem { display: flex; justify-content: center; position: relative; }
.hero-gem::before {
    content: ""; position: absolute; top: 50%; left: 50%; width: min(330px, 76vw); aspect-ratio: 1;
    transform: translate(-50%, -50%); border-radius: 50%;
    background: radial-gradient(closest-side, rgba(157, 111, 224, .18), transparent 70%);
    pointer-events: none;
}
.hero-gem svg { position: relative; width: min(300px, 70vw); height: auto; filter: drop-shadow(0 0 44px rgba(157, 111, 224, .38)); }
@media (max-width: 860px) {
    .hero { padding-block: 62px 52px; }
    .hero-inner { grid-template-columns: 1fr; gap: 30px; text-align: center; }
    .hero-lead { margin-inline: auto; }
    .hero-actions { justify-content: center; }
    .hero-gem { order: -1; }
    .hero-gem svg { width: 160px; }
    .hero-gem::before { width: 220px; }
}

/* ---------------------------------------------------------------- Status */
.status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.status-tile {
    position: relative; overflow: hidden;
    background: linear-gradient(180deg, var(--surface), var(--bg-soft));
    border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 18px 20px;
    box-shadow: var(--shadow);
    transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.status-tile::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(157, 111, 224, .55), transparent);
}
.status-tile:hover { border-color: var(--border); transform: translateY(-2px); }
.status-tile .label { font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.status-tile .value { font-family: var(--font-display); font-size: 1.65rem; margin-top: 6px; font-variant-numeric: tabular-nums; }
.pill {
    display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-body); font-size: .82rem;
    font-weight: 600; letter-spacing: .04em; padding: 4px 12px; border-radius: var(--radius-pill);
    border: 1px solid var(--border); color: var(--muted); background: rgba(9, 8, 13, .5);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.is-online .dot { background: var(--success); box-shadow: 0 0 10px rgba(116, 201, 160, .8); }
.is-online { color: #aee2c8; border-color: rgba(116, 201, 160, .32); background: rgba(116, 201, 160, .07); }
.is-offline .dot { background: var(--danger); }
.is-offline { color: #efacb7; border-color: rgba(226, 125, 141, .3); background: rgba(226, 125, 141, .06); }

/* ---------------------------------------------------------------- Tables */
.table-wrap {
    overflow-x: auto; border: 1px solid var(--border-soft); border-radius: var(--radius);
    background: var(--surface); box-shadow: var(--shadow);
    -webkit-overflow-scrolling: touch;
}
table.table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.table th, .table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--border-soft); white-space: nowrap; }
.table th {
    font-family: var(--font-body); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
    color: var(--faint); font-weight: 700;
    background: linear-gradient(180deg, var(--surface-2), var(--bg-soft));
    border-bottom-color: var(--border);
}
.table tbody tr { transition: background .14s var(--ease); }
.table tbody tr:nth-child(even) td { background: rgba(255, 255, 255, .012); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(157, 111, 224, .07); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.rank { color: var(--faint); width: 52px; font-variant-numeric: tabular-nums; }
.rank-top { color: var(--amethyst-bright); font-weight: 700; }
.empty { padding: 34px 24px; text-align: center; color: var(--muted); }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tabs a {
    padding: 8px 16px; border-radius: var(--radius-pill); border: 1px solid var(--border);
    color: var(--muted); font-size: .91rem; font-weight: 500; background: rgba(9, 8, 13, .4);
    transition: color .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease);
}
.tabs a:hover { color: var(--text); border-color: var(--amethyst); text-decoration: none; }
.tabs a.active {
    color: #fff; border-color: var(--amethyst); background: rgba(157, 111, 224, .18);
    box-shadow: 0 0 0 1px rgba(157, 111, 224, .18), 0 8px 20px -14px var(--glow);
}

/* ---------------------------------------------------------------- Rates / key-value */
.kv { display: grid; gap: 0; margin: 0; }
.kv div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px dashed var(--border-soft); }
.kv div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.feature { display: flex; gap: 14px; align-items: flex-start; }
.feature-icon {
    flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
    background: linear-gradient(180deg, rgba(157, 111, 224, .18), rgba(157, 111, 224, .07));
    border: 1px solid var(--border); color: var(--amethyst-bright);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.feature-icon svg { width: 18px; height: 18px; }
.feature p { margin: 0; color: var(--muted); font-size: .94rem; }
.badge {
    display: inline-block; padding: 3px 10px; border-radius: var(--radius-pill); font-size: .75rem;
    font-weight: 600; letter-spacing: .06em; border: 1px solid var(--border); color: var(--muted);
    background: rgba(9, 8, 13, .5);
}
.badge-vip {
    color: #eadcff; border-color: var(--amethyst); background: linear-gradient(180deg, rgba(157, 111, 224, .28), rgba(157, 111, 224, .12));
    box-shadow: 0 0 14px -4px var(--glow);
}
.badge-ok { color: #aee2c8; border-color: rgba(116, 201, 160, .35); background: rgba(116, 201, 160, .08); }
.badge-warn { color: #ecd09a; border-color: rgba(220, 181, 108, .35); background: rgba(220, 181, 108, .08); }
.badge-bad { color: #efacb7; border-color: rgba(226, 125, 141, .35); background: rgba(226, 125, 141, .08); }

/* ---------------------------------------------------------------- News */
.news-card { display: flex; flex-direction: column; }
.news-card:hover { border-color: var(--border); transform: translateY(-3px); box-shadow: var(--shadow-glow); }
.news-card .meta, .article-meta { font-size: .83rem; color: var(--faint); margin-bottom: 8px; letter-spacing: .02em; }
.news-card h3 a { color: var(--text); }
.news-card h3 a:hover { color: var(--amethyst-bright); text-decoration: none; }
.news-card p { color: var(--muted); flex: 1; }
.article { max-width: 760px; }
.article-body { color: #dcd7e6; font-size: 1.02rem; }
.article-body h2, .article-body h3 { margin-top: 1.5em; }
.article-body ul, .article-body ol { padding-left: 1.3em; }
.article-body code { font-family: var(--font-mono); background: var(--surface-2); padding: 1px 6px; border-radius: 5px; font-size: .92em; }

/* ---------------------------------------------------------------- Shop */
.product { display: flex; flex-direction: column; gap: 10px; }
.product:hover { border-color: var(--border); transform: translateY(-3px); box-shadow: var(--shadow-glow); }
.product .price { font-family: var(--font-display); font-size: 1.55rem; color: var(--amethyst-bright); font-variant-numeric: tabular-nums; }
.product .price small { font-family: var(--font-body); font-size: .8rem; color: var(--muted); letter-spacing: .04em; }
.product form { margin-top: auto; }
.balance { display: inline-flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.balance strong {
    font-family: var(--font-display); font-size: 1.8rem; color: var(--amethyst-bright);
    font-variant-numeric: tabular-nums; text-shadow: 0 0 24px rgba(157, 111, 224, .3);
}

/* ---------------------------------------------------------------- Auth */
.auth-wrap { max-width: 470px; margin: 0 auto; }
.auth-card { padding: 36px 34px; }
/* The admin sign-in card reuses .hero-gem for its mark - keep it small, not hero sized. */
.auth-card .hero-gem { margin-bottom: 16px; }
.auth-card .hero-gem svg, .hero-gem svg.brand-mark { width: 54px; height: auto; filter: drop-shadow(0 0 20px var(--glow)); }
.auth-card .hero-gem::before { width: 150px; }
.auth-card h1 { font-size: 1.95rem; text-align: center; margin-bottom: .3em; }
.auth-card .sub { text-align: center; color: var(--muted); margin-bottom: 28px; }
@media (max-width: 480px) { .auth-card { padding: 26px 20px; } }

/* ---------------------------------------------------------------- Footer */
.site-footer {
    border-top: 1px solid var(--border-soft); padding-block: 38px; margin-top: 48px;
    color: var(--faint); font-size: .9rem;
    background: linear-gradient(180deg, rgba(15, 12, 21, .4), var(--bg-soft));
}
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--amethyst-bright); }

.maintenance {
    background: rgba(220, 181, 108, .1); border-bottom: 1px solid rgba(220, 181, 108, .3);
    color: #ecd09a; font-size: .92rem; padding: 10px 18px; text-align: center;
}

.pagination-nav { margin-top: 20px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* ---------------------------------------------------------------- Admin */
.admin-body { background: var(--bg); }
.admin-shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.admin-side {
    background: linear-gradient(180deg, var(--bg-soft), var(--bg));
    border-right: 1px solid var(--border-soft); padding: 24px 16px;
}
.admin-side .brand { margin: 0 8px 28px; }
.admin-nav { display: grid; gap: 2px; }
.admin-nav a {
    position: relative; color: var(--muted); padding: 10px 13px; border-radius: var(--radius-sm); font-size: .93rem;
    transition: color .15s var(--ease), background .15s var(--ease);
}
.admin-nav a:hover { color: var(--text); background: rgba(157, 111, 224, .08); text-decoration: none; }
.admin-nav a.active { color: var(--text); background: rgba(157, 111, 224, .13); }
.admin-nav a.active::before {
    content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; border-radius: 2px;
    background: var(--amethyst-bright);
}
.admin-main { padding: 32px 36px 64px; min-width: 0; }
.admin-top {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    margin-bottom: 28px; padding-bottom: 18px; border-bottom: 1px solid var(--border-soft); flex-wrap: wrap;
}
.admin-top h1 { font-size: 1.7rem; margin: 0; }
.stat {
    background: linear-gradient(180deg, var(--surface), var(--bg-soft));
    border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 17px 19px;
    box-shadow: var(--shadow);
}
.stat .label { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.stat .value { font-family: var(--font-display); font-size: 1.7rem; margin-top: 3px; font-variant-numeric: tabular-nums; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.inline-form .field { min-width: 150px; }
@media (max-width: 880px) {
    .admin-shell { grid-template-columns: 1fr; }
    .admin-side { border-right: 0; border-bottom: 1px solid var(--border-soft); padding: 18px 16px; }
    .admin-side .brand { margin-bottom: 16px; }
    .admin-nav { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
    .admin-nav a.active::before { display: none; }
    .admin-main { padding: 24px 18px 52px; }
}

/* ---------------------------------------------------------------- Small screens & motion */
@media (max-width: 640px) {
    body { font-size: 15.5px; }
    .section { padding-block: 44px; }
    .section-tight { padding-block: 26px; }
    .card { padding: 20px; }
    .shell { padding-inline: 18px; }
    .table th, .table td { padding: 10px 12px; }
    .section-head { align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
    .btn:hover, .card:hover, .news-card:hover, .product:hover, .status-tile:hover { transform: none; }
}

/* Amethyst L2 logo image in place of the former SVG mark - same sizes as the SVG rules above. */
.logo-img { object-fit: contain; }
.brand-mark.logo-img { width: 40px; height: 40px; }
.hero-gem img.logo-img { position: relative; width: min(300px, 70vw); height: auto; filter: drop-shadow(0 0 44px rgba(157, 111, 224, .38)); }
.auth-card .hero-gem img.logo-img, .hero-gem img.brand-mark { width: 54px; height: auto; filter: drop-shadow(0 0 20px var(--glow)); }
@media (max-width: 860px) { .hero-gem img.logo-img:not(.brand-mark) { width: 160px; } }
