/* ═══════════════════════════════════════════════════════════════
   NeuroTrade Design System — Premium Dark Mode
   ═══════════════════════════════════════════════════════════════ */

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

/* ── CSS Variables ──────────────────────────────────────────── */
:root {
    --bg: #060a13;
    --surface: #0d1321;
    --card: #131a2e;
    --card-hover: #1a2340;
    --border: rgba(99, 179, 237, 0.08);
    --border-hover: rgba(99, 179, 237, 0.18);

    --primary: linear-gradient(135deg, #667eea, #764ba2);
    --primary-solid: #667eea;
    --accent: #63b3ed;
    --success: #38db83; /* Brighter, more vibrant green for dark mode */
    --danger: #ff5c5c;  /* More vibrant red */
    --warning: #f6ad55;

    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --radius-pill: 999px;
    --sidebar-width: 240px;
    --transition: 0.2s ease;
}

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

html { font-size: 14px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: #90cdf4; }

/* ── Custom Scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(99, 179, 237, 0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(99, 179, 237, 0.25); }

/* ── Layout ─────────────────────────────────────────────────── */
.layout {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(13, 19, 33, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 20px 18px;
    text-decoration: none;
    color: var(--text);
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.03em;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}

.logo-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.sidebar-nav {
    flex: 1;
    padding: 4px 0;
}

.nav-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 16px 20px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    margin: 2px 10px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
    position: relative;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    color: var(--text);
    background: rgba(99, 179, 237, 0.06);
}

.nav-item.active {
    color: var(--accent);
    background: rgba(99, 179, 237, 0.08);
    border-left-color: var(--accent);
    font-weight: 600;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 18px;
    background: var(--accent);
    border-radius: 3px 0 0 3px;
}

.nav-icon {
    font-size: 1.05rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

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

.user-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #fff;
    font-weight: 700;
}

.user-name { font-size: 0.85rem; font-weight: 600; }
.user-role { font-size: 0.72rem; color: var(--text-muted); }

/* ── Main Content ───────────────────────────────────────────── */
.main {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 28px 32px;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Page Header ────────────────────────────────────────────── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-title {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.page-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.live-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--success);
    margin-right: 6px;
    animation: pulse-glow 1.8s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(72, 187, 120, 0.4);
}

/* ── Status Grid ────────────────────────────────────────────── */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

/* ── Stat Card ──────────────────────────────────────────────── */
.stat-card {
    background: rgba(19, 26, 46, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition);
}

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

.stat-card:hover {
    border-color: var(--border-hover);
    background: var(--card-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

.stat-card.accent-green::before { background: var(--success); opacity: 1; }
.stat-card.accent-blue::before { background: var(--accent); opacity: 1; }
.stat-card.accent-purple::before { background: linear-gradient(135deg, #667eea, #764ba2); opacity: 1; }
.stat-card.accent-red::before { background: var(--danger); opacity: 1; }
.stat-card.accent-amber::before { background: var(--warning); opacity: 1; }

.stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.stat-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ── Panel ──────────────────────────────────────────────────── */
.panel {
    background: rgba(19, 26, 46, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-bottom: 20px;
    transition: border-color var(--transition);
}

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

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.panel-title {
    font-size: 1.05rem;
    font-weight: 700;
}

.panel-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ── Hero Metric ────────────────────────────────────────────── */
.hero-metric {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, #667eea, #63b3ed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.hero-metric.success {
    background: linear-gradient(135deg, #48bb78, #38a169);
    -webkit-background-clip: text;
    background-clip: text;
}

.hero-metric.danger {
    background: linear-gradient(135deg, #fc8181, #e53e3e);
    -webkit-background-clip: text;
    background-clip: text;
}

/* ── Buttons ────────────────────────────────────────────────── */
.controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.btn {
    padding: 9px 18px;
    border: none;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    outline: none;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none !important;
}

.btn:active:not(:disabled) { transform: scale(0.97); }

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.25);
}
.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
}

.btn-success {
    background: rgba(72, 187, 120, 0.12);
    color: var(--success);
    border: 1px solid rgba(72, 187, 120, 0.25);
}
.btn-success:hover:not(:disabled) {
    background: rgba(72, 187, 120, 0.2);
    transform: translateY(-1px);
}

.btn-danger {
    background: rgba(252, 129, 129, 0.12);
    color: var(--danger);
    border: 1px solid rgba(252, 129, 129, 0.25);
}
.btn-danger:hover:not(:disabled) {
    background: rgba(252, 129, 129, 0.2);
    transform: translateY(-1px);
}

.btn-ghost {
    background: rgba(99, 179, 237, 0.06);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.btn-ghost:hover:not(:disabled) {
    color: var(--text);
    background: rgba(99, 179, 237, 0.12);
    border-color: var(--border-hover);
}

.btn-amber {
    background: rgba(246, 173, 85, 0.12);
    color: var(--warning);
    border: 1px solid rgba(246, 173, 85, 0.25);
}
.btn-amber:hover:not(:disabled) {
    background: rgba(246, 173, 85, 0.2);
    transform: translateY(-1px);
}

.btn-sm { padding: 6px 12px; font-size: 0.75rem; }
.btn-lg { padding: 12px 28px; font-size: 0.92rem; }

/* ── Market Card ────────────────────────────────────────────── */
.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.market-card {
    background: rgba(19, 26, 46, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    transition: all var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.market-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.04), transparent);
    pointer-events: none;
}

.market-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.mc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.mc-symbol { font-size: 1rem; font-weight: 700; }

.mc-change {
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 700;
}

.mc-change.positive { background: rgba(72, 187, 120, 0.12); color: var(--success); }
.mc-change.negative { background: rgba(252, 129, 129, 0.12); color: var(--danger); }

.mc-price {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.mc-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.mc-stat {
    background: rgba(6, 10, 19, 0.5);
    border-radius: var(--radius-xs);
    padding: 6px 10px;
}

.mc-stat-label { font-size: 0.65rem; color: var(--text-muted); margin-bottom: 1px; }
.mc-stat-value { font-size: 0.82rem; font-weight: 600; }

/* ── Signal Badge ───────────────────────────────────────────── */
.signal-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.signal-badge.buy, .signal-badge.long {
    background: linear-gradient(135deg, rgba(56, 219, 131, 0.2), rgba(56, 219, 131, 0.05));
    color: #4ade80;
    border: 1px solid rgba(56, 219, 131, 0.4);
    box-shadow: 0 0 10px rgba(56, 219, 131, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.signal-badge.sell, .signal-badge.short {
    background: linear-gradient(135deg, rgba(255, 92, 92, 0.2), rgba(255, 92, 92, 0.05));
    color: #ff7676;
    border: 1px solid rgba(255, 92, 92, 0.4);
    box-shadow: 0 0 10px rgba(255, 92, 92, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.signal-badge.hold, .signal-badge.neutral {
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.15), rgba(148, 163, 184, 0.05));
    color: var(--text-secondary);
    border: 1px solid rgba(148, 163, 184, 0.3);
}

/* ── Data Table ─────────────────────────────────────────────── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.data-table thead th {
    text-align: left;
    padding: 10px 14px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table tbody tr {
    transition: background var(--transition);
}

.data-table tbody tr:nth-child(even) {
    background: rgba(6, 10, 19, 0.3);
}

.data-table tbody tr:hover {
    background: rgba(99, 179, 237, 0.04);
}

.data-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(99, 179, 237, 0.04);
    white-space: nowrap;
}

.data-table .positive { color: #4ade80; font-weight: 600; }
.data-table .negative { color: #ff7676; font-weight: 600; }
.data-table .neutral { color: var(--text-muted); }

/* ── Feature Bar (Heatmap) ──────────────────────────────────── */
.feature-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.feature-bar-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    width: 100px;
    flex-shrink: 0;
    text-align: right;
}

.feature-bar-track {
    flex: 1;
    height: 8px;
    background: rgba(99, 179, 237, 0.06);
    border-radius: 4px;
    overflow: hidden;
}

.feature-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
    background: linear-gradient(90deg, #667eea, #63b3ed);
}

.feature-bar-value {
    font-size: 0.7rem;
    color: var(--text-secondary);
    width: 45px;
    text-align: right;
    flex-shrink: 0;
}

/* ── Sparkline Container ────────────────────────────────────── */
.sparkline-container {
    display: inline-block;
    vertical-align: middle;
    line-height: 0;
}

.sparkline-container svg {
    overflow: visible;
}

/* ── Toast Notifications ────────────────────────────────────── */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
}

.toast {
    background: rgba(19, 26, 46, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 18px;
    font-size: 0.82rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideUp 0.3s ease;
    min-width: 260px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.toast.success { border-color: rgba(72, 187, 120, 0.3); color: var(--success); }
.toast.error   { border-color: rgba(252, 129, 129, 0.3); color: var(--danger); }
.toast.warning { border-color: rgba(246, 173, 85, 0.3); color: var(--warning); }
.toast.info    { border-color: rgba(99, 179, 237, 0.3); color: var(--accent); }

.toast-exit {
    animation: fadeOut 0.25s ease forwards;
}

/* ── Form Elements ──────────────────────────────────────────── */
input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text);
    font-family: inherit;
    font-size: 0.85rem;
    transition: all var(--transition);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-solid);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}

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

.form-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
}

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

.toggle-switch {
    width: 44px;
    height: 24px;
    background: rgba(113, 128, 150, 0.3);
    border: 1px solid var(--border);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: all var(--transition);
    flex-shrink: 0;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    top: 2px;
    left: 3px;
    transition: left var(--transition);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch.active {
    background: var(--success);
    border-color: var(--success);
}

.toggle-switch.active::after {
    left: 22px;
}

.toggle-label {
    font-size: 0.85rem;
    font-weight: 500;
}

/* ── Settings-specific ──────────────────────────────────────── */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 820px;
}

.setting-group {
    margin-bottom: 14px;
}

.setting-group:last-child { margin-bottom: 0; }

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(99, 179, 237, 0.04);
}

.setting-name { font-size: 0.88rem; font-weight: 600; }
.setting-desc { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

/* ── Log Viewer ─────────────────────────────────────────────── */
.log-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    padding: 14px 16px;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 0.75rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.log-entry {
    padding: 2px 0;
    border-bottom: 1px solid rgba(99, 179, 237, 0.03);
}

.log-entry.info  { color: var(--accent); }
.log-entry.buy   { color: var(--success); }
.log-entry.sell  { color: var(--danger); }
.log-entry.warn  { color: var(--warning); }
.log-entry.error { color: var(--danger); }

/* ── Utility Classes ────────────────────────────────────────── */
.text-success { color: var(--success) !important; }
.text-danger  { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-accent  { color: var(--accent) !important; }
.text-muted   { color: var(--text-muted) !important; }
.text-secondary { color: var(--text-secondary) !important; }

.positive { color: var(--success); }
.negative { color: var(--danger); }
.neutral  { color: var(--text-muted); }

.gradient-text {
    background: linear-gradient(135deg, #667eea, #63b3ed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: 6px; }
.gap-md { gap: 12px; }
.gap-lg { gap: 20px; }
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 24px; }
.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 16px; }
.mb-lg { margin-bottom: 24px; }

/* ── Confidence Bar ─────────────────────────────────────────── */
.confidence-bar {
    width: 100%;
    height: 10px;
    background: rgba(99, 179, 237, 0.08);
    border-radius: 5px;
    overflow: hidden;
    margin-top: 8px;
}

.confidence-fill {
    height: 100%;
    border-radius: 5px;
    background: linear-gradient(90deg, #667eea, #48bb78);
    transition: width 0.5s ease;
}

/* ── Empty State ────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state-icon { font-size: 2.5rem; margin-bottom: 12px; }
.empty-state-text { font-size: 0.9rem; }

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

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

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

@keyframes pulse-glow {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(72, 187, 120, 0.4); }
    50%      { opacity: 0.4; box-shadow: 0 0 4px rgba(72, 187, 120, 0.2); }
}

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

.animate-in {
    animation: fadeIn 0.4s ease, slideUp 0.4s ease;
}

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

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .main {
        margin-left: 0;
        padding: 16px;
    }

    .status-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

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

    .page-title {
        font-size: 1.3rem;
    }

    .hero-metric {
        font-size: 2rem;
    }

    .data-table {
        font-size: 0.75rem;
    }

    .data-table thead th,
    .data-table tbody td {
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .status-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .controls .btn {
        width: 100%;
        justify-content: center;
    }
}
