/* ================================================
   AlphaTerminal Suite — Unified Design System
   Dark theme with consistent branding across all apps
   ================================================ */

/* Prevent sticky .top-nav (52px) from overlapping page content */
body {
  padding-top: 52px;
}

/* Root color tokens */
:root {
    /* Background */
    --bg-dark: #0a0a0f;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a26;
    --bg-overlay: rgba(10, 10, 15, 0.95);

    /* Primary Accent - Bright Green */
    --primary: #00ff88;
    --primary-dim: #00cc6a;
    --primary-glow: rgba(0, 255, 136, 0.15);
    --primary-glow-intense: rgba(0, 255, 136, 0.3);

    /* Secondary Accents */
    --blue: #4488ff;
    --blue-glow: rgba(68, 136, 255, 0.15);
    --purple: #9955ff;
    --purple-glow: rgba(153, 85, 255, 0.15);
    --gold: #ffaa33;
    --gold-glow: rgba(255, 170, 51, 0.15);
    --red: #ff3366;
    --red-glow: rgba(255, 51, 102, 0.15);

    /* Legacy aliases for backwards compatibility */
    --green: #00ff88;
    --green-dim: #00cc6a;
    --green-glow: rgba(0, 255, 136, 0.15);

    /* Text */
    --text: #e8e8f0;
    --text-dim: #8888aa;
    --text-muted: #555566;
    --text-light: #aaaacc;

    /* Borders & Dividers */
    --border: #222233;
    --border-hover: #333344;
    --border-focus: #444466;

    /* Transition speeds */
    --transition-fast: 0.15s;
    --transition-normal: 0.2s;
    --transition-slow: 0.3s;

    /* Typography scale */
    --font-mono: 'JetBrains Mono', monospace;
    --font-sans: 'Space Grotesk', sans-serif;
    --font-size-xs: 11px;
    --font-size-sm: 13px;
    --font-size-base: 14px;
    --font-size-lg: 16px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    --font-size-3xl: 32px;
    --font-size-4xl: 42px;
    --font-size-5xl: 56px;
    --font-size-6xl: 72px;
}

/* ================================================
   GLOBAL STYLES
   ================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-dark);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
    font-size: 14px;
}

/* Utility classes */
.mono {
    font-family: var(--font-mono);
}

/* ================================================
   BACKGROUND & VISUAL ELEMENTS
   ================================================ */

/* Animated grid background */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

.content {
    position: relative;
    z-index: 1;
}

/* ================================================
   TYPOGRAPHY
   ================================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

h1 {
    font-size: clamp(42px, 6vw, 72px);
}

h2 {
    font-size: clamp(32px, 5vw, 56px);
}

h3 {
    font-size: clamp(24px, 3vw, 32px);
}

p {
    line-height: 1.6;
    color: var(--text-dim);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-normal);
}

a:hover {
    color: var(--primary-dim);
}

/* ================================================
   NAVIGATION
   ================================================ */

/* Suite Hub Navigation Shell for unified branding */
.suite-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 110;
    font-size: 13px;
    font-family: var(--font-mono);
}

.suite-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.suite-brand {
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 12px;
}

.suite-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
}

.suite-apps {
    display: flex;
    gap: 4px;
}

.suite-app-link {
    padding: 6px 12px;
    border-radius: 4px;
    color: var(--text-dim);
    text-decoration: none;
    transition: all var(--transition-normal);
    border: 1px solid transparent;
    font-size: 12px;
}

.suite-app-link:hover,
.suite-app-link.current {
    color: var(--primary);
    background: var(--bg-card);
    border-color: var(--border-hover);
}

/* Main navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 48px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-overlay);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-decoration: none;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color var(--transition-normal);
}

.logo:hover {
    color: var(--primary);
}

.logo span {
    color: var(--primary);
}

.nav-tag {
    font-family: var(--font-mono);
    font-size: var(--font-size-xs);
    color: var(--primary);
    background: var(--primary-glow);
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid rgba(0, 255, 136, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* ================================================
   TERMINAL NAV BAR
   ================================================ */

.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0d0d14;
    border-bottom: 1px solid #1e1e2e;
    padding: 0 16px;
    height: 52px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.top-nav .logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #e8e8f0;
    text-decoration: none;
    white-space: nowrap;
    margin-right: 12px;
    flex-shrink: 0;
}

.top-nav .logo span { color: #00ff88; }

.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid #2a2a3a;
    color: #888;
    font-size: 18px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    margin-right: 8px;
    flex-shrink: 0;
}

.nav-tabs {
    display: flex;
    align-items: center;
    gap: 2px;
    overflow-x: auto;
    flex: 1;
    min-width: 0;
    scrollbar-width: none;
}

.nav-tabs::-webkit-scrollbar { display: none; }

.nav-tab {
    background: none;
    border: none;
    color: #8888aa;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.nav-tab:hover {
    background: rgba(255,255,255,0.06);
    color: #e8e8f0;
}

.nav-tab.active {
    background: rgba(0,255,136,0.1);
    color: #00ff88;
}

.pro-badge-tab {
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.3px;
    vertical-align: middle;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00ff88;
    flex-shrink: 0;
}

.status-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    color: #00ff88;
    letter-spacing: 0.5px;
}

.theme-toggle-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #8888aa;
    font-size: 14px;
    padding: 5px 8px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: background 0.15s, color 0.15s;
}

.theme-toggle-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #e8e8f0;
}

.auth-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.12);
    color: #8888aa;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    letter-spacing: 0.4px;
    transition: all 0.15s;
    white-space: nowrap;
}

.auth-btn:hover {
    border-color: rgba(255,255,255,0.25);
    color: #e8e8f0;
}

.auth-btn.primary {
    background: #00ff88;
    border-color: #00ff88;
    color: #000;
    font-weight: 700;
}

.auth-btn.primary:hover {
    background: #00cc6a;
    border-color: #00cc6a;
}

.upgrade-btn {
    background: linear-gradient(135deg, #7c3aed, #6366f1);
    border: none;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 6px;
    cursor: pointer;
    letter-spacing: 0.4px;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.upgrade-btn:hover { opacity: 0.88; }

.user-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.user-email {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #8888aa;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pro-badge {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    border: 1px solid rgba(99,102,241,0.3);
}

.manage-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.12);
    color: #8888aa;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    letter-spacing: 0.4px;
    transition: all 0.15s;
    white-space: nowrap;
}

.manage-btn:hover {
    border-color: rgba(255,255,255,0.25);
    color: #e8e8f0;
}

.suite-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(245,166,35,0.12);
    color: #f5a623;
    border: 1px solid rgba(245,166,35,0.3);
    letter-spacing: 0.3px;
}

.buy-crypto-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0,255,136,0.08);
    border: 1px solid rgba(0,255,136,0.2);
    color: #00ff88;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    letter-spacing: 0.3px;
    white-space: nowrap;
    transition: background 0.15s;
}

.buy-crypto-btn:hover { background: rgba(0,255,136,0.15); }

.buy-crypto-btn svg { width: 12px; height: 12px; }

.settings-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.08);
    color: #8888aa;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: all 0.15s;
    white-space: nowrap;
}

.settings-btn:hover {
    border-color: rgba(255,255,255,0.2);
    color: #e8e8f0;
}

.whats-new-btn {
    background: rgba(245,158,11,0.08);
    border: 1px solid rgba(245,158,11,0.2);
    color: #f59e0b;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    letter-spacing: 0.3px;
    position: relative;
    transition: background 0.15s;
}

.whats-new-btn:hover { background: rgba(245,158,11,0.15); }

.whats-new-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    background: #ef4444;
    border-radius: 50%;
    margin-left: 3px;
    vertical-align: middle;
}

.alert-bell-wrap { position: relative; }

.alert-bell-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.08);
    color: #8888aa;
    font-size: 14px;
    padding: 5px 8px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: all 0.15s;
}

.alert-bell-btn:hover {
    border-color: rgba(255,255,255,0.2);
    color: #e8e8f0;
}

.alert-bell-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 8px;
    min-width: 14px;
    text-align: center;
    line-height: 14px;
}

.alert-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    background: #12121a;
    border: 1px solid #222233;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    z-index: 9999;
    overflow: hidden;
}

.alert-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid #222233;
}

.alert-panel-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    color: #e8e8f0;
}

.alert-read-all-btn {
    background: none;
    border: none;
    color: #4488ff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    cursor: pointer;
}

.alert-panel-list {
    max-height: 300px;
    overflow-y: auto;
}

.alert-panel-empty {
    padding: 24px;
    text-align: center;
    color: #555566;
    font-size: 12px;
}

.alert-panel-footer {
    padding: 10px 14px;
    border-top: 1px solid #222233;
}

#navXpBarWrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 16px;
    padding: 4px 12px 4px 8px;
    text-decoration: none;
    cursor: pointer;
}

#notifCenterBell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 5px 8px;
    color: #94a3b8;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
}

#notifCenterBell:hover { background: rgba(255,255,255,0.08); color: #e8e8f0; }

/* Mode toggle */
.mode-switch { display: inline-flex; align-items: center; }
.mode-slider { position: relative; display: inline-block; }
.mode-thumb { position: absolute; }
.mode-label span:first-child { margin-right: auto; }
.mode-label span:last-child { margin-left: auto; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links a {
    font-size: var(--font-size-sm);
    color: var(--text-dim);
    text-decoration: none;
    transition: color var(--transition-normal);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

/* Suite hub navigation */
.suite-nav {
    display: flex;
    gap: 8px;
    align-items: center;
}

.suite-nav-item {
    padding: 8px 16px;
    border-radius: 6px;
    background: transparent;
    color: var(--text-dim);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: all var(--transition-normal);
    border: 1px solid transparent;
}

.suite-nav-item:hover,
.suite-nav-item.active {
    background: var(--bg-card);
    color: var(--primary);
    border-color: var(--border-hover);
}

/* ================================================
   BUTTONS
   ================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: var(--font-size-sm);
    padding: 10px 24px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-normal);
    letter-spacing: 0.5px;
    white-space: nowrap;
    user-select: none;
}

/* Primary button (green) — gradient premium style */
.btn-primary,
.cta-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dim));
    color: var(--bg-dark);
    border-color: var(--primary);
    position: relative;
    overflow: hidden;
}

.btn-primary::after,
.cta-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent);
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
}

.btn-primary:hover,
.cta-btn:hover {
    box-shadow: 0 0 28px var(--primary-glow-intense), 0 4px 16px rgba(0, 255, 136, 0.2);
    transform: translateY(-2px);
    color: var(--bg-dark);
}

.btn-primary:hover::after,
.cta-btn:hover::after {
    opacity: 1;
}

.btn-primary:active,
.cta-btn:active {
    transform: translateY(0);
}

/* Outline button */
.btn-outline,
.cta-btn-outline {
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--border);
}

.btn-outline:hover,
.cta-btn-outline:hover {
    color: var(--text);
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.03);
}

/* Secondary button */
.btn-secondary {
    background: var(--bg-card);
    color: var(--text);
    border-color: var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

/* Ghost button */
.btn-ghost {
    background: transparent;
    color: var(--text-dim);
}

.btn-ghost:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

/* Large button variant */
.btn-lg,
.cta-btn-lg {
    font-size: 15px;
    padding: 14px 36px;
}

/* Small button variant */
.btn-sm {
    font-size: 12px;
    padding: 6px 14px;
}

/* Nav button */
.btn-nav {
    font-size: var(--font-size-sm);
    padding: 8px 18px;
}

.btn-green {
    background: var(--primary);
    color: var(--bg-dark);
    border-color: var(--primary);
}

.btn-green:hover {
    background: var(--primary-dim);
    box-shadow: 0 0 15px var(--primary-glow-intense);
}

/* ================================================
   CARDS & CONTAINERS
   ================================================ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    transition: all var(--transition-normal);
}

.card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    box-shadow: 0 4px 16px rgba(0, 255, 136, 0.05);
}

.card-compact {
    padding: 16px;
}

.card-tight {
    padding: 12px;
}

/* Section with background styling */
.section {
    padding: 80px 48px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-label {
    font-family: var(--font-mono);
    font-size: var(--font-size-xs);
    color: var(--primary);
    margin-bottom: 16px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.section-title {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.1;
}

.section-subtitle {
    font-size: clamp(18px, 3vw, 24px);
    color: var(--text-dim);
    margin-bottom: 32px;
    line-height: 1.4;
}

/* ================================================
   LOADING STATES & ANIMATIONS
   ================================================ */

/* Spinner animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-lg {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-card) 0%,
        var(--bg-card-hover) 50%,
        var(--bg-card) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-heading {
    height: 24px;
    margin-bottom: 16px;
    width: 60%;
}

.skeleton-card {
    height: 200px;
    margin-bottom: 16px;
}

/* Fade in animation for page content */
.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-out forwards;
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out forwards;
}

/* Pulse for attention */
.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ================================================
   FORMS & INPUTS
   ================================================ */

input,
textarea,
select {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 14px;
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

input:hover,
textarea:hover,
select:hover {
    border-color: var(--border-hover);
}

/* ================================================
   BADGES & TAGS
   ================================================ */

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--primary-glow);
    color: var(--primary);
    border: 1px solid var(--primary);
}

.badge-secondary {
    background: var(--blue-glow);
    color: var(--blue);
    border-color: var(--blue);
}

.badge-success {
    background: var(--primary-glow);
    color: var(--primary);
    border-color: var(--primary);
}

.badge-warning {
    background: var(--gold-glow);
    color: var(--gold);
    border-color: var(--gold);
}

.badge-danger {
    background: var(--red-glow);
    color: var(--red);
    border-color: var(--red);
}

.tag {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: var(--font-size-xs);
    background: var(--bg-card);
    color: var(--text-dim);
    border: 1px solid var(--border);
}

/* ================================================
   MODALS & OVERLAYS
   ================================================ */

/* Default: hidden. Overlays are always in the DOM on many pages;
   display:flex here stacks them as opaque full-screen backdrops on load.
   Use .modal-overlay.visible or .modal-overlay.active to show. */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(4px);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Show overlay when activated via JS class toggle */
.modal-overlay.visible,
.modal-overlay.active,
.modal-overlay.open,
.modal-overlay[style*="display: flex"],
.modal-overlay[style*="display:flex"] {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: fadeIn 0.3s ease-out;
}

.modal-header {
    margin-bottom: 24px;
}

.modal-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: 8px;
}

.modal-body {
    margin-bottom: 24px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ================================================
   ALERTS & NOTIFICATIONS
   ================================================ */

.alert {
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid;
    margin-bottom: 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.alert-success {
    background: rgba(0, 255, 136, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.alert-warning {
    background: rgba(255, 170, 51, 0.1);
    border-color: var(--gold);
    color: var(--gold);
}

.alert-error,
.alert-danger {
    background: rgba(255, 51, 102, 0.1);
    border-color: var(--red);
    color: var(--red);
}

.alert-info {
    background: rgba(68, 136, 255, 0.1);
    border-color: var(--blue);
    color: var(--blue);
}

.alert-icon {
    flex-shrink: 0;
    font-weight: 700;
}

.alert-content {
    flex: 1;
}

/* ================================================
   TABLES
   ================================================ */

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

th {
    background: var(--bg-card-hover);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-dim);
}

tbody tr:hover {
    background: var(--bg-card-hover);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* ================================================
   UTILITIES
   ================================================ */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary); }
.text-secondary { color: var(--blue); }
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }

.bg-dark { background: var(--bg-dark); }
.bg-card { background: var(--bg-card); }

.border-top { border-top: 1px solid var(--border); }
.border-bottom { border-bottom: 1px solid var(--border); }
.border-all { border: 1px solid var(--border); }

.rounded { border-radius: 6px; }
.rounded-lg { border-radius: 12px; }
.rounded-full { border-radius: 9999px; }

.shadow { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); }
.shadow-lg { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }

.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.gap-4 { gap: 32px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

.grid {
    display: grid;
    gap: 24px;
}

.grid-cols-1 { grid-template-columns: 1fr; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

.w-full { width: 100%; }
.max-w-full { max-width: 100%; }
.max-w-xs { max-width: 320px; }
.max-w-sm { max-width: 480px; }
.max-w-md { max-width: 640px; }
.max-w-lg { max-width: 800px; }
.max-w-xl { max-width: 1000px; }
.max-w-2xl { max-width: 1200px; }

.hidden { display: none; }
.visible { display: block; }

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

/* ================================================
   RESPONSIVE DESIGN
   ================================================ */

@media (max-width: 768px) {
    nav {
        padding: 16px 24px;
        flex-direction: column;
        gap: 16px;
    }

    .section {
        padding: 48px 24px;
    }

    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }

    .nav-links {
        gap: 16px;
    }

    table {
        font-size: 12px;
    }

    th, td {
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    :root {
        --font-size-4xl: 32px;
        --font-size-5xl: 40px;
        --font-size-6xl: 48px;
    }

    nav {
        padding: 12px 16px;
    }

    .section {
        padding: 32px 16px;
    }

    .modal {
        padding: 20px;
    }

    /* Full-width buttons only in form/card contexts — not nav tabs or inline actions.
       Scoping prevents this rule from blowing out every button in the app. */
    .form-group button,
    .form-group .btn,
    .card > button,
    .card > .btn,
    .modal-body button,
    .modal-body .btn,
    .modal-footer button,
    .modal-footer .btn,
    .cta-section button,
    .cta-section .btn,
    .btn-full,
    .form-submit {
        width: 100%;
    }

    .grid {
        gap: 16px;
    }
}

/* ================================================
   ACCESSIBILITY
   ================================================ */

a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: more) {
    :root {
        --border: #333344;
        --text-dim: #999999;
    }
}

/* Dark mode (already default, but explicit for clarity) */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-dark: #0a0a0f;
        --bg-card: #12121a;
    }
}

/* Print styles */
@media print {
    .grid-bg,
    nav {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    a {
        color: #0066cc;
    }
}

/* ================================================
   GLASS MORPHISM CARDS
   ================================================ */

.card-glass {
    background: rgba(18, 18, 26, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 24px;
    transition: all var(--transition-normal);
}

.card-glass:hover {
    background: rgba(26, 26, 38, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.card-glow-green {
    border-color: rgba(0, 255, 136, 0.2);
    box-shadow: 0 0 0 1px rgba(0, 255, 136, 0.05), 0 4px 20px rgba(0, 255, 136, 0.08);
}

.card-glow-blue {
    border-color: rgba(68, 136, 255, 0.2);
    box-shadow: 0 0 0 1px rgba(68, 136, 255, 0.05), 0 4px 20px rgba(68, 136, 255, 0.08);
}

.card-glow-purple {
    border-color: rgba(153, 85, 255, 0.2);
    box-shadow: 0 0 0 1px rgba(153, 85, 255, 0.05), 0 4px 20px rgba(153, 85, 255, 0.08);
}

/* ================================================
   GRADIENT BUTTONS & CTAs
   ================================================ */

.btn-gradient {
    background: linear-gradient(135deg, var(--primary), var(--primary-dim));
    color: var(--bg-dark);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.15));
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.btn-gradient:hover::before {
    opacity: 1;
}

.btn-gradient:hover {
    box-shadow: 0 0 24px var(--primary-glow-intense);
    transform: translateY(-2px);
    color: var(--bg-dark);
}

.btn-gradient-blue {
    background: linear-gradient(135deg, var(--blue), #2266dd);
    color: #fff;
    border: none;
}

.btn-gradient-blue:hover {
    filter: brightness(1.15);
    box-shadow: 0 0 24px var(--blue-glow);
    transform: translateY(-2px);
    color: #fff;
}

.btn-gradient-purple {
    background: linear-gradient(135deg, var(--purple), #6633cc);
    color: #fff;
    border: none;
}

.btn-gradient-purple:hover {
    filter: brightness(1.15);
    box-shadow: 0 0 24px var(--purple-glow);
    transform: translateY(-2px);
    color: #fff;
}

/* ================================================
   EMPTY STATES
   ================================================ */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
    line-height: 1;
}

.empty-state-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.empty-state-desc {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    max-width: 320px;
    line-height: 1.6;
}

.empty-state-action {
    margin-top: 20px;
}

/* ================================================
   TOAST NOTIFICATIONS
   ================================================ */

.toast-container {
    position: fixed;
    bottom: 80px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    min-width: 240px;
    max-width: 360px;
    pointer-events: auto;
    animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
}

.toast-success {
    background: rgba(0, 255, 136, 0.15);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: var(--primary);
}

.toast-error {
    background: rgba(255, 51, 102, 0.15);
    border: 1px solid rgba(255, 51, 102, 0.3);
    color: var(--red);
}

.toast-warning {
    background: rgba(255, 170, 51, 0.15);
    border: 1px solid rgba(255, 170, 51, 0.3);
    color: var(--gold);
}

.toast-info {
    background: rgba(68, 136, 255, 0.15);
    border: 1px solid rgba(68, 136, 255, 0.3);
    color: var(--blue);
}

.toast-dismissing {
    animation: toastOut 0.25s ease-in forwards;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* ================================================
   PAGE TRANSITIONS
   ================================================ */

.page-enter {
    animation: pageEnter 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered reveal for lists/grids */
.stagger-children > * {
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(7) { animation-delay: 0.35s; }
.stagger-children > *:nth-child(8) { animation-delay: 0.4s; }

/* Scroll-reveal (add via JS IntersectionObserver) */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* ================================================
   MOBILE POLISH
   ================================================ */

/* Touch target size enforcement */
.touch-target {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Bottom sheet (mobile-only modal alternative) */
.bottom-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(4px);
    z-index: 300;
    display: flex;
    align-items: flex-end;
}

.bottom-sheet {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
    padding: 8px 0 0;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.bottom-sheet-handle {
    width: 36px;
    height: 4px;
    background: var(--border-hover);
    border-radius: 2px;
    margin: 8px auto 16px;
}

.bottom-sheet-content {
    padding: 16px 24px 32px;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@media (min-width: 768px) {
    .bottom-sheet-overlay {
        align-items: center;
        justify-content: center;
    }

    .bottom-sheet {
        border-radius: 12px;
        max-width: 520px;
        max-height: 80vh;
        animation: fadeIn 0.3s ease-out forwards;
    }

    .bottom-sheet-handle {
        display: none;
    }
}

/* Pull-to-refresh indicator */
.pull-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    font-family: var(--font-mono);
    opacity: 0;
    transition: opacity 0.2s;
}

.pull-indicator.visible {
    opacity: 1;
}

/* ================================================
   HOVER EFFECTS
   ================================================ */

/* Interactive row hover */
.hover-row {
    transition: background var(--transition-fast);
    cursor: pointer;
}

.hover-row:hover {
    background: var(--bg-card-hover);
}

/* Lift effect for cards */
.hover-lift {
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

/* Scale effect for icons/buttons */
.hover-scale {
    transition: transform var(--transition-fast);
}

.hover-scale:hover {
    transform: scale(1.08);
}

/* Glow on hover */
.hover-glow-green:hover {
    box-shadow: 0 0 20px var(--primary-glow-intense);
}

.hover-glow-blue:hover {
    box-shadow: 0 0 20px var(--blue-glow);
}

/* ================================================
   SUITE FOOTER
   ================================================ */

.suite-footer {
    text-align: center;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
    background: var(--bg-dark);
}

.suite-footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-normal);
}

.suite-footer a:hover {
    color: var(--primary);
}

.suite-footer-brand {
    color: var(--text-dim);
    font-weight: 600;
}

/* ================================================
   DIVIDERS & DECORATIVE ELEMENTS
   ================================================ */

.divider {
    height: 1px;
    background: var(--border);
    margin: 24px 0;
}

.divider-gradient {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 24px 0;
}

/* Gradient text */
.text-gradient-green {
    background: linear-gradient(135deg, var(--primary), var(--blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-blue {
    background: linear-gradient(135deg, var(--blue), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Stat highlight */
.stat-highlight {
    font-family: var(--font-mono);
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-top: 6px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 600;
    color: #e8e8f0;
}

.stat-value.blue { color: #4488ff; }
.stat-value.green { color: #00ff88; }
.stat-value.red { color: #ff3366; }

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.stat-divider {
    width: 1px;
    height: 28px;
    background: #1e1e2e;
    flex-shrink: 0;
    margin: 0 4px;
}

.stat-skeleton {
    display: inline-block;
    height: 14px;
    background: linear-gradient(90deg, #1e1e2e 25%, #2a2a3a 50%, #1e1e2e 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 3px;
}

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

/* ================================================
   AI MARKET ANALYSIS PANEL
   ================================================ */

.ai-analysis-panel {
    background: #0d0d14;
    border: 1px solid #1e1e2e;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.ai-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #12121a;
    border-bottom: 1px solid #1e1e2e;
}

.ai-panel-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-brain-icon {
    font-size: 16px;
}

.ai-panel-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    color: #e8e8f0;
}

.ai-panel-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(0,255,136,0.1);
    color: #00ff88;
    border: 1px solid rgba(0,255,136,0.2);
}

.ai-usage-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    padding: 1px 6px;
    border-radius: 8px;
    background: rgba(245,158,11,0.12);
    color: #f59e0b;
}

.ai-refresh-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: #8888aa;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.ai-refresh-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.08);
    color: #e8e8f0;
}

.ai-refresh-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.refresh-icon { font-size: 13px; display: inline-block; }

.ai-analysis-body {
    padding: 12px;
    min-height: 60px;
}

.ai-analysis-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.ai-loading-dots {
    display: flex;
    gap: 4px;
}

.ai-loading-dots span {
    width: 5px;
    height: 5px;
    background: #4488ff;
    border-radius: 50%;
    animation: dotPulse 1.4s ease-in-out infinite;
}

.ai-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1); }
}

.ai-loading-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #555566;
}

.ai-panel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    border-top: 1px solid #1e1e2e;
    background: #0a0a0f;
}

.ai-timestamp {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #555566;
}

.ai-cooldown-bar {
    width: 80px;
    height: 3px;
    background: #1e1e2e;
    border-radius: 2px;
    overflow: hidden;
}

.ai-cooldown-fill {
    height: 100%;
    background: linear-gradient(90deg, #4488ff, #00ff88);
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* ================================================
   MAIN CONTENT LAYOUT (terminal.html)
   ================================================ */

.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: var(--bg-dark, #0a0a0f);
}

.market-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #0d0d14;
    border-bottom: 1px solid #1e1e2e;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #12121a;
    border: 1px solid #1e1e2e;
    border-radius: 8px;
    padding: 5px 10px;
    flex: 1;
    min-width: 120px;
    max-width: 200px;
}

.search-icon {
    color: #555566;
    font-size: 12px;
}

.search-input {
    background: transparent;
    border: none;
    color: #e8e8f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    outline: none;
    width: 100%;
    min-width: 0;
}

.search-input::placeholder { color: #555566; }

.filter-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #555566;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: #1e1e2e;
    color: #8888aa;
}

.filter-btn.active {
    background: rgba(0,255,136,0.08);
    border-color: rgba(0,255,136,0.2);
    color: #00ff88;
}

.market-table-wrap {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
}

.market-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
}

.market-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.market-table th {
    background: #0d0d14;
    color: #555566;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #1e1e2e;
    white-space: nowrap;
}

.market-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    color: #e8e8f0;
    white-space: nowrap;
}

.market-table tbody tr:hover td {
    background: rgba(255,255,255,0.02);
}

.market-table tbody tr:hover { cursor: pointer; }

/* Safety net — cap ALL images inside coin table rows to 28px (coin icons) */
.market-table img {
    max-width: 28px !important;
    max-height: 28px !important;
}

/* ================================================
   TOAST / SHIMMER (terminal.html)
   ================================================ */

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0f172a;
    border: 1px solid #1e3a5f;
    border-left: 3px solid #00d4ff;
    border-radius: 10px;
    padding: 14px 18px;
    max-width: 340px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    z-index: 9999;
    animation: toastSlideIn 0.3s ease;
}

@keyframes toastSlideIn {
    from { transform: translateX(120%); opacity: 0; }
    to   { transform: translateX(0);   opacity: 1; }
}

/* ================================================
   AUTH MODAL & FORMS (terminal.html login/register)
   ================================================ */

.auth-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 32px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-out;
}

.modal-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 4px;
}

.modal-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: var(--font-size-xs);
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.modal-tab:hover {
    color: var(--text-dim);
}

.modal-tab.active {
    background: var(--bg-card-hover);
    color: var(--primary);
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    font-family: var(--font-mono);
}

.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    color: var(--text);
    font-size: var(--font-size-base);
    font-family: var(--font-mono);
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
    outline: none;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-error {
    color: var(--red);
    font-size: var(--font-size-xs);
    font-family: var(--font-mono);
    margin-top: 4px;
    min-height: 0;
}

.form-submit {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dim));
    color: var(--bg-dark);
    border: none;
    border-radius: 8px;
    font-size: var(--font-size-base);
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: 1px;
    cursor: pointer;
    transition: opacity var(--transition-normal), box-shadow var(--transition-normal);
    margin-top: 8px;
}

.form-submit:hover {
    opacity: 0.9;
    box-shadow: 0 0 20px var(--primary-glow);
}

.form-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ================================================
   COIN TABLE / MARKET LIST
   ================================================ */

.coin-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.coin-icon {
    width: 28px !important;
    height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

.coin-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text, #e8e8f0);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.coin-symbol {
    font-size: 11px;
    color: var(--text-muted, #8888aa);
    text-transform: uppercase;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.3px;
}

.trending-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

.trending-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 12px;
}

.trending-rank {
    color: var(--text-muted, #8888aa);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    min-width: 16px;
    text-align: center;
}

.trending-name {
    color: var(--text, #e8e8f0);
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

.trending-symbol {
    color: var(--text-muted, #8888aa);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
}

.modal-coin-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.modal-coin-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-coin-name {
    font-size: var(--font-size-base, 14px);
    font-weight: 600;
    color: var(--text, #e8e8f0);
}

.modal-coin-symbol {
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted, #8888aa);
    text-transform: uppercase;
}

.modal-price {
    font-size: var(--font-size-xl, 20px);
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text, #e8e8f0);
    margin: 12px 0 4px;
}

.modal-change {
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    margin-bottom: 12px;
}

.modal-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.modal-stat {
    background: var(--bg-dark, #0a0a0f);
    border: 1px solid var(--border, #1e1e2e);
    border-radius: 6px;
    padding: 8px 10px;
}

.modal-stat-label {
    font-size: 10px;
    color: var(--text-muted, #8888aa);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.modal-stat-value {
    font-size: 12px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text, #e8e8f0);
}
