/* ===== Nave Trading OS — CSS Reset, body defaults, headings, scrollbar ===== */
/* Extracted from style.css — 2026-06-19 */
/* v2: Inter font family, token-based sizes */

* { margin: 0; padding: 0; box-sizing: border-box; }

html { background: #000; }

body {
    font-family: var(--font-sans);
    background: #000;
    color: var(--gray-800);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    font-weight: var(--font-semibold);
    letter-spacing: var(--tracking-tight);
    color: var(--gray-900);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* Selection */
::selection {
    background: rgba(37, 99, 235, 0.3);
    color: var(--gray-900);
}
/* ===== Nave Trading OS — Design System Tokens v2 — Bloomberg Terminal meets Modern Dark UI ===== */
/* Extracted from style.css — 2026-06-19 */

/* ===== Nave Trading OS — Design Tokens v2 ===== */
/* Bloomberg Terminal meets Modern Dark UI */

:root {
    /* ── Neutral Gray Scale (backgrounds, surfaces, borders) ── */
    --gray-0:    #080a0f;   /* Deepest background (body) */
    --gray-50:   #0c0f17;   /* Slightly elevated surface */
    --gray-100:  #11151e;   /* Card background */
    --gray-150:  #161b26;   /* Hovered card, active tab */
    --gray-200:  #1c2230;   /* Input background, table row */
    --gray-300:  #252b3a;   /* Border default */
    --gray-400:  #384152;   /* Border emphasis */
    --gray-500:  #4e586d;   /* Muted text / inactive */
    --gray-600:  #6b7284;   /* Secondary text */
    --gray-700:  #8c93a5;   /* Tertiary text */
    --gray-800:  #b8becb;   /* Primary text on dark */
    --gray-900:  #e2e6ef;   /* High-emphasis text */
    --gray-950:  #f0f2f7;   /* Maximum contrast text */

    /* ── Brand / Accent ── */
    --brand-400:  #2563eb;   /* Primary accent — deep corporate blue */
    --brand-500:  #3b82f6;   /* Hover state */
    --brand-600:  #60a5fa;   /* Active/selected */
    --brand-400-bg: rgba(37, 99, 235, 0.10);

    /* ── Semantic (data classification) ── */
    --green-400:    #15803d;   /* Positive values */
    --green-500:    #22c55e;   /* Win badges, buy */
    --green-400-bg: rgba(21, 128, 61, 0.12);
    --red-400:      #b91c1c;   /* Negative values */
    --red-500:      #ef4444;   /* Loss badges, sell */
    --red-400-bg:   rgba(185, 28, 28, 0.12);
    --amber-400:    #d97706;   /* Warning / neutral-outcome */
    --amber-500:    #f59e0b;   /* Warning emphasis */
    --amber-400-bg: rgba(217, 119, 6, 0.12);

    /* ── Chart accent (distinct from brand for visibility) ── */
    --chart-blue:   #38bdf8;   /* Equity line, chart controls */
    --chart-indigo: #818cf8;   /* Chart gradients, secondary lines */
    --chart-purple: #a855f7;   /* Monte Carlo / complementary */

    /* ── Shorthand aliases for backward compatibility ── */
    --bg-primary:    var(--gray-0);
    --bg-secondary:  var(--gray-50);
    --bg-card:       var(--gray-100);
    --bg-tertiary:   var(--gray-150);
    --card-bg:       var(--gray-100);
    --text-primary:  var(--gray-800);
    --text-secondary: var(--gray-600);
    --text-tertiary: var(--gray-500);
    --text:          var(--gray-800);
    --text-muted:    var(--gray-600);
    --accent:        var(--brand-400);
    --accent-hover:  var(--brand-500);
    --accent-gradient: linear-gradient(135deg, var(--brand-400), #6366f1);
    --accent-glow:   rgba(37, 99, 235, 0.15);
    --win:           var(--brand-400);
    --win-bg:        rgba(37, 99, 235, 0.10);
    --loss:          var(--gray-950);
    --loss-bg:       rgba(226, 232, 239, 0.06);
    --warning:       var(--amber-500);
    --border:        var(--gray-300);
    --border-card:       rgba(37, 99, 235, 0.10);
    --border-card-hover: rgba(37, 99, 235, 0.25);
    --glass-bg:      rgba(12, 15, 23, 0.65);
    --glass-bg-hover: rgba(12, 15, 23, 0.85);
    --glow-blue:     rgba(37, 99, 235, 0.4);
    --glow-white:    rgba(226, 232, 240, 0.3);
    --surface0:      var(--gray-0);
    --surface2:      var(--gray-50);
    --surface:       var(--gray-100);
    --border-subtle: var(--gray-300);
    --bg:            var(--gray-0);

    /* ── Typography ── */
    --font-sans: 'Inter', -apple-system, 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

    /* Type scale (major third, base 16px) */
    --text-xs:    0.6875rem;   /* 11px — labels, captions, axis ticks */
    --text-sm:    0.8125rem;   /* 13px — secondary body, table cells */
    --text-base:  1rem;        /* 16px — body, inputs */
    --text-lg:    1.25rem;     /* 20px — section headers */
    --text-xl:    1.5rem;      /* 24px — page titles */
    --text-2xl:   1.875rem;    /* 30px — hero / login title */
    --text-3xl:   2.25rem;     /* 36px — rarely, large displays */

    --font-normal:   400;
    --font-medium:   500;
    --font-semibold: 600;
    --font-bold:     700;

    /* Line heights */
    --leading-tight:   1.15;   /* Headings, large numbers */
    --leading-normal:  1.4;    /* Body */
    --leading-relaxed: 1.6;    /* Long-form */

    /* Letter spacing */
    --tracking-tight:  -0.02em;  /* Headings */
    --tracking-normal:  0;
    --tracking-wide:    0.03em;  /* Labels, uppercase */
    --tracking-wider:   0.08em;  /* Tiny all-caps labels */

    /* ── Spacing (4px grid) ── */
    --space-0:  0;
    --space-1:  0.25rem;   /* 4px */
    --space-2:  0.5rem;    /* 8px */
    --space-3:  0.75rem;   /* 12px */
    --space-4:  1rem;      /* 16px */
    --space-5:  1.25rem;   /* 20px */
    --space-6:  1.5rem;    /* 24px */
    --space-8:  2rem;      /* 32px */
    --space-10: 2.5rem;    /* 40px */
    --space-12: 3rem;      /* 48px */
    --space-16: 4rem;      /* 64px */

    /* Backward compat spacing */
    --gap-xs: 0.35rem;
    --gap-sm: 0.5rem;
    --gap-md: 1rem;
    --gap-lg: 1.5rem;
    --gap-xl: 2rem;

    /* ── Border Radius ── */
    --radius-none: 0;
    --radius-xs:   2px;    /* Table cells, inline badges */
    --radius-sm:   4px;    /* Inputs, small cards */
    --radius-md:   6px;    /* Cards, modals */
    --radius-lg:   8px;    /* Large panels */
    --radius-xl:   12px;   /* Extra large */
    --radius-2xl:  16px;   /* Cards, modals */
    --radius-full: 9999px; /* Pills, badges, avatars */

    /* Cleopatra spacing aliases */
    --spacing-1: var(--space-1);
    --spacing-2: var(--space-2);
    --spacing-3: var(--space-3);
    --spacing-4: var(--space-4);
    --spacing-5: var(--space-5);
    --spacing-6: var(--space-6);
    --spacing-8: var(--space-8);
    --duration-150: var(--duration-fast);
    --duration-200: var(--duration-normal);

    /* ── Shadow / Elevation ── */
    --shadow-none: none;
    --shadow-xs:   0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-sm:   0 1px 3px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md:   0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg:   0 8px 24px rgba(0, 0, 0, 0.6);
    --shadow-xl:   0 12px 40px rgba(0, 0, 0, 0.7);

    /* ── Animation Tokens ── */
    --duration-instant: 100ms;
    --duration-fast:    150ms;
    --duration-normal:  250ms;
    --duration-slow:    400ms;
    --duration-glacial: 800ms;

    --ease-standard:   cubic-bezier(0.2, 0.0, 0, 1.0);
    --ease-decelerate: cubic-bezier(0.0, 0.0, 0.2, 1.0);
    --ease-accelerate: cubic-bezier(0.3, 0.0, 1.0, 1.0);
    --ease-emphasized: cubic-bezier(0.05, 0.7, 0.1, 1.0);
}
/* ===== Nave Trading OS ===== */
:root {
    --bg-primary: #0b0f19;
    --bg-secondary: #111827;
    --bg-card: #1a2233;
    --bg-tertiary: #1e293b;
    --card-bg: #192132;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --text: #f1f5f9;
    --accent: #38bdf8;
    --accent-hover: #7dd3fc;
    --accent-gradient: linear-gradient(135deg, #38bdf8, #6366f1);
    --accent-glow: rgba(56,189,248,0.15);
    --win: #2563eb;
    --win-bg: rgba(37,99,235,0.10);
    --loss: #e2e6ef;
    --loss-bg: rgba(226,232,239,0.06);
    --warning: #f59e0b;
    --border: #1e293b;
    --border-card: rgba(56,189,248,0.10);
    --border-card-hover: rgba(56,189,248,0.25);
    --glass-bg: rgba(17,24,39,0.65);
    --glass-bg-hover: rgba(17,24,39,0.85);
    --glow-blue: rgba(56,189,248,0.4);
    --glow-white: rgba(226,232,240,0.3);
    --surface0: #0b0f19;
    --surface2: #111827;
    --bg: #0b0f19;
    --text-muted: #94a3b8;
    /* Spacing scale */
    --gap-xs: 0.35rem;
    --gap-sm: 0.5rem;
    --gap-md: 1rem;
    --gap-lg: 1.5rem;
    --gap-xl: 2rem;
    /* Radius scale */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-full: 999px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'DM Sans', -apple-system, sans-serif;
    background: #000;
    color: var(--text-primary);
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', -apple-system, sans-serif;
    font-weight: 500;
    letter-spacing: -0.02em;
}

/* ===== AUTH SCREENS ===== */
.auth-container {
    display: flex;
    min-height: 100dvh;
    padding: 0;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.auth-container.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ── Split layout ── */
.auth-left {
    flex: 0 0 45%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    padding: 3rem;
}

.auth-left::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(56,189,248,0.08) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 30%, rgba(99,102,241,0.06) 0%, transparent 50%);
    pointer-events: none;
}

.auth-left::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(56,189,248,0.03) 0%, transparent 50%);
    animation: auth-glow-pulse 8s ease-in-out infinite;
}

@keyframes auth-glow-pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
}

.auth-logo-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.auth-diamond {
    font-size: 5rem;
    line-height: 1;
    background: linear-gradient(135deg, var(--accent) 0%, #818cf8 50%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 40px rgba(56,189,248,0.4));
    animation: auth-diamond-float 4s ease-in-out infinite;
}

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

.auth-title {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-top: 0.5rem;
}

.auth-title span {
    font-weight: 300;
    color: var(--text-secondary);
}

.auth-tagline {
    color: var(--text-secondary);
    font-size: 1.05rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    margin-top: 0.8rem;
    opacity: 0.7;
}

/* Accent line under tagline */
.auth-accent-line {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #6366f1);
    border-radius: 3px;
    margin-top: 1.5rem;
}


/* ── Right panel: login form ── */
.auth-right {
    flex: 0 0 55%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.auth-box {
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(56, 189, 248, 0.15);
    border-radius: 24px;
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    box-shadow:
        0 4px 32px rgba(0, 0, 0, 0.4),
        0 1px 0 rgba(255, 255, 255, 0.03) inset,
        0 0 0 1px rgba(56, 189, 248, 0.05) inset;
    position: relative;
    overflow: hidden;
}

/* Subtle top accent glow */
.auth-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    border-radius: 0 0 2px 2px;
}

/* Inner ambient glow */
.auth-box::after {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.auth-box-header {
    margin-bottom: 2.2rem;
    position: relative;
    z-index: 1;
}

.auth-box-header h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}

.auth-box-header p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ── Inputs ── */
.auth-input-wrap {
    position: relative;
    margin-bottom: 1rem;
    z-index: 1;
}

.auth-input-wrap .input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    pointer-events: none;
    transition: all 0.2s;
    opacity: 0.4;
}

.auth-input-wrap input {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 2.75rem;
    background: rgba(11, 15, 25, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.25s;
    letter-spacing: 0.01em;
}

.auth-input-wrap input::placeholder {
    color: rgba(148, 163, 184, 0.35);
}

.auth-input-wrap input:focus {
    outline: none;
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(11, 15, 25, 0.8);
    box-shadow:
        0 0 0 4px rgba(56, 189, 248, 0.06),
        0 0 20px rgba(56, 189, 248, 0.05);
}

.auth-input-wrap input:focus ~ .input-icon,
.auth-input-wrap:focus-within .input-icon {
    opacity: 0.9;
}

/* ── Submit button ── */
.auth-submit {
    width: 100%;
    padding: 0.85rem;
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.15) 0%, rgba(99, 102, 241, 0.1) 100%);
    color: #e2e8f0;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 0.75rem;
    letter-spacing: 0.03em;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
}

.auth-submit:hover {
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.25) 0%, rgba(99, 102, 241, 0.18) 100%);
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow:
        0 0 30px rgba(56, 189, 248, 0.15),
        0 0 60px rgba(56, 189, 248, 0.05);
    color: #fff;
    transform: translateY(-2px);
}

.auth-submit:active {
    transform: translateY(0);
    transition: all 0.1s;
}

.auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.4rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: border-color 0.2s;
    font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}
.form-group select { cursor: pointer; }
.form-group textarea { resize: vertical; min-height: 60px; }

.btn {
    padding: 0.8rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: var(--gap-sm);
}
.btn-primary { background: linear-gradient(135deg, var(--accent), #6366f1); color: #fff; border: none; }
.btn-primary:hover { background: linear-gradient(135deg, var(--accent-hover), #818cf8); box-shadow: 0 0 16px rgba(56,189,248,0.25); }
.btn-secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-secondary:hover { background: rgba(56, 189, 248, 0.1); box-shadow: 0 0 10px rgba(56,189,248,0.1); }
.btn-sm { padding: 0.4rem 0.7rem; font-size: 0.8rem; }
.btn-danger { background: transparent; color: var(--text-secondary); border: 1px solid rgba(226,232,240,0.3); }
.btn-danger:hover { background: rgba(226, 232, 240, 0.08); }

.error-msg {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    margin-bottom: 1rem;
    display: none;
    animation: error-in 0.25s ease;
}
.error-msg.show { display: block; }

@keyframes error-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== LAYOUT ===== */
.app-layout { display: flex; flex-direction: column; min-height: 100vh; }

/* ===== TOPBAR ===== */
.topbar {
    display: flex;
    align-items: center;
    height: 80px;
    padding: 0 1.5rem;
    background: transparent;
    gap: 1rem;
    flex-shrink: 0;
    z-index: 500;
    position: sticky;
    top: 0;
}

/* Logo pill */
.topbar-logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    padding: 0.6rem 1.1rem 0.6rem 0.65rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(56, 189, 248, 0.04) inset;
}
.topbar-logo-icon {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1rem; font-weight: 700;
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.3), 0 2px 6px rgba(56, 189, 248, 0.15);
}
.topbar-logo-text { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.3px; white-space: nowrap; color: var(--text-primary); }

/* Nav — centers the pill */
.topbar-nav {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
}
.nav-pill {
    display: flex;
    align-items: center;
    gap: 3px;
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    padding: 5px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(56, 189, 248, 0.04) inset;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.1rem;
    border-radius: 14px;
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    background: transparent;
    border: none;
    box-shadow: none;
}
.nav-item:hover {
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.8);
}
.nav-item.active {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(99, 102, 241, 0.14));
    color: var(--accent);
    font-weight: 600;
    box-shadow: 0 0 18px rgba(56,189,248,0.12), 0 2px 4px rgba(0,0,0,0.2);
}
.nav-indicator { display: none; }
.nav-icon { font-size: 1.15rem; width: 26px; text-align: center; flex-shrink: 0; }
.nav-label { flex: none; }

/* User pill */
.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-shrink: 0;
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    padding: 0.5rem 0.8rem 0.5rem 0.55rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(56, 189, 248, 0.04) inset;
}
.topbar-user-info { display: flex; flex-direction: column; min-width: 0; }
.topbar-user-info .user-name { color: var(--text-primary); font-weight: 600; font-size: 0.9rem; line-height: 1.2; }
.topbar-user-info .user-role {
    font-size: 0.68rem; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.5px;
}
.user-avatar {
    width: 38px; height: 38px; border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: #fff; font-size: 0.9rem;
    flex-shrink: 0;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
}
.topbar-logout {
    background: none; border: none;
    color: rgba(255,255,255,0.25); cursor: pointer;
    padding: 4px; border-radius: var(--radius-sm);
    transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
    margin-left: 0.15rem;
}
.topbar-logout:hover {
    color: var(--loss);
    background: rgba(239, 68, 68, 0.1);
}

/* Hamburger (mobile) */
.topbar-hamburger {
    display: none;
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 6px 10px;
    flex-shrink: 0;
}

/* ===== MAIN CONTENT ===== */
.main-content { flex: 1; padding: 2rem; overflow-y: auto; height: calc(100vh - 80px); }
.page-header { margin-bottom: 2rem; }
.page-header h2 { font-size: 1.5rem; margin-bottom: 0.3rem; }
.page-header p { color: var(--text-secondary); font-size: 0.9rem; }

/* ===== STATS CARDS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap-md);
    margin-bottom: 1.5rem;
}
.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.2rem;
    transition: border-color 0.2s, transform 0.15s;
}
.stat-card:hover { border-color: #334155; transform: translateY(-1px); }
.stat-card.win-tint { border-left: 3px solid var(--win); }
.stat-card.loss-tint { border-left: 3px solid var(--loss); }
.stat-card.accent-tint { border-left: 3px solid var(--accent); }
.stat-label { font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 0.3rem; display: flex; align-items: center; gap: 0.4rem; }
.stat-label .stat-icon { font-size: 1rem; }
.stat-value { font-size: 1.5rem; font-weight: 700; }
.stat-value.win { color: var(--win); }
.stat-value.loss { color: var(--loss); }
.stat-sub { font-size: 0.75rem; color: var(--text-secondary); margin-top: 0.2rem; }

/* ===== WINRATE PROGRESS BAR ===== */
.winrate-bar-wrap {
    margin-top: 0.5rem;
    background: var(--bg-primary);
    border-radius: 4px;
    height: 6px;
    overflow: hidden;
}
.winrate-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s ease-out;
    background: linear-gradient(90deg, var(--loss), #f59e0b, var(--win));
}

/* ===== STREAK BADGE ===== */
.streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    animation: pulse-badge 2s ease-in-out infinite;
}
.streak-badge.hot {
    background: rgba(34, 197, 94, 0.15);
    color: var(--win);
    border: 1px solid rgba(34, 197, 94, 0.3);
}
.streak-badge.cold {
    background: rgba(239, 68, 68, 0.15);
    color: var(--loss);
    border: 1px solid rgba(239, 68, 68, 0.3);
}
@keyframes pulse-badge {
    0%, 100% { box-shadow: 0 0 0 0 currentColor; }
    50% { box-shadow: 0 0 0 6px transparent; }
}

/* ===== DASHBOARD SECTIONS ===== */
.dashboard-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.dashboard-section h3 {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
}

/* ===== RECENT TRADES TABLE ===== */
.recent-trades-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.recent-trades-table th {
    text-align: left;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 0.7rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.75rem;
}
.recent-trades-table td {
    padding: 0.55rem 0.7rem;
    border-bottom: 1px solid rgba(30, 41, 59, 0.5);
}
.recent-trades-table tr:hover td { background: rgba(56, 189, 248, 0.03); }
.recent-trades-table .result-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}
.result-badge.win-badge { background: rgba(34, 197, 94, 0.15); color: var(--win); }
.result-badge.loss-badge { background: rgba(239, 68, 68, 0.15); color: var(--loss); }

/* ===== CALENDAR ===== */
.calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.calendar-nav button {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.calendar-nav button:hover { border-color: var(--accent); color: var(--accent); }
.calendar-nav .cal-month-label { font-weight: 600; font-size: 0.95rem; }

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
}
.calendar-grid .cal-day-header {
    font-size: 0.7rem;
    color: var(--text-secondary);
    padding: 0.3rem;
    font-weight: 600;
}
.calendar-grid .cal-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    cursor: default;
    position: relative;
    transition: background 0.2s;
}
.calendar-grid .cal-day:hover { background: rgba(56, 189, 248, 0.08); }
.calendar-grid .cal-day.other-month { color: #1e293b; }
.calendar-grid .cal-day.today { border: 1px solid var(--accent); }
.calendar-grid .cal-day .cal-profit {
    font-size: 0.58rem;
    font-weight: 600;
    margin-top: 1px;
}
.cal-day .cal-profit.positive { color: var(--win); }
.cal-day .cal-profit.negative { color: var(--loss); }
.cal-day.win-day { background: rgba(34, 197, 94, 0.08); }
.cal-day.loss-day { background: rgba(239, 68, 68, 0.08); }
.cal-day.neutral-day { background: rgba(148, 163, 184, 0.04); }

/* ===== DASHBOARD 2-COLUMN ===== */
.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

/* ===== DONUT CHART ===== */
.donut-wrap {
    display: flex;
    align-items: center;
    gap: 2rem;
    justify-content: center;
}
.donut-chart {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.donut-chart::before {
    content: '';
    position: absolute;
    inset: 12px;
    background: var(--bg-secondary);
    border-radius: 50%;
    z-index: 1;
}
.donut-inner {
    position: relative;
    z-index: 2;
    text-align: center;
}
.donut-inner .donut-value {
    font-size: 1.5rem;
    font-weight: 700;
}
.donut-inner .donut-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
}
.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    font-size: 0.85rem;
}
.donut-legend .legend-item {
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
}
.donut-legend .legend-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.legend-dot.win-dot { background: var(--win); }
.legend-dot.loss-dot { background: var(--loss); }

/* ===== P&L BARS SECTION ===== */
.pl-bars-wrap { display: flex; flex-direction: column; }
.pl-bars-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}
.pl-mini-bars {
    display: flex;
    gap: 3px;
    align-items: flex-end;
    height: 100px;
}
.pl-mini-bar {
    flex: 1;
    border-radius: 2px 2px 0 0;
    min-width: 4px;
    transition: height 0.5s ease-out;
    position: relative;
    cursor: pointer;
}
.pl-mini-bar.win-bar { background: var(--win); opacity: 0.75; }
.pl-mini-bar.loss-bar { background: var(--loss); opacity: 0.75; }
.pl-mini-bar:hover { opacity: 1; transform: scaleY(1.05); transform-origin: bottom; }
.pl-mini-bar:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    white-space: nowrap;
    z-index: 10;
    margin-bottom: 4px;
    border: 1px solid var(--border);
}

/* ===== EQUITY CURVE ===== */
.equity-curve-wrap {
    width: 100%;
    height: 180px;
    position: relative;
}
.equity-curve-wrap svg {
    width: 100%;
    height: 100%;
}
.equity-curve-wrap .equity-line {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}
.equity-curve-wrap .equity-area {
    fill: url(#equityGrad);
}
.equity-curve-wrap .equity-zero-line {
    stroke: var(--border);
    stroke-width: 1;
    stroke-dasharray: 4 4;
}
.equity-curve-wrap .equity-tooltip {
    position: absolute;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    pointer-events: none;
    display: none;
    z-index: 20;
    white-space: nowrap;
}

/* ===== PAIR PERFORMANCE ===== */
.pair-rows { display: flex; flex-direction: column; gap: 0.6rem; }
.pair-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.85rem;
}
.pair-row .pair-name {
    width: 70px;
    font-weight: 600;
    font-size: 0.8rem;
    flex-shrink: 0;
}
.pair-row .pair-bar-wrap {
    flex: 1;
    height: 8px;
    background: var(--bg-primary);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
}
.pair-row .pair-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s ease-out;
    min-width: 2px;
}
.pair-bar-fill.pair-win { background: var(--win); }
.pair-bar-fill.pair-loss { background: var(--loss); }
.pair-row .pair-pnl {
    width: 80px;
    text-align: right;
    font-weight: 600;
    font-size: 0.8rem;
    flex-shrink: 0;
}
.pair-row .pair-trades-count {
    width: 36px;
    text-align: right;
    font-size: 0.7rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}

/* ===== MONTHLY COMPARISON ===== */
.month-compare {
    display: flex;
    gap: var(--gap-md);
}
.month-compare .month-card {
    flex: 1;
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}
.month-card .month-name {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}
.month-card .month-profit {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}
.month-card .month-trades {
    font-size: 0.7rem;
    color: var(--text-secondary);
}
.month-card.current-month { border: 1px solid var(--border); }
.month-card .month-indicator {
    font-size: 0.7rem;
    margin-top: 0.3rem;
}

/* ===== RISK METRICS CARDS ===== */
.risk-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}
.risk-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
    transition: transform 0.2s, border-color 0.2s;
}
.risk-card:hover { transform: translateY(-2px); border-color: #334155; }
.risk-card .risk-icon { font-size: 1.3rem; margin-bottom: 0.3rem; }
.risk-card .risk-value { font-size: 1.3rem; font-weight: 700; }
.risk-card .risk-label { font-size: 0.7rem; color: var(--text-secondary); margin-top: 0.2rem; }
.risk-card .risk-sub { font-size: 0.65rem; color: var(--text-secondary); margin-top: 0.15rem; }

/* ===== STREAK TABLE ===== */
.streak-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}
.streak-table th {
    text-align: center;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.3rem;
    font-size: 0.7rem;
    border-bottom: 1px solid var(--border);
}
.streak-table td {
    text-align: center;
    padding: 0.4rem;
    font-weight: 600;
}
.streak-table .streak-win { color: var(--win); }
.streak-table .streak-loss { color: var(--loss); }

/* ===== DAY OF WEEK BARS ===== */
@keyframes bar-grow {
    0%   { transform: scaleY(0); opacity: 0; filter: brightness(2); }
    50%  { transform: scaleY(1.1); opacity: 0.9; filter: brightness(1.3); }
    70%  { transform: scaleY(0.94); }
    85%  { transform: scaleY(1.02); }
    100% { transform: scaleY(1); opacity: 1; filter: brightness(1); }
}
@keyframes pnl-fade-in {
    0%   { opacity: 0; transform: translateY(6px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes label-fade-in {
    0%   { opacity: 0; }
    100% { opacity: 1; }
}
.dow-bars {
    display: flex;
    gap: var(--gap-sm);
    align-items: flex-end;
    height: 110px;
    padding-top: 0.5rem;
}
.dow-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    height: 100%;
    justify-content: flex-end;
}
.dow-bar {
    width: 100%;
    max-width: 40px;
    border-radius: 4px 4px 0 0;
    min-height: 3px;
    cursor: pointer;
    position: relative;
    transform-origin: bottom;
    animation: bar-grow 0.75s cubic-bezier(0.34, 1.3, 0.64, 1) both;
}
.dow-bar-wrap:nth-child(1) .dow-bar { animation-delay: 0.04s; }
.dow-bar-wrap:nth-child(2) .dow-bar { animation-delay: 0.10s; }
.dow-bar-wrap:nth-child(3) .dow-bar { animation-delay: 0.16s; }
.dow-bar-wrap:nth-child(4) .dow-bar { animation-delay: 0.22s; }
.dow-bar-wrap:nth-child(5) .dow-bar { animation-delay: 0.28s; }
.dow-bar-wrap:nth-child(6) .dow-bar { animation-delay: 0.34s; }
.dow-bar-wrap:nth-child(7) .dow-bar { animation-delay: 0.40s; }
.dow-bar:hover { filter: brightness(1.3); transform: scaleY(1.06); transition: all 0.15s ease; }
.dow-bar.win-dow { background: linear-gradient(180deg, var(--win) 0%, rgba(56,189,248,0.5) 100%); }
.dow-bar.loss-dow { background: linear-gradient(180deg, var(--loss) 0%, rgba(226,232,240,0.5) 100%); }
.dow-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    animation: label-fade-in 0.4s ease-out both;
}
.dow-bar-wrap:nth-child(1) .dow-label { animation-delay: 0.24s; }
.dow-bar-wrap:nth-child(2) .dow-label { animation-delay: 0.30s; }
.dow-bar-wrap:nth-child(3) .dow-label { animation-delay: 0.36s; }
.dow-bar-wrap:nth-child(4) .dow-label { animation-delay: 0.42s; }
.dow-bar-wrap:nth-child(5) .dow-label { animation-delay: 0.48s; }
.dow-bar-wrap:nth-child(6) .dow-label { animation-delay: 0.54s; }
.dow-bar-wrap:nth-child(7) .dow-label { animation-delay: 0.60s; }
.dow-pnl {
    font-size: 0.6rem;
    font-weight: 600;
    animation: pnl-fade-in 0.45s ease-out both;
}
.dow-bar-wrap:nth-child(1) .dow-pnl { animation-delay: 0.54s; }
.dow-bar-wrap:nth-child(2) .dow-pnl { animation-delay: 0.60s; }
.dow-bar-wrap:nth-child(3) .dow-pnl { animation-delay: 0.66s; }
.dow-bar-wrap:nth-child(4) .dow-pnl { animation-delay: 0.72s; }
.dow-bar-wrap:nth-child(5) .dow-pnl { animation-delay: 0.78s; }
.dow-bar-wrap:nth-child(6) .dow-pnl { animation-delay: 0.84s; }
.dow-bar-wrap:nth-child(7) .dow-pnl { animation-delay: 0.90s; }

/* ===== SESSION CARDS ===== */
@keyframes session-pop {
    0%   { opacity: 0; transform: translateY(12px) scale(0.95); }
    60%  { transform: translateY(-2px) scale(1.01); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
.session-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.7rem;
}
.session-card {
    background: rgba(255,255,255,0.025);
    border-radius: 8px;
    padding: 0.9rem;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.2s;
    animation: session-pop 0.55s cubic-bezier(0.34, 1.3, 0.64, 1) both;
}
.session-card:nth-child(1) { animation-delay: 0.05s; }
.session-card:nth-child(2) { animation-delay: 0.15s; }
.session-card:nth-child(3) { animation-delay: 0.25s; }
.session-card:hover {
    border-color: rgba(56,189,248,0.2);
    background: rgba(56,189,248,0.06);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.session-card .session-name {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}
.session-card .session-pnl {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}
.session-card .session-detail {
    font-size: 0.65rem;
    color: var(--text-secondary);
}

/* ===== HISTOGRAM ===== */
.histo-wrap {
    display: flex;
    gap: 3px;
    align-items: flex-end;
    height: 100px;
}
.histo-bar {
    flex: 1;
    border-radius: 2px 2px 0 0;
    min-width: 8px;
    transition: height 0.6s ease-out;
    cursor: pointer;
    position: relative;
}
.histo-bar:hover { opacity: 0.8; }
.histo-bar.win-histo { background: var(--win); opacity: 0.7; }
.histo-bar.loss-histo { background: var(--loss); opacity: 0.7; }
.histo-bar:hover::after {
    content: attr(data-label);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    color: var(--text-primary);
    white-space: nowrap;
    margin-bottom: 2px;
}
.histo-labels {
    display: flex;
    gap: 3px;
    margin-top: 0.3rem;
}
.histo-labels span {
    flex: 1;
    text-align: center;
    font-size: 0.55rem;
    color: var(--text-secondary);
    min-width: 8px;
}

/* ===== PAIR TABLE ENHANCED ===== */
.pair-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}
.pair-table th {
    text-align: left;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.35rem 0.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.7rem;
}
.pair-table td {
    padding: 0.45rem 0.5rem;
    border-bottom: 1px solid rgba(30,41,59,0.4);
}
.pair-table tr:hover td { background: rgba(56,189,248,0.03); }
.pair-table .pair-rank { color: var(--text-secondary); font-size: 0.7rem; text-align: center; }

/* ===== 3-COLUMN LAYOUT ===== */
.dashboard-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: start;
    margin-bottom: 1.5rem;
}

/* ===== SECTION HEADER ANIMATION ===== */
.dashboard-section h3 {
    animation: fadeInUp 0.4s ease-out;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== VALUE CHANGE ANIMATION ===== */
@keyframes valuePop {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}
.value-animate {
    animation: valuePop 0.4s ease-out;
}

/* ===== SHARPE / SORTINO / Z-SCORE / RUIN CARDS ===== */
.sharpe-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.7rem;
    margin-bottom: 0.8rem;
}
.sharpe-card {
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: var(--radius-md);
    padding: 0.8rem;
    text-align: center;
    transition: all 0.2s;
}
.sharpe-card:hover {
    border-color: rgba(56,189,248,0.2);
    background: rgba(56,189,248,0.04);
    transform: translateY(-2px);
}
.sharpe-icon { font-size: 1.1rem; margin-bottom: 0.3rem; }
.sharpe-value { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.15rem; }
.sharpe-label { font-size: 0.65rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.4px; }
.sharpe-hint { font-size: 0.6rem; color: var(--text-secondary); opacity: 0.7; margin-top: 0.15rem; }

/* ===== HOLDING TIME + R:R ROW ===== */
.dash-hr-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
}
.dash-hr-card {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: var(--radius-md);
    padding: 0.8rem;
    transition: all 0.2s;
}
.dash-hr-card:hover {
    border-color: rgba(56,189,248,0.15);
    background: rgba(56,189,248,0.04);
}
.hr-icon { font-size: 1.3rem; flex-shrink: 0; }
.hr-value { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }
.hr-label { font-size: 0.62rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.3px; margin-top: 0.1rem; }

/* ===== ROLLING WINRATE SPARKLINE ===== */
.rolling-winrate-wrap {
    width: 100%;
    height: 85px;
    background: rgba(8,12,22,0.4);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 8px;
    overflow: hidden;
}
.rolling-svg {
    width: 100%;
    height: 100%;
    display: block;
}
.rolling-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.58rem;
    color: var(--text-secondary);
    opacity: 0.7;
    margin-top: 0.3rem;
    padding: 0 0.2rem;
}

/* ===== WEEKLY P&L BARS ===== */
.weekly-pnl-bars {
    display: flex;
    gap: 0.3rem;
    align-items: flex-end;
    height: 90px;
    padding-top: 0.3rem;
}
.wp-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    height: 100%;
    justify-content: flex-end;
}
.wp-value { font-size: 0.52rem; font-weight: 600; }
.wp-bar {
    width: 100%;
    max-width: 28px;
    border-radius: 3px 3px 0 0;
    min-height: 3px;
    transition: opacity 0.15s;
    cursor: pointer;
}
.wp-bar:hover { opacity: 0.7; }
.wp-bar.wp-win { background: linear-gradient(180deg, var(--win), rgba(56,189,248,0.4)); }
.wp-bar.wp-loss { background: linear-gradient(180deg, var(--loss), rgba(226,232,240,0.4)); }
.wp-label { font-size: 0.52rem; color: var(--text-secondary); }

/* ===== LONG/SHORT MATRIX TABLE ===== */
.ls-matrix-wrap { max-height: 260px; overflow-y: auto; }
.ls-matrix-table { width: 100%; border-collapse: collapse; font-size: 0.72rem; }
.ls-matrix-table th {
    text-align: left;
    padding: 0.35rem 0.4rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.ls-matrix-table td {
    padding: 0.3rem 0.4rem;
    border-bottom: 1px solid rgba(255,255,255,0.02);
}
.ls-matrix-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.ls-matrix-table .win { color: var(--win); }
.ls-matrix-table .loss { color: var(--loss); }

/* ===== HOURLY HEATMAP ===== */
.hourly-heatmap { margin-top: 0.3rem; }
.hh-bars {
    display: flex;
    gap: 2px;
    align-items: flex-end;
    height: 70px;
}
.hh-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    height: 100%;
    justify-content: flex-end;
    cursor: pointer;
    transition: opacity 0.15s;
}
.hh-col:hover { opacity: 0.8; }
.hh-bar-wrap {
    width: 100%;
    height: 55px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.hh-bar {
    width: 100%;
    border-radius: 2px 2px 0 0;
    min-height: 1px;
    transition: all 0.2s;
}
.hh-label {
    font-size: 0.48rem;
    color: var(--text-secondary);
    text-align: center;
}
.hh-legend {
    display: flex;
    justify-content: space-between;
    font-size: 0.55rem;
    color: var(--text-secondary);
    opacity: 0.6;
    margin-top: 0.3rem;
    padding: 0 0.2rem;
}

/* ===== JOURNAL 2-COLUMN LAYOUT ===== */
.journal-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.journal-form { position: sticky; top: 2rem; }

.journal-form .form-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}
.journal-form .form-card h3 { font-size: 1rem; margin-bottom: 1.2rem; display: flex; align-items: center; gap: var(--gap-sm); }

.journal-form .form-group { margin-bottom: 0.9rem; }
.journal-form .form-group label { font-size: 0.8rem; }

.journal-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-bottom: 0;
}
.journal-form .form-row .form-group { margin-bottom: 0.9rem; }

.image-upload-area {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 0.9rem;
}
.image-upload-area:hover { border-color: var(--accent); background: rgba(56, 189, 248, 0.05); }
.image-upload-area.has-image { border-color: var(--win); }
.image-upload-area img { max-width: 100%; max-height: 120px; border-radius: 4px; }
.image-upload-area input { display: none; }
.image-upload-area .upload-text { font-size: 0.8rem; color: var(--text-secondary); }
.image-upload-area .upload-text .icon { font-size: 1.5rem; display: block; margin-bottom: 0.3rem; }

.journal-form .form-actions { display: flex; gap: var(--gap-sm); margin-top: 0.5rem; }
.journal-form .form-actions .btn { flex: 1; justify-content: center; }

/* ===== JOURNAL HISTORY ===== */
.journal-history { min-width: 0; }

/* ===== JOURNAL FILTERS ===== */
.journal-filters {
    display: flex;
    gap: var(--gap-sm);
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
    align-items: center;
}
.journal-filters input,
.journal-filters select {
    padding: 0.45rem 0.7rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.8rem;
    font-family: inherit;
    transition: border-color 0.2s;
}
.journal-filters input:focus,
.journal-filters select:focus {
    outline: none;
    border-color: var(--accent);
}
.journal-filters input { width: 100px; }
.journal-filters input::placeholder { color: #475569; }
.journal-filters select { cursor: pointer; }
.journal-filters .filter-clear {
    font-size: 0.7rem;
    color: var(--accent);
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.journal-filters .filter-clear:hover { opacity: 1; }

/* ===== JOURNAL MINI-STATS ===== */
.journal-mini-stats {
    display: flex;
    gap: 1.2rem;
    padding: 0.6rem 0.8rem;
    background: var(--bg-primary);
    border-radius: 8px;
    margin-bottom: 0.8rem;
    font-size: 0.8rem;
    flex-wrap: wrap;
}
.journal-mini-stats .mini-stat {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.journal-mini-stats .mini-stat .ms-label {
    color: var(--text-secondary);
    font-size: 0.7rem;
}
.journal-mini-stats .mini-stat .ms-value {
    font-weight: 600;
}

.journal-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: var(--gap-sm);
}
.journal-toolbar h3 { font-size: 1rem; }
.journal-toolbar .btn-group { display: flex; gap: 0.4rem; }
.journal-toolbar .btn-group .btn { white-space: nowrap; }

.export-dropdown { position: relative; display: inline-block; }
.export-dropdown .export-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    z-index: 100;
    min-width: 100px;
}
.export-dropdown .export-menu.show { display: block; }
.export-dropdown .export-menu div {
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}
.export-dropdown .export-menu div:hover { background: rgba(56, 189, 248, 0.1); }

/* ===== TRADE CARD ===== */
.trade-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.2s;
    display: flex;
    flex-direction: row;
}
.trade-card:hover { border-color: #334155; }

.trade-card-image {
    width: 140px;
    min-height: 140px;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
}
.trade-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0; left: 0;
}
.trade-card-image img:hover { opacity: 0.85; }
.trade-card-image-empty {
    color: #1e293b;
    font-size: 2.5rem;
    cursor: default;
}
.trade-card-image .image-error {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--gap-sm);
    background: rgba(239, 68, 68, 0.08);
    border: 1px dashed rgba(239, 68, 68, 0.3);
    color: #94a3b8;
    font-size: 0.8rem;
    position: absolute;
    top: 0; left: 0;
}

.trade-card-body {
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.trade-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}
.trade-card-pair {
    font-size: 1rem;
    font-weight: 600;
}
.trade-card-pair .dir { font-size: 0.8rem; font-weight: 400; color: var(--text-secondary); }
.trade-card-result {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}
.trade-card-result.win { background: rgba(34, 197, 94, 0.1); color: var(--win); }
.trade-card-result.loss { background: rgba(239, 68, 68, 0.1); color: var(--loss); }

.trade-card-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap-sm);
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}
.trade-card-details .detail { color: var(--text-secondary); }
.trade-card-details .detail strong { color: var(--text-primary); display: block; font-size: 0.85rem; margin-top: 0.1rem; }
.trade-card-details .profit { color: var(--win); }
.trade-card-details .loss { color: var(--loss); }

.trade-card-notes {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-style: italic;
}
.trade-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.4rem;
}
.tag-badge {
    background: rgba(56,189,248,0.1);
    border: 1px solid rgba(56,189,248,0.2);
    color: var(--accent);
    font-size: 0.68rem;
    font-weight: 500;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

.trade-card-actions {
    display: flex;
    gap: 0.4rem;
    justify-content: flex-end;
    margin-top: auto;
}
.trade-card-actions .btn { padding: 0.3rem 0.6rem; font-size: 0.75rem; }

.trade-card-date {
    font-size: 0.75rem;
    color: #475569;
}

.trade-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap-md);
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 0.5rem; display: block; }

/* ===== HIDDEN PAGES ===== */
.page { display: none; }
.page.active { display: block; }

/* ===== FORM INPUTS (shared) ===== */
.tp-input {
    padding: 0.35rem 0.5rem;
    background: var(--bg-primary, #0f1119);
    border: 1px solid var(--border, #2a2d3a);
    border-radius: var(--radius-sm, 4px);
    color: var(--text-primary, #e2e8f0);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}
.tp-input:focus { outline: none; border-color: var(--accent); }

/* ===== SPINNER ===== */
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes toast-in {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes toast-out {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}
@keyframes card-glow {
    0% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.5); }
    70% { box-shadow: 0 0 0 8px rgba(56, 189, 248, 0); }
    100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

.spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(11, 15, 25, 0.3);
    border-top-color: #0b0f19;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: var(--gap-sm);
    pointer-events: none;
}
.toast {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.9rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    font-weight: 500;
    animation: toast-in 0.3s ease-out;
    pointer-events: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.toast.removing { animation: toast-out 0.25s ease-in forwards; }
.toast.success { border-color: rgba(34, 197, 94, 0.4); }
.toast.success .toast-icon { color: var(--win); }
.toast.error { border-color: rgba(239, 68, 68, 0.4); }
.toast.error .toast-icon { color: var(--loss); }
.toast .toast-icon { font-size: 1.1rem; flex-shrink: 0; }

/* ===== TRADE CARD GLOW (new/updated) ===== */
.trade-card.just-saved {
    animation: card-glow 1s ease-out;
}

/* ===== MODAL (for image preview) ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    cursor: pointer;
}
.modal-overlay.show { display: flex; }
.modal-overlay img { max-width: 90%; max-height: 90%; border-radius: 8px; }

/* ══════════════════════════════════════════════
   RESPONSIVE — Tablet & Mobile
   ══════════════════════════════════════════════ */


/* ── Tablet Landscape (≤1024px) ── */
@media (max-width: 1024px) {
    .journal-layout { grid-template-columns: 1fr; }
    .journal-form { position: static; }
    .trade-cards-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-layout { grid-template-columns: 1fr; }
    .dashboard-3col { grid-template-columns: 1fr 1fr; }
    .risk-grid { grid-template-columns: repeat(3, 1fr); }
    .sharpe-grid { grid-template-columns: repeat(2, 1fr); }
    .mc-stats-row { grid-template-columns: repeat(2, 1fr); }
    .ls-matrix-table { font-size: 0.65rem; }
    .main-content { padding: 1.5rem; }

    /* Auth — tablet landscape */
    .auth-left { flex: 0 0 42%; padding: 2rem; }
    .auth-right { flex: 0 0 58%; padding: 2rem; }
    .auth-diamond { font-size: 4rem; }
    .auth-title { font-size: 2.2rem; }
    .auth-box { padding: 2rem; max-width: 380px; }
}

/* ── Tablet Portrait & Mobile (≤768px) ── */
@media (max-width: 768px) {
    /* Topbar mobile — show hamburger, hide nav by default */
    .topbar-hamburger { display: flex; }
    .topbar-nav {
        display: none;
        position: fixed;
        top: 80px;
        left: 0.5rem; right: 0.5rem;
        z-index: 499;
    }
    .topbar.open .topbar-nav { display: flex; }
    .topbar-nav .nav-pill {
        width: 100%;
        flex-direction: column;
        background: rgba(8, 8, 13, 0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid rgba(255,255,255,0.06);
        border-radius: 16px;
        padding: 0.5rem;
        gap: 4px;
        box-shadow: 0 8px 40px rgba(0,0,0,0.5);
    }
    .topbar-nav .nav-item { width: 100%; justify-content: flex-start; padding: 0.6rem 0.85rem; border-radius: 10px; }
    .topbar-user { margin-left: auto; }
    .topbar-user-info { display: none; }  /* hide name/role text on mobile */

    /* Main content */
    .main-content { padding: 0.75rem; height: calc(100vh - 80px); }
    
    /* Stats & grids */
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: var(--gap-sm); }
    .stat-card { padding: 0.8rem; }
    .stat-value { font-size: 1.2rem; }
    .dashboard-layout { grid-template-columns: 1fr; }
    .dashboard-3col { grid-template-columns: 1fr; }
    .risk-grid { grid-template-columns: repeat(2, 1fr); gap: 0.4rem; }
    .sharpe-grid { grid-template-columns: repeat(2, 1fr); gap: 0.4rem; }
    .dash-hr-row { grid-template-columns: 1fr; }
    .mc-stats-row { grid-template-columns: repeat(2, 1fr); gap: 0.4rem; }
    .mc-stat-card { padding: 0.5rem; }
    .mc-stat-value { font-size: 0.95rem; }

    /* Sessions */
    .session-grid { grid-template-columns: repeat(3, 1fr); gap: 0.4rem; }
    .session-card { padding: 0.6rem; }
    .session-card .session-pnl { font-size: 0.9rem; }

    /* Inicio */
    .in-wrap { padding: 0.5rem; gap: 0.5rem; }
    .in-top { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
    .in-metricas { gap: 1rem; }
    .in-m-val { font-size: 0.95rem; }
    .in-curva { height: 140px; }
    .in-data-row { grid-template-columns: 1fr; gap: 0.5rem; }


    /* Admin */
    .admin-tabs {
        flex-wrap: wrap;
        gap: 2px;
    }
    .admin-tab {
        flex: 0 0 auto;
        padding: 0.4rem 0.6rem;
        font-size: 0.72rem;
    }
    .admin-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .admin-table { font-size: 0.7rem; }
    .admin-table th, .admin-table td { padding: 0.35rem 0.4rem; }
    .admin-filter-row { gap: 0.35rem; }
    .admin-filter-row select { font-size: 0.72rem; padding: 0.3rem 0.5rem; }
    .admin-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.4rem; }
    #admin-content { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .status-summary-card { padding: 0.6rem 0.8rem; min-width: auto; }

    /* Journal */
    .journal-toolbar { flex-direction: column; align-items: stretch; }
    .journal-toolbar .btn-group { justify-content: flex-end; }
    .trade-cards-grid { grid-template-columns: 1fr; }
    .trade-card { flex-direction: column; }
    .trade-card-image { width: 100%; aspect-ratio: 16/9; min-height: auto; }
    .trade-card-image img { position: relative; }
    .trade-card-details { grid-template-columns: repeat(2, 1fr); gap: 0.3rem; }
    .journal-filters { gap: 0.3rem; }
    .journal-filters input { width: 70px; }
    .journal-mini-stats { gap: 0.6rem; font-size: 0.7rem; flex-wrap: wrap; }

    /* Calendar */
    .calendar-grid .cal-day { font-size: 0.65rem; }
    .calendar-nav .cal-month-label { font-size: 0.85rem; }
    .calendar-nav button { padding: 0.2rem 0.5rem; font-size: 0.75rem; }

    /* Day-of-week bars */
    .dow-bars { height: 80px; gap: 0.3rem; }
    .dow-bar { max-width: 28px; }
    .dow-label { font-size: 0.6rem; }

    /* Pair performance */
    .pair-row .pair-name { width: 55px; font-size: 0.7rem; }
    .pair-row .pair-pnl { width: 60px; font-size: 0.7rem; }
    .pair-row .pair-trades-count { width: 28px; font-size: 0.65rem; }

    /* Weekly P&L */
    .weekly-pnl-bars { height: 65px; gap: 0.2rem; }
    .wp-bar { max-width: 20px; }

    /* Hourly heatmap */
    .hh-bars { height: 50px; }
    .hh-label { font-size: 0.42rem; }
    .hh-bar-wrap { height: 38px; }

    /* Monte Carlo */
    .mc-hist-row { height: 60px; gap: 0.3rem; }
    .mc-hist-bar { width: 12px; }

    /* Donut */
    .donut-wrap { gap: var(--gap-md); flex-wrap: wrap; }
    .donut-chart { width: 90px; height: 90px; }
    .donut-inner .donut-value { font-size: 1.1rem; }

    /* Meet */
    .meet-toolbar { flex-wrap: wrap; gap: 0.3rem; padding: 0.4rem; }
    .meet-room-input { width: 130px; font-size: 0.78rem; }
    #page-meet.active { height: calc(100vh - 5rem); }

    /* Auth */
    .auth-container { flex-direction: column; }
    .auth-left { flex: 0 0 auto; padding: 2.5rem 2rem; min-height: auto; }
    .auth-left::before, .auth-left::after { display: none; }
    .auth-diamond { font-size: 3rem; }
    .auth-title { font-size: 2rem; }
    .auth-tagline { font-size: 0.9rem; }
    .auth-right { flex: 0 0 auto; padding: 0 2rem 2.5rem; }
    .auth-box { padding: 1.5rem; max-width: 100%; }
    .journal-form .form-row { grid-template-columns: 1fr; }

    /* Global */
    .page-header h2 { font-size: 1.2rem; }
    .page-header p { font-size: 0.8rem; }
    .btn { font-size: 0.8rem; padding: 0.55rem; }

    /* Toast */
    .toast { font-size: 0.78rem; padding: 0.7rem 0.9rem; }

    /* Sharpe / risk cards */
    .sharpe-card { padding: 0.5rem; }
    .sharpe-value { font-size: 1rem; }
    .risk-card { padding: 0.6rem; }
    .risk-card .risk-value { font-size: 1rem; }

}

/* ── Small Phones (≤480px) ── */
@media (max-width: 480px) {
    .topbar { padding: 0 0.5rem; gap: 0.3rem; }
    .topbar-logo-text { display: none; }
    .topbar-logo { padding: 0.4rem 0.5rem; }
    .nav-item { padding: 0.4rem 0.55rem; font-size: 0.75rem; }
    .nav-label { display: none; }
    #admin-content { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    .main-content { padding: 0.5rem; height: calc(100vh - 80px); }
    
    /* Stats 1-column on very small */
    .stats-grid { grid-template-columns: 1fr; }
    .in-greet { font-size: 1rem; }
    .risk-grid { grid-template-columns: 1fr 1fr; }
    .sharpe-grid { grid-template-columns: 1fr; }

    /* Charts */
    .tools-bubble-header { font-size: 0.68rem; padding: 0.35rem 0.5rem; }

    /* Admin */
    .admin-tab { font-size: 0.68rem; padding: 0.3rem 0.45rem; }
    .admin-stats-grid { grid-template-columns: 1fr; }

    /* Journal */
    .trade-card-details { grid-template-columns: 1fr 1fr; font-size: 0.7rem; }
    .trade-card-pair { font-size: 0.85rem; }

    /* Session grid */
    .session-grid { grid-template-columns: repeat(3, 1fr); gap: 0.3rem; }
    .session-card { padding: 0.45rem; }

    /* Inicio */
    .in-curva { height: 120px; }
    .in-m-val { font-size: 0.85rem; }

    /* Calendar */
    .calendar-grid .cal-day { font-size: 0.58rem; }

    /* Donut */
    .donut-wrap { flex-direction: column; align-items: center; }

    /* Auth */
    .auth-box { padding: 1.2rem; }
    .auth-left { padding: 1.5rem 1rem; }
    .auth-diamond { font-size: 2.5rem; }
    .auth-title { font-size: 1.6rem; }
    .auth-tagline { font-size: 0.8rem; }

    .btn { font-size: 0.75rem; padding: 0.45rem; }

    /* Live indicator */
    .live-indicator { font-size: 0.6rem; padding: 0.2rem 0.4rem; }

    /* Indicators popup */
    .indicators-popup { min-width: 160px; left: auto; right: 0; }
    .indicator-option { font-size: 0.72rem; padding: 0.35rem 0.5rem; }
}

/* ===== Meet (Jitsi) ===== */
#page-meet.active {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 3.5rem);
}
.meet-toolbar {
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
    padding: 0.5rem 0.75rem;
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.meet-room-input {
    background: var(--surface0);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.45rem 0.65rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    width: 200px;
}
.meet-room-input:focus {
    outline: none;
    border-color: var(--accent);
}
.meet-link {
    color: var(--accent);
    font-size: 0.8rem;
    margin-left: 0.25rem;
    word-break: break-all;
}
.meet-container {
    flex: 1;
    position: relative;
    overflow: hidden;
}
.meet-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ===== ADMIN PANEL ===== */
.admin-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    background: var(--card-bg);
    padding: 0.25rem;
    border-radius: var(--radius-md);
}
.admin-tab {
    flex: 1;
    padding: 0.6rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: calc(var(--radius-md) - 2px);
    transition: all 0.15s;
}
.admin-tab:hover { color: var(--text-primary); }
.admin-tab.active {
    background: var(--accent);
    color: white;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.admin-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}
.admin-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}
.admin-table tr:hover td { background: rgba(255,255,255,0.03); }
.admin-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
}
.admin-badge.active { background: rgba(56,189,248,0.15); color: var(--win); }
.admin-badge.inactive { background: rgba(226,232,240,0.15); color: var(--loss); }
.admin-badge.admin { background: rgba(59,130,246,0.15); color: var(--accent); }
.admin-filter-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.admin-filter-row select {
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
}
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.admin-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
    font-size: 0.9rem;
}
.admin-actions {
    display: flex;
    gap: 0.35rem;
}

/* ===== EXPLICACIONES PAGE ===== */
.explicaciones-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem 2rem;
}
.expl-card {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    margin-bottom: 1.25rem;
    overflow: hidden;
    transition: border-color 0.2s;
}
.expl-card:hover { border-color: var(--border); }
.expl-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem 0;
}
.expl-card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
}
.expl-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}
.expl-card-body {
    padding: 1rem 1.5rem 1.5rem;
}
.expl-card-body p {
    margin: 0 0 0.75rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}
.expl-card-body p:last-child { margin-bottom: 0; }
.expl-card-body h4 {
    margin: 1.25rem 0 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
}
.expl-card-body h4:first-child { margin-top: 0; }

/* Diagram */
.expl-diagram {
    background: var(--bg);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    overflow-x: auto;
}
.expl-flow {
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
    justify-content: center;
    flex-wrap: wrap;
    min-width: fit-content;
}
.expl-node {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    text-align: center;
    min-width: 80px;
    transition: border-color 0.2s;
}
.expl-node:hover { border-color: var(--accent); }
.expl-node span { font-size: 1.5rem; display: block; margin-bottom: 0.25rem; }
.expl-node small { color: var(--text-secondary); font-size: 0.75rem; font-weight: 500; }
.expl-arrow {
    font-size: 1.25rem;
    color: var(--accent);
    font-weight: 700;
    flex-shrink: 0;
}

/* Steps */
.expl-steps {
    padding-left: 1.25rem;
    margin: 0.5rem 0 0;
}
.expl-steps li {
    padding: 0.35rem 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}
.expl-steps li strong { color: var(--text-primary); }

/* Code blocks */
.expl-code-block {
    background: #0b0f19;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.85rem;
    line-height: 1.8;
    overflow-x: auto;
}
.expl-code-block code { color: var(--accent); }

/* Table */
.expl-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    font-size: 0.9rem;
}
.expl-table th {
    text-align: left;
    padding: 0.6rem 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-subtle);
}
.expl-table td {
    padding: 0.6rem 0.75rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.expl-table td strong { color: var(--text-primary); }
.expl-table td code {
    background: var(--bg);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--accent);
}

/* Note */
.expl-note {
    background: rgba(18,183,106,0.08);
    border: 1px solid rgba(18,183,106,0.2);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin: 1rem 0 0;
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.6;
}

/* Menu grid */
.expl-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--gap-md);
}
.expl-menu-item {
    background: var(--bg);
    border-radius: 8px;
    padding: 1rem;
}
.expl-menu-item strong {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--text-primary);
    font-size: 0.95rem;
}
.expl-menu-item p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Two column */
.expl-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap-md);
    margin-bottom: 0.5rem;
}
@media (max-width: 600px) {
    .expl-two-col { grid-template-columns: 1fr; }
}
.expl-col {
    background: var(--bg);
    border-radius: 8px;
    padding: 1rem;
}
.expl-col h4 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
}
.expl-col p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* List */
.expl-list {
    padding-left: 1.25rem;
    margin: 0.5rem 0 0;
}
.expl-list li {
    padding: 0.3rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}
.expl-list li strong { color: var(--text-primary); }

/* Security grid */
.expl-security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--gap-md);
    margin-top: 0.75rem;
}
.expl-security-item {
    background: var(--bg);
    border-radius: 8px;
    padding: 1rem;
}
.expl-security-item strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
}
.expl-security-item p {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.expl-security-item ul {
    padding-left: 1.1rem;
    margin: 0;
}
.expl-security-item ul li {
    font-size: 0.82rem;
    color: var(--text-muted);
    padding: 0.15rem 0;
    line-height: 1.4;
}

/* Links */
.explicaciones-page a {
    color: var(--accent);
    text-decoration: none;
}
.explicaciones-page a:hover { text-decoration: underline; }

/* ===== FAB — FLOATING ACTION BUTTON ===== */
.fab-container {
    position: fixed;
    top: 55%;
    left: 0.75rem;
    z-index: 600;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 0.75rem;
    transform: translateY(-50%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Backdrop — closes fab on click */
.fab-backdrop {
    display: none;
}

/* Main trigger button */
.fab-main {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(26, 34, 51, 0.75), rgba(17, 24, 39, 0.85));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(56, 189, 248, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 1px 0 rgba(255, 255, 255, 0.04) inset,
        0 0 0 1px rgba(56, 189, 248, 0.06);
    z-index: 601;
    flex-shrink: 0;
    order: 0;
}
.fab-main:hover {
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.5),
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 0 24px rgba(56, 189, 248, 0.2);
    transform: translateY(-2px);
}
.fab-main:active {
    transform: scale(0.95);
}

/* 3 dots — diagonal dice arrangement */
.fab-dots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 5px;
    width: 24px;
    height: 24px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.fab-container.open .fab-dots {
    transform: rotate(45deg);
}
.fab-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 4px rgba(56, 189, 248, 0.4);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Dice 3 pattern: top-left → center → bottom-right */
.fab-dot:nth-child(1) { grid-column: 1; grid-row: 1; }
.fab-dot:nth-child(2) { grid-column: 2; grid-row: 2; }
.fab-dot:nth-child(3) { grid-column: 3; grid-row: 3; }

.fab-container.open .fab-dot {
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.6);
}

/* Expanded menu — squares stack upward */
.fab-menu {
    display: flex;
    flex-direction: column-reverse;
    gap: 0.75rem;
    align-items: center;
}

.fab-item {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(26, 34, 51, 0.7), rgba(17, 24, 39, 0.8));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(56, 189, 248, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.3),
        0 1px 0 rgba(255, 255, 255, 0.03) inset;
    position: relative;
    opacity: 0;
    transform: translateY(16px) scale(0.85);
    pointer-events: none;
}
.fab-item:nth-child(1) { transition-delay: 0.15s; }
.fab-item:nth-child(2) { transition-delay: 0.10s; }
.fab-item:nth-child(3) { transition-delay: 0.05s; }
.fab-item:nth-child(4) { transition-delay: 0s; }

.fab-container.open .fab-item {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.fab-item:hover {
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.45),
        0 1px 0 rgba(255, 255, 255, 0.05) inset,
        0 0 20px rgba(56, 189, 248, 0.18);
    transform: translateY(-3px) scale(1.05);
}
.fab-item:active {
    transform: scale(0.9);
}

.fab-item-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}
.fab-item:hover .fab-item-icon {
    transform: scale(1.15);
}

.fab-item-label {
    position: absolute;
    left: -5.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.6rem;
    color: var(--text-secondary);
    white-space: nowrap;
    font-weight: 500;
    letter-spacing: 0.3px;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.fab-item:hover .fab-item-label {
    opacity: 1;
}
.fab-container.open .fab-item-label {
    opacity: 0.7;
}

/* Mobile — smaller, same position */
@media (max-width: 768px) {
    .fab-container {
        top: 55%;
        bottom: auto;
        left: 0.5rem;
        transform: translateY(-50%);
        gap: var(--gap-sm);
    }
    .fab-main {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }
    .fab-dots {
        width: 20px;
        height: 20px;
        gap: 4px;
    }
    .fab-dot {
        width: 4px;
        height: 4px;
    }
    .fab-item {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }
    .fab-item-icon {
        font-size: 1rem;
    }
    .fab-menu {
        gap: var(--gap-sm);
    }
    .fab-item-label {
        left: -4.5rem;
        font-size: 0.55rem;
    }
}

/* ===== CUENTAS MODAL — VAULT ===== */
.fab-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 4, 10, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: cm-fade 0.25s ease;
}
@keyframes cm-fade { from { opacity: 0; } to { opacity: 1; } }

.cm-shell {
    background: linear-gradient(175deg, #0c1220 0%, #060913 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    width: 420px;
    max-width: calc(100vw - 2rem);
    max-height: 92vh;
    overflow-y: auto;
    box-shadow:
        0 40px 100px rgba(0, 0, 0, 0.9),
        0 0 0 1px rgba(255, 255, 255, 0.015) inset,
        0 0 120px rgba(56, 189, 248, 0.03);
    animation: cm-pop 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    padding: 1.75rem 1.5rem 1.5rem;
}
@keyframes cm-pop {
    from { transform: scale(0.82) translateY(48px); opacity: 0; }
    to   { transform: scale(1) translateY(0); opacity: 1; }
}

.cm-close {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #334155;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 2;
}
.cm-close:hover { color: #f87171; }

/* ── Header ── */
.cm-header {
    text-align: center;
    margin-bottom: 1.35rem;
}
.cm-header h3 {
    font-size: 0.7rem;
    font-weight: 500;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 0.25rem;
}
.cm-header-total {
    font-size: 2.4rem;
    font-weight: 700;
    font-family: 'Space Grotesk', monospace;
    color: #fff;
    letter-spacing: -0.8px;
    transition: all 0.3s ease;
}

/* ── Vault ── */
.cm-vault {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    margin-bottom: 1.35rem;
    background: rgba(255, 255, 255, 0.012);
    border: 1px solid rgba(255, 255, 255, 0.035);
    border-radius: 18px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}
.cm-vault:has(.cm-vault-side:hover) {
    border-color: rgba(255, 255, 255, 0.06);
}

.cm-vault-side {
    padding: 1.35rem 0.9rem 1.1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    position: relative;
    overflow: hidden;
    transition: background 0.3s ease;
}
.cm-vault-side.left  { background: rgba(56, 189, 248, 0.025); }
.cm-vault-side.right { background: rgba(167, 139, 250, 0.025); }
.cm-vault-side:hover { background: rgba(255, 255, 255, 0.02); }

.cm-vault-glow {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.25;
    top: -20px;
    transition: opacity 0.4s ease;
}
.cm-vault-side:hover .cm-vault-glow { opacity: 0.4; }
.cm-vault-side.left  .cm-vault-glow { background: #38bdf8; left: -20px; }
.cm-vault-side.right .cm-vault-glow { background: #a78bfa; right: -20px; }

.cm-vault-icon {
    font-size: 1.5rem;
    position: relative;
    z-index: 1;
    margin-bottom: 0.15rem;
}

.cm-vault-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.3px;
    position: relative;
    z-index: 1;
}
.cm-vault-amount {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Space Grotesk', monospace;
    position: relative;
    z-index: 1;
    letter-spacing: -0.3px;
    transition: all 0.3s ease;
}
.cm-vault-side.left  .cm-vault-amount { color: #7dd3fc; }
.cm-vault-side.right .cm-vault-amount { color: #c4b5fd; }

.cm-vault-desc {
    font-size: 0.6rem;
    color: #3b4558;
    position: relative;
    z-index: 1;
    margin-top: 0.15rem;
}

/* ── Divider ── */
.cm-vault-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 36px;
    background: rgba(0, 0, 0, 0.2);
    position: relative;
}

.cm-divider-line {
    flex: 1;
    width: 1px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(255, 255, 255, 0.06) 30%,
        rgba(255, 255, 255, 0.06) 70%,
        transparent 100%
    );
}

.cm-divider-pill {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.cm-divider-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.cm-divider-arrow {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

/* ── Transfer ── */
.cm-transfer {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 1rem;
}
.cmt-tabs {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 0.7rem;
    background: rgba(255, 255, 255, 0.012);
    border-radius: 10px;
    padding: 3px;
}
.cmt-tab {
    flex: 1;
    padding: 0.4rem 0.35rem;
    border: none;
    background: transparent;
    color: #3b4558;
    font-size: 0.67rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    letter-spacing: 0.15px;
    white-space: nowrap;
}
.cmt-tab:hover { color: #94a3b8; }
.cmt-tab.active {
    background: rgba(255, 255, 255, 0.035);
    color: #e2e8f0;
    font-weight: 600;
}

.cmt-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.cmt-input-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}
.cmt-currency {
    position: absolute;
    left: 0.75rem;
    color: #3b4558;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Space Grotesk', monospace;
    pointer-events: none;
    transition: color 0.2s;
}
.cmt-input-wrap:focus-within .cmt-currency { color: #94a3b8; }

.cmt-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.018);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    color: #fff;
    padding: 0.6rem 0.75rem 0.6rem 1.55rem;
    font-size: 0.9rem;
    font-family: 'Space Grotesk', monospace;
    font-weight: 500;
    outline: none;
    transition: all 0.2s;
}
.cmt-input:focus {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.025);
}
.cmt-input::placeholder { color: #1a2233; }

.cmt-btn {
    padding: 0.6rem 1rem;
    background: #fff;
    color: #060913;
    border: none;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.2px;
    white-space: nowrap;
    flex-shrink: 0;
}
.cmt-btn:hover {
    background: #e2e8f0;
    box-shadow: 0 6px 24px rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}
.cmt-btn:active { transform: scale(0.97) translateY(0); }

.cuentas-modal-msg {
    margin-top: 0.55rem;
    padding: 0.4rem 0.7rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 500;
    text-align: center;
    animation: cm-msg-in 0.2s ease;
}
@keyframes cm-msg-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.cuentas-modal-msg.success {
    background: rgba(34, 197, 94, 0.07);
    color: #4ade80;
}
.cuentas-modal-msg.error {
    background: rgba(239, 68, 68, 0.07);
    color: #f87171;
}

@media (max-width: 768px) {
    .cm-shell {
        width: calc(100vw - 1.25rem);
        border-radius: 20px;
        padding: 1.4rem 0.9rem 1.1rem;
    }
    .cm-header-total { font-size: 2rem; }
    .cm-vault-side { padding: 1.1rem 0.4rem 0.85rem; }
    .cm-vault-amount { font-size: 1.25rem; }
    .cm-vault-icon { font-size: 1.2rem; }
    .cm-vault-label { font-size: 0.6rem; }
    .cm-vault-divider { width: 28px; }
    .cm-divider-pill { width: 24px; height: 24px; border-radius: 7px; }
    .cm-divider-arrow { font-size: 0.7rem; }
}
/* ===== Nave Trading OS — App layout, topbar navigation, main content, inicio page ===== */
/* Extracted from style.css — 2026-06-19 */
/* v2: Bloomberg-style topbar, solid matte, underline nav, canonical layouts */

/* ===== LAYOUT ===== */
.app-layout { display: flex; flex-direction: column; min-height: 100vh; }

/* ── Canonical Layout Patterns ── */
.layout-full {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: var(--space-4);
}
.layout-2col {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-4);
    align-items: start;
}
.layout-2col-even {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    align-items: start;
}
.layout-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
    align-items: start;
}

/* ===== TOPBAR v2 — Bloomberg-style ===== */
.topbar {
    display: flex;
    align-items: center;
    height: 64px;
    padding: 0 var(--space-4);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-300);
    gap: var(--space-4);
    flex-shrink: 0;
    z-index: 500;
    position: sticky;
    top: 0;
}

/* ── Logo ── */
.topbar-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.topbar-logo-icon {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--brand-400), #6366f1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 12px rgba(37,99,235,0.3);
}
/* Glow sweep across the icon */
.topbar-logo-icon::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 60%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transform: rotate(25deg);
    animation: logo-sweep 3s ease-in-out infinite;
}
@keyframes logo-sweep {
    0%, 100% { left: -60%; }
    50%      { left: 120%; }
}
.topbar-logo-icon svg {
    position: relative;
    z-index: 1;
    animation: logo-pulse 4s ease-in-out infinite;
}
@keyframes logo-pulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50%      { transform: scale(1.08); opacity: 1; }
}
/* Rotate compass on hover */
.topbar-logo:hover .topbar-logo-icon svg {
    animation: logo-spin 0.8s ease-out;
}
@keyframes logo-spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(180deg); }
}
.topbar-logo-text {
    font-family: var(--font-sans);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    white-space: nowrap;
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--brand-400) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Market Session Indicator ── */
.topbar-market {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.35rem 0.75rem;
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    flex-shrink: 0;
    transition: border-color var(--duration-200), background var(--duration-200);
}
.topbar-market.open   { border-color: rgba(37,99,235,0.3); background: rgba(37,99,235,0.04); }
.topbar-market.closed { border-color: rgba(226,232,239,0.15); background: rgba(226,232,239,0.02); }
.market-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background var(--duration-200), box-shadow var(--duration-200);
}
.market-dot.open {
    background: var(--brand-400);
    box-shadow: 0 0 8px rgba(37,99,235,0.6);
    animation: market-pulse 2s ease-in-out infinite;
}
.market-dot.closed { background: var(--gray-400); }
@keyframes market-pulse {
    0%, 100% { box-shadow: 0 0 6px rgba(37,99,235,0.5); }
    50%      { box-shadow: 0 0 14px rgba(37,99,235,0.8); }
}
.market-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.market-label {
    font-family: var(--font-sans);
    font-size: 0.58rem;
    font-weight: var(--font-semibold);
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    line-height: 1;
}
.market-session {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: var(--font-semibold);
    color: var(--gray-800);
    line-height: 1;
}
/* Session progress bar */
.market-bar-wrap {
    width: 40px;
    height: 3px;
    background: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
    flex-shrink: 0;
}
.market-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 60s linear;
}
.market-bar-fill.asia   { background: var(--brand-400); }
.market-bar-fill.london { background: var(--amber-500); }
.market-bar-fill.ny     { background: var(--chart-purple); }
.market-bar-fill.overlap { background: var(--brand-400); }
.market-bar-fill.closed { background: var(--gray-400); width: 100%; }

/* ── Navigation ── */
.topbar-nav {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
}
.nav-pill {
    display: flex;
    align-items: center;
    gap: 2px;
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 3px;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-md);
    color: var(--gray-600);
    text-decoration: none;
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    transition: all var(--duration-fast) var(--ease-standard);
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    background: transparent;
    border: none;
}
.nav-item:hover {
    background: var(--gray-150);
    color: var(--gray-800);
}
.nav-item.active {
    background: var(--gray-50);
    color: var(--brand-400);
    font-weight: var(--font-semibold);
    box-shadow: var(--shadow-xs);
}
.nav-indicator { display: none; }
.nav-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.55;
    transition: opacity var(--duration-fast);
}
.nav-item.active .nav-icon,
.nav-item:hover .nav-icon {
    opacity: 1;
}
.nav-label { flex: none; }

/* ── User ── */
.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}
.topbar-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    text-align: right;
}
.topbar-user-info .user-name {
    color: var(--gray-800);
    font-family: var(--font-sans);
    font-weight: var(--font-semibold);
    font-size: var(--text-sm);
    line-height: 1.2;
}
.topbar-user-info .user-role {
    font-size: 0.62rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: var(--font-sans);
}
.user-avatar {
    width: 32px; height: 32px;
    border-radius: var(--radius-xs);
    background: var(--brand-400);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-sans);
    font-weight: var(--font-semibold);
    color: #fff;
    font-size: 0.8rem;
    flex-shrink: 0;
    box-shadow: none;
}
.topbar-logout {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.85);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: all var(--duration-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.35rem;
}
.topbar-logout:hover {
    color: #fff;
    background: var(--brand-400);
    border-color: var(--brand-400);
}

/* ── Hamburger (mobile) ── */
.topbar-hamburger {
    display: none;
    background: transparent;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    color: var(--gray-800);
    font-size: 1rem;
    cursor: pointer;
    padding: 4px 8px;
    flex-shrink: 0;
}
.topbar-hamburger:hover {
    border-color: var(--brand-400);
    color: var(--brand-400);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    padding: var(--space-4);
    overflow-y: auto;
    height: calc(100vh - 64px);
}
.main-content.chart-active {
    padding: 0;
    overflow: hidden;
    height: calc(100vh - 64px);
}
.page-header { margin-bottom: var(--space-6); }
.page-header h2 {
    font-family: var(--font-sans);
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    margin-bottom: 0.3rem;
    color: var(--gray-900);
}
.page-header p {
    color: var(--gray-600);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
}

/* ===== HIDDEN PAGES ===== */
.page { display: none; }
.page.active { display: block; }

/* ══════════════════════════════════════════════
   INICIO PAGE v2 — Elegant Bloomberg-style
   ══════════════════════════════════════════════ */

/* Hero */
.inicio-hero {
    text-align: left;
    padding: var(--space-8) var(--space-6) var(--space-6);
}
.inicio-hero-badge {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-xs);
    font-family: var(--font-sans);
    font-size: 0.6rem;
    font-weight: var(--font-semibold);
    color: var(--gray-600);
    letter-spacing: var(--tracking-wider);
    margin-bottom: var(--space-4);
    background: transparent;
}
.inicio-hero h1 {
    font-family: var(--font-sans);
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    color: var(--gray-950);
    margin: 0 0 var(--space-2);
    letter-spacing: var(--tracking-tight);
}
.inicio-subtitle {
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    color: var(--gray-600);
    margin: 0;
    font-weight: var(--font-normal);
}

/* KPI Ribbon — full width */
.inicio-kpi-ribbon {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
    padding: 0 var(--space-6);
}
.inicio-kpi-card {
    flex: 1;
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    text-align: center;
    min-width: 0;
}
.inicio-kpi-card.positive { border-top: 2px solid var(--brand-400); }
.inicio-kpi-card.negative { border-top: 2px solid var(--gray-950); }
.inicio-kpi-label {
    display: block;
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    margin-bottom: 0.3rem;
    font-weight: var(--font-medium);
}
.inicio-kpi-value {
    display: block;
    font-family: var(--font-mono);
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    font-variant-numeric: tabular-nums;
    color: var(--gray-900);
}
.inicio-kpi-bar {
    margin-top: 0.4rem;
    height: 3px;
    background: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
}
.inicio-kpi-bar-fill {
    height: 100%;
    background: var(--brand-400);
    border-radius: 2px;
    transition: width 0.8s ease-out;
}

/* Equity — full width */
.inicio-equity {
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-6);
    margin: 0 0 var(--space-3);
}
.inicio-equity-chart {
    height: 200px;
}
.equity-chart-wrap {
    position: relative;
    height: 200px;
    margin-top: 0;
}
.equity-svg {
    width: 100%;
    height: 100%;
    display: block;
}
.equity-dot {
    transition: opacity 0.15s ease;
    pointer-events: none;
}
.equity-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    color: var(--gray-600);
    font-style: italic;
}
.equity-period {
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    color: var(--gray-500);
    font-weight: var(--font-medium);
}

/* Bottom Row — 2 columns */
.inicio-bottom-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
    padding: 0 var(--space-6);
    margin-bottom: var(--space-3);
}

/* Panel */
.inicio-panel {
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
}
.inicio-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-3);
}
.inicio-panel-header h3 {
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--gray-600);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
}

/* Stats List */
.inicio-stats-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.inicio-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--gray-200);
    font-size: var(--text-sm);
}
.inicio-stat-row:last-child {
    border-bottom: none;
}
.inicio-stat-row span {
    color: var(--gray-600);
    font-family: var(--font-sans);
}
.inicio-stat-row strong {
    font-family: var(--font-mono);
    font-weight: var(--font-semibold);
    font-variant-numeric: tabular-nums;
    color: var(--gray-800);
}

/* Market Panel */
.inicio-market-status {
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    color: var(--brand-400);
    font-weight: var(--font-medium);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand-400);
    display: inline-block;
    animation: live-pulse 2s ease-in-out infinite;
}
@keyframes live-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.inicio-market-headers {
    display: flex;
    justify-content: space-between;
    font-size: 0.6rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    padding: 0.3rem 0.4rem;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 0.25rem;
    font-family: var(--font-sans);
    font-weight: var(--font-medium);
}
.inicio-market-headers span:nth-child(1) { flex: 0 0 80px; }
.inicio-market-headers span:nth-child(2) { flex: 1; text-align: right; }
.inicio-market-headers span:nth-child(3) { flex: 0 0 50px; text-align: right; }
.market-list {
    display: flex;
    flex-direction: column;
}
.market-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.42rem 0.4rem;
    border-radius: var(--radius-xs);
    font-size: 0.72rem;
    transition: background var(--duration-fast);
}
.market-row:hover {
    background: var(--gray-150);
}
.market-symbol {
    flex: 0 0 80px;
    color: var(--gray-800);
    font-weight: var(--font-semibold);
    font-family: var(--font-sans);
    font-size: 0.72rem;
}
.market-symbol span {
    color: var(--gray-500);
    font-weight: var(--font-normal);
}
.market-price {
    flex: 1;
    text-align: right;
    font-family: var(--font-mono);
    font-weight: var(--font-medium);
    font-variant-numeric: tabular-nums;
    color: var(--gray-800);
}
.market-spread {
    flex: 0 0 50px;
    text-align: right;
    font-weight: var(--font-medium);
    font-family: var(--font-mono);
    font-size: 0.65rem;
}
.market-spread.tight { color: var(--brand-400); }
.market-spread.mid { color: var(--amber-500); }
.market-spread.wide { color: var(--gray-500); }
.market-empty {
    text-align: center;
    padding: 1rem;
    color: var(--gray-600);
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-style: italic;
}

/* Quick Actions */
.inicio-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
    padding: 0 var(--space-6) var(--space-8);
}
.inicio-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-6) var(--space-4);
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    color: var(--gray-800);
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-standard);
    text-align: center;
}
.inicio-action-card:hover {
    border-color: var(--brand-400);
    background: var(--gray-150);
    color: var(--brand-400);
    transform: translateY(-1px);
}
.inicio-action-card svg {
    flex-shrink: 0;
    opacity: 0.7;
}
.inicio-action-card:hover svg {
    opacity: 1;
}
.inicio-action-label {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
}
.inicio-action-desc {
    font-size: var(--text-xs);
    color: var(--gray-600);
    font-weight: var(--font-normal);
}

/* ── Inicio responsive ── */
@media (max-width: 900px) {
    .inicio-hero { padding: var(--space-6) var(--space-4) var(--space-4); }
    .inicio-kpi-ribbon {
        flex-wrap: wrap;
        padding: 0 var(--space-4);
    }
    .inicio-kpi-card {
        flex: 0 0 calc(50% - var(--space-1));
        min-width: 140px;
    }
    .inicio-equity {
        padding: var(--space-3) var(--space-4);
    }
    .inicio-bottom-row {
        grid-template-columns: 1fr;
        padding: 0 var(--space-4);
    }
    .inicio-equity-chart,
    .equity-chart-wrap { height: 160px; }
    .inicio-actions {
        grid-template-columns: 1fr;
        padding: 0 var(--space-4) var(--space-6);
    }
    .inicio-hero h1 { font-size: var(--text-2xl); }
}
@media (max-width: 500px) {
    .inicio-kpi-card { flex: 1 1 100%; }
    .inicio-hero { padding: var(--space-6) var(--space-3) var(--space-4); }
    .inicio-hero h1 { font-size: var(--text-xl); }
    .inicio-kpi-value { font-size: var(--text-xl); }
    .inicio-kpi-ribbon { padding: 0 var(--space-3); }
    .inicio-equity { padding: var(--space-3) var(--space-3); }
    .inicio-bottom-row { padding: 0 var(--space-3); }
    .inicio-actions { padding: 0 var(--space-3) var(--space-6); }
    .inicio-equity-chart,
    .equity-chart-wrap { height: 140px; }
}
/* ===== Nave Trading OS — Shared components: buttons, forms, spinner, toast, modal, FAB, cuentas ===== */
/* Extracted from style.css — 2026-06-19 */

/* ── Buttons v2 ── */
.btn {
    padding: 0.5rem 0.9rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-standard);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    line-height: 1;
}
.btn-primary {
    background: var(--brand-400);
    color: #fff;
    border: 1px solid transparent;
}
.btn-primary:hover {
    background: var(--brand-500);
    box-shadow: none;
}
.btn-secondary {
    background: transparent;
    color: var(--gray-800);
    border: 1px solid var(--gray-300);
}
.btn-secondary:hover {
    background: var(--gray-150);
    border-color: var(--gray-400);
    box-shadow: none;
}
.btn-sm { padding: 0.25rem 0.5rem; font-size: var(--text-xs); }
.btn-danger {
    background: transparent;
    color: var(--gray-600);
    border: 1px solid var(--gray-300);
}
.btn-danger:hover {
    background: rgba(37, 99, 235, 0.10);
    border-color: var(--brand-400);
    color: var(--brand-400);
}

/* ── Data Display Utilities v2 ── */
.num {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}
.num--positive { color: var(--brand-400); }
.num--negative { color: var(--gray-950); }
.num--neutral  { color: var(--gray-800); }
.num--large    { font-size: var(--text-xl); font-weight: var(--font-bold); }
.num--medium   { font-size: var(--text-lg); font-weight: var(--font-semibold); }

/* ── Badges v2 ── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.45rem;
    border-radius: var(--radius-xs);
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
}
.badge--success  { background: rgba(37, 99, 235, 0.10); color: var(--brand-400); }
.badge--danger   { background: rgba(226, 232, 239, 0.08); color: var(--gray-950); }
.badge--warning  { background: var(--amber-400-bg); color: var(--amber-500); }
.badge--info     { background: var(--brand-400-bg); color: var(--brand-400); }
.badge--neutral  { background: rgba(107, 114, 132, 0.1); color: var(--gray-600); }


/* ===== CANDLE TIMER ===== */
.candle-timer-wrap {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(15,23,42,0.8);
    border: 1px solid rgba(100,116,139,0.2);
    transition: border-color 0.3s, box-shadow 0.3s;
    flex-shrink: 0;
}
.candle-timer-svg {
    display: block;
}
.candle-timer-svg circle {
    transition: stroke 0.5s, stroke-dashoffset 0.8s linear;
}
.ct-urgent {
    border-color: rgba(245,158,11,0.4);
    box-shadow: 0 0 8px rgba(245,158,11,0.15);
}
.ct-closing {
    border-color: rgba(37,99,235,0.5);
    box-shadow: 0 0 10px rgba(37,99,235,0.2);
    animation: ct-pulse 0.5s ease-in-out infinite;
}
@keyframes ct-pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(37,99,235,0.2); }
    50% { box-shadow: 0 0 18px rgba(37,99,235,0.45); }
}

/* ===== SPINNER ===== */
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes toast-in {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes toast-out {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}
@keyframes card-glow {
    0% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.5); }
    70% { box-shadow: 0 0 0 8px rgba(56, 189, 248, 0); }
    100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

.spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(11, 15, 25, 0.3);
    border-top-color: #0b0f19;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: var(--gap-sm);
    pointer-events: none;
}
.toast {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.9rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    font-weight: 500;
    animation: toast-in 0.3s ease-out;
    pointer-events: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.toast.removing { animation: toast-out 0.25s ease-in forwards; }
.toast.success { border-color: rgba(34, 197, 94, 0.4); }
.toast.success .toast-icon { color: var(--win); }
.toast.error { border-color: rgba(239, 68, 68, 0.4); }
.toast.error .toast-icon { color: var(--loss); }
.toast .toast-icon { font-size: 1.1rem; flex-shrink: 0; }

/* ===== TRADE CARD GLOW (new/updated) ===== */
.trade-card.just-saved {
    animation: card-glow 1s ease-out;
}

/* ===== MODAL (for image preview) ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    cursor: pointer;
}
.modal-overlay.show { display: flex; }
.modal-overlay img { max-width: 90%; max-height: 90%; border-radius: 8px; }

/* ── Cuentas Panel (Inicio) ── */
.cuentas-balance-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.6rem 0;
}
.cuentas-balance-row + .cuentas-balance-row {
    border-top: 1px solid var(--border);
}
.cuentas-balance-label {
    display: flex; align-items: center; gap: var(--gap-sm);
    font-size: 0.9rem; color: var(--text-secondary);
}
.cuentas-balance-label strong {
    color: var(--text); font-weight: 500;
}
.cuentas-balance-value {
    font-family: 'Space Grotesk', monospace;
    font-size: 1.05rem; font-weight: 700;
    color: var(--text);
}
.cuentas-divider {
    border: none; border-top: 1px solid var(--border);
    margin: 0.85rem 0;
}
.cuentas-transfer-form {
    display: flex; gap: 0.4rem; align-items: center;
}
.cuentas-transfer-input {
    flex: 1; min-width: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.45rem 0.6rem;
    color: var(--text);
    font-family: 'Space Grotesk', monospace;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s;
}
.cuentas-transfer-input:focus { border-color: var(--accent); }
.cuentas-transfer-select {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.45rem 0.5rem;
    color: var(--text);
    font-size: 0.8rem;
    outline: none;
    cursor: pointer;
}
.cuentas-transfer-select:focus { border-color: var(--accent); }
.cuentas-transfer-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
}
.cuentas-transfer-btn:hover { opacity: 0.85; }
.cuentas-transfer-btn:disabled { opacity: 0.4; cursor: not-allowed; }


/* ===== EXPLICACIONES PAGE ===== */
.explicaciones-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem 2rem;
}
.expl-card {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    margin-bottom: 1.25rem;
    overflow: hidden;
    transition: border-color 0.2s;
}
.expl-card:hover { border-color: var(--border); }
.expl-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem 0;
}
.expl-card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
}
.expl-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}
.expl-card-body {
    padding: 1rem 1.5rem 1.5rem;
}
.expl-card-body p {
    margin: 0 0 0.75rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}
.expl-card-body p:last-child { margin-bottom: 0; }
.expl-card-body h4 {
    margin: 1.25rem 0 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
}
.expl-card-body h4:first-child { margin-top: 0; }

/* Diagram */
.expl-diagram {
    background: var(--bg);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    overflow-x: auto;
}
.expl-flow {
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
    justify-content: center;
    flex-wrap: wrap;
    min-width: fit-content;
}
.expl-node {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    text-align: center;
    min-width: 80px;
    transition: border-color 0.2s;
}
.expl-node:hover { border-color: var(--accent); }
.expl-node span { font-size: 1.5rem; display: block; margin-bottom: 0.25rem; }
.expl-node small { color: var(--text-secondary); font-size: 0.75rem; font-weight: 500; }
.expl-arrow {
    font-size: 1.25rem;
    color: var(--accent);
    font-weight: 700;
    flex-shrink: 0;
}

/* Steps */
.expl-steps {
    padding-left: 1.25rem;
    margin: 0.5rem 0 0;
}
.expl-steps li {
    padding: 0.35rem 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}
.expl-steps li strong { color: var(--text-primary); }

/* Code blocks */
.expl-code-block {
    background: #0b0f19;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.85rem;
    line-height: 1.8;
    overflow-x: auto;
}
.expl-code-block code { color: var(--accent); }

/* Table */
.expl-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    font-size: 0.9rem;
}
.expl-table th {
    text-align: left;
    padding: 0.6rem 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-subtle);
}
.expl-table td {
    padding: 0.6rem 0.75rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.expl-table td strong { color: var(--text-primary); }
.expl-table td code {
    background: var(--bg);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--accent);
}

/* Note */
.expl-note {
    background: rgba(18,183,106,0.08);
    border: 1px solid rgba(18,183,106,0.2);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin: 1rem 0 0;
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.6;
}

/* Menu grid */
.expl-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--gap-md);
}
.expl-menu-item {
    background: var(--bg);
    border-radius: 8px;
    padding: 1rem;
}
.expl-menu-item strong {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--text-primary);
    font-size: 0.95rem;
}
.expl-menu-item p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Two column */
.expl-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap-md);
    margin-bottom: 0.5rem;
}
@media (max-width: 600px) {
    .expl-two-col { grid-template-columns: 1fr; }
}
.expl-col {
    background: var(--bg);
    border-radius: 8px;
    padding: 1rem;
}
.expl-col h4 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
}
.expl-col p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* List */
.expl-list {
    padding-left: 1.25rem;
    margin: 0.5rem 0 0;
}
.expl-list li {
    padding: 0.3rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}
.expl-list li strong { color: var(--text-primary); }

/* Security grid */
.expl-security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--gap-md);
    margin-top: 0.75rem;
}
.expl-security-item {
    background: var(--bg);
    border-radius: 8px;
    padding: 1rem;
}
.expl-security-item strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
}
.expl-security-item p {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.expl-security-item ul {
    padding-left: 1.1rem;
    margin: 0;
}
.expl-security-item ul li {
    font-size: 0.82rem;
    color: var(--text-muted);
    padding: 0.15rem 0;
    line-height: 1.4;
}

/* Links */
.explicaciones-page a {
    color: var(--accent);
    text-decoration: none;
}
.explicaciones-page a:hover { text-decoration: underline; }


/* ===== FAB — FLOATING ACTION BUTTON ===== */
.fab-container {
    position: fixed;
    top: 55%;
    left: 0.75rem;
    z-index: 600;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 0.75rem;
    transform: translateY(-50%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Backdrop — closes fab on click */
.fab-backdrop {
    display: none;
}

/* Main trigger button */
.fab-main {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(26, 34, 51, 0.75), rgba(17, 24, 39, 0.85));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(56, 189, 248, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 1px 0 rgba(255, 255, 255, 0.04) inset,
        0 0 0 1px rgba(56, 189, 248, 0.06);
    z-index: 601;
    flex-shrink: 0;
    order: 0;
}
.fab-main:hover {
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.5),
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 0 24px rgba(56, 189, 248, 0.2);
    transform: translateY(-2px);
}
.fab-main:active {
    transform: scale(0.95);
}

/* 3 dots — diagonal dice arrangement */
.fab-dots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 5px;
    width: 24px;
    height: 24px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.fab-container.open .fab-dots {
    transform: rotate(45deg);
}
.fab-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 4px rgba(56, 189, 248, 0.4);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Dice 3 pattern: top-left → center → bottom-right */
.fab-dot:nth-child(1) { grid-column: 1; grid-row: 1; }
.fab-dot:nth-child(2) { grid-column: 2; grid-row: 2; }
.fab-dot:nth-child(3) { grid-column: 3; grid-row: 3; }

.fab-container.open .fab-dot {
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.6);
}

/* Expanded menu — squares stack upward */
.fab-menu {
    display: flex;
    flex-direction: column-reverse;
    gap: 0.75rem;
    align-items: center;
}

.fab-item {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(26, 34, 51, 0.7), rgba(17, 24, 39, 0.8));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(56, 189, 248, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.3),
        0 1px 0 rgba(255, 255, 255, 0.03) inset;
    position: relative;
    opacity: 0;
    transform: translateY(16px) scale(0.85);
    pointer-events: none;
}
.fab-item:nth-child(1) { transition-delay: 0.15s; }
.fab-item:nth-child(2) { transition-delay: 0.10s; }
.fab-item:nth-child(3) { transition-delay: 0.05s; }
.fab-item:nth-child(4) { transition-delay: 0s; }

.fab-container.open .fab-item {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.fab-item:hover {
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.45),
        0 1px 0 rgba(255, 255, 255, 0.05) inset,
        0 0 20px rgba(56, 189, 248, 0.18);
    transform: translateY(-3px) scale(1.05);
}
.fab-item:active {
    transform: scale(0.9);
}

.fab-item-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}
.fab-item:hover .fab-item-icon {
    transform: scale(1.15);
}

.fab-item-label {
    position: absolute;
    left: -5.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.6rem;
    color: var(--text-secondary);
    white-space: nowrap;
    font-weight: 500;
    letter-spacing: 0.3px;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.fab-item:hover .fab-item-label {
    opacity: 1;
}
.fab-container.open .fab-item-label {
    opacity: 0.7;
}

/* Mobile — smaller, same position */
@media (max-width: 768px) {
    .fab-container {
        top: 55%;
        bottom: auto;
        left: 0.5rem;
        transform: translateY(-50%);
        gap: var(--gap-sm);
    }
    .fab-main {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }
    .fab-dots {
        width: 20px;
        height: 20px;
        gap: 4px;
    }
    .fab-dot {
        width: 4px;
        height: 4px;
    }
    .fab-item {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }
    .fab-item-icon {
        font-size: 1rem;
    }
    .fab-menu {
        gap: var(--gap-sm);
    }
    .fab-item-label {
        left: -4.5rem;
        font-size: 0.55rem;
    }
}

/* ===== CUENTAS MODAL — VAULT ===== */
.fab-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 4, 10, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: cm-fade 0.25s ease;
}
@keyframes cm-fade { from { opacity: 0; } to { opacity: 1; } }

.cm-shell {
    background: linear-gradient(175deg, #0c1220 0%, #060913 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    width: 420px;
    max-width: calc(100vw - 2rem);
    max-height: 92vh;
    overflow-y: auto;
    box-shadow:
        0 40px 100px rgba(0, 0, 0, 0.9),
        0 0 0 1px rgba(255, 255, 255, 0.015) inset,
        0 0 120px rgba(56, 189, 248, 0.03);
    animation: cm-pop 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    padding: 1.75rem 1.5rem 1.5rem;
}
@keyframes cm-pop {
    from { transform: scale(0.82) translateY(48px); opacity: 0; }
    to   { transform: scale(1) translateY(0); opacity: 1; }
}

.cm-close {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #334155;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 2;
}
.cm-close:hover { color: #f87171; }

/* ── Header ── */
.cm-header {
    text-align: center;
    margin-bottom: 1.35rem;
}
.cm-header h3 {
    font-size: 0.7rem;
    font-weight: 500;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 0.25rem;
}
.cm-header-total {
    font-size: 2.4rem;
    font-weight: 700;
    font-family: 'Space Grotesk', monospace;
    color: #fff;
    letter-spacing: -0.8px;
    transition: all 0.3s ease;
}

/* ── Vault ── */
.cm-vault {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    margin-bottom: 1.35rem;
    background: rgba(255, 255, 255, 0.012);
    border: 1px solid rgba(255, 255, 255, 0.035);
    border-radius: 18px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}
.cm-vault:has(.cm-vault-side:hover) {
    border-color: rgba(255, 255, 255, 0.06);
}

.cm-vault-side {
    padding: 1.35rem 0.9rem 1.1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    position: relative;
    overflow: hidden;
    transition: background 0.3s ease;
}
.cm-vault-side.left  { background: rgba(56, 189, 248, 0.025); }
.cm-vault-side.right { background: rgba(167, 139, 250, 0.025); }
.cm-vault-side:hover { background: rgba(255, 255, 255, 0.02); }

.cm-vault-glow {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.25;
    top: -20px;
    transition: opacity 0.4s ease;
}
.cm-vault-side:hover .cm-vault-glow { opacity: 0.4; }
.cm-vault-side.left  .cm-vault-glow { background: #38bdf8; left: -20px; }
.cm-vault-side.right .cm-vault-glow { background: #a78bfa; right: -20px; }

.cm-vault-icon {
    font-size: 1.5rem;
    position: relative;
    z-index: 1;
    margin-bottom: 0.15rem;
}

.cm-vault-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.3px;
    position: relative;
    z-index: 1;
}
.cm-vault-amount {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Space Grotesk', monospace;
    position: relative;
    z-index: 1;
    letter-spacing: -0.3px;
    transition: all 0.3s ease;
}
.cm-vault-side.left  .cm-vault-amount { color: #7dd3fc; }
.cm-vault-side.right .cm-vault-amount { color: #c4b5fd; }

.cm-vault-desc {
    font-size: 0.6rem;
    color: #3b4558;
    position: relative;
    z-index: 1;
    margin-top: 0.15rem;
}

/* ── Divider ── */
.cm-vault-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 36px;
    background: rgba(0, 0, 0, 0.2);
    position: relative;
}

.cm-divider-line {
    flex: 1;
    width: 1px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(255, 255, 255, 0.06) 30%,
        rgba(255, 255, 255, 0.06) 70%,
        transparent 100%
    );
}

.cm-divider-pill {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.cm-divider-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.cm-divider-arrow {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

/* ── Transfer ── */
.cm-transfer {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 1rem;
}
.cmt-tabs {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 0.7rem;
    background: rgba(255, 255, 255, 0.012);
    border-radius: 10px;
    padding: 3px;
}
.cmt-tab {
    flex: 1;
    padding: 0.4rem 0.35rem;
    border: none;
    background: transparent;
    color: #3b4558;
    font-size: 0.67rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    letter-spacing: 0.15px;
    white-space: nowrap;
}
.cmt-tab:hover { color: #94a3b8; }
.cmt-tab.active {
    background: rgba(255, 255, 255, 0.035);
    color: #e2e8f0;
    font-weight: 600;
}

.cmt-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.cmt-input-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}
.cmt-currency {
    position: absolute;
    left: 0.75rem;
    color: #3b4558;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Space Grotesk', monospace;
    pointer-events: none;
    transition: color 0.2s;
}
.cmt-input-wrap:focus-within .cmt-currency { color: #94a3b8; }

.cmt-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.018);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    color: #fff;
    padding: 0.6rem 0.75rem 0.6rem 1.55rem;
    font-size: 0.9rem;
    font-family: 'Space Grotesk', monospace;
    font-weight: 500;
    outline: none;
    transition: all 0.2s;
}
.cmt-input:focus {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.025);
}
.cmt-input::placeholder { color: #1a2233; }

.cmt-btn {
    padding: 0.6rem 1rem;
    background: #fff;
    color: #060913;
    border: none;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.2px;
    white-space: nowrap;
    flex-shrink: 0;
}
.cmt-btn:hover {
    background: #e2e8f0;
    box-shadow: 0 6px 24px rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}
.cmt-btn:active { transform: scale(0.97) translateY(0); }

.cuentas-modal-msg {
    margin-top: 0.55rem;
    padding: 0.4rem 0.7rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 500;
    text-align: center;
    animation: cm-msg-in 0.2s ease;
}
@keyframes cm-msg-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.cuentas-modal-msg.success {
    background: rgba(34, 197, 94, 0.07);
    color: #4ade80;
}
.cuentas-modal-msg.error {
    background: rgba(239, 68, 68, 0.07);
    color: #f87171;
}

/* Retiro link in cuentas modal */
.cmt-retiro-link {
    display: block;
    text-align: center;
    margin-top: 0.6rem;
    font-size: 0.7rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
    letter-spacing: 0.2px;
}
.cmt-retiro-link:hover { color: var(--brand-400); }

@media (max-width: 768px) {
    .cm-shell {
        width: calc(100vw - 1.25rem);
        border-radius: 20px;
        padding: 1.4rem 0.9rem 1.1rem;
    }
    .cm-header-total { font-size: 2rem; }
    .cm-vault-side { padding: 1.1rem 0.4rem 0.85rem; }
    .cm-vault-amount { font-size: 1.25rem; }
    .cm-vault-icon { font-size: 1.2rem; }
    .cm-vault-label { font-size: 0.6rem; }
    .cm-vault-divider { width: 28px; }
    .cm-divider-pill { width: 24px; height: 24px; border-radius: 7px; }
    .cm-divider-arrow { font-size: 0.7rem; }
}
/* ===== Nave Trading OS — Authentication screens — login & register ===== */
/* Extracted from style.css — 2026-06-19 */

/* ===== AUTH SCREENS ===== */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    padding: 0;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    position: relative;
    overflow: hidden;
    background: #000;
}
.auth-container.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ── Procedural Starry Sky ── */
.auth-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}
/* Layer 1: tiny static stars */
.auth-stars::before {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow:
        /* 200 tiny stars at random positions */
        5vw 8vh 0 0 rgba(255,255,255,0.6),
        12vw 3vh 0 0 rgba(255,255,255,0.4),
        18vw 15vh 0 0 rgba(255,255,255,0.7),
        23vw 5vh 0 0 rgba(255,255,255,0.3),
        31vw 12vh 0 0 rgba(255,255,255,0.5),
        38vw 2vh 0 0 rgba(255,255,255,0.6),
        45vw 18vh 0 0 rgba(255,255,255,0.4),
        52vw 7vh 0 0 rgba(255,255,255,0.7),
        58vw 14vh 0 0 rgba(255,255,255,0.3),
        65vw 4vh 0 0 rgba(255,255,255,0.5),
        72vw 11vh 0 0 rgba(255,255,255,0.6),
        78vw 1vh 0 0 rgba(255,255,255,0.4),
        85vw 16vh 0 0 rgba(255,255,255,0.7),
        92vw 9vh 0 0 rgba(255,255,255,0.3),
        96vw 6vh 0 0 rgba(255,255,255,0.5),
        3vw 20vh 0 0 rgba(255,255,255,0.4),
        10vw 25vh 0 0 rgba(255,255,255,0.6),
        16vw 32vh 0 0 rgba(255,255,255,0.3),
        25vw 28vh 0 0 rgba(255,255,255,0.7),
        33vw 22vh 0 0 rgba(255,255,255,0.5),
        40vw 35vh 0 0 rgba(255,255,255,0.4),
        48vw 30vh 0 0 rgba(255,255,255,0.6),
        55vw 38vh 0 0 rgba(255,255,255,0.3),
        62vw 25vh 0 0 rgba(255,255,255,0.7),
        70vw 33vh 0 0 rgba(255,255,255,0.5),
        77vw 40vh 0 0 rgba(255,255,255,0.4),
        84vw 27vh 0 0 rgba(255,255,255,0.6),
        90vw 36vh 0 0 rgba(255,255,255,0.3),
        95vw 42vh 0 0 rgba(255,255,255,0.5),
        7vw 45vh 0 0 rgba(255,255,255,0.7),
        14vw 50vh 0 0 rgba(255,255,255,0.4),
        20vw 43vh 0 0 rgba(255,255,255,0.6),
        28vw 48vh 0 0 rgba(255,255,255,0.3),
        35vw 55vh 0 0 rgba(255,255,255,0.5),
        42vw 45vh 0 0 rgba(255,255,255,0.7),
        50vw 52vh 0 0 rgba(255,255,255,0.4),
        57vw 58vh 0 0 rgba(255,255,255,0.6),
        64vw 47vh 0 0 rgba(255,255,255,0.3),
        71vw 54vh 0 0 rgba(255,255,255,0.5),
        79vw 60vh 0 0 rgba(255,255,255,0.7),
        86vw 50vh 0 0 rgba(255,255,255,0.4),
        93vw 56vh 0 0 rgba(255,255,255,0.6),
        1vw 62vh 0 0 rgba(255,255,255,0.3),
        9vw 68vh 0 0 rgba(255,255,255,0.5),
        17vw 65vh 0 0 rgba(255,255,255,0.7),
        24vw 72vh 0 0 rgba(255,255,255,0.4),
        32vw 63vh 0 0 rgba(255,255,255,0.6),
        39vw 70vh 0 0 rgba(255,255,255,0.3),
        46vw 75vh 0 0 rgba(255,255,255,0.5),
        53vw 66vh 0 0 rgba(255,255,255,0.7),
        60vw 73vh 0 0 rgba(255,255,255,0.4),
        68vw 78vh 0 0 rgba(255,255,255,0.6),
        75vw 68vh 0 0 rgba(255,255,255,0.3),
        82vw 74vh 0 0 rgba(255,255,255,0.5),
        89vw 80vh 0 0 rgba(255,255,255,0.7),
        94vw 70vh 0 0 rgba(255,255,255,0.4),
        6vw 82vh 0 0 rgba(255,255,255,0.6),
        13vw 88vh 0 0 rgba(255,255,255,0.3),
        21vw 78vh 0 0 rgba(255,255,255,0.5),
        29vw 85vh 0 0 rgba(255,255,255,0.7),
        36vw 92vh 0 0 rgba(255,255,255,0.4),
        44vw 82vh 0 0 rgba(255,255,255,0.6),
        51vw 90vh 0 0 rgba(255,255,255,0.3),
        59vw 84vh 0 0 rgba(255,255,255,0.5),
        66vw 95vh 0 0 rgba(255,255,255,0.7),
        73vw 88vh 0 0 rgba(255,255,255,0.4),
        81vw 93vh 0 0 rgba(255,255,255,0.6),
        88vw 86vh 0 0 rgba(255,255,255,0.3),
        2vw 95vh 0 0 rgba(255,255,255,0.5),
        11vw 98vh 0 0 rgba(255,255,255,0.4),
        19vw 94vh 0 0 rgba(255,255,255,0.6),
        27vw 97vh 0 0 rgba(255,255,255,0.3),
        34vw 90vh 0 0 rgba(255,255,255,0.5),
        43vw 96vh 0 0 rgba(255,255,255,0.7),
        54vw 92vh 0 0 rgba(255,255,255,0.4),
        61vw 98vh 0 0 rgba(255,255,255,0.6),
        69vw 91vh 0 0 rgba(255,255,255,0.3),
        76vw 96vh 0 0 rgba(255,255,255,0.5),
        83vw 89vh 0 0 rgba(255,255,255,0.7),
        91vw 97vh 0 0 rgba(255,255,255,0.4),
        97vw 92vh 0 0 rgba(255,255,255,0.6);
    border-radius: 50%;
    width: 1px;
    height: 1px;
    animation: star-twinkle-slow 4s ease-in-out infinite;
}
/* Layer 2: medium stars, different twinkle phase */
.auth-stars::after {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow:
        8vw 10vh 0 1px rgba(200,220,255,0.8),
        22vw 6vh 0 0 rgba(255,255,255,0.9),
        36vw 20vh 0 1px rgba(200,220,255,0.7),
        49vw 3vh 0 0 rgba(255,255,255,0.8),
        63vw 17vh 0 1px rgba(200,220,255,0.9),
        74vw 8vh 0 0 rgba(255,255,255,0.7),
        87vw 13vh 0 1px rgba(200,220,255,0.8),
        15vw 30vh 0 0 rgba(255,255,255,0.9),
        29vw 37vh 0 1px rgba(200,220,255,0.7),
        41vw 24vh 0 0 rgba(255,255,255,0.8),
        56vw 41vh 0 1px rgba(200,220,255,0.9),
        67vw 29vh 0 0 rgba(255,255,255,0.7),
        80vw 44vh 0 1px rgba(200,220,255,0.8),
        94vw 31vh 0 0 rgba(255,255,255,0.9),
        4vw 53vh 0 1px rgba(200,220,255,0.7),
        18vw 59vh 0 0 rgba(255,255,255,0.8),
        30vw 48vh 0 1px rgba(200,220,255,0.9),
        44vw 64vh 0 0 rgba(255,255,255,0.7),
        58vw 51vh 0 1px rgba(200,220,255,0.8),
        71vw 67vh 0 0 rgba(255,255,255,0.9),
        85vw 55vh 0 1px rgba(200,220,255,0.7),
        96vw 62vh 0 0 rgba(255,255,255,0.8),
        11vw 76vh 0 1px rgba(200,220,255,0.9),
        26vw 81vh 0 0 rgba(255,255,255,0.7),
        38vw 71vh 0 1px rgba(200,220,255,0.8),
        52vw 86vh 0 0 rgba(255,255,255,0.9),
        65vw 77vh 0 1px rgba(200,220,255,0.7),
        78vw 91vh 0 0 rgba(255,255,255,0.8),
        90vw 83vh 0 1px rgba(200,220,255,0.9),
        3vw 90vh 0 0 rgba(255,255,255,0.7),
        20vw 95vh 0 1px rgba(200,220,255,0.8),
        33vw 88vh 0 0 rgba(255,255,255,0.9),
        47vw 94vh 0 1px rgba(200,220,255,0.7),
        60vw 85vh 0 0 rgba(255,255,255,0.8),
        74vw 93vh 0 1px rgba(200,220,255,0.9),
        88vw 79vh 0 0 rgba(255,255,255,0.7),
        95vw 87vh 0 1px rgba(200,220,255,0.8);
    border-radius: 50%;
    width: 1px;
    height: 1px;
    animation: star-twinkle-med 6s ease-in-out infinite;
}

@keyframes star-twinkle-slow {
    0%, 100% { opacity: 0.5; }
    35% { opacity: 1; }
    65% { opacity: 1; }
    50% { opacity: 0.3; }
}
@keyframes star-twinkle-med {
    0%, 100% { opacity: 0.7; }
    25% { opacity: 1; }
    50% { opacity: 0.4; }
    75% { opacity: 1; }
}

/* ── Nebula glow ── */
.auth-nebula {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse at 25% 30%, rgba(56, 120, 248, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 60%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(56, 189, 248, 0.04) 0%, transparent 40%),
        radial-gradient(ellipse at 10% 70%, rgba(139, 92, 246, 0.04) 0%, transparent 40%);
}


/* ── Centered Glass Card ── */
.auth-card {
    position: relative;
    z-index: 1;
    width: 400px;
    max-width: 90vw;
    padding: 2.5rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: rgba(11, 15, 25, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset,
        0 0 80px rgba(56, 189, 248, 0.06);
    margin: auto;
}

/* ── Logo + title ── */
.auth-card-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 1rem;
    align-self: center;
    animation: auth-diamond-float 4s ease-in-out infinite;
}
.auth-logo-icon svg {
    width: 100%; height: 100%;
    filter: drop-shadow(0 0 12px rgba(56,189,248,0.5));
}

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

/* ── Bottom footer: tagline + status ── */
.auth-footer {
    position: fixed;
    bottom: 1.2rem;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    z-index: 1;
    pointer-events: none;
}

/* Reserve space for footer so it never overlaps card */
.auth-container { padding-bottom: 4rem; }

.auth-tagline {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    margin: 0;
}


/* ── Inputs ── */
.auth-input-wrap {
    position: relative;
    margin-bottom: 1rem;
    z-index: 1;
}

.auth-input-wrap .input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    pointer-events: none;
    transition: all 0.2s;
    opacity: 0.4;
}

.auth-input-wrap input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.75rem;
    background: rgba(11, 15, 25, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.25s;
    letter-spacing: 0.01em;
    box-sizing: border-box;
    line-height: 1.4;
}

.auth-input-wrap input::placeholder {
    color: rgba(148, 163, 184, 0.35);
}

.auth-input-wrap input:focus {
    outline: none;
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(11, 15, 25, 0.8);
    box-shadow:
        0 0 0 4px rgba(56, 189, 248, 0.06),
        0 0 20px rgba(56, 189, 248, 0.05);
}

/* Override browser autofill white background */
.auth-input-wrap input:-webkit-autofill,
.auth-input-wrap input:-webkit-autofill:hover,
.auth-input-wrap input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px rgba(11, 15, 25, 1) inset !important;
    -webkit-text-fill-color: #e2e8f0 !important;
    border-color: rgba(56, 189, 248, 0.4);
    transition: background-color 5000s ease-in-out 0s;
    caret-color: #e2e8f0;
}

.auth-input-wrap input:focus ~ .input-icon,
.auth-input-wrap:focus-within .input-icon {
    opacity: 0.9;
}

/* ── Submit button ── */
.auth-submit {
    width: 100%;
    padding: 0.85rem;
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.15) 0%, rgba(99, 102, 241, 0.1) 100%);
    color: #e2e8f0;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 0.75rem;
    letter-spacing: 0.03em;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    line-height: 1.4;
}

.auth-submit:hover {
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.25) 0%, rgba(99, 102, 241, 0.18) 100%);
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow:
        0 0 30px rgba(56, 189, 248, 0.15),
        0 0 60px rgba(56, 189, 248, 0.05);
    color: #fff;
    transform: translateY(-2px);
}

.auth-submit:active {
    transform: translateY(0);
    transition: all 0.1s;
}

.auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.4rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: border-color 0.2s;
    font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}
.form-group select { cursor: pointer; }
.form-group textarea { resize: vertical; min-height: 60px; }

.btn {
    padding: 0.8rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: var(--gap-sm);
}
.btn-primary { background: linear-gradient(135deg, var(--accent), #6366f1); color: #fff; border: none; }
.btn-primary:hover { background: linear-gradient(135deg, var(--accent-hover), #818cf8); box-shadow: 0 0 16px rgba(56,189,248,0.25); }
.btn-secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-secondary:hover { background: rgba(56, 189, 248, 0.1); box-shadow: 0 0 10px rgba(56,189,248,0.1); }
.btn-sm { padding: 0.4rem 0.7rem; font-size: 0.8rem; }
.btn-danger { background: transparent; color: var(--text-secondary); border: 1px solid rgba(226,232,240,0.3); }
.btn-danger:hover { background: rgba(226, 232, 240, 0.08); }

.error-msg {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    margin-bottom: 1rem;
    display: none;
    animation: error-in 0.25s ease;
}
.error-msg.show { display: block; }

@keyframes error-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
/* ===== Nave Trading OS — Admin panel: users, trades, system status, bot management, trading panel ===== */
/* Extracted from style.css — 2026-06-19 */

/* ===== ADMIN PANEL ===== */
.admin-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    background: var(--card-bg);
    padding: 0.25rem;
    border-radius: var(--radius-md);
}
.admin-tab {
    flex: 1;
    padding: 0.6rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: calc(var(--radius-md) - 2px);
    transition: all 0.15s;
}
.admin-tab:hover { color: var(--text-primary); }
.admin-tab.active {
    background: var(--accent);
    color: white;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.admin-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}
.admin-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}
.admin-table tr:hover td { background: rgba(255,255,255,0.03); }
.admin-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
}
.admin-badge.active { background: rgba(56,189,248,0.15); color: var(--win); }
.admin-badge.inactive { background: rgba(226,232,240,0.15); color: var(--loss); }
.admin-badge.admin { background: rgba(59,130,246,0.15); color: var(--accent); }
.admin-filter-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.admin-filter-row select {
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
}
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.admin-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
    font-size: 0.9rem;
}
.admin-actions {
    display: flex;
    gap: 0.35rem;
}

/* ===== TRADING PANEL ===== */
.trading-panel {
    position: fixed;
    top: 64px;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    max-height: calc(100vh - 60px);
    z-index: 100;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.2s;
}
.trading-panel.collapsed .trading-panel-body { display: none; }
.trading-panel.collapsed { width: auto; }
.trading-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    cursor: grab;
    font-size: 0.85rem;
    font-weight: 600;
    user-select: none;
}
.trading-panel-header:active { cursor: grabbing; }
.trading-panel-controls {
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
}
.tp-toggle-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    line-height: 1;
}
.tp-toggle-btn:hover { color: var(--text-primary); }
.trading-panel-body {
    overflow-y: auto;
    flex: 1;
}
.tp-section {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
    background: #0b0f19;
}
.tp-section:last-child { border-bottom: none; }
.tp-section-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    font-weight: 600;
}
.tp-input-row {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}
.tp-input {
    flex: 1;
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.35rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-family: inherit;
}
.tp-input:focus { outline: none; border-color: var(--accent); }
.tp-btn-row {
    display: flex;
    gap: var(--gap-sm);
}
.tp-btn {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}
.tp-btn.tp-buy {
    background: linear-gradient(135deg, rgba(56,189,248,0.2), rgba(99,102,241,0.15));
    color: #fff;
    border: 1px solid rgba(56,189,248,0.35);
    text-shadow: 0 0 10px rgba(56,189,248,0.3);
}
.tp-btn.tp-buy:hover { background: linear-gradient(135deg, rgba(56,189,248,0.35), rgba(99,102,241,0.25)); box-shadow: 0 0 16px rgba(56,189,248,0.2); }
.tp-btn.tp-sell {
    background: rgba(226,232,240,0.12);
    color: var(--text-primary);
    border: 1px solid rgba(226,232,240,0.25);
}
.tp-btn.tp-sell:hover { background: rgba(226,232,240,0.22); box-shadow: 0 0 12px rgba(226,232,240,0.1); }
.tp-positions-list {
    max-height: 200px;
    overflow-y: auto;
}
.tp-empty {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 0.5rem;
}
.tp-position-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 0.75rem;
    gap: 0.35rem;
}
.tp-position-item:last-child { border-bottom: none; }
.tp-pos-symbol { font-weight: 600; min-width: 55px; font-size: 0.72rem; }
.tp-pos-type { font-size: 0.65rem; padding: 0.1rem 0.35rem; border-radius: 4px; font-weight: 600; }
.tp-pos-type.buy { background: rgba(56,189,248,0.2); color: var(--win); }
.tp-pos-type.sell { background: rgba(226,232,240,0.12); color: var(--loss); }
.tp-pos-info { font-size: 0.7rem; color: var(--text-secondary); min-width: 40px; text-align: right; }
.tp-pos-profit { font-weight: 600; min-width: 55px; text-align: right; font-size: 0.72rem; }
.tp-pos-profit.positive { color: var(--win); }
.tp-pos-profit.negative { color: var(--loss); }
.tp-pos-sl-tp { display: flex; gap: 2px; }
.tp-pos-sl-tp input {
    width: 50px;
    font-size: 0.65rem;
    padding: 0.15rem 0.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 4px;
    font-family: inherit;
}
.tp-close-btn {
    background: none;
    border: none;
    color: var(--loss);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0 2px;
}
.tp-close-btn:hover { opacity: 0.7; }
.tp-margin-alert {
    background: rgba(226,232,240,0.1);
    border: 1px solid rgba(226,232,240,0.3);
    color: var(--loss);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.68rem;
    text-align: center;
    margin: 0.35rem 0.75rem;
    display: none;
}
.tp-margin-alert.show { display: block; }
/* Daily loss limit bar */
.tp-loss-limit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
    font-size: 0.72rem;
    color: var(--text-secondary);
}
.tp-loss-bar-wrap {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.3rem;
}
.tp-loss-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    background: var(--win);
    transition: width 0.5s ease, background 0.5s ease;
}
.tp-loss-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--text-secondary);
    opacity: 0.8;
}
/* Admin capital inputs */
.admin-capital-input {
    width: 70px;
    font-size: 0.75rem;
    padding: 0.2rem 0.35rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 4px;
    font-family: inherit;
}
.admin-capital-input:focus { outline: none; border-color: var(--accent); }



/* Status Tab */
.status-summary-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    min-width: 150px;
    flex: 1;
}
.status-summary-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}
.status-summary-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}
