/**
 * AQ Trading Brain - Premium Design System v2.0
 *
 * Aesthetic: Premium Dark Trading Terminal with Glassmorphism
 * Theme: Sophisticated dark with blue/purple accents and premium effects
 * Features: Glassmorphism, glow effects, subtle neumorphism, premium shadows
 */

:root {
    --font-display: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
    --font-body: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
    --font-mono: 'SF Mono', 'JetBrains Mono', 'Fira Code', 'Monaco', 'Consolas', 'Menlo', monospace;
    --bg-deep: #050711;
    --bg-primary: #080c1a;
    --bg-secondary: #0d1323;
    --bg-tertiary: #121b2f;
    --bg-elevated: #182038;
    --glass-bg: rgba(18, 27, 47, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e3;
    --text-muted: #64748b;
    --accent-primary: #4f8cff;
    --accent-secondary: #7aa7ff;
    --accent-glow: rgba(79, 140, 255, 0.25);
    --purple-primary: #a78bfa;
    --purple-glow: rgba(139, 92, 246, 0.25);
    --turquoise-primary: #22d3d3;
    --gradient-primary: linear-gradient(135deg, #4f8cff 0%, #8b5cf6 100%);
    --gradient-primary-soft: linear-gradient(135deg, rgba(79, 140, 255, 0.15) 0%, rgba(139, 92, 246, 0.08) 100%);
    --gradient-subtle: linear-gradient(90deg, rgba(79, 140, 255, 0.1), rgba(139, 92, 246, 0.05), transparent);
    --gradient-border: linear-gradient(135deg, rgba(79, 140, 255, 0.4), rgba(139, 92, 246, 0.2), rgba(34, 211, 211, 0.1));
    --profit-primary: #10b981;
    --profit-light: rgba(16, 185, 129, 0.12);
    --profit-glow: rgba(16, 185, 129, 0.3);
    --loss-primary: #ef4444;
    --loss-light: rgba(239, 68, 68, 0.12);
    --loss-glow: rgba(239, 68, 68, 0.3);
    --success-primary: #10b981;
    --warning-primary: #f59e0b;
    --danger-primary: #ef4444;
    --border-subtle: rgba(255, 255, 255, 0.04);
    --border-medium: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.12);
    --border-glass: rgba(255, 255, 255, 0.06);
    --shadow-card: 0 4px 24px -4px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.02);
    --shadow-elevated: 0 8px 40px -8px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.03);
    --shadow-accent: 0 8px 32px -4px rgba(79, 140, 255, 0.25);
    --shadow-glow: 0 0 40px -8px rgba(79, 140, 255, 0.2);
    --blur-backdrop: blur(20px);
    --blur-glass: blur(16px);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --duration-fast: 200ms;
    --duration-normal: 300ms;
    --duration-slow: 500ms;
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

body {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background:
        radial-gradient(ellipse 900px 500px at 15% 0%, rgba(79, 140, 255, 0.12), transparent 60%),
        radial-gradient(ellipse 700px 500px at 85% 0%, rgba(139, 92, 246, 0.1), transparent 60%),
        radial-gradient(ellipse 600px 400px at 50% 100%, rgba(34, 211, 211, 0.06), transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(16, 185, 129, 0.04), transparent 40%),
        linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-primary) 50%, var(--bg-secondary) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at center, rgba(79, 140, 255, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    animation: ambientGlow 30s ease-in-out infinite;
}

@keyframes ambientGlow {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
    33% { transform: translate(10%, 10%) scale(1.1); opacity: 0.8; }
    66% { transform: translate(-5%, 5%) scale(0.95); opacity: 0.6; }
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; color: var(--text-primary); margin: 0; letter-spacing: -0.02em; }
h1 { font-size: 32px; font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: 24px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }
h5 { font-size: 14px; font-weight: 600; }
h6 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
p { margin: 0 0 16px 0; color: var(--text-secondary); }
a { color: var(--accent-primary); text-decoration: none; transition: color 200ms var(--ease-out); }
a:hover { color: var(--accent-secondary); }

.mono { font-family: var(--font-mono); font-size: 0.9em; font-feature-settings: 'tnum' 1; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success-primary); }
.text-warning { color: var(--warning-primary); }
.text-danger { color: var(--danger-primary); }
.text-profit { color: var(--profit-primary); }
.text-loss { color: var(--loss-primary); }

.wrap { max-width: 1600px; margin: 0 auto; padding: 24px; min-height: 100vh; }
.grid { display: grid; gap: 24px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(450px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.gap-6 { gap: 24px; }
.flex-1 { flex: 1; }

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: all 300ms var(--ease-out);
    position: relative;
}

.card:hover {
    box-shadow: var(--shadow-elevated), var(--shadow-glow);
    transform: translateY(-2px);
    border-color: var(--border-strong);
}

.card.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--blur-glass);
    -webkit-backdrop-filter: var(--blur-glass);
    border: 1px solid var(--border-glass);
    box-shadow: var(--glass-shadow);
}

.card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 24px;
    background: var(--gradient-primary-soft);
    border-bottom: 1px solid var(--border-subtle);
}

.header-content { display: flex; align-items: center; gap: 12px; }

.card-header h2 {
    font-size: 14px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.06em; margin: 0; color: var(--text-muted);
}

.card-body { padding: 24px; }
.card-footer { padding: 16px 24px; background: var(--bg-tertiary); border-top: 1px solid var(--border-subtle); }

.card .hd { padding: 16px 24px; background: var(--gradient-primary-soft); border-bottom: 1px solid var(--border-subtle); display: flex; align-items: center; justify-content: space-between; }
.card .hd h2 { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin: 0; }
.card .bd { padding: 24px; }

.badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 12px; border-radius: var(--radius-md);
    font-size: 11px; font-weight: 600; line-height: 1;
    text-transform: uppercase; letter-spacing: 0.04em;
    background: var(--bg-tertiary); color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    transition: transform 200ms var(--ease-out);
}

.badge:hover { transform: translateY(-1px); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; box-shadow: 0 0 8px currentColor; }

.badge-profit { background: var(--profit-light); color: var(--profit-primary); border: 1px solid rgba(16, 185, 129, 0.25); box-shadow: 0 0 12px var(--profit-glow); }
.badge-loss { background: var(--loss-light); color: var(--loss-primary); border: 1px solid rgba(239, 68, 68, 0.25); box-shadow: 0 0 12px var(--loss-glow); }
.badge-success { background: rgba(16, 185, 129, 0.12); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.25); box-shadow: 0 0 12px rgba(16, 185, 129, 0.25); }
.badge-warning { background: rgba(245, 158, 11, 0.12); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.25); box-shadow: 0 0 12px rgba(245, 158, 11, 0.25); }
.badge-danger { background: var(--loss-light); color: var(--danger-primary); border: 1px solid rgba(239, 68, 68, 0.25); box-shadow: 0 0 12px var(--danger-glow); }
.badge-info { background: rgba(79, 140, 255, 0.12); color: var(--accent-primary); border: 1px solid rgba(79, 140, 255, 0.25); box-shadow: 0 0 12px rgba(79, 140, 255, 0.25); }
.dot.ok { background: #10b981; box-shadow: 0 0 10px rgba(16, 185, 129, 0.25); }
.dot.bad { background: #ef4444; box-shadow: 0 0 10px rgba(239, 68, 68, 0.25); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 20px; border: 1px solid var(--border-medium);
    border-radius: var(--radius-md); background: var(--bg-tertiary);
    color: var(--text-primary); font-family: var(--font-body);
    font-size: 13px; font-weight: 600; line-height: 1;
    cursor: pointer; transition: all 200ms var(--ease-out);
    text-decoration: none; user-select: none; position: relative; overflow: hidden;
}

.btn:hover {
    background: var(--bg-elevated); border-color: var(--border-strong);
    transform: translateY(-2px); text-decoration: none;
    box-shadow: var(--shadow-elevated), var(--shadow-glow);
}

.btn.primary {
    background: var(--gradient-primary); border-color: transparent; color: #ffffff;
    font-weight: 600; box-shadow: var(--shadow-accent);
}

.btn.primary:hover {
    background: linear-gradient(135deg, #7aa7ff 0%, #a78bfa 100%);
    box-shadow: 0 12px 48px -4px rgba(79, 140, 255, 0.35);
}

.btn-danger { background: var(--loss-light); border-color: rgba(239, 68, 68, 0.4); color: var(--danger-primary); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-tertiary); border-color: var(--border-subtle); color: var(--text-primary); }
.btn-outline { background: transparent; color: var(--text-primary); border-color: var(--border-medium); }
.btn-outline:hover { background: var(--bg-tertiary); border-color: var(--border-strong); color: var(--accent-primary); }
.btn-sm { padding: 8px 12px; font-size: 12px; }
.btn-small { padding: 8px 12px; font-size: 12px; }
.btn-secondary { color: var(--text-muted); border-color: var(--border-medium); }
.btn-secondary:hover { background: var(--bg-tertiary); }
.btn-link { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; background: transparent; border: none; color: var(--accent-primary); font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; transition: all 200ms var(--ease-out); }
.btn-link:hover { color: var(--accent-secondary); text-decoration: none; text-shadow: 0 0 12px rgba(79, 140, 255, 0.25); }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-loading { opacity: 0.6; cursor: not-allowed; }

input[type="text"], input[type="password"], input[type="email"], input[type="number"], textarea, select {
    width: 100%; padding: 12px 16px; border: 1px solid var(--border-medium);
    border-radius: var(--radius-md); background: var(--bg-tertiary);
    color: var(--text-primary); font-family: var(--font-body);
    font-size: 14px; line-height: 1.4;
    transition: all 200ms var(--ease-out);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.03);
}

input:focus, textarea:focus, select:focus {
    outline: none; border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.25), inset 0 1px 2px rgba(255, 255, 255, 0.03);
    background: var(--bg-elevated);
}

input::placeholder, textarea::placeholder { color: var(--text-muted); }
input:disabled, textarea:disabled, select:disabled { opacity: 0.4; cursor: not-allowed; }

.form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.04em; }
.field .hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-actions { display: flex; gap: 12px; align-items: center; padding-top: 20px; border-top: 1px solid var(--border-subtle); }

.help-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    border-radius: 50%;
    border: 1px solid var(--border-medium);
    color: var(--text-muted);
    font-size: 11px;
    cursor: help;
    background: var(--bg-tertiary);
}

.check-list { display: grid; gap: 8px; margin-top: 8px; }
.check-item { padding: 10px 12px; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--bg-tertiary); }
.check-item.ok { border-color: rgba(16,185,129,0.35); }
.check-item.warning { border-color: rgba(245,158,11,0.35); }
.check-item.error { border-color: rgba(239,68,68,0.35); }

.k { font-size: 11px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.v { font-size: 13px; color: var(--text-primary); font-weight: 500; word-break: break-word; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; padding: 16px; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--bg-tertiary); box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.03); }

.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.table thead th { padding: 12px 16px; text-align: left; font-weight: 600; color: var(--text-muted); text-transform: uppercase; font-size: 11px; letter-spacing: 0.06em; border-bottom: 2px solid var(--border-subtle); background: var(--bg-tertiary); }
.table tbody td { padding: 12px 16px; border-bottom: 1px solid var(--border-subtle); color: var(--text-secondary); }
.table tbody tr { transition: background 200ms var(--ease-out); }
.table tbody tr:hover { background: var(--bg-tertiary); }
.table tbody tr:last-child td { border-bottom: none; }

.topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    padding: 16px 24px; background: var(--glass-bg);
    backdrop-filter: var(--blur-glass); -webkit-backdrop-filter: var(--blur-glass);
    border-bottom: 1px solid var(--border-glass);
    box-shadow: var(--shadow-card); position: sticky; top: 0; z-index: 200;
}

.brand { display: flex; align-items: baseline; gap: 12px; }
.brand h1 { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.03em; color: var(--text-primary); margin: 0; background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.brand .sub { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a, .nav-link { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--radius-md); background: transparent; color: var(--text-muted); text-decoration: none; font-size: 13px; font-weight: 600; transition: all 200ms var(--ease-out); border: 1px solid transparent; }
.nav a:hover, .nav-link:hover { background: var(--bg-tertiary); color: var(--text-primary); text-decoration: none; border-color: var(--border-subtle); }
.nav a.active, .nav-link.active { background: rgba(79, 140, 255, 0.15); color: var(--accent-primary); border-color: rgba(79, 140, 255, 0.3); box-shadow: 0 0 12px rgba(79, 140, 255, 0.25); }
.nav-link svg { width: 18px; height: 18px; flex-shrink: 0; }

.breadcrumbs { padding: 12px 24px; background: var(--bg-tertiary); border-bottom: 1px solid var(--border-subtle); font-size: 13px; }
.breadcrumbs a { color: var(--accent-primary); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.breadcrumbs a:hover { text-decoration: none; text-shadow: 0 0 8px rgba(79, 140, 255, 0.25); }
.breadcrumbs span { color: var(--text-muted); margin: 0 8px; }

.toggle-switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.toggle-switch input { display: none; }
.toggle-slider { position: relative; width: 48px; height: 26px; background: var(--bg-tertiary); border: 1px solid var(--border-medium); border-radius: 999px; transition: all 200ms var(--ease-out); box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.03); }
.toggle-slider::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: var(--text-muted); border-radius: 50%; transition: all 200ms var(--ease-spring); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); }
.toggle-switch input:checked + .toggle-slider { background: var(--gradient-primary); border-color: var(--accent-primary); box-shadow: 0 0 12px rgba(79, 140, 255, 0.25); }
.toggle-switch input:checked + .toggle-slider::after { transform: translateX(22px); background: #ffffff; }
.toggle-text { font-size: 13px; font-weight: 600; color: var(--text-muted); }

.toast-container { position: fixed; top: 100px; right: 24px; z-index: 1000; max-width: 420px; display: flex; flex-direction: column; gap: 12px; }
.toast { padding: 16px 20px; border-radius: var(--radius-md); box-shadow: var(--shadow-elevated); animation: slideIn 300ms var(--ease-out); color: var(--text-primary); font-size: 13px; font-weight: 500; border: 1px solid var(--border-subtle); display: flex; align-items: center; gap: 12px; backdrop-filter: blur(20px); }
@keyframes slideIn { from { opacity: 0; transform: translateX(400px); } to { opacity: 1; transform: translateX(0); } }
.toast-success { background: rgba(16, 185, 129, 0.12); border-left: 4px solid #10b981; box-shadow: 0 0 20px rgba(16, 185, 129, 0.25); }
.toast-error { background: rgba(239, 68, 68, 0.12); border-left: 4px solid #ef4444; box-shadow: 0 0 20px rgba(239, 68, 68, 0.25); }
.toast-warning { background: rgba(245, 158, 11, 0.12); border-left: 4px solid #f59e0b; box-shadow: 0 0 20px rgba(245, 158, 11, 0.25); }
.toast-info { background: rgba(79, 140, 255, 0.12); border-left: 4px solid var(--accent-primary); box-shadow: 0 0 20px rgba(79, 140, 255, 0.25); }
.toast-hide { animation: slideOut 300ms var(--ease-in) forwards; }
@keyframes slideOut { to { opacity: 0; transform: translateX(400px); } }

.loading-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(5, 7, 17, 0.9); backdrop-filter: blur(24px); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 9999; }
.loading-spinner { width: 56px; height: 56px; border: 3px solid var(--border-subtle); border-top-color: var(--accent-primary); border-radius: 50%; animation: spin 1s cubic-bezier(0.55, 0.085, 0.68, 0.53) infinite; box-shadow: 0 0 24px rgba(79, 140, 255, 0.25); }

.command-palette { position: fixed; inset: 0; z-index: 1500; }
.command-backdrop { position: absolute; inset: 0; background: rgba(5, 7, 17, 0.78); backdrop-filter: blur(8px); }
.command-modal { position: relative; margin: 10vh auto 0; width: min(760px, calc(100vw - 32px)); background: var(--bg-secondary); border: 1px solid var(--border-medium); border-radius: var(--radius-lg); box-shadow: var(--shadow-elevated); overflow: hidden; }
.command-head { display: flex; gap: 8px; align-items: center; padding: 12px; border-bottom: 1px solid var(--border-subtle); }
.command-results { max-height: 50vh; overflow: auto; }
.command-item { width: 100%; text-align: left; border: none; background: transparent; color: var(--text-primary); padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; border-bottom: 1px solid var(--border-subtle); }
.command-item:hover { background: var(--bg-tertiary); }

.error-drawer { position: fixed; right: 0; top: 0; height: 100vh; width: min(420px, 90vw); z-index: 1400; background: var(--bg-secondary); border-left: 1px solid var(--border-medium); box-shadow: var(--shadow-elevated); }
.error-drawer-head { padding: 12px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border-subtle); }
.error-drawer-body { padding: 12px; font-size: 13px; color: var(--text-secondary); }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { margin-top: 24px; font-size: 15px; color: var(--text-muted); font-weight: 600; letter-spacing: 0.02em; }

.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 64px; text-align: center; }
.empty-state svg { width: 96px; height: 96px; opacity: 0.15; color: var(--text-muted); }
.empty-state h3 { margin-top: 20px; font-size: 16px; font-weight: 600; color: var(--text-secondary); }
.empty-state p { margin-top: 12px; color: var(--text-muted); max-width: 400px; }
.empty-text { font-size: 14px; color: var(--text-muted); }
.empty-actions { margin-top: 24px; }

.login { max-width: 440px; margin: 12vh auto 0; animation: fadeIn 500ms var(--ease-out); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.login .card { padding: 40px; border: 1px solid var(--border-glass); box-shadow: var(--shadow-elevated), var(--shadow-glow); }
.login h1 { font-size: 28px; font-weight: 700; margin: 0 0 8px; color: var(--text-primary); background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.login h2 { font-size: 13px; font-weight: 600; margin: 0 0 32px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.error { margin-top: 16px; padding: 12px 16px; background: var(--loss-light); border: 1px solid rgba(239, 68, 68, 0.3); border-radius: var(--radius-md); color: var(--danger-primary); font-size: 13px; font-weight: 500; box-shadow: 0 0 16px rgba(239, 68, 68, 0.25); }

.hidden { display: none !important; }
.visible { display: block !important; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.p-0 { padding: 0; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }
.p-6 { padding: 24px; }

.status-enabled { color: #10b981; }
.status-disabled { color: #ef4444; }
.positive { color: var(--profit-primary); font-weight: 600; }
.negative { color: var(--loss-primary); font-weight: 600; }

.faq-item {
    margin-bottom: 8px;
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    background: var(--bg-tertiary);
    overflow: hidden;
}
.faq-item summary {
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-secondary);
    transition: background 0.2s;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "▶"; font-size: 10px; color: var(--text-muted); transition: transform 0.2s; }
.faq-item[open] summary::before { transform: rotate(90deg); }
.faq-item summary:hover { background: var(--bg-tertiary); }
.faq-answer { padding: 16px; color: var(--text-secondary); line-height: 1.6; }
.faq-answer ul, .faq-answer ol { margin: 8px 0 8px 20px; }
.faq-answer li { margin: 6px 0; }
.faq-answer code { background: var(--bg-elevated); padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }

@media (max-width: 1024px) {
    .wrap { padding: 16px; }
    .grid.two, .grid.three { grid-template-columns: 1fr; }
    .topbar { flex-direction: column; gap: 16px; }
    .nav { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 768px) {
    .wrap { padding: 12px; }
    .brand h1 { font-size: 20px; }
    .topbar { padding: 12px 16px; }
    .btn { padding: 8px 12px; font-size: 12px; }
    .toast-container { left: 12px; right: 12px; max-width: calc(100% - 24px); }
    .kv { grid-template-columns: 100px 1fr; padding: 12px; }
    .card .hd { padding: 12px 16px; }
    .card .bd { padding: 16px; }
}

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 20px rgba(79, 140, 255, 0.25); } 50% { box-shadow: 0 0 32px rgba(79, 140, 255, 0.4); } }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-glow { animation: glow 3s ease-in-out infinite; }
