:root {
    --bg: #090d14;
    --bg-2: #101722;
    --bg-3: #171f2d;
    --panel: #101826;
    --panel-soft: #162132;
    --panel-2: #1c2739;
    --line: #26344a;
    --line-soft: #31425d;
    --text: #eef3ff;
    --muted: #95a6c5;
    --accent: #d8a94b;
    --accent-2: #5ca7ff;
    --success: #4bb36e;
    --danger: #cf5d5d;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    --radius: 12px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at top, rgba(72, 102, 154, 0.14), transparent 30%),
        linear-gradient(180deg, rgba(11, 15, 24, 0.95), rgba(9, 13, 20, 0.98)),
        url('/img/bg.jpg') center top / cover fixed no-repeat;
    color: var(--text);
    font: 13px/1.42 Inter, "Segoe UI", system-ui, sans-serif;
}

a {
    color: #8cc3ff;
    text-decoration: none;
}

a:hover {
    color: #b4d7ff;
}

code {
    color: #f7d68f;
}

/* ================================================================
   TOPBAR — premium gaming store aesthetic
   Dark base + gold accent system matching donate.css palette
   ================================================================ */

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    /* Multi-layer background: subtle gold atmospheric glow + deep navy base */
    background:
        radial-gradient(ellipse 60% 120% at 8% 0%, rgba(212, 175, 55, 0.10) 0%, transparent 55%),
        radial-gradient(ellipse 40% 100% at 92% 0%, rgba(92, 167, 255, 0.06) 0%, transparent 50%),
        linear-gradient(180deg, #141928 0%, #0c101c 100%);
    /* Bottom border: animated-look gold gradient line */
    border-bottom: 1px solid transparent;
    border-image: linear-gradient(
        90deg,
        transparent 0%,
        rgba(184, 135, 10, 0.3) 15%,
        rgba(212, 175, 55, 0.65) 40%,
        rgba(240, 198, 116, 0.80) 50%,
        rgba(212, 175, 55, 0.65) 60%,
        rgba(184, 135, 10, 0.3) 85%,
        transparent 100%
    ) 1;
    box-shadow:
        0 1px 0 rgba(212, 175, 55, 0.10),
        0 4px 16px rgba(0, 0, 0, 0.30),
        0 16px 40px rgba(0, 0, 0, 0.20);
}

.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 76px;
    padding: 0 24px;
}

/* ---- Brand left cluster ---- */
.topbar__brand {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.topbar__logo {
    display: block;
    height: 40px;
    width: auto;
    object-fit: contain;
    filter:
        drop-shadow(0 0 10px rgba(212, 175, 55, 0.20))
        drop-shadow(0 2px 6px rgba(0, 0, 0, 0.40));
    transition: filter 0.22s ease, transform 0.22s ease;
}
.topbar__logo:hover {
    filter:
        drop-shadow(0 0 16px rgba(240, 198, 116, 0.40))
        drop-shadow(0 2px 6px rgba(0, 0, 0, 0.40));
    transform: scale(1.04);
}

.topbar__brand-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.topbar__brand-title {
    /* Rich gold gradient — warm highlight through mid-tone to deep amber */
    background: linear-gradient(130deg, #fce7a0 0%, #edc84a 35%, #c99820 65%, #a07010 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    line-height: 1.1;
    /* Subtle text shadow via filter — visible in browsers that support it */
    filter: drop-shadow(0 1px 3px rgba(212, 175, 55, 0.25));
}

.topbar__site-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #6b7d9a;
    font-size: 10.5px;
    letter-spacing: 0.06em;
    text-decoration: none;
    transition: color 0.18s ease, gap 0.18s ease;
}
.topbar__site-link:hover {
    color: #d4af37;
    gap: 6px;
}
.topbar__site-link-icon {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.18s ease;
}
.topbar__site-link:hover .topbar__site-link-icon {
    opacity: 1;
}

/* ---- Right actions cluster ---- */
.topbar__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

/* ---- Locale switcher: globe icon + styled select ---- */
.topbar__locale-form {
    display: flex;
    align-items: center;
    margin: 0;
}

.topbar__locale-label {
    display: inline-flex;
    align-items: center;
    padding: 0 6px 0 10px;
    color: #6b7d9a;
    cursor: pointer;
    transition: color 0.18s ease;
    height: 34px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-right: none;
    border-radius: 999px 0 0 999px;
}
.topbar__locale-label svg {
    width: 14px;
    height: 14px;
}
.topbar__locale-label:hover {
    color: #d4af37;
}

.topbar__locale-select {
    height: 34px;
    padding: 0 28px 0 8px;
    border-radius: 0 999px 999px 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-left: none;
    background: rgba(255, 255, 255, 0.025) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%236b7d9a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat right 10px center / 10px 6px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    color: #a0b0cc;
    font-size: 12px;
    font-family: inherit;
    letter-spacing: 0.04em;
    cursor: pointer;
    outline: none;
    transition: border-color 0.18s ease, color 0.18s ease;
}
.topbar__locale-select:hover,
.topbar__locale-select:focus {
    border-color: rgba(212, 175, 55, 0.35);
    color: #d4af37;
    background-color: rgba(212, 175, 55, 0.05);
}
.topbar__locale-select option {
    background: #0e1320;
    color: #cfd8e8;
}

/* ---- Admin badge: text pills instead of .png images ---- */
.topbar__badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    border: none;
    background: none;
}

.topbar__badge-pill {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.topbar__badge-pill--gm {
    background: linear-gradient(135deg, rgba(92, 167, 255, 0.20), rgba(92, 167, 255, 0.08));
    border: 1px solid rgba(92, 167, 255, 0.45);
    color: #7ec3ff;
    box-shadow: 0 0 8px rgba(92, 167, 255, 0.18);
}

.topbar__badge-pill--admin {
    background: linear-gradient(135deg, rgba(220, 80, 80, 0.22), rgba(180, 50, 50, 0.10));
    border: 1px solid rgba(220, 80, 80, 0.50);
    color: #f08080;
    box-shadow: 0 0 8px rgba(220, 80, 80, 0.20);
}

/* ---- Chips: welcome, email, currency ---- */
.topbar__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 13px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.030);
    color: #9bacc5;
    font-size: 12px;
    letter-spacing: 0.02em;
    transition: border-color 0.20s ease, background 0.20s ease, color 0.20s ease;
    white-space: nowrap;
}

.topbar__chip:hover {
    border-color: rgba(212, 175, 55, 0.22);
    background: rgba(212, 175, 55, 0.045);
    color: #b8c8de;
}

.topbar__chip-icon {
    width: 13px;
    height: 13px;
    opacity: 0.55;
    flex-shrink: 0;
}

.topbar__chip-divider {
    display: inline-block;
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.10);
    margin: 0 2px;
}

.topbar__login {
    color: #f0d98a;
    font-weight: 700;
    letter-spacing: 0.03em;
}

/* ---- Balance chip: STAR of the right side ---- */
.topbar__chip--currency {
    /* Strong gold atmospheric gradient */
    background:
        linear-gradient(135deg,
            rgba(212, 175, 55, 0.18) 0%,
            rgba(184, 135, 10, 0.10) 50%,
            rgba(212, 175, 55, 0.06) 100%);
    border: 1.5px solid rgba(212, 175, 55, 0.42);
    color: #f5e4a4;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.03em;
    /* Multi-layer glow: inner amber bloom + outer depth */
    box-shadow:
        inset 0 1px 0 rgba(240, 198, 116, 0.12),
        inset 0 -1px 0 rgba(212, 175, 55, 0.06),
        0 0 0 1px rgba(212, 175, 55, 0.06),
        0 0 16px rgba(212, 175, 55, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.25);
    padding: 0 16px;
    gap: 8px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.18s ease, background 0.22s ease;
}

/* Subtle animated shimmer sweep on hover */
.topbar__chip--currency::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(240, 198, 116, 0.14) 50%,
        transparent 100%
    );
    transition: left 0.50s ease;
    pointer-events: none;
}

.topbar__chip--currency:hover {
    border-color: rgba(240, 198, 116, 0.70);
    background:
        linear-gradient(135deg,
            rgba(212, 175, 55, 0.26) 0%,
            rgba(184, 135, 10, 0.16) 50%,
            rgba(212, 175, 55, 0.10) 100%);
    box-shadow:
        inset 0 1px 0 rgba(240, 198, 116, 0.20),
        inset 0 -1px 0 rgba(212, 175, 55, 0.08),
        0 0 0 1px rgba(212, 175, 55, 0.12),
        0 0 24px rgba(212, 175, 55, 0.22),
        0 0 48px rgba(212, 175, 55, 0.08),
        0 4px 12px rgba(0, 0, 0, 0.30);
    transform: translateY(-1px);
}

.topbar__chip--currency:hover::before {
    left: 160%;
}

.topbar__chip-label {
    color: rgba(245, 228, 164, 0.65);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.topbar__currency-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.topbar__currency-group img {
    width: 17px;
    height: 17px;
    object-fit: contain;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.40));
}

.topbar__currency-group strong {
    font-size: 13px;
    font-weight: 800;
    color: #fce7a0;
    letter-spacing: -0.01em;
    text-shadow: 0 1px 6px rgba(212, 175, 55, 0.35);
}

.topbar__currency-sep {
    color: rgba(245, 228, 164, 0.30);
    font-size: 10px;
    line-height: 1;
}

/* ---- Email/identity chip ---- */
.topbar__chip--identity {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #677a96;
    font-size: 11.5px;
    gap: 5px;
}

/* ---- Logout button ---- */
.topbar__logout-form {
    margin: 0;
}

.topbar__logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 15px;
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.38);
    background: rgba(212, 175, 55, 0.055);
    color: #d4af37;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.20s ease, border-color 0.20s ease, color 0.20s ease, transform 0.18s ease, box-shadow 0.20s ease;
}

.topbar__logout svg {
    width: 14px;
    height: 14px;
    opacity: 0.75;
    flex-shrink: 0;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.topbar__logout:hover {
    background: linear-gradient(135deg, rgba(240, 198, 116, 0.16), rgba(184, 135, 10, 0.08));
    border-color: rgba(240, 198, 116, 0.65);
    color: #f0c674;
    transform: translateY(-1px);
    box-shadow: 0 0 14px rgba(212, 175, 55, 0.16), 0 4px 10px rgba(0, 0, 0, 0.22);
}

.topbar__logout:hover svg {
    opacity: 1;
    transform: translateX(2px);
}

/* Accessibility: hide visually but keep for screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.shell {
    display: grid;
    grid-template-columns: 308px minmax(0, 1fr);
    gap: 22px;
    min-height: calc(100vh - 78px);
    padding: 18px;
}

.sidebar {
    padding: 0;
}

.shell--guest {
    grid-template-columns: 1fr;
}

.shell--guest .content {
    max-width: 860px;
    margin: 0 auto;
}

.brand--sidebar {
    margin-bottom: 18px;
    padding: 18px 18px 16px;
    border: 1px solid rgba(216, 169, 75, 0.16);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
        rgba(13, 20, 31, 0.82);
    box-shadow: var(--shadow);
}

.brand__eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(216, 169, 75, 0.12);
    color: #f3d89c;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand h1 {
    margin: 0;
    font-size: 24px;
    line-height: 1.05;
}

.brand p {
    margin: 10px 0 0;
    color: var(--muted);
}

.meta-card {
    margin: 18px 0;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    background: rgba(14, 20, 31, 0.88);
    box-shadow: var(--shadow);
}

.meta-card__label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.meta-card__value {
    color: #fff;
    font-size: 22px;
    font-weight: 800;
}

.nav-section {
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(14, 20, 31, 0.9);
    box-shadow: var(--shadow);
}

.nav-section__title {
    margin: 0;
    padding: 11px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    color: #a7b5cc;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.nav-list {
    margin: 0;
    padding: 8px;
    list-style: none;
}

.nav-list li + li {
    margin-top: 4px;
}

.nav-list a {
    display: block;
    padding: 11px 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #dbe6fa;
    transition: 0.2s ease;
}

.nav-list a:hover {
    border-color: rgba(92, 167, 255, 0.22);
    background: rgba(92, 167, 255, 0.09);
}

.nav-list a.is-active {
    border-color: rgba(216, 169, 75, 0.32);
    background: rgba(216, 169, 75, 0.12);
    color: #fff1bf;
    font-weight: 700;
}

.sidebar .logout-form {
    margin-top: 18px;
}

.content {
    min-width: 0;
}

.page {
    max-width: 100%;
}

.inventory-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.inventory-toolbar__field {
    width: 100%;
    max-width: 420px;
}

.inventory-toolbar__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-header {
    margin-bottom: 18px;
    padding: 22px 24px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
        rgba(15, 23, 36, 0.9);
    box-shadow: var(--shadow);
}

.page-header h1 {
    margin: 0;
    color: #fff;
    font-size: 18px;
    line-height: 1.15;
}

.page-header p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.is-guest .page {
    max-width: 860px;
    margin: 0 auto;
}

.card,
fieldset {
    margin: 0 0 18px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
        rgba(15, 23, 36, 0.92);
    box-shadow: var(--shadow);
}

.card > h2:first-child,
fieldset > legend {
    color: #fff;
}

.card__intro {
    color: var(--muted);
}

.notice,
.alert {
    margin: 0 0 18px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid transparent;
}

.notice {
    background: rgba(255, 255, 255, 0.04);
}

.notice--error,
.alert--error {
    border-color: rgba(207, 93, 93, 0.28);
    background: rgba(207, 93, 93, 0.14);
}

.alert--success {
    border-color: rgba(75, 179, 110, 0.24);
    background: rgba(75, 179, 110, 0.14);
}

.alert--warning {
    border-color: rgba(216, 169, 75, 0.28);
    background: rgba(216, 169, 75, 0.12);
    color: #ffe7a7;
}

h1,
h2,
h3 {
    margin-top: 0;
}

h2 {
    font-size: 18px;
}

p {
    margin: 0 0 12px;
}

.stats {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 18px;
}

.stat {
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    background: rgba(20, 30, 46, 0.9);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.stat:hover {
    border-color: rgba(92, 167, 255, 0.14);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.stat__label {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat__value {
    color: #fff;
    font-size: 24px;
    font-weight: 800;
}

.stat__value--currency {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.stat__value--login {
    color: #7ee08d;
    text-shadow: 0 0 12px rgba(126, 224, 141, 0.18);
}

.stat__value--currency img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.activity-feed__login {
    color: #7ee08d;
    font-weight: 700;
}

.activity-feed__date {
    color: #d9e6ff;
}

.activity-feed__ip {
    color: #8fc4ff;
    font-family: Consolas, "Courier New", monospace;
}

.activity-feed__costs {
    color: #ffb3b3;
    font-weight: 700;
}

.activity-feed__rest {
    color: #ffe2a2;
    font-weight: 700;
}

.activity-feed__source {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.activity-feed__source--lk {
    background: rgba(216, 169, 75, 0.16);
    color: #ffd88a;
}

.activity-feed__source--login {
    background: rgba(92, 167, 255, 0.14);
    color: #a9d0ff;
}

.activity-feed__source--password {
    background: rgba(197, 120, 255, 0.14);
    color: #dfb0ff;
}

.activity-feed__desc {
    color: #f2f6ff;
    line-height: 1.5;
}

.inventory-record__item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.inventory-record__item strong {
    color: #f4f7ff;
}

.inventory-record__item span {
    color: #8fa6d2;
    font-size: 11px;
}

.inventory-record__status {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.inventory-record__status--pending {
    background: rgba(216, 169, 75, 0.14);
    color: #ffd88a;
}

.inventory-record__status--sent {
    background: rgba(75, 179, 110, 0.14);
    color: #98f0b3;
}

.referral-stat__value {
    font-size: 22px;
}

.referral-stat__value--accent {
    color: #77d3ff;
    text-shadow: 0 0 14px rgba(119, 211, 255, 0.16);
}

.referral-stat__meta {
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.referral-link-box input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid rgba(92, 167, 255, 0.22);
    border-radius: 12px;
    background: rgba(10, 16, 26, 0.96);
    color: #d8e6ff;
    font: 13px/1.4 Consolas, "Courier New", monospace;
}

.referral-link-box__input {
    color: #77d3ff !important;
    font-weight: 700;
    text-shadow: 0 0 12px rgba(119, 211, 255, 0.12);
}

.referral-table td,
.referral-table th {
    white-space: nowrap;
}

.character-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

/* --- Character card: class-specific accent colors --- */
.character-card { --card-accent: #d8a94b; }
.character-card[data-class="warrior"]   { --card-accent: #ff6b4a; }
.character-card[data-class="ranger"]    { --card-accent: #5fe690; }
.character-card[data-class="warden"]    { --card-accent: #5ca7ff; }
.character-card[data-class="assassin"]  { --card-accent: #c278ff; }
.character-card[data-class="mage"]      { --card-accent: #4de8e8; }
.character-card[data-class="priest"]    { --card-accent: #ffd88a; }
.character-card[data-class="bard"]      { --card-accent: #ff8ec4; }
.character-card[data-class="marksman"]  { --card-accent: #ffa74d; }
.character-card[data-class="protector"] { --card-accent: #7eb8ff; }

.character-card {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-top: 3px solid var(--card-accent);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0) 60%),
        rgba(11, 18, 28, 0.92);
    overflow: hidden;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.character-card:hover {
    border-color: var(--card-accent);
    border-top-color: var(--card-accent);
    transform: translateY(-3px);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.35),
        0 0 20px color-mix(in srgb, var(--card-accent) 15%, transparent);
}

.character-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 18px 14px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--card-accent) 8%, transparent) 0%, transparent 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.character-card__name {
    color: #f5f8ff;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.01em;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.character-card__roleid {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.character-card__level {
    padding: 6px 12px;
    border: 1px solid color-mix(in srgb, var(--card-accent) 30%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--card-accent) 12%, transparent);
    color: var(--card-accent);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    filter: brightness(1.2);
}

.character-card__table {
    width: 100%;
    border-radius: 0;
    background: transparent;
}

.character-card__table th,
.character-card__table td {
    padding: 9px 18px;
    border-right: 0;
}

.character-card__table tr:nth-child(odd) th,
.character-card__table tr:nth-child(odd) td {
    background: rgba(255, 255, 255, 0.02);
}

.character-card__table th {
    width: 38%;
    color: #8a9bba;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.02);
}

.character-card__table td {
    color: #f5f8ff;
    font-weight: 700;
}

.character-card__value {
    display: inline-block;
}

.character-card__value--name {
    color: var(--card-accent);
    font-size: 15px;
    font-weight: 800;
    text-shadow: 0 0 14px color-mix(in srgb, var(--card-accent) 25%, transparent);
}

.character-card__value--level {
    color: #ffd88a;
}

.character-card__value--class {
    color: var(--card-accent);
    filter: brightness(1.15);
}

.character-card__value--guild {
    color: #f3b6ff;
}

.character-card__value--gender {
    color: #d9e6ff;
}

form {
    margin: 0;
}

.form-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.field--checkbox {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.field label {
    color: #d7e0f0;
    font-size: 13px;
    font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    background: #0a1019;
    color: #f2f6ff;
    font-size: 13px;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(92, 167, 255, 0.8);
    box-shadow: 0 0 0 3px rgba(92, 167, 255, 0.18);
}

textarea {
    min-height: 420px;
    resize: vertical;
}

input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-2);
}

button,
.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 16px;
    border: 1px solid rgba(216, 169, 75, 0.44);
    border-radius: 10px;
    background: linear-gradient(180deg, #e0b253, #b98525);
    color: #18140e;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
    transition: filter 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

button:hover,
.button-link:hover {
    filter: brightness(1.05);
    color: #100d07;
}

.button-link--secondary,
.button--secondary {
    border-color: rgba(84, 119, 188, 0.5);
    background: linear-gradient(180deg, #32496f, #21324c);
    color: #f3f7ff;
}

.button-link--secondary:hover,
.button--secondary:hover {
    color: #fff;
}

.button-link--danger,
.button--danger,
.modal-close {
    border-color: rgba(203, 91, 91, 0.5);
    background: linear-gradient(180deg, #d46969, #ab4444);
    color: #fff;
}

.button-link--ghost {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #dfe9ff;
}

.button-link--accent {
    border-color: rgba(216, 169, 75, 0.44);
    background: rgba(216, 169, 75, 0.1);
    color: #ffd889;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border-radius: 14px;
    background: rgba(12, 18, 29, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

th,
td {
    padding: 11px 14px;
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-align: left;
    vertical-align: top;
    transition: background 0.15s ease;
}

th:last-child,
td:last-child {
    border-right: 0;
}

thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    color: #d8a94b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    background: linear-gradient(180deg, rgba(216, 169, 75, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    border-bottom: 2px solid rgba(216, 169, 75, 0.15);
    padding: 13px 14px;
    white-space: nowrap;
}

tbody tr:nth-child(odd) td {
    background: rgba(255, 255, 255, 0.015);
}

tbody tr:nth-child(even) td {
    background: transparent;
}

tbody tr {
    transition: background 0.15s ease;
}

tbody tr:hover td {
    background: rgba(92, 167, 255, 0.07);
}

tbody tr:hover td:first-child {
    box-shadow: inset 3px 0 0 var(--accent);
}

tbody td {
    font-size: 13px;
    line-height: 1.45;
}

.table-detail-cell {
    padding: 0;
    background: rgba(8, 11, 18, 0.94);
}

/* --- Table wrapper for horizontal scroll on narrow screens --- */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 14px;
}

.table-scroll table {
    min-width: 700px;
}

/* --- Table cell typography helpers --- */
tbody td .cell-id {
    color: var(--muted);
    font-size: 12px;
    font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
}

tbody td .cell-date {
    color: #8a9bba;
    font-size: 12px;
    white-space: nowrap;
}

tbody td .cell-ip {
    color: #7eb8ff;
    font-size: 12px;
    font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
    letter-spacing: 0.02em;
}

tbody td .cell-login {
    color: #8fe6a5;
    font-weight: 700;
}

tbody td .cell-email {
    color: #c4d5f0;
    font-size: 12px;
    word-break: break-all;
}

/* --- Row status indicators --- */
tbody tr.row--success td:first-child {
    box-shadow: inset 3px 0 0 #5fe690;
}

tbody tr.row--warning td:first-child {
    box-shadow: inset 3px 0 0 #d8a94b;
}

tbody tr.row--danger td:first-child {
    box-shadow: inset 3px 0 0 #ff6b4a;
}

tbody tr.row--muted td {
    opacity: 0.55;
}

.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.empty {
    padding: 14px 16px;
    border: 1px dashed rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    color: var(--muted);
}

.legacy-editor #EditTab {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
}

.legacy-editor #EditTab a {
    display: inline-block;
    padding: 10px 14px;
    border: 1px solid rgba(92, 167, 255, 0.2);
    border-radius: 12px;
    background: rgba(92, 167, 255, 0.08);
    color: #e7f0ff;
}

.legacy-editor #EditTab a.is-active {
    border-color: rgba(216, 169, 75, 0.34);
    background: rgba(216, 169, 75, 0.14);
    color: #ffecb8;
}

.legacy-editor #EditTabContent > div,
.legacy-editor #EditTabContent .tab-pane {
    display: none;
}

.legacy-editor #EditTabContent > div:first-child,
.legacy-editor #EditTabContent .tab-pane:first-child {
    display: block;
}

.legacy-editor textarea {
    min-height: 520px;
}

.legacy-editor center {
    margin-top: 18px;
}

.legacy-editor #save_but {
    min-width: 160px;
}

.legacy-editor-result {
    margin-bottom: 14px;
}

.settings-tabs-card {
    padding-top: 10px;
}

.settings-group + .settings-group {
    margin-top: 22px;
}

.referral-rewards-table th {
    white-space: nowrap;
}

.referral-rewards-table td {
    padding: 10px;
}

.referral-rewards-table input[type="text"],
.referral-rewards-table input[type="number"] {
    min-width: 96px;
    padding: 9px 10px;
    border-color: rgba(123, 150, 196, 0.28);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(9, 14, 23, 0.98), rgba(7, 11, 18, 0.98));
    color: #f5f8ff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 0 0 1px rgba(255, 255, 255, 0.015);
}

.referral-rewards-table input[type="text"]:focus,
.referral-rewards-table input[type="number"]:focus {
    border-color: rgba(216, 169, 75, 0.6);
    box-shadow:
        0 0 0 3px rgba(216, 169, 75, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.settings-referral-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

.settings-referral-actions button {
    min-width: 220px;
}

.referral-rewards-table--legacy th {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.referral-item-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.referral-item-cell__icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex: 0 0 32px;
}

.referral-item-cell__placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
    font-weight: 700;
    flex: 0 0 32px;
}

.referral-item-cell__meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.referral-item-cell__meta strong {
    color: #f4f6fd;
    font-size: 13px;
    line-height: 1.2;
}

.referral-item-cell__meta span {
    color: #8fa6d2;
    font-size: 11px;
}

.referral-admin-summary {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 18px;
}

.referral-admin-summary__card {
    padding: 16px 18px;
    border: 1px solid rgba(92, 167, 255, 0.16);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
        rgba(14, 21, 33, 0.82);
}

.referral-admin-summary__eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    color: #95b8f2;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.referral-admin-summary__card h3 {
    margin: 0 0 6px;
    font-size: 17px;
}

.referral-admin-summary__card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.referral-legacy-table th,
.referral-legacy-table td {
    vertical-align: middle;
}

.referral-settings-group .settings-group__header {
    margin-bottom: 12px;
}

.referral-legacy-table thead th {
    white-space: nowrap;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}

.referral-legacy-table td > input[type="text"] {
    min-width: 88px;
}

.referral-legacy-table td:last-child > input[type="text"] {
    min-width: 260px;
}

.referral-admin-list {
    display: grid;
    gap: 12px;
}

.referral-admin-row {
    display: grid;
    gap: 14px;
    grid-template-columns: 120px 320px minmax(0, 1fr);
    align-items: start;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01)),
        rgba(12, 18, 29, 0.84);
}

.referral-admin-row label {
    display: block;
    margin-bottom: 7px;
    color: #efe5c1;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.referral-admin-row__level input {
    text-align: center;
}

.referral-admin-row__main {
    display: grid;
    gap: 12px;
}

.referral-admin-fields {
    display: grid;
    gap: 12px;
}

.referral-admin-fields--compact {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.referral-admin-row .field {
    margin-bottom: 0;
}

.referral-admin-row .field--wide {
    grid-column: 1 / -1;
}

.referral-item-cell--large {
    min-height: 56px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
}

.referral-item-cell__hint {
    margin-top: 8px;
    color: #ffcfda;
    font-size: 11px;
    line-height: 1.45;
}

.referral-item-cell--large .referral-item-cell__icon,
.referral-item-cell--large .referral-item-cell__placeholder {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
}

.referral-level-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.referral-level-field__label {
    color: #ffcfda;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.referral-donation-table td {
    vertical-align: middle;
}

.referral-donation-table .settings-table__name {
    font-size: 14px;
}

.referral-donation-table__meta code {
    color: #f7d68f;
}

.referral-donation-field {
    position: relative;
    display: flex;
    align-items: center;
}

.referral-donation-field input[type="text"] {
    padding-right: 40px;
}

.referral-donation-field__suffix {
    position: absolute;
    right: 14px;
    color: #f3d89c;
    font-size: 13px;
    font-weight: 700;
}

.system-tools {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.system-tool-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(113, 141, 197, 0.18);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(26, 34, 49, 0.95), rgba(20, 27, 39, 0.95));
}

.system-tool-card h3 {
    margin: 0 0 4px;
    color: #f3f6ff;
    font-size: 15px;
}

.system-tool-card p {
    margin: 0;
    color: #aab7d8;
    font-size: 12px;
    line-height: 1.45;
}

.system-tool-card__notes {
    margin: 10px 0 0;
    padding-left: 18px;
    color: #d6e1fa;
    font-size: 12px;
    line-height: 1.55;
}

.system-tool-card__notes li + li {
    margin-top: 4px;
}

.system-note__label {
    color: #cfdcff;
    font-weight: 700;
}

.system-note__command,
.system-note__inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border: 1px solid rgba(92, 167, 255, 0.24);
    border-radius: 8px;
    background: rgba(8, 14, 24, 0.84);
    color: #9fd0ff;
    font: 12px/1.45 Consolas, "Courier New", monospace;
    word-break: break-all;
}

.system-note__inline {
    padding: 1px 7px;
    color: #ffd88a;
    border-color: rgba(216, 169, 75, 0.22);
}

.system-note__token {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.system-note__token--info {
    border-color: rgba(92, 167, 255, 0.28);
    background: rgba(92, 167, 255, 0.12);
    color: #a9d0ff;
}

.system-note__token--success {
    border-color: rgba(75, 179, 110, 0.28);
    background: rgba(75, 179, 110, 0.14);
    color: #9cf2b7;
}

.system-note__token--warning {
    border-color: rgba(216, 169, 75, 0.28);
    background: rgba(216, 169, 75, 0.14);
    color: #ffe39d;
}

.system-note__token--danger {
    border-color: rgba(207, 93, 93, 0.3);
    background: rgba(207, 93, 93, 0.14);
    color: #ffb4b4;
}

.system-tool-card__action {
    flex-shrink: 0;
}

.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid rgba(113, 141, 197, 0.3);
    border-radius: 12px;
    background: linear-gradient(180deg, #31476f, #243757);
    color: #f4f7ff;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.button-secondary:hover {
    background: linear-gradient(180deg, #3a5587, #2c4270);
}

.settings-group__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #efe5c1;
    font-size: 13px;
    font-weight: 700;
}

.settings-group__meta {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.settings-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-tabs__tab {
    min-height: 34px;
    padding: 6px 14px;
    border: 1px solid rgba(92, 167, 255, 0.18);
    border-radius: 10px 10px 0 0;
    background: rgba(255, 255, 255, 0.02);
    color: #cfe0ff;
    font-size: 13px;
    font-weight: 400;
    box-shadow: none;
}

.settings-tabs__tab.is-active {
    border-color: rgba(216, 169, 75, 0.32);
    background: rgba(216, 169, 75, 0.12);
    color: #fff1bf;
}

.settings-tab-pane {
    display: none;
}

.settings-tab-pane.is-active {
    display: block;
}

.settings-table-wrap {
    overflow-x: auto;
}

.settings-table {
    border-radius: 12px;
}

.settings-table td {
    vertical-align: top;
}

.settings-table__name {
    display: block;
    color: #f5f7ff;
    font-size: 15px;
    font-weight: 700;
}

.settings-row--inactive {
    opacity: 0.74;
}

.settings-row--inactive td {
    background: rgba(255, 255, 255, 0.015);
}

.settings-row--inactive input,
.settings-row--inactive textarea,
.settings-row--inactive select,
.settings-row--inactive .legacy-switch__track,
.settings-row--inactive .settings-cost {
    filter: saturate(0.4) blur(0.15px);
}

.settings-row__badge {
    display: inline-flex;
    align-items: center;
    margin-top: 8px;
    padding: 4px 10px;
    border: 1px solid rgba(214, 153, 81, 0.26);
    border-radius: 999px;
    background: rgba(214, 153, 81, 0.14);
    color: #ffd89a;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.settings-table__desc {
    display: inline-block;
    color: #ffd5dd;
    line-height: 1.5;
    white-space: normal;
}

.settings-desc-block {
    padding: 12px 14px;
    border: 1px solid rgba(216, 169, 75, 0.18);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: #fff1bf;
    font-weight: 700;
}

.settings-textarea {
    min-height: 140px;
}

.settings-cost {
    display: grid;
    gap: 10px;
}

.settings-cost__field {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 8px;
    align-items: center;
}

.settings-cost__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.settings-cost__icon img {
    width: 16px;
    height: 16px;
}

.legacy-switch {
    display: inline-flex;
    align-items: center;
}

.legacy-switch input[type="checkbox"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.legacy-switch__track {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 118px;
    height: 28px;
    padding: 2px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 7px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.15));
    cursor: pointer;
}

.legacy-switch__state {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50%;
    color: #d9e4f7;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.legacy-switch__state--on {
    color: #eef9ff;
}

.legacy-switch__state--off {
    color: #aab4c9;
}

.legacy-switch__knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: calc(50% - 2px);
    height: 22px;
    border-radius: 5px;
    background: linear-gradient(180deg, #7fb2f5, #3d7ed4);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
    transition: transform 0.18s ease;
}

.legacy-switch input[type="checkbox"]:not(:checked) + .legacy-switch__track .legacy-switch__knob {
    transform: translateX(57px);
    background: linear-gradient(180deg, #f1f1f1, #bababa);
}

.settings-table__meta {
    margin-top: 8px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.settings-table__inactive-note {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px dashed rgba(214, 153, 81, 0.3);
    border-radius: 10px;
    background: rgba(214, 153, 81, 0.08);
    color: #ffd89a;
    font-size: 12px;
    line-height: 1.5;
}

.legacy-switch--disabled {
    cursor: not-allowed;
}

.legacy-switch--disabled .legacy-switch__track {
    cursor: not-allowed;
}

.inspector-panel {
    overflow-x: auto;
    padding: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 30%),
        rgba(8, 12, 19, 0.9);
}

.detail-summary {
    display: grid;
    gap: 10px 18px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin: 0 0 18px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
}

.detail-summary--stacked {
    grid-template-columns: 1fr;
}

.detail-summary__row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-summary__label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.detail-summary__value {
    color: #fff;
    font-size: 14px;
    word-break: break-word;
}

.detail-summary__code {
    margin: 0;
    padding: 12px 14px;
    border-radius: 10px;
    background: #17101b;
    border: 1px solid rgba(216, 169, 75, 0.18);
    color: #ffd98e;
    white-space: pre-wrap;
    word-break: break-word;
}

#bonus-data-content {
    background:
        linear-gradient(180deg, rgba(216, 169, 75, 0.13), rgba(216, 169, 75, 0.04)),
        #17101b;
    border-color: rgba(216, 169, 75, 0.4);
    color: #fff0bd;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.inspector-panel .userinfo_table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 14px;
    border-radius: 14px;
    overflow: hidden;
    background: #101720;
}

.inspector-panel .userinfo_table td {
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    vertical-align: top;
}

.inspector-panel .inspector-action {
    min-height: 26px;
    margin-left: 8px;
    margin-top: 0;
    padding: 4px 9px;
    border-radius: 8px;
    font-size: 11px;
    line-height: 1.1;
    white-space: nowrap;
    vertical-align: middle;
}

.inspector-panel .userinfo_table td > b,
.inspector-panel .userinfo_table td > font,
.inspector-panel .userinfo_table td > a,
.inspector-panel .userinfo_table td > button {
    vertical-align: middle;
}

.search-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.search-card {
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
}

.search-card__title {
    margin: 0 0 12px;
    color: #efe5c1;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.search-card__row {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr auto;
    align-items: end;
}

.search-card__row--compact {
    grid-template-columns: 1fr 220px auto;
}

.search-card__result {
    margin-top: 12px;
    color: #f3d89c;
    font-size: 13px;
    font-weight: 700;
}

.toolbar-search {
    display: grid;
    grid-template-columns: repeat(8, minmax(120px, 1fr)) auto;
    gap: 12px;
    align-items: end;
}

.toolbar-search--stacked {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.toolbar-search__row {
    display: grid;
    gap: 12px;
    align-items: end;
}

.toolbar-search__row--character {
    grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 0.7fr) auto minmax(220px, auto);
}

.toolbar-search__row--accounts {
    grid-template-columns: repeat(6, minmax(140px, 1fr)) auto;
}

.toolbar-search__submit {
    min-width: 140px;
}

.toolbar-search__result {
    color: #f3d89c;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    padding-bottom: 10px;
}

.inventory-table__check {
    width: 42px;
    text-align: center;
}

.inventory-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.inventory-item img,
.inventory-item__placeholder {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    flex: 0 0 40px;
}

.inventory-item img {
    object-fit: cover;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.inventory-item__placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    color: var(--muted);
    font-weight: 700;
}

.inventory-item__name {
    color: #fff;
    font-weight: 700;
}

.inventory-item__meta {
    color: var(--muted);
    font-size: 12px;
}

.inventory-grant-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
    gap: 20px;
    margin-bottom: 20px;
}

.inventory-grant-layout--split {
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.85fr);
    align-items: start;
}

.inventory-grant-main {
    position: sticky;
    top: 96px;
    border-color: rgba(216, 169, 75, 0.18);
    background:
        radial-gradient(circle at top right, rgba(216, 169, 75, 0.09), transparent 22%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
        rgba(15, 23, 36, 0.94);
}

.inventory-grant-main__header {
    margin-bottom: 18px;
}

.inventory-grant-main__header p {
    max-width: 760px;
}

.inventory-grant-tools {
    display: grid;
    gap: 16px;
}

.inventory-lookup-card__header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}

.inventory-lookup-card__header .card__title {
    margin-bottom: 4px;
    font-size: 16px;
}

.inventory-lookup-card {
    padding: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.012)),
        rgba(14, 21, 33, 0.9);
}

.inventory-selection-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 18px;
}

.inventory-grant-filters,
.inventory-grant-form {
    display: grid;
    gap: 16px;
}

.inventory-grant-filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.inventory-grant-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inventory-grant-form .field {
    margin-bottom: 2px;
}

.inventory-grant-form input:not([type]),
.inventory-grant-form input[type="text"],
.inventory-grant-form input[type="number"],
.inventory-grant-form textarea,
.inventory-grant-form select,
.inventory-search-card input:not([type]),
.inventory-search-card input[type="text"],
.inventory-search-card input[type="number"],
.inventory-search-card select,
.inventory-grant-main input:not([type]),
.inventory-grant-main input[type="text"],
.inventory-grant-main input[type="number"],
.inventory-grant-main textarea,
.inventory-grant-main select,
.inventory-lookup-card input:not([type]),
.inventory-lookup-card input[type="text"],
.inventory-lookup-card input[type="number"],
.inventory-lookup-card textarea,
.inventory-lookup-card select {
    border-color: rgba(123, 150, 196, 0.28);
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(9, 14, 23, 0.98), rgba(7, 11, 18, 0.98));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 0 0 1px rgba(255, 255, 255, 0.015);
    color: #f5f8ff;
    font-size: 14px;
}

.inventory-grant-form input:not([type]):focus,
.inventory-grant-form input[type="text"]:focus,
.inventory-grant-form input[type="number"]:focus,
.inventory-grant-form textarea:focus,
.inventory-grant-form select:focus,
.inventory-search-card input:not([type]):focus,
.inventory-search-card input[type="text"]:focus,
.inventory-search-card input[type="number"]:focus,
.inventory-search-card select:focus,
.inventory-grant-main input:not([type]):focus,
.inventory-grant-main input[type="text"]:focus,
.inventory-grant-main input[type="number"]:focus,
.inventory-grant-main textarea:focus,
.inventory-grant-main select:focus,
.inventory-lookup-card input:not([type]):focus,
.inventory-lookup-card input[type="text"]:focus,
.inventory-lookup-card input[type="number"]:focus,
.inventory-lookup-card textarea:focus,
.inventory-lookup-card select:focus {
    border-color: rgba(216, 169, 75, 0.6);
    box-shadow:
        0 0 0 3px rgba(216, 169, 75, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.inventory-grant-form label,
.inventory-search-card label {
    color: #eef2fb;
    font-size: 12px;
    letter-spacing: 0.03em;
}

.inventory-grant-main input:-webkit-autofill,
.inventory-grant-main input:-webkit-autofill:hover,
.inventory-grant-main input:-webkit-autofill:focus,
.inventory-lookup-card input:-webkit-autofill,
.inventory-lookup-card input:-webkit-autofill:hover,
.inventory-lookup-card input:-webkit-autofill:focus {
    -webkit-text-fill-color: #f5f8ff;
    box-shadow:
        0 0 0 1000px #0b111c inset,
        0 0 0 3px rgba(216, 169, 75, 0.12);
    transition: background-color 9999s ease-out 0s;
}

.inventory-grant-form .field:nth-child(6) {
    grid-row: span 2;
}

.inventory-grant-form textarea {
    min-height: 206px;
    background:
        linear-gradient(180deg, rgba(11, 17, 27, 0.95), rgba(8, 12, 19, 0.98));
}

.inventory-grant-main .field,
.inventory-lookup-card .field {
    margin-bottom: 0;
}

.inventory-grant-main .field label,
.inventory-lookup-card .field label {
    margin-bottom: 2px;
    color: #eef2fb;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.inventory-grant-form button[type="submit"] {
    min-height: 46px;
    padding: 10px 18px;
    font-size: 14px;
    justify-self: end;
    min-width: 174px;
}

.inventory-row--active td {
    background: rgba(216, 169, 75, 0.12);
    box-shadow: inset 0 0 0 1px rgba(216, 169, 75, 0.16);
}

.inventory-search-card {
    margin-bottom: 12px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01)),
        rgba(255, 255, 255, 0.02);
}

.inventory-search-card__row {
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    align-items: end;
}

.inventory-search-card__actions {
    display: flex;
    align-items: end;
}

.inventory-search-card__actions button {
    min-width: 116px;
    min-height: 42px;
}

.inventory-results {
    display: grid;
    gap: 12px;
}

.inventory-results-wrap {
    overflow: hidden;
    transition: max-height 0.24s ease, opacity 0.2s ease, margin-top 0.2s ease;
    max-height: 1200px;
    opacity: 1;
}

.inventory-results-wrap.is-collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.inventory-results__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #efe5c1;
    font-size: 12px;
}

.inventory-selection-summary {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 0;
    min-height: 72px;
    padding: 12px 14px;
    border: 1px solid rgba(92, 167, 255, 0.2);
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(92, 167, 255, 0.08), rgba(92, 167, 255, 0.03)),
        rgba(15, 27, 43, 0.7);
}

.inventory-grant-main .inventory-selection-summary {
    min-height: 86px;
    border-color: rgba(216, 169, 75, 0.22);
    background:
        linear-gradient(180deg, rgba(216, 169, 75, 0.1), rgba(216, 169, 75, 0.03)),
        rgba(18, 26, 40, 0.76);
}

.inventory-selection-summary__label {
    color: #8fbaf5;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.inventory-selection-summary__value {
    color: #f1f6ff;
    font-weight: 700;
    font-size: 14px;
}

.inventory-table--selectable tbody tr {
    cursor: pointer;
}

.card__title {
    margin: 0 0 16px;
    font-size: 21px;
}

.user-table .coin-icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.user-table .status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(92, 167, 255, 0.1);
    color: #d5e8ff;
    font-size: 11px;
    font-weight: 700;
}

.user-table .status-pill--low {
    background: rgba(207, 93, 93, 0.12);
    color: #ffc3c3;
}

.user-table .login-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-table .inspect-toggle {
    display: inline-flex;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.user-table .inspect-toggle img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.user-table__meta {
    color: var(--muted);
    font-size: 11px;
}

.role-tools {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: 10px;
}

.muted {
    color: var(--muted);
}


.modal-overlay[hidden] {
    display: none;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(4, 8, 16, 0.78);
    backdrop-filter: blur(4px);
}

.modal-card {
    position: relative;
    width: min(100%, 500px);
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
        rgba(13, 19, 29, 0.96);
    box-shadow: var(--shadow);
}

.modal-card--wide {
    width: min(100%, 1080px);
    max-height: calc(100vh - 48px);
    overflow: auto;
}

.modal-card h2 {
    margin-bottom: 18px;
    font-size: 16px;
}

.modal-form {
    display: flex;
    flex-direction: column;
}

.modal-role-id {
    color: #ff6a6a;
}

.modal-role-name {
    color: #8abfff;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 999px;
}

@media (max-width: 1180px) {
    .search-grid {
        grid-template-columns: 1fr;
    }

    .shell {
        grid-template-columns: 260px minmax(0, 1fr);
    }

    .toolbar-search {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .toolbar-search__row--character,
    .toolbar-search__row--accounts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .inventory-grant-layout {
        grid-template-columns: 1fr;
    }

    .inventory-grant-main {
        position: static;
    }

    .inventory-grant-filters,
    .inventory-grant-form {
        grid-template-columns: 1fr 1fr;
    }

    .inventory-search-card__row {
        grid-template-columns: 1fr 1fr;
    }

    .inventory-selection-grid {
        grid-template-columns: 1fr;
    }

    .referral-admin-row {
        grid-template-columns: 1fr;
    }

    .referral-admin-summary {
        grid-template-columns: 1fr;
    }

    .referral-admin-fields--compact {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .inventory-grant-form .field:nth-child(6) {
        grid-row: auto;
    }
}

@media (max-width: 980px) {
    .shell {
        grid-template-columns: 1fr;
    }

    .topbar__inner {
        align-items: flex-start;
        flex-direction: column;
        padding: 12px 14px;
    }

    .content {
        min-width: 0;
    }

    .sidebar {
        order: 2;
    }

    .page {
        order: 1;
    }

    .search-card__row {
        grid-template-columns: 1fr;
    }

    .toolbar-search {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .toolbar-search__row--character,
    .toolbar-search__row--accounts {
        grid-template-columns: 1fr;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .detail-summary {
        grid-template-columns: 1fr 1fr;
    }

    .inventory-grant-filters,
    .inventory-grant-form {
        grid-template-columns: 1fr;
    }

    .inventory-search-card__row {
        grid-template-columns: 1fr;
    }

    .referral-admin-fields--compact {
        grid-template-columns: 1fr 1fr;
    }

    .inventory-lookup-card__header {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 720px) {
    .shell {
        padding: 12px;
        gap: 14px;
    }

    .topbar__inner {
        gap: 14px;
    }

    .topbar__brand {
        width: 100%;
        justify-content: space-between;
    }

    .topbar__actions {
        width: 100%;
        gap: 8px;
    }

    .topbar__chip,
    .topbar__badge {
        min-height: 30px;
        padding: 0 10px;
    }

    .toolbar-search {
        grid-template-columns: 1fr;
    }

    .brand--sidebar,
    .nav-section,
    .meta-card,
    .card,
    fieldset,
    .page-header {
        border-radius: 12px;
    }

    .page-header,
    .card,
    fieldset {
        padding: 14px;
    }

    .detail-summary {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .inline-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .modal-card {
        width: 100%;
        padding: 18px;
        border-radius: 14px;
    }

    .settings-tabs {
        gap: 6px;
    }

    .settings-tabs__tab {
        flex: 1 1 calc(50% - 6px);
        border-radius: 10px;
    }

    .referral-admin-fields--compact {
        grid-template-columns: 1fr;
    }

    textarea {
        min-height: 320px;
    }
}

@media (max-width: 520px) {
    body {
        font-size: 12px;
    }

    .topbar__brand {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .topbar__logo {
        height: 36px;
    }

    .topbar__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .topbar__chip,
    .topbar__badge {
        justify-content: center;
        width: 100%;
    }

    .page-header h1,
    h2 {
        font-size: 16px;
    }

    .stat__value {
        font-size: 20px;
    }
}

.promo-layout {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
}

.promo-form-card {
    padding-top: 16px;
}

.promo-config-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: rgba(12, 18, 29, 0.82);
    border-radius: 14px;
    overflow: hidden;
}

.promo-config-table th,
.promo-config-table td {
    padding: 12px 14px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.promo-config-table tbody tr:last-child th,
.promo-config-table tbody tr:last-child td {
    border-bottom: 0;
}

.promo-config-table th {
    width: 190px;
    color: #f4f6fd;
    font-size: 16px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.03);
}

.promo-config-table td:nth-child(2) {
    width: 300px;
    background: rgba(255, 255, 255, 0.01);
}

.promo-config-table td:last-child {
    color: #ffd8df;
    font-size: 12px;
    line-height: 1.55;
    background: rgba(255, 255, 255, 0.015);
}

.promo-config-table input[type="text"],
.promo-config-table input[type="number"],
.promo-config-table textarea,
.promo-config-table select {
    border-color: rgba(123, 150, 196, 0.28);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(9, 14, 23, 0.98), rgba(7, 11, 18, 0.98));
    color: #f5f8ff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), inset 0 0 0 1px rgba(255, 255, 255, 0.015);
}

.promo-config-table textarea {
    min-height: 90px;
}

.promo-actions-row {
    justify-content: center;
    margin-top: 18px;
}

.promo-maintenance-card {
    margin-top: 18px;
}

.promo-maintenance-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.promo-form-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.promo-form-grid__wide {
    grid-column: 1 / -1;
}

.promo-checkbox {
    margin-top: 22px;
}

.promo-list-toolbar {
    display: grid;
    gap: 16px;
    margin-bottom: 18px;
}

.promo-filter-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: end;
}

.promo-table code {
    color: #f7d68f;
    font-size: 12px;
    letter-spacing: 0.06em;
}

.promo-table td {
    vertical-align: middle;
}

.promo-table th:nth-child(10),
.promo-table td:nth-child(10) {
    width: 220px;
    max-width: 220px;
}

.promo-table td:nth-child(10) {
    white-space: normal;
    word-break: break-word;
    line-height: 1.45;
}

.promo-item-cell {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.promo-item-cell__icon,
.promo-item-input__icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    object-fit: contain;
    flex: 0 0 30px;
}

.promo-item-cell__placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    flex: 0 0 30px;
}

.promo-item-input {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.promo-item-input input {
    flex: 1 1 auto;
}

.promo-item-preview {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    color: #c6d7ff;
    font-size: 13px;
}

.promo-builder-row.is-collapsed {
    display: none;
}

.promo-builder-slot {
    display: grid;
    gap: 12px;
}

.promo-builder-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.promo-builder-actions .is-hidden {
    display: none;
}

.promo-builder-panel {
    padding: 14px;
    border: 1px solid rgba(92, 167, 255, 0.14);
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(92, 167, 255, 0.05), rgba(92, 167, 255, 0.015)),
        rgba(9, 14, 23, 0.5);
}

.promo-builder-panel.is-active {
    border-color: rgba(216, 169, 75, 0.3);
    box-shadow: 0 0 0 1px rgba(216, 169, 75, 0.12);
}

.promo-builder-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.promo-builder-grid__wide {
    grid-column: 1 / -1;
}

.promo-builder-grid .field {
    margin-bottom: 0;
}

.promo-builder-grid .field span {
    display: block;
    margin-bottom: 6px;
    color: #eef2fb;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.promo-extra-list {
    display: grid;
    gap: 12px;
}

.promo-extra-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01)),
        rgba(11, 17, 27, 0.86);
    overflow: hidden;
}

.promo-extra-card.is-active {
    border-color: rgba(216, 169, 75, 0.28);
    box-shadow:
        0 0 0 1px rgba(216, 169, 75, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.promo-extra-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
}

.promo-extra-card__title {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.promo-extra-card__eyebrow {
    color: #8fbaf5;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.promo-extra-card__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.promo-extra-card__panel {
    padding: 0 14px 14px;
}

.promo-extra-card__panel.is-collapsed {
    display: none;
}

.promo-item-preview--card {
    min-height: 28px;
}

.promo-management-split {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.9fr);
    gap: 18px;
    margin-top: 18px;
}

.promo-lookup-card {
    align-self: start;
}

.promo-item-results-table td:last-child,
.promo-item-results-table th:last-child {
    width: 70px;
    text-align: center;
}

.promo-item-results-table .js-promo-item-row {
    cursor: pointer;
}

.promo-item-results-table .js-promo-item-row:hover {
    background: rgba(58, 103, 176, 0.15);
}

.promo-row--used td {
    background: rgba(75, 179, 110, 0.08);
}

.promo-row--expired td {
    background: rgba(207, 93, 93, 0.08);
}

@media (max-width: 1180px) {
    .promo-layout,
    .promo-management-split,
    .promo-form-grid,
    .promo-filter-grid {
        grid-template-columns: 1fr 1fr;
    }

    .promo-maintenance-row {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 980px) {
    .promo-layout,
    .promo-management-split,
    .promo-form-grid,
    .promo-filter-grid {
        grid-template-columns: 1fr;
    }

    .promo-config-table,
    .promo-config-table tbody,
    .promo-config-table tr,
    .promo-config-table th,
    .promo-config-table td {
        display: block;
        width: 100%;
    }

    .promo-config-table th,
    .promo-config-table td {
        border-right: 0;
    }

    .promo-config-table th {
        padding-bottom: 6px;
    }

    .promo-config-table td {
        padding-top: 8px;
    }

    .promo-builder-grid {
        grid-template-columns: 1fr;
    }

    .promo-extra-card__header {
        align-items: stretch;
        flex-direction: column;
    }

    .promo-extra-card__actions,
    .promo-builder-actions {
        justify-content: stretch;
    }
}

.referral-cards {
    display: grid;
    gap: 18px;
}

.referral-card {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(91, 121, 176, 0.22);
    background: linear-gradient(180deg, rgba(25, 33, 47, 0.9), rgba(16, 22, 33, 0.96));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.referral-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.referral-card__header h3 {
    margin: 0 0 6px;
    color: #f4f7ff;
    font-size: 24px;
}

.referral-card__header p {
    margin: 0;
    color: #9bb4e6;
    font-size: 13px;
}

.referral-card__summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.referral-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(70, 94, 138, 0.2);
    color: #dce7ff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.referral-pill--bonus {
    background: rgba(195, 145, 54, 0.18);
    color: #ffd88a;
}

.referral-progress {
    display: grid;
    gap: 12px;
}

.referral-self-track {
    display: grid;
    gap: 14px;
}

.referral-track-grid {
    position: relative;
    display: grid;
    gap: 10px;
    align-items: start;
    min-width: 0;
    overflow-x: auto;
    padding: 14px 12px 10px;
}

.referral-track-grid__line {
    position: absolute;
    top: 22px;
    left: 20px;
    right: 20px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(49, 187, 255, 0.9), rgba(22, 137, 220, 0.92));
    box-shadow: 0 0 0 2px rgba(10, 24, 43, 0.65) inset;
}

.referral-track-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.referral-timeline__point {
    position: relative;
    display: flex;
    justify-content: center;
    width: 100%;
}

.referral-timeline__point::before {
    content: "";
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 4px solid #ffe600;
    background: #143b63;
    box-shadow: 0 0 0 3px rgba(7, 16, 29, 0.75);
}

.referral-timeline__point span {
    position: absolute;
    top: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 62px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(29, 43, 69, 0.96);
    color: #eef4ff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.referral-timeline__point.is-complete::before {
    background: #4fd17b;
    border-color: #dfff72;
}

.referral-timeline__point.is-complete span {
    color: #b9ffd0;
}

.referral-reward-card {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    min-height: 50px;
    padding: 8px 9px;
    border-radius: 12px;
    border: 2px solid rgba(197, 151, 70, 0.8);
    background: rgba(8, 14, 24, 0.68);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.referral-reward-card.is-complete {
    border-color: rgba(81, 177, 116, 0.95);
    box-shadow:
        0 0 0 1px rgba(81, 177, 116, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.referral-reward-card.is-pending {
    border-color: rgba(234, 200, 79, 0.95);
    box-shadow:
        0 0 0 1px rgba(234, 200, 79, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.referral-reward-card__body {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    min-width: 0;
}

.referral-progress__level {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(42, 59, 90, 0.32);
    color: #f3f6ff;
    font-weight: 800;
    font-size: 16px;
}

.referral-progress__reward {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.referral-progress__icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    flex: 0 0 24px;
}

.referral-progress__name {
    color: #f4f7ff;
    font-weight: 700;
    font-size: 10px;
    line-height: 1.2;
}

.referral-progress__meta {
    color: #9bb4e6;
    font-size: 9px;
    margin-top: 2px;
}

.referral-progress__state {
    text-align: right;
}

.referral-progress__state small {
    display: block;
    margin-top: 6px;
    color: #8ba2cf;
    font-size: 11px;
}

.referral-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 86px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.referral-state--done {
    background: rgba(67, 167, 100, 0.18);
    color: #8ff0ab;
}

.referral-state--todo {
    background: rgba(194, 141, 52, 0.18);
    color: #ffd789;
}

@media (max-width: 980px) {
    .referral-card__header {
        flex-direction: column;
    }

    .referral-card__summary {
        justify-content: flex-start;
    }

    .referral-track-grid {
        min-width: max-content;
    }
}

/* ── Disabled buttons ─────────────────────────────── */

input[readonly] {
    opacity: 0.7;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.02);
}

button:disabled,
button[disabled],
.button-link:disabled,
.button-link[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    filter: saturate(0.3);
    pointer-events: none;
}

/* ── Focus-visible (keyboard accessibility) ────────── */

:focus-visible {
    outline: 2px solid rgba(92, 167, 255, 0.7);
    outline-offset: 2px;
}

button:focus-visible,
.button-link:focus-visible {
    outline: 2px solid rgba(216, 169, 75, 0.8);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(216, 169, 75, 0.15);
}

/* ── Flash messages (promo, etc.) ──────────────────── */

.flash {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
}

.flash--success {
    border: 1px solid rgba(75, 179, 110, 0.35);
    background: rgba(75, 179, 110, 0.1);
    color: #8ae4a5;
}

.flash--error {
    border: 1px solid rgba(207, 93, 93, 0.35);
    background: rgba(207, 93, 93, 0.1);
    color: #f5a3a3;
}

.flash--warning {
    border: 1px solid rgba(216, 169, 75, 0.35);
    background: rgba(216, 169, 75, 0.1);
    color: #ffd889;
}

/* ── Utility ───────────────────────────────────────── */

.input--uppercase {
    text-transform: uppercase;
}

/* --- Password visibility toggle --- */
.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 44px;
}

.password-peek {
    position: absolute;
    right: 1px;
    top: 1px;
    bottom: 1px;
    width: 40px;
    border: 0;
    border-radius: 0 9px 9px 0;
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, background 0.15s ease;
    padding: 0;
}

.password-peek:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #f5f8ff;
}

.password-peek.is-visible {
    color: var(--accent);
    background: rgba(216, 169, 75, 0.08);
}

.password-peek::before {
    content: '';
    display: block;
    width: 18px;
    height: 18px;
    background: currentColor;
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}

.password-peek.is-visible::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E");
}

/* ── Password Vault ── */

.vault-search__row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.vault-search__row .field {
    flex: 1;
    max-width: 400px;
}

.vault-search__submit {
    flex: 0 0 auto !important;
}

.vault-result__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.vault-result__field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.vault-result__field--password {
    grid-column: 1 / -1;
    padding-top: 1rem;
    border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}

.vault-result__label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.vault-result__value {
    font-size: 1rem;
}

.vault-result__password {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.vault-result__password code {
    font-family: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    background: color-mix(in srgb, var(--panel) 80%, black);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: #ff6b6b;
    letter-spacing: 0.1em;
    user-select: all;
}

.vault-reveal-btn {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    background: color-mix(in srgb, var(--accent) 15%, transparent);
    color: var(--accent);
    border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.vault-reveal-btn:hover {
    background: color-mix(in srgb, var(--accent) 30%, transparent);
    color: #fff;
}

.vault-result__no-password {
    color: var(--muted);
    font-style: italic;
}

.vault-result__not-found {
    color: #ff6b6b;
    padding: 1rem 0;
}

.vault-log__admin,
.vault-log__target {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

/* ===== users page: pending-activation row — red border on login cell only ===== */
.user-row--pending td:nth-child(2) {
    box-shadow: inset 2px 0 0 rgba(207, 93, 93, 0.7);
}
.user-row__activate-form {
    display: inline-block;
    margin-top: 3px;
}
.user-row__activate-form .button-link--xs {
    padding: 1px 6px;
    font-size: 10px;
    line-height: 1.3;
    border-radius: 3px;
    letter-spacing: 0.02em;
    border-width: 1px;
}
.button-link--danger {
    background: transparent;
    color: #cf5d5d;
    border-color: rgba(207, 93, 93, 0.55);
}
.button-link--danger:hover {
    background: rgba(207, 93, 93, 0.18);
    color: #ff8585;
    border-color: rgba(207, 93, 93, 0.85);
}

/* ===== inventory grants: percentage-based responsive layout (mobile-friendly) ===== */
.inventory-grant-layout,
.inventory-grant-layout--split {
    display: grid !important;
    grid-template-columns: 62% 38% !important;
    gap: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}
.inventory-grant-main {
    position: static !important;
    min-width: 0;
    width: 100%;
}
.inventory-grant-tools {
    min-width: 0;
    width: 100%;
}
/* tablets / smaller laptops — stack to 1 column */
@media (max-width: 1500px) {
    .inventory-grant-layout,
    .inventory-grant-layout--split {
        grid-template-columns: 100% !important;
    }
}
/* mobiles — stack everything tighter */
@media (max-width: 720px) {
    .inventory-grant-layout,
    .inventory-grant-layout--split {
        gap: 12px !important;
    }
    .inventory-grant-form,
    .inventory-grant-filters {
        grid-template-columns: 100% !important;
    }
    .inventory-search-card__row {
        grid-template-columns: 100% !important;
    }
    .inventory-selection-grid {
        grid-template-columns: 100% !important;
    }
}

/* Stack other 2-col admin layouts at non-ultrawide widths */
@media (max-width: 1700px) {
    .role-editor-layout,
    .role-editor-grid,
    .account-inspector-layout,
    .promo-management-layout,
    .password-vault-layout {
        grid-template-columns: 100% !important;
    }
}

/* Universal: prevent grid children from pushing parent wider than container */
.card,
.inventory-grant-main,
.inventory-grant-tools,
.inventory-lookup-card {
    min-width: 0;
    box-sizing: border-box;
    max-width: 100%;
}

/* ===== mobile nav: hamburger + user-menu toggles, slide-in sidebar ===== */

.topbar__nav-toggle,
.topbar__user-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.028);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: #8a9bba;
    border-radius: 9px;
    cursor: pointer;
    padding: 8px;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.topbar__nav-toggle:hover,
.topbar__user-toggle:hover {
    background: rgba(212, 175, 55, 0.09);
    border-color: rgba(212, 175, 55, 0.35);
    color: #d4af37;
    transform: scale(1.04);
}

.topbar__nav-toggle {
    width: 40px;
    height: 40px;
    flex-direction: column;
    gap: 5px;
}
.topbar__nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: background 0.18s ease;
}
/* Animate hamburger → X when sidebar is open */
body.has-sidebar-open .topbar__nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
body.has-sidebar-open .topbar__nav-toggle span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
body.has-sidebar-open .topbar__nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}
.topbar__nav-toggle span {
    transform-origin: center;
    transition: transform 0.20s ease, opacity 0.15s ease, background 0.18s ease;
}

.topbar__user-toggle {
    width: 40px;
    height: 40px;
}
.topbar__user-toggle svg {
    width: 22px;
    height: 22px;
}

/* Admin indicator on the mobile user-toggle button */
.topbar__user-toggle-badge--admin {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dc5050, #b42222);
    border: 2px solid #0c101c;
    color: #fff;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 6px rgba(220, 80, 80, 0.45);
}

.sidebar__close {
    display: none;
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: var(--text, #eef3ff);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease;
}
.sidebar__close:hover {
    background: rgba(212, 175, 55, 0.10);
    border-color: rgba(212, 175, 55, 0.30);
}

.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(6, 9, 16, 0.75);
    backdrop-filter: blur(3px);
    z-index: 89;
    opacity: 0;
    transition: opacity 0.22s ease;
    pointer-events: none;
}

/* MOBILE BREAKPOINT — ≤860px: sticky topbar + collapsing actions + sidebar drawer */
@media (max-width: 860px) {
    .topbar {
        position: sticky;
        top: 0;
        z-index: 100;
        background:
            radial-gradient(ellipse 80% 100% at 50% 0%, rgba(212, 175, 55, 0.08) 0%, transparent 60%),
            rgba(9, 13, 20, 0.97);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid transparent;
        border-image: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.40), transparent) 1;
    }
    .topbar__nav-toggle,
    .topbar__user-toggle {
        display: inline-flex;
    }
    .topbar__brand-copy {
        display: none;
    }
    .topbar__inner {
        padding: 8px 14px;
        gap: 10px;
        min-height: 58px;
    }
    .topbar__brand {
        flex: 1;
        min-width: 0;
        gap: 8px;
    }

    /* User actions drawer — drops down from top-right */
    .topbar__actions {
        position: fixed;
        top: 66px;
        right: 10px;
        left: 10px;
        background:
            radial-gradient(ellipse 90% 60% at 50% 0%, rgba(212, 175, 55, 0.08) 0%, transparent 60%),
            linear-gradient(180deg, #141928 0%, #0e1320 100%);
        border: 1px solid rgba(212, 175, 55, 0.22);
        border-radius: 14px;
        box-shadow:
            0 0 0 1px rgba(212, 175, 55, 0.06),
            0 16px 48px rgba(0, 0, 0, 0.55),
            0 4px 16px rgba(0, 0, 0, 0.35);
        padding: 14px;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        z-index: 96;
        max-height: 78vh;
        overflow-y: auto;
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
        pointer-events: none;
        transition: opacity 0.20s ease, transform 0.20s ease;
        display: flex;
        visibility: hidden;
    }
    body.has-actions-open .topbar__actions {
        opacity: 1;
        transform: translateY(0) scale(1);
        pointer-events: auto;
        visibility: visible;
    }

    /* In the drawer: chips and forms go full width */
    .topbar__chip {
        width: 100%;
        justify-content: space-between;
        border-radius: 10px;
    }
    .topbar__chip--currency {
        padding: 10px 14px;
        min-height: 44px;
    }
    .topbar__locale-form {
        margin-right: 0;
        width: 100%;
    }
    .topbar__locale-label {
        border-radius: 10px 0 0 10px;
        flex-shrink: 0;
    }
    .topbar__locale-select {
        width: 100%;
        border-radius: 0 10px 10px 0;
    }
    .topbar__logout-form {
        width: 100%;
    }
    .topbar__logout {
        width: 100%;
        justify-content: center;
        border-radius: 10px;
        min-height: 42px;
        font-size: 13px;
    }
    .topbar__badge {
        justify-content: flex-start;
        padding: 4px 0;
    }

    /* Sidebar drawer — slides in from left */
    .shell--auth {
        grid-template-columns: 1fr !important;
    }
    .sidebar {
        position: fixed !important;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(82vw, 300px);
        height: 100vh;
        z-index: 90;
        transform: translateX(-100%);
        transition: transform 0.24s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        overflow-y: auto;
        box-shadow: 14px 0 50px rgba(0, 0, 0, 0.6);
    }
    .sidebar__close {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    body.has-sidebar-open .sidebar {
        transform: translateX(0);
    }
    body.has-sidebar-open .mobile-overlay,
    body.has-actions-open .mobile-overlay {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }
}

@media (max-width: 480px) {
    .topbar__brand-title {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .topbar__logo {
        max-height: 30px;
    }
    .topbar__inner {
        padding: 6px 10px;
    }
}

/* ===== /admin/payments: legacy donation row + badge ===== */
.payment-row--legacy td {
    background: linear-gradient(180deg, rgba(92, 167, 255, 0.04), rgba(92, 167, 255, 0.02));
}
.badge--legacy {
    background: rgba(92, 167, 255, 0.15);
    color: #5ca7ff;
    border: 1px solid rgba(92, 167, 255, 0.4);
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-left: 6px;
}

/* ===== /admin/payments/grant: 2-column layout (main form left, lookup sidebar right) ===== */
.grant-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}
.grant-layout__main {
    min-width: 0;
}
.grant-layout__sidebar {
    min-width: 0;
    position: sticky;
    top: 96px;
}
.grant-lookup-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}
.grant-lookup-fields .field {
    margin: 0;
}
.grant-lookup-btn {
    width: 100%;
    margin-top: 4px;
}
.grant-recipient-block {
    margin-top: 0;
}
@media (max-width: 1100px) {
    .grant-layout {
        grid-template-columns: 1fr;
    }
    .grant-layout__sidebar {
        position: static;
    }
}

/* ===== dark theme for native date / datetime inputs (override browser white bg) ===== */
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="month"],
input[type="week"] {
    background: rgba(15, 23, 36, 0.94) !important;
    color: var(--text, #eef3ff) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 10px 12px !important;
    border-radius: 6px !important;
    font-family: inherit !important;
    font-size: 14px !important;
    color-scheme: dark;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="time"]:focus,
input[type="month"]:focus,
input[type="week"]:focus {
    outline: none !important;
    border-color: rgba(216, 169, 75, 0.55) !important;
    box-shadow: 0 0 0 3px rgba(216, 169, 75, 0.12) !important;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="week"]::-webkit-calendar-picker-indicator {
    filter: invert(0.85) sepia(0.4) saturate(2) hue-rotate(15deg) brightness(1.05);
    opacity: 0.55;
    cursor: pointer;
    transition: opacity 0.15s ease;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}
input[type="date"]::-webkit-datetime-edit-text,
input[type="datetime-local"]::-webkit-datetime-edit-text {
    color: var(--muted, #95a6c5);
    padding: 0 2px;
}

/* ===== universal horizontal-scroll wrapper for admin tables (mobile + dev-tools friendly) ===== */
.table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.table-scroll .user-table,
.table-scroll table {
    min-width: 900px;
    max-width: none;
}
.table-scroll .cell-email,
.table-scroll .cell-login,
.table-scroll .cell-ip {
    white-space: nowrap;
}
/* Toolbar search filters: wrap on narrow viewports instead of being squashed */
.toolbar-search {
    flex-wrap: wrap;
}
.toolbar-search__row {
    flex-wrap: wrap;
}
@media (max-width: 1100px) {
    .toolbar-search,
    .toolbar-search__row {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}
@media (max-width: 720px) {
    .toolbar-search,
    .toolbar-search__row {
        grid-template-columns: 1fr !important;
    }
}
.inventory-lookup-card__header h2,
.inventory-lookup-card__header p {
    min-width: 0;
    word-break: break-word;
}
.inventory-lookup-card__header {
    flex-wrap: wrap;
    gap: 8px;
}

/* ===== SEO footer (multi-column responsive) — fantasy redesign ===== */

/* Decorative top ornament */
.site-footer__crest {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 24px;
    margin-bottom: -1px; /* sits flush against the footer body */
}
.site-footer__crest-line {
    flex: 1;
    max-width: 320px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(216, 169, 75, 0.45), transparent);
}
.site-footer__crest-icon {
    width: 48px;
    height: 24px;
    color: var(--accent);
    flex-shrink: 0;
    filter: drop-shadow(0 0 6px rgba(216, 169, 75, 0.35));
}

/* Footer shell */
.site-footer {
    margin-top: 64px;
    padding: 0 0 0;
    background:
        linear-gradient(180deg,
            rgba(216, 169, 75, 0.03) 0%,
            rgba(9, 13, 20, 0.0) 40%,
            rgba(0, 0, 0, 0.45) 100%),
        var(--bg);
    border-top: 1px solid rgba(216, 169, 75, 0.18);
    position: relative;
}

/* Subtle inner glow at the top edge */
.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(216, 169, 75, 0.55) 30%,
        rgba(92, 167, 255, 0.3) 50%,
        rgba(216, 169, 75, 0.55) 70%,
        transparent);
    pointer-events: none;
}

.site-footer__inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 36px 24px 20px;
}

/* ---- Brand row ---- */
.site-footer__brand {
    margin-bottom: 32px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(216, 169, 75, 0.1);
    position: relative;
}
.site-footer__brand-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}
.site-footer__logo {
    display: block;
    height: 48px;
    width: auto;
    object-fit: contain;
    filter:
        drop-shadow(0 0 12px rgba(216, 169, 75, 0.28))
        drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
    transition: filter 0.22s ease;
}
.site-footer__logo:hover {
    filter:
        drop-shadow(0 0 18px rgba(240, 198, 116, 0.42))
        drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
}
.site-footer__brand-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.site-footer__brand-name {
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 0.02em;
    background: linear-gradient(135deg, #e8c06a 0%, #d8a94b 50%, #b88930 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}
.site-footer__brand-sub {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
    font-weight: 500;
}
.site-footer__tagline {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    max-width: 580px;
    margin: 0 0 18px 0;
}

/* ---- Social buttons ---- */
.site-footer__socials {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.site-footer__social-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.15s ease;
    line-height: 1;
}
.site-footer__social-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.site-footer__social-btn--discord {
    background: rgba(88, 101, 242, 0.12);
    border-color: rgba(88, 101, 242, 0.3);
    color: #8ea0fa;
}
.site-footer__social-btn--discord:hover {
    background: rgba(88, 101, 242, 0.22);
    border-color: rgba(88, 101, 242, 0.55);
    color: #adb8ff;
    transform: translateY(-1px);
}
.site-footer__social-btn--telegram {
    background: rgba(38, 160, 218, 0.10);
    border-color: rgba(38, 160, 218, 0.28);
    color: #5bb8e8;
}
.site-footer__social-btn--telegram:hover {
    background: rgba(38, 160, 218, 0.20);
    border-color: rgba(38, 160, 218, 0.5);
    color: #82ccf2;
    transform: translateY(-1px);
}
.site-footer__social-btn--facebook {
    background: rgba(24, 119, 242, 0.12);
    border-color: rgba(24, 119, 242, 0.32);
    color: #6da5ee;
}
.site-footer__social-btn--facebook:hover {
    background: rgba(24, 119, 242, 0.22);
    border-color: rgba(24, 119, 242, 0.55);
    color: #99c0ff;
    transform: translateY(-1px);
}
.site-footer__social-btn--instagram {
    background: linear-gradient(135deg, rgba(245, 96, 64, 0.12), rgba(228, 64, 95, 0.12), rgba(189, 67, 144, 0.12));
    border-color: rgba(228, 64, 95, 0.34);
    color: #f17aa8;
}
.site-footer__social-btn--instagram:hover {
    background: linear-gradient(135deg, rgba(245, 96, 64, 0.24), rgba(228, 64, 95, 0.24), rgba(189, 67, 144, 0.24));
    border-color: rgba(228, 64, 95, 0.6);
    color: #ff9bc6;
    transform: translateY(-1px);
}

/* Toplists strip — "Vote for us on these MMO toplists" */
.site-footer__toplists {
    margin: 36px 0 28px;
    padding: 24px 28px;
    border-radius: 14px;
    background:
        radial-gradient(ellipse 120% 100% at 50% 0%, rgba(212, 175, 55, 0.06) 0%, transparent 70%),
        linear-gradient(180deg, rgba(20, 25, 40, 0.6) 0%, rgba(10, 14, 26, 0.7) 100%);
    border: 1px solid rgba(212, 175, 55, 0.18);
    text-align: center;
}
.site-footer__toplists-title {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #d8a94b;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.site-footer__toplists-intro {
    margin: 0 0 18px;
    font-size: 13px;
    color: #95a6c5;
    line-height: 1.55;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.site-footer__toplists-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.site-footer__toplist-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #cfd8e8;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
    white-space: nowrap;
}
.site-footer__toplist-pill:hover {
    color: #f0c674;
    background: rgba(212, 175, 55, 0.08);
    border-color: rgba(212, 175, 55, 0.42);
    transform: translateY(-1px);
}
@media (max-width: 599px) {
    .site-footer__toplists { padding: 18px 16px; margin: 24px 0 20px; }
    .site-footer__toplists-list { gap: 8px; }
    .site-footer__toplist-pill { padding: 6px 12px; font-size: 11px; }
}
.site-footer__social-btn--email {
    background: rgba(216, 169, 75, 0.08);
    border-color: rgba(216, 169, 75, 0.22);
    color: var(--accent);
}
.site-footer__social-btn--email:hover {
    background: rgba(216, 169, 75, 0.16);
    border-color: rgba(216, 169, 75, 0.45);
    color: #eac572;
    transform: translateY(-1px);
}

/* ---- 4-column grid ---- */
.site-footer__columns {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
    padding: 0 0 28px;
    border-bottom: 1px solid rgba(216, 169, 75, 0.1);
}
.site-footer__column {
    min-width: 0;
}

/* Heading with gem prefix */
.site-footer__heading {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin: 0 0 14px 0;
    font-weight: 700;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(216, 169, 75, 0.12);
}
.site-footer__heading-gem {
    font-size: 7px;
    opacity: 0.7;
    line-height: 1;
    margin-top: 1px;
}

.site-footer__column ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.site-footer__column li {
    position: relative;
}
.site-footer__column a {
    display: inline-flex;
    align-items: center;
    gap: 0;
    color: #b8c8e0;
    text-decoration: none;
    font-size: 13.5px;
    line-height: 1.5;
    padding: 2px 0;
    transition: color 0.15s ease, padding-left 0.15s ease;
}
.site-footer__column a::before {
    content: '';
    display: inline-block;
    width: 0;
    height: 1px;
    background: var(--accent);
    margin-right: 0;
    transition: width 0.15s ease, margin-right 0.15s ease;
    vertical-align: middle;
    flex-shrink: 0;
    align-self: center;
}
.site-footer__column a:hover {
    color: var(--accent);
    padding-left: 10px;
}
.site-footer__column a:hover::before {
    width: 6px;
    margin-right: 4px;
}

/* Social links in community column */
.site-footer__link--social {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}
.site-footer__link-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.75;
    transition: opacity 0.15s ease;
}
.site-footer__link--social:hover .site-footer__link-icon {
    opacity: 1;
}

/* ---- Bottom bar ---- */
.site-footer__bottom {
    padding-top: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.site-footer__contact {
    font-style: normal;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
}
.site-footer__bottom-icon {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    color: var(--accent);
    opacity: 0.65;
}
.site-footer__contact a {
    color: var(--accent-2);
    text-decoration: none;
    transition: color 0.15s ease;
}
.site-footer__contact a:hover {
    color: #82ccff;
}
.site-footer__copy {
    color: var(--muted);
    font-size: 12px;
    margin: 0;
}
.site-footer__build-note {
    color: rgba(149, 166, 197, 0.4);
    font-size: 11px;
    letter-spacing: 0.08em;
    margin: 0;
    text-transform: uppercase;
    display: flex;
    gap: 10px;
    align-items: center;
}
.site-footer__version {
    color: rgba(216, 169, 75, 0.7);
    font-weight: 600;
    background: rgba(216, 169, 75, 0.08);
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid rgba(216, 169, 75, 0.18);
    font-size: 10px;
    letter-spacing: 0.04em;
}

/* ---- Responsive ---- */
@media (max-width: 980px) {
    .site-footer__columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 32px;
    }
    .site-footer__tagline {
        max-width: 100%;
    }
}
@media (max-width: 640px) {
    .site-footer__brand-row {
        gap: 10px;
    }
    .site-footer__logo {
        height: 34px;
    }
    .site-footer__brand-name {
        font-size: 17px;
    }
}
@media (max-width: 560px) {
    .site-footer__columns {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .site-footer__bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .site-footer__build-note {
        display: none;
    }
    .site-footer__crest-line {
        max-width: 80px;
    }
}

/* ===== /donate page ===== */

/* ---- Hero header ---- */
.donate-hero {
    position: relative;
    text-align: center;
    padding: 28px 24px 24px;
    margin-bottom: 20px;
    border: 1px solid rgba(216, 169, 75, 0.18);
    border-radius: 18px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(216, 169, 75, 0.13) 0%, transparent 70%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
        rgba(12, 18, 29, 0.94);
    overflow: hidden;
}

.donate-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(216, 169, 75, 0.6) 40%,
        rgba(92, 167, 255, 0.35) 60%,
        rgba(216, 169, 75, 0.6) 80%,
        transparent);
    pointer-events: none;
}

.donate-hero__crest {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 14px;
}

.donate-hero__crest-line {
    flex: 1;
    max-width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(216, 169, 75, 0.5), transparent);
}

.donate-hero__crest-coin {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(216, 169, 75, 0.55));
}

.donate-hero__title {
    margin: 0 0 8px;
    font-size: 30px;
    font-weight: 900;
    letter-spacing: -0.01em;
    line-height: 1.1;
    background: linear-gradient(135deg, #f2d98c 0%, #d8a94b 45%, #f0c96e 75%, #b88930 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: donate-title-shimmer 4s linear infinite;
}

@keyframes donate-title-shimmer {
    0%   { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.donate-hero__sub {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

/* ---- Flash messages ---- */
.donate-flash {
    margin-bottom: 14px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
}

.donate-flash--info {
    border: 1px solid rgba(92, 167, 255, 0.35);
    background: rgba(92, 167, 255, 0.1);
    color: #9fd0ff;
}

.donate-flash--error {
    border: 1px solid rgba(207, 93, 93, 0.35);
    background: rgba(207, 93, 93, 0.1);
    color: #f5a3a3;
}

/* ---- Shared panel shell ---- */
.donate-panel {
    margin-bottom: 18px;
    padding: 22px 24px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
        rgba(14, 21, 34, 0.92);
    box-shadow: var(--shadow);
}

.donate-panel--bonus {
    border-color: rgba(216, 169, 75, 0.16);
    background:
        radial-gradient(circle at 100% 0%, rgba(216, 169, 75, 0.07) 0%, transparent 40%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
        rgba(14, 20, 32, 0.94);
}

/* ---- Bonus panel header ---- */
.donate-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.donate-panel__title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #efe5c1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.donate-bonus-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.donate-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.donate-badge--gold {
    border: 1px solid rgba(216, 169, 75, 0.45);
    background: rgba(216, 169, 75, 0.14);
    color: #ffd889;
}

.donate-badge--blue {
    border: 1px solid rgba(92, 167, 255, 0.38);
    background: rgba(92, 167, 255, 0.12);
    color: #9fd0ff;
}

.donate-badge--purple {
    border: 1px solid rgba(194, 120, 255, 0.38);
    background: rgba(194, 120, 255, 0.12);
    color: #dfb0ff;
}

/* ---- Tier progress bar ---- */
.donate-tier-progress {
    margin-bottom: 18px;
}

.donate-tier-progress__bar-wrap {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.donate-tier-progress__bar {
    height: 100%;
    min-width: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, #b88930, #f2d060, #e0aa45);
    box-shadow: 0 0 8px rgba(216, 169, 75, 0.55);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.donate-tier-progress__labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}

.donate-tier-progress__current {
    color: #d4c080;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.donate-tier-progress__next {
    color: var(--muted);
    text-align: right;
    font-size: 11px;
    line-height: 1.4;
}

.donate-tier-progress__max {
    color: #ffd889;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 0.05em;
    text-shadow: 0 0 12px rgba(216, 169, 75, 0.45);
}

/* ---- Tier table (collapsible details) ---- */
.donate-tier-details {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 14px;
}

.donate-tier-details__toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: color 0.15s ease;
}

.donate-tier-details__toggle::-webkit-details-marker { display: none; }
.donate-tier-details__toggle::marker { display: none; }

.donate-tier-details__toggle::before {
    content: '▶';
    font-size: 9px;
    transition: transform 0.2s ease;
    color: var(--accent);
}

.donate-tier-details[open] .donate-tier-details__toggle::before {
    transform: rotate(90deg);
}

.donate-tier-details__toggle:hover {
    color: #d4e0f5;
}

.donate-tier-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

.donate-tier-card {
    position: relative;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
        rgba(14, 21, 33, 0.9);
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.donate-tier-card--active {
    border-color: rgba(216, 169, 75, 0.5);
    background:
        linear-gradient(180deg, rgba(216, 169, 75, 0.1), rgba(216, 169, 75, 0.03)),
        rgba(18, 25, 38, 0.94);
    box-shadow:
        0 0 0 1px rgba(216, 169, 75, 0.18),
        0 0 16px rgba(216, 169, 75, 0.12);
}

.donate-tier-card__crown {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(180deg, #e0b045, #b88a28);
    color: #fff8e0;
    font-size: 10px;
    line-height: 20px;
    text-align: center;
    box-shadow: 0 0 8px rgba(216, 169, 75, 0.55);
}

.donate-tier-card__threshold {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.donate-tier-card__pct {
    display: block;
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, #f2d98c, #d8a94b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 3px;
}

.donate-tier-card--active .donate-tier-card__pct {
    text-shadow: none; /* clears if any inherited */
}

.donate-tier-card__label {
    display: block;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ---- Coin input ---- */
.donate-coins-field {
    margin-bottom: 18px;
}

.donate-coins-field__label {
    display: block;
    margin-bottom: 10px;
    color: #cfd9f0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.donate-coins-field__wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.donate-coins-field__icon {
    position: absolute;
    left: 16px;
    width: 28px;
    height: 28px;
    object-fit: contain;
    pointer-events: none;
    filter: drop-shadow(0 0 6px rgba(216, 169, 75, 0.4));
    z-index: 1;
}

.donate-coins-field__input {
    width: 100%;
    padding: 18px 20px 18px 56px;
    border: 1.5px solid rgba(216, 169, 75, 0.28);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(9, 14, 23, 0.97), rgba(7, 11, 18, 0.97));
    color: #f5e4a4;
    font-size: 26px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
    outline: none;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 0 0 1px rgba(255, 255, 255, 0.015);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    -moz-appearance: textfield;
}

.donate-coins-field__input::-webkit-inner-spin-button,
.donate-coins-field__input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.donate-coins-field__input::placeholder {
    color: rgba(216, 169, 75, 0.3);
    font-weight: 400;
}

.donate-coins-field__input:focus {
    border-color: rgba(216, 169, 75, 0.75);
    box-shadow:
        0 0 0 3px rgba(216, 169, 75, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.donate-coins-field__hint {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

/* ---- Live receipt preview ---- */
.donate-receipt {
    min-height: 60px;
    margin-bottom: 20px;
    padding: 16px 18px;
    border: 1px solid rgba(92, 167, 255, 0.18);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(92, 167, 255, 0.05), rgba(92, 167, 255, 0.01)),
        rgba(10, 16, 27, 0.9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.donate-receipt__loading {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
    padding: 8px 0;
}

.donate-receipt__error {
    margin: 0;
    color: #f5a3a3;
    font-size: 13px;
    text-align: center;
    padding: 8px 0;
}

.donate-receipt__dl {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 20px;
    margin: 0;
    align-items: baseline;
}

.donate-receipt__dt {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.04em;
}

.donate-receipt__dd {
    text-align: right;
    font-size: 13px;
    font-weight: 600;
    color: #d9e6ff;
    font-variant-numeric: tabular-nums;
}

.donate-receipt__dd--bonus {
    color: #a8e6b8;
}

.donate-receipt__dd--total {
    color: #ffd889;
    font-size: 17px;
    font-weight: 900;
}

.donate-receipt__dt--total {
    color: #e0d4a8;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.donate-receipt__dt--ref {
    color: #a8c8ff;
    font-size: 12px;
}

.donate-receipt__dd--ref {
    color: #a8c8ff;
}

.donate-receipt__meta {
    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
}

.donate-receipt__divider {
    grid-column: 1 / -1;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(216, 169, 75, 0.25) 30%,
        rgba(216, 169, 75, 0.25) 70%,
        transparent);
    margin: 4px 0;
}

/* ---- Provider card radio buttons ---- */
.donate-providers {
    border: 0;
    padding: 0;
    margin: 0 0 20px;
}

.donate-providers__legend {
    display: block;
    margin-bottom: 12px;
    color: #cfd9f0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.donate-providers__grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    margin-bottom: 10px;
}

.donate-provider-card {
    position: relative;
    cursor: pointer;
}

.donate-provider-card--disabled {
    cursor: default;
    opacity: 0.5;
}

.donate-provider-card__radio {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.donate-provider-card__inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1.5px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
        rgba(14, 21, 34, 0.88);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    min-height: 60px;
}

.donate-provider-card:not(.donate-provider-card--disabled):hover .donate-provider-card__inner {
    border-color: rgba(92, 167, 255, 0.3);
    background:
        linear-gradient(180deg, rgba(92, 167, 255, 0.07), rgba(92, 167, 255, 0.02)),
        rgba(14, 21, 34, 0.88);
    box-shadow: 0 0 0 1px rgba(92, 167, 255, 0.12);
}

.donate-provider-card__radio:checked + .donate-provider-card__inner {
    border-color: rgba(216, 169, 75, 0.6);
    background:
        linear-gradient(180deg, rgba(216, 169, 75, 0.1), rgba(216, 169, 75, 0.03)),
        rgba(14, 21, 34, 0.92);
    box-shadow:
        0 0 0 1px rgba(216, 169, 75, 0.2),
        0 0 12px rgba(216, 169, 75, 0.08);
}

.donate-provider-card__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 60px;
}

.donate-provider-card__svg {
    width: 60px;
    height: auto;
    color: var(--muted);
    opacity: 0.75;
    transition: color 0.18s ease, opacity 0.18s ease;
}

.donate-provider-card:not(.donate-provider-card--disabled):hover .donate-provider-card__svg,
.donate-provider-card__radio:checked + .donate-provider-card__inner .donate-provider-card__svg {
    color: #e0e8ff;
    opacity: 1;
}

.donate-provider-card__name-text {
    color: #c0cce6;
    font-size: 14px;
    font-weight: 700;
}

.donate-provider-card__label {
    flex: 1;
    font-size: 13px;
    color: #c0cce6;
    line-height: 1.3;
}

.donate-provider-card__unavail {
    display: block;
    font-size: 11px;
    font-style: normal;
    color: var(--muted);
    margin-top: 2px;
}

.donate-provider-card__check {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 1.5px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    margin-left: auto;
    transition: border-color 0.18s ease, background 0.18s ease;
    position: relative;
}

.donate-provider-card__radio:checked + .donate-provider-card__inner .donate-provider-card__check {
    border-color: var(--accent);
    background: var(--accent);
}

.donate-provider-card__radio:checked + .donate-provider-card__inner .donate-provider-card__check::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #18140e;
}

.donate-providers__note {
    display: block;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
    margin-top: 4px;
}

/* ---- Legal disclosures ---- */
.donate-legal {
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    margin-bottom: 16px;
}

.donate-legal__line {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.donate-legal__line + .donate-legal__line {
    margin-top: 8px;
}

/* ---- Checkboxes ---- */
.donate-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    cursor: pointer;
    min-height: 44px;
    padding: 4px 0;
}

.donate-check__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.donate-check__mark {
    flex-shrink: 0;
    margin-top: 1px;
    width: 18px;
    height: 18px;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.04);
    transition: border-color 0.15s ease, background 0.15s ease;
    position: relative;
}

.donate-check__input:checked + .donate-check__mark {
    border-color: var(--accent);
    background: rgba(216, 169, 75, 0.2);
}

.donate-check__input:checked + .donate-check__mark::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 9px;
    border: 2px solid var(--accent);
    border-top: 0;
    border-left: 0;
    transform: rotate(42deg);
}

.donate-check__input:focus-visible + .donate-check__mark {
    outline: 2px solid rgba(92, 167, 255, 0.7);
    outline-offset: 2px;
}

.donate-check__text {
    color: #c8d5ee;
    font-size: 13px;
    line-height: 1.5;
}

.donate-check__text a {
    color: #8cc3ff;
    text-decoration: underline;
    text-decoration-color: rgba(140, 195, 255, 0.4);
}

.donate-check__text a:hover {
    color: #b4d7ff;
    text-decoration-color: rgba(180, 215, 255, 0.7);
}

/* ---- Submit button ---- */
.donate-submit-row {
    margin-top: 20px;
    display: flex;
    justify-content: stretch;
}

.donate-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 54px;
    padding: 14px 28px;
    border: 1.5px solid rgba(216, 169, 75, 0.55);
    border-radius: 14px;
    background: linear-gradient(180deg, #e8b840, #c49222, #b48120);
    color: #18140e;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.03em;
    cursor: pointer;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.26),
        0 4px 20px rgba(216, 169, 75, 0.22);
    transition: filter 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.donate-submit-btn:hover {
    filter: brightness(1.08);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.26),
        0 6px 28px rgba(216, 169, 75, 0.35);
    transform: translateY(-1px);
}

.donate-submit-btn:active {
    transform: translateY(0);
    filter: brightness(0.97);
}

.donate-submit-btn:focus-visible {
    outline: 2px solid rgba(216, 169, 75, 0.8);
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(216, 169, 75, 0.15);
}

/* ---- EUR note ---- */
.donate-eur-note {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
    padding: 8px 0 4px;
}

/* ---- Mobile responsive ≤720px ---- */
@media (max-width: 720px) {
    .donate-hero {
        padding: 20px 16px 18px;
    }

    .donate-hero__title {
        font-size: 24px;
    }

    .donate-hero__crest-line {
        max-width: 80px;
    }

    .donate-panel {
        padding: 16px;
    }

    .donate-panel__head {
        flex-direction: column;
        align-items: flex-start;
    }

    .donate-tier-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }

    .donate-coins-field__input {
        font-size: 22px;
        padding: 14px 16px 14px 50px;
    }

    .donate-providers__grid {
        grid-template-columns: 1fr;
    }

    .donate-provider-card__inner {
        min-height: 54px;
    }

    .donate-submit-btn {
        font-size: 15px;
        min-height: 50px;
    }
}

/* ===== end /donate page ===== */
