/* ═══════════════════════════════════════════════════════════════
   Orderflow Agent — Professional Trading Dashboard
   Dark Glassmorphism Theme
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ─── Design Tokens ──────────────────────────────────────────── */

:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: rgba(26, 35, 50, 0.7);
    --bg-card-solid: #1a2332;
    --bg-card-hover: rgba(30, 42, 61, 0.8);
    --bg-input: #0d1321;
    --bg-sidebar: rgba(17, 24, 39, 0.95);
    --border: rgba(30, 58, 95, 0.5);
    --border-light: rgba(42, 74, 111, 0.6);
    --border-accent: rgba(0, 212, 170, 0.3);
    --text-primary: #e4e8f0;
    --text-secondary: #8899aa;
    --text-muted: #5c6b7a;
    --accent: #00d4aa;
    --accent-glow: rgba(0, 212, 170, 0.15);
    --accent-hover: #00f0c0;
    --accent-dim: rgba(0, 212, 170, 0.08);
    --danger: #ff4757;
    --danger-glow: rgba(255, 71, 87, 0.15);
    --warning: #ffa502;
    --warning-glow: rgba(255, 165, 2, 0.15);
    --success: #2ed573;
    --success-glow: rgba(46, 213, 115, 0.15);
    --blue: #1e90ff;
    --blue-glow: rgba(30, 144, 255, 0.15);
    --purple: #a855f7;
    --purple-glow: rgba(168, 85, 247, 0.15);
    --gradient-primary: linear-gradient(135deg, #00d4aa, #00b4d8);
    --gradient-danger: linear-gradient(135deg, #ff4757, #ff6348);
    --gradient-purple: linear-gradient(135deg, #a855f7, #6366f1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 30px rgba(0, 212, 170, 0.1);
    --radius: 14px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --sidebar-width: 240px;
    --header-height: 60px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset ──────────────────────────────────────────────────── */

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

html { scroll-behavior: smooth; }

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

/* Background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(0, 212, 170, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(30, 144, 255, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(168, 85, 247, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ═══════════════════════════════════════════════════════════════
   LAYOUT — Sidebar + Main Content
   ═══════════════════════════════════════════════════════════════ */

.app-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ─── Sidebar ────────────────────────────────────────────────── */

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
    transition: transform var(--transition);
}

.sidebar-logo {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo .logo-icon {
    font-size: 26px;
    filter: drop-shadow(0 0 8px rgba(0, 212, 170, 0.4));
}

.sidebar-logo h1 {
    font-size: 17px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.3px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
    transform: scaleY(0);
    transition: transform var(--transition);
}

.nav-item:hover {
    background: var(--accent-dim);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-glow);
    color: var(--accent);
    font-weight: 600;
}

.nav-item.active::before {
    transform: scaleY(1);
}

.nav-item .nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.nav-item .nav-label {
    white-space: nowrap;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

.sidebar-footer .system-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

.status-dot.warning { background: var(--warning); box-shadow: 0 0 8px var(--warning); }
.status-dot.danger { background: var(--danger); box-shadow: 0 0 8px var(--danger); }

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

/* ─── Main Content ───────────────────────────────────────────── */

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ─── Page Header ────────────────────────────────────────────── */

.page-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border);
    background: rgba(17, 24, 39, 0.5);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-header h2 {
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

/* ─── Page Body ──────────────────────────────────────────────── */

.page-body {
    flex: 1;
    padding: 24px 32px;
}

/* ═══════════════════════════════════════════════════════════════
   CARDS — Glassmorphism
   ═══════════════════════════════════════════════════════════════ */

.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    transition: all var(--transition);
    animation: fadeInUp 0.4s ease-out;
}

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

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

.card-header h3 {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.card-body {
    padding: 20px;
}

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

/* ─── Metric Cards ───────────────────────────────────────────── */

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.metric-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: all var(--transition);
    animation: fadeInUp 0.4s ease-out;
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition);
}

.metric-card:hover::before { opacity: 1; }

.metric-card .metric-icon {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
}

.metric-card .metric-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.metric-card .metric-value {
    font-size: 26px;
    font-weight: 700;
    font-family: var(--font-mono);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.metric-card .metric-sub {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ─── Stat Cards (smaller) ───────────────────────────────────── */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.stat-card {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    text-align: center;
}

.stat-card .label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-card .value {
    font-size: 20px;
    font-weight: 700;
    font-family: var(--font-mono);
}

.stat-card .value.positive { color: var(--success); }
.stat-card .value.negative { color: var(--danger); }
.stat-card .value.neutral { color: var(--blue); }

/* ═══════════════════════════════════════════════════════════════
   GRID LAYOUTS
   ═══════════════════════════════════════════════════════════════ */

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.grid-sidebar {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 24px;
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #000;
}

.btn-primary:hover {
    box-shadow: 0 4px 20px var(--accent-glow);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary.btn-full { width: 100%; }

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-danger {
    background: var(--danger-glow);
    color: var(--danger);
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.btn-danger:hover {
    background: var(--danger);
    color: #fff;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
}

.btn-icon {
    padding: 8px;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
}

/* ═══════════════════════════════════════════════════════════════
   FORM CONTROLS
   ═══════════════════════════════════════════════════════════════ */

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

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font);
    outline: none;
    transition: all var(--transition);
}

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

.form-input.mono {
    font-family: var(--font-mono);
    font-size: 13px;
}

.form-input-sm {
    padding: 8px 12px;
    font-size: 13px;
}

select.form-input {
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238899aa' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

/* Toggle Switch */
.toggle-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle {
    position: relative;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 2px;
    bottom: 2px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: all var(--transition);
}

.toggle input:checked + .toggle-slider {
    background: var(--accent-glow);
    border-color: var(--accent);
}

.toggle input:checked + .toggle-slider::before {
    background: var(--accent);
    transform: translateX(20px);
}

/* ─── Search ─────────────────────────────────────────────────── */

.search-box {
    position: relative;
    margin-bottom: 12px;
}

.search-box input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font);
    outline: none;
    transition: border-color var(--transition);
}

.search-box input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-box .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════════
   SYMBOL LIST + CHECKBOXES
   ═══════════════════════════════════════════════════════════════ */

.symbol-list {
    max-height: 420px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.symbol-list::-webkit-scrollbar { width: 5px; }
.symbol-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.symbol-item {
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    margin: 2px 0;
    transition: all 0.2s;
}

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

.symbol-item.active {
    background: var(--accent-glow);
    border: 1px solid rgba(0, 212, 170, 0.3);
}

.symbol-item .name {
    font-weight: 500;
    font-size: 14px;
    font-family: var(--font-mono);
    flex: 1;
}

.symbol-item .base {
    color: var(--text-secondary);
    font-size: 12px;
}

.symbol-count {
    font-size: 12px;
    color: var(--text-muted);
    padding: 4px 10px;
    background: var(--bg-input);
    border-radius: 20px;
    font-family: var(--font-mono);
}

/* Custom Checkbox */
.custom-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    flex-shrink: 0;
    cursor: pointer;
}

.custom-checkbox.checked {
    background: var(--accent);
    border-color: var(--accent);
}

.custom-checkbox.checked::after {
    content: '✓';
    color: #000;
    font-size: 12px;
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════
   DATA SOURCES
   ═══════════════════════════════════════════════════════════════ */

.source-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.source-item:last-child { border-bottom: none; }

.source-icon { font-size: 20px; }

.source-info { flex: 1; }
.source-name { font-weight: 500; font-size: 14px; }
.source-note { font-size: 12px; color: var(--text-secondary); }

.source-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.source-badge.available { background: var(--success-glow); color: var(--success); }
.source-badge.unavailable { background: var(--danger-glow); color: var(--danger); }
.source-badge.unknown { background: rgba(255,193,7,0.15); color: #ffc107; }
.source-badge.error { background: rgba(255,87,34,0.15); color: #ff5722; }

/* ═══════════════════════════════════════════════════════════════
   PROGRESS BAR
   ═══════════════════════════════════════════════════════════════ */

.progress-container { margin: 12px 0; }

.progress-bar-bg {
    width: 100%;
    height: 6px;
    background: var(--bg-input);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 40px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.progress-pct {
    color: var(--accent);
    font-weight: 600;
    font-family: var(--font-mono);
}

/* Batch Progress Item */
.batch-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.batch-item:last-child { border-bottom: none; }

.batch-item .batch-symbol {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 13px;
    width: 100px;
}

.batch-item .batch-bar { flex: 1; }

.batch-item .batch-status {
    font-size: 12px;
    color: var(--text-secondary);
    width: 80px;
    text-align: right;
}

.batch-item .batch-status.done { color: var(--success); }
.batch-item .batch-status.error { color: var(--danger); }
.batch-item .batch-status.running { color: var(--accent); }

/* ═══════════════════════════════════════════════════════════════
   RESULTS TABLE
   ═══════════════════════════════════════════════════════════════ */

.results-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.results-table th {
    padding: 10px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg-card-solid);
}

.results-table td {
    padding: 12px 14px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-mono);
}

.results-table tr:hover td { background: var(--bg-card-hover); }

.results-table .positive { color: var(--success); }
.results-table .negative { color: var(--danger); }

/* ═══════════════════════════════════════════════════════════════
   LIVE TRADING DASHBOARD
   ═══════════════════════════════════════════════════════════════ */

/* ─── Control Bar ────────────────────────────────────────────── */

.live-control-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 20px;
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.live-control-bar .control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-control-bar .control-separator {
    width: 1px;
    height: 24px;
    background: var(--border);
    flex-shrink: 0;
}

.live-control-bar .control-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

.live-control-bar .control-value {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.live-control-bar .control-value.accent { color: var(--accent); }

.control-btn {
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.control-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

.control-btn.active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
}

.control-btn.danger:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: var(--danger-glow);
}

/* ─── 3-Column Layout ────────────────────────────────────────── */

.live-layout {
    display: grid;
    grid-template-columns: 220px 1fr 280px;
    gap: 0;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* ─── Coin Sidebar ───────────────────────────────────────────── */

.live-coin-sidebar {
    background: rgba(17, 24, 39, 0.5);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.live-coin-header {
    padding: 14px 14px 10px;
    border-bottom: 1px solid var(--border);
}

.live-coin-header h4 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.live-coin-header .coin-count {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.live-coin-search {
    width: 100%;
    padding: 7px 10px 7px 30px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 12px;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.2s;
}

.live-coin-search:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.live-coin-search-wrap {
    position: relative;
}

.live-coin-search-wrap .search-icon {
    position: absolute;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 12px;
    pointer-events: none;
}

.live-coin-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.live-coin-list::-webkit-scrollbar { width: 4px; }
.live-coin-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.live-coin-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    margin-bottom: 2px;
    position: relative;
}

.live-coin-item:hover { background: var(--bg-card-hover); }

.live-coin-item.selected {
    background: var(--accent-glow);
    border: 1px solid rgba(0, 212, 170, 0.25);
}

.live-coin-item .coin-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.live-coin-item .coin-status-dot.connected { background: var(--success); box-shadow: 0 0 6px var(--success); }
.live-coin-item .coin-status-dot.warming { background: var(--warning); box-shadow: 0 0 6px var(--warning); animation: pulse 2s infinite; }
.live-coin-item .coin-status-dot.disconnected { background: var(--text-muted); }

.live-coin-item .coin-name {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-coin-item .coin-price {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-secondary);
    text-align: right;
}

.live-coin-item .coin-price.up { color: var(--success); }
.live-coin-item .coin-price.down { color: var(--danger); }

/* ─── Chart Area ─────────────────────────────────────────────── */

.live-chart-area {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.live-chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: rgba(13, 19, 33, 0.6);
    flex-wrap: wrap;
    gap: 8px;
}

.live-chart-header .chart-symbol {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-chart-header .chart-price-lg {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.live-chart-header .chart-change {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 6px;
}

.live-chart-header .chart-change.up { background: var(--success-glow); color: var(--success); }
.live-chart-header .chart-change.down { background: var(--danger-glow); color: var(--danger); }

.live-chart-badges {
    display: flex;
    gap: 6px;
    align-items: center;
}

.live-chart-badges .lcb {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    font-family: var(--font-mono);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.live-chart-badges .lcb.accent { border-color: rgba(0,212,170,0.3); color: var(--accent); background: var(--accent-dim); }
.live-chart-badges .lcb.blue { border-color: rgba(30,144,255,0.3); color: var(--blue); background: var(--blue-glow); }

#liveChartContainer {
    flex: 1;
    min-height: 350px;
    background: #0d1117;
    position: relative;
}

.live-chart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 350px;
    color: var(--text-muted);
    gap: 10px;
    text-align: center;
    padding: 20px;
}

.live-chart-empty .empty-icon { font-size: 40px; opacity: 0.5; }
.live-chart-empty .empty-title { font-size: 15px; font-weight: 600; color: var(--text-secondary); }
.live-chart-empty .empty-hint { font-size: 12px; max-width: 300px; }

/* Live candle details strip beneath chart */
.live-candle-strip {
    display: flex;
    gap: 16px;
    padding: 8px 16px;
    background: rgba(13, 19, 33, 0.8);
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    align-items: center;
    font-size: 11px;
    font-family: var(--font-mono);
}

.live-candle-strip .strip-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.live-candle-strip .strip-label { color: var(--text-muted); }
.live-candle-strip .strip-value { color: var(--text-primary); font-weight: 600; }
.live-candle-strip .strip-value.bull { color: var(--success); }
.live-candle-strip .strip-value.bear { color: var(--danger); }
.live-candle-strip .strip-value.timeout { color: var(--warning); }

/* ─── Signal Panel ───────────────────────────────────────────── */

.live-signal-panel {
    background: rgba(17, 24, 39, 0.5);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.live-signal-header {
    padding: 14px 14px 10px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.live-signal-header h4 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.live-signal-header .signal-count-badge {
    font-family: var(--font-mono);
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 10px;
    background: var(--purple-glow);
    color: var(--purple);
    font-weight: 600;
}

.live-signal-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.live-signal-list::-webkit-scrollbar { width: 4px; }
.live-signal-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.live-signal-entry {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 6px;
    background: var(--bg-card);
    transition: all 0.2s;
    animation: fadeInUp 0.3s ease-out;
}

.live-signal-entry:hover {
    border-color: var(--border-light);
    background: var(--bg-card-hover);
}

.live-signal-entry.flash {
    animation: signalFlash 0.6s ease;
}

.live-signal-entry .sig-top {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.live-signal-entry .sig-dir {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 3px;
    text-transform: uppercase;
}

.live-signal-entry .sig-dir.long { background: var(--success-glow); color: var(--success); }
.live-signal-entry .sig-dir.short { background: var(--danger-glow); color: var(--danger); }

.live-signal-entry .sig-symbol {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    flex: 1;
}

.live-signal-entry .sig-score {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
}

.live-signal-entry .sig-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
}

.live-signal-entry .sig-strategy {
    font-size: 11px;
    color: var(--text-secondary);
}

.live-signal-entry .sig-time {
    font-family: var(--font-mono);
    font-size: 10px;
}

.live-signal-empty {
    text-align: center;
    padding: 40px 16px;
    color: var(--text-muted);
    font-size: 13px;
}

.live-signal-empty .empty-icon {
    font-size: 32px;
    opacity: 0.4;
    margin-bottom: 8px;
}

/* ─── Data Manager Modal ─────────────────────────────────────── */

.dm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}

.dm-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.dm-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 640px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: modalSlideUp 0.3s ease-out;
}

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

.dm-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
}

.dm-modal-header h3 {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dm-close {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.dm-close:hover { border-color: var(--danger); color: var(--danger); }

.dm-section {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
}

.dm-section:last-child { border-bottom: none; }

.dm-section h4 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.dm-exchange-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(30, 58, 95, 0.25);
    font-size: 13px;
}

.dm-exchange-row:last-child { border-bottom: none; }

.dm-exchange-row .exch-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dm-exchange-row .exch-dot.on { background: var(--success); box-shadow: 0 0 6px var(--success); }
.dm-exchange-row .exch-dot.off { background: var(--text-muted); }

.dm-exchange-row .exch-name {
    font-weight: 600;
    flex: 1;
}

.dm-exchange-row .exch-status {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.dm-alert-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--danger-glow);
    border: 1px solid rgba(255, 71, 87, 0.2);
    margin-bottom: 8px;
    font-size: 12px;
}

.dm-alert-row .alert-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.dm-alert-row .alert-text { flex: 1; color: var(--text-primary); }
.dm-alert-row .alert-time { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); white-space: nowrap; }

.dm-no-alerts {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 13px;
}

/* ─── Reconnect Banner ───────────────────────────────────────── */

.live-reconnect-banner {
    display: none;
    text-align: center;
    padding: 10px 20px;
    background: var(--warning-glow);
    border-bottom: 1px solid rgba(255, 165, 2, 0.3);
    font-size: 13px;
    color: var(--warning);
    font-weight: 600;
}

.live-reconnect-banner.visible { display: block; }

/* ─── Live Layout Responsive ─────────────────────────────────── */

@media (max-width: 1200px) {
    .live-layout {
        grid-template-columns: 180px 1fr;
    }
    .live-signal-panel {
        display: none;
    }
}

@media (max-width: 768px) {
    .live-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }
    .live-coin-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border);
        max-height: 140px;
    }
    .live-coin-list {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 6px;
        gap: 4px;
    }
    .live-coin-item {
        flex-shrink: 0;
        min-width: 110px;
    }
    .live-signal-panel { display: none; }
    .live-control-bar { padding: 8px 12px; }
}

/* ═══════════════════════════════════════════════════════════════
   SIGNALS LOG
   ═══════════════════════════════════════════════════════════════ */

.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 16px 20px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.filter-bar .form-input {
    width: auto;
    min-width: 140px;
}

.filter-bar .filter-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.signal-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

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

.signal-row .signal-dir {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    min-width: 60px;
    text-align: center;
}

.signal-row .signal-dir.long { background: var(--success-glow); color: var(--success); }
.signal-row .signal-dir.short { background: var(--danger-glow); color: var(--danger); }

.signal-row .signal-symbol {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 14px;
    min-width: 100px;
}

.signal-row .signal-strategy {
    font-size: 13px;
    color: var(--text-secondary);
    flex: 1;
}

.signal-row .signal-score {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
}

.signal-row .signal-time {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    min-width: 130px;
    text-align: right;
}

.signal-row .signal-outcome {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    min-width: 70px;
    text-align: center;
}

.signal-outcome.win { background: var(--success-glow); color: var(--success); }
.signal-outcome.loss { background: var(--danger-glow); color: var(--danger); }
.signal-outcome.pending { background: var(--warning-glow); color: var(--warning); }

/* ═══════════════════════════════════════════════════════════════
   SETTINGS PAGE
   ═══════════════════════════════════════════════════════════════ */

.settings-section {
    margin-bottom: 24px;
}

.settings-section .section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    gap: 16px;
}

.settings-row:last-child { border-bottom: none; }

.settings-row .settings-label {
    font-size: 14px;
    font-weight: 500;
    min-width: 140px;
}

.settings-row .settings-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.settings-row .settings-value {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: flex-end;
}

.api-key-display {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-muted);
    background: var(--bg-input);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    min-width: 160px;
    text-align: center;
}

.api-key-display.set { color: var(--success); }

.symbol-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.symbol-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--text-primary);
}

.symbol-tag .remove-tag {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1;
}

.symbol-tag .remove-tag:hover { color: var(--danger); }

/* ═══════════════════════════════════════════════════════════════
   TAGS & BADGES
   ═══════════════════════════════════════════════════════════════ */

.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-mono);
}

.tag-win { background: var(--success-glow); color: var(--success); }
.tag-loss { background: var(--danger-glow); color: var(--danger); }
.tag-pending { background: var(--warning-glow); color: var(--warning); }
.tag-info { background: var(--blue-glow); color: var(--blue); }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-success { background: var(--success-glow); color: var(--success); }
.badge-warning { background: var(--warning-glow); color: var(--warning); }
.badge-danger { background: var(--danger-glow); color: var(--danger); }
.badge-info { background: var(--blue-glow); color: var(--blue); }

/* ═══════════════════════════════════════════════════════════════
   LOADING STATES
   ═══════════════════════════════════════════════════════════════ */

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-text {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    justify-content: center;
    padding: 30px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state p { font-size: 14px; }

/* Skeleton loader */
.skeleton {
    background: linear-gradient(90deg, var(--bg-input) 25%, var(--bg-card-hover) 50%, var(--bg-input) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

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

/* ═══════════════════════════════════════════════════════════════
   TOAST NOTIFICATION
   ═══════════════════════════════════════════════════════════════ */

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 20px;
    background: var(--bg-card-solid);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--blue); }

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

/* ═══════════════════════════════════════════════════════════════
   DETAIL PANEL
   ═══════════════════════════════════════════════════════════════ */

.detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.detail-symbol {
    font-size: 24px;
    font-weight: 700;
    font-family: var(--font-mono);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.detail-meta {
    color: var(--text-secondary);
    font-size: 13px;
}

/* ═══════════════════════════════════════════════════════════════
   QUICK ACTION CARDS
   ═══════════════════════════════════════════════════════════════ */

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.quick-action {
    padding: 16px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
}

.quick-action:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.quick-action .qa-icon {
    font-size: 28px;
    display: block;
    margin-bottom: 8px;
}

.quick-action .qa-label {
    font-size: 13px;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════
   TERMINAL LOG PANEL
   ═══════════════════════════════════════════════════════════════ */

.terminal-container {
    max-height: 360px;
    overflow: hidden;
    border-top: 1px solid var(--border);
}

.terminal {
    background: #0d1117;
    color: #c9d1d9;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.6;
    padding: 16px;
    margin: 0;
    max-height: 360px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.terminal::-webkit-scrollbar {
    width: 6px;
}

.terminal::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 3px;
}

.terminal .log-error { color: #f85149; }
.terminal .log-warn { color: #d29922; }
.terminal .log-success { color: #3fb950; }
.terminal .log-info { color: #8b949e; }

/* ═══════════════════════════════════════════════════════════════
   SCORE DISTRIBUTION BARS
   ═══════════════════════════════════════════════════════════════ */

.score-distribution {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.score-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.score-bar-label {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 50px;
    text-align: right;
}

.score-bar-track {
    flex: 1;
    height: 8px;
    background: var(--bg-input);
    border-radius: 4px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.score-bar-count {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 35px;
    text-align: left;
}

/* ═══════════════════════════════════════════════════════════════
   PERIOD INPUTS
   ═══════════════════════════════════════════════════════════════ */

.period-inputs {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.tag-neutral { background: var(--bg-input); color: var(--text-secondary); }
.gap-8 { gap: 8px; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE
   ═══════════════════════════════════════════════════════════════ */

/* Mobile bottom tab bar */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    z-index: 200;
    padding: 6px 0 env(safe-area-inset-bottom, 6px) 0;
}

.mobile-nav-inner {
    display: flex;
    justify-content: space-around;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 12px;
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 500;
    text-decoration: none;
    transition: color var(--transition);
    min-width: 56px;
}

.mobile-nav-item .mob-icon { font-size: 20px; }

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

@media (max-width: 768px) {
    .sidebar { display: none; }
    .mobile-nav { display: block; }

    .main-content {
        margin-left: 0;
        padding-bottom: 72px;
    }

    .page-header {
        padding: 16px 16px;
    }

    .page-header h2 { font-size: 18px; }

    .page-body { padding: 16px; }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .metric-card { padding: 14px; }
    .metric-card .metric-value { font-size: 20px; }

    .grid-2,
    .grid-sidebar { grid-template-columns: 1fr; }

    .grid-3 { grid-template-columns: 1fr; }

    .live-grid { grid-template-columns: 1fr; }

    .live-card .live-price { font-size: 22px; }

    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-bar .form-input { width: 100%; min-width: unset; }

    .signal-row {
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px 14px;
    }

    .signal-row .signal-strategy { min-width: 100%; order: 5; }

    .settings-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .settings-row .settings-value {
        width: 100%;
        justify-content: flex-start;
    }

    .quick-actions { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .metrics-grid { grid-template-columns: 1fr; }
    .quick-actions { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════ */

.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--text-muted); }
.text-mono { font-family: var(--font-mono); }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.gap-12 { gap: 12px; }
.d-flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

/* ═══════════════════════════════════════════════════════════════
   TRACK C ADDITIONS — WebSocket, Signal Flash, Symbol Tags
   ═══════════════════════════════════════════════════════════════ */

@keyframes signalFlash {
    0% { border-color: var(--accent); box-shadow: 0 0 20px var(--accent-glow); }
    100% { border-color: var(--border); box-shadow: none; }
}

.symbol-tag-remove {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1;
    transition: color var(--transition);
}
.symbol-tag-remove:hover { color: var(--danger); }

.badge-secondary {
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

/* Range slider styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: var(--bg-input);
    border-radius: 3px;
    outline: none;
    border: 1px solid var(--border);
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 6px var(--accent-glow);
    transition: transform 0.15s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}
