/* ============================================================
   Globaluxcore — Modern Design System
   ============================================================ */

:root {
    --space: #0B0E1A;
    --navy: #141824;
    --navy-light: #1a2035;
    --text: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.88);
    --cyan: #00F0FF;
    --cyan-dim: rgba(0, 240, 255, 0.12);
    --orange: #FF6B35;
    --mint: #00FF88;
    --gold: #FFD700;
    --gold-premium: #C9A962;
    --muted: #8892B0;
    --border: rgba(255, 255, 255, 0.06);
    --glass: rgba(20, 24, 36, 0.72);
    --card-bg: linear-gradient(160deg, rgba(22, 27, 45, 0.92), rgba(12, 16, 28, 0.96));
    --input-bg: rgba(11, 14, 26, 0.6);
    --nav-bg: rgba(11, 14, 26, 0.85);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 24px;
    --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 40px rgba(0, 240, 255, 0.08);
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html[data-theme="light"] {
    color-scheme: light;
    --space: #eef1f8;
    --navy: #ffffff;
    --navy-light: #f8f9fc;
    --text: #0B0E1A;
    --text-secondary: #2a3142;
    --cyan: #0099aa;
    --cyan-dim: rgba(0, 153, 170, 0.1);
    --orange: #e05520;
    --mint: #00a855;
    --gold: #c9a000;
    --gold-premium: #9a7b3a;
    --muted: #5a6478;
    --border: rgba(11, 14, 26, 0.1);
    --glass: rgba(255, 255, 255, 0.88);
    --card-bg: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
    --input-bg: rgba(255, 255, 255, 0.95);
    --nav-bg: rgba(255, 255, 255, 0.92);
    --shadow-soft: 0 4px 24px rgba(11, 14, 26, 0.08);
    --shadow-glow: 0 0 40px rgba(0, 153, 170, 0.06);
}

html:not([data-theme="light"]) {
    color-scheme: dark;
}

/* ---- Base reset (replaces tailwind preflight on our pages) ---- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

.premium-body,
body {
    margin: 0;
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    background: var(--space);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 240, 255, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(0, 255, 136, 0.04), transparent),
        radial-gradient(ellipse 50% 30% at 0% 80%, rgba(255, 107, 53, 0.04), transparent),
        radial-gradient(ellipse 40% 30% at 80% 0%, rgba(201, 169, 98, 0.04), transparent);
    background-attachment: fixed;
    letter-spacing: -0.01em;
    transition: background-color 0.3s ease, color 0.3s ease;
}

html[data-theme="light"] body,
html[data-theme="light"] .premium-body {
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 153, 170, 0.06), transparent),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(0, 168, 85, 0.04), transparent);
}

img, video { max-width: 100%; height: auto; }

.font-mono { font-family: 'JetBrains Mono', monospace; }
.text-mint { color: var(--mint); }
.text-orange { color: var(--orange); }
.text-cyan { color: var(--cyan); }
.text-muted { color: var(--muted); }
.text-gold { color: var(--gold); }
.w-full { width: 100%; }

::selection {
    background: rgba(0, 240, 255, 0.25);
    color: #fff;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 240, 255, 0.3); }

/* ---- Glass components ---- */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.glass-card:hover {
    border-color: rgba(0, 240, 255, 0.15);
    box-shadow: var(--shadow-soft), var(--shadow-glow);
}

.glass-card-static:hover {
    transform: none;
    border-color: var(--border);
    box-shadow: var(--shadow-soft);
}

.glass-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
}

/* ---- Site shell (global) ---- */
.site-container {
    width: 100%;
    max-width: 72rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

@media (min-width: 768px) {
    .site-container { padding-left: 1.5rem; padding-right: 1.5rem; }
}

main { overflow-x: hidden; }

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-brand-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.625rem;
    background: linear-gradient(135deg, #00F0FF, #00FF88);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-brand-text {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
}

.nav-brand-text .accent { color: var(--cyan); }

.nav-center {
    display: none;
    align-items: center;
    gap: 0.125rem;
}

@media (min-width: 1024px) {
    .nav-center { display: flex; }
}

.nav-actions {
    display: none;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

@media (min-width: 1024px) {
    .nav-actions { display: flex; }
}

.nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 0.5rem;
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    min-width: 2.5rem;
    min-height: 2.5rem;
}

.nav-mobile {
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 1.25rem 1rem;
    border-top: 1px solid var(--border);
}

.nav-mobile.open { display: flex; }

.nav-mobile .btn-premium { width: 100%; justify-content: center; }

.nav-mobile-tools {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-left: auto;
}

@media (min-width: 1024px) {
    .nav-mobile-tools { display: none; }
}

/* ---- Theme toggle ---- */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding: 0;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    cursor: pointer;
    transition: color var(--transition), border-color var(--transition), background var(--transition);
    flex-shrink: 0;
}

html[data-theme="light"] .theme-toggle {
    background: rgba(11, 14, 26, 0.04);
}

.theme-toggle:hover {
    color: var(--cyan);
    border-color: rgba(0, 240, 255, 0.25);
    background: var(--cyan-dim);
}

.theme-icon { display: block; }

html[data-theme="light"] .theme-icon-moon { display: none; }
html:not([data-theme="light"]) .theme-icon-sun { display: none; }

/* ---- Buttons ---- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    background: linear-gradient(135deg, #00F0FF 0%, #00c4cc 100%);
    color: #0B0E1A;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
    box-shadow: 0 4px 20px rgba(0, 240, 255, 0.25);
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 240, 255, 0.35);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    min-height: 44px;
}

html[data-theme="light"] .btn-secondary {
    background: rgba(11, 14, 26, 0.04);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 240, 255, 0.3);
    color: var(--cyan);
}

.btn-premium {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8125rem 1.75rem;
    background: linear-gradient(135deg, #C9A962, #E8D5A3, #C9A962);
    background-size: 200% auto;
    color: #0B0E1A;
    font-weight: 700;
    font-size: 0.9375rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(201, 169, 98, 0.25);
    transition: transform 0.25s, box-shadow 0.25s;
    white-space: nowrap;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(201, 169, 98, 0.35);
}

.btn-lg { padding: 1rem 2rem; font-size: 1rem; }

.btn-ghost {
    padding: 0.5rem 1rem;
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
    text-decoration: none;
}

.btn-ghost:hover, .btn-ghost.active {
    color: var(--cyan);
    background: var(--cyan-dim);
}

/* ---- Form inputs ---- */
.input-modern,
select.input-modern,
textarea.input-modern {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.9375rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    min-height: 44px;
}

.input-modern:focus,
select.input-modern:focus,
textarea.input-modern:focus {
    border-color: rgba(0, 240, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.1);
}

.input-modern::placeholder { color: rgba(136, 146, 176, 0.6); }

.label-modern {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 0.375rem;
    letter-spacing: 0.02em;
}

/* ---- Page structure ---- */
.page-wrap {
    max-width: 80rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.page-header p {
    color: var(--muted);
    margin-top: 0.5rem;
    font-size: 1rem;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 0.75rem;
}

/* ---- Hero ---- */
.hero-section {
    position: relative;
    overflow: hidden;
    padding: clamp(3rem, 8vw, 6rem) 1rem;
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    opacity: 0.5;
}

.hero-glow-1 {
    width: 500px; height: 500px;
    background: rgba(0, 240, 255, 0.12);
    top: -200px; left: 50%;
    transform: translateX(-50%);
}

.hero-glow-2 {
    width: 300px; height: 300px;
    background: rgba(0, 255, 136, 0.08);
    bottom: 0; right: 10%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem 0.375rem 0.5rem;
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 99px;
    font-size: 0.8125rem;
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.hero-badge-dot {
    width: 8px; height: 8px;
    background: var(--mint);
    border-radius: 50%;
    animation: pulse-dot 2s ease infinite;
}

.hero-title {
    font-size: clamp(2.25rem, 6vw, 3.75rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.08;
    margin-bottom: 1.25rem;
}

.hero-title .gradient-text {
    background: linear-gradient(135deg, #00F0FF 0%, #00FF88 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: var(--muted);
    max-width: 32rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Hero visual panel */
.hero-visual {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4/3;
    max-height: 420px;
}

.hero-visual-inner {
    position: absolute;
    inset: 0;
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.hero-mini-stat {
    background: rgba(11, 14, 26, 0.5);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.875rem;
}

.hero-mini-stat .label { font-size: 0.6875rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.hero-mini-stat .value { font-family: 'JetBrains Mono', monospace; font-size: 1.125rem; font-weight: 600; margin-top: 0.25rem; }
.hero-mini-stat .value.up { color: var(--mint); }

/* ---- Stat cards ---- */
.stat-card {
    text-align: center;
    padding: 2rem 1.5rem;
}

.stat-card .number {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    font-family: 'JetBrains Mono', monospace;
}

.stat-card .label {
    font-size: 0.875rem;
    color: var(--muted);
    margin-top: 0.5rem;
}

/* ---- Ticker ---- */
.ticker-bar {
    background: rgba(20, 24, 36, 0.9);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    padding: 0.5rem 0;
}

.ticker-track {
    display: inline-flex;
    gap: 2.5rem;
    white-space: nowrap;
    animation: ticker 40s linear infinite;
    min-width: 200%;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--muted);
}

.ticker-item .pair { color: rgba(255,255,255,0.5); }
.ticker-item .price { color: var(--cyan); font-weight: 600; }
.ticker-item .price.up { color: var(--mint); }

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

/* ---- Floating live support ---- */
.support-fab {
    position: fixed;
    bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
    left: calc(1.5rem + env(safe-area-inset-left, 0px));
    right: auto;
    z-index: 900;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
}

.support-toggle {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00FF88, #00c46a);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 255, 136, 0.35);
    transition: transform var(--transition), box-shadow var(--transition);
    color: #0B0E1A;
}

.support-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 40px rgba(0, 255, 136, 0.45);
}

.support-toggle svg { width: 24px; height: 24px; }

.support-toggle-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--mint);
    border: 2px solid #0B0E1A;
    animation: pulse-dot 1.5s ease infinite;
}

.support-panel {
    width: min(380px, calc(100vw - 2rem));
    max-height: min(520px, calc(100vh - 8rem));
    background: rgba(14, 18, 32, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(0, 255, 136, 0.18);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.04) inset;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform-origin: bottom left;
    transform: scale(0.9) translateY(10px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease, visibility 0.25s;
}

.support-panel.open {
    transform: scale(1) translateY(0);
    opacity: 1;
    visibility: visible;
}

.support-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 255, 136, 0.05);
    flex-shrink: 0;
}

.support-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.support-header-row h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0;
}

.support-online,
.converter-live {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--mint);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.support-online::before,
.converter-live::before {
    content: '';
    width: 6px; height: 6px;
    background: var(--mint);
    border-radius: 50%;
    animation: pulse-dot 1.5s ease infinite;
}

.support-close {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 6px;
    transition: color var(--transition), background var(--transition);
}

.support-close:hover { color: #fff; background: rgba(255,255,255,0.06); }

.support-body {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Live support chat panel */
.live-support-panel {
    display: flex;
    flex-direction: column;
    min-height: 320px;
    max-height: 420px;
}

.live-support-panel-inline {
    min-height: 380px;
    max-height: none;
}

.live-support-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    min-height: 180px;
}

.live-support-msg {
    display: flex;
    gap: 0.625rem;
    align-items: flex-start;
}

.live-support-msg-user {
    justify-content: flex-end;
}

.live-support-msg-user .live-support-bubble {
    background: rgba(0, 240, 255, 0.12);
    border-color: rgba(0, 240, 255, 0.2);
    max-width: 85%;
}

.live-support-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0,255,136,0.25), rgba(0,240,255,0.2));
    border: 1px solid rgba(0, 255, 136, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--mint);
    flex-shrink: 0;
}

.live-support-bubble {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 0.875rem;
    padding: 0.75rem 0.875rem;
    max-width: 88%;
}

.live-support-bubble strong {
    display: block;
    font-size: 0.75rem;
    color: var(--mint);
    margin-bottom: 0.25rem;
}

.live-support-bubble p {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--text);
}

.live-support-time {
    display: block;
    font-size: 0.625rem;
    color: var(--muted);
    margin-top: 0.35rem;
}

.live-support-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    padding: 0 1.25rem 0.75rem;
    flex-shrink: 0;
}

.live-support-chip {
    padding: 0.35rem 0.65rem;
    border-radius: 9999px;
    border: 1px solid var(--border);
    background: rgba(11, 14, 26, 0.5);
    color: var(--muted);
    font-size: 0.6875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.live-support-chip:hover {
    border-color: rgba(0, 255, 136, 0.35);
    color: var(--mint);
    background: rgba(0, 255, 136, 0.08);
}

.live-support-compose {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.live-support-compose input {
    flex: 1;
    min-width: 0;
    padding: 0.625rem 0.875rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgba(11, 14, 26, 0.6);
    color: var(--text);
    font-size: 0.8125rem;
}

.live-support-compose input:focus {
    outline: none;
    border-color: rgba(0, 255, 136, 0.35);
}

.live-support-send {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-sm);
    border: none;
    background: linear-gradient(135deg, #00FF88, #00c46a);
    color: #0B0E1A;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.live-support-send:hover { opacity: 0.9; }

.live-support-channels {
    display: flex;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem 1rem;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.live-support-channel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgba(11, 14, 26, 0.4);
    color: var(--muted);
    font-size: 0.6875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.live-support-channel:hover {
    border-color: rgba(0, 240, 255, 0.3);
    color: var(--cyan);
}

/* ---- Trader cards ---- */
.trader-card {
    position: relative;
    overflow: hidden;
}

.trader-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    opacity: 0;
    transition: opacity var(--transition);
}

.trader-card:hover::before { opacity: 1; }

.trader-avatar {
    width: 3rem; height: 3rem;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0,240,255,0.2), rgba(0,255,136,0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--cyan);
    border: 1px solid rgba(0, 240, 255, 0.15);
}

.trader-photo {
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid rgba(0, 240, 255, 0.15);
    background: rgba(11, 14, 26, 0.5);
    flex-shrink: 0;
}

.trader-photo-sm { width: 2rem; height: 2rem; border-radius: 0.5rem; }
.trader-photo-md { width: 3rem; height: 3rem; }
.trader-photo-lg { width: 3.5rem; height: 3.5rem; border-radius: 0.875rem; }

.trader-row-name {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    background: linear-gradient(135deg, rgba(0,240,255,0.15), rgba(0,255,136,0.1));
    border: 1px solid rgba(0, 240, 255, 0.25);
    border-radius: 99px;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--cyan);
    letter-spacing: 0.03em;
}

/* ---- Risk bar ---- */
.risk-bar {
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 99px;
    overflow: hidden;
}

.risk-bar-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.6s ease;
}

/* ---- Flash alerts ---- */
.alert {
    padding: 0.875rem 1.125rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid;
}

.alert-success {
    background: rgba(0, 255, 136, 0.08);
    border-color: rgba(0, 255, 136, 0.25);
    color: var(--mint);
}

.alert-error {
    background: rgba(255, 107, 53, 0.08);
    border-color: rgba(255, 107, 53, 0.25);
    color: var(--orange);
}

/* ---- Footer ---- */
.site-footer {
    margin-top: 4rem;
    padding: 3rem 0 2rem;
    border-top: 1px solid var(--border);
    background: rgba(11, 14, 26, 0.5);
}

.site-footer .nav-link { padding: 0; }

.footer-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem 1.75rem;
    font-size: 0.875rem;
}

.footer-bottom {
    text-align: center;
    font-size: 0.75rem;
    color: var(--muted);
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.footer-bottom p { margin: 0; }

.footer-tagline {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem !important;
}

/* ---- Video section ---- */
.video-frame {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft), var(--shadow-glow);
    aspect-ratio: 16/9;
}

/* ---- Nav ---- */
.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted);
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
    text-decoration: none;
}

.nav-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

html[data-theme="light"] .nav-link:hover {
    background: rgba(11, 14, 26, 0.05);
}

/* Legacy alias */
.shadow-glow { box-shadow: var(--shadow-soft), var(--shadow-glow); }

/* Responsive */
@media (max-width: 768px) {
    .support-fab {
        bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
        left: calc(1rem + env(safe-area-inset-left, 0px));
        right: auto;
    }
    .hero-stat-row { grid-template-columns: 1fr 1fr; }
    .hero-stat-row > :last-child { grid-column: span 2; }
}

@media (max-width: 640px) {
    .support-panel { width: calc(100vw - 2rem); }
    .nav-inner { gap: 0.5rem; }
    .nav-brand-text { font-size: 1rem; }
}

/* ---- Auth pages ---- */
.auth-page {
    padding: 2.5rem 1rem calc(2.5rem + env(safe-area-inset-bottom, 0px));
    min-height: calc(100vh - 12rem);
    min-height: calc(100dvh - 12rem);
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

@media (min-width: 768px) {
    .auth-page {
        padding-top: 3.5rem;
        align-items: center;
    }

    .auth-card-wide { max-width: 44rem; }
}

.auth-card {
    width: 100%;
    max-width: 28rem;
    background: var(--card-bg, var(--glass));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.75rem;
    box-shadow: var(--shadow-soft);
}

.auth-card-wide { max-width: 40rem; }

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #00F0FF, #00FF88);
}

.auth-header h1 {
    margin: 0 0 0.5rem;
    font-size: 1.625rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.auth-header p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.55;
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
}

.auth-form { margin: 0; }

.form-section {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.25rem 1.25rem 0.5rem;
    margin: 0 0 1.25rem;
    background: rgba(11, 14, 26, 0.25);
}

html[data-theme="light"] .form-section {
    background: rgba(255, 255, 255, 0.5);
}

.form-section legend {
    padding: 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--cyan);
}

.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 1rem;
}

@media (min-width: 640px) {
    .form-row { grid-template-columns: 1fr 1fr; }
}

.field-hint {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.6875rem;
    color: var(--muted);
}

.form-legal {
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.6;
    margin: 0 0 1.25rem;
    padding: 0.875rem 1rem;
    background: rgba(201, 169, 98, 0.06);
    border: 1px solid rgba(201, 169, 98, 0.12);
    border-radius: var(--radius-sm);
}

.auth-submit {
    width: 100%;
    justify-content: center;
    padding: 0.9375rem 1.5rem;
    min-height: 48px;
}

.auth-footer-link {
    text-align: center;
    margin: 1.5rem 0 0;
    font-size: 0.875rem;
    color: var(--muted);
}

.auth-footer-link a {
    color: var(--cyan);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer-link a:hover { text-decoration: underline; }

input[type="date"].input-modern {
    color-scheme: dark;
}

html[data-theme="light"] input[type="date"].input-modern {
    color-scheme: light;
}

/* ---- User portal (app interface) ---- */
.portal-body.app-mode {
    --app-shell-max: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 240, 255, 0.08), transparent 55%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(0, 255, 136, 0.05), transparent 50%),
        var(--space);
    display: flex;
    justify-content: center;
    padding: 0;
}

.app-device {
    width: 100%;
    max-width: var(--app-shell-max);
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    position: relative;
    background: var(--space);
    box-shadow: 0 0 0 1px var(--border);
}

.app-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

/* Phone / small mobile: edge-to-edge app shell */
@media (max-width: 519px) {
    .portal-body.app-mode {
        padding: 0;
    }
}

/* Tablet, iPad, desktop: centered app frame with bottom nav always visible */
@media (min-width: 520px) {
    .portal-body.app-mode {
        --app-shell-max: 520px;
        padding: 1rem 0 1.5rem;
        align-items: flex-start;
    }

    .app-device {
        min-height: calc(100vh - 2.5rem);
        min-height: calc(100dvh - 2.5rem);
        border-radius: 1.75rem;
        overflow: hidden;
        box-shadow:
            0 0 0 1px rgba(255, 255, 255, 0.06),
            0 24px 80px rgba(0, 0, 0, 0.45),
            0 0 60px rgba(0, 240, 255, 0.04);
    }
}

html[data-theme="light"] .app-device {
    box-shadow:
        0 0 0 1px var(--border),
        0 20px 60px rgba(11, 14, 26, 0.12);
}

/* App header */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
    padding: calc(0.75rem + env(safe-area-inset-top, 0px)) 1rem 0.75rem;
    background: rgba(11, 14, 26, 0.82);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

html[data-theme="light"] .app-header {
    background: rgba(255, 255, 255, 0.88);
}

.app-header-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.625rem 0.75rem;
    align-items: center;
}

.app-header-user {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    color: inherit;
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
}

.app-header-avatar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, rgba(0,240,255,0.2), rgba(201,169,98,0.15));
    border: 1px solid rgba(0, 240, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--gold-premium);
    flex-shrink: 0;
}

.app-header-greeting {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.app-header-hello {
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    line-height: 1.2;
}

.app-header-name {
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-header-title {
    grid-column: 1 / -1;
    grid-row: 2;
}

.app-header-page {
    font-size: 1.375rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.app-header-actions {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* App main content */
.app-main {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 1rem 1rem 1.25rem;
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
}

.app-main .page-wrap {
    max-width: none;
    padding: 0;
    margin: 0;
}

.app-main .page-header h1,
.app-main .page-header .section-label {
    display: none;
}

.portal-alert { margin-bottom: 1rem; }

.app-main .page-header {
    margin-bottom: 1.25rem;
}

.app-main .page-header p {
    font-size: 0.8125rem;
    color: var(--muted);
    margin: 0;
}

body.app-more-open {
    overflow: hidden;
}

.app-more-backdrop[hidden] {
    display: none;
}

/* Bottom tab bar */
.app-tabbar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--app-shell-max, 100%);
    z-index: 200;
    padding: 0 0.75rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
    pointer-events: none;
}

.app-tabbar-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.15rem;
    padding: 0.5rem 0.65rem 0.45rem;
    background: rgba(14, 18, 32, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 240, 255, 0.04) inset;
    pointer-events: auto;
}

html[data-theme="light"] .app-tabbar-inner {
    background: rgba(255, 255, 255, 0.94);
    border-color: var(--border);
    box-shadow: 0 -4px 30px rgba(11, 14, 26, 0.08);
}

.app-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.35rem 0.25rem 0.15rem;
    border: none;
    background: none;
    color: var(--muted);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    min-width: 0;
    font-family: inherit;
}

.app-tab:hover { color: var(--text); }

.app-tab.active { color: var(--cyan); }

.app-tab-icon-wrap {
    position: relative;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-tab-icon {
    width: 1.35rem;
    height: 1.35rem;
    opacity: 0.9;
}

.app-tab.active .app-tab-icon { opacity: 1; }

.app-tab-dot {
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 8px var(--cyan);
}

.app-tab-label {
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.app-tab-center {
    flex: 0 0 auto;
    margin: 0 0.15rem;
    transform: translateY(-0.65rem);
}

.app-tab-center .app-tab-icon-wrap {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #00F0FF, #00c4cc);
    box-shadow: 0 8px 24px rgba(0, 240, 255, 0.4);
    border: 3px solid rgba(11, 14, 26, 0.9);
}

html[data-theme="light"] .app-tab-center .app-tab-icon-wrap {
    border-color: #fff;
}

.app-tab-center .app-tab-icon {
    width: 1.5rem;
    height: 1.5rem;
    background-color: #0B0E1A !important;
    opacity: 1;
}

.app-tab-center.active .app-tab-icon-wrap {
    box-shadow: 0 8px 28px rgba(0, 240, 255, 0.55);
}

.app-tab-center .app-tab-label {
    color: var(--cyan);
    font-weight: 700;
}

.app-tab-icon-more {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='5' cy='12' r='1.5'/%3E%3Ccircle cx='12' cy='12' r='1.5'/%3E%3Ccircle cx='19' cy='12' r='1.5'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='5' cy='12' r='1.5'/%3E%3Ccircle cx='12' cy='12' r='1.5'/%3E%3Ccircle cx='19' cy='12' r='1.5'/%3E%3C/svg%3E");
}

/* More menu sheet */
.app-more-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.app-more-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.app-more-sheet {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%) translateY(100%);
    width: 100%;
    max-width: var(--app-shell-max, 100%);
    max-height: min(85vh, 640px);
    z-index: 1210;
    background: rgba(14, 18, 32, 0.98);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 1.5rem 1.5rem 0 0;
    padding: 0.75rem 1rem calc(6rem + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
}

html[data-theme="light"] .app-more-sheet {
    background: rgba(255, 255, 255, 0.98);
}

.app-more-sheet.open {
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

body.app-more-open .support-fab {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

body.app-more-open .app-tabbar-inner {
    pointer-events: none;
}

.app-more-handle {
    width: 2.5rem;
    height: 4px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 auto 1rem;
}

.app-more-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.app-more-head h2 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
}

.app-more-head p {
    margin: 0.2rem 0 0;
    font-size: 0.75rem;
    color: var(--muted);
}

.app-more-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    cursor: pointer;
    flex-shrink: 0;
}

.app-more-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.12);
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.app-more-user strong {
    display: block;
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

.app-more-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.app-more-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgba(11, 14, 26, 0.35);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
    z-index: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(0, 240, 255, 0.15);
    touch-action: manipulation;
}

html[data-theme="light"] .app-more-item {
    background: rgba(255, 255, 255, 0.6);
}

.app-more-item:hover,
.app-more-item.active {
    border-color: rgba(0, 240, 255, 0.3);
    background: rgba(0, 240, 255, 0.06);
}

.app-more-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    background: var(--cyan);
}

.app-more-item-text strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
}

.app-more-item-text small {
    display: block;
    font-size: 0.6875rem;
    color: var(--muted);
    margin-top: 0.1rem;
}

.app-more-foot {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.app-more-link {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    position: relative;
    z-index: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(0, 240, 255, 0.15);
    touch-action: manipulation;
}

.app-more-link:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

.app-more-admin { color: var(--gold-premium) !important; }
.app-more-logout { color: var(--orange) !important; }

/* Shared nav icons (more sheet + tabs) */
.user-nav-icon {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
    opacity: 0.85;
    background: currentColor;
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

.user-nav-icon-grid { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E"); }
.user-nav-icon-copy { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Crect x='8' y='2' width='8' height='4' rx='1'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Crect x='8' y='2' width='8' height='4' rx='1'/%3E%3C/svg%3E"); }
.user-nav-icon-deposit { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 5v14M5 12l7 7 7-7'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 5v14M5 12l7 7 7-7'/%3E%3C/svg%3E"); }
.user-nav-icon-withdraw { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 19V5M5 12l7-7 7 7'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 19V5M5 12l7-7 7 7'/%3E%3C/svg%3E"); }
.user-nav-icon-list { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01'/%3E%3C/svg%3E"); }
.user-nav-icon-shield { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E"); }
.user-nav-icon-card { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='1' y='4' width='22' height='16' rx='2'/%3E%3Cpath d='M1 10h22'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='1' y='4' width='22' height='16' rx='2'/%3E%3Cpath d='M1 10h22'/%3E%3C/svg%3E"); }
.user-nav-icon-wallet { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1'/%3E%3Cpath d='M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1'/%3E%3Cpath d='M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4'/%3E%3C/svg%3E"); }
.user-nav-icon-settings { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42'/%3E%3C/svg%3E"); }

/* Live support above tab bar in app mode (bottom-left, inside app shell) */
.app-mode .support-fab {
    bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
    left: max(calc(1rem + env(safe-area-inset-left, 0px)), calc(50% - 260px));
    right: auto;
}

@media (max-width: 519px) {
    .app-mode .support-fab {
        left: calc(1rem + env(safe-area-inset-left, 0px));
        right: auto;
    }
}

.portal-table-wrap { overflow-x: auto; }

.portal-table {
    width: 100%;
    border-collapse: collapse;
}

.portal-table th {
    text-align: left;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: rgba(11, 14, 26, 0.35);
}

html[data-theme="light"] .portal-table th {
    background: rgba(255, 255, 255, 0.6);
}

.portal-table td {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.portal-table tr:hover td { background: rgba(0, 240, 255, 0.03); }

.tx-status {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 99px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.tx-status-completed, .tx-status-approved { background: rgba(0,255,136,0.12); color: var(--mint); }
.tx-status-pending { background: rgba(201,169,98,0.12); color: var(--gold-premium); }
.tx-status-rejected, .tx-status-failed { background: rgba(255,107,53,0.12); color: var(--orange); }

.portal-empty {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--muted);
}

.portal-empty p { margin: 0 0 1rem; }

@media (max-width: 900px) {
    .portal-table thead { display: none; }

    .portal-table tr {
        display: block;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--border);
    }

    .portal-table td {
        display: flex;
        justify-content: space-between;
        padding: 0.375rem 0;
        border: none;
    }

    .portal-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 0.75rem;
        margin-right: 1rem;
    }
}

/* Account tier badges */
.tier-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.4;
}

.tier-badge-sm {
    font-size: 0.625rem;
    padding: 0.15rem 0.5rem;
}

.tier-badge-muted {
    background: rgba(148, 163, 184, 0.12);
    color: var(--muted);
    border: 1px solid var(--border);
}

.tier-badge-cyan {
    background: rgba(0, 212, 255, 0.12);
    color: var(--cyan);
    border: 1px solid rgba(0, 212, 255, 0.25);
}

.tier-badge-gold {
    background: rgba(201, 169, 98, 0.15);
    color: var(--gold-premium);
    border: 1px solid rgba(201, 169, 98, 0.3);
}

.user-sidebar-tier { margin-top: 0.35rem; }

.tier-progress-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media (max-width: 900px) {
    .tier-progress-grid { grid-template-columns: 1fr; }
}

.tier-progress-card {
    padding: 1.25rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    background: rgba(11, 14, 26, 0.35);
    opacity: 0.65;
}

html[data-theme="light"] .tier-progress-card {
    background: rgba(255, 255, 255, 0.5);
}

.tier-progress-active { opacity: 1; }

.tier-progress-current {
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.08);
}

.tier-progress-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.tier-progress-num {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--cyan);
}

.tier-progress-now {
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--mint);
    text-transform: uppercase;
}

.tier-progress-done {
    font-size: 0.625rem;
    color: var(--muted);
}

.tier-progress-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
}

.tier-progress-desc {
    font-size: 0.8125rem;
    color: var(--muted);
    margin: 0 0 0.75rem;
    line-height: 1.5;
}

.tier-progress-limits {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.8125rem;
    color: var(--text);
    line-height: 1.6;
}

.alert-info {
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.2);
    color: var(--text);
}

/* Dashboard enhancements */
.dashboard-page .dash-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.dashboard-page .dash-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0.25rem 0 0;
}

.dash-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--mint);
    background: rgba(0, 255, 136, 0.08);
    border: 1px solid rgba(0, 255, 136, 0.2);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.dash-live-pill:hover {
    background: rgba(0, 255, 136, 0.12);
    border-color: rgba(0, 255, 136, 0.35);
}

.dash-live-pill.is-refreshing .dash-live-dot {
    animation: dash-pulse 0.6s ease-in-out infinite;
}

.dash-market-ticker {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(11, 14, 26, 0.45);
    padding: 0.55rem 0;
}

html[data-theme="light"] .dash-market-ticker {
    background: rgba(255, 255, 255, 0.55);
}

.dash-market-ticker-track {
    display: inline-flex;
    gap: 2rem;
    white-space: nowrap;
    min-width: 200%;
    animation: dash-market-ticker 35s linear infinite;
    padding-left: 0.5rem;
}

.dash-market-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.75rem;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
}

.dash-market-ticker-item .symbol {
    font-weight: 700;
    color: var(--text);
}

.dash-market-ticker-item .price {
    color: var(--cyan);
}

.dash-market-ticker-item .change.up { color: var(--mint); }
.dash-market-ticker-item .change.down { color: var(--orange); }

@keyframes dash-market-ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.dash-market-row-chart {
    cursor: pointer;
    transition: background 0.2s;
}

.dash-market-row-chart:hover,
.dash-market-row-chart.active {
    background: rgba(0, 240, 255, 0.06);
}

.dash-market-row-chart.active td:first-child {
    box-shadow: inset 3px 0 0 var(--cyan);
}

.dash-market-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.dash-market-actions .btn-primary,
.dash-market-actions .btn-secondary {
    flex: 1 1 auto;
    text-align: center;
    min-width: 9rem;
}

.dash-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--mint);
    animation: dash-pulse 2s ease-in-out infinite;
}

@keyframes dash-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.dash-quick-actions {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
}

@media (max-width: 1100px) {
    .dash-quick-actions { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
    .dash-quick-actions { grid-template-columns: repeat(2, 1fr); }
}

.dash-quick-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgba(11, 14, 26, 0.45);
    text-decoration: none;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

html[data-theme="light"] .dash-quick-btn {
    background: rgba(255, 255, 255, 0.65);
}

.dash-quick-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 240, 255, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.dash-quick-btn-cyan:hover { border-color: rgba(0, 240, 255, 0.4); }
.dash-quick-btn-mint:hover { border-color: rgba(0, 255, 136, 0.35); }
.dash-quick-btn-gold:hover { border-color: rgba(201, 169, 98, 0.35); }

.dash-quick-btn-muted { opacity: 0.75; }

.dash-quick-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.65rem;
    flex-shrink: 0;
    background: rgba(0, 240, 255, 0.12);
    mask-size: 55%;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: 55%;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    background-color: var(--cyan);
}

.dash-quick-btn-mint .dash-quick-icon { background-color: var(--mint); }
.dash-quick-btn-gold .dash-quick-icon { background-color: var(--gold-premium); }
.dash-quick-btn-muted .dash-quick-icon { background-color: var(--muted); }

.dash-quick-icon-deposit { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 5v14M5 12l7 7 7-7'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 5v14M5 12l7 7 7-7'/%3E%3C/svg%3E"); }
.dash-quick-icon-withdraw { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 19V5M5 12l7-7 7 7'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 19V5M5 12l7-7 7 7'/%3E%3C/svg%3E"); }
.dash-quick-icon-copy { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Crect x='8' y='2' width='8' height='4' rx='1'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Crect x='8' y='2' width='8' height='4' rx='1'/%3E%3C/svg%3E"); }
.dash-quick-icon-shield { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E"); }
.dash-quick-icon-list { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01'/%3E%3C/svg%3E"); }

.dash-quick-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.dash-quick-text strong {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

.dash-quick-text small {
    font-size: 0.6875rem;
    color: var(--muted);
}

.dash-stat-deposit {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.dash-stat-deposit:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 240, 255, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.dash-market-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.dash-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.dash-chart-tabs {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.dash-chart-tab {
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.dash-chart-tab:hover { color: var(--text); border-color: rgba(0, 240, 255, 0.3); }

.dash-chart-tab.active {
    color: var(--cyan);
    border-color: rgba(0, 240, 255, 0.4);
    background: rgba(0, 240, 255, 0.08);
}

.dash-chart-wrap {
    height: 260px;
    min-height: 220px;
    position: relative;
    margin-bottom: 1rem;
}

.dash-chart-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

@media (max-width: 640px) {
    .dash-chart-stats { grid-template-columns: 1fr; }
}

.dash-chart-stat .label {
    display: block;
    font-size: 0.6875rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.2rem;
}

.dash-chart-stat .value {
    font-size: 0.9375rem;
    font-weight: 600;
}

.dash-market-table-wrap {
    overflow-x: auto;
    margin: 0 -0.25rem;
}

.dash-market-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.dash-market-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    color: var(--muted);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}

.dash-market-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.dash-asset-cell {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.dash-coin-icon {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.dash-coin-placeholder {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(0, 240, 255, 0.12);
    color: var(--cyan);
    flex-shrink: 0;
}

.dash-asset-symbol { font-weight: 600; font-size: 0.8125rem; }
.dash-asset-name { font-size: 0.6875rem; color: var(--muted); }

.dash-traders-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.dash-traders-scroll {
    position: relative;
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 1rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.dash-traders-scroll::-webkit-scrollbar {
    display: none;
}

.dash-traders-scroll-hint {
    margin: 0 0 0.5rem;
    font-size: 0.6875rem;
    text-align: center;
    color: var(--muted);
    letter-spacing: 0.02em;
    transition: opacity 0.2s ease;
}

.dash-traders-scroll-hint.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.dash-traders-grid--carousel {
    display: flex;
    flex-direction: row;
    gap: 0.875rem;
    width: max-content;
    min-width: 100%;
    padding-bottom: 0.25rem;
}

.dash-traders-grid--carousel .dash-trader-card {
    flex: 0 0 calc(100% - 0.5rem);
    width: calc(100vw - 2rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
    max-width: calc(var(--app-shell-max, 520px) - 2rem);
    scroll-snap-align: center;
    scroll-snap-stop: always;
}

@media (min-width: 520px) {
    .dash-traders-grid--carousel .dash-trader-card {
        flex: 0 0 calc(var(--app-shell-max, 520px) - 2.5rem);
        width: calc(var(--app-shell-max, 520px) - 2.5rem);
        max-width: none;
    }
}

.dash-trader-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dash-trader-card .trader-copy-widget {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.dash-trader-card .trader-copy-form .input-modern,
.dash-trader-card .trader-copy-form select {
    width: 100%;
    min-width: 0;
    min-height: 2.75rem;
    font-size: 1rem;
}

.dash-trader-card .trader-copy-submit {
    min-height: 2.75rem;
}

.dash-trader-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.dash-trader-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.dash-trader-metric {
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    background: rgba(11, 14, 26, 0.4);
    border: 1px solid var(--border);
}

html[data-theme="light"] .dash-trader-metric {
    background: rgba(255, 255, 255, 0.5);
}

.dash-trader-metric .label {
    display: block;
    font-size: 0.625rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.15rem;
}

.dash-trader-metric .value {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 0.875rem;
    font-weight: 700;
}

/* Dashboard notice board */
.dashboard-notice-board {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 212, 255, 0.28);
    background: rgba(0, 212, 255, 0.07);
}

.dashboard-notice-icon {
    font-size: 1.35rem;
    flex-shrink: 0;
    line-height: 1.2;
}

.dashboard-notice-body strong {
    display: block;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--cyan);
    margin-bottom: 0.35rem;
}

.dashboard-notice-body p {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--text);
}

[data-theme="light"] .dashboard-notice-board {
    background: rgba(0, 140, 180, 0.08);
    border-color: rgba(0, 140, 180, 0.22);
}

/* Premium Card page */
.premium-card-notice {
    display: flex;
    gap: 1rem;
    padding: 1.125rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 2rem;
    border: 1px solid;
}

.premium-card-notice-locked {
    background: rgba(255, 107, 53, 0.06);
    border-color: rgba(255, 107, 53, 0.25);
}

.premium-card-notice-unlocked {
    background: rgba(0, 255, 136, 0.06);
    border-color: rgba(0, 255, 136, 0.25);
}

.premium-card-notice-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    line-height: 1;
}

.premium-card-notice strong {
    display: block;
    font-size: 0.9375rem;
    margin-bottom: 0.35rem;
}

.premium-card-notice p {
    margin: 0 0 0.5rem;
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.55;
}

.premium-card-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .premium-card-layout { grid-template-columns: 1fr; }
}

.premium-card-visual-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.premium-card-visual {
    width: 100%;
    max-width: 380px;
    aspect-ratio: 1.586;
    border-radius: 1rem;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1f35 0%, #0d1117 40%, #1a1520 100%);
    border: 1px solid rgba(201, 169, 98, 0.35);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.premium-card-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 80% 20%, rgba(201, 169, 98, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.premium-card-visual-locked {
    filter: grayscale(0.4);
}

.premium-card-chip {
    width: 2.75rem;
    height: 2rem;
    border-radius: 0.35rem;
    background: linear-gradient(135deg, #c9a962 0%, #8b7340 100%);
    opacity: 0.9;
}

.premium-card-brand {
    font-size: 1.125rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
}

.premium-card-brand span {
    color: var(--cyan);
}

.premium-card-number {
    font-size: 1.125rem;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.85);
}

.premium-card-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.premium-card-label {
    display: block;
    font-size: 0.5625rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 0.15rem;
}

.premium-card-value {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.premium-card-lock-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(11, 14, 26, 0.55);
    backdrop-filter: blur(2px);
}

.premium-card-lock-overlay span {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background: rgba(201, 169, 98, 0.2);
    border: 1px solid rgba(201, 169, 98, 0.4);
    color: var(--gold-premium);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.premium-card-perks {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 380px;
}

.premium-card-perks li {
    position: relative;
    padding: 0.4rem 0 0.4rem 1.25rem;
    font-size: 0.8125rem;
    color: var(--muted);
}

.premium-card-perks li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--mint);
    font-weight: 700;
}

.premium-card-order-status {
    padding: 1rem;
    border-radius: var(--radius-sm);
    background: rgba(11, 14, 26, 0.4);
    border: 1px solid var(--border);
}

html[data-theme="light"] .premium-card-order-status {
    background: rgba(255, 255, 255, 0.5);
}

/* Connect Wallet */
.wallet-picker-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.65rem;
}

@media (max-width: 900px) {
    .wallet-picker-grid { grid-template-columns: repeat(2, 1fr); }
}

.wallet-picker-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgba(11, 14, 26, 0.35);
    color: var(--text);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    text-align: center;
}

html[data-theme="light"] .wallet-picker-btn {
    background: rgba(255, 255, 255, 0.5);
}

.wallet-picker-btn:hover {
    border-color: rgba(0, 240, 255, 0.35);
}

.wallet-picker-btn.active {
    border-color: rgba(0, 240, 255, 0.5);
    background: rgba(0, 240, 255, 0.08);
    color: var(--cyan);
}

.wallet-picker-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: rgba(0, 240, 255, 0.15);
    mask-size: 60%;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: 60%;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    background-color: var(--cyan);
}

.wallet-picker-btn.active .wallet-picker-icon {
    background-color: var(--cyan);
}

.wallet-picker-icon-metamask { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 2L2 8l2 12 8 4 8-4 2-12z'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 2L2 8l2 12 8 4 8-4 2-12z'/%3E%3C/svg%3E"); }
.wallet-picker-icon-trust_wallet,
.wallet-picker-icon-coinbase_wallet,
.wallet-picker-icon-phantom,
.wallet-picker-icon-exodus,
.wallet-picker-icon-ledger,
.wallet-picker-icon-trezor,
.wallet-picker-icon-other {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Cpath d='M2 10h20'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Cpath d='M2 10h20'/%3E%3C/svg%3E");
}

/* Advanced Connect Wallet */
.wallet-advanced-page .wallet-status-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 255, 136, 0.25);
    background: rgba(0, 255, 136, 0.06);
    flex-wrap: wrap;
}

.wallet-status-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: rgba(0, 255, 136, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.wallet-status-pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--mint);
    box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.5);
    animation: wallet-pulse 2s infinite;
}

@keyframes wallet-pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.45); }
    70% { box-shadow: 0 0 0 10px rgba(0, 255, 136, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 255, 136, 0); }
}

.wallet-status-body { flex: 1; min-width: 200px; }
.wallet-status-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; }
.wallet-status-badge {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    background: rgba(0, 255, 136, 0.15);
    color: var(--mint);
}

.wallet-wizard-progress {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .wallet-wizard-progress { grid-template-columns: repeat(2, 1fr); }
}

.wallet-wizard-progress-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    opacity: 0.55;
    transition: opacity 0.2s, border-color 0.2s;
}

.wallet-wizard-progress-item.active,
.wallet-wizard-progress-item.done { opacity: 1; }

.wallet-wizard-progress-item.active {
    border-color: rgba(0, 240, 255, 0.4);
    background: rgba(0, 240, 255, 0.06);
}

.wallet-wizard-progress-item.done .wallet-wizard-progress-num {
    background: var(--mint);
    color: var(--space);
}

.wallet-wizard-progress-num {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 700;
    flex-shrink: 0;
}

.wallet-wizard-progress-label {
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.2;
}

.wallet-wizard-step { display: none; margin-bottom: 1rem; }
.wallet-wizard-step.active { display: block; }

.wallet-simple-page {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
}

body.wallet-dock-open .wallet-simple-page {
    padding-bottom: calc(9.5rem + env(safe-area-inset-bottom, 0px));
}

.wallet-wizard-dock,
.wallet-wizard-actions {
    display: none;
    align-items: center;
    gap: 0.75rem;
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
    width: min(100%, var(--app-shell-max, 520px));
    max-width: var(--app-shell-max, 520px);
    padding: 0.75rem 1rem 0.65rem;
    z-index: 250;
    background: rgba(11, 14, 26, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35);
    pointer-events: auto;
    touch-action: manipulation;
}

.wallet-wizard-dock.is-visible,
.wallet-wizard-actions.is-visible {
    display: flex;
}

html[data-theme="light"] .wallet-wizard-dock,
html[data-theme="light"] .wallet-wizard-actions {
    background: rgba(255, 255, 255, 0.97);
}

.wallet-simple-page #wallet-wizard-form {
    padding-bottom: 0;
}

.wallet-simple-page .wallet-wizard-step.active {
    position: relative;
    z-index: 1;
}

.wallet-simple-page .wallet-wizard-dock .btn-primary,
.wallet-simple-page .wallet-wizard-dock .btn-secondary,
.wallet-simple-page .wallet-wizard-actions .btn-primary,
.wallet-simple-page .wallet-wizard-actions .btn-secondary {
    min-height: 2.75rem;
    touch-action: manipulation;
    cursor: pointer;
    pointer-events: auto;
}

.wallet-wizard-step[data-step="1"] {
    position: relative;
    z-index: 2;
}

.wallet-choice-grid,
.wallet-more-panel {
    position: relative;
    z-index: 3;
}

.wallet-choice-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border);
    background: rgba(11, 14, 26, 0.35);
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
    color: var(--text);
    text-align: center;
    position: relative;
    z-index: 1;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 240, 255, 0.15);
    user-select: none;
}

.wallet-choice-btn.is-filtered-out {
    display: none !important;
}

.wallet-choice-btn .wallet-logo-img {
    pointer-events: none;
}

.wallet-choice-btn .wallet-choice-name {
    pointer-events: none;
}

.wallet-picker-grid-advanced {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
    .wallet-picker-grid-advanced { grid-template-columns: repeat(2, 1fr); }
}

.wallet-picker-btn-advanced {
    align-items: flex-start;
    text-align: left;
    padding: 1rem;
    min-height: 6.5rem;
    border-color: var(--border);
}

.wallet-picker-btn-advanced.active {
    border-color: var(--wallet-accent, var(--cyan));
    background: color-mix(in srgb, var(--wallet-accent, #00f0ff) 8%, transparent);
}

.wallet-picker-name {
    font-size: 0.8125rem;
    font-weight: 700;
    display: block;
}

.wallet-picker-tagline {
    font-size: 0.625rem;
    color: var(--muted);
    font-weight: 400;
    line-height: 1.35;
    margin-top: 0.2rem;
    display: block;
}

.wallet-method-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

@media (max-width: 768px) {
    .wallet-method-grid { grid-template-columns: 1fr; }
}

.wallet-method-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgba(11, 14, 26, 0.35);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s;
    color: var(--text);
}

html[data-theme="light"] .wallet-method-btn {
    background: rgba(255, 255, 255, 0.5);
}

.wallet-method-btn strong { font-size: 0.875rem; }
.wallet-method-btn small { font-size: 0.6875rem; color: var(--muted); }

.wallet-method-btn.active {
    border-color: rgba(0, 240, 255, 0.45);
    background: rgba(0, 240, 255, 0.08);
}

.wallet-method-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background-color: var(--cyan);
    mask-size: 55%;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: 55%;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    margin-bottom: 0.25rem;
}

.wallet-method-icon-phrase { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 20h9M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 20h9M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E"); }
.wallet-method-icon-key { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4'/%3E%3C/svg%3E"); }
.wallet-method-icon-keystore { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6M16 13H8M16 17H8M10 9H8'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6M16 13H8M16 17H8M10 9H8'/%3E%3C/svg%3E"); }

.wallet-import-guide {
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgba(11, 14, 26, 0.35);
    font-size: 0.8125rem;
}

.wallet-import-guide p { margin: 0.35rem 0 0.65rem; color: var(--muted); line-height: 1.5; }
.wallet-guide-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.wallet-guide-tags span {
    font-size: 0.625rem;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    background: rgba(0, 240, 255, 0.1);
    color: var(--cyan);
}

.wallet-method-panel { display: none; }
.wallet-method-panel.active { display: block; }

.wallet-phrase-len-btn,
.wallet-phrase-mode-btn {
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.wallet-phrase-len-btn.active,
.wallet-phrase-mode-btn.active {
    border-color: rgba(0, 240, 255, 0.4);
    color: var(--cyan);
    background: rgba(0, 240, 255, 0.08);
}

.phrase-word-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

@media (max-width: 640px) {
    .phrase-word-grid { grid-template-columns: repeat(2, 1fr); }
}

.phrase-word-cell { position: relative; }
.phrase-word-num {
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.625rem;
    color: var(--muted);
    font-weight: 700;
    pointer-events: none;
    z-index: 1;
}

.phrase-word-input {
    padding-left: 1.75rem !important;
    font-size: 0.8125rem !important;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.phrase-word-count {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--orange);
}

.phrase-word-count.valid { color: var(--mint); }

.wallet-keystore-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 2rem 1rem;
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: center;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

.wallet-keystore-drop:hover { border-color: rgba(0, 240, 255, 0.35); }

.wallet-review-panel {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.wallet-review-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border);
}

.wallet-review-row:last-child { border-bottom: none; }
.wallet-review-row span { color: var(--muted); }

.wallet-security-notice {
    display: flex;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-sm);
    background: rgba(0, 240, 255, 0.06);
    border: 1px solid rgba(0, 240, 255, 0.15);
    font-size: 0.8125rem;
    color: var(--muted);
    line-height: 1.5;
}

.hidden { display: none !important; }

/* Simplified Connect Wallet */
.wallet-simple-steps {
    display: flex;
    gap: 0.5rem;
}

.wallet-simple-step {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    opacity: 0.6;
}

.wallet-simple-step span:first-child {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    flex-shrink: 0;
}

.wallet-simple-step.active,
.wallet-simple-step.done { opacity: 1; color: var(--text); }

.wallet-simple-step.active {
    border-color: rgba(0, 240, 255, 0.4);
    background: rgba(0, 240, 255, 0.06);
}

.wallet-simple-step.done span:first-child { background: var(--mint); color: var(--space); }

.wallet-logo-img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255,255,255,0.05);
}

.wallet-logo-sm { width: 36px; height: 36px; border-radius: 10px; }
.wallet-logo-md { width: 48px; height: 48px; }
.wallet-logo-lg { width: 56px; height: 56px; border-radius: 14px; }

.wallet-selected-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 240, 255, 0.3);
    background: rgba(0, 240, 255, 0.05);
    margin-bottom: 1rem;
}

.wallet-choice-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.65rem;
}

.wallet-choice-grid-more {
    grid-template-columns: repeat(3, 1fr);
    max-height: min(50vh, 360px);
    overflow-y: auto;
    padding-right: 0.25rem;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .wallet-choice-grid { grid-template-columns: repeat(2, 1fr); }
    .wallet-choice-grid-more { grid-template-columns: repeat(2, 1fr); }
    .wallet-simple-steps { flex-direction: column; }
}

html[data-theme="light"] .wallet-choice-btn {
    background: rgba(255, 255, 255, 0.6);
}

.wallet-choice-btn:hover {
    border-color: rgba(0, 240, 255, 0.35);
    transform: translateY(-1px);
}

.wallet-choice-btn.active {
    border-color: var(--wallet-accent, var(--cyan));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--wallet-accent, #00f0ff) 30%, transparent);
    background: color-mix(in srgb, var(--wallet-accent, #00f0ff) 8%, transparent);
}

.wallet-choice-name {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
}

.wallet-more-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border);
    background: transparent;
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.wallet-more-toggle:hover {
    border-color: rgba(0, 240, 255, 0.4);
    background: rgba(0, 240, 255, 0.04);
}

.wallet-more-toggle-icon {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: rgba(0, 240, 255, 0.12);
    color: var(--cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
}

.wallet-more-panel {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.wallet-advanced-details summary {
    cursor: pointer;
    font-size: 0.8125rem;
    color: var(--cyan);
    font-weight: 600;
    list-style: none;
}

.wallet-advanced-details summary::-webkit-details-marker { display: none; }

.wallet-method-tabs {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.wallet-method-tab {
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.wallet-method-tab.active {
    border-color: rgba(0, 240, 255, 0.4);
    color: var(--cyan);
    background: rgba(0, 240, 255, 0.08);
}

.wallet-advanced-body .wallet-method-panel { display: none; }
.wallet-advanced-body .wallet-method-panel.active { display: block; }

.wallet-simple-page .wallet-status-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ---- Cross-device polish ---- */
/* More menu: always one item per row */
.app-more-grid {
    display: flex !important;
    flex-direction: column;
    grid-template-columns: unset !important;
}

/* ---- App shell layout (520px frame; ignore wide viewport breakpoints) ---- */
.portal-body.app-mode .dash-quick-actions {
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.portal-body.app-mode .dash-market-grid,
.portal-body.app-mode .dash-traders-grid:not(.dash-traders-grid--carousel),
.portal-body.app-mode .portal-traders-grid,
.portal-body.app-mode .tier-progress-grid {
    grid-template-columns: 1fr !important;
}

.portal-body.app-mode .grid.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portal-body.app-mode .lg\:grid-cols-2,
.portal-body.app-mode .lg\:grid-cols-3,
.portal-body.app-mode .md\:grid-cols-2,
.portal-body.app-mode .xl\:grid-cols-3 {
    grid-template-columns: 1fr !important;
}

.portal-body.app-mode .page-wrap.max-w-4xl,
.portal-body.app-mode .page-wrap.max-w-5xl {
    max-width: none;
}

.portal-body.app-mode .dash-chart-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-body.app-mode .dash-chart-wrap {
    height: 220px;
    min-height: 200px;
}

.portal-body.app-mode .portal-traders-grid {
    display: grid;
    gap: 1rem;
}

.portal-body.app-mode .portal-trader-card,
.portal-body.app-mode .dash-trader-card,
.portal-body.app-mode .portal-copy-form {
    position: relative;
    z-index: 2;
}

.portal-body.app-mode .portal-trader-card form,
.portal-body.app-mode .dash-trader-card form {
    pointer-events: auto;
}

.portal-body.app-mode .portal-traders-page .glass-card.glass-card-static.p-4.mb-8 {
    flex-direction: column;
    align-items: stretch;
}

.portal-body.app-mode .portal-traders-page .glass-card.glass-card-static.p-4.mb-8 .input-modern,
.portal-body.app-mode .portal-traders-page .glass-card.glass-card-static.p-4.mb-8 select {
    width: 100%;
    min-width: 0;
}

.portal-body.app-mode .portal-traders-page .glass-card.glass-card-static.p-4.mb-8 .btn-primary {
    width: 100%;
}

.portal-body.app-mode .portal-table thead {
    display: none;
}

.portal-body.app-mode .portal-table tr {
    display: block;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

.portal-body.app-mode .portal-table td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.375rem 0;
    border: none;
}

.portal-body.app-mode .portal-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.portal-body.app-mode .wallet-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Trader profile & copy forms */
.trader-profile-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
}

.trader-profile-back:hover { color: var(--cyan); }

.trader-profile-head {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.trader-profile-name {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin: 0.25rem 0 0;
}

.trader-profile-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.trader-profile-copy-card {
    position: relative;
    z-index: 2;
}

.trader-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    margin-bottom: 0.75rem;
}

.trader-card-link:hover h3 {
    color: var(--cyan);
}

.trader-copy-form .trader-copy-submit:disabled {
    cursor: not-allowed;
    transform: none;
}

.trader-copy-widget {
    position: relative;
    z-index: 2;
}

.trader-copy-widget--expanded .trader-copy-meta {
    line-height: 1.45;
}

.portal-body.app-mode .dash-traders-grid--carousel {
    display: flex !important;
    grid-template-columns: unset !important;
}

.trader-copy-panel {
    margin-top: 0.25rem;
    padding-top: 0.25rem;
    border-top: 1px solid var(--border);
}

.trader-copy-panel.is-open {
    animation: trader-copy-panel-in 0.2s ease;
}

.trader-copy-toggle[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    box-shadow: none;
    border: 1px solid var(--border);
}

@keyframes trader-copy-panel-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.portal-body.app-mode .portal-trader-profile .trader-profile-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 767px) {
    .app-main {
        padding-left: max(1rem, env(safe-area-inset-left, 0px));
        padding-right: max(1rem, env(safe-area-inset-right, 0px));
    }

    .app-header {
        padding-left: max(1rem, env(safe-area-inset-left, 0px));
        padding-right: max(1rem, env(safe-area-inset-right, 0px));
    }

    .page-wrap {
        padding-left: max(1rem, env(safe-area-inset-left, 0px));
        padding-right: max(1rem, env(safe-area-inset-right, 0px));
    }
}

@media (min-width: 768px) {
    .app-main {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

@media (min-width: 1024px) {
    .app-main {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}
