:root {
    --green: #2563eb;
    --green-dark: #1d4ed8;
    --green-light: #3b82f6;
    --green-soft: #eff6ff;
    --black: #0a0e1a;
    --black-soft: #161b18;
    --white: #ffffff;
    --gray-50: #f6f8f7;
    --gray-100: #eef1ef;
    --gray-200: #dfe4e1;
    --gray-400: #9aa5a0;
    --gray-600: #5b6661;
    --gray-900: #1f2925;
    --red: #dc2626;
    --amber: #d97706;
    --blue: #2563eb;
    --radius: 12px;
    --shadow: 0 8px 24px rgba(11, 15, 13, .08);
    --shadow-lg: 0 20px 50px rgba(11, 15, 13, .14);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    font-size: 15px;
    line-height: 1.55;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overflow-x: hidden;
}

a { color: var(--green-dark); text-decoration: none; }
a:hover { color: var(--green); }

h1, h2, h3, h4 { margin: 0 0 .6rem; line-height: 1.25; font-weight: 700; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 .8rem; }

/* ---------------- Layout ---------------- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 480px; }

.app-shell { display: flex; min-height: 100vh; }

.impersonation-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 9px 16px;
    background: var(--amber, #d97706);
    color: var(--white);
    font-size: .88rem;
    text-align: center;
}
.impersonation-bar strong { color: var(--white); }
.impersonation-bar form { margin: 0; }

.sidebar {
    width: 250px;
    flex: 0 0 250px;
    background: var(--black);
    color: #cfd6d2;
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.sidebar .brand {
    display: flex; align-items: center; gap: 10px;
    color: var(--white); font-weight: 800; font-size: 1.15rem;
    padding: 6px 10px 18px; letter-spacing: .3px;
}
.sidebar .brand span.logo {
    width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
    background: var(--green); color: var(--white); font-weight: 800;
}
.sidebar .brand img.logo {
    width: 34px; height: 34px; border-radius: 9px; object-fit: cover; flex-shrink: 0;
}
.sidebar .nav-label {
    font-size: .68rem; text-transform: uppercase; letter-spacing: .12em;
    color: #6d7a74; padding: 14px 10px 6px;
}
.sidebar a.nav-link {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 11px; border-radius: 9px; color: #cfd6d2; font-size: .92rem;
}
.sidebar a.nav-link:hover { background: var(--black-soft); color: var(--white); }
.sidebar a.nav-link.active { background: var(--green); color: var(--white); font-weight: 600; }
.sidebar .spacer { flex: 1 1 auto; }

.main-area { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 14px 24px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    position: sticky; top: 0; z-index: 20;
}
.topbar .page-title { font-size: 1.15rem; font-weight: 700; margin: 0; }
.topbar .topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar .topbar-left .page-title { margin: 0; }
.topbar .topbar-right { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
    display: none; flex: 0 0 auto;
    flex-direction: column; justify-content: center; gap: 5px;
    width: 40px; height: 40px; padding: 9px;
    border: 1px solid var(--gray-200); border-radius: 10px;
    background: var(--white); cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--gray-900); border-radius: 2px; }
.nav-overlay { display: none; }
body.nav-open { overflow: hidden; }
.drawer-user { display: none; }

.page { padding: 24px; flex: 1 1 auto; }

/* ---------------- Cards ---------------- */
.card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.card + .card { margin-top: 18px; }
.card-header {
    padding: 16px 18px; border-bottom: 1px solid var(--gray-100);
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.card-header h2, .card-header h3 { margin: 0; font-size: 1.02rem; }
.card-body { padding: 18px; }
.card-footer { padding: 14px 18px; border-top: 1px solid var(--gray-100); }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

/* ---------------- Stat cards ---------------- */
.stat {
    background: var(--white); border: 1px solid var(--gray-200);
    border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
    display: flex; flex-direction: column; gap: 4px;
}
.stat .stat-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gray-600); }
.stat .stat-value { font-size: 1.6rem; font-weight: 800; }
.stat .stat-hint { font-size: .8rem; color: var(--gray-400); }
.stat.accent { background: linear-gradient(135deg, var(--black) 0%, #16321f 100%); color: var(--white); border-color: transparent; }
.stat.accent .stat-label, .stat.accent .stat-hint { color: #a7b3ad; }
.stat.green { background: var(--green); color: var(--white); border-color: transparent; }
.stat.green .stat-label, .stat.green .stat-hint { color: rgba(255,255,255,.8); }

/* ---------------- Buttons ---------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 16px; border-radius: 9px; border: 1px solid transparent;
    font-size: .92rem; font-weight: 600; cursor: pointer;
    background: var(--green); color: var(--white); transition: .15s ease;
}
.btn:hover { background: var(--green-dark); color: var(--white); }
.btn-black { background: var(--black); }
.btn-black:hover { background: var(--black-soft); }
.btn-outline { background: transparent; border-color: var(--gray-200); color: var(--gray-900); }
.btn-outline:hover { background: var(--gray-100); color: var(--gray-900); }
.btn-white { background: var(--white); color: var(--black); }
.btn-white:hover { background: var(--green-soft); color: var(--black); }
.btn-ghost-light { background: rgba(255,255,255,.08); color: var(--white); border-color: rgba(255,255,255,.2); }
.btn-ghost-light:hover { background: rgba(255,255,255,.16); color: var(--white); }
.btn-danger { background: var(--red); }
.btn-danger:hover { filter: brightness(.92); color: var(--white); }
.btn-sm { padding: 6px 11px; font-size: .82rem; border-radius: 7px; }
.btn-block { width: 100%; }
.btn-copied, .btn-copied:hover { background: var(--green); color: var(--white); }
.btn[disabled], .btn.disabled { opacity: .55; pointer-events: none; }

.btn-group { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------------- Forms ---------------- */
label { display: block; font-size: .84rem; font-weight: 600; margin-bottom: 5px; color: var(--gray-900); }
.input, select, textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--gray-200);
    border-radius: 9px; background: var(--white); font-size: .92rem; font-family: inherit; color: var(--gray-900);
}
.input:focus, select:focus, textarea:focus { outline: 2px solid rgba(22,163,74,.25); border-color: var(--green); }
textarea { min-height: 90px; resize: vertical; }
.form-group { margin-bottom: 14px; }
.form-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.form-check { display: flex; align-items: center; gap: 8px; }
.form-check input { width: 16px; height: 16px; }
.form-check label { margin: 0; font-weight: 500; }
.help { font-size: .78rem; color: var(--gray-600); margin-top: 4px; }
.inline-form { display: inline; }

/* ---------------- Name suggestions ---------------- */
.suggest-wrap { position: relative; }
.suggest-list {
    position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; right: 0;
    background: var(--white); border: 1px solid var(--gray-200); border-radius: 10px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .12);
    max-height: 260px; overflow-y: auto;
}
.suggest-item {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    width: 100%; padding: 10px 12px; border: 0; background: transparent;
    font: inherit; font-size: .9rem; text-align: left; color: var(--gray-900); cursor: pointer;
}
.suggest-item:hover, .suggest-item.active { background: var(--green-soft); }
.suggest-meta { font-size: .78rem; color: var(--gray-600); }
.suggest-empty { padding: 10px 12px; font-size: .85rem; color: var(--gray-400); }

/* ---------------- Tables ---------------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.table th {
    text-align: left; padding: 11px 14px; background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200); font-size: .76rem;
    text-transform: uppercase; letter-spacing: .07em; color: var(--gray-600); white-space: nowrap;
}
table.table td { padding: 12px 14px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
table.table tbody tr:hover { background: var(--green-soft); }
table.table .right, th.right { text-align: right; }
.empty { padding: 32px 16px; text-align: center; color: var(--gray-400); }

/* ---------------- Badges ---------------- */
.badge {
    display: inline-block; padding: 3px 9px; border-radius: 999px;
    font-size: .74rem; font-weight: 700; letter-spacing: .03em;
}
.badge-success { background: rgba(22,163,74,.12); color: var(--green-dark); }
.badge-warning { background: rgba(217,119,6,.13); color: var(--amber); }
.badge-danger { background: rgba(220,38,38,.12); color: var(--red); }
.badge-info { background: rgba(37,99,235,.12); color: var(--blue); }
.badge-dark { background: var(--black); color: var(--white); }

/* ---------------- Alerts ---------------- */
.alert {
    padding: 12px 15px; border-radius: 10px; margin-bottom: 18px;
    border: 1px solid transparent; font-size: .9rem;
}
.alert-success { background: var(--green-soft); border-color: rgba(22,163,74,.3); color: var(--green-dark); }
.alert-error { background: #fef2f2; border-color: rgba(220,38,38,.25); color: var(--red); }
.alert-info { background: var(--gray-100); border-color: var(--gray-200); color: var(--gray-900); }

/* ---------------- Progress ---------------- */
.progress { height: 8px; background: var(--gray-100); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--green); border-radius: 999px; }

/* ---------------- Public site ---------------- */
.public-body { background: var(--white); }
.site-header {
    background: var(--black); color: var(--white);
    padding: 16px 0; position: sticky; top: 0; z-index: 30;
}
.site-header .inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.site-nav { display: flex; gap: 22px; align-items: center; }
.site-nav a { color: #c7d0cb; font-size: .93rem; font-weight: 500; }
.site-nav a:hover { color: var(--green-light); }
.brand-light { display: flex; align-items: center; gap: 10px; color: var(--white); font-weight: 800; font-size: 1.2rem; }
.brand-light span.logo {
    width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
    background: var(--green); color: var(--white);
}

/* Public site: hamburger toggle (hidden on desktop) */
.site-nav-toggle {
    display: none; flex: 0 0 auto;
    flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 11px;
    border: 1px solid rgba(255,255,255,.2); border-radius: 10px;
    background: rgba(255,255,255,.06); cursor: pointer;
}
.site-nav-toggle span { display: block; height: 2px; width: 100%; background: var(--white); border-radius: 2px; transition: .2s ease; }
.site-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.site-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.site-nav-overlay { display: none; }

.hero {
    background:
        radial-gradient(900px 420px at 85% -10%, rgba(34,197,94,.25), transparent 60%),
        linear-gradient(160deg, var(--black) 0%, #0d1a12 100%);
    color: var(--white);
    padding: 80px 0 90px;
}
.hero h1 { font-size: 2.9rem; letter-spacing: -.02em; max-width: 15ch; }
.hero h1 span { color: var(--green-light); }
.hero p.lead { font-size: 1.05rem; color: #b6c1bb; max-width: 60ch; }
.hero .hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

.ticker { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 40px; }
.ticker .tick {
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px; padding: 12px 16px; min-width: 150px;
}
.ticker .tick b { display: block; font-size: 1.25rem; color: var(--green-light); }
.ticker .tick span { font-size: .78rem; color: #97a39d; text-transform: uppercase; letter-spacing: .08em; }

.section { padding: 64px 0; }
.section.alt { background: var(--gray-50); }
.section.dark { background: var(--black); color: var(--white); }
.section-head { max-width: 62ch; margin-bottom: 34px; }
.section-head h2 { font-size: 2rem; }
.section-head p { color: var(--gray-600); }
.section.dark .section-head p { color: #a7b3ad; }

.feature { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.feature .icon {
    width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center;
    background: var(--green-soft); color: var(--green-dark); font-weight: 800; margin-bottom: 12px;
}
.feature h3 { font-size: 1.05rem; }
.feature p { color: var(--gray-600); font-size: .92rem; margin: 0; }

.price-card {
    background: var(--white); border: 2px solid var(--gray-200); border-radius: 16px;
    padding: 24px; display: flex; flex-direction: column; gap: 10px; position: relative;
}
.price-card.featured { border-color: var(--green); box-shadow: var(--shadow-lg); }
.price-card .tag {
    position: absolute; top: -12px; right: 18px; background: var(--green); color: var(--white);
    font-size: .7rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; letter-spacing: .06em;
}
.price-card .amount { font-size: 2.2rem; font-weight: 800; }
.price-card ul { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 8px; font-size: .92rem; }
.price-card ul li::before { content: "\2713"; color: var(--green); font-weight: 800; margin-right: 8px; }

.cta-band { background: var(--green); color: var(--white); padding: 54px 0; text-align: center; }
.cta-band h2 { font-size: 1.9rem; }
.cta-band p { color: rgba(255,255,255,.9); }

.site-footer { background: var(--black); color: #93a09a; padding: 40px 0; font-size: .88rem; }
.site-footer .cols { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer .cols > div { flex: 1 1 220px; }
.site-footer a { color: #c7d0cb; }
.site-footer a:hover { color: var(--green-light); }

/* ---------------- Auth ---------------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: linear-gradient(160deg, var(--black) 0%, #0d1a12 100%); color: var(--white); padding: 48px; display: flex; flex-direction: column; justify-content: center; }
.auth-side h2 { font-size: 1.9rem; }
.auth-side p { color: #a7b3ad; }
.auth-main { display: grid; place-items: center; padding: 40px 24px; background: var(--gray-50); }
.auth-card { width: 100%; max-width: 430px; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-lg); }
.auth-card h1 { font-size: 1.5rem; }
.auth-card .sub { color: var(--gray-600); font-size: .9rem; margin-bottom: 18px; }
.otp-input { letter-spacing: .5em; text-align: center; font-size: 1.3rem; font-weight: 700; }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* ---------------- Misc ---------------- */
.muted { color: var(--gray-600); }
.small { font-size: .82rem; }
.strong { font-weight: 700; }
.text-green { color: var(--green-dark); }
.text-red { color: var(--red); }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.flex { display: flex; } .between { justify-content: space-between; } .center { align-items: center; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; }
.flex-wrap { flex-wrap: wrap; }
.pill-list { display: flex; gap: 8px; flex-wrap: wrap; }
.code-box {
    background: var(--black); color: var(--green-light); padding: 16px; border-radius: 10px;
    font-size: 1.4rem; font-weight: 800; letter-spacing: .18em; text-align: center;
}
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--gray-200); margin-bottom: 18px; }
.tabs a { padding: 10px 14px; border-bottom: 2px solid transparent; font-weight: 600; font-size: .9rem; color: var(--gray-600); }
.tabs a.active { color: var(--green-dark); border-bottom-color: var(--green); }
.pagination { display: flex; gap: 6px; list-style: none; padding: 0; margin: 18px 0 0; flex-wrap: wrap; }
.pagination li span, .pagination li a {
    display: block; padding: 7px 12px; border: 1px solid var(--gray-200); border-radius: 8px;
    background: var(--white); font-size: .85rem;
}
.pagination li.active span { background: var(--green); border-color: var(--green); color: var(--white); font-weight: 700; }
.rank-card { border-left: 4px solid var(--gray-200); }
.rank-card.held { border-left-color: var(--green); }
.rank-level { font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gray-600); }
.badge-light { background: var(--gray-100); color: var(--gray-600); }
.badge-green { background: var(--green); color: var(--white); }
table.table-sm td, table.table-sm th { padding: 7px 10px; font-size: .82rem; }
.wallet-tile { display: flex; flex-direction: column; gap: 2px; }
.wallet-tile .label { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--gray-600); }
.wallet-tile .value { font-size: 1.3rem; font-weight: 800; }
.member-row { display: flex; align-items: center; gap: 10px; }
.avatar {
    width: 34px; height: 34px; border-radius: 50%; background: var(--green-soft);
    color: var(--green-dark); display: grid; place-items: center; font-weight: 800; font-size: .82rem;
}
@media (max-width: 1024px) {
    .app-shell { flex-direction: column; }
    .nav-toggle { display: inline-flex; }
    .sidebar {
        position: fixed; top: 0; left: 0; bottom: 0;
        width: 82%; max-width: 300px; height: 100%;
        flex-direction: column; align-items: stretch; gap: 6px;
        padding: 18px 16px;
        overflow-y: auto; overflow-x: hidden;
        transform: translateX(-100%);
        transition: transform .25s ease;
        z-index: 60;
        -webkit-overflow-scrolling: touch;
    }
    .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
    .sidebar .nav-label { display: block; }
    .sidebar .spacer { flex: 1 1 auto; }
    .sidebar .brand { padding: 0 0 16px; font-size: 1.1rem; }
    .sidebar a.nav-link { padding: 10px 12px; }
    .topbar-user { display: none; }
    .drawer-user {
        display: flex; align-items: center; gap: 10px;
        padding: 0 4px 14px; margin-bottom: 6px;
        border-bottom: 1px solid rgba(255, 255, 255, .12);
    }
    .drawer-user .avatar { background: var(--green); color: var(--white); flex: 0 0 auto; }
    .drawer-user-info { min-width: 0; flex: 1 1 auto; }
    .drawer-user-info .strong { color: var(--white); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .drawer-user-info .small { color: #a7b3ad; }
    .drawer-user .badge-success { margin-left: auto; flex: 0 0 auto; }
    .nav-overlay.show { display: block; position: fixed; inset: 0; background: rgba(11, 15, 13, .5); z-index: 55; }
    .topbar { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 16px; }
    .topbar .topbar-left { width: 100%; }
}

@media (max-width: 900px) {
    .site-nav-toggle { display: inline-flex; }
    .site-header .inner { position: relative; }
    .site-nav {
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--black);
        border-top: 1px solid rgba(255,255,255,.1);
        padding: 8px 20px 16px;
        display: none;
        box-shadow: var(--shadow-lg);
    }
    .site-nav.open { display: flex; }
    .site-nav a {
        display: flex; align-items: center; min-height: 48px;
        padding: 12px 4px; font-size: 1rem;
        border-bottom: 1px solid rgba(255,255,255,.07);
    }
    .site-nav a:last-child { border-bottom: 0; }
    .site-nav a.btn { margin-top: 12px; justify-content: center; border-bottom: 0; }
    .site-nav-overlay.show { display: block; position: fixed; inset: 0; background: rgba(11,15,13,.5); z-index: 25; }
}

@media (max-width: 640px) {
    body { font-size: 14px; }
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.3rem; }
    h3 { font-size: 1.05rem; }
    .page { padding: 16px; }
    .grid { gap: 14px; }
    .card-header { padding: 13px 14px; }
    .card-body { padding: 14px; }
    .card-footer { padding: 12px 14px; }
    .card + .card { margin-top: 14px; }
    .stat { padding: 15px; }
    .stat .stat-value { font-size: 1.35rem; }
    .topbar .page-title { font-size: 1.05rem; }
    .topbar .topbar-right { width: 100%; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
    .topbar .member-row { min-width: 0; }
    .topbar .member-row > div { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
    table.table th, table.table td { padding: 10px; }
    .code-box { font-size: 1rem; letter-spacing: .06em; overflow-wrap: anywhere; word-break: break-word; }
    .modal { padding: 18px; }

    /* Public site */
    .section { padding: 40px 0; }
    .section-head { margin-bottom: 24px; }
    .site-header { padding: 12px 0; }
    .brand-light { font-size: 1.05rem; }
    .site-footer { padding: 32px 0; }
    .site-footer .cols { flex-direction: column; gap: 18px; }

    /* Auth */
    .auth-card { padding: 22px; }
}

/* Touch targets + form zoom prevention on phones */
@media (max-width: 640px) {
    .btn { min-height: 44px; }
    .btn-sm { min-height: 38px; }
    .nav-link { min-height: 44px; }
    /* 16px prevents iOS Safari auto-zoom on focus */
    .input, select, textarea { font-size: 16px; }
    .pagination li span, .pagination li a { min-height: 44px; display: inline-flex; align-items: center; }
    .form-check input { width: 20px; height: 20px; }
}

@media (max-width: 420px) {
    .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .stat .stat-value { font-size: 1.2rem; overflow-wrap: anywhere; }
    .stat .stat-label { font-size: .7rem; }
    .stat .stat-hint { font-size: .72rem; }
    .sidebar a.nav-link { font-size: .82rem; padding: 7px 10px; }
}

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

/* ---------------- Live trading feed ---------------- */
.live-dot {
    width: 9px; height: 9px; border-radius: 50%; background: var(--green-light);
    display: inline-block; vertical-align: middle; margin-right: 8px;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: livePulse 1.8s infinite;
}
.live-dot-sm { width: 7px; height: 7px; margin-right: 6px; }
@keyframes livePulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); }
    70% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.section.dark .stat { background: #131815; border-color: #232b26; color: var(--white); }
.section.dark .stat .stat-label { color: #a7b3ad; }
.section.dark .stat .stat-hint { color: #6d7a74; }
.section.dark .stat.green { background: var(--green); border-color: transparent; }
.section.dark .card { border-color: #232b26; }
.section.dark .table thead th { background: #1a211c; color: #cfd6d2; border-color: #2f3831; }
.section.dark .table td { color: #ffffff; border-color: #2f3831; background: #131815; }
.section.dark .muted { color: #b9c2bd; }
.section.dark .small { color: #ffffff; }
#live-feed-body tr { transition: background .4s ease; }

/* ---------------- Modal ---------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 15, 13, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
}
.modal-overlay[hidden] { display: none; }
.modal {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    padding: 22px;
    animation: modalPop .18s ease;
}
@keyframes modalPop {
    from { opacity: 0; transform: translateY(8px) scale(.98); }
    to { opacity: 1; transform: none; }
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.modal-header h3 { margin: 0; font-size: 1.15rem; }
.modal-x {
    border: 0;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0 4px;
}
.modal-x:hover { color: var(--gray-900); }
.modal-body { margin-top: 4px; }
body.modal-open { overflow: hidden; }
.otp-input {
    letter-spacing: 8px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 600;
}
/* ---------------- LiveTrades: market data ---------------- */
.mono { font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace; font-variant-numeric: tabular-nums; }
.narrow { max-width: 780px; }
.right { text-align: right; }
table .right, th.right { text-align: right; }

.card-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px; flex-wrap: wrap; padding: 16px 18px; border-bottom: 1px solid var(--gray-100);
}
.card-head h2 { margin: 0; font-size: 1.05rem; }
.card.flush { overflow-x: auto; }

.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: .85rem; margin: 0 0 14px; }
.breadcrumb a { color: var(--gray-600); }
.breadcrumb a:hover { color: var(--green); }

/* Venue feed status */
.venue-status { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin: 0 0 18px; }
.venue-dot { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--gray-600); }
.venue-dot i { width: 8px; height: 8px; border-radius: 50%; background: var(--gray-400); display: inline-block; }
.venue-dot.up i { background: var(--green-light); box-shadow: 0 0 0 3px rgba(34,197,94,.18); }
.venue-dot.down i { background: var(--red); box-shadow: 0 0 0 3px rgba(220,38,38,.16); }
.alert-warn { background: #fffbeb; border-color: rgba(217,119,6,.3); color: #92400e; }

/* Markets list */
.mkt-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.mkt-table th {
    text-align: left; padding: 11px 16px; background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200); font-size: .74rem;
    text-transform: uppercase; letter-spacing: .07em; color: var(--gray-600); white-space: nowrap;
}
.mkt-table td { padding: 12px 16px; border-bottom: 1px solid var(--gray-100); white-space: nowrap; }
.mkt-table tbody tr { cursor: pointer; }
.mkt-table tbody tr:hover { background: var(--green-soft); }
.mkt-table .pair { display: inline-flex; gap: 2px; color: var(--gray-900); }

/* Market detail */
.market-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 16px; }
.market-title { margin: 0; font-size: 1.9rem; }
.market-price { display: flex; align-items: baseline; gap: 12px; }
.price-lg { font-size: 1.7rem; font-weight: 700; }
.change { font-size: 1rem; font-weight: 700; }

.grid-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 0 0 20px; }
.grid-stats .stat { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }

/* Interval selector */
.intervals { display: flex; gap: 6px; flex-wrap: wrap; }
.interval {
    padding: 5px 11px; border-radius: 8px; font-size: .8rem; font-weight: 600;
    color: var(--gray-600); background: var(--gray-100); border: 1px solid transparent;
}
.interval:hover { background: var(--gray-200); color: var(--gray-900); }
.interval.active { background: var(--black); color: var(--white); }

/* Chart */
.chart-wrap { position: relative; padding: 16px; }
.live-chart { width: 100%; height: 280px; display: block; }
.chart-axis { display: flex; justify-content: space-between; font-size: .78rem; padding: 0 4px; }
.chart-empty { padding: 60px 16px; }

/* Tape */
.tape-card { padding: 0; overflow: hidden; }
.tape-scroll { overflow-x: auto; }
.tape { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tape th {
    text-align: left; padding: 11px 14px; background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200); font-size: .72rem;
    text-transform: uppercase; letter-spacing: .07em; color: var(--gray-600); white-space: nowrap;
}
.tape td { padding: 10px 14px; border-bottom: 1px solid var(--gray-100); white-space: nowrap; }
.tape tbody tr:hover { background: var(--gray-50); }
.tape .tape-time { font-variant-numeric: tabular-nums; }
.tape-whale { background: rgba(217,119,6,.10); }
.tape-whale:hover { background: rgba(217,119,6,.16) !important; }
.tape-note { padding: 12px 16px; margin: 0; border-top: 1px solid var(--gray-100); }

.venue-tag {
    display: inline-block; padding: 2px 8px; border-radius: 6px;
    font-size: .72rem; font-weight: 600; text-transform: capitalize;
    background: var(--gray-100); color: var(--gray-600);
}
.side-pill {
    display: inline-block; min-width: 46px; text-align: center;
    padding: 2px 8px; border-radius: 6px; font-size: .74rem; font-weight: 700;
}
.side-buy { background: rgba(22,163,74,.13); color: var(--green-dark); }
.side-sell { background: rgba(220,38,38,.12); color: var(--red); }

@media (max-width: 900px) {
    .grid-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .hide-sm { display: none; }
    .mkt-table th, .mkt-table td { padding: 11px 12px; }
    .tape th, .tape td { padding: 9px 11px; font-size: .82rem; }
    .market-title { font-size: 1.5rem; }
    .price-lg { font-size: 1.4rem; }
    .live-chart { height: 200px; }
    .section-head h1 { font-size: 1.6rem; }
}

/* ---------------- Password visibility toggle ---------------- */
.password-wrap { position: relative; }
.password-wrap .input { padding-right: 44px; }
.password-toggle {
    position: absolute; top: 1px; right: 1px; bottom: 1px; width: 42px;
    display: flex; align-items: center; justify-content: center;
    background: transparent; border: 0; border-radius: 0 9px 9px 0;
    color: var(--gray-600); cursor: pointer; padding: 0;
}
.password-toggle:hover { color: var(--gray-900); }
.password-toggle svg { width: 18px; height: 18px; }
.password-toggle .icon-eye-off { display: none; }
.password-toggle.is-visible .icon-eye { display: none; }
.password-toggle.is-visible .icon-eye-off { display: block; }

/* ---------------- Country flag select ---------------- */
.country-select { position: relative; }
.country-toggle {
    display: flex; align-items: center; gap: 9px; text-align: left; cursor: pointer;
    color: var(--gray-900);
}
.country-toggle .country-flag { font-size: 1.2rem; line-height: 1; flex: none; }
.country-toggle .country-flag img, img.country-flag { width: 22px; height: auto; display: block; border-radius: 2px; }
.country-toggle .country-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.country-toggle .country-label.placeholder { color: var(--gray-400); }
.country-toggle .caret { color: var(--gray-400); flex: none; transition: transform .15s ease; }
.country-select.open .country-toggle .caret { transform: rotate(180deg); }

.country-menu {
    position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; right: 0;
    background: var(--white); border: 1px solid var(--gray-200);
    border-radius: var(--radius); box-shadow: var(--shadow-lg);
    padding: 8px; display: none;
}
.country-select.open .country-menu { display: block; }
.country-search { margin-bottom: 6px; }
.country-options { max-height: 250px; overflow-y: auto; }
.country-option {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 8px 10px; border: 0; background: transparent; border-radius: 8px;
    font: inherit; color: var(--gray-900); cursor: pointer; text-align: left;
}
.country-option:hover, .country-option.active { background: var(--green-soft); }
.country-option .country-flag { font-size: 1.2rem; line-height: 1; flex: none; }
.country-option .country-name { flex: 1; }
.country-option .country-code { color: var(--gray-400); font-size: .78rem; letter-spacing: .05em; }
.country-options .no-match { padding: 10px; color: var(--gray-600); font-size: .85rem; }

@media (max-width: 640px) {
    .country-menu { position: fixed; left: 12px; right: 12px; top: auto; }
}

/* ================================================================
   AI TRADING / CRYPTO THEME — vibrant, animated, glassmorphism
   ================================================================ */

/* ── Extended palette (brand: blue / white / black) ── */
:root {
    --ai-navy: #0a0e1a;
    --ai-navy-2: #0f1629;
    --ai-purple: #1e40af;
    --ai-purple-dark: #1e3a8a;
    --ai-violet: #2563eb;
    --ai-cyan: #3b82f6;
    --ai-cyan-light: #60a5fa;
    --ai-green: #10b981;
    --ai-green-light: #34d399;
    --ai-gold: #f59e0b;
    --ai-pink: #ec4899;
    --ai-red: #ef4444;
    --ai-glass: rgba(255,255,255,.06);
    --ai-glass-border: rgba(255,255,255,.1);
}

/* ── Animated background mesh ── */
.main-area {
    background:
        radial-gradient(600px 400px at 10% 0%, rgba(37,99,235,.06), transparent 60%),
        radial-gradient(500px 400px at 90% 10%, rgba(59,130,246,.05), transparent 60%),
        radial-gradient(400px 300px at 50% 100%, rgba(37,99,235,.04), transparent 60%),
        var(--gray-50);
    position: relative;
}
.main-area::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(37,99,235,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37,99,235,.025) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: 0;
}
.page { position: relative; z-index: 1; }

/* ── Sidebar: deep gradient + glow nav ── */
.sidebar {
    background: linear-gradient(180deg, var(--ai-navy) 0%, var(--ai-navy-2) 40%, #0b1018 100%);
    border-right: 1px solid rgba(37,99,235,.12);
    width: 256px;
    flex: 0 0 256px;
}
.sidebar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 200px;
    background: radial-gradient(ellipse at 50% 0%, rgba(37,99,235,.15), transparent 70%);
    pointer-events: none;
}
.sidebar .brand {
    font-size: 1.1rem;
    padding: 8px 10px 16px;
}
.sidebar .brand span.logo,
.sidebar .brand img.logo {
    background: linear-gradient(135deg, var(--ai-purple), var(--ai-cyan));
    box-shadow: 0 0 16px rgba(37,99,235,.4);
}
.sidebar .nav-label {
    color: rgba(148,163,184,.5);
    font-size: .64rem;
    letter-spacing: .14em;
}
.sidebar a.nav-link {
    border-radius: 10px;
    padding: 10px 12px;
    color: #94a3b8;
    font-size: .88rem;
    transition: all .2s ease;
    position: relative;
    overflow: hidden;
}
.sidebar a.nav-link:hover {
    background: rgba(37,99,235,.1);
    color: #fff;
    transform: translateX(3px);
}
.sidebar a.nav-link.active {
    background: linear-gradient(135deg, var(--ai-purple), var(--ai-violet));
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(37,99,235,.4);
}
.sidebar a.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 60%;
    background: var(--ai-cyan-light);
    border-radius: 0 3px 3px 0;
    box-shadow: 0 0 10px var(--ai-cyan-light);
}
.sidebar a.nav-link .nav-icon {
    width: 18px; height: 18px;
    flex-shrink: 0;
    opacity: .7;
    transition: opacity .2s;
}
.sidebar a.nav-link:hover .nav-icon { opacity: 1; }
.sidebar a.nav-link.active .nav-icon { opacity: 1; }
.sidebar .drawer-user .avatar {
    background: linear-gradient(135deg, var(--ai-purple), var(--ai-cyan));
}
.sidebar .drawer-user .badge-success {
    background: rgba(37,99,235,.18);
    color: var(--ai-cyan-light);
}
.btn-ghost-light {
    border-radius: 10px;
}

/* ── Topbar: glass effect ── */
.topbar {
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(37,99,235,.1);
    box-shadow: 0 1px 12px rgba(37,99,235,.06);
}
.topbar .page-title {
    font-weight: 800;
    background: linear-gradient(135deg, var(--ai-navy), var(--ai-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.topbar .badge-success {
    background: linear-gradient(135deg, rgba(37,99,235,.15), rgba(59,130,246,.12));
    color: var(--ai-violet);
    border: 1px solid rgba(37,99,235,.2);
}
.topbar .avatar {
    background: linear-gradient(135deg, var(--ai-purple), var(--ai-cyan));
    color: #fff;
}

/* ── Stat cards: colorful gradient variants ── */
.stat {
    border-radius: 16px;
    border: 1px solid var(--gray-200);
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
}
.stat::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 80px; height: 80px;
    border-radius: 50%;
    filter: blur(30px);
    opacity: .5;
    pointer-events: none;
}
.stat:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(37,99,235,.12);
}
.stat .stat-label {
    font-size: .72rem;
    letter-spacing: .1em;
    font-weight: 600;
}
.stat .stat-value {
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -.02em;
}
.stat.accent {
    background: linear-gradient(135deg, var(--ai-navy) 0%, #0f1e3d 50%, #0a1828 100%);
    border-color: transparent;
    color: #fff;
}
.stat.accent::after {
    background: var(--ai-violet);
    opacity: .3;
}
.stat.accent .stat-label { color: rgba(148,163,184,.8); }
.stat.accent .stat-hint { color: rgba(148,163,184,.6); }
.stat.accent .stat-value {
    background: linear-gradient(135deg, #fff, var(--ai-cyan-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat.s-purple { background: linear-gradient(135deg, #1e3a8a, #2563eb); border-color: transparent; color: #fff; }
.stat.s-purple::after { background: #3b82f6; }
.stat.s-purple .stat-label, .stat.s-purple .stat-hint { color: rgba(255,255,255,.75); }

.stat.s-cyan { background: linear-gradient(135deg, #1e40af, #3b82f6); border-color: transparent; color: #fff; }
.stat.s-cyan::after { background: #60a5fa; }
.stat.s-cyan .stat-label, .stat.s-cyan .stat-hint { color: rgba(255,255,255,.75); }

.stat.s-green { background: linear-gradient(135deg, #0f172a, #1e40af); border-color: transparent; color: #fff; }
.stat.s-green::after { background: #2563eb; }
.stat.s-green .stat-label, .stat.s-green .stat-hint { color: rgba(255,255,255,.75); }

.stat.s-gold { background: linear-gradient(135deg, #1e3a8a, #1e40af); border-color: transparent; color: #fff; }
.stat.s-gold::after { background: #3b82f6; }
.stat.s-gold .stat-label, .stat.s-gold .stat-hint { color: rgba(255,255,255,.75); }

.stat.s-pink { background: linear-gradient(135deg, #0a0e1a, #2563eb); border-color: transparent; color: #fff; }
.stat.s-pink::after { background: #60a5fa; }
.stat.s-pink .stat-label, .stat.s-pink .stat-hint { color: rgba(255,255,255,.75); }

.stat.s-violet { background: linear-gradient(135deg, #1e40af, #2563eb); border-color: transparent; color: #fff; }
.stat.s-violet::after { background: #3b82f6; }
.stat.s-violet .stat-label, .stat.s-violet .stat-hint { color: rgba(255,255,255,.75); }

.stat .stat-icon {
    position: absolute;
    top: 16px; right: 16px;
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    z-index: 1;
}
.stat.accent .stat-icon { background: rgba(37,99,235,.2); color: var(--ai-cyan-light); }
.stat.s-purple .stat-icon, .stat.s-cyan .stat-icon, .stat.s-green .stat-icon,
.stat.s-gold .stat-icon, .stat.s-pink .stat-icon, .stat.s-violet .stat-icon {
    background: rgba(255,255,255,.2);
    color: #fff;
}

/* ── Cards: enhanced ── */
.card {
    border-radius: 16px;
    border: 1px solid var(--gray-200);
    transition: box-shadow .25s ease, border-color .25s ease;
}
.card:hover {
    box-shadow: 0 12px 36px rgba(37,99,235,.08);
    border-color: rgba(37,99,235,.15);
}
.card-header {
    border-bottom: 1px solid var(--gray-100);
    padding: 16px 20px;
}
.card-header h3 {
    font-weight: 700;
}
.card-body { padding: 20px; }

/* ── Buttons: gradient glow ── */
.btn {
    border-radius: 10px;
    transition: all .2s ease;
    background: linear-gradient(135deg, var(--ai-violet), var(--ai-cyan));
}
.btn:hover {
    background: linear-gradient(135deg, var(--ai-cyan), var(--ai-cyan-light));
    box-shadow: 0 6px 20px rgba(37,99,235,.3);
    transform: translateY(-1px);
}
.btn-black {
    background: linear-gradient(135deg, var(--ai-navy), var(--ai-navy-2));
}
.btn-black:hover {
    background: linear-gradient(135deg, #16223f, #1a2540);
    box-shadow: 0 6px 20px rgba(37,99,235,.25);
}
.btn-outline {
    border: 1px solid var(--gray-200);
    background: transparent;
    color: var(--gray-900);
}
.btn-outline:hover {
    background: var(--green-soft);
    border-color: rgba(37,99,235,.2);
    box-shadow: none;
    transform: none;
}

/* ── Progress bars: gradient ── */
.progress > span {
    background: linear-gradient(90deg, var(--ai-purple), var(--ai-cyan));
}

/* ── Badges: enhanced ── */
.badge-success { background: rgba(37,99,235,.12); color: var(--ai-violet); }
.badge-info { background: rgba(59,130,246,.12); color: var(--ai-cyan); }
.badge-warning { background: rgba(245,158,11,.12); color: var(--ai-gold); }

/* ── Tables: enhanced ── */
table.table th {
    background: linear-gradient(180deg, var(--gray-50), #fff);
    border-bottom: 2px solid var(--gray-200);
}
table.table tbody tr:hover {
    background: rgba(37,99,235,.04);
}

/* ── Code box: gradient ── */
.code-box {
    background: linear-gradient(135deg, var(--ai-navy), #0d1428);
    color: var(--ai-cyan-light);
    border: 1px solid rgba(37,99,235,.15);
    font-family: "SFMono-Regular", ui-monospace, Menlo, monospace;
}

/* ── Animations ── */
@keyframes aiFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes aiGlow {
    0%,100% { box-shadow: 0 0 20px rgba(37,99,235,.15); }
    50% { box-shadow: 0 0 32px rgba(37,99,235,.3); }
}
@keyframes aiShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes aiFloat {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
@keyframes aiSpin {
    to { transform: rotate(360deg); }
}
@keyframes aiGradientShift {
    0%,100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.page > .grid, .page > .card, .page > div > .card, .page > div > .grid {
    animation: aiFadeUp .5s ease both;
}
.page > .grid:nth-child(2), .page > .card:nth-child(2) { animation-delay: .08s; }
.page > .grid:nth-child(3), .page > .card:nth-child(3) { animation-delay: .16s; }
.page > .grid:nth-child(4), .page > .card:nth-child(4) { animation-delay: .24s; }

/* ── AI Hero Banner (dashboard) ── */
.ai-hero {
    background: linear-gradient(135deg, var(--ai-navy) 0%, #0f1e3d 35%, #0a1828 70%, #0d1525 100%);
    background-size: 200% 200%;
    animation: aiGradientShift 12s ease infinite;
    border-radius: 20px;
    padding: 28px 32px;
    color: #fff;
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.ai-hero::before {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 300px; height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37,99,235,.25), transparent 70%);
    pointer-events: none;
}
.ai-hero::after {
    content: '';
    position: absolute;
    bottom: -30%; left: 20%;
    width: 250px; height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59,130,246,.15), transparent 70%);
    pointer-events: none;
}
.ai-hero-content { position: relative; z-index: 2; flex: 1; min-width: 280px; }
.ai-hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    font-size: .76rem; font-weight: 600;
    color: var(--ai-cyan-light);
    margin-bottom: 14px;
}
.ai-hero-badge .ai-pulse {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--ai-cyan-light);
    box-shadow: 0 0 8px var(--ai-cyan-light);
    animation: livePulse 1.8s infinite;
}
.ai-hero h2 {
    font-size: 1.8rem; font-weight: 800; margin: 0 0 8px;
    letter-spacing: -.02em;
    background: linear-gradient(135deg, #fff, var(--ai-cyan-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.ai-hero p {
    color: rgba(255,255,255,.7);
    font-size: .92rem;
    margin: 0;
    max-width: 52ch;
}
.ai-hero-cta {
    display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap;
}
.ai-hero-cta .btn {
    background: linear-gradient(135deg, var(--ai-purple), var(--ai-violet));
    color: #fff;
}
.ai-hero-cta .btn:hover {
    background: linear-gradient(135deg, var(--ai-violet), var(--ai-purple));
    box-shadow: 0 6px 24px rgba(37,99,235,.4);
}
.ai-hero-cta .btn-outline {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.2);
    color: #fff;
}
.ai-hero-cta .btn-outline:hover {
    background: rgba(255,255,255,.14);
    border-color: rgba(255,255,255,.3);
}
.ai-bot-visual {
    position: relative; z-index: 2;
    width: 120px; height: 120px;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.ai-bot-visual .ai-bot-ring {
    position: absolute; inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(37,99,235,.2);
    animation: aiSpin 8s linear infinite;
}
.ai-bot-visual .ai-bot-ring:nth-child(2) {
    inset: 12px;
    border-color: rgba(59,130,246,.2);
    animation-direction: reverse;
    animation-duration: 6s;
}
.ai-bot-visual .ai-bot-ring:nth-child(3) {
    inset: 24px;
    border-color: rgba(37,99,235,.2);
    animation-duration: 4s;
}
.ai-bot-visual .ai-bot-core {
    width: 48px; height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--ai-purple), var(--ai-cyan));
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    animation: aiFloat 3s ease infinite;
    box-shadow: 0 0 24px rgba(37,99,235,.5);
    z-index: 1;
}

/* ── Mini market ticker (dashboard) ── */
.ai-ticker {
    background: var(--ai-navy);
    border-radius: 14px;
    padding: 12px 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    overflow: hidden;
    border: 1px solid rgba(37,99,235,.1);
}
.ai-ticker-label {
    flex-shrink: 0;
    font-size: .68rem;
    font-weight: 700;
    color: var(--ai-red);
    text-transform: uppercase;
    letter-spacing: .1em;
    display: flex; align-items: center; gap: 6px;
    padding-right: 16px;
    border-right: 1px solid rgba(255,255,255,.08);
}
.ai-ticker-label .ai-pulse {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--ai-red);
    animation: livePulse 1.5s infinite;
}
.ai-ticker-track {
    display: flex; gap: 24px;
    white-space: nowrap;
    overflow: hidden;
    flex: 1;
}
.ai-ticker-item {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: .82rem;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
}
.ai-ticker-item .ai-tk-sym { font-weight: 700; color: #fff; }
.ai-ticker-item .ai-tk-price { color: #cfd6d2; }
.ai-ticker-item .ai-tk-up { color: var(--ai-green-light); font-size: .74rem; font-weight: 600; }
.ai-ticker-item .ai-tk-dn { color: var(--ai-red); font-size: .74rem; font-weight: 600; }

/* ── Section heading with accent ── */
.ai-section-title {
    font-size: 1.1rem; font-weight: 800; margin: 0 0 16px;
    display: flex; align-items: center; gap: 10px;
}
.ai-section-title::before {
    content: '';
    width: 4px; height: 20px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--ai-purple), var(--ai-cyan));
}

/* ── Quick action tiles ── */
.ai-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.ai-quick {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: 18px;
    text-align: center;
    transition: all .2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.ai-quick:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(37,99,235,.1);
    border-color: rgba(37,99,235,.2);
}
.ai-quick .ai-quick-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
}
.ai-quick .ai-quick-label {
    font-size: .84rem; font-weight: 600; color: var(--gray-900);
}
.ai-quick .ai-quick-sub {
    font-size: .72rem; color: var(--gray-600);
}
.ai-quick-icon.i-purple { background: linear-gradient(135deg, #eef2ff, #e0e7ff); color: var(--ai-purple); }
.ai-quick-icon.i-cyan { background: linear-gradient(135deg, #ecfeff, #cffafe); color: var(--ai-cyan); }
.ai-quick-icon.i-green { background: linear-gradient(135deg, #ecfdf5, #d1fae5); color: var(--ai-green); }
.ai-quick-icon.i-gold { background: linear-gradient(135deg, #fffbeb, #fef3c7); color: var(--ai-gold); }
.ai-quick-icon.i-pink { background: linear-gradient(135deg, #fdf2f8, #fce7f3); color: var(--ai-pink); }
.ai-quick-icon.i-violet { background: linear-gradient(135deg, #f5f3ff, #ede9fe); color: var(--ai-violet); }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .sidebar {
        background: linear-gradient(180deg, var(--ai-navy) 0%, var(--ai-navy-2) 40%, #0b1018 100%);
    }
}
@media (max-width: 640px) {
    .ai-hero { padding: 22px 20px; }
    .ai-hero h2 { font-size: 1.4rem; }
    .ai-bot-visual { width: 80px; height: 80px; }
    .ai-bot-visual .ai-bot-core { width: 36px; height: 36px; font-size: 1rem; }
    .ai-ticker-track { gap: 18px; }
    .ai-quick-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 420px) {
    .ai-quick-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Dashboard welcome banner ── */
.dash-welcome {
    background: linear-gradient(135deg, var(--ai-navy) 0%, #0f1e3d 40%, #0a1828 70%, #0d1525 100%);
    background-size: 200% 200%;
    animation: aiGradientShift 14s ease infinite;
    border-radius: 18px;
    padding: 24px 28px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(37,99,235,.1);
}
.dash-welcome::before {
    content: '';
    position: absolute;
    top: -60%; right: -5%;
    width: 280px; height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37,99,235,.2), transparent 65%);
    pointer-events: none;
}
.dash-welcome::after {
    content: '';
    position: absolute;
    bottom: -40%; left: 15%;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59,130,246,.12), transparent 65%);
    pointer-events: none;
}
.dash-welcome-text { position: relative; z-index: 1; }
.dash-welcome-text h2 {
    font-size: 1.4rem; font-weight: 800; margin: 0 0 4px;
    background: linear-gradient(135deg, #fff, var(--ai-cyan-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.dash-welcome-text p {
    color: rgba(255,255,255,.6);
    font-size: .82rem;
    margin: 0;
}
.dash-welcome-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.dash-wa {
    padding: 8px 16px;
    border-radius: 9px;
    font-size: .82rem;
    font-weight: 600;
    color: #fff;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    transition: all .2s ease;
    text-decoration: none;
}
.dash-wa:hover {
    background: rgba(255,255,255,.16);
    border-color: rgba(255,255,255,.25);
    transform: translateY(-2px);
    color: #fff;
}

/* ── KYC verification badge (dashboard welcome) ── */
.kyc-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 700;
    margin-top: 10px;
    text-decoration: none;
    transition: all .2s ease;
}
.kyc-verified {
    background: linear-gradient(135deg, rgba(16,185,129,.22), rgba(16,185,129,.12));
    color: var(--ai-green-light);
    border: 1px solid rgba(16,185,129,.32);
}
.kyc-unverified {
    background: linear-gradient(135deg, rgba(245,158,11,.22), rgba(245,158,11,.12));
    color: var(--ai-gold);
    border: 1px solid rgba(245,158,11,.32);
}
.kyc-unverified:hover {
    background: linear-gradient(135deg, rgba(245,158,11,.3), rgba(245,158,11,.18));
    border-color: rgba(245,158,11,.48);
    transform: translateY(-1px);
    color: var(--ai-gold);
}
.kyc-pending {
    background: linear-gradient(135deg, rgba(59,130,246,.22), rgba(59,130,246,.12));
    color: #60a5fa;
    border: 1px solid rgba(59,130,246,.32);
}
.kyc-pending:hover {
    background: linear-gradient(135deg, rgba(59,130,246,.3), rgba(59,130,246,.18));
    border-color: rgba(59,130,246,.48);
    transform: translateY(-1px);
    color: #60a5fa;
}

/* ── Refined stat card icons ── */
.stat .stat-icon { z-index: 2; }

/* ── Transaction type badge ── */
table.table .badge-dark {
    background: linear-gradient(135deg, var(--ai-navy), var(--ai-navy-2));
    border: 1px solid rgba(37,99,235,.15);
}

/* ── Section heading refinement ── */
.ai-section-title { font-size: .98rem; }

/* ── Responsive welcome banner ── */
@media (max-width: 640px) {
    .dash-welcome { padding: 18px 20px; }
    .dash-welcome-text h2 { font-size: 1.15rem; }
    .dash-welcome-actions { width: 100%; }
    .dash-wa { flex: 1; text-align: center; }
}

/* ── Bot live trading cards ── */
.bot-live-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.bot-live-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: box-shadow .2s ease;
}
.bot-live-card:hover { box-shadow: var(--shadow-lg); }
.bot-live-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.bot-live-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1rem;
}
.bot-live-name img {
    width: 36px; height: 36px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(16,185,129,.1);
    color: var(--ai-green);
    font-size: .72rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: .04em;
    flex-shrink: 0;
}
.live-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--ai-green);
    animation: livePulse 1.5s ease-in-out infinite;
}
@keyframes livePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16,185,129,.4); }
    50% { opacity: .6; box-shadow: 0 0 0 5px rgba(16,185,129,0); }
}
.bot-live-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.bot-stat { display: flex; flex-direction: column; gap: 2px; }
.bot-stat .muted { font-size: .72rem; }
.bot-stat .strong { font-size: .9rem; }
.bot-live-progress .progress { margin: 4px 0; }
.bot-live-chart {
    position: relative;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
}
.bot-live-chart canvas {
    width: 100%;
    height: 100%;
    display: block;
}
.bot-live-feed {
    border-top: 1px solid var(--gray-100);
    padding-top: 12px;
}
.bot-feed-label {
    font-size: .78rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 8px;
}
.bot-feed-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 150px;
    overflow: hidden;
}
.bot-feed-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .8rem;
    padding: 3px 0;
    animation: feedSlideIn .3s ease;
}
.bot-feed-dir {
    font-size: .66rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 4px;
    min-width: 34px;
    text-align: center;
}
.bot-feed-dir.buy { background: rgba(16,185,129,.12); color: var(--ai-green); }
.bot-feed-dir.sell { background: rgba(239,68,68,.12); color: var(--ai-red); }
.bot-feed-pair { font-weight: 600; }
.bot-feed-profit { color: var(--ai-green); font-weight: 700; margin-left: auto; }
.bot-feed-time { color: var(--gray-500); font-size: .72rem; flex-shrink: 0; }
@keyframes feedSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 768px) {
    .bot-live-grid { grid-template-columns: 1fr; }
}

/* ── Rank status widget (dashboard) ── */
.rank-block {
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    overflow: hidden;
    transition: box-shadow .25s ease, border-color .25s ease;
}
.rank-block:hover {
    box-shadow: 0 12px 36px rgba(37,99,235,.08);
    border-color: rgba(37,99,235,.18);
}
.rank-block + .rank-block { margin-top: 14px; }
.rank-block-head {
    background: linear-gradient(135deg, var(--ai-navy) 0%, #0f1e3d 45%, #0a1828 100%);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    overflow: hidden;
}
.rank-block-head::before {
    content: '';
    position: absolute;
    top: -60%; right: -6%;
    width: 190px; height: 190px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37,99,235,.24), transparent 70%);
    pointer-events: none;
}
.rank-block-head::after {
    content: '';
    position: absolute;
    bottom: -55%; left: 8%;
    width: 160px; height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59,130,246,.13), transparent 70%);
    pointer-events: none;
}
.rank-block-medal {
    width: 46px; height: 46px;
    flex-shrink: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--ai-purple), var(--ai-cyan));
    display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 0 18px rgba(37,99,235,.4);
    position: relative;
    z-index: 1;
}
.rank-block-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
}
.rank-block-type {
    font-size: .66rem;
    text-transform: uppercase;
    letter-spacing: .11em;
    font-weight: 600;
    color: rgba(148,163,184,.85);
}
.rank-block-name {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.2;
    background: linear-gradient(135deg, #fff, var(--ai-cyan-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.rank-block-next {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.14);
    font-size: .74rem;
    font-weight: 600;
    color: var(--ai-cyan-light);
    white-space: nowrap;
}
.rank-metrics {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.rank-metric { display: flex; flex-direction: column; gap: 6px; }
.rank-metric-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.rank-metric-label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--gray-900);
    text-transform: capitalize;
}
.rank-metric-pct {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(37,99,235,.1);
    color: var(--ai-violet);
    font-size: .72rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: .02em;
}
.rank-metric .progress { height: 7px; }
.rank-metric-value {
    font-size: .74rem;
    color: var(--gray-600);
    font-variant-numeric: tabular-nums;
}
@media (max-width: 480px) {
    .rank-block-head { flex-wrap: wrap; }
    .rank-block-next { width: 100%; justify-content: center; }
    .rank-block-name { font-size: 1.05rem; }
}

/* ── Deposit receipt link (history table) ── */
.receipt-link {
    display: inline-block;
    margin-top: 5px;
    font-size: .74rem;
    font-weight: 600;
    color: var(--ai-violet);
    text-decoration: none;
}
.receipt-link:hover { color: var(--ai-cyan); text-decoration: underline; }

/* ── Rank status page: premium rank cards ── */
.rk-card {
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    overflow: hidden;
    background: var(--white);
    display: flex;
    flex-direction: column;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.rk-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(37,99,235,.10);
    border-color: rgba(37,99,235,.18);
}
.rk-head {
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--gray-50), var(--white));
    border-bottom: 1px solid var(--gray-100);
    position: relative;
    overflow: hidden;
}
.rk-card.is-held .rk-head {
    background: linear-gradient(135deg, var(--ai-navy) 0%, #0f1e3d 50%, #0a1828 100%);
    color: #fff;
    border-bottom-color: transparent;
}
.rk-card.is-held .rk-head::before {
    content: '';
    position: absolute;
    top: -60%; right: -6%;
    width: 170px; height: 170px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37,99,235,.24), transparent 70%);
    pointer-events: none;
}
.rk-medal {
    width: 44px; height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--ai-purple), var(--ai-cyan));
    display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem; font-weight: 800;
    color: #fff;
    box-shadow: 0 4px 14px rgba(37,99,235,.3);
    position: relative; z-index: 1;
}
.rk-card.is-held .rk-medal {
    background: linear-gradient(135deg, var(--ai-gold), #fbbf24);
    box-shadow: 0 0 18px rgba(245,158,11,.45);
}
.rk-head-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    min-width: 0;
    position: relative; z-index: 1;
}
.rk-level {
    font-size: .66rem;
    text-transform: uppercase;
    letter-spacing: .11em;
    font-weight: 700;
    color: var(--gray-400);
}
.rk-card.is-held .rk-level { color: rgba(148,163,184,.85); }
.rk-name {
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--gray-900);
}
.rk-card.is-held .rk-name {
    background: linear-gradient(135deg, #fff, var(--ai-cyan-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.rk-status {
    flex-shrink: 0;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    white-space: nowrap;
    position: relative; z-index: 1;
}
.rk-achieved {
    background: linear-gradient(135deg, var(--ai-gold), #fbbf24);
    color: #fff;
    box-shadow: 0 2px 10px rgba(245,158,11,.3);
}
.rk-progress {
    background: rgba(37,99,235,.1);
    color: var(--ai-violet);
}
.rk-body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
}
.rk-desc {
    font-size: .82rem;
    color: var(--gray-600);
    margin: 0;
    line-height: 1.5;
}
.rk-metrics {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.rk-metric { display: flex; flex-direction: column; gap: 6px; }
.rk-metric-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.rk-metric-label {
    font-size: .78rem;
    font-weight: 600;
    color: var(--gray-900);
}
.rk-metric-val {
    font-size: .76rem;
    font-variant-numeric: tabular-nums;
    color: var(--gray-600);
    font-weight: 600;
    white-space: nowrap;
}
.rk-metric-val .rk-now { color: var(--ai-violet); font-weight: 800; }
.rk-metric .progress { height: 8px; }
.rk-rewards {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
    margin-top: auto;
}
.rk-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 600;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: var(--ai-violet);
    border: 1px solid rgba(37,99,235,.12);
}
.rk-chip::before { content: '◆'; font-size: .55rem; opacity: .6; }
.rk-card.is-held .rk-chip {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    color: #92400e;
    border-color: rgba(245,158,11,.2);
}

/* rank section header: dark gradient band */
.rk-section .card-header {
    background: linear-gradient(135deg, var(--ai-navy) 0%, #0f1e3d 60%, #0a1828 100%);
    color: #fff;
    border-bottom: none;
    position: relative;
    overflow: hidden;
}
.rk-section .card-header::before {
    content: '';
    position: absolute;
    top: -60%; right: -4%;
    width: 190px; height: 190px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37,99,235,.22), transparent 70%);
    pointer-events: none;
}
.rk-section .card-header h3 {
    position: relative; z-index: 1;
    background: linear-gradient(135deg, #fff, var(--ai-cyan-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.rk-section .card-header .badge {
    position: relative; z-index: 1;
    background: rgba(255,255,255,.12);
    color: var(--ai-cyan-light);
    border: 1px solid rgba(255,255,255,.16);
}
@media (max-width: 480px) {
    .rk-head { flex-wrap: wrap; }
    .rk-status { width: 100%; text-align: center; }
}
