/* ================================================================
   Forexit – Main Stylesheet
   Design: Dark-mode trading terminal with electric cyan accents
   Fonts: Space Mono (mono/display) + DM Sans (body)
================================================================ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
    --bg-0:         #0a0c0f;
    --bg-1:         #0f1318;
    --bg-2:         #141920;
    --bg-3:         #1a2030;
    --bg-card:      #111620;
    --bg-hover:     #1e2635;

    --border:       rgba(255,255,255,0.07);
    --border-bright:rgba(255,255,255,0.13);

    --text-0:       #f0f4ff;
    --text-1:       #c8d0e8;
    --text-2:       #8896b3;
    --text-3:       #4d5a73;

    --accent:       #00e5ff;
    --accent-dim:   rgba(0, 229, 255, 0.12);
    --accent-glow:  rgba(0, 229, 255, 0.25);
    --accent-2:     #7c3aed;

    --green:        #00e096;
    --green-dim:    rgba(0, 224, 150, 0.12);
    --red:          #ff4757;
    --red-dim:      rgba(255, 71, 87, 0.12);
    --yellow:       #ffd60a;

    --font-mono:    'Space Mono', monospace;
    --font-body:    'DM Sans', system-ui, sans-serif;

    --radius-sm:    6px;
    --radius:       10px;
    --radius-lg:    16px;
    --radius-xl:    24px;

    --shadow-sm:    0 1px 3px rgba(0,0,0,0.4);
    --shadow:       0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg:    0 8px 40px rgba(0,0,0,0.6);
    --shadow-glow:  0 0 30px var(--accent-glow);

    --transition:   0.2s ease;
    --nav-h:        64px;
}

[data-theme="light"] {
    --bg-0:         #f0f2f7;
    --bg-1:         #f8f9fc;
    --bg-2:         #ffffff;
    --bg-3:         #eef0f6;
    --bg-card:      #ffffff;
    --bg-hover:     #f0f4ff;
    --border:       rgba(0,0,0,0.07);
    --border-bright:rgba(0,0,0,0.13);
    --text-0:       #0a0c14;
    --text-1:       #1a2035;
    --text-2:       #4a5473;
    --text-3:       #8896b3;
    --accent:       #0066cc;
    --accent-dim:   rgba(0,102,204,0.08);
    --accent-glow:  rgba(0,102,204,0.15);
    --shadow:       0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg:    0 8px 40px rgba(0,0,0,0.12);
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-0);
    color: var(--text-1);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
    font-family: var(--font-mono);
    color: var(--text-0);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); }
h4 { font-size: 1.1rem; }

p { color: var(--text-2); }
a { color: var(--accent); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.8; }

code, .mono { font-family: var(--font-mono); font-size: 0.875em; }

/* ── Navigation ─────────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    background: rgba(10, 12, 15, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: background var(--transition);
}

.navbar.scrolled {
    background: rgba(10, 12, 15, 0.95);
    border-bottom-color: var(--border-bright);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-0);
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    background: var(--accent);
    color: #000;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 4px;
    flex: 1;
}

.nav-link {
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-0);
    background: var(--bg-3);
    opacity: 1;
}

.nav-link.active { color: var(--accent); }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.theme-toggle {
    width: 36px; height: 36px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-1);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}
.theme-toggle:hover { background: var(--bg-hover); border-color: var(--border-bright); }

/* User menu */
.user-menu { position: relative; }

.user-avatar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 100px;
    cursor: pointer;
    color: var(--text-1);
    font-size: 0.875rem;
    font-family: var(--font-body);
    transition: all var(--transition);
}
.user-avatar-btn:hover { background: var(--bg-hover); border-color: var(--accent); }

.user-initials {
    width: 26px; height: 26px;
    background: var(--accent);
    color: #000;
    border-radius: 50%;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--bg-2);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.18s ease;
    overflow: hidden;
}

.user-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.dropdown-header strong { color: var(--text-0); font-size: 0.875rem; }
.dropdown-header small  { color: var(--text-3); font-size: 0.75rem; }

.dropdown-item {
    display: block;
    padding: 10px 16px;
    color: var(--text-1);
    font-size: 0.875rem;
    transition: background var(--transition);
}
.dropdown-item:hover { background: var(--bg-hover); color: var(--text-0); opacity: 1; }
.dropdown-item.text-danger:hover { color: var(--red); }

.dropdown-divider { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

/* Burger */
.nav-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-burger span {
    display: block;
    width: 22px; height: 2px;
    background: var(--text-1);
    border-radius: 2px;
    transition: all var(--transition);
}

/* ── Page Main ──────────────────────────────────────────────── */
.page-main { min-height: 100vh; padding-top: var(--nav-h); }

/* ── Container ──────────────────────────────────────────────── */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-sm {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-md {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.btn-primary {
    background: var(--accent);
    color: #000;
}
.btn-primary:hover {
    background: #fff;
    color: #000;
    box-shadow: var(--shadow-glow);
    opacity: 1;
}

.btn-secondary {
    background: var(--bg-3);
    color: var(--text-0);
    border: 1px solid var(--border-bright);
}
.btn-secondary:hover { background: var(--bg-hover); border-color: var(--accent); opacity: 1; }

.btn-ghost {
    background: transparent;
    color: var(--text-1);
    border: 1px solid var(--border-bright);
}
.btn-ghost:hover { background: var(--bg-3); color: var(--text-0); opacity: 1; }

.btn-danger  { background: var(--red);   color: #fff; }
.btn-success { background: var(--green); color: #000; }

.btn-sm  { padding: 6px 14px; font-size: 0.8rem; border-radius: var(--radius-sm); }
.btn-lg  { padding: 14px 32px; font-size: 1rem; }
.btn-xl  { padding: 16px 40px; font-size: 1.05rem; border-radius: var(--radius-lg); }
.btn-block { width: 100%; }

.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-loading  { position: relative; color: transparent; }
.btn-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ── Cards ──────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: border-color var(--transition);
}

.card:hover { border-color: var(--border-bright); }

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-3);
}

/* Stat card */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
}

.stat-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

.stat-label {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 8px;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-0);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-sub {
    font-size: 0.8rem;
    color: var(--text-2);
}

/* ── Forms ──────────────────────────────────────────────────── */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-2);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-1);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius);
    color: var(--text-0);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: all var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent);
    background: var(--bg-2);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-control::placeholder { color: var(--text-3); }

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%238896b3' viewBox='0 0 16 16'%3e%3cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 36px;
}

.form-hint  { font-size: 0.75rem; color: var(--text-3); margin-top: 4px; }
.form-error { font-size: 0.75rem; color: var(--red);    margin-top: 4px; }

.input-group {
    display: flex;
    gap: 0;
}

.input-group .form-control {
    border-radius: var(--radius) 0 0 var(--radius);
}

.input-group .btn {
    border-radius: 0 var(--radius) var(--radius) 0;
    flex-shrink: 0;
}

/* ── Alerts ─────────────────────────────────────────────────── */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid transparent;
    margin-bottom: 16px;
}

.alert-success { background: var(--green-dim); border-color: var(--green);  color: var(--green); }
.alert-error   { background: var(--red-dim);   border-color: var(--red);    color: var(--red);   }
.alert-warning { background: rgba(255,214,10,0.12); border-color: var(--yellow); color: var(--yellow); }
.alert-info    { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    font-size: 1.1rem;
    line-height: 1;
    opacity: 0.7;
    flex-shrink: 0;
}
.alert-close:hover { opacity: 1; }

.flash-container {
    position: fixed;
    top: calc(var(--nav-h) + 16px);
    right: 16px;
    z-index: 2000;
    max-width: 400px;
    width: 100%;
}

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.badge-up   { background: var(--green-dim); color: var(--green); }
.badge-down { background: var(--red-dim);   color: var(--red);   }
.badge-neutral { background: var(--bg-3);   color: var(--text-3); }

/* ── Tables ─────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

thead th {
    padding: 10px 16px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-3);
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
}

tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-1);
    vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td     { background: var(--bg-hover); }

.td-mono { font-family: var(--font-mono); font-size: 0.825rem; }

/* ── Ticker bar ─────────────────────────────────────────────── */
.ticker-bar {
    background: var(--bg-1);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
    overflow: hidden;
    position: relative;
}

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

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

.ticker-item {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    font-size: 0.8rem;
}

.ticker-symbol {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--text-0);
    font-size: 0.75rem;
}

.ticker-price { font-family: var(--font-mono); color: var(--text-0); }
.ticker-change { font-family: var(--font-mono); }
.ticker-up    { color: var(--green); }
.ticker-down  { color: var(--red); }

/* ── Dashboard layout ──────────────────────────────────────── */
.dashboard-layout {
    padding: 32px 0;
}

.dashboard-header {
    margin-bottom: 32px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.main-content-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
}

@media (max-width: 1024px) {
    .main-content-grid { grid-template-columns: 1fr; }
}

/* ── Asset row ──────────────────────────────────────────────── */
.asset-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background var(--transition);
}
.asset-row:last-child { border-bottom: none; }
.asset-row:hover { background: var(--bg-hover); margin: 0 -16px; padding: 12px 16px; border-radius: var(--radius); }

.asset-icon {
    width: 40px; height: 40px;
    background: var(--bg-3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.asset-info { flex: 1; min-width: 0; }
.asset-symbol { font-family: var(--font-mono); font-weight: 700; color: var(--text-0); font-size: 0.875rem; }
.asset-name   { font-size: 0.75rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.asset-price-info { text-align: right; }
.asset-price { font-family: var(--font-mono); font-weight: 700; color: var(--text-0); font-size: 0.9rem; }

/* ── Trading panel ──────────────────────────────────────────── */
.trade-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-1);
    border-radius: var(--radius);
    padding: 4px;
    margin-bottom: 20px;
}

.trade-tab {
    flex: 1;
    padding: 8px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    background: transparent;
    color: var(--text-2);
    transition: all var(--transition);
    letter-spacing: 0.05em;
}

.trade-tab.active-buy  { background: var(--green); color: #000; }
.trade-tab.active-sell { background: var(--red);   color: #fff; }
.trade-tab:not(.active-buy):not(.active-sell):hover { background: var(--bg-3); color: var(--text-0); }

/* ── Price display ─────────────────────────────────────────── */
.price-display {
    background: var(--bg-1);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-mono);
}

.price-display .price-current {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-0);
}

/* ── Chart container ────────────────────────────────────────── */
.chart-container {
    position: relative;
    height: 280px;
}

/* ── Hero section ───────────────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 80px 24px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 30% 50%, rgba(0,229,255,0.06) 0%, transparent 70%),
        radial-gradient(ellipse 40% 60% at 70% 40%, rgba(124,58,237,0.05) 0%, transparent 70%);
}

.hero-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, black 30%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    text-align: center;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 14px;
    background: var(--accent-dim);
    border: 1px solid rgba(0,229,255,0.2);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 28px;
}

.hero-eyebrow::before {
    content: '';
    width: 6px; height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.hero-title {
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    line-height: 1.05;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}

.hero-title .accent { color: var(--accent); }
.hero-title .line2  { display: block; color: var(--text-1); font-size: 0.8em; }

.hero-desc {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-2);
    max-width: 560px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 64px;
}

.hero-stats {
    display: flex;
    gap: 48px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
}

.hero-stat-val {
    font-family: var(--font-mono);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-0);
    display: block;
}

.hero-stat-label {
    font-size: 0.75rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ── Section ────────────────────────────────────────────────── */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

.section-title { margin-bottom: 16px; }
.section-desc  { color: var(--text-2); max-width: 500px; margin: 0 auto; }

/* Features grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all 0.25s ease;
}

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

.feature-icon {
    width: 48px; height: 48px;
    background: var(--accent-dim);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 16px;
}

.feature-title {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--text-0);
}

/* ── Auth pages ─────────────────────────────────────────────── */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    background:
        radial-gradient(ellipse 50% 60% at 20% 50%, rgba(0,229,255,0.04) 0%, transparent 70%),
        var(--bg-0);
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
}

.auth-brand {
    text-align: center;
    margin-bottom: 32px;
}

.auth-title {
    font-size: 1.5rem;
    margin-bottom: 4px;
    margin-top: 12px;
}

.auth-subtitle { font-size: 0.875rem; color: var(--text-2); }

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.875rem;
    color: var(--text-2);
}

/* ── Portfolio bar ──────────────────────────────────────────── */
.portfolio-bar {
    height: 8px;
    background: var(--bg-3);
    border-radius: 100px;
    overflow: hidden;
    margin-top: 8px;
}

.portfolio-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 100px;
    transition: width 1s ease;
}

/* ── Tab system ─────────────────────────────────────────────── */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.tab-btn {
    padding: 10px 20px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-3);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    transition: all var(--transition);
}

.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-btn:hover:not(.active) { color: var(--text-1); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
    background: var(--bg-1);
    border-top: 1px solid var(--border);
    padding: 64px 0 0;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 48px;
    display: grid;
    grid-template-columns: 2fr 2fr 1fr;
    gap: 48px;
}

.footer-tagline {
    font-size: 0.875rem;
    color: var(--text-2);
    margin-top: 12px;
    max-width: 240px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.footer-col h4 {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    font-size: 0.875rem;
    color: var(--text-2);
    margin-bottom: 8px;
    transition: color var(--transition);
}

.footer-col a:hover { color: var(--text-0); opacity: 1; }

.footer-newsletter h4 {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 16px;
}

.newsletter-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.newsletter-form input {
    flex: 1;
    min-width: 160px;
    padding: 9px 12px;
    background: var(--bg-2);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius);
    color: var(--text-0);
    font-family: var(--font-body);
    font-size: 0.875rem;
    outline: none;
}

.newsletter-form input:focus { border-color: var(--accent); }
.newsletter-msg { font-size: 0.8rem; margin-top: 6px; }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 16px 24px;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-3);
}

.footer-powered { font-family: var(--font-mono); font-size: 0.72rem; }

/* ── Animations ─────────────────────────────────────────────── */
@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes pulse   { 0%,100% { opacity:1; } 50% { opacity:0.3; } }
@keyframes ticker  { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes fadeIn  { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@keyframes slideIn { from { opacity:0; transform:translateX(-16px); } to { opacity:1; transform:translateX(0); } }

.animate-in { animation: fadeIn 0.5s ease both; }
.stagger > * { animation: fadeIn 0.5s ease both; }
.stagger > *:nth-child(1) { animation-delay: 0.0s; }
.stagger > *:nth-child(2) { animation-delay: 0.08s; }
.stagger > *:nth-child(3) { animation-delay: 0.16s; }
.stagger > *:nth-child(4) { animation-delay: 0.24s; }
.stagger > *:nth-child(5) { animation-delay: 0.32s; }
.stagger > *:nth-child(6) { animation-delay: 0.40s; }

/* ── Utility ────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-accent { color: var(--accent); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-muted  { color: var(--text-2); }
.mono        { font-family: var(--font-mono); }
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap   { flex-wrap: wrap; }
.w-full      { width: 100%; }
.hidden      { display: none; }

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ── Loading skeleton ───────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, var(--bg-2) 25%, var(--bg-3) 50%, var(--bg-2) 75%);
    background-size: 200% 100%;
    animation: skeleton-wave 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-wave {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .footer-container { grid-template-columns: 1fr 1fr; }
    .footer-newsletter { grid-column: span 2; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-burger { display: flex; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: var(--nav-h);
        left: 0; right: 0;
        background: var(--bg-1);
        border-bottom: 1px solid var(--border);
        padding: 16px 24px;
        z-index: 999;
    }
    .user-name-short { display: none; }
    .hero-stats { gap: 24px; }
    .footer-container { grid-template-columns: 1fr; gap: 32px; }
    .footer-links { grid-template-columns: repeat(2, 1fr); }
    .footer-newsletter { grid-column: auto; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
    .auth-card { padding: 28px 20px; }
}

@media (max-width: 480px) {
    .dashboard-grid { grid-template-columns: 1fr 1fr; }
    .hero-title { font-size: 2rem; }
}
