:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: #1a2332;
    --bg-card-hover: #1e293b;
    --bg-input: #0f1729;
    --border-color: #1e293b;
    --border-light: #2d3748;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --color-accent: #3b82f6;
    --color-accent-hover: #2563eb;
    --color-success: #10b981;
    --color-success-bg: rgba(16,185,129,0.1);
    --color-error: #ef4444;
    --color-error-bg: rgba(239,68,68,0.1);
    --color-warning: #f59e0b;
    --color-warning-bg: rgba(245,158,11,0.1);
    --color-info: #3b82f6;
    --color-info-bg: rgba(59,130,246,0.1);
    --color-purple: #8b5cf6;
    --color-bullish: #10b981;
    --color-bearish: #ef4444;
    --color-neutral: #f59e0b;
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --sidebar-width: 260px;
    --sidebar-collapsed: 64px;
    --header-height: 60px;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.4);
    --transition: 0.2s ease;
}

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

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'tnum' 1;
}

/* ==================== AUTH PAGES ==================== */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.auth-container { width: 100%; max-width: 420px; padding: 2rem; }
.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}
.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-logo h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: 2px; margin-top: 0.5rem; }
.auth-subtitle { color: var(--text-secondary); font-size: 0.875rem; margin-top: 0.25rem; }
.logo-icon-large { font-size: 3rem; display: block; margin-bottom: 0.5rem; }
.auth-form { display: flex; flex-direction: column; gap: 1.25rem; }
.auth-links { text-align: center; margin-top: 1.5rem; color: var(--text-secondary); font-size: 0.875rem; }
.auth-links a { color: var(--color-accent); text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }
.auth-links .separator { margin: 0 0.75rem; }
.auth-footer { text-align: center; margin-top: 2rem; color: var(--text-muted); font-size: 0.75rem; }

/* Google OAuth Button */
.btn-google {
    display: flex; align-items: center; justify-content: center; gap: 0.75rem;
    width: 100%; padding: 0.7rem 1rem;
    background: #fff; color: #3c4043;
    border: 1px solid #dadce0; border-radius: var(--radius);
    font-size: 0.9rem; font-weight: 500; font-family: var(--font-main);
    cursor: pointer; text-decoration: none;
    transition: background var(--transition), box-shadow var(--transition);
}
.btn-google:hover { background: #f7f8f8; box-shadow: 0 1px 3px rgba(0,0,0,0.15); text-decoration: none; }
.btn-google:active { background: #eee; }
.google-icon { flex-shrink: 0; }

.auth-divider {
    display: flex; align-items: center; gap: 1rem;
    margin: 1.25rem 0; color: var(--text-muted); font-size: 0.8rem;
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border-color);
}

/* ==================== FORMS ==================== */
.form-group { display: flex; flex-direction: column; gap: 0.375rem; }
.form-group label { font-size: 0.8125rem; font-weight: 500; color: var(--text-secondary); }
.form-input, input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="datetime-local"], select, textarea {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.625rem 0.875rem;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.875rem;
    transition: border-color var(--transition);
    width: 100%;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
input:disabled { opacity: 0.6; cursor: not-allowed; }
.password-wrapper { position: relative; }
.password-toggle {
    position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 0.25rem;
}
.eye-icon { width: 18px; height: 18px; }
.form-select-sm { padding: 0.25rem 0.5rem; font-size: 0.75rem; width: auto; }
.form-help { font-size: 0.7rem; color: var(--text-muted); font-family: var(--font-mono); }
.checkbox-label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: auto; }

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.625rem 1.25rem; border-radius: var(--radius); font-size: 0.875rem;
    font-weight: 500; text-decoration: none; border: 1px solid transparent;
    cursor: pointer; transition: all var(--transition); font-family: var(--font-main);
    white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--color-accent); color: white; }
.btn-primary:hover:not(:disabled) { background: var(--color-accent-hover); }
.btn-success { background: var(--color-success); color: white; }
.btn-warning { background: var(--color-warning); color: #000; }
.btn-danger { background: var(--color-error); color: white; }
.btn-outline { background: transparent; border-color: var(--border-light); color: var(--text-secondary); }
.btn-outline:hover { border-color: var(--color-accent); color: var(--color-accent); }
.btn-block { width: 100%; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.btn-xs { padding: 0.25rem 0.5rem; font-size: 0.75rem; }
.btn-group { display: flex; gap: 0.375rem; align-items: center; flex-wrap: wrap; }

/* ==================== ALERTS ==================== */
.alert {
    padding: 0.875rem 1rem; border-radius: var(--radius); margin-bottom: 1rem;
    font-size: 0.875rem; border: 1px solid;
}
.alert-error { background: var(--color-error-bg); border-color: var(--color-error); color: #fca5a5; }
.alert-success { background: var(--color-success-bg); border-color: var(--color-success); color: #6ee7b7; }
.alert-warning { background: var(--color-warning-bg); border-color: var(--color-warning); color: #fcd34d; }
.alert-info { background: var(--color-info-bg); border-color: var(--color-info); color: #93c5fd; }

/* ==================== BADGES ==================== */
.badge {
    display: inline-block; padding: 0.125rem 0.5rem; border-radius: 9999px;
    font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-success { background: var(--color-success-bg); color: var(--color-success); }
.badge-error { background: var(--color-error-bg); color: var(--color-error); }
.badge-warning { background: var(--color-warning-bg); color: var(--color-warning); }
.badge-purple { background: rgba(139,92,246,0.1); color: var(--color-purple); }
.badge-muted { background: rgba(100,116,139,0.1); color: var(--text-muted); }

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

/* ==================== SIDEBAR ==================== */
.sidebar {
    width: var(--sidebar-width); background: var(--bg-secondary);
    border-right: 1px solid var(--border-color); display: flex; flex-direction: column;
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 100; transition: transform var(--transition);
}
.sidebar-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.25rem; border-bottom: 1px solid var(--border-color); height: var(--header-height);
}
.logo { display: flex; align-items: center; gap: 0.5rem; }
.logo-icon { font-size: 1.5rem; }
.logo-text { font-size: 1rem; font-weight: 700; letter-spacing: 2px; color: var(--color-accent); }
.sidebar-toggle {
    background: none; border: none; color: var(--text-muted); cursor: pointer;
    padding: 0.25rem; display: none;
}
.sidebar-nav {
    flex: 1; padding: 0.75rem; overflow-y: auto; display: flex; flex-direction: column; gap: 0.125rem;
}
.nav-item {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0.875rem;
    border-radius: var(--radius); color: var(--text-secondary); text-decoration: none;
    font-size: 0.875rem; font-weight: 450; transition: all var(--transition);
}
.nav-item:hover { background: var(--bg-card); color: var(--text-primary); }
.nav-item.active { background: rgba(59,130,246,0.1); color: var(--color-accent); }
.nav-icon { width: 20px; height: 20px; flex-shrink: 0; }
.nav-divider { height: 1px; background: var(--border-color); margin: 0.5rem 0; }
.nav-label {
    padding: 0.375rem 0.875rem; font-size: 0.6875rem; font-weight: 600;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px;
}
.sidebar-footer {
    padding: 1rem; border-top: 1px solid var(--border-color);
}
.user-info { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.user-avatar {
    width: 36px; height: 36px; border-radius: 50%; background: var(--color-accent);
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 0.875rem; color: white; flex-shrink: 0;
}
.user-details { min-width: 0; }
.user-name { font-size: 0.8125rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-plan { font-size: 0.6875rem; color: var(--text-muted); }
.logout-btn { margin-top: 0.25rem; }

/* ==================== MAIN CONTENT ==================== */
.main-content { flex: 1; margin-left: var(--sidebar-width); padding: 1.5rem; min-width: 0; }
.page-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1.5rem; flex-wrap: wrap; gap: 0.5rem;
}
.page-header h1 { font-size: 1.5rem; font-weight: 600; }

/* ==================== CARDS ==================== */
.card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); overflow: hidden;
}
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.25rem; border-bottom: 1px solid var(--border-color);
}
.card-header h3 { font-size: 0.9375rem; font-weight: 600; }
.card-body { padding: 1.25rem; }
.card-footer { padding: 0.75rem 1.25rem; border-top: 1px solid var(--border-color); }

/* ==================== TABLES ==================== */
.table-responsive { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
    padding: 0.625rem 0.875rem; text-align: left; border-bottom: 1px solid var(--border-color);
    font-size: 0.8125rem; white-space: nowrap;
}
.table th { color: var(--text-muted); font-weight: 600; text-transform: uppercase; font-size: 0.6875rem; letter-spacing: 0.5px; }
.table tbody tr:hover { background: var(--bg-card-hover); }

/* ==================== STATS ==================== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); padding: 1.25rem; display: flex; align-items: center; gap: 1rem;
}
.stat-icon {
    width: 48px; height: 48px; border-radius: var(--radius); display: flex;
    align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-icon svg { width: 24px; height: 24px; }
.bg-blue { background: rgba(59,130,246,0.15); color: var(--color-accent); }
.bg-green { background: var(--color-success-bg); color: var(--color-success); }
.bg-purple { background: rgba(139,92,246,0.15); color: var(--color-purple); }
.bg-orange { background: rgba(245,158,11,0.15); color: var(--color-warning); }
.bg-red { background: var(--color-error-bg); color: var(--color-error); }
.stat-number { font-size: 1.5rem; font-weight: 700; font-family: var(--font-mono); }
.stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-row { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; border-bottom: 1px solid var(--border-color); }
.stat-row:last-child { border-bottom: none; }
.stat-row .stat-label { text-transform: none; letter-spacing: 0; font-size: 0.8125rem; color: var(--text-secondary); }
.stat-row .stat-value { font-weight: 600; font-family: var(--font-mono); font-size: 0.875rem; }

/* ==================== GRIDS ==================== */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 1.5rem; margin-bottom: 1.5rem; }
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 1.5rem; }
.plans-admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.dashboard-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem; }
.dashboard-grid .span-12 { grid-column: span 12; }
.dashboard-grid .span-8 { grid-column: span 8; }
.dashboard-grid .span-6 { grid-column: span 6; }
.dashboard-grid .span-4 { grid-column: span 4; }
.dashboard-grid .span-3 { grid-column: span 3; }

/* ==================== DASHBOARD SPECIFIC ==================== */
.bias-indicator {
    text-align: center; padding: 1.5rem;
}
.bias-direction {
    font-size: 2rem; font-weight: 800; text-transform: uppercase; letter-spacing: 3px; margin-bottom: 0.25rem;
}
.bias-bullish { color: var(--color-bullish); }
.bias-bearish { color: var(--color-bearish); }
.bias-neutral { color: var(--color-neutral); }
.bias-confidence {
    font-size: 1.25rem; font-weight: 700; font-family: var(--font-mono); margin-bottom: 0.5rem;
}
.bias-regime {
    font-size: 0.875rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px;
}
.trade-condition {
    display: inline-block; padding: 0.375rem 1rem; border-radius: 9999px;
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-top: 0.75rem;
}
.trade-tradeable { background: var(--color-success-bg); color: var(--color-success); border: 1px solid var(--color-success); }
.trade-caution { background: var(--color-warning-bg); color: var(--color-warning); border: 1px solid var(--color-warning); }
.trade-no_trade { background: var(--color-error-bg); color: var(--color-error); border: 1px solid var(--color-error); }

.nifty-price { font-family: var(--font-mono); }
.nifty-price .price-value { font-size: 2rem; font-weight: 700; }
.nifty-price .price-change { font-size: 1rem; margin-left: 0.5rem; }
.price-up { color: var(--color-bullish); }
.price-down { color: var(--color-bearish); }

.data-source-badge {
    display: inline-flex; align-items: center; gap: 0.375rem;
    padding: 0.25rem 0.625rem; border-radius: 9999px; font-size: 0.6875rem;
    font-weight: 500;
}
.source-live { background: var(--color-success-bg); color: var(--color-success); }
.source-demo { background: var(--color-warning-bg); color: var(--color-warning); }
.source-error { background: var(--color-error-bg); color: var(--color-error); }

.reason-list { list-style: none; padding: 0; }
.reason-list li {
    padding: 0.5rem 0.75rem; border-left: 3px solid var(--color-accent);
    margin-bottom: 0.375rem; font-size: 0.8125rem; background: rgba(59,130,246,0.05);
    border-radius: 0 var(--radius) var(--radius) 0;
}
.reason-list li.negative { border-left-color: var(--color-error); background: rgba(239,68,68,0.05); }

.chart-container { position: relative; height: 300px; width: 100%; }
.chart-container.tall { height: 400px; }
.chart-container.mini { height: 120px; }
.tv-chart-container { position: relative; height: 400px; width: 100%; overflow: hidden; border-radius: var(--radius-md, 8px); }
.tv-chart-container iframe { border-radius: var(--radius-md, 8px); }

.mini-chart-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }
.mini-card .card-header.compact { padding: 0.4rem 0.6rem; }
.mini-card .card-header.compact h3 { font-size: 0.65rem; letter-spacing: 0.5px; }
.mini-card .card-body.compact { padding: 0.25rem 0.4rem 0.4rem; }
.mini-val { font-size: 0.7rem; font-weight: 600; font-family: var(--font-mono); }

@media (max-width: 768px) {
    .mini-chart-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
}

.option-chain-table { font-family: var(--font-mono); font-size: 0.75rem; }
.option-chain-table th { font-size: 0.625rem; }
.option-chain-table .strike-col { text-align: center; font-weight: 700; background: var(--bg-secondary); }
.option-chain-table .highlight-max { background: rgba(59,130,246,0.1); font-weight: 600; }
.option-chain-table .atm-row { background: rgba(245,158,11,0.1); }

.heatmap-cell {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    font-size: 0.6875rem; font-family: var(--font-mono);
}

.signal-timeline { display: flex; flex-direction: column; gap: 0.5rem; }
.signal-entry {
    display: flex; gap: 1rem; padding: 0.625rem 0.875rem;
    border-left: 3px solid var(--border-color); background: var(--bg-card-hover);
    border-radius: 0 var(--radius) var(--radius) 0; font-size: 0.8125rem;
}
.signal-entry.bullish { border-left-color: var(--color-bullish); }
.signal-entry.bearish { border-left-color: var(--color-bearish); }
.signal-entry.neutral { border-left-color: var(--color-neutral); }
.signal-time { font-family: var(--font-mono); color: var(--text-muted); min-width: 60px; }

.market-status-bar {
    display: flex; align-items: center; gap: 1rem; padding: 0.5rem 1rem;
    background: var(--bg-secondary); border-bottom: 1px solid var(--border-color);
    font-size: 0.75rem; flex-wrap: wrap;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-dot.live { background: var(--color-success); animation: pulse 2s infinite; }
.status-dot.offline { background: var(--color-error); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ==================== PRICING PAGE ==================== */
.pricing-page { background: var(--bg-primary); min-height: 100vh; }
.pricing-container { max-width: 1200px; margin: 0 auto; padding: 3rem 1.5rem; }
.pricing-header { text-align: center; margin-bottom: 3rem; }
.pricing-header h1 { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; }
.pricing-header p { color: var(--text-secondary); }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.pricing-card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); padding: 2rem; text-align: center;
    transition: all var(--transition); position: relative;
}
.pricing-card:hover { border-color: var(--color-accent); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pricing-card.popular { border-color: var(--color-accent); }
.pricing-card.trial { border-color: var(--color-warning, #f59e0b); border-style: dashed; }
.popular-badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--color-accent); color: white; padding: 0.25rem 1rem;
    border-radius: 9999px; font-size: 0.6875rem; font-weight: 600; text-transform: uppercase;
}
.popular-badge.trial-badge { background: var(--color-warning, #f59e0b); }
.plan-name { font-size: 1.25rem; font-weight: 600; margin-bottom: 1rem; }
.plan-price { margin-bottom: 0.25rem; }
.price-currency { font-size: 1.25rem; font-weight: 600; vertical-align: super; }
.price-amount { font-size: 3rem; font-weight: 800; font-family: var(--font-mono); }
.plan-original { color: var(--text-muted); text-decoration: line-through; font-size: 0.875rem; }
.plan-discount {
    display: inline-block; background: var(--color-success-bg); color: var(--color-success);
    padding: 0.125rem 0.5rem; border-radius: 9999px; font-size: 0.6875rem; font-weight: 600; margin: 0.25rem 0;
}
.plan-duration { color: var(--text-secondary); margin: 0.5rem 0; }
.plan-per-month { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.plan-features { list-style: none; padding: 0; margin-bottom: 1.5rem; text-align: left; }
.plan-features li {
    padding: 0.375rem 0; font-size: 0.8125rem; color: var(--text-secondary);
    display: flex; align-items: center; gap: 0.5rem;
}
.plan-features li::before { content: "✓"; color: var(--color-success); font-weight: 700; }
.pricing-footer { text-align: center; margin-top: 3rem; color: var(--text-muted); font-size: 0.8125rem; }
.pricing-footer p { margin-bottom: 0.5rem; }

/* ==================== SETTINGS TABS ==================== */
.settings-tabs { display: flex; gap: 0.25rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0; }
.tab-btn {
    padding: 0.75rem 1.25rem; background: none; border: none; border-bottom: 2px solid transparent;
    color: var(--text-muted); cursor: pointer; font-size: 0.875rem; font-weight: 500; transition: all var(--transition);
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--color-accent); border-bottom-color: var(--color-accent); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ==================== WEIGHT CONTROLS ==================== */
.weight-row .weight-input-group { display: flex; align-items: center; gap: 0.75rem; }
.weight-slider { flex: 1; }
.weight-number { width: 70px; text-align: center; }
.weight-total { padding: 1rem 0; font-size: 1rem; border-top: 1px solid var(--border-color); margin-top: 1rem; }

/* ==================== SEARCH ==================== */
.search-form { display: flex; gap: 0.5rem; align-items: center; }
.search-form input { max-width: 300px; }

/* ==================== PAGINATION ==================== */
.pagination { display: flex; gap: 0.25rem; justify-content: center; }

/* ==================== TEXT UTILITIES ==================== */
.text-success { color: var(--color-success); }
.text-error { color: var(--color-error); }
.text-warning { color: var(--color-warning); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-mono { font-family: var(--font-mono); }

/* ==================== DATA QUALITY ==================== */
.data-quality { display: flex; align-items: center; gap: 0.5rem; }
.quality-bar { flex: 1; height: 6px; background: var(--border-color); border-radius: 3px; overflow: hidden; }
.quality-fill { height: 100%; border-radius: 3px; transition: width 0.5s ease; }
.quality-good { background: var(--color-success); }
.quality-warn { background: var(--color-warning); }
.quality-bad { background: var(--color-error); }

/* ==================== MOBILE RESPONSIVE ==================== */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-toggle { display: block; }
    .main-content { margin-left: 0; padding: 1rem; }
    .dashboard-grid .span-8,
    .dashboard-grid .span-6,
    .dashboard-grid .span-4,
    .dashboard-grid .span-3 { grid-column: span 12; }
    .admin-grid, .account-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .pricing-grid { grid-template-columns: 1fr; }
    .page-header h1 { font-size: 1.25rem; }
    .auth-card { padding: 1.5rem; }
    .auth-container { padding: 1rem; }
    .mobile-menu-btn {
        position: fixed; top: 1rem; left: 1rem; z-index: 101;
        background: var(--bg-card); border: 1px solid var(--border-color);
        border-radius: var(--radius); padding: 0.5rem; cursor: pointer; color: var(--text-primary);
    }
    .search-form { flex-wrap: wrap; }
    .search-form input { max-width: 100%; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .stat-card { padding: 1rem; }
    .stat-number { font-size: 1.25rem; }
    .pricing-card { padding: 1.5rem; }
    .price-amount { font-size: 2.5rem; }
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ==================== INSTALL PAGE ==================== */
.install-container { max-width: 600px; margin: 0 auto; padding: 3rem 1.5rem; }
.install-steps { display: flex; flex-direction: column; gap: 1rem; margin: 1.5rem 0; }
.install-step { display: flex; align-items: center; gap: 1rem; padding: 0.75rem; background: var(--bg-card-hover); border-radius: var(--radius); }
.step-number { width: 32px; height: 32px; border-radius: 50%; background: var(--color-accent); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.875rem; flex-shrink: 0; }
.step-done { background: var(--color-success); }
.step-fail { background: var(--color-error); }

/* ==================== OVERLAY ==================== */
.overlay {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); z-index: 99;
}
.overlay.active { display: block; }

/* ==================== NO-TRADE BANNER ==================== */
.no-trade-banner {
    background: var(--color-error-bg); border: 1px solid var(--color-error);
    border-radius: var(--radius-lg); padding: 1.25rem; text-align: center; margin-bottom: 1rem;
}
.no-trade-banner h3 { color: var(--color-error); font-size: 1.25rem; margin-bottom: 0.5rem; }
.no-trade-banner p { color: #fca5a5; font-size: 0.875rem; }
