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

/* ===== Design Tokens ===== */
:root {
    --bg-primary: #060a13;
    --bg-secondary: #0c1220;
    --bg-card: #111a2e;
    --bg-card-hover: #162036;
    --bg-input: #0a1020;
    --bg-surface: #131d33;

    --accent: #00d4ff;
    --accent-secondary: #7c3aed;
    --accent-dim: #0ea5e9;
    --accent-glow: rgba(0, 212, 255, 0.12);
    --accent-gradient: linear-gradient(135deg, #00d4ff, #7c3aed);

    --profit: #10b981;
    --profit-light: #34d399;
    --profit-bg: rgba(16, 185, 129, 0.12);
    --loss: #ef4444;
    --loss-light: #f87171;
    --loss-bg: rgba(239, 68, 68, 0.12);

    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-accent: #38bdf8;

    --border: #1e293b;
    --border-light: #2d3a52;
    --border-accent: rgba(0, 212, 255, 0.2);

    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 30px rgba(0, 212, 255, 0.1);

    --glass-bg: rgba(17, 26, 46, 0.65);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-blur: 20px;

    --transition-fast: all 0.15s ease;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

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

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(0, 212, 255, 0.03) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(124, 58, 237, 0.03) 0%, transparent 60%);
}

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

/* ===== Typography ===== */
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; }
.mono { font-family: var(--font-mono); }

/* ===== Header ===== */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 60px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--accent-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.25);
}

.logo-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    background: var(--accent-glow);
    color: var(--accent);
    border: 1px solid var(--border-accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

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

/* ===== Dashboard Layout ===== */
.dashboard {
    display: grid;
    grid-template-columns: 280px 1fr 300px;
    grid-template-rows: 1fr auto;
    gap: 0;
    height: calc(100vh - 60px);
}

/* ===== Config Panel (Left Sidebar) ===== */
.config-panel {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.panel-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: var(--transition);
}

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

.panel-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-section-title .icon {
    font-size: 0.85rem;
}

/* ===== Form Controls ===== */
.form-group {
    margin-bottom: 12px;
}

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

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

.form-input, .form-select {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    transition: var(--transition-fast);
    outline: none;
}

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

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

/* ===== Toggle Switch ===== */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
}

.toggle-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.toggle {
    position: relative;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--border-light);
    border-radius: 22px;
    transition: var(--transition);
}

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

.toggle input:checked + .toggle-slider {
    background: var(--accent);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.3);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(18px);
    background: white;
}

/* ===== Range Slider ===== */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    outline: none;
    margin: 8px 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
    transition: var(--transition-fast);
}

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

.range-value {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent);
    font-weight: 600;
    text-align: right;
}

/* ===== Buttons ===== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.02em;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.25);
    width: 100%;
    padding: 12px 20px;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 212, 255, 0.35);
}

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

.btn-primary.running {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    animation: pulse-glow 1.5s ease-in-out infinite;
}

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

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

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

/* ===== Main Content Area ===== */
.main-content {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-primary);
}

.chart-container {
    flex: 1;
    position: relative;
    min-height: 0;
    border-bottom: 1px solid var(--border);
}

.chart-container canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.chart-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    min-height: 40px;
}

.chart-toolbar-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chart-toolbar .btn-sm {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: var(--radius-xs);
    padding: 4px 10px;
    font-size: 0.72rem;
}

.chart-toolbar .btn-sm:hover,
.chart-toolbar .btn-sm.active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
}

.chart-info {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ===== Trade Log ===== */
.trade-log-container {
    height: 200px;
    overflow-y: auto;
    background: var(--bg-secondary);
}

.trade-log-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 5;
}

.trade-log-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.trade-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

.trade-table th {
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 2;
}

.trade-table td {
    padding: 7px 12px;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 0.73rem;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.trade-table tr:hover td {
    background: var(--bg-card);
    color: var(--text-primary);
}

.trade-table .win { color: var(--profit-light); }
.trade-table .loss { color: var(--loss-light); }
.trade-table .breakeven { color: var(--text-muted); }

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-long {
    background: var(--profit-bg);
    color: var(--profit-light);
}

.badge-short {
    background: var(--loss-bg);
    color: var(--loss-light);
}

.badge-win {
    background: var(--profit-bg);
    color: var(--profit);
}

.badge-loss {
    background: var(--loss-bg);
    color: var(--loss);
}

.badge-be {
    background: rgba(100, 116, 139, 0.15);
    color: var(--text-muted);
}

/* ===== Stats Panel (Right Sidebar) ===== */
.stats-panel {
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stats-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

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

.stat-card:hover {
    border-color: var(--border-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

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

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

.stat-card-value {
    font-family: var(--font-mono);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-card-value.positive { color: var(--profit-light); }
.stat-card-value.negative { color: var(--loss-light); }
.stat-card-value.accent { color: var(--accent); }

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

.stat-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

/* ===== Equity Chart ===== */
.equity-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-top: 4px;
}

.equity-container canvas {
    width: 100%;
    height: 120px;
    display: block;
}

/* ===== Monthly Returns Heatmap ===== */
.heatmap-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px;
}

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

.heatmap-cell {
    text-align: center;
    padding: 6px 4px;
    border-radius: var(--radius-xs);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    transition: var(--transition-fast);
}

/* ===== Empty / Loading States ===== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    gap: 12px;
    padding: 40px;
}

.empty-state-icon {
    font-size: 3rem;
    opacity: 0.3;
}

.empty-state-text {
    font-size: 0.85rem;
    text-align: center;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ===== Progress Bar ===== */
.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 2px;
    transition: width 0.3s ease;
    position: relative;
}

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

/* ===== Tooltip ===== */
.chart-tooltip {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-primary);
    pointer-events: none;
    z-index: 50;
    box-shadow: var(--shadow-md);
    white-space: nowrap;
}

.chart-tooltip .tt-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 1px 0;
}

.chart-tooltip .tt-label {
    color: var(--text-muted);
}

/* ===== Crosshair ===== */
.crosshair-x, .crosshair-y {
    position: absolute;
    pointer-events: none;
    z-index: 10;
}

.crosshair-x {
    width: 1px;
    top: 0;
    bottom: 0;
    border-left: 1px dashed rgba(148, 163, 184, 0.3);
}

.crosshair-y {
    height: 1px;
    left: 0;
    right: 0;
    border-top: 1px dashed rgba(148, 163, 184, 0.3);
}

/* ===== Animations ===== */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 4px 15px rgba(245, 158, 11, 0.25); }
    50% { box-shadow: 0 4px 25px rgba(245, 158, 11, 0.45); }
}

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

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.animate-in {
    animation: fadeInUp 0.4s ease-out both;
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }
.stat-card:nth-child(5) { animation-delay: 0.25s; }
.stat-card:nth-child(6) { animation-delay: 0.3s; }

/* ===== CSV Upload ===== */
.csv-upload {
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 8px;
}

.csv-upload:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.csv-upload-icon {
    font-size: 1.5rem;
    margin-bottom: 6px;
    opacity: 0.5;
}

.csv-upload-text {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.csv-upload-name {
    font-size: 0.72rem;
    color: var(--accent);
    font-family: var(--font-mono);
    margin-top: 4px;
}

/* ===== Filter Summary ===== */
.filter-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.filter-tag {
    font-size: 0.62rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    background: var(--accent-glow);
    color: var(--accent);
    border: 1px solid var(--border-accent);
}

.filter-tag.off {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-muted);
    border-color: var(--border);
    text-decoration: line-through;
}

/* ===== Responsive ===== */
@media (max-width: 1400px) {
    .dashboard {
        grid-template-columns: 260px 1fr 260px;
    }
}

@media (max-width: 1100px) {
    .dashboard {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto auto;
        height: auto;
    }

    .config-panel {
        flex-direction: row;
        flex-wrap: wrap;
        border-right: none;
        border-bottom: 1px solid var(--border);
        max-height: 300px;
    }

    .panel-section {
        flex: 1;
        min-width: 220px;
    }

    .stats-panel {
        flex-direction: row;
        flex-wrap: wrap;
        border-left: none;
        border-top: 1px solid var(--border);
    }

    .stat-card {
        flex: 1;
        min-width: 140px;
    }

    .chart-container {
        height: 450px;
    }
}

@media (max-width: 640px) {
    .header { padding: 0 12px; }
    .header-badge { display: none; }
    .config-panel, .stats-panel { padding: 10px; }
    .stat-row { grid-template-columns: 1fr; }
}

/* ===== Data Source Tabs ===== */
.data-tabs {
    display: flex;
    gap: 4px;
    margin: 10px 0;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 3px;
}

.data-tab {
    flex: 1;
    padding: 6px 8px;
    border: none;
    border-radius: var(--radius-xs);
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-main);
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.data-tab:hover {
    color: var(--text-secondary);
    background: rgba(255,255,255,0.03);
}

.data-tab.active {
    background: var(--bg-card);
    color: var(--accent);
    box-shadow: var(--shadow-sm);
}

.data-panel {
    margin-top: 8px;
}

/* ===== Period Selector ===== */
.period-selector {
    display: flex;
    gap: 4px;
}

.period-btn {
    flex: 1;
    padding: 7px 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.period-btn:hover {
    border-color: var(--border-light);
    color: var(--text-primary);
}

.period-btn.active {
    border-color: var(--accent);
    background: var(--accent-glow);
    color: var(--accent);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.1);
}

/* ===== Download Button ===== */
.btn-download {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #f59e0b;
    border-radius: var(--radius-sm);
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    font-family: var(--font-main);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
}

.btn-download:hover {
    background: rgba(245, 158, 11, 0.18);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.15);
    transform: translateY(-1px);
}

.btn-download:active {
    transform: translateY(0);
}

.btn-download:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* ===== Download Status ===== */
.download-status {
    font-size: 0.72rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    margin-top: 6px;
    min-height: 16px;
    text-align: center;
    transition: var(--transition-fast);
}

.download-status.success {
    color: var(--profit-light);
}

.download-status.error {
    color: var(--loss-light);
}

/* ===== Cache Info ===== */
.cache-info {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    margin-top: 8px;
}

.cache-empty {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    padding: 4px 0;
}

.cache-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
}

.cache-label {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.cache-value {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.cache-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.cache-actions .btn {
    flex: 1;
    font-size: 0.68rem;
    padding: 5px 8px;
}
