/* ==========================================================================
   Aureon Global: site styles
   Bright 3D app style: white rounded cards floating on soft off-white, glossy
   3D buttons and icon tiles.
   ========================================================================== */

/* Light theme by default. The head script sets data-theme="dark" before the page paints when the visitor chose
   dark with the switch; the dark values are further down. */
:root {
    color-scheme: light;

    /* Page background: a soft off-white, cooling slightly towards the bottom */
    --bg-top: #f8fafe;
    --bg: #f1f5fb;
    --bg-bottom: #ebf0f8;

    /* Brand */
    --blue: #1e5eff;
    --blue-600: #1449e0;
    --green: #2db34f;
    --green-600: #1f8f3c;

    /* Text and surfaces */
    --ink: #20232e;
    --body: #666d82;
    --on-bg: #525b74;
    --muted: #979db0;
    --card: #ffffff;
    --field: #f1f3f7;
    --line: #eceef4;

    /* Tags: pastel fills with readable text tones */
    --tint-blue: #eaf0ff;
    --tint-green: #e4f7ea;
    --tint-sky: #e2f2fd;
    --tint-peach: #fff0e8;
    --text-blue: #1449e0;
    --text-green: #1f7f37;
    --text-sky: #0f6fab;
    --text-peach: #b8511f;
    --danger-text: #b42318;
    --danger-bg: #fdecec;

    /* Surfaces that change with the theme */
    --glass: rgba(255, 255, 255, 0.9);
    --glass-strong: rgba(255, 255, 255, 0.96);
    --brand-ink: #0b2e6f;
    --brand-mark-bg: linear-gradient(180deg, #eaf4ff 0%, #d4e8fd 100%);
    --card-raised: linear-gradient(180deg, #fff 0%, #f8faff 100%);
    --soft-tile: linear-gradient(180deg, #eef6ff 0%, #e1effd 100%);
    --art-tile: linear-gradient(180deg, #dcefff 0%, #bcdcfb 100%);
    --count-bg: rgba(255, 255, 255, 0.7);

    --grad-blue: linear-gradient(180deg, #4d82ff 0%, #1e5eff 55%, #1a53ea 100%);
    --grad-green: linear-gradient(180deg, #5bd47a 0%, #2db34f 60%, #26a246 100%);

    /* Glossy 3D: light top edge + darker bottom lip */
    --glossy: inset 0 2px 0 rgba(255, 255, 255, 0.28), inset 0 -4px 0 rgba(0, 25, 110, 0.22);
    /* Kept tight and light: on the off-white page, wide shadows pile up into a grey haze behind card grids */
    --shadow-card: 0 10px 30px -14px rgba(16, 72, 160, 0.16), 0 2px 6px -2px rgba(16, 72, 160, 0.06);
    --shadow-soft: 0 8px 20px -12px rgba(16, 72, 160, 0.22);
    /* Slim scrollbars inside panels (admin sidebar menu, support chat) */
    --scroll-thumb: rgba(30, 94, 255, 0.22);
    --scroll-thumb-hover: rgba(30, 94, 255, 0.45);
    --shadow-chip: 0 12px 26px -12px rgba(20, 40, 90, 0.32), 0 2px 4px rgba(20, 40, 90, 0.05);

    --r-card: 40px;
    --r-lg: 30px;
    --r-md: 22px;
    --r-sm: 16px;

    --container: 1200px;
    --header-h: 100px;

    --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-head: "Urbanist", "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-brand: "Montserrat", var(--font);
}

/* Dark theme: deep navy page, slightly lighter cards; brand gradients, 3D icons and the blue cards stay as they are */
:root[data-theme="dark"] {
    color-scheme: dark;

    --bg-top: #0f1628;
    --bg: #0c1322;
    --bg-bottom: #0a101c;

    /* Lighter blues and green for text and links on dark surfaces */
    --blue: #6d98ff;
    --blue-600: #8aadff;
    --green-600: #4cc46c;

    --ink: #eef2fb;
    --body: #a7b1c8;
    --on-bg: #a3aec7;
    --muted: #7a869f;
    --card: #151d30;
    --field: #1d263b;
    --line: #263049;

    --tint-blue: rgba(91, 140, 255, 0.16);
    --tint-green: rgba(52, 199, 89, 0.15);
    --tint-sky: rgba(56, 176, 245, 0.15);
    --tint-peach: rgba(255, 145, 100, 0.15);
    --text-blue: #93b4ff;
    --text-green: #70dc8e;
    --text-sky: #7fcaf6;
    --text-peach: #ffb08c;
    --danger-text: #ff8f86;
    --danger-bg: rgba(239, 68, 68, 0.14);

    --glass: rgba(21, 29, 48, 0.88);
    --glass-strong: rgba(21, 29, 48, 0.95);
    --brand-ink: #eef2fb;
    /* The logo badge stays light so the emblem keeps its colours */
    --brand-mark-bg: linear-gradient(180deg, #eaf2ff 0%, #cfe0fa 100%);
    --card-raised: linear-gradient(180deg, #182136 0%, #141c2e 100%);
    --soft-tile: linear-gradient(180deg, #1b2743 0%, #17223a 100%);
    --art-tile: linear-gradient(180deg, #1d3056 0%, #172848 100%);
    --count-bg: rgba(255, 255, 255, 0.14);

    --shadow-card: 0 10px 30px -14px rgba(0, 0, 0, 0.6), 0 2px 6px -2px rgba(0, 0, 0, 0.35);
    --shadow-soft: 0 8px 20px -12px rgba(0, 0, 0, 0.65);
    --scroll-thumb: rgba(163, 174, 199, 0.22);
    --scroll-thumb-hover: rgba(163, 174, 199, 0.45);
    --shadow-chip: 0 12px 26px -12px rgba(0, 0, 0, 0.55), 0 2px 4px rgba(0, 0, 0, 0.2);
}

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

html {
    min-height: 100%;
    background-color: var(--bg-bottom);
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
}

/* The background covers at least the whole window, however short the page */
body {
    min-height: 100vh;
    margin: 0;
    font-family: var(--font);
    color: var(--on-bg);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    /* One flat gradient only: soft tinted glows band into a visible edge on 8-bit screens */
    background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg) 55%, var(--bg-bottom) 100%);
}

/* Decorative art can hang past the screen edges; clip sideways only (mobile browsers ignore
   body overflow-x). `clip` keeps vertical overflow visible; `hidden` is the fallback. */
main {
    overflow-x: hidden;
    overflow-x: clip;
}

[hidden] { display: none !important; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }

h1, h2, h3 {
    margin: 0;
    font-family: var(--font-head);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--ink);
}

h3 { font-weight: 700; }

.accent,
.text-grad { color: var(--blue); }

/* No grey/blue box when tapping or clicking buttons and links (mobile browsers and
   Chrome device mode draw a rectangle that ignores rounded shapes) */
html { -webkit-tap-highlight-color: transparent; }
button::-moz-focus-inner { border: 0; }

/* Focus ring only for keyboard navigation; it follows each element's rounded shape */
:focus { outline: none; }

:focus-visible {
    outline: 3px solid rgba(30, 94, 255, 0.45);
    outline-offset: 3px;
}

/* Content sits above decorative art */
.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 20px;
}

@media (min-width: 768px) {
    .container { padding-inline: 32px; }
}

/* Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 54px;
    padding: 0 26px;
    border: 0;
    border-radius: 18px;
    font: 700 1rem/1 var(--font);
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn svg { width: 20px; height: 20px; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }

.btn-primary {
    color: #fff;
    background: var(--grad-blue);
    box-shadow: var(--glossy), 0 14px 26px -12px rgba(30, 94, 255, 0.7);
}

.btn-primary:hover { filter: brightness(1.06); }

.btn-primary:active {
    box-shadow: inset 0 3px 6px rgba(0, 25, 110, 0.3), 0 6px 14px -8px rgba(30, 94, 255, 0.6);
}

.btn-ghost,
.btn-light {
    color: var(--ink);
    background: var(--card);
    box-shadow: inset 0 -3px 0 rgba(20, 40, 90, 0.07), 0 12px 24px -16px rgba(20, 40, 90, 0.4);
}

/* Dark theme: light buttons step up from the card they sit on, so their shape still shows */
:root[data-theme="dark"] .btn-light { background: var(--field); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.2); }

/* On the blue welcome bar and call-to-action card, light buttons stay white in both themes */
.welcome-bar .btn-light,
.footer-cta .btn-light,
:root[data-theme="dark"] .welcome-bar .btn-light,
:root[data-theme="dark"] .footer-cta .btn-light { background: #fff; color: #20232e; }

.btn-danger {
    color: #fff;
    background: linear-gradient(180deg, #ff6f6f 0%, #ef3b3b 55%, #db2f2f 100%);
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.28),
        inset 0 -4px 0 rgba(110, 0, 0, 0.22),
        0 12px 22px -12px rgba(239, 59, 59, 0.7);
}

.btn-danger:hover { filter: brightness(1.05); }
.btn-danger:active { box-shadow: inset 0 3px 6px rgba(110, 0, 0, 0.3), 0 6px 14px -8px rgba(239, 59, 59, 0.6); }

.btn-sm { height: 44px; padding: 0 18px; border-radius: 14px; font-size: 0.9rem; }
.btn-sm svg { width: 17px; height: 17px; }
.btn-lg { height: 60px; padding: 0 30px; border-radius: 20px; font-size: 1.05rem; }

/* Header: a floating pill bar with a segmented section nav
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    padding-top: 14px;
}

.header-bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 72px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--glass);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    backdrop-filter: blur(16px) saturate(160%);
    box-shadow: inset 0 -3px 0 rgba(20, 40, 90, 0.05), var(--shadow-soft);
    transition: height 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Condenses slightly once the page scrolls */
.site-header.is-scrolled .header-bar {
    height: 64px;
    background: var(--glass-strong);
    box-shadow: inset 0 -3px 0 rgba(20, 40, 90, 0.05), var(--shadow-card);
}

.brand {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 10px;
    padding-right: 6px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--brand-mark-bg);
    box-shadow: inset 0 -3px 0 rgba(30, 94, 255, 0.08);
    transition: width 0.3s ease, height 0.3s ease;
}

.brand-mark img { width: 36px; }

.is-scrolled .brand-mark { width: 46px; height: 46px; }

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
    font-family: var(--font-brand);
}

.brand-name {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--brand-ink);
}

.brand-sub {
    margin-top: 4px;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.46em;
    color: var(--green-600);
}

.nav {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 12px;
}

/* Segmented control: links sit on a light track; the section in view turns blue */
.nav-links {
    display: flex;
    gap: 4px;
    margin: 0 auto;
    padding: 5px;
    border-radius: 999px;
    background: var(--field);
    list-style: none;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--body);
    transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-links a:hover {
    color: var(--ink);
    background: var(--card);
    box-shadow: 0 4px 10px -6px rgba(20, 40, 90, 0.3);
}

.nav-links a.is-active {
    color: #fff;
    background: var(--grad-blue);
    box-shadow: var(--glossy), 0 8px 16px -8px rgba(30, 94, 255, 0.6);
}

.nav-icon,
.nav-chevron { display: none; }

.nav-actions {
    display: flex;
    flex: none;
    align-items: center;
    gap: 6px;
}

.nav-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ink);
    transition: background-color 0.2s ease;
}

.nav-login:hover { background: var(--field); }

.btn-pill { height: 52px; padding: 0 22px; border-radius: 999px; font-size: 0.95rem; }
.btn-pill svg { width: 18px; height: 18px; }

.is-scrolled .nav-actions .btn-pill { height: 46px; }

.nav-toggle { display: none; }

@media (max-width: 960px) {
    .header-bar { height: 64px; padding: 0 8px; }
    .brand-mark { width: 46px; height: 46px; }
    .brand-mark img { width: 32px; }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        margin-left: auto;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: var(--grad-blue);
        color: #fff;
        box-shadow: var(--glossy), 0 8px 16px -8px rgba(30, 94, 255, 0.6);
        cursor: pointer;
    }

    .nav-toggle svg { display: block; width: 22px; height: 22px; }
    .nav-toggle .icon-close,
    .nav-toggle[aria-expanded="true"] .icon-open { display: none; }
    .nav-toggle[aria-expanded="true"] .icon-close { display: block; }

    /* Menu opens as an app-style card under the bar */
    .nav {
        display: none;
        position: absolute;
        top: calc(100% + 12px);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 14px;
        border-radius: 32px;
        background: var(--card);
        box-shadow: var(--shadow-card);
    }

    .nav.is-open { display: flex; animation: menu-in 0.25s ease; }

    .nav-links {
        flex-direction: column;
        gap: 8px;
        margin: 0;
        padding: 0;
        background: none;
    }

    .nav-links a {
        gap: 14px;
        height: 62px;
        padding: 0 14px 0 9px;
        border-radius: 20px;
        background: var(--field);
        font-size: 1rem;
        color: var(--ink);
    }

    .nav-icon {
        display: inline-grid;
        place-items: center;
        width: 44px;
        height: 44px;
        border-radius: 14px;
        background: var(--card);
        color: var(--blue);
        box-shadow: 0 4px 10px -6px rgba(20, 40, 90, 0.3);
    }

    .nav-icon svg { width: 20px; height: 20px; }

    .nav-chevron {
        display: inline-flex;
        margin-left: auto;
        color: var(--muted);
    }

    .nav-chevron svg { width: 18px; height: 18px; }

    .nav-links a.is-active .nav-icon { background: rgba(255, 255, 255, 0.2); color: #fff; box-shadow: none; }
    .nav-links a.is-active .nav-chevron { color: #fff; }

    .nav-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .nav-actions > :only-child { grid-column: 1 / -1; }
    .nav-login { height: 54px; border-radius: 18px; background: var(--field); }
    .nav-actions .btn-pill,
    .is-scrolled .nav-actions .btn-pill { height: 54px; border-radius: 18px; }
}

@keyframes menu-in {
    from { opacity: 0; transform: translateY(-8px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

/* Clouds (inside the blue art cards)
   ========================================================================== */

/* A pill with two puffs; size comes from inline width/height */
.cloud {
    position: absolute;
    display: block;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff 0%, #eef6ff 100%);
    box-shadow: inset 0 -6px 12px rgba(120, 160, 210, 0.25), 0 16px 26px -16px rgba(20, 70, 150, 0.4);
    animation: drift 18s ease-in-out infinite;
}

.cloud::before,
.cloud::after {
    content: "";
    position: absolute;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #fff;
}

.cloud::before { bottom: 38%; left: 16%; width: 46%; }
.cloud::after { bottom: 28%; left: 48%; width: 36%; }

@keyframes drift {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(18px); }
}

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

/* Shared: cards, pills, tags, 3D icon tiles
   ========================================================================== */

.card {
    position: relative;
    padding: 28px;
    border-radius: var(--r-lg);
    background: var(--card);
    box-shadow: var(--shadow-card);
    color: var(--body);
}

.pill {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 16px;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    background: var(--card);
    font-size: 0.84rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--muted);
}

.pill.is-active {
    border-color: transparent;
    background: var(--grad-blue);
    color: #fff;
    box-shadow: var(--glossy), 0 8px 16px -8px rgba(30, 94, 255, 0.65);
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}

.tag svg { width: 13px; height: 13px; }
.tag-blue { background: var(--tint-blue); color: var(--text-blue); }
.tag-green { background: var(--tint-green); color: var(--text-green); }
.tag-sky { background: var(--tint-sky); color: var(--text-sky); }
.tag-peach { background: var(--tint-peach); color: var(--text-peach); }

/* Glossy tile: three-stop gradient, light top edge, darker bottom lip, tinted glow */
.icon-3d {
    --t1: #4d82ff;
    --t2: #1e5eff;
    --t3: #1a53ea;
    --glow: rgba(30, 94, 255, 0.55);

    position: relative;
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: linear-gradient(180deg, var(--t1) 0%, var(--t2) 55%, var(--t3) 100%);
    color: #fff;
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        inset 0 -4px 0 rgba(0, 20, 100, 0.22),
        0 12px 22px -12px var(--glow);
}

.icon-3d svg {
    width: 25px;
    height: 25px;
    stroke-width: 2.3;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15));
}

.icon-3d.is-sm { width: 46px; height: 46px; border-radius: 14px; }
.icon-3d.is-sm svg { width: 20px; height: 20px; }

.tint-green { --t1: #5fd67d; --t2: #2db34f; --t3: #26a246; --glow: rgba(45, 179, 79, 0.5); }
.tint-sky { --t1: #55c3ff; --t2: #1ea4f0; --t3: #1592d9; --glow: rgba(30, 164, 240, 0.5); }
.tint-peach { --t1: #ffb592; --t2: #ff8b5e; --t3: #f2794b; --glow: rgba(255, 139, 94, 0.5); }

/* Hero
   ========================================================================== */

.hero {
    position: relative;
    padding-block: 34px 0;
    overflow: hidden;
}

/* Soft brand light behind the illustration */
.hero-glow {
    position: absolute;
    top: -120px;
    right: -160px;
    z-index: 0;
    width: 620px;
    height: 620px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30, 94, 255, 0.16) 0%, rgba(30, 94, 255, 0) 68%);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    gap: 40px;
    align-items: center;
    padding-bottom: 56px;
}

@media (min-width: 1100px) {
    .hero { padding-block: 48px 0; }
    .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 40px; padding-bottom: 80px; }
}

.hero-copy {
    max-width: 640px;
    margin-inline: auto;
    text-align: center;
}

/* Where we are and what we do, above the headline */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 16px 7px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--glass-strong);
    box-shadow: var(--shadow-card);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--on-bg);
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 0 rgba(45, 179, 79, 0.5);
    animation: live 2.4s ease-out infinite;
}

@keyframes live {
    0% { box-shadow: 0 0 0 0 rgba(45, 179, 79, 0.5); }
    70%, 100% { box-shadow: 0 0 0 8px rgba(45, 179, 79, 0); }
}

.hero h1 {
    margin-top: 20px;
    font-size: clamp(2.3rem, 1.3rem + 3.6vw, 4rem);
    line-height: 1.04;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.hero-lead {
    max-width: 36rem;
    margin: 18px auto 0;
    font-size: clamp(1.02rem, 0.95rem + 0.35vw, 1.16rem);
    color: var(--on-bg);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 28px;
}

/* Three figures about the market we work in */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 36px 0 0;
    padding-top: 26px;
    border-top: 1px solid var(--line);
    text-align: left;
}

.hero-stats div { min-width: 0; }

.hero-stats div + div { padding-left: 18px; border-left: 1px solid var(--line); }

.hero-stats dt {
    font-family: var(--font-head);
    font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem);
    font-weight: 800;
    color: var(--ink);
}

.hero-stats dd {
    margin: 4px 0 0;
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--body);
}

@media (min-width: 1100px) {
    .hero-copy { margin-inline: 0; text-align: left; }
    .hero-lead { margin-left: 0; }
    .hero-actions { justify-content: flex-start; }
    .hero-art { justify-content: flex-end; }
}

/* What we trade, scrolling along the bottom of the hero */
.hero-ticker {
    position: relative;
    z-index: 1;
    padding: 14px 0;
    border-block: 1px solid var(--line);
    background: var(--glass);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.ticker-track {
    display: flex;
    gap: 34px;
    width: max-content;
    animation: ticker 44s linear infinite;
}

.ticker-track span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.86rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--on-bg);
}

.ticker-track svg { width: 16px; height: 16px; color: var(--green); }

@keyframes ticker {
    from { translate: 0 0; }
    to { translate: -50% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .ticker-track { animation: none; }
    .live-dot { animation: none; }
}

/* Hero illustration: a circuit board with the products we trade floating around it */
.hero-art {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 420px;
    padding: 30px 0 40px;
}

/* Coloured cards peeking out behind the board, as in a carousel */
.peek {
    position: absolute;
    top: 90px;
    z-index: 0;
    width: 64px;
    height: 200px;
    border-radius: 28px;
}

.peek-pink { left: calc(50% - 250px); background: linear-gradient(180deg, #f9b1cf, #f07aab); }
.peek-purple { right: calc(50% - 250px); background: linear-gradient(180deg, #cdbdfc, #a58ff2); }

.board {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: min(100%, 390px);
    aspect-ratio: 1;
    border-radius: var(--r-card);
    background: var(--art-tile);
    box-shadow: 0 30px 60px rgba(16, 24, 48, 0.18);
    /* A slight tilt, as if the board is lying on a bench */
    rotate: -4deg;
    transform: perspective(1400px) rotateY(-12deg) rotateX(7deg);
}

.board::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 42%);
    pointer-events: none;
}

:root[data-theme="dark"] .board::after { background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 45%); }

.traces {
    position: absolute;
    inset: 6%;
    width: 88%;
    height: 88%;
    fill: none;
}

.trace-line path {
    stroke: rgba(30, 94, 255, 0.28);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.trace-pulse path {
    stroke: var(--blue);
    stroke-width: 3.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 26 210;
    animation: trace 3.4s linear infinite;
}

.trace-pulse path:nth-child(2) { animation-delay: 0.85s; }
.trace-pulse path:nth-child(3) { animation-delay: 1.7s; }
.trace-pulse path:nth-child(4) { animation-delay: 2.55s; }

.trace-pad circle {
    fill: var(--card);
    stroke: rgba(30, 94, 255, 0.35);
    stroke-width: 3;
}

@keyframes trace {
    from { stroke-dashoffset: 236; }
    to { stroke-dashoffset: 0; }
}

/* The chip in the middle */
.board-chip {
    position: relative;
    display: grid;
    place-items: center;
    width: 39%;
    aspect-ratio: 1;
    border-radius: 18px;
    background: linear-gradient(160deg, #38415e 0%, #232a42 55%, #1a2033 100%);
    box-shadow: 0 18px 34px rgba(16, 24, 48, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    animation: chip-glow 4s ease-in-out infinite;
}

.board-chip-face { display: grid; justify-items: center; gap: 2px; }
.board-chip-face strong { font: 800 1.5rem var(--font-head); color: #fff; letter-spacing: 0.04em; }
.board-chip-face small { font-size: 0.6rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: #93a6d6; }

@keyframes chip-glow {
    0%, 100% { box-shadow: 0 18px 34px rgba(16, 24, 48, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.18); }
    50% { box-shadow: 0 18px 44px rgba(30, 94, 255, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.22); }
}

/* Chip legs */
.pins { position: absolute; display: flex; gap: 6px; }
.pins i { display: block; border-radius: 2px; background: linear-gradient(180deg, #e7ecf7, #b9c4da); }

.pins-top,
.pins-bottom { left: 50%; translate: -50% 0; }
.pins-top { top: -9px; }
.pins-bottom { bottom: -9px; }
.pins-top i,
.pins-bottom i { width: 6px; height: 10px; }

.pins-left,
.pins-right { top: 50%; translate: 0 -50%; flex-direction: column; }
.pins-left { left: -9px; }
.pins-right { right: -9px; }
.pins-left i,
.pins-right i { width: 10px; height: 6px; }

/* Surface-mount parts scattered on the board */
.smd {
    position: absolute;
    border-radius: 4px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(210, 224, 247, 0.9));
    box-shadow: 0 4px 10px rgba(16, 24, 48, 0.12);
}

.smd-1 { top: 22%; left: 20%; width: 34px; height: 14px; }
.smd-2 { top: 20%; right: 22%; width: 14px; height: 30px; }
.smd-3 { bottom: 23%; left: 23%; width: 16px; height: 28px; }
.smd-4 { bottom: 21%; right: 20%; width: 32px; height: 14px; }

/* Cards floating over the board */
.hero-card {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 18px;
    background: var(--glass-strong);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(10px);
    animation: float-card 6s ease-in-out infinite;
}

.hero-card strong { display: block; font-size: 0.92rem; font-weight: 700; color: var(--ink); }
.hero-card small { font-size: 0.76rem; color: var(--body); }

.card-parts { top: 2%; left: -2%; }
.card-quality { top: 52%; right: -6%; animation-delay: -2s; }
.card-export { bottom: 2%; left: 2%; animation-delay: -4s; }

@keyframes float-card {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -10px; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-card,
    .board-chip,
    .trace-pulse path { animation: none; }
}

@media (max-width: 760px) {
    .hero-art { min-height: 330px; padding: 10px 0 20px; }
    .board { width: min(78%, 290px); rotate: -3deg; transform: perspective(1200px) rotateY(-8deg) rotateX(5deg); }
    .peek-pink { left: 0; }
    .peek-purple { right: 0; }
    .hero-card { padding: 10px 12px; gap: 9px; }
    .hero-card strong { font-size: 0.82rem; }
    .hero-card small { font-size: 0.7rem; }
    .card-parts { top: 0; left: 0; }
    .card-quality { top: auto; bottom: 24%; right: 0; }
    .card-export { bottom: 0; left: 0; }
}

/* Sections
   ========================================================================== */

.section {
    position: relative;
    padding-block: 56px;
}

@media (min-width: 960px) {
    .section { padding-block: 88px; }
}

.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head.center { margin-inline: auto; text-align: center; }

.label {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--blue);
}

.section h2 {
    font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.8rem);
    text-wrap: balance;
}

.section-lead {
    margin-top: 12px;
    font-size: 1.05rem;
    color: var(--on-bg);
}

/* About */

.about-card { padding: 28px; border-radius: var(--r-card); }

@media (min-width: 960px) {
    .about-card { padding: 56px; }
}

.about-grid {
    display: grid;
    gap: 32px;
    align-items: center;
}

@media (min-width: 960px) {
    .about-grid { grid-template-columns: 1.1fr 0.9fr; gap: 56px; }
}

.about-copy h2 { margin-bottom: 18px; }
.about-copy p { font-size: 1.04rem; }
.about-copy p + p { margin-top: 14px; }

.tagline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 26px;
}

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

.mv {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 24px;
    border-radius: var(--r-lg);
    background: var(--soft-tile);
}

.mv h3 { margin-top: 2px; font-size: 1.15rem; }
.mv p { margin-top: 6px; font-size: 0.95rem; }

@media (max-width: 480px) {
    .mv { flex-direction: column; }
}

/* Services */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 22px;
}

.service-card {
    padding: 34px 26px;
    text-align: center;
    transition: translate 0.25s ease, box-shadow 0.25s ease;
}

/* Hover uses `translate` so it doesn't fight the reveal's `transform` */
.service-card:hover { translate: 0 -6px; }

.service-card .icon-3d { width: 66px; height: 66px; border-radius: 20px; }
.service-card .icon-3d svg { width: 28px; height: 28px; }
.service-card h3 { margin-top: 20px; font-size: 1.15rem; }
.service-card p { margin-top: 8px; font-size: 0.95rem; }

/* Landing: the full product list under the business cards, and the closing growth card */
.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px 26px;
    margin: 26px 0 0;
    padding: 0;
    list-style: none;
}

.product-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--on-bg);
}

.product-list svg { width: 18px; height: 18px; flex: none; color: var(--green); }

.growth-card { padding: clamp(26px, 4vw, 46px); }
.growth-card h2 { margin: 10px 0 14px; }
.growth-card p { max-width: 68ch; font-size: 1rem; color: var(--on-bg); }
.growth-card p + p { margin-top: 12px; }

.growth-sign {
    margin-top: 22px;
    font-family: var(--font-head);
    font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.3rem);
    font-weight: 700;
    color: var(--ink);
}

/* Why */

.why-grid {
    display: grid;
    gap: 8px;
    align-items: start;
}

@media (min-width: 960px) {
    .why-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; align-items: center; }
    .why-grid .section-head { margin-bottom: 0; }
}

.feature-list { display: grid; gap: 18px; }

@media (min-width: 640px) {
    .feature-list { grid-template-columns: 1fr 1fr; }
}

.feature {
    display: flex;
    gap: 16px;
    padding: 24px;
}

.feature h3 { margin-top: 2px; font-size: 1.08rem; }
.feature p { margin-top: 4px; font-size: 0.93rem; }

.stats {
    display: grid;
    gap: 18px;
    margin-top: 44px;
}

@media (min-width: 640px) {
    .stats { grid-auto-flow: column; grid-auto-columns: 1fr; }
}

.stat {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 26px;
    border-radius: 999px;
}

.stat-value {
    display: block;
    font-family: var(--font-head);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.05;
    color: var(--ink);
}

.stat-label { display: block; font-size: 0.9rem; font-weight: 600; }

/* Footer: a glossy blue call-to-action banner, then a white link card
   ========================================================================== */

.site-footer {
    position: relative;
    padding-block: 24px 36px;
}

.footer-cta {
    position: relative;
    display: grid;
    gap: 24px;
    align-items: center;
    margin-bottom: 24px;
    padding: 44px 26px;
    overflow: hidden;
    border-radius: var(--r-card);
    background: linear-gradient(160deg, #5a8dff 0%, #1e5eff 55%, #1646d6 100%);
    box-shadow:
        inset 0 3px 0 rgba(255, 255, 255, 0.22),
        inset 0 -6px 0 rgba(0, 25, 110, 0.25),
        0 40px 70px -40px rgba(16, 60, 180, 0.6);
    text-align: center;
    color: rgba(255, 255, 255, 0.88);
}

/* Soft light circles for depth behind the content */
.footer-cta::before,
.footer-cta::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(255, 255, 255, 0.18), transparent);
    pointer-events: none;
}

.footer-cta::before { top: -140px; right: -80px; width: 420px; height: 420px; }
.footer-cta::after { bottom: -180px; left: -120px; width: 380px; height: 380px; }

@media (min-width: 860px) {
    .footer-cta {
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);
        padding: 56px 64px;
        text-align: left;
    }
}

.footer-cta-copy { position: relative; }

.footer-cta h2 {
    font-size: clamp(1.9rem, 1.3rem + 2vw, 2.8rem);
    text-wrap: balance;
    color: #fff;
}

.footer-cta h2 span { color: #c3e3ff; }

.footer-cta p {
    max-width: 32rem;
    margin: 12px auto 0;
    font-size: 1.05rem;
}

.footer-cta-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
}

@media (min-width: 860px) {
    .footer-cta p { margin-left: 0; }
    .footer-cta-actions { justify-content: flex-start; }
}

.btn-outline-light {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.btn-outline-light:hover { background: rgba(255, 255, 255, 0.2); }

.footer-cta-art {
    position: relative;
    display: grid;
    place-items: center;
    height: 230px;
}

.footer-cta-disc {
    position: relative;
    display: grid;
    place-items: center;
    width: 200px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ffffff 0%, #dcecff 100%);
    box-shadow: inset 0 -10px 20px rgba(30, 94, 255, 0.18), 0 30px 50px -22px rgba(0, 20, 90, 0.6);
    animation: float 6s ease-in-out infinite;
}

.footer-cta-disc img { width: 140px; }

.footer-cta-art .cloud { z-index: 1; }

@media (max-width: 859px) {
    .footer-cta-art { display: none; }
}

.footer-panel {
    padding: 36px 26px 22px;
    border-radius: var(--r-card);
    background: var(--card);
    box-shadow: var(--shadow-card);
    font-size: 0.95rem;
    color: var(--body);
}

@media (min-width: 768px) {
    .footer-panel { padding: 48px 48px 26px; }
}

.footer-grid {
    display: grid;
    gap: 28px;
}

@media (min-width: 480px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}

@media (min-width: 768px) {
    .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
    .footer-brand { grid-column: auto; }
}

.footer-brand p { max-width: 24rem; margin-top: 16px; }

.footer-col h3 {
    font-family: var(--font);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.footer-col ul {
    display: grid;
    gap: 2px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.footer-col a {
    display: inline-flex;
    margin-left: -12px;
    padding: 7px 12px;
    border-radius: 999px;
    font-weight: 700;
    color: var(--ink);
    transition: color 0.2s ease, background-color 0.2s ease;
}

.footer-col a:hover { color: var(--blue); background: var(--field); }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    font-size: 0.85rem;
    color: var(--muted);
}

.to-top {
    display: grid;
    flex: none;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--grad-blue);
    color: #fff;
    box-shadow: var(--glossy), 0 8px 16px -8px rgba(30, 94, 255, 0.6);
    transition: transform 0.2s ease;
}

.to-top:hover { transform: translateY(-2px); }
.to-top svg { width: 20px; height: 20px; }

/* Login, register and dashboard
   ========================================================================== */

.auth {
    position: relative;
    padding-block: 36px 80px;
}

@media (min-width: 960px) {
    .auth { padding-block: 56px 100px; }
}

.auth-grid {
    display: grid;
    gap: 36px;
    align-items: center;
}

@media (min-width: 960px) {
    .auth-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 72px; }
}

.auth-intro h1 {
    font-size: clamp(2.1rem, 1.3rem + 2.8vw, 3.4rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.auth-intro p {
    max-width: 30rem;
    margin-top: 16px;
    font-size: 1.05rem;
    color: var(--on-bg);
}

.auth-points {
    display: grid;
    gap: 14px;
    margin: 30px 0 0;
    padding: 0;
    list-style: none;
}

.auth-points li {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 700;
    color: var(--ink);
}

@media (max-width: 959px) {
    .auth-intro { text-align: center; }
    .auth-intro p { margin-inline: auto; }
    .auth-points { display: none; }
}

/* Frame: a white card with a title and a glossy badge in the top-right corner */
.frame {
    position: relative;
    padding: 30px;
    border-radius: var(--r-card);
    background: var(--card);
    box-shadow: var(--shadow-card);
    color: var(--body);
}

@media (max-width: 400px) {
    .frame { padding: 22px; }
}

.frame-title {
    margin: 4px 60px 20px 0;
    font-size: 1.5rem;
    font-weight: 800;
}

.frame-badge {
    position: absolute;
    top: 26px;
    right: 26px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--grad-blue);
    color: #fff;
    box-shadow: var(--glossy), 0 10px 18px -10px rgba(30, 94, 255, 0.6);
}

.frame-badge.is-green { background: var(--grad-green); box-shadow: var(--glossy), 0 10px 18px -10px rgba(45, 179, 79, 0.6); }
.frame-badge svg { width: 20px; height: 20px; stroke-width: 2.4; }

.auth-frame {
    justify-self: center;
    width: 100%;
    max-width: 460px;
}

.auth-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.auth-steps li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--muted);
}

.auth-steps li::before {
    content: counter(step);
    counter-increment: step;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--field);
    font-size: 0.74rem;
}

@media (max-width: 480px) {
    .auth-steps { gap: 8px 10px; }
    .auth-steps li { gap: 6px; font-size: 0.76rem; }
}

.auth-steps li.is-active { color: var(--ink); }
.auth-steps li.is-active::before { background: var(--grad-blue); color: #fff; box-shadow: var(--glossy); }

.auth-steps li.is-done::before {
    content: "\2713";
    background: var(--grad-green);
    color: #fff;
    box-shadow: var(--glossy);
}

.wallet-box {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: var(--r-md);
    background: var(--field);
}

.wallet-info { min-width: 0; line-height: 1.35; }
.wallet-info strong { display: block; font-size: 0.95rem; color: var(--ink); }
.wallet-info small { display: block; margin-top: 2px; font-size: 0.8rem; color: var(--muted); }

.wallet-address {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 0.01em;
}

.wallet-info .wallet-network { display: flex; align-items: center; gap: 6px; }

.wallet-network .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
}

.wallet-change {
    margin-left: auto;
    padding: 8px 12px;
    border: 0;
    border-radius: 999px;
    background: var(--card);
    font: 700 0.82rem var(--font);
    color: var(--blue);
    cursor: pointer;
}

.no-wallet {
    margin-top: 14px;
    padding: 16px;
    border-radius: var(--r-md);
    background: var(--tint-peach);
    font-size: 0.86rem;
    color: var(--ink);
}

.no-wallet p { margin-top: 4px; color: var(--body); }

.no-wallet-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.no-wallet-links .btn { height: 40px; padding: 0 14px; font-size: 0.84rem; }

.auth-fields { margin-top: 4px; }

.field {
    display: grid;
    gap: 6px;
    margin-top: 16px;
}

.field label { font-size: 0.86rem; font-weight: 700; color: var(--ink); }
.field small { font-size: 0.76rem; color: var(--muted); }

.field input,
.ref-link input {
    width: 100%;
    height: 54px;
    padding: 0 18px;
    border: 2px solid transparent;
    border-radius: var(--r-sm);
    background: var(--field);
    font: 500 0.95rem var(--font);
    color: var(--ink);
    outline: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.field input::placeholder { color: var(--muted); }
.field input:focus { border-color: rgba(30, 94, 255, 0.55); background: var(--card); }

.btn-block { width: 100%; margin-top: 22px; }
.btn:disabled { opacity: 0.75; cursor: progress; transform: none; }

.spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn.is-busy .spinner { display: inline-block; }

@keyframes spin { to { transform: rotate(360deg); } }

.auth-status {
    min-height: 1.5em;
    margin-top: 14px;
    font-size: 0.88rem;
    text-align: center;
}

.auth-status[data-type="error"] { color: var(--danger-text); }
.auth-status[data-type="success"] { color: var(--text-green); }
.auth-status a { font-weight: 700; color: var(--blue); text-decoration: underline; }

.auth-switch {
    margin-top: 14px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 0.9rem;
    text-align: center;
}

.auth-switch a { font-weight: 700; color: var(--blue); }

/* Login and register: messages, the password show / hide button, and a field only bots fill in */
.auth-alert { margin: 0 0 6px; }
.auth-help { margin-top: 14px; color: var(--muted); font-size: 0.82rem; text-align: center; }

/* Login: member ID + password, folded away for members who joined before wallet login */
.auth-legacy summary {
    padding: 4px 0;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--blue);
    text-align: center;
    list-style: none;
    cursor: pointer;
}

.auth-legacy summary::-webkit-details-marker { display: none; }
.auth-legacy[open] summary { color: var(--muted); }
.auth-legacy .btn-block { margin-top: 18px; }
.btn-light .spinner { border-color: rgba(30, 94, 255, 0.3); border-top-color: var(--blue); }
.wallet-change:disabled { opacity: 0.6; cursor: progress; }

.password-field { position: relative; display: block; }
.password-field input { padding-right: 56px; }

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transform: translateY(-50%);
}

.password-toggle:hover { color: var(--ink); }
.password-toggle svg { width: 20px; height: 20px; }
.password-toggle .icon-hide,
.password-toggle[aria-pressed="true"] .icon-show { display: none; }
.password-toggle[aria-pressed="true"] .icon-hide { display: block; }

.field-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Link wallet box (Profile, Deposit, Withdraw) */
.wallet-link { margin-top: 18px; }
.wallet-link .btn { margin-top: 12px; }
.wallet-link .auth-status { text-align: left; }

/* Member panel
   ========================================================================== */

.panel-shell {
    max-width: 1360px;
    margin-inline: auto;
    padding: 16px 16px calc(112px + env(safe-area-inset-bottom));
}

/* Desktop: the sidebar is fixed to the window (a sticky sidebar gets pushed up at the end
   of the page), so the content area reserves its width on the left */
@media (min-width: 1024px) {
    .panel-shell { padding: 20px 28px 32px calc(28px + 272px + 28px); }
}

/* Sidebar (desktop) */
.sidebar { display: none; }

@media (min-width: 1024px) {
    .sidebar {
        position: fixed;
        top: 20px;
        bottom: 20px;
        /* Lines up with the centred 1360px shell's left padding */
        left: max(28px, calc(50% - 652px));
        z-index: 40;
        display: flex;
        flex-direction: column;
        width: 272px;
        padding: 22px 14px 16px;
        border-radius: var(--r-card);
        background: var(--card);
        box-shadow: var(--shadow-card);
        overflow-y: auto;
    }
}

.sidebar > .brand { padding: 0 8px 20px; }

/* A long menu (the admin panel) scrolls inside the sidebar, so the account box and sign-out stay visible */
.sidebar > nav {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0 -6px;
    padding: 0 6px 6px;
    overflow-y: auto;
}

/* Slim, rounded scrollbars with no track, brighter on hover (also tables that scroll sideways) */
.sidebar > nav,
.support-log,
.table-wrap {
    scrollbar-width: thin;
    scrollbar-color: var(--scroll-thumb) transparent;
}

.sidebar > nav:hover,
.support-log:hover,
.table-wrap:hover { scrollbar-color: var(--scroll-thumb-hover) transparent; }

/* Safari doesn't know scrollbar-color yet */
@supports not (scrollbar-color: auto) {
    .sidebar > nav::-webkit-scrollbar,
    .support-log::-webkit-scrollbar,
    .table-wrap::-webkit-scrollbar { width: 6px; height: 6px; }

    .sidebar > nav::-webkit-scrollbar-track,
    .support-log::-webkit-scrollbar-track,
    .table-wrap::-webkit-scrollbar-track { background: transparent; }

    .sidebar > nav::-webkit-scrollbar-thumb,
    .support-log::-webkit-scrollbar-thumb,
    .table-wrap::-webkit-scrollbar-thumb { border-radius: 999px; background: var(--scroll-thumb); }

    .sidebar > nav:hover::-webkit-scrollbar-thumb,
    .support-log:hover::-webkit-scrollbar-thumb,
    .table-wrap:hover::-webkit-scrollbar-thumb { background: var(--scroll-thumb-hover); }
}

.admin-body .side-nav a { height: 48px; }
.admin-body .side-icon { width: 34px; height: 34px; }

.side-nav {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.side-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 54px;
    padding: 0 12px 0 8px;
    border-radius: 18px;
    font-weight: 700;
    color: var(--body);
    transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.side-nav a:hover { color: var(--ink); background: var(--field); }

.side-icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--field);
    color: var(--blue);
}

.side-icon svg { width: 19px; height: 19px; }

.side-nav a.is-active {
    color: #fff;
    background: var(--grad-blue);
    box-shadow: var(--glossy), 0 10px 20px -10px rgba(30, 94, 255, 0.6);
}

.side-nav a.is-active .side-icon { background: rgba(255, 255, 255, 0.18); color: #fff; }

.soon {
    margin-left: auto;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--tint-peach);
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-peach);
}

.sidebar-foot {
    display: grid;
    gap: 10px;
    margin-top: auto;
    padding-top: 18px;
}

.member-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 10px;
    border-radius: 20px;
    background: var(--field);
    line-height: 1.25;
}

.member-chip > span:last-child { min-width: 0; }

.member-chip strong,
.person-row strong {
    display: block;
    overflow: hidden;
    font-size: 0.92rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ink);
}

.member-chip small,
.person-row small { display: block; font-size: 0.78rem; color: var(--muted); }

.logout-btn { width: 100%; }
.logout-btn svg,
.profile-logout .btn svg { width: 17px; height: 17px; }

.avatar {
    display: grid;
    flex: none;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--grad-blue);
    box-shadow: var(--glossy);
    font-family: var(--font-head);
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
}

.avatar-lg { width: 64px; height: 64px; font-size: 1.35rem; }

/* Top bar */
.panel-topbar {
    display: grid;
    grid-template-areas:
        "brand actions"
        "title title";
    align-items: center;
    gap: 18px 12px;
    margin-bottom: 22px;
}

.panel-brand { grid-area: brand; }
.panel-title { grid-area: title; }
.topbar-actions { grid-area: actions; justify-self: end; }

@media (min-width: 1024px) {
    .panel-topbar { grid-template-areas: "title actions"; padding-top: 6px; }
    .panel-brand { display: none; }
}

.panel-title .label { margin-bottom: 4px; }
.panel-title h1 { font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.5rem); }

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wallet-chip {
    display: none;
    align-items: center;
    gap: 8px;
    height: 46px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--card);
    box-shadow: var(--shadow-soft);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85rem;
    color: var(--ink);
}

.wallet-chip .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
}

@media (min-width: 560px) {
    .wallet-chip { display: inline-flex; }
}

.flash {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 14px 18px;
    border-radius: 20px;
    background: var(--card);
    box-shadow: var(--shadow-soft);
    font-weight: 700;
}

.flash svg { flex: none; width: 20px; height: 20px; }
.flash-success { color: var(--text-green); }
.flash-error { color: var(--danger-text); }

/* Bottom tab bar (mobile) */
.bottom-nav {
    position: fixed;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: 12px;
    z-index: 60;
    display: flex;
    gap: 4px;
    padding: 8px;
    border-radius: 28px;
    background: var(--glass-strong);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 20px 40px -16px rgba(16, 72, 160, 0.5);
}

@media (min-width: 1024px) {
    .bottom-nav { display: none; }
}

.bottom-nav a,
.bottom-nav .bn-more {
    display: grid;
    flex: 1;
    justify-items: center;
    gap: 3px;
    min-width: 0;
    padding: 6px 0;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--muted);
}

@media (max-width: 359px) {
    .bottom-nav a,
    .bottom-nav .bn-more { font-size: 0.64rem; }
}

.bn-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 32px;
    border-radius: 12px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.bn-icon svg { width: 21px; height: 21px; }

.bottom-nav a.is-active,
.bottom-nav .bn-more.is-active { color: var(--blue); }

.bottom-nav a.is-active .bn-icon,
.bottom-nav .bn-more.is-active .bn-icon {
    background: var(--grad-blue);
    box-shadow: var(--glossy);
    color: #fff;
}

/* Deposit, the main action, is a raised round button in the middle of the bar.
   It rises by the difference in icon height, so its label lines up with the others. */
.bottom-nav a.bn-feature { color: var(--ink); }

.bottom-nav a.bn-feature .bn-icon {
    width: 54px;
    height: 54px;
    margin-top: -22px;
    border-radius: 50%;
    background: var(--grad-blue);
    box-shadow: var(--glossy), 0 0 0 5px var(--card), 0 12px 22px -8px rgba(30, 94, 255, 0.6);
    color: #fff;
}

.bottom-nav a.bn-feature .bn-icon svg { width: 24px; height: 24px; }
.bottom-nav a.bn-feature.is-active { color: var(--blue); }

.bottom-nav a.bn-feature.is-active .bn-icon {
    box-shadow: var(--glossy), 0 0 0 5px var(--card), 0 0 0 9px rgba(30, 94, 255, 0.16), 0 12px 22px -8px rgba(30, 94, 255, 0.6);
}

/* Cards and content */

/* Dashboard welcome bar: greeting and member ID on the left, the two main actions on the right */
.welcome-bar {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    margin-bottom: 18px;
    padding: 22px 24px;
    overflow: hidden;
    border-radius: var(--r-lg);
    background: linear-gradient(135deg, #5a8dff 0%, #1e5eff 55%, #1646d6 100%);
    box-shadow:
        inset 0 3px 0 rgba(255, 255, 255, 0.22),
        inset 0 -5px 0 rgba(0, 25, 110, 0.25),
        0 16px 32px -22px rgba(16, 60, 180, 0.45);
    color: rgba(255, 255, 255, 0.85);
}

.welcome-bar::before {
    content: "";
    position: absolute;
    top: -140px;
    right: 8%;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(255, 255, 255, 0.16), transparent);
    pointer-events: none;
}

@media (min-width: 720px) {
    .welcome-bar { padding: 24px 30px; }
}

.welcome-copy,
.welcome-actions { position: relative; }

.welcome-bar h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem); color: #fff; }
.welcome-bar h2 span { color: #c3e3ff; }

.welcome-id {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    font-size: 0.86rem;
}

.welcome-id strong { font-family: var(--font-head); font-size: 1rem; letter-spacing: 0.03em; color: #fff; }
.welcome-id .copy-btn { width: 30px; height: 30px; border-radius: 10px; background: rgba(255, 255, 255, 0.18); color: #fff; }
.welcome-id .copy-btn svg { width: 15px; height: 15px; }

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

/* See-through button for dark backgrounds */
.btn-glass {
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.35);
    color: #fff;
}

.btn-glass:hover { background: rgba(255, 255, 255, 0.24); }

/* Dashboard stat tiles: icon beside the figure; 2 across on phones, 3 across from tablets up */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

@media (min-width: 900px) {
    .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}

.kpi {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 18px;
    border-radius: var(--r-lg);
    background: var(--card);
    box-shadow: var(--shadow-card);
    color: var(--body);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -14px rgba(16, 72, 160, 0.24), 0 2px 6px -2px rgba(16, 72, 160, 0.08); }

@media (max-width: 599px) {
    .kpi { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 10px; padding: 16px; }
}

.kpi-text { display: grid; gap: 2px; min-width: 0; }
.kpi-label { font-size: 0.8rem; font-weight: 700; color: var(--muted); }

.kpi-value {
    font-family: var(--font-head);
    font-size: clamp(1.3rem, 1.15rem + 0.5vw, 1.6rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.kpi-sub { font-size: 0.78rem; color: var(--body); }

.panel-grid-top { align-items: start; }
.panel-stack { display: grid; gap: 22px; min-width: 0; }

/* Business plan page: the PDF to download, then its slides as images */
.plan-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 14px 18px;
    margin-bottom: 18px;
}

.plan-head-copy h2 { font-size: 1.2rem; color: var(--ink); }
.plan-head-copy p { margin-top: 4px; font-size: 0.9rem; color: var(--body); }
.plan-actions { display: flex; flex-wrap: wrap; gap: 10px; grid-column: 1 / -1; }

@media (min-width: 760px) {
    .plan-head { grid-template-columns: auto minmax(0, 1fr) auto; }
    .plan-actions { grid-column: auto; }
}

.plan-slides { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }

.plan-slides img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--r-md);
    background: var(--field);
    box-shadow: var(--shadow-card);
}

/* Dashboard: the fast-start countdown, shown for the first hours after a member's first package */
.fast-start {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 14px 18px;
    margin-bottom: 18px;
    padding: 18px;
    border: 2px solid var(--tint-green);
    border-radius: var(--r-lg);
    background: var(--card);
    box-shadow: var(--shadow-card);
    color: var(--body);
}

.fast-start-copy { min-width: 0; }
.fast-start-copy h2 { font-size: 1.15rem; color: var(--ink); }
.fast-start-copy p { margin-top: 4px; font-size: 0.9rem; line-height: 1.5; }
.fast-start-copy strong { color: var(--ink); }

.fast-start-timer { display: flex; gap: 8px; grid-column: 1 / -1; }

.fast-start-timer span {
    display: grid;
    flex: 1;
    justify-items: center;
    min-width: 64px;
    padding: 8px 10px;
    border-radius: var(--r-sm);
    background: var(--tint-green);
    color: var(--text-green);
}

.fast-start-timer strong {
    font-family: var(--font-head);
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.fast-start-timer small { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }

.fast-start > .btn { grid-column: 1 / -1; justify-self: start; }

@media (min-width: 960px) {
    .fast-start { grid-template-columns: auto minmax(0, 1fr) auto auto; padding: 20px 26px; }
    .fast-start-timer,
    .fast-start > .btn { grid-column: auto; }
    .fast-start-timer span { flex: none; }
}

/* Dashboard: capping donut, level income status, income split and team counts */
@media (min-width: 1200px) {
    .kpi-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.capping-body {
    display: grid;
    grid-template-columns: 148px minmax(0, 1fr);
    align-items: center;
    gap: 22px;
    margin-top: 6px;
}

.donut { position: relative; display: grid; place-items: center; }
.donut svg { width: 148px; height: 148px; }

.donut circle {
    fill: none;
    stroke-width: 4.2;
}

.donut-track { stroke: var(--field); }

.donut-value {
    stroke: var(--blue);
    stroke-linecap: round;
    transition: stroke-dasharray 0.6s ease;
}

.donut-center {
    position: absolute;
    display: grid;
    justify-items: center;
    gap: 2px;
}

.donut-center strong { font: 800 1.5rem var(--font-head); color: var(--ink); }
.donut-center small { font-size: 0.72rem; color: var(--muted); }

.capping-legend { display: grid; gap: 10px; margin: 0; }

.capping-legend div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.88rem;
}

.capping-legend dt { display: flex; align-items: center; gap: 8px; color: var(--body); }
.capping-legend dd { margin: 0; font-weight: 700; color: var(--ink); }

.capping-total {
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-blue { background: var(--blue); }
.dot-grey { background: var(--field); border: 1px solid var(--line); }

.level-status {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 4px 0 16px;
}

.level-status div {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
}

.level-status span { font-size: 0.75rem; color: var(--muted); }
.level-status strong { font: 800 1.15rem var(--font-head); color: var(--ink); }
.level-status strong small { font: 500 0.75rem var(--font); color: var(--muted); }

.level-chips {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 6px;
    margin: 16px 0;
    padding: 0;
    list-style: none;
}

.level-chip {
    display: grid;
    justify-items: center;
    gap: 1px;
    padding: 7px 2px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--muted);
}

.level-chip strong { font: 700 0.76rem var(--font); }
.level-chip small { font-size: 0.66rem; }

.level-chip.is-open {
    border-color: transparent;
    background: rgba(30, 94, 255, 0.12);
    color: var(--blue);
}

.income-feed { display: grid; gap: 4px; margin: 4px 0 0; padding: 0; list-style: none; }

.income-feed li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 2px;
    border-bottom: 1px solid var(--line);
    font-size: 0.88rem;
}

.income-feed li:last-child { border-bottom: 0; }
.income-feed-detail { min-width: 0; color: var(--body); }
.income-feed strong { font-weight: 700; }

.split-list { display: grid; gap: 12px; margin: 4px 0 0; padding: 0; list-style: none; }

.split-list li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px 12px;
    font-size: 0.85rem;
}

.split-label { color: var(--body); }
.split-value { font-weight: 700; color: var(--ink); }

.split-bar {
    grid-column: 1 / -1;
    height: 8px;
    border-radius: 99px;
    background: var(--field);
    overflow: hidden;
}

.split-fill { display: block; height: 100%; border-radius: 99px; background: var(--blue); }
.split-fill.fill-green { background: var(--green); }
.split-fill.fill-peach { background: #f2994a; }
.split-fill.fill-sky { background: #35a7d8; }

.team-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }

.team-stats a {
    display: grid;
    gap: 2px;
    padding: 12px 10px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    color: var(--body);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.team-stats a:hover { border-color: rgba(30, 94, 255, 0.4); transform: translateY(-1px); }
.team-stats strong { font: 800 1.2rem var(--font-head); color: var(--ink); }
.team-stats span { font-size: 0.74rem; color: var(--muted); }

@media (max-width: 640px) {
    .capping-body { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 16px; }
    .capping-legend { width: 100%; }
    .level-chips { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .level-status { grid-template-columns: minmax(0, 1fr); }
    .level-status div { display: flex; align-items: baseline; justify-content: space-between; }
}

.progress-cell { min-width: 150px; }
.progress-cell .level-bar { display: block; margin-bottom: 4px; }

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

@media (min-width: 1100px) {
    .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
    .stat-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .stat-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
}

@media (max-width: 1099px) {
    .stat-grid-3 > :last-child { grid-column: 1 / -1; }
    .stat-grid-5 > :last-child { grid-column: 1 / -1; }
}

.stat-card {
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 20px;
    border-radius: var(--r-lg);
    background: var(--card);
    box-shadow: var(--shadow-card);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--body);
}

.stat-num {
    font-family: var(--font-head);
    font-size: clamp(1.7rem, 1.4rem + 1vw, 2.2rem);
    font-weight: 800;
    line-height: 1.05;
    color: var(--ink);
}

.stat-num .tag { vertical-align: middle; font-family: var(--font); }
.stat-date { font-size: clamp(1.15rem, 1rem + 0.5vw, 1.35rem); line-height: 1.3; }

.panel-grid {
    display: grid;
    gap: 22px;
    margin-bottom: 22px;
}

@media (min-width: 1100px) {
    .panel-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
    .panel-grid-team { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: start; }
}

.panel-card {
    min-width: 0;
    padding: 24px;
    border-radius: var(--r-lg);
    background: var(--card);
    box-shadow: var(--shadow-card);
    color: var(--body);
}

.panel-grid .panel-card { margin: 0; }
.panel-main > .panel-card { margin-bottom: 22px; }

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.card-head h2 { font-size: 1.25rem; }

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--blue);
}

.card-link svg { width: 16px; height: 16px; }
.card-text { font-size: 0.95rem; }

.ref-link { display: flex; gap: 8px; margin-top: 16px; }
.ref-link input { min-width: 0; height: 48px; font-size: 0.84rem; }
.ref-link .btn { flex: none; height: 48px; }
.share-btn { margin-top: 10px; }

.copy-btn {
    display: inline-grid;
    flex: none;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: var(--field);
    color: var(--body);
    cursor: pointer;
}

.copy-btn svg { width: 16px; height: 16px; }
.copy-btn.is-copied { color: var(--text-green); }

.person-list { margin: 0; padding: 0; list-style: none; }

.person-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    line-height: 1.25;
}

.person-row > span:not(.avatar):not(.icon-3d) { min-width: 0; }

.person-list .person-row { padding: 12px 0; border-top: 1px solid var(--line); }
.person-list .person-row:first-child { border-top: 0; padding-top: 2px; }

.person-meta {
    margin-left: auto;
    font-size: 0.82rem;
    white-space: nowrap;
    color: var(--muted);
}

.empty-state {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 26px 12px 12px;
    text-align: center;
}

.empty-state h3 { margin-top: 8px; font-size: 1.15rem; }
.empty-state p { max-width: 26rem; font-size: 0.92rem; }
.empty-state .btn { margin-top: 10px; }

.level-list {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.level-list li {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
}

.level-name { font-weight: 700; color: var(--ink); }
.level-list strong { min-width: 2ch; text-align: right; color: var(--ink); }

.level-bar {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--field);
}

.level-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #4d82ff, #2db34f);
}

/* The bottom padding keeps a sideways scrollbar off the last row */
.table-wrap { margin: 0 -24px; padding: 0 24px 6px; overflow-x: auto; }

.data-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th {
    padding: 0 12px 10px;
    font-size: 0.76rem;
    font-weight: 700;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.data-table td {
    padding: 12px;
    border-top: 1px solid var(--line);
    white-space: nowrap;
    color: var(--ink);
}

.data-table :is(th, td):first-child { padding-left: 0; }
.data-table :is(th, td):last-child { padding-right: 0; }
.data-table .avatar { width: 38px; height: 38px; font-size: 0.82rem; }

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.pagination a {
    display: grid;
    place-items: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    background: var(--field);
    font-weight: 700;
    color: var(--ink);
}

.pagination .active a { background: var(--grad-blue); box-shadow: var(--glossy); color: #fff; }

.profile-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.profile-head h2 { margin-bottom: 6px; font-size: 1.45rem; }

.profile-form .btn { margin-top: 20px; }

.info-list { margin: 0; }

.info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}

.info-row:first-child { border-top: 0; padding-top: 0; }
.info-row dt { font-size: 0.88rem; color: var(--muted); }

.info-row dd {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin: 0;
    font-weight: 700;
    text-align: right;
    color: var(--ink);
}

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.profile-logout { margin-top: 20px; }
.profile-logout .btn { width: 100%; }

/* Staking, rewards and admin
   ========================================================================== */

.tint-red { --t1: #ff8080; --t2: #ef4444; --t3: #dc2f2f; --glow: rgba(239, 68, 68, 0.5); }
.tint-grey { --t1: #c3c8d4; --t2: #a3aabb; --t3: #939aac; --glow: rgba(120, 128, 150, 0.4); }
.tag-red { background: var(--danger-bg); color: var(--danger-text); }
.tag-grey { background: var(--field); color: var(--body); }

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

a.stat-card { transition: translate 0.2s ease; }
a.stat-card:hover { translate: 0 -2px; }
a.stat-card.is-active { box-shadow: var(--shadow-card), inset 0 0 0 2px rgba(30, 94, 255, 0.55); }


.side-heading {
    margin: 18px 12px 8px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 16px 0 0;
    padding: 14px 16px;
    border-radius: var(--r-md);
    background: var(--tint-blue);
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--on-bg);
}

.notice > svg { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--blue); }

.notice-action {
    align-items: center;
    margin: 0 0 22px;
    background: var(--card);
    box-shadow: var(--shadow-soft);
}

.notice-action strong { display: block; color: var(--ink); }
.notice-action > svg:last-child { margin-left: auto; color: var(--blue); }

.card-head-wrap { flex-wrap: wrap; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--on-bg);
}

.back-link svg { width: 18px; height: 18px; transform: rotate(180deg); }

.btn.is-disabled { opacity: 0.7; cursor: default; transform: none; }

/* Packages */
.package-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
    gap: 16px;
    margin-top: 20px;
}

.package-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
    border: 1.5px solid var(--line);
    border-radius: var(--r-md);
    background: var(--card-raised);
}

.package-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.package-amount {
    font-size: clamp(1.7rem, 1.4rem + 1vw, 2.1rem);
    font-variant-numeric: tabular-nums;
}

.package-facts { display: grid; gap: 6px; margin: 0; }
.package-facts div { display: flex; justify-content: space-between; gap: 8px; font-size: 0.86rem; }
.package-facts dt { color: var(--muted); }
.package-facts dd { margin: 0; font-weight: 700; color: var(--ink); }
.package-card .btn { margin-top: auto; }
.package-facts { margin-bottom: 4px; }
.package-facts dd { white-space: nowrap; }

.stake-list,
.payment-list,
.rules-list,
.admin-payments {
    margin: 0;
    padding: 0;
    list-style: none;
}

.stake-item { display: grid; gap: 10px; padding: 16px 0; border-top: 1px solid var(--line); }
.stake-item:first-child { padding-top: 0; border-top: 0; }

.stake-head { display: flex; align-items: center; gap: 12px; line-height: 1.3; }
.stake-head > span:nth-child(2) { min-width: 0; margin-right: auto; }
.stake-head strong { display: block; color: var(--ink); }
.stake-head small { display: block; font-size: 0.8rem; color: var(--muted); }

.stake-meter { display: flex; justify-content: space-between; gap: 8px; font-size: 0.86rem; }
.stake-meter strong { color: var(--green-600); }

.payment-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    line-height: 1.3;
}

.payment-list li:first-child a { padding-top: 0; border-top: 0; }
.payment-list a > span:nth-child(2) { min-width: 0; margin-right: auto; }
.payment-list strong { display: block; color: var(--ink); }
.payment-list small { display: block; font-size: 0.8rem; color: var(--muted); }

.rules-title { margin-top: 24px; font-size: 1.05rem; }
.rules-list { display: grid; gap: 10px; margin-top: 12px; font-size: 0.9rem; }
.rules-list li { display: flex; align-items: flex-start; gap: 10px; line-height: 1.45; }
.rules-list svg { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--green-600); }

/* Checkout */
.checkout-grid {
    display: grid;
    gap: 22px;
    align-items: start;
    margin-bottom: 22px;
}

@media (min-width: 1100px) {
    .checkout-grid { grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); }
}

.checkout-summary .package-amount { margin-bottom: 14px; font-size: clamp(2.2rem, 1.7rem + 1.8vw, 3rem); }

.method-tabs { display: none; gap: 6px; padding: 5px; border-radius: 18px; background: var(--field); }
.js .method-tabs { display: flex; }

.method-tabs button {
    display: inline-flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 10px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    font: 700 0.9rem/1 var(--font);
    color: var(--body);
    cursor: pointer;
}

.method-tabs button svg { width: 18px; height: 18px; }

.method-tabs button[aria-selected="true"] {
    background: var(--grad-blue);
    box-shadow: var(--glossy), 0 8px 16px -10px rgba(30, 94, 255, 0.7);
    color: #fff;
}

.method-panel { padding-top: 18px; }
.method-panel + .method-panel { margin-top: 18px; border-top: 1px solid var(--line); }
.js .method-panel:not(.is-active) { display: none; }
.js .method-panel + .method-panel { margin-top: 0; border-top: 0; }

.pay-amount {
    display: grid;
    gap: 2px;
    padding: 18px 20px;
    border-radius: var(--r-md);
    background: var(--soft-tile);
    line-height: 1.3;
}

.pay-amount small { font-size: 0.8rem; font-weight: 700; color: var(--muted); }

.pay-amount strong {
    font-family: var(--font-head);
    font-size: clamp(1.8rem, 1.5rem + 1vw, 2.3rem);
    font-weight: 800;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.pay-amount span { font-size: 0.86rem; }

.pay-steps {
    display: grid;
    gap: 10px;
    margin: 18px 0 0;
    padding-left: 22px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.pay-steps li::marker { font-weight: 800; color: var(--blue); }

.usdt-pay { margin-top: 4px; }
.fine-print { margin-top: 6px; font-size: 0.8rem; line-height: 1.5; color: var(--muted); }

.field .optional { font-weight: 500; color: var(--muted); }

.field textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid transparent;
    border-radius: var(--r-sm);
    background: var(--field);
    font: 500 0.95rem/1.5 var(--font);
    color: var(--ink);
    resize: vertical;
    outline: none;
}

.field textarea:focus { border-color: rgba(30, 94, 255, 0.55); background: var(--card); }

/* Payment status */
.status-card {
    display: grid;
    align-content: start;
    justify-items: start;
    gap: 12px;
}

.status-icon { width: 64px; height: 64px; border-radius: 20px; }
.status-icon svg { width: 30px; height: 30px; }
.status-card h2 { font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.8rem); }
.status-card > p { font-size: 0.95rem; line-height: 1.55; }
.status-card .usdt-pay { width: 100%; }
.status-card .btn:not(.btn-block) { margin-top: 6px; }
.status-reason { padding: 12px 14px; border-radius: 14px; background: var(--danger-bg); font-weight: 700; color: var(--danger-text); }

.tx-form { width: 100%; }

.tx-form summary {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--blue);
    cursor: pointer;
}

.tx-form form { display: grid; justify-items: start; gap: 12px; }
.tx-form .field { width: 100%; }
.tx-form input { font-size: 0.85rem; }

.poll-row { display: flex; align-items: center; gap: 10px; font-size: 0.86rem; color: var(--muted); }

.spinner-dark {
    display: inline-block;
    border-color: rgba(30, 94, 255, 0.2);
    border-top-color: var(--blue);
}

/* Filters */
.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.filter-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--field);
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--body);
}

.filter-tabs a.is-active { background: var(--grad-blue); box-shadow: var(--glossy); color: #fff; }

.filter-tabs .count {
    min-width: 22px;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--count-bg);
    font-size: 0.72rem;
    text-align: center;
    color: var(--ink);
}

.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .amount-plus { font-weight: 800; color: var(--green-600); }

/* Admin */
.admin-payment {
    display: grid;
    gap: 14px;
    padding: 16px 0;
    border-top: 1px solid var(--line);
}

.admin-payment:first-child { padding-top: 4px; border-top: 0; }

@media (min-width: 900px) {
    .admin-payment { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
}

.ap-main { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }

/* Admin withdrawals: tick several and pay them in one vault transaction */
.batch-bar {
    display: grid;
    gap: 10px;
    margin: 0 0 16px;
    padding: 14px;
    border-radius: var(--r-md);
    background: var(--field);
}

.batch-summary { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0; font-size: 0.9rem; color: var(--body); }
.batch-summary strong { color: var(--ink); }
.batch-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.batch-bar .auth-status { margin-top: 0; text-align: left; }
.batch-bar .fine-print { margin: 0; }
.batch-pick { display: grid; place-items: center; padding-top: 14px; cursor: pointer; }
.batch-pick input { width: 20px; height: 20px; margin: 0; accent-color: var(--blue); }

.proof-thumb {
    flex: none;
    width: 64px;
    height: 64px;
    overflow: hidden;
    border-radius: 16px;
    background: var(--field);
    box-shadow: var(--shadow-soft);
}

.proof-thumb img { width: 100%; height: 100%; object-fit: cover; }
.proof-icon { width: 64px; height: 64px; border-radius: 16px; }

.ap-info { display: grid; gap: 4px; min-width: 0; font-size: 0.86rem; line-height: 1.4; }
.ap-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ap-title strong { font-size: 0.98rem; color: var(--ink); }
.ap-info .card-link { font-size: inherit; }
.ap-note { color: var(--danger-text); }

.ap-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; }

.confirm summary { list-style: none; }
.confirm summary::-webkit-details-marker { display: none; }

.confirm form {
    display: grid;
    gap: 10px;
    width: min(300px, calc(100vw - 64px));
    margin-top: 8px;
    padding: 14px;
    border-radius: var(--r-sm);
    background: var(--field);
    font-size: 0.86rem;
}

.confirm input {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 2px solid transparent;
    border-radius: 12px;
    background: var(--card);
    font: 500 0.88rem var(--font);
    color: var(--ink);
    outline: none;
}

.confirm select {
    width: 100%;
    height: 44px;
    padding: 0 10px;
    border: 2px solid transparent;
    border-radius: 12px;
    background: var(--card);
    font: 500 0.88rem var(--font);
    color: var(--ink);
    outline: none;
}

.confirm input:focus { border-color: rgba(30, 94, 255, 0.55); }
.confirm select:focus { border-color: rgba(30, 94, 255, 0.55); }
.confirm .check-row { padding: 10px 12px; background: var(--card); }
.confirm .check-row input { height: 20px; padding: 0; border: 0; }

@media (min-width: 1100px) {
    .panel-grid-even { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}

.settings-actions { display: flex; justify-content: flex-end; margin-bottom: 22px; }

/* Level income: one row per level, two small inputs each */
.level-card { margin-bottom: 18px; }

.level-table { display: grid; gap: 6px; }

.level-row {
    display: grid;
    grid-template-columns: 110px 150px 150px;
    justify-content: start;
    gap: 10px;
    align-items: center;
}

.level-head {
    padding: 0 2px 4px;
    font: 600 0.72rem var(--font);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.level-row .level-name { white-space: nowrap; }

.level-input { position: relative; display: block; }

.level-input input {
    width: 100%;
    height: 44px;
    padding: 0 40px 0 14px;
    border: 2px solid transparent;
    border-radius: 12px;
    background: var(--field);
    font: 600 0.9rem var(--font);
    color: var(--ink);
    outline: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.level-input input:focus { border-color: rgba(30, 94, 255, 0.55); background: var(--card); }

.level-unit {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    font: 500 0.78rem var(--font);
    color: var(--muted);
    pointer-events: none;
}

@media (max-width: 560px) {
    .level-row { grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1fr); gap: 8px; font-size: 0.85rem; }
    .level-head span:nth-child(3) { font-size: 0; }
    .level-head span:nth-child(3)::after { content: 'Directs'; font-size: 0.72rem; }
    .level-input input { padding-right: 32px; }
    .level-unit { right: 9px; }
}

/* Admin panel on phones and tablets: the sidebar is hidden, so a menu button in the top bar opens every
   section in a modal (a bottom sheet on phones). Sign out moves into the menu there. */
.menu-trigger {
    display: none;
    flex: none;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--grad-blue);
    box-shadow: var(--glossy), 0 8px 16px -8px rgba(30, 94, 255, 0.6);
    color: #fff;
    cursor: pointer;
}

.menu-trigger svg { width: 20px; height: 20px; }

@media (max-width: 1023px) {
    .js .menu-trigger { display: inline-grid; }
    .js .admin-body .signout-form { display: none; }
}

/* More in the member bottom bar is a button that opens the More menu */
.bottom-nav .bn-more {
    border: 0;
    background: none;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
}

/* Doubled classes: these win over the shared .modal and .modal-card styles further down */
.modal-card.menu-sheet {
    width: min(100%, 460px);
    padding: 20px 18px 18px;
    text-align: left;
}

.menu-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.modal-card .menu-sheet-head h2 { margin: 0; font-size: 1.35rem; }

.menu-close {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: var(--field);
    color: var(--body);
    cursor: pointer;
}

.menu-close svg { width: 18px; height: 18px; }

.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.menu-tile {
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 8px;
    height: 100%;
    padding: 14px 6px 12px;
    border-radius: var(--r-md);
    background: var(--field);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    color: var(--ink);
    transition: background-color 0.2s ease;
}

button.menu-tile { width: 100%; border: 0; font-family: inherit; cursor: pointer; }
.menu-tile:hover { background: var(--tint-blue); }
.menu-tile.is-active { background: var(--tint-blue); box-shadow: inset 0 0 0 2px var(--blue); color: var(--blue); }

.menu-sheet-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.menu-sheet-foot .member-chip { flex: 1; min-width: 0; padding: 0; background: none; }
.menu-sheet-foot form { margin: 0; }
.menu-sheet-foot .btn svg { width: 16px; height: 16px; }

/* Phones: the menu slides up from the bottom, within thumb reach */
@media (max-width: 599px) {
    .modal.menu-modal { place-items: end center; padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); }
    .modal-card.menu-sheet { width: 100%; animation: sheet-in 0.25s ease; }
}

@keyframes sheet-in {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: none; }
}

/* Admin body has no bottom bar, so the page can end closer to the edge */
.admin-body .panel-shell { padding-bottom: 32px; }

/* Labels that only fit on wider screens (the topbar's Member panel button) */
@media (max-width: 699px) {
    .only-wide { display: none; }
}

.search-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 18px;
}

.search-row input { min-width: 0; }
.search-row .field { flex: 1 1 200px; margin: 0; }
.search-row .btn { flex: none; height: 48px; }

.search-row > input {
    flex: 1 1 240px;
    height: 48px;
    padding: 0 18px;
    border: 2px solid transparent;
    border-radius: var(--r-sm);
    background: var(--field);
    font: 500 0.95rem var(--font);
    color: var(--ink);
    outline: none;
}

.search-row > input:focus { border-color: rgba(30, 94, 255, 0.55); background: var(--card); }
.card-text + .table-wrap { margin-top: 14px; }

.action-pair {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.topbar-actions form { margin: 0; }

.field select {
    width: 100%;
    height: 54px;
    padding: 0 18px;
    border: 2px solid transparent;
    border-radius: var(--r-sm);
    background: var(--field);
    font: 500 0.95rem var(--font);
    color: var(--ink);
    outline: none;
}

.field select:focus { border-color: rgba(30, 94, 255, 0.55); background: var(--card); }

/* Sub-admin permissions */
.check-list {
    display: grid;
    gap: 10px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.check-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--r-sm);
    background: var(--field);
    line-height: 1.35;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.check-row:has(input:checked) { background: var(--tint-blue); }
.check-row input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--blue); }
.check-row strong { display: block; font-size: 0.92rem; color: var(--ink); }
.check-row small { display: block; margin-top: 2px; font-size: 0.8rem; color: var(--muted); }

/* Whose member ID was typed (P2P transfer, buying a package for another member) */
.field small[data-type="success"] { color: var(--text-green); font-weight: 600; }
.field small[data-type="error"] { color: var(--danger-text); }

.invest-for .check-row { margin-top: 18px; }

/* Invest for a member: the package list, with packages the profit wallet can't cover greyed out */
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.package-pick { display: grid; gap: 8px; margin: 18px 0 0; padding: 0; border: 0; }
.package-pick legend { margin-bottom: 8px; padding: 0; font-size: 0.86rem; font-weight: 700; color: var(--ink); }
.check-row.is-disabled { opacity: 0.55; cursor: not-allowed; }

/* WhatsApp channel link: sidebar, dashboard */
/* Reports: quick date ranges, and what each total is made of */
.report-presets { margin-top: 14px; }
.stat-detail { display: block; margin-top: 4px; font-size: 0.76rem; line-height: 1.4; color: var(--muted); }

.whatsapp-btn { width: 100%; justify-content: center; }
.panel-card .whatsapp-btn { margin-top: 14px; }
.sidebar-foot .whatsapp-btn { margin-bottom: 12px; }

/* Admin sign-in */
.admin-login {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 24px;
    min-height: 100vh;
    padding: 32px 16px;
}

.admin-login-card { width: min(100%, 420px); padding: 32px 28px; }
.admin-login-card h1 { margin-top: 18px; font-size: 1.8rem; }
.admin-login-card .card-text { margin-top: 8px; }
.admin-login-card .flash { margin: 18px 0 0; }

.settings-vault { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.settings-vault .card-link { margin-left: 6px; }

.stat-num .unit { font-size: 0.5em; font-weight: 700; color: var(--muted); }

.notice-warn { margin: 0 0 22px; background: var(--tint-peach); color: var(--text-peach); }
.notice-warn > svg { color: var(--text-peach); }

.link-btn {
    padding: 0;
    border: 0;
    background: none;
    font: 700 0.84rem var(--font);
    color: var(--danger-text);
    cursor: pointer;
}

/* Withdraw */
.amount-row { display: flex; gap: 8px; }
.amount-row input { min-width: 0; }
.amount-row .btn { flex: none; height: 54px; }

.withdraw-form .info-list { margin-top: 18px; }

.breakdown {
    display: grid;
    gap: 8px;
    margin: 18px 0 0;
    padding: 14px 16px;
    border-radius: var(--r-sm);
    background: var(--field);
    font-size: 0.9rem;
}

.breakdown div { display: flex; justify-content: space-between; gap: 12px; }
.breakdown dt { color: var(--body); }
.breakdown dd { margin: 0; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.breakdown-total { padding-top: 8px; border-top: 1px solid var(--line); }
.breakdown-total dd { font-size: 1.1rem; color: var(--green-600); }

.withdrawal-list { margin: 0; padding: 0; list-style: none; }
.withdrawal-list li { display: grid; gap: 8px; padding: 14px 0; border-top: 1px solid var(--line); }
.withdrawal-list li:first-child { padding-top: 0; border-top: 0; }
.wl-head { display: flex; align-items: center; gap: 12px; line-height: 1.3; }
.wl-head > span:nth-child(2) { min-width: 0; margin-right: auto; }
.wl-head strong { display: block; color: var(--ink); }
.wl-head small { display: block; font-size: 0.8rem; color: var(--muted); }
.wl-detail { font-size: 0.86rem; line-height: 1.5; }
.wl-detail strong { color: var(--ink); }
.wl-note { font-size: 0.86rem; color: var(--danger-text); }

/* Admin: payouts and the vault */
.payout { display: grid; gap: 4px; }
.payout .auth-status { max-width: 320px; margin-top: 4px; text-align: left; }
.payout-details { padding: 8px 10px; border-radius: 10px; background: var(--field); color: var(--ink); white-space: normal; }

.owner-action { padding: 16px 0; border-top: 1px solid var(--line); }
.owner-action h3 { font-size: 1rem; }
.owner-action .field { margin-top: 10px; }
.owner-action > .btn { margin-top: 12px; }
.btn-light .spinner-dark { display: none; }
.btn-light.is-busy .spinner-dark { display: inline-block; }

.vault-connect { margin-top: 14px; }

.panel-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 4px 0;
    font-size: 0.85rem;
    color: var(--on-bg);
}

.panel-footer a { font-weight: 700; }

/* Modal
   ========================================================================== */

body.modal-open { overflow: hidden; }

.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 20px;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 40, 90, 0.38);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    animation: fade-in 0.2s ease;
}

.modal-card {
    position: relative;
    width: min(100%, 420px);
    padding: 34px 28px 26px;
    border-radius: var(--r-card);
    background: var(--card);
    box-shadow: 0 40px 80px -30px rgba(10, 30, 80, 0.55);
    text-align: center;
    color: var(--body);
    animation: modal-in 0.25s ease;
}

.modal-icon { width: 76px; height: 76px; border-radius: 24px; }
.modal-icon svg { width: 34px; height: 34px; }

.modal-card h2 { margin-top: 18px; font-size: 1.7rem; }
.modal-card p { margin-top: 10px; }
.modal-card strong { color: var(--ink); }

.modal-countdown { font-size: 0.86rem; color: var(--muted); }

.modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 24px;
}

.modal-actions .btn { height: 52px; padding: 0 14px; }
.modal-actions .btn svg { width: 18px; height: 18px; }

@media (max-width: 400px) {
    .modal-actions { grid-template-columns: 1fr; }
    .modal-actions .btn-primary { order: -1; }
}

@keyframes fade-in {
    from { opacity: 0; }
}

@keyframes modal-in {
    from { opacity: 0; transform: translateY(14px) scale(0.96); }
    to { opacity: 1; transform: none; }
}

/* Scroll reveal (only when JS is available)
   ========================================================================== */

.js .reveal {
    opacity: 0;
    transform: translateY(18px);
    /* Stagger delay applies to the reveal only, not to hover effects */
    transition:
        opacity 0.7s ease var(--d, 0s),
        transform 0.7s ease var(--d, 0s),
        translate 0.25s ease,
        box-shadow 0.25s ease;
}

.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js .reveal { opacity: 1; transform: none; transition: none; }
    .modal-backdrop, .modal-card,
    .cloud, .footer-cta-disc { animation: none; }
}

/* Deposit and withdraw pages: the forms get the wider column */
@media (min-width: 1100px) {
    .wallet-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
}

/* Deposit page: package amounts as one-tap chips */
/* The chips fill the amount with a script, so they only show when scripts run */
.amount-chips {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 18px;
}

.chip {
    height: 36px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: var(--field);
    font: 700 0.84rem var(--font);
    color: var(--body);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.js .amount-chips { display: flex; }
.chip:hover { background: var(--tint-blue); color: var(--text-blue); }

/* Staking page: the buy confirmation opens inside the package card */
.package-buy { margin-top: auto; }
.package-buy summary { width: 100%; }
.package-buy form { width: auto; }
.package-buy p { margin: 0; }
.package-card .btn-light { margin-top: auto; }

/* Light / dark theme switch: shows a moon in the light theme and a sun in the dark one. It needs the script. */
.theme-toggle {
    display: none;
    flex: none;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--card);
    box-shadow: var(--shadow-soft);
    color: var(--ink);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.js .theme-toggle { display: inline-grid; }
.theme-toggle:hover { color: var(--blue); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun,
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

/* Switching themes (site.js). With view transitions the whole page cross-fades, slower and softer than the
   browser's default; other browsers fade the colours for a moment instead. */
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.5s;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-fading,
.theme-fading *,
.theme-fading *::before,
.theme-fading *::after {
    transition: background-color 0.4s ease, border-color 0.4s ease, color 0.4s ease, fill 0.4s ease, stroke 0.4s ease, box-shadow 0.4s ease !important;
}

.theme-switching .theme-toggle svg { animation: theme-icon-in 0.55s cubic-bezier(0.34, 1.4, 0.5, 1); }

@keyframes theme-icon-in {
    from { opacity: 0; transform: rotate(-90deg) scale(0.4); }
    to { opacity: 1; transform: none; }
}

/* In the site header the switch sits on the bar itself, so it needs no shadow of its own */
.header-bar .theme-toggle { background: var(--field); box-shadow: none; }

@media (max-width: 960px) {
    .header-bar .theme-toggle { margin-left: auto; }
    .header-bar .theme-toggle + .nav-toggle { margin-left: 0; }
}

/* Admin sign-in page: top right corner */
.admin-login-body .theme-toggle { position: fixed; top: 16px; right: 16px; }

/* Admin → Members: the Log in button next to Open */
.row-actions { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; }
.row-actions form { margin: 0; }
.row-actions .btn svg { width: 16px; height: 16px; }

/* Member panel opened by an admin ("Log in as member") */
.impersonation-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 14px;
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: var(--r-md);
    background: var(--tint-peach);
    box-shadow: inset 0 0 0 1.5px rgba(242, 121, 75, 0.35);
    font-size: 0.88rem;
    line-height: 1.4;
    color: var(--body);
}

.impersonation-bar > span:not(.icon-3d) { flex: 1 1 220px; min-width: 0; }
.impersonation-bar strong { display: block; color: var(--text-peach); }
.impersonation-bar form { margin: 0; }
.impersonation-bar .btn svg { width: 16px; height: 16px; }


/* Support chat: the member panel bubble and Admin → Support chat
   ========================================================================== */

.support {
    position: fixed;
    right: 24px;
    bottom: calc(24px + env(safe-area-inset-bottom));
    z-index: 70;
}

/* Phones and tablets: above the bottom menu bar */
@media (max-width: 1023px) {
    .support { right: 16px; bottom: calc(104px + env(safe-area-inset-bottom)); }
}

.support-bubble {
    position: relative;
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: var(--grad-blue);
    box-shadow: var(--glossy), 0 18px 30px -14px rgba(30, 94, 255, 0.75);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.support-bubble:hover { transform: translateY(-2px); }
.support-bubble svg { width: 27px; height: 27px; }
.support.is-open .support-bubble { visibility: hidden; }

.support-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font: 800 0.72rem/22px var(--font);
    text-align: center;
    box-shadow: 0 0 0 3px var(--bg);
}

.support-panel {
    position: fixed;
    right: 24px;
    bottom: calc(24px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    width: 380px;
    height: min(600px, calc(100dvh - 48px));
    overflow: hidden;
    border-radius: var(--r-lg);
    background: var(--card);
    box-shadow: 0 40px 80px -30px rgba(10, 30, 80, 0.55), 0 0 0 1px var(--line);
    animation: modal-in 0.2s ease;
}

@media (max-width: 1023px) {
    .support-panel { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); height: min(600px, calc(100dvh - 32px)); }
}

/* Phones: the chat takes the whole screen */
@media (max-width: 640px) {
    .support-panel { inset: 0; width: auto; height: auto; border-radius: 0; box-shadow: none; }
    body.support-open { overflow: hidden; }
}

.support-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px 14px 16px;
    background: var(--grad-blue);
    color: #fff;
}

@media (max-width: 640px) {
    .support-head { padding-top: calc(14px + env(safe-area-inset-top)); }
}

.support-head-text { flex: 1; min-width: 0; }
.support-head-text strong { display: block; color: #fff; font-size: 1.02rem; }
.support-head-text small { display: block; color: rgba(255, 255, 255, 0.82); font-size: 0.8rem; }

.support-close {
    display: grid;
    flex: none;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    cursor: pointer;
}

.support-close:hover { background: rgba(255, 255, 255, 0.26); }
.support-close svg { width: 20px; height: 20px; }

.support-log {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;
    min-height: 0;
    padding: 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--bg);
}

.support-intro {
    margin-bottom: 8px;
    padding: 14px 16px;
    border-radius: var(--r-md);
    background: var(--card);
    box-shadow: var(--shadow-soft);
    color: var(--body);
    font-size: 0.9rem;
}

.support-intro strong { display: block; margin-bottom: 2px; color: var(--ink); }

.support-loading { margin: 12px 0; color: var(--muted); font-size: 0.85rem; text-align: center; }

.support-day {
    align-self: center;
    margin: 10px 0 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--field);
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
}

.support-msg {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 82%;
}

.support-msg.is-mine { align-self: flex-end; align-items: flex-end; }

.support-text {
    padding: 10px 14px;
    border-radius: 18px 18px 18px 6px;
    background: var(--card);
    box-shadow: var(--shadow-soft);
    color: var(--ink);
    font-size: 0.94rem;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.support-msg.is-mine .support-text { border-radius: 18px 18px 6px 18px; background: var(--grad-blue); color: #fff; }

.support-meta { margin: 3px 6px 6px; color: var(--muted); font-size: 0.72rem; }

.support-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin: 0;
    padding: 12px;
    border-top: 1px solid var(--line);
    background: var(--card);
}

@media (max-width: 640px) {
    .support-panel .support-form { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
}

.support-form textarea {
    flex: 1;
    min-width: 0;
    height: 46px;
    min-height: 46px;
    max-height: 132px;
    padding: 10px 14px;
    border: 2px solid transparent;
    border-radius: 16px;
    background: var(--field);
    color: var(--ink);
    font: 500 0.95rem/1.4 var(--font);
    resize: none;
    outline: none;
    /* support-chat.js turns the scrollbar on only once a message is taller than the box can grow */
    overflow-y: hidden;
    scrollbar-width: thin;
}

.support-form textarea:focus { border-color: rgba(30, 94, 255, 0.55); background: var(--card); }

.support-send {
    display: grid;
    flex: none;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    border-radius: 16px;
    background: var(--grad-blue);
    box-shadow: var(--glossy);
    color: #fff;
    cursor: pointer;
}

.support-send svg { width: 20px; height: 20px; margin-left: -2px; }
.support-send:disabled { opacity: 0.6; cursor: default; }

.support-error { margin: 0; padding: 0 14px 12px; background: var(--card); color: var(--danger-text); font-size: 0.84rem; }
.support-note { margin: 0; padding: 14px 16px; border-top: 1px solid var(--line); background: var(--card); color: var(--body); font-size: 0.86rem; }

/* Admin → Support chat: conversation page */
.support-page { display: grid; gap: 18px; margin-top: 14px; }

@media (min-width: 1024px) {
    .support-page { grid-template-columns: 280px minmax(0, 1fr); align-items: start; }
}

.support-member { display: grid; gap: 16px; }
.support-facts { display: grid; gap: 10px; margin: 0; }
.support-facts div { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 0.9rem; }
.support-facts dt { color: var(--muted); }
.support-facts dd { margin: 0; color: var(--ink); font-weight: 600; }

.panel-card.support-chat {
    display: flex;
    flex-direction: column;
    height: min(680px, calc(100dvh - 200px));
    min-height: 460px;
    padding: 0;
    overflow: hidden;
}

/* Member → Support: the chat beside tips, then common questions */
@media (min-width: 1024px) {
    .support-page.is-member { grid-template-columns: minmax(0, 1fr) 320px; }
}

.support-chat .support-head { padding-top: 14px; }
.support-side { display: grid; gap: 18px; align-content: start; }
.support-side .panel-card { margin: 0; }
.support-side .rules-list { margin-top: 0; }
.faq-card { margin-top: 18px; }
.faq-list { display: grid; gap: 8px; }
.faq { border: 1px solid var(--line); border-radius: 16px; background: var(--card); }

.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    color: var(--ink);
    font-weight: 700;
    list-style: none;
    cursor: pointer;
}

.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { flex: none; width: 18px; height: 18px; color: var(--muted); transition: transform 0.2s ease; }
.faq[open] summary svg { transform: rotate(90deg); }
.faq p { margin: 0; padding: 0 16px 16px; font-size: 0.93rem; line-height: 1.55; }

/* Admin → Support chat: conversation list */
.inbox { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }

.inbox-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: var(--r-md);
    color: var(--body);
    transition: background-color 0.15s ease;
}

.inbox-row:hover { background: var(--field); }
.inbox-row.is-unread { background: var(--tint-blue); }
.inbox-main { display: grid; flex: 1; gap: 3px; min-width: 0; }
.inbox-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.inbox-top strong { color: var(--ink); }
.inbox-top small { color: var(--muted); font-size: 0.78rem; }
.inbox-preview { overflow: hidden; font-size: 0.9rem; white-space: nowrap; text-overflow: ellipsis; }
.inbox-row.is-unread .inbox-preview { color: var(--ink); font-weight: 600; }
.inbox-side { display: grid; flex: none; justify-items: end; gap: 6px; color: var(--muted); font-size: 0.78rem; }

/* Unread counts in the admin menus */
.nav-badge {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1;
}

.side-nav .nav-badge { margin-left: auto; }
.menu-tile { position: relative; }
.menu-tile .nav-badge { position: absolute; top: 8px; right: 8px; }
.menu-trigger { position: relative; }

.menu-dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 2px var(--card);
}

/* Rank rewards: member Rewards page and the dashboard welcome bar
   ========================================================================== */

.rank-next {
    display: grid;
    gap: 16px;
    margin-top: 18px;
    padding: 18px;
    border-radius: var(--r-md);
    background: var(--field);
}

.rank-next-head { display: flex; align-items: center; gap: 12px; }
.rank-next-head small { display: block; color: var(--muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.rank-next-head strong { display: block; color: var(--ink); font-family: var(--font-head); font-size: 1.25rem; }
.rank-next-reward { margin-left: auto; text-align: right; }
.rank-next-reward strong { color: var(--text-green); }

.rank-badge {
    display: grid;
    flex: none;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffd27a 0%, #f5a524 60%, #e8921a 100%);
    box-shadow: var(--glossy), 0 10px 18px -10px rgba(232, 146, 26, 0.7);
    color: #fff;
}

.rank-badge svg { width: 24px; height: 24px; }

.rank-progress { display: grid; gap: 7px; }
.rank-progress-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; color: var(--body); font-size: 0.9rem; }
.rank-progress-top span:last-child { margin-left: auto; white-space: nowrap; }
.rank-progress-top strong { color: var(--ink); }
.rank-progress small { color: var(--muted); font-size: 0.78rem; }
.rank-progress .level-bar { display: block; background: var(--card); }

.rank-list { display: grid; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }

/* Level income on the member rewards page: one row per level, dimmed until it unlocks */
.level-income-list { display: grid; gap: 6px; margin: 16px 0 0; padding: 0; list-style: none; }

.level-income-item {
    display: grid;
    grid-template-columns: 76px 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px 12px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    font-size: 0.86rem;
    color: var(--muted);
}

.level-income-item.is-open { border-color: rgba(30, 94, 255, 0.35); background: var(--card); }
.level-income-item .level-share { font-weight: 700; color: var(--ink); }
.level-income-item.is-open .level-need { color: var(--green); font-weight: 600; }
.level-income-item .level-earned { font-weight: 700; color: var(--ink); text-align: right; }

.card-note { margin: 14px 0 0; font-size: 0.85rem; color: var(--muted); }
.card-note strong { color: var(--ink); }

@media (max-width: 560px) {
    .level-income-item { grid-template-columns: 62px 48px minmax(0, 1fr) auto; gap: 4px 8px; padding: 9px 11px; font-size: 0.8rem; }
}

.rank-item {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) auto 150px;
    grid-template-areas: "name needs reward status";
    align-items: center;
    gap: 6px 14px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
}

.rank-item.is-next { border-color: rgba(30, 94, 255, 0.45); background: var(--tint-blue); }
.rank-item.is-done { border-color: transparent; background: var(--tint-green); }
.rank-name { grid-area: name; color: var(--ink); font-family: var(--font-head); font-weight: 800; letter-spacing: 0.04em; }
.rank-needs { grid-area: needs; color: var(--body); font-size: 0.86rem; }
.rank-reward { grid-area: reward; color: var(--ink); font-weight: 800; }
.rank-status { grid-area: status; justify-self: end; }
.rank-note { grid-column: 1 / -1; color: var(--danger-text); font-size: 0.82rem; }

@media (max-width: 640px) {
    .rank-item {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "name status" "needs needs" "reward reward";
    }
}

.welcome-rank {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0 0 6px;
    padding: 5px 12px 5px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
}

.welcome-rank svg { width: 16px; height: 16px; color: #ffd27a; fill: #ffd27a; }

/* Admin → Rank rewards: the figures a rank was reached with */
.rank-intro { margin-bottom: 16px; }
.rank-info { flex: 1; }
.rank-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 16px; margin: 8px 0 2px; }
.rank-facts div { display: grid; gap: 1px; }
.rank-facts dt { color: var(--muted); font-size: 0.74rem; font-weight: 700; }
.rank-facts dd { margin: 0; color: var(--ink); font-size: 0.9rem; font-weight: 600; }

/* Admin → member page: a password shown once after View password or Reset password */
.password-reveal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: var(--r-sm);
    background: var(--tint-peach);
    color: var(--ink);
}

.password-reveal small { flex-basis: 100%; color: var(--text-peach); font-size: 0.76rem; font-weight: 700; }
.password-reveal .mono { font-size: 1.05rem; font-weight: 700; overflow-wrap: anywhere; }

/* Admin dashboard: what needs attention, the 14-day charts and the three-column row
   ========================================================================== */

.dash-tasks { margin-bottom: 22px; }
.dash-tasks .empty-state { padding: 10px 0 4px; }

.task-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.task-tile {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 2px 14px;
    height: 100%;
    padding: 14px 16px;
    border-radius: var(--r-md);
    background: var(--field);
    color: var(--body);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.task-tile:hover { background: var(--tint-blue); transform: translateY(-2px); }
.task-tile .icon-3d { grid-row: span 3; }
.task-count { color: var(--ink); font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.task-label { color: var(--ink); font-size: 0.92rem; font-weight: 700; }
.task-tile small { color: var(--muted); font-size: 0.78rem; }

.card-head-sub { margin-top: 20px; }
.card-head-sub h3 { font-size: 1rem; }

.mini-chart { margin-top: 18px; }
.mini-chart:first-of-type { margin-top: 6px; }

.mini-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.mini-head strong { color: var(--ink); font-size: 0.95rem; }
.mini-head span { color: var(--muted); font-size: 0.82rem; }

.mini-bars {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    height: 92px;
    padding: 0 2px;
}

.mini-bar {
    display: flex;
    flex: 1;
    align-items: flex-end;
    height: 100%;
    min-width: 0;
    border-radius: 6px;
    background: var(--field);
}

.mini-bar i {
    display: block;
    width: 100%;
    height: var(--h, 2%);
    border-radius: 6px;
    background: var(--grad-blue);
}

.mini-bar:last-child i { background: linear-gradient(180deg, #5bd47a 0%, #2db34f 100%); }

.mini-axis {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.74rem;
}

@media (min-width: 1100px) {
    .panel-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Linking a wallet: the two ways in sit side by side */
.wallet-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.wallet-link .wallet-actions .btn { margin-top: 0; }
.usdt-pay .btn-block + .auth-status + .btn-block { margin-top: 4px; }
