/* =========================================================================
   DigiBot - glassmorphism design system
   Palette taken from the logo: navy #0F2B5B / #14315F, gold #F5C518 / #E8B10C
   No build step. Edit this file directly.
   ========================================================================= */

:root {
    /* brand */
    --navy-950: #050f22;
    --navy-900: #08152e;
    --navy-800: #0b1e3d;
    --navy-700: #0f2b5b;
    --navy-600: #14315f;
    --navy-500: #1b3a6b;
    --navy-400: #2a4d85;

    --gold-500: #f5c518;
    --gold-600: #e8b10c;
    --gold-400: #ffd84d;

    --success: #22c55e;
    --success-soft: rgba(34, 197, 94, 0.15);
    --warning: #f59e0b;
    --warning-soft: rgba(245, 158, 11, 0.15);
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.15);
    --info: #38bdf8;
    --info-soft: rgba(56, 189, 248, 0.15);

    /* glass */
    --glass-bg: rgba(255, 255, 255, 0.055);
    --glass-bg-strong: rgba(255, 255, 255, 0.085);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-border-strong: rgba(255, 255, 255, 0.2);
    --glass-blur: 18px;
    --glass-shadow: 0 8px 32px rgba(3, 10, 25, 0.38);
    --glass-shadow-lg: 0 20px 60px rgba(3, 10, 25, 0.5);

    /* text */
    --text: #eef3fb;
    --text-muted: #9fb0cb;
    --text-dim: #71839f;

    /* geometry */
    --radius: 18px;
    --radius-sm: 12px;
    --radius-lg: 26px;
    --radius-pill: 999px;

    --sidebar-w: 268px;
    --topbar-h: 68px;

    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--navy-900);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Ambient colour wash behind the frosted panels. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(60rem 60rem at 12% -10%, rgba(21, 63, 128, 0.55), transparent 60%),
        radial-gradient(45rem 45rem at 88% 8%, rgba(245, 197, 24, 0.14), transparent 55%),
        radial-gradient(50rem 50rem at 50% 108%, rgba(15, 43, 91, 0.75), transparent 60%),
        linear-gradient(170deg, var(--navy-950), var(--navy-900) 45%, var(--navy-800));
    background-attachment: fixed;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.4;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--gold-500);
    text-decoration: none;
    transition: color 0.18s var(--ease);
}

a:hover {
    color: var(--gold-400);
}

h1, h2, h3, h4, h5 {
    margin: 0 0 0.5rem;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }
h4 { font-size: 1.08rem; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

::selection {
    background: var(--gold-500);
    color: var(--navy-900);
}

/* ---------------------------------------------------------------- scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.03); }
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.24); }

/* =========================================================================
   Glass primitives
   ========================================================================= */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(140%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
}

.glass-strong {
    background: var(--glass-bg-strong);
    border-color: var(--glass-border-strong);
}

.card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(140%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    padding: 1.4rem;
    position: relative;
    overflow: hidden;
}

/* Subtle top highlight, the thing that sells the "glass" read. */
.card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.35),
        transparent
    );
}

.card-hover {
    transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease),
        border-color 0.28s var(--ease);
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--glass-shadow-lg);
    border-color: var(--glass-border-strong);
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.1rem;
}

.card-title {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.card-sub {
    margin: 0.15rem 0 0;
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* =========================================================================
   Layout
   ========================================================================= */
.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding-inline: 20px;
}

.container-wide { max-width: 1480px; }
.container-narrow { max-width: 760px; }

.section { padding-block: clamp(3rem, 7vw, 5.5rem); }

.grid { display: grid; gap: 1.1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-sidebar { grid-template-columns: minmax(0, 1fr) 340px; }

.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.items-center { align-items: center; }
.gap-sm { gap: 0.5rem; }
.gap { gap: 1rem; }
.wrap { flex-wrap: wrap; }

.stack > * + * { margin-top: 1.1rem; }
.stack-sm > * + * { margin-top: 0.6rem; }

/* =========================================================================
   Buttons
   ========================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.72rem 1.35rem;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 650;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.16s var(--ease), box-shadow 0.22s var(--ease),
        background 0.22s var(--ease), border-color 0.22s var(--ease), opacity 0.2s;
    text-decoration: none;
}

.btn:active { transform: translateY(1px); }

.btn:disabled,
.btn[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
    color: var(--navy-900);
    box-shadow: 0 8px 26px rgba(245, 197, 24, 0.3);
}

.btn-primary:hover:not(:disabled) {
    color: var(--navy-900);
    box-shadow: 0 12px 34px rgba(245, 197, 24, 0.42);
    transform: translateY(-2px);
}

.btn-glass {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: var(--glass-border-strong);
    color: var(--text);
}

.btn-glass:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.14);
    color: var(--text);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border-color: var(--glass-border-strong);
    color: var(--text);
}

.btn-outline:hover:not(:disabled) {
    border-color: var(--gold-500);
    color: var(--gold-500);
}

.btn-success { background: var(--success); color: #04210f; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { color: #fff; }

.btn-sm { padding: 0.48rem 0.9rem; font-size: 0.8rem; }
.btn-xs { padding: 0.36rem 0.7rem; font-size: 0.74rem; }
.btn-lg { padding: 0.95rem 2rem; font-size: 1rem; }
.btn-block { display: flex; width: 100%; }

.btn-icon {
    padding: 0.55rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
}

/* =========================================================================
   Forms
   ========================================================================= */
.field { margin-bottom: 1.05rem; }

.label {
    display: block;
    margin-bottom: 0.42rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}

.input,
.select,
.textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease),
        background 0.2s var(--ease);
}

.input::placeholder,
.textarea::placeholder { color: var(--text-dim); }

.input:focus,
.select:focus,
.textarea:focus {
    outline: none;
    border-color: var(--gold-500);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(245, 197, 24, 0.16);
}

.input:disabled,
.select:disabled { opacity: 0.55; cursor: not-allowed; }

.textarea { min-height: 128px; resize: vertical; }

.select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239fb0cb' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.95rem center;
    padding-right: 2.5rem;
}

.select option {
    background: var(--navy-800);
    color: var(--text);
}

/* Amount field with a currency prefix. */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group .input { padding-left: 2.4rem; }

.input-prefix {
    position: absolute;
    left: 1rem;
    font-weight: 700;
    color: var(--gold-500);
    pointer-events: none;
}

.input-suffix {
    position: absolute;
    right: 0.6rem;
    display: flex;
    gap: 0.3rem;
}

/* Password field with a show/hide eye. */
.password-field {
    position: relative;
    display: flex;
    align-items: center;
}

.password-field .input { padding-right: 3rem; }

.password-toggle {
    position: absolute;
    right: 0.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    color: var(--text-dim);
    background: none;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.password-toggle:hover {
    color: var(--gold-500);
    background: rgba(255, 255, 255, 0.06);
}

.password-toggle:focus-visible {
    outline: none;
    color: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(245, 197, 24, 0.16);
}

.password-toggle svg {
    display: block;
    width: 19px;
    height: 19px;
}

/* Swap the eye for the struck-through one once the password is on screen. */
.password-toggle .icon-eye-off { display: none; }
.password-toggle[aria-pressed="true"] .icon-eye { display: none; }
.password-toggle[aria-pressed="true"] .icon-eye-off { display: block; }

.hint {
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: var(--text-dim);
}

.error-text {
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: #fca5a5;
}

.input.is-invalid { border-color: var(--danger); }

/* Checkbox / radio */
.check {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.check input[type="checkbox"],
.check input[type="radio"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--gold-500);
    cursor: pointer;
}

/* Segmented method picker */
.segmented {
    display: grid;
    gap: 0.6rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.segmented input { position: absolute; opacity: 0; pointer-events: none; }

.segmented label {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.segmented label strong { font-size: 0.9rem; }
.segmented label span { font-size: 0.75rem; color: var(--text-dim); }

.segmented input:checked + label {
    border-color: var(--gold-500);
    background: rgba(245, 197, 24, 0.1);
    box-shadow: 0 0 0 3px rgba(245, 197, 24, 0.12);
}

.segmented label:hover { border-color: var(--glass-border-strong); }

/* =========================================================================
   Badges, pills, chips
   ========================================================================= */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.7rem;
    border-radius: var(--radius-pill);
    font-size: 0.73rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.badge-success { background: var(--success-soft); color: #86efac; }
.badge-warning { background: var(--warning-soft); color: #fcd34d; }
.badge-danger { background: var(--danger-soft); color: #fca5a5; }
.badge-info { background: var(--info-soft); color: #7dd3fc; }
.badge-muted { background: rgba(255, 255, 255, 0.08); color: var(--text-muted); }
.badge-gold { background: rgba(245, 197, 24, 0.16); color: var(--gold-400); }

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.dot-live {
    background: var(--success);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
    70% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* =========================================================================
   Stat tiles
   ========================================================================= */
.stat {
    position: relative;
    padding: 1.25rem;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    overflow: hidden;
}

.stat::after {
    content: "";
    position: absolute;
    top: -40%;
    right: -20%;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 197, 24, 0.13), transparent 70%);
    pointer-events: none;
}

.stat-label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.stat-value {
    margin-top: 0.5rem;
    font-size: clamp(1.45rem, 3vw, 1.95rem);
    font-weight: 750;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.stat-value.gold { color: var(--gold-500); }
.stat-value.green { color: #4ade80; }

.stat-meta {
    margin-top: 0.3rem;
    font-size: 0.79rem;
    color: var(--text-dim);
}

.stat-icon {
    position: absolute;
    top: 1.1rem;
    right: 1.1rem;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(245, 197, 24, 0.14);
    color: var(--gold-500);
    font-size: 1.05rem;
}

/* =========================================================================
   Activity crawler (the scrolling ticker)
   ========================================================================= */
.ticker {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.55rem 0;
    background: rgba(255, 255, 255, 0.045);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-block: 1px solid var(--glass-border);
    overflow: hidden;
}

.ticker-label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
    padding: 0.32rem 0.85rem;
    margin-left: 14px;
    background: rgba(34, 197, 94, 0.14);
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 700;
    color: #86efac;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    z-index: 2;
}

.ticker-viewport {
    flex: 1;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 5%, #000 92%, transparent);
}

.ticker-track {
    display: flex;
    align-items: center;
    gap: 2.4rem;
    width: max-content;
    animation: ticker-scroll var(--ticker-speed, 45s) linear infinite;
}

.ticker:hover .ticker-track { animation-play-state: paused; }

.ticker-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.ticker-item b {
    color: var(--text);
    font-weight: 650;
}

.ticker-item .amt {
    color: var(--gold-500);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.ticker-item .ago {
    font-size: 0.74rem;
    color: var(--text-dim);
}

@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .ticker-track { animation: none; }
    .ticker-viewport { overflow-x: auto; }
}

/* Vertical feed variant used inside the dashboard */
.feed-list { display: grid; gap: 0.55rem; }

.feed-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 0.75rem;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.feed-item .emoji { font-size: 1rem; }

/* =========================================================================
   Tables
   ========================================================================= */
.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.87rem;
    min-width: 560px;
}

.table th {
    padding: 0.7rem 0.85rem;
    text-align: left;
    font-size: 0.73rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--glass-border);
    white-space: nowrap;
}

.table td {
    padding: 0.8rem 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
    vertical-align: middle;
}

.table tbody tr {
    transition: background 0.18s var(--ease);
}

.table tbody tr:hover { background: rgba(255, 255, 255, 0.035); }
.table tbody tr:last-child td { border-bottom: none; }

.table .num {
    font-variant-numeric: tabular-nums;
    font-weight: 650;
    white-space: nowrap;
}

.num-pos { color: #4ade80; }
.num-neg { color: #fca5a5; }

.table .mono {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.8rem;
}

.empty {
    padding: 2.6rem 1rem;
    text-align: center;
    color: var(--text-dim);
}

.empty-icon { font-size: 2.2rem; margin-bottom: 0.5rem; opacity: 0.55; }

/* =========================================================================
   Alerts
   ========================================================================= */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.9rem 1.1rem;
    border: 1px solid var(--glass-border);
    border-left-width: 3px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.alert-success { background: var(--success-soft); border-left-color: var(--success); color: #bbf7d0; }
.alert-warning { background: var(--warning-soft); border-left-color: var(--warning); color: #fde68a; }
.alert-danger { background: var(--danger-soft); border-left-color: var(--danger); color: #fecaca; }
.alert-info { background: var(--info-soft); border-left-color: var(--info); color: #bae6fd; }

.alert ul { margin: 0.35rem 0 0; padding-left: 1.1rem; }

/* =========================================================================
   Progress + countdown
   ========================================================================= */
.progress {
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: var(--radius-pill);
    background: linear-gradient(90deg, var(--gold-600), var(--gold-400));
    transition: width 0.6s var(--ease);
}

.progress-bar.green { background: linear-gradient(90deg, #16a34a, #4ade80); }

.countdown {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.countdown-unit {
    min-width: 62px;
    padding: 0.65rem 0.4rem;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    text-align: center;
}

.countdown-num {
    display: block;
    font-size: 1.5rem;
    font-weight: 750;
    color: var(--gold-500);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.countdown-label {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.66rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* =========================================================================
   Plan / bot cards
   ========================================================================= */
.plan-grid {
    display: grid;
    gap: 1.2rem;
    grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
}

.plan {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.6rem 1.4rem;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(140%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
        border-color 0.3s var(--ease);
}

.plan:hover {
    transform: translateY(-6px);
    box-shadow: var(--glass-shadow-lg);
    border-color: var(--glass-border-strong);
}

/* Accent glow driven by each plan's colour. */
.plan::before {
    content: "";
    position: absolute;
    top: -60px;
    right: -60px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--plan-accent, var(--gold-500)), transparent 70%);
    opacity: 0.22;
    pointer-events: none;
}

.plan-badge {
    position: absolute;
    top: 1.1rem;
    right: 1.1rem;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.plan-icon {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    margin-bottom: 0.9rem;
    border-radius: 15px;
    background: color-mix(in srgb, var(--plan-accent, var(--gold-500)) 20%, transparent);
    font-size: 1.4rem;
}

.plan-name {
    margin: 0;
    font-size: 1.32rem;
    font-weight: 750;
    letter-spacing: -0.02em;
}

.plan-tagline {
    margin: 0.1rem 0 0.9rem;
    font-size: 0.83rem;
    color: var(--text-muted);
}

.plan-rate {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    margin-bottom: 0.15rem;
}

.plan-rate strong {
    font-size: 2.5rem;
    font-weight: 780;
    letter-spacing: -0.04em;
    color: var(--plan-accent, var(--gold-500));
    line-height: 1;
}

.plan-rate span { font-size: 0.86rem; color: var(--text-muted); }

.plan-range {
    margin-bottom: 1.1rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.88rem;
    color: var(--text-muted);
}

.plan-range b { color: var(--text); }

.plan-features {
    flex: 1;
    margin: 0 0 1.3rem;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.55rem;
}

.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.plan-features li::before {
    content: "";
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    border-radius: 50%;
    background: var(--plan-accent, var(--gold-500));
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 11px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 11px no-repeat;
}

/* =========================================================================
   App shell (member + admin)
   ========================================================================= */
.shell { display: flex; min-height: 100vh; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    padding: 1.1rem 0.9rem;
    background: rgba(8, 21, 46, 0.72);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border-right: 1px solid var(--glass-border);
    overflow-y: auto;
    transition: transform 0.3s var(--ease);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.4rem 0.6rem 1.1rem;
    margin-bottom: 0.7rem;
    border-bottom: 1px solid var(--glass-border);
}

.sidebar-brand img {
    width: 38px;
    height: 38px;
    flex: none;
    border-radius: 11px;
    object-fit: contain;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.sidebar-brand-text strong {
    display: block;
    font-size: 1.02rem;
    letter-spacing: -0.02em;
}

.sidebar-brand-text span {
    display: block;
    font-size: 0.68rem;
    color: var(--text-dim);
    letter-spacing: 0.04em;
}

.nav-group { margin-bottom: 1.1rem; }

.nav-group-title {
    padding: 0 0.65rem;
    margin-bottom: 0.4rem;
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.62rem 0.7rem;
    margin-bottom: 0.15rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.89rem;
    font-weight: 550;
    transition: all 0.18s var(--ease);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.nav-link.active {
    background: linear-gradient(
        90deg,
        rgba(245, 197, 24, 0.16),
        rgba(245, 197, 24, 0.03)
    );
    color: var(--gold-500);
    box-shadow: inset 2px 0 0 var(--gold-500);
}

.nav-link .ico { width: 18px; text-align: center; flex-shrink: 0; }

.nav-badge {
    margin-left: auto;
    padding: 0.1rem 0.42rem;
    border-radius: var(--radius-pill);
    background: var(--danger);
    font-size: 0.68rem;
    font-weight: 700;
    color: #fff;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 0.9rem;
    border-top: 1px solid var(--glass-border);
}

.main {
    flex: 1;
    min-width: 0;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 1rem;
    height: var(--topbar-h);
    padding-inline: 1.2rem;
    background: rgba(8, 21, 46, 0.7);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-bottom: 1px solid var(--glass-border);
}

.topbar h1 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-left: auto;
}

.balance-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.95rem;
    background: rgba(245, 197, 24, 0.12);
    border: 1px solid rgba(245, 197, 24, 0.28);
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--gold-500);
    font-variant-numeric: tabular-nums;
}

.avatar {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--navy-500), var(--navy-700));
    border: 1px solid var(--glass-border-strong);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--gold-500);
    overflow: hidden;
    flex-shrink: 0;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 62px; height: 62px; font-size: 1.25rem; }

.content { flex: 1; padding: 1.4rem 1.2rem 3rem; }

.page-head { margin-bottom: 1.4rem; }
.page-head p { margin: 0.25rem 0 0; color: var(--text-muted); font-size: 0.9rem; }

.menu-toggle { display: none; }

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(3, 10, 25, 0.65);
    backdrop-filter: blur(3px);
}

body.sidebar-open .sidebar-backdrop { display: block; }

/* =========================================================================
   Public header / footer
   ========================================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(8, 21, 46, 0.72);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-bottom: 1px solid var(--glass-border);
}

.site-header .container {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    height: 72px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 750;
    font-size: 1.12rem;
    color: var(--text);
    letter-spacing: -0.02em;
}

.brand:hover { color: var(--text); }
.brand img {
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 11px;
    object-fit: contain;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
}

.site-nav a {
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-pill);
    color: #fff;
    font-size: 0.89rem;
    font-weight: 550;
    transition: all 0.18s var(--ease);
}

.site-nav a:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.site-nav a.active { color: var(--gold-500); }

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    margin-left: auto;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 1.15rem;
    cursor: pointer;
}

.site-footer {
    margin-top: 3rem;
    padding-block: 3rem 1.6rem;
    background: rgba(5, 15, 34, 0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--glass-border);
}

.footer-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1.6fr repeat(3, 1fr);
    margin-bottom: 2rem;
}

.footer-col h5 {
    margin-bottom: 0.8rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
}

.footer-col a:not(.brand),
.footer-col p {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.87rem;
    color: var(--text-muted);
}

.footer-col a:not(.brand):hover { color: var(--gold-500); }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 1.4rem;
    border-top: 1px solid var(--glass-border);
    font-size: 0.82rem;
    color: var(--text-dim);
}

.social-row { display: flex; gap: 0.55rem; }

.social-btn {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    transition: all 0.2s var(--ease);
}

.social-btn svg { width: 17px; height: 17px; display: block; }

.social-btn:hover {
    background: rgba(245, 197, 24, 0.14);
    border-color: var(--gold-500);
    color: var(--gold-500);
    transform: translateY(-2px);
}

/* =========================================================================
   Hero
   ========================================================================= */
.hero { padding-block: clamp(3rem, 8vw, 6rem); }

.hero-grid {
    display: grid;
    gap: 3rem;
    grid-template-columns: 1.15fr 1fr;
    align-items: center;
}

.hero h1 { margin-bottom: 1rem; }

.hero h1 .accent {
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-lead {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 52ch;
    margin-bottom: 1.8rem;
}

.hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 2rem; }

.hero-stats {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    padding-top: 1.6rem;
    border-top: 1px solid var(--glass-border);
}

.hero-stat strong {
    display: block;
    font-size: 1.5rem;
    font-weight: 750;
    color: var(--gold-500);
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.hero-stat span { font-size: 0.79rem; color: var(--text-dim); }

.hero-visual { position: relative; }

.hero-card {
    padding: 1.5rem;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    border: 1px solid var(--glass-border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow-lg);
}

.float-anim { animation: floaty 6s ease-in-out infinite; }

@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

@media (prefers-reduced-motion: reduce) {
    .float-anim { animation: none; }
}

.section-head { text-align: center; max-width: 660px; margin: 0 auto 2.4rem; }
.section-head p { color: var(--text-muted); }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.32rem 0.9rem;
    margin-bottom: 0.9rem;
    background: rgba(245, 197, 24, 0.12);
    border: 1px solid rgba(245, 197, 24, 0.25);
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 650;
    color: var(--gold-500);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

/* Referral level cards */
.level-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.level-card {
    padding: 1.4rem;
    text-align: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

.level-medal { font-size: 1.9rem; margin-bottom: 0.4rem; }

.level-rate {
    font-size: 2.1rem;
    font-weight: 780;
    color: var(--gold-500);
    letter-spacing: -0.03em;
    line-height: 1;
}

.level-name {
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* =========================================================================
   Floating support buttons
   ========================================================================= */
.floaters {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 80;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.floater {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 1px solid var(--glass-border-strong);
    border-radius: 50%;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--glass-shadow);
    color: var(--text);
    font-size: 1.3rem;
    cursor: pointer;
    transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.floater svg { width: 24px; height: 24px; display: block; }

.floater:hover { transform: scale(1.08) translateY(-2px); box-shadow: var(--glass-shadow-lg); }

.floater-telegram { background: linear-gradient(135deg, #2aabee, #229ed9); color: #fff; border-color: transparent; }
.floater-support { background: linear-gradient(135deg, var(--gold-500), var(--gold-600)); color: var(--navy-900); border-color: transparent; }
.floater-whatsapp { background: linear-gradient(135deg, #25d366, #128c7e); color: #fff; border-color: transparent; }

.floater-tip {
    position: absolute;
    right: 62px;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.35rem 0.75rem;
    background: rgba(8, 21, 46, 0.95);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s var(--ease);
}

.floater-wrap { position: relative; display: flex; }
.floater-wrap:hover .floater-tip { opacity: 1; }

/* Support chat panel */
.chat-panel {
    position: fixed;
    right: 18px;
    bottom: 84px;
    z-index: 85;
    width: min(360px, calc(100vw - 36px));
    max-height: min(520px, calc(100vh - 140px));
    display: none;
    flex-direction: column;
    background: rgba(8, 21, 46, 0.92);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid var(--glass-border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow-lg);
    overflow: hidden;
}

.chat-panel.open { display: flex; }

.chat-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.95rem 1.1rem;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid var(--glass-border);
}

.chat-head strong { font-size: 0.95rem; }
.chat-head small { display: block; font-size: 0.74rem; color: #86efac; }

.chat-body { padding: 1.1rem; overflow-y: auto; }

.chat-close {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    line-height: 1;
}

/* =========================================================================
   Modal
   ========================================================================= */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(3, 10, 25, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.modal.open { display: flex; }

.modal-box {
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    padding: 1.6rem;
    background: rgba(11, 30, 61, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow-lg);
}

.modal-box.wide { max-width: 760px; }

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.modal-close:hover { color: var(--text); }

/* =========================================================================
   Tabs & pagination
   ========================================================================= */
.tabs {
    display: flex;
    gap: 0.35rem;
    padding: 0.3rem;
    margin-bottom: 1.2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-pill);
    overflow-x: auto;
}

.tab {
    flex-shrink: 0;
    padding: 0.5rem 1.05rem;
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    font-size: 0.86rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.18s var(--ease);
}

.tab:hover { color: var(--text); }

.tab.active {
    background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
    color: var(--navy-900);
}

.pagination {
    display: flex;
    gap: 0.3rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.3rem;
}

.pagination a,
.pagination span {
    display: grid;
    place-items: center;
    min-width: 36px;
    height: 36px;
    padding-inline: 0.55rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.83rem;
}

.pagination a:hover { border-color: var(--gold-500); color: var(--gold-500); }

.pagination .active span,
.pagination span[aria-current] {
    background: var(--gold-500);
    border-color: var(--gold-500);
    color: var(--navy-900);
    font-weight: 700;
}

.pagination .disabled span { opacity: 0.4; }

/* =========================================================================
   Misc utilities
   ========================================================================= */
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }
.text-gold { color: var(--gold-500); }
.text-green { color: #4ade80; }
.text-red { color: #fca5a5; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.76rem; }
.fw-700 { font-weight: 700; }
.mono {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.85rem;
}
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.w-100 { width: 100%; }
.hidden { display: none !important; }

.copy-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
}

.copy-row code {
    flex: 1;
    min-width: 0;
    font-size: 0.82rem;
    word-break: break-all;
    color: var(--text);
}

.divider {
    height: 1px;
    margin-block: 1.1rem;
    background: var(--glass-border);
}

.kv {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
    font-size: 0.88rem;
}

.kv:last-child { border-bottom: none; }
.kv dt { color: var(--text-muted); margin: 0; }
.kv dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.kv.total {
    margin-top: 0.3rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--glass-border-strong);
    border-bottom: none;
    font-size: 1rem;
}
.kv.total dd { color: var(--gold-500); font-size: 1.2rem; font-weight: 750; }

/* Chat bubbles for support threads */
.bubble {
    max-width: 78%;
    padding: 0.8rem 1rem;
    margin-bottom: 0.8rem;
    border-radius: var(--radius);
    font-size: 0.88rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
}

.bubble.mine {
    margin-left: auto;
    background: rgba(245, 197, 24, 0.12);
    border-color: rgba(245, 197, 24, 0.25);
}

.bubble-meta {
    margin-top: 0.4rem;
    font-size: 0.72rem;
    color: var(--text-dim);
}

/* =========================================================================
   Charts
   Series colours are their own tokens, not the brand gold. Brand gold sits at
   L 0.84 which is far too bright to use as a fill on this dark surface, so the
   chart uses a darker step. Checked the pair for colour blindness before
   settling on it.
   ========================================================================= */
:root {
    --series-1: #b08810; /* deposits / earnings */
    --series-2: #2563eb; /* withdrawals */
    --chart-grid: rgba(255, 255, 255, 0.07);
    --chart-ink: var(--text-dim);
}

.chart-figure { margin: 0; }

.chart-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.9rem;
}

.chart-total {
    font-size: 1.45rem;
    font-weight: 750;
    letter-spacing: -0.03em;
    line-height: 1;
}

.chart-total small {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.74rem;
    font-weight: 500;
    color: var(--text-dim);
    letter-spacing: 0;
}

/* plot ------------------------------------------------------------------ */
.chart {
    position: relative;
    display: flex;
    gap: 0.7rem;
}

/* y axis ticks sit outside the plot so gridlines can run full width */
.chart-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0;
    height: 150px;
    padding-bottom: 20px;
    font-size: 0.68rem;
    font-variant-numeric: tabular-nums;
    color: var(--chart-ink);
    text-align: right;
}

.chart-plot {
    position: relative;
    flex: 1;
    min-width: 0;
    height: 150px;
}

/* hairline, solid, recessive. never dashed */
.chart-grid {
    position: absolute;
    inset: 0 0 20px 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
}

.chart-grid span {
    display: block;
    height: 1px;
    background: var(--chart-grid);
}

.chart-cols {
    position: relative;
    display: flex;
    align-items: flex-end;
    height: 100%;
    gap: 0.25rem;
}

.chart-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    height: 100%;
    min-width: 0;
    cursor: default;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px; /* surface gap, not a border */
    width: 100%;
    height: calc(100% - 20px);
}

.chart-bar {
    flex: 1;
    max-width: 24px; /* never let a bar fill the whole slot */
    min-height: 2px;
    border-radius: 4px 4px 0 0; /* rounded at the data end, square on the baseline */
    background: var(--series-1);
    transition: height 0.45s var(--ease), filter 0.15s var(--ease);
}

.chart-bar.s2 { background: var(--series-2); }

.chart-col:hover .chart-bar { filter: brightness(1.25); }

.chart-label {
    margin-top: 6px;
    height: 14px;
    font-size: 0.66rem;
    color: var(--chart-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* only the peak gets a direct label, everything else lives in the tooltip */
.chart-peak {
    position: absolute;
    transform: translate(-50%, -100%);
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.68rem;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    color: var(--text);
    white-space: nowrap;
    pointer-events: none;
}

/* tooltip --------------------------------------------------------------- */
.chart-tip {
    position: fixed;
    z-index: 90;
    display: none;
    min-width: 128px;
    padding: 0.55rem 0.7rem;
    background: rgba(8, 21, 46, 0.97);
    border: 1px solid var(--glass-border-strong);
    border-radius: var(--radius-sm);
    box-shadow: var(--glass-shadow);
    font-size: 0.78rem;
    pointer-events: none;
}

.chart-tip.show { display: block; }

.chart-tip b {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.72rem;
    color: var(--text-dim);
    font-weight: 600;
}

.chart-tip .row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    font-variant-numeric: tabular-nums;
}

.chart-tip .row + .row { margin-top: 0.2rem; }
.chart-tip .key { display: flex; align-items: center; gap: 0.35rem; color: var(--text-muted); }
.chart-tip i { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }

/* legend ---------------------------------------------------------------- */
.legend {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.76rem;
    color: var(--text-muted);
}

.legend span { display: flex; align-items: center; gap: 0.4rem; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }

/* the numbers, for anyone who cannot read the bars ---------------------- */
.chart-data {
    margin-top: 0.9rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 0.7rem;
}

.chart-data summary {
    cursor: pointer;
    font-size: 0.76rem;
    color: var(--text-dim);
    list-style: none;
}

.chart-data summary::-webkit-details-marker { display: none; }
.chart-data summary:hover { color: var(--gold-500); }
.chart-data summary::before { content: "\25B8  "; }
.chart-data[open] summary::before { content: "\25BE  "; }
.chart-data .table-wrap { margin-top: 0.6rem; }

@media (max-width: 720px) {
    .chart-axis, .chart-plot { height: 130px; }
    .chart-label { font-size: 0.6rem; }
    .chart-bar { max-width: 16px; }
}

/* if hue is gone, fall back to a pattern */
@media (forced-colors: active) {
    .chart-bar { forced-color-adjust: none; background: ButtonText; }
    .chart-bar.s2 {
        background: repeating-linear-gradient(
            135deg, ButtonText 0 3px, Canvas 3px 6px
        );
    }
}

@media (prefers-reduced-motion: reduce) {
    .chart-bar { transition: none; }
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 1100px) {
    .grid-sidebar { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
    :root { --sidebar-w: 260px; }

    .sidebar { transform: translateX(-100%); }
    body.sidebar-open .sidebar { transform: translateX(0); }
    .main { margin-left: 0; }
    .menu-toggle {
        display: grid;
        place-items: center;
        width: 40px;
        height: 40px;
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        border-radius: var(--radius-sm);
        color: var(--text);
        font-size: 1.15rem;
        cursor: pointer;
    }

    .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
    .hero-visual { order: -1; }

    .site-nav {
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0.2rem;
        padding: 0.9rem 20px 1.2rem;
        background: rgba(8, 21, 46, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--glass-border);
        display: none;
    }

    .site-nav.open { display: flex; }
    .site-nav a { border-radius: var(--radius-sm); }
    .nav-toggle { display: grid; place-items: center; }
}

@media (max-width: 720px) {
    body { font-size: 14.5px; }

    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .content { padding: 1.1rem 0.9rem 2.5rem; }
    .container { padding-inline: 16px; }
    .card { padding: 1.1rem; }
    .plan { padding: 1.35rem 1.15rem; }

    .topbar { padding-inline: 0.9rem; gap: 0.6rem; }
    .topbar h1 { font-size: 0.98rem; }
    .balance-pill { padding: 0.4rem 0.7rem; font-size: 0.82rem; }

    .footer-grid { grid-template-columns: 1fr; gap: 1.4rem; }
    .footer-bottom { flex-direction: column; text-align: center; }

    .ticker-label { font-size: 0.66rem; padding: 0.26rem 0.65rem; }
    .ticker-item { font-size: 0.8rem; }

    .countdown-unit { min-width: 54px; padding: 0.5rem 0.3rem; }
    .countdown-num { font-size: 1.25rem; }

    .floaters { right: 12px; bottom: 12px; }
    .floater { width: 48px; height: 48px; font-size: 1.15rem; }

    .modal-box { padding: 1.2rem; }
    .bubble { max-width: 90%; }
    .hero-actions .btn { flex: 1; }
}

@media (max-width: 480px) {
    .grid-4 { grid-template-columns: 1fr; }
    .stat-value { font-size: 1.35rem; }
    .segmented { grid-template-columns: 1fr; }
    .table { min-width: 480px; }
}

/* Print: strip the glass so statements come out readable. */
@media print {
    body::before, body::after, .sidebar, .topbar, .floaters, .ticker, .site-footer { display: none !important; }
    .main { margin-left: 0; }
    body { background: #fff; color: #000; }
    .card, .glass { background: #fff; border: 1px solid #ccc; box-shadow: none; backdrop-filter: none; }
}

/* =========================================================================
   Built-in live chat (the floating support panel)
   ========================================================================= */
.chat-avatar {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
    font-size: 1.15rem;
}

.chat-head strong {
    display: block;
    font-size: 0.94rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* conversation --------------------------------------------------------- */
.chat-log {
    flex: 1;
    min-height: 190px;
    max-height: 330px;
    padding: 1rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chat-intro { margin-bottom: 0.2rem; }

.chat-msg {
    max-width: 82%;
    padding: 0.6rem 0.85rem;
    border-radius: 16px;
    font-size: 0.87rem;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    animation: chat-pop 0.22s var(--ease);
}

@keyframes chat-pop {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .chat-msg { animation: none; }
}

/* Visitor messages sit right, in gold. */
.chat-msg.mine {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
    color: var(--navy-900);
    border-bottom-right-radius: 5px;
    font-weight: 500;
}

/* Support replies sit left, in glass. */
.chat-msg.theirs {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--glass-border);
    border-bottom-left-radius: 5px;
}

.chat-msg .meta {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.68rem;
    opacity: 0.7;
}

.chat-msg.mine .meta { text-align: right; }

.chat-day {
    align-self: center;
    padding: 0.18rem 0.65rem;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.06);
    font-size: 0.7rem;
    color: var(--text-dim);
}

/* "Support is typing" style pending state */
.chat-msg.pending { opacity: 0.55; }

/* quick-start chips ----------------------------------------------------- */
.chat-suggest {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.chat-chip {
    padding: 0.36rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.18s var(--ease);
}

.chat-chip:hover {
    border-color: var(--gold-500);
    color: var(--gold-500);
    background: rgba(245, 197, 24, 0.09);
}

/* guest identity -------------------------------------------------------- */
.chat-identity {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    padding: 0.7rem 0.8rem 0;
    border-top: 1px solid var(--glass-border);
}

.chat-identity .input {
    padding: 0.5rem 0.7rem;
    font-size: 0.82rem;
}

/* composer -------------------------------------------------------------- */
.chat-composer {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    padding: 0.7rem 0.8rem 0.8rem;
    border-top: 1px solid var(--glass-border);
}

.chat-input {
    flex: 1;
    min-height: 40px;
    max-height: 110px;
    padding: 0.6rem 0.85rem;
    font-family: inherit;
    font-size: 0.87rem;
    line-height: 1.45;
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    resize: none;
    overflow-y: auto;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.chat-input::placeholder { color: var(--text-dim); }

.chat-input:focus {
    outline: none;
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(245, 197, 24, 0.14);
}

.chat-send {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
    color: var(--navy-900);
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.16s var(--ease), opacity 0.2s;
}

.chat-send:hover:not(:disabled) { transform: scale(1.07); }
.chat-send:disabled { opacity: 0.45; cursor: not-allowed; }

.chat-error {
    margin: 0;
    padding: 0 0.9rem 0.6rem;
    font-size: 0.76rem;
    color: #fca5a5;
}

/* footer links ---------------------------------------------------------- */
.chat-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 0.9rem;
    padding: 0.55rem 0.9rem 0.7rem;
    border-top: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.025);
}

.chat-foot a {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.chat-foot a:hover { color: var(--gold-500); }

/* unread badge on the bubble -------------------------------------------- */
.floater-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-pill);
    background: var(--danger);
    color: #fff;
    font-size: 0.67rem;
    font-weight: 700;
    border: 2px solid var(--navy-900);
}

.floater-support { position: relative; }

@media (max-width: 720px) {
    .chat-panel {
        right: 10px;
        left: 10px;
        bottom: 76px;
        width: auto;
        max-height: calc(100vh - 120px);
    }

    .chat-log { max-height: 46vh; }
    .chat-identity { grid-template-columns: 1fr; }
    .chat-msg { max-width: 88%; }
}

/* Contact-channel rows (Telegram / WhatsApp / email / phone lists). */
.link-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 0.87rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.18s var(--ease);
}

.link-row:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--gold-500);
    color: var(--text);
    transform: translateX(3px);
}

.link-row:last-child { margin-bottom: 0; }
.link-row .ico { font-size: 1.2rem; flex-shrink: 0; }
.link-row small { display: block; font-size: 0.74rem; color: var(--text-dim); }

/* Branding controls in the settings form. */
.brand-preview {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    flex-shrink: 0;
    padding: 6px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

.brand-preview img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }

.color-swatch {
    width: 48px;
    height: 42px;
    padding: 3px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

/* Role badges on the staff page. */
.role-matrix { font-size: 0.82rem; }
.role-matrix td, .role-matrix th { padding: 0.45rem 0.6rem; }
.role-yes { color: #4ade80; font-weight: 700; }
.role-no { color: var(--text-dim); }

/* ---------------------------------------------------------------------------
   Withdrawal confirmation code
   Big, spaced-out digits so a 6-digit code is easy to read back off an email
   and hard to fat-finger on a phone.
--------------------------------------------------------------------------- */
.code-input {
    font-family: "Courier New", Courier, monospace;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.55rem;
    text-align: center;
    padding-left: 0.55rem; /* balances the trailing letter-spacing */
}

.code-input::placeholder {
    letter-spacing: 0.55rem;
    font-weight: 400;
    opacity: 0.35;
}

/* Chrome puts spinners on numeric-looking fields. Not here. */
.code-input::-webkit-outer-spin-button,
.code-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

@media (max-width: 480px) {
    .code-input { font-size: 1.35rem; letter-spacing: 0.4rem; padding-left: 0.4rem; }
    .code-input::placeholder { letter-spacing: 0.4rem; }
}
