:root {
    --bg-primary: #06131f;
    --bg-secondary: rgba(10, 26, 40, 0.82);
    --bg-card: rgba(7, 19, 31, 0.84);
    --bg-card-strong: rgba(10, 24, 37, 0.96);
    --bg-shell: linear-gradient(180deg, rgba(8, 20, 32, 0.88), rgba(5, 15, 24, 0.92));
    --bg-sidebar: linear-gradient(180deg, rgba(10, 26, 40, 0.94), rgba(6, 18, 28, 0.92));
    --bg-panel: linear-gradient(180deg, rgba(10, 25, 38, 0.88), rgba(6, 17, 28, 0.88));
    --bg-brand: linear-gradient(135deg, rgba(17, 46, 69, 0.86), rgba(9, 21, 34, 0.82));
    --body-backdrop:
        radial-gradient(circle at top left, rgba(62, 176, 255, 0.18), transparent 28%),
        radial-gradient(circle at top right, rgba(74, 222, 128, 0.12), transparent 30%),
        linear-gradient(180deg, #08131d 0%, var(--bg-primary) 42%, #030a11 100%);
    --bg-hover: rgba(63, 149, 196, 0.12);
    --surface-outline: rgba(149, 205, 255, 0.16);
    --surface-glow: rgba(34, 197, 94, 0.12);
    --surface-soft: rgba(255, 255, 255, 0.04);
    --surface-soft-strong: rgba(255, 255, 255, 0.08);
    --surface-tint: rgba(255, 255, 255, 0.035);

    --text-primary: #e8f3ff;
    --text-secondary: #9cb4c9;
    --text-muted: #68829a;

    --accent-primary: #6ee7ff;
    --accent-strong: #3fb0ff;
    --accent-warm: #f3b24f;
    --positive: #4ade80;
    --negative: #fb7185;
    --warning: #fbbf24;

    --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 18px 40px rgba(0, 0, 0, 0.28);

    --sidebar-width: 308px;
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

html[data-theme="light"] {
    --bg-primary: #f2efe8;
    --bg-secondary: rgba(255, 250, 243, 0.92);
    --bg-card: rgba(255, 252, 247, 0.92);
    --bg-card-strong: rgba(255, 253, 250, 0.98);
    --bg-shell: linear-gradient(180deg, rgba(255, 251, 245, 0.96), rgba(244, 236, 227, 0.96));
    --bg-sidebar: linear-gradient(180deg, rgba(245, 237, 228, 0.96), rgba(234, 224, 212, 0.96));
    --bg-panel: linear-gradient(180deg, rgba(255, 251, 245, 0.96), rgba(245, 239, 230, 0.98));
    --bg-brand: linear-gradient(135deg, rgba(241, 228, 206, 0.96), rgba(230, 214, 189, 0.94));
    --body-backdrop:
        radial-gradient(circle at top left, rgba(235, 169, 81, 0.2), transparent 28%),
        radial-gradient(circle at top right, rgba(106, 180, 201, 0.16), transparent 32%),
        linear-gradient(180deg, #fcfaf6 0%, #f4eee7 46%, #ede4d8 100%);
    --bg-hover: rgba(44, 102, 142, 0.08);
    --surface-outline: rgba(108, 84, 57, 0.12);
    --surface-glow: rgba(29, 160, 113, 0.08);
    --surface-soft: rgba(122, 92, 55, 0.05);
    --surface-soft-strong: rgba(122, 92, 55, 0.09);
    --surface-tint: rgba(122, 92, 55, 0.045);

    --text-primary: #1f2a33;
    --text-secondary: #55616c;
    --text-muted: #7f8078;
    --accent-primary: #2a7ea0;
    --accent-strong: #165f81;
    --accent-warm: #b7742b;
    --positive: #16805a;
    --negative: #be4a5f;
    --warning: #b98521;
    --shadow-lg: 0 28px 70px rgba(102, 77, 50, 0.14);
    --shadow-md: 0 16px 34px rgba(102, 77, 50, 0.11);
}

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

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    font-family: "Avenir Next", "Segoe UI", sans-serif;
    color: var(--text-primary);
    background: var(--body-backdrop);
    line-height: 1.5;
}

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

a:hover {
    color: var(--text-primary);
}

.app-shell {
    display: flex;
    gap: 24px;
    min-height: 100vh;
    padding: 22px;
}

.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 22px;
    border: 1px solid var(--surface-outline);
    border-radius: var(--radius-xl);
    background: var(--bg-sidebar), var(--bg-secondary);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(18px);
    position: sticky;
    top: 22px;
    height: calc(100vh - 44px);
}

.brand-panel,
.nav-panel,
.nav-footer,
.card,
.hero-card,
.page-chrome {
    border: 1px solid var(--surface-outline);
}

.brand-panel {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 16px;
    padding: 18px;
    border-radius: var(--radius-lg);
    background: var(--bg-brand);
}

.brand-mark {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #04121d;
    background: linear-gradient(135deg, var(--accent-primary), #c7fff0);
}

.eyebrow {
    color: var(--accent-warm);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
    font-weight: 700;
}

.brand-panel h1 {
    font-size: 1.45rem;
    margin-top: 4px;
}

.brand-copy,
.card-description,
.hero-copy,
.status-copy,
.field-help {
    color: var(--text-secondary);
}

.nav-panel,
.nav-footer {
    padding: 18px;
    border-radius: var(--radius-lg);
    background: rgba(6, 18, 28, 0.64);
}

.nav-heading {
    color: var(--text-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 14px;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-links a {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: 16px;
    color: var(--text-secondary);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    border: 1px solid transparent;
}

.nav-links a:hover,
.nav-links li.active a {
    transform: translateX(4px);
    background: linear-gradient(135deg, rgba(61, 176, 255, 0.18), rgba(74, 222, 128, 0.1));
    border-color: rgba(110, 231, 255, 0.24);
    color: var(--text-primary);
}

.icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--surface-soft);
    color: var(--accent-primary);
    font-size: 1rem;
}

.nav-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.nav-copy strong {
    font-size: 0.98rem;
}

.nav-copy small {
    color: var(--text-muted);
}

#connection-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-weight: 600;
}

#connection-status .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--negative);
    box-shadow: 0 0 0 6px rgba(251, 113, 133, 0.12);
}

#connection-status.connected .dot {
    background: var(--positive);
    box-shadow: 0 0 0 6px rgba(74, 222, 128, 0.12);
}

.content {
    flex: 1;
    min-width: 0;
}

.page-chrome {
    min-height: calc(100vh - 44px);
    padding: 28px;
    border-radius: 32px;
    background: var(--bg-shell), var(--bg-card);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(18px);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 24px;
}

.page-header h2 {
    font-size: clamp(2rem, 2.6vw, 3rem);
    line-height: 1.05;
    margin-top: 4px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--surface-outline);
    background: var(--bg-card-strong);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

/* Dark mode: show moon, hide sun */
html[data-theme="dark"] .theme-icon-light {
    display: none;
}
html[data-theme="dark"] .theme-icon-dark {
    display: inline;
}

/* Light mode: show sun, hide moon */
html[data-theme="light"] .theme-icon-dark {
    display: none;
}
html[data-theme="light"] .theme-icon-light {
    display: inline;
}

.page-content {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.hero-card,
.card {
    padding: 24px;
    border-radius: var(--radius-xl);
    background: var(--bg-panel), var(--bg-card);
    box-shadow: var(--shadow-md);
}

.hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.9fr);
    gap: 22px;
    align-items: end;
    overflow: hidden;
    position: relative;
}

.hero-card::after {
    content: "";
    position: absolute;
    inset: auto -5% -40% auto;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(110, 231, 255, 0.16), transparent 70%);
    pointer-events: none;
}

.hero-card h3 {
    font-size: clamp(1.6rem, 2.3vw, 2.3rem);
    line-height: 1.1;
    margin: 10px 0 12px;
    max-width: 12ch;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.hero-metrics.compact {
    align-self: stretch;
}

.metric-tile {
    padding: 18px;
    border-radius: 18px;
    background: var(--surface-soft);
    border: 1px solid var(--surface-soft-strong);
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.metric-tile.accent {
    background: linear-gradient(160deg, rgba(63, 176, 255, 0.2), rgba(74, 222, 128, 0.08));
    border-color: rgba(110, 231, 255, 0.2);
}

.metric-label {
    color: var(--text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.metric-value {
    font-size: clamp(1.2rem, 2vw, 2rem);
    font-weight: 700;
    line-height: 1.1;
}

.metric-value.positive,
.positive {
    color: var(--positive);
}

.metric-value.negative,
.negative {
    color: var(--negative);
}

.dashboard-grid,
.settings-grid,
.trade-grid,
.strategy-grid {
    display: grid;
    gap: 22px;
}

.dashboard-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.progress-card,
.account-summary {
    grid-column: span 6;
}

.positions-card,
.watchlist-card,
.allocation-card,
.preferences-card {
    grid-column: 1 / -1;
}

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.section-heading h3,
.card h3 {
    font-size: 1.3rem;
    margin-top: 6px;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.pill.muted {
    color: var(--text-secondary);
}

.pill.warning {
    color: #261300;
    background: linear-gradient(135deg, #ffd36b, #f3b24f);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.stat {
    padding: 18px;
    border-radius: 16px;
    background: var(--surface-tint);
    border: 1px solid var(--surface-soft-strong);
}

.stat .label {
    display: block;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    margin-bottom: 8px;
}

.stat .value {
    font-size: 1rem;
    font-weight: 600;
}

.progress-shell {
    padding: 18px;
    border-radius: 18px;
    background: var(--surface-tint);
    border: 1px solid var(--surface-soft-strong);
}

.progress-bar {
    height: 28px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--surface-soft-strong);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--positive), #dbff7d);
    transition: width 0.5s ease;
}

.progress-stats,
.callout-grid,
.auth-actions,
.execute-actions,
.modal-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.progress-stats {
    justify-content: space-between;
    margin-top: 12px;
    color: var(--text-secondary);
}

.callout-grid {
    margin-top: 18px;
}

.callout {
    flex: 1;
    min-width: 180px;
    padding: 16px;
    border-radius: 16px;
    background: var(--surface-tint);
}

.callout-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 8px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: middle;
}

.data-table th {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.data-table tbody tr {
    transition: background 0.2s ease;
}

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

.data-table .symbol {
    color: var(--text-primary);
    font-weight: 700;
}

.data-table .loading,
.data-table .empty,
.data-table .error {
    text-align: center;
    padding: 26px;
    color: var(--text-muted);
}

.data-table .error {
    color: var(--negative);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    color: #031018;
    background: linear-gradient(135deg, var(--accent-primary), #c9fff4);
}

.btn-secondary {
    color: var(--text-primary);
    background: var(--surface-soft);
    border-color: var(--surface-soft-strong);
}

.btn-ghost {
    color: var(--text-secondary);
    background: transparent;
    border-color: var(--surface-soft-strong);
}

.btn-danger {
    color: white;
    background: linear-gradient(135deg, #fb7185, #e11d48);
}

.btn-sm {
    min-height: 34px;
    padding: 0 14px;
    font-size: 0.8rem;
}

.btn-lg {
    min-height: 52px;
    padding: 0 22px;
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.btn-icon {
    border: 1px solid var(--surface-soft-strong);
    background: var(--surface-soft);
    color: var(--text-secondary);
    border-radius: 999px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.8rem;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 84px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    z-index: 1;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-group label,
.toggle-row label {
    font-size: 0.9rem;
    font-weight: 700;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 13px 14px;
    border-radius: 14px;
    border: 1px solid var(--surface-soft-strong);
    background: var(--surface-soft);
    color: var(--text-primary);
    font: inherit;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(110, 231, 255, 0.38);
    box-shadow: 0 0 0 4px rgba(110, 231, 255, 0.08);
}

.settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-status {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.status-item .label {
    color: var(--text-secondary);
}

.status-item .value {
    font-weight: 700;
}

.instructions {
    margin-top: 16px;
    padding: 18px;
    border-radius: 18px;
    background: var(--surface-soft);
}

.instructions h4 {
    margin-bottom: 10px;
}

.instructions ol {
    padding-left: 20px;
    color: var(--text-secondary);
}

.instructions code {
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.toggle-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 16px;
    border-radius: 16px;
    background: var(--surface-tint);
}

.toggle-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent-strong);
}

.allocation-summary {
    display: grid;
    gap: 18px;
}

.monitor-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 22px;
}

.analysis-card,
.alerts-card,
.news-card,
.sentiment-card {
    grid-column: span 6;
}

.recommendations-card,
.trade-log-card {
    grid-column: 1 / -1;
}

.analysis-content {
    display: grid;
    gap: 14px;
}

.monitor-panel {
    padding: 18px;
    border-radius: 18px;
    background: var(--surface-tint);
    border: 1px solid var(--surface-soft-strong);
}

.health-text {
    font-size: 1.08rem;
    font-weight: 600;
}

.alerts-list,
.news-list,
.sentiment-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alert-item,
.news-item,
.sentiment-item {
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--surface-tint);
    border: 1px solid var(--surface-soft-strong);
}

.alert-item {
    border-left: 4px solid var(--warning);
}

.alert-item.high {
    border-left-color: var(--negative);
}

.action-buy {
    color: var(--positive);
    font-weight: 700;
}

.action-sell {
    color: var(--negative);
    font-weight: 700;
}

.action-hold {
    color: var(--text-muted);
    font-weight: 700;
}

.urgency-high {
    color: var(--negative);
    font-weight: 700;
}

.urgency-medium {
    color: var(--warning);
    font-weight: 700;
}

.urgency-low {
    color: var(--text-muted);
}

.confidence-bar {
    display: inline-block;
    width: 72px;
    height: 8px;
    margin-right: 8px;
    border-radius: 999px;
    overflow: hidden;
    vertical-align: middle;
    background: var(--surface-soft-strong);
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-strong));
}

.news-list {
    max-height: 420px;
    overflow-y: auto;
}

.news-item h4 {
    font-size: 0.95rem;
    line-height: 1.35;
    margin-bottom: 6px;
}

.news-item h4 a {
    color: var(--text-primary);
}

.news-meta,
.buzz-score {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.sentiment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.sentiment {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sentiment-badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sentiment-badge.bullish {
    background: rgba(74, 222, 128, 0.16);
    color: var(--positive);
}

.sentiment-badge.bearish {
    background: rgba(251, 113, 133, 0.16);
    color: var(--negative);
}

.sentiment-badge.neutral {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

.allocation-block {
    padding: 18px;
    border-radius: 18px;
    background: var(--surface-tint);
}

.allocation-block h4 {
    margin-bottom: 10px;
}

.alloc-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.alloc-total {
    padding-top: 12px;
    text-align: right;
    font-weight: 700;
}

.alloc-grand-total {
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(63, 176, 255, 0.12), rgba(74, 222, 128, 0.1));
    font-size: 1.2rem;
    font-weight: 800;
    text-align: right;
}

.empty-state {
    color: var(--text-muted);
}

.warning-card {
    background:
        linear-gradient(135deg, rgba(91, 56, 4, 0.42), rgba(40, 18, 3, 0.9)),
        var(--bg-card);
}

.warning-list {
    padding-left: 18px;
    color: #fbd79d;
}

.warning-list li + li {
    margin-top: 8px;
}

.execute-actions {
    justify-content: flex-start;
}

.log-container {
    max-height: 320px;
    overflow: auto;
    padding: 18px;
    border-radius: 18px;
    background: var(--surface-soft);
    border: 1px solid var(--surface-soft-strong);
    font-family: "SFMono-Regular", "Menlo", monospace;
    font-size: 0.85rem;
}

.log-entry {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.log-entry .time {
    color: var(--text-muted);
    margin-right: 10px;
}

.log-success {
    color: var(--positive);
}

.log-error {
    color: var(--negative);
}

.log-info,
.log-empty {
    color: var(--text-secondary);
}

.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(2, 7, 12, 0.76);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.modal-content {
    width: min(560px, 100%);
    padding: 24px;
    border-radius: 24px;
    background: var(--bg-card-strong);
    border: 1px solid var(--surface-outline);
    box-shadow: var(--shadow-lg);
}

html[data-theme="light"] body {
    color-scheme: light;
}

html[data-theme="light"] .nav-links a:hover,
html[data-theme="light"] .nav-links li.active a {
    background: linear-gradient(135deg, rgba(42, 126, 160, 0.12), rgba(183, 116, 43, 0.08));
    border-color: rgba(42, 126, 160, 0.18);
}

html[data-theme="light"] .sidebar {
    backdrop-filter: blur(14px);
}

html[data-theme="light"] .nav-panel,
html[data-theme="light"] .nav-footer {
    background: rgba(255, 250, 243, 0.72);
}

html[data-theme="light"] .nav-heading,
html[data-theme="light"] .nav-copy small,
html[data-theme="light"] .status-copy {
    color: #7b7468;
}

html[data-theme="light"] .nav-links a {
    color: #5b6670;
}

html[data-theme="light"] .nav-links li.active a,
html[data-theme="light"] .nav-links a:hover {
    color: #1f2a33;
}

html[data-theme="light"] .icon {
    color: var(--accent-strong);
    background: rgba(42, 126, 160, 0.08);
}

html[data-theme="light"] #connection-status {
    background: rgba(122, 92, 55, 0.08);
}

html[data-theme="light"] .theme-toggle:hover {
    background: rgba(42, 126, 160, 0.08);
}

html[data-theme="light"] .metric-tile.accent,
html[data-theme="light"] .alloc-grand-total {
    background: linear-gradient(135deg, rgba(42, 126, 160, 0.12), rgba(183, 116, 43, 0.08));
    border-color: rgba(42, 126, 160, 0.12);
}

html[data-theme="light"] .warning-card {
    background:
        linear-gradient(135deg, rgba(247, 226, 189, 0.92), rgba(239, 219, 183, 0.96)),
        var(--bg-card);
}

html[data-theme="light"] .warning-list {
    color: #7a551d;
}

html[data-theme="light"] .brand-mark {
    color: #fffaf2;
    background: linear-gradient(135deg, #2a7ea0, #b7742b);
}

.modal-content h3 {
    margin: 8px 0 12px;
}

/* Paper Trading Mode */
.paper-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 22px;
}

.quick-trade-card,
.actions-card {
    grid-column: span 4;
}

.positions-card,
.orders-card,
.history-card {
    grid-column: span 8;
}

.trade-form-large {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.paper-form-row {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.paper-form-row label {
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.input-lg {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--surface-soft-strong);
    background: var(--surface-soft);
    color: var(--text-primary);
    font: inherit;
    font-size: 1rem;
}

.input-lg:focus {
    outline: none;
    border-color: rgba(110, 231, 255, 0.38);
    box-shadow: 0 0 0 4px rgba(110, 231, 255, 0.08);
}

.price-display {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    border-radius: 14px;
    background: var(--surface-tint);
    border: 1px solid var(--surface-soft-strong);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.trade-buttons {
    display: flex;
    gap: 14px;
    margin-top: 4px;
}

.trade-buttons .btn {
    flex: 1;
}

.action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.action-note {
    margin-top: 14px;
    padding: 16px;
    border-radius: 16px;
    background: var(--surface-tint);
    border: 1px solid var(--surface-soft-strong);
}

.action-note p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.trading-mode-card {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(63, 176, 255, 0.08), rgba(74, 222, 128, 0.04)), var(--bg-panel), var(--bg-card);
}

.trading-mode-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 18px 0;
    padding: 18px;
    border-radius: 18px;
    background: var(--surface-tint);
    border: 1px solid var(--surface-soft-strong);
}

.mode-display {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}

.mode-display .mode-icon {
    font-size: 2rem;
}

.mode-display .mode-text {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.mode-display .mode-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.mode-display.paper .mode-text {
    color: var(--accent-primary);
}

.mode-display.live .mode-text {
    color: var(--negative);
}

.paper-summary {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.paper-summary .status-item {
    flex: 1;
    min-width: 120px;
    padding: 14px;
    border-radius: 14px;
    background: var(--surface-soft);
    border: 1px solid var(--surface-soft-strong);
    border-bottom: none;
}

.btn-large {
    min-height: 52px;
    padding: 0 28px;
    font-size: 1rem;
}

.btn-small {
    min-height: 36px;
    padding: 0 14px;
    font-size: 0.8rem;
}

/* Paper Trading Dashboard Card */
.paper-trading-card {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(110, 231, 255, 0.06), rgba(74, 222, 128, 0.03)), var(--bg-panel), var(--bg-card);
}

.paper-mode-badge .mode-indicator {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.mode-indicator.paper {
    background: rgba(110, 231, 255, 0.15);
    color: var(--accent-primary);
}

.mode-indicator.live {
    background: rgba(251, 113, 133, 0.15);
    color: var(--negative);
}

.paper-summary-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.paper-stat {
    padding: 14px;
    border-radius: 14px;
    background: var(--surface-tint);
    border: 1px solid var(--surface-soft-strong);
}

.paper-stat .label {
    display: block;
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 6px;
}

.paper-stat .value {
    font-size: 1.1rem;
    font-weight: 700;
}

.paper-stat.accent {
    background: linear-gradient(135deg, rgba(110, 231, 255, 0.12), rgba(74, 222, 128, 0.08));
    border-color: rgba(110, 231, 255, 0.2);
}

.paper-trade-form {
    padding: 18px;
    border-radius: 16px;
    background: var(--surface-soft);
    margin-bottom: 20px;
}

.paper-trade-form h4 {
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.trade-inputs {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.trade-inputs .input-symbol {
    width: 100px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--surface-soft-strong);
    background: var(--bg-card);
    color: var(--text-primary);
    font: inherit;
    text-transform: uppercase;
}

.trade-inputs .input-shares {
    width: 90px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--surface-soft-strong);
    background: var(--bg-card);
    color: var(--text-primary);
    font: inherit;
}

.trade-inputs input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.paper-positions-section {
    margin-bottom: 16px;
}

.paper-positions-section h4 {
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.paper-actions {
    display: flex;
    gap: 10px;
}

html[data-theme="light"] .input-lg:focus {
    border-color: rgba(42, 126, 160, 0.34);
    box-shadow: 0 0 0 4px rgba(42, 126, 160, 0.08);
}

@media (max-width: 1100px) {
    .paper-summary-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 720px) {
    .paper-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .trade-inputs {
        flex-direction: column;
        align-items: stretch;
    }

    .trade-inputs .input-symbol,
    .trade-inputs .input-shares {
        width: 100%;
    }
}

.hidden {
    display: none !important;
}

#toast-container {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 240px;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--bg-card-strong);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-md);
    animation: slideIn 0.24s ease;
}

.toast.success {
    border-color: rgba(74, 222, 128, 0.36);
}

.toast.error {
    border-color: rgba(251, 113, 133, 0.34);
}

.toast.warning {
    border-color: rgba(251, 191, 36, 0.34);
}

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

@media (max-width: 1180px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: static;
        height: auto;
    }

    .page-chrome {
        min-height: auto;
    }

    .dashboard-grid,
    .settings-grid,
    .monitor-grid,
    .paper-grid {
        grid-template-columns: 1fr;
    }

    .progress-card,
    .account-summary,
    .analysis-card,
    .alerts-card,
    .news-card,
    .sentiment-card,
    .quick-trade-card,
    .actions-card,
    .positions-card,
    .orders-card,
    .history-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .hero-card {
        grid-template-columns: 1fr;
    }

    .hero-card h3 {
        max-width: none;
    }

    .hero-metrics {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .app-shell,
    .page-chrome {
        padding: 16px;
    }

    .sidebar,
    .hero-card,
    .card {
        padding: 18px;
    }

    .brand-panel {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-actions {
        justify-content: flex-start;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .paper-form-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .trade-buttons {
        flex-direction: column;
    }

    .data-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .sentiment-item {
        flex-direction: column;
        align-items: flex-start;
    }

    #toast-container {
        right: 16px;
        left: 16px;
        bottom: 16px;
    }

    .toast {
        min-width: 0;
    }
}

/* Charts Page Styles */
.charts-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 22px;
}

.symbol-dropdown,
.timeframe-dropdown {
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid var(--surface-soft-strong);
    background: var(--surface-soft);
    color: var(--text-primary);
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}

.symbol-dropdown:focus,
.timeframe-dropdown:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.chart-card,
.rsi-card,
.indicators-card {
    grid-column: 1 / -1;
}

.chart-legend {
    display: flex;
    gap: 14px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.legend-item.sma20::before {
    content: "";
    width: 16px;
    height: 3px;
    background: #6ee7ff;
    border-radius: 2px;
}

.legend-item.sma50::before {
    content: "";
    width: 16px;
    height: 3px;
    background: #f3b24f;
    border-radius: 2px;
}

.rsi-zones {
    display: flex;
    gap: 12px;
}

.zone {
    font-size: 0.72rem;
    padding: 4px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.zone.overbought {
    background: rgba(251, 113, 133, 0.15);
    color: var(--negative);
}

.zone.oversold {
    background: rgba(74, 222, 128, 0.15);
    color: var(--positive);
}

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

.indicator-tile {
    padding: 14px;
    border-radius: 14px;
    background: var(--surface-tint);
    border: 1px solid var(--surface-soft-strong);
}

.indicator-label {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 6px;
}

.indicator-value {
    font-size: 1.1rem;
    font-weight: 700;
}

.alert-form {
    margin-bottom: 18px;
}

.alert-form .form-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.form-select,
.form-input {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--surface-soft-strong);
    background: var(--surface-soft);
    color: var(--text-primary);
    font: inherit;
    min-width: 140px;
}

.form-select:focus,
.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.active-alerts {
    margin-top: 20px;
}

.active-alerts h4 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 260px;
    overflow-y: auto;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--surface-tint);
    border: 1px solid var(--surface-soft-strong);
}

.alert-symbol {
    font-weight: 700;
    min-width: 60px;
}

.alert-type {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    flex: 1;
}

.alert-target {
    font-weight: 600;
    color: var(--accent-primary);
}

.backtest-card .form-group {
    margin-bottom: 12px;
}

.backtest-card .form-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.backtest-card .form-group input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--surface-soft-strong);
    background: var(--surface-soft);
    color: var(--text-primary);
    font: inherit;
}

.backtest-card .form-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 14px;
}

.result-item {
    padding: 12px;
    border-radius: 10px;
    background: var(--surface-tint);
}

.result-item .label {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.result-item .value {
    font-size: 1rem;
    font-weight: 700;
}

.ai-accuracy-card .ai-stats {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ai-accuracy-card .stat-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--surface-soft-strong);
}

.ai-accuracy-card .stat-row:last-child {
    border-bottom: none;
}

.ai-accuracy-card .stat-row .label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.ai-accuracy-card .stat-row .value {
    font-weight: 700;
}

.alerts-setup-card,
.backtest-card,
.ai-accuracy-card {
    grid-column: span 4;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 22px;
}

.chart-main {
    grid-column: span 8;
}

.chart-sidebar {
    grid-column: span 4;
}

.chart-container {
    padding: 18px;
    border-radius: 18px;
    background: var(--surface-tint);
    border: 1px solid var(--surface-soft-strong);
    margin-bottom: 20px;
}

.chart-container h4 {
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

#price-chart {
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
}

#rsi-chart {
    height: 150px;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 12px;
}

.symbol-selector {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.symbol-selector input {
    width: 120px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--surface-soft-strong);
    background: var(--surface-soft);
    color: var(--text-primary);
    font: inherit;
    text-transform: uppercase;
}

.symbol-selector input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.timeframe-buttons {
    display: flex;
    gap: 6px;
}

.timeframe-buttons button {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--surface-soft-strong);
    background: var(--surface-soft);
    color: var(--text-secondary);
    font: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.timeframe-buttons button:hover,
.timeframe-buttons button.active {
    background: var(--accent-primary);
    color: #031018;
    border-color: var(--accent-primary);
}

/* Price Alerts Card */
.alerts-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.alerts-form select,
.alerts-form input {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--surface-soft-strong);
    background: var(--surface-soft);
    color: var(--text-primary);
    font: inherit;
}

.alerts-form select:focus,
.alerts-form input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.active-alerts-list {
    margin-top: 18px;
    max-height: 300px;
    overflow-y: auto;
}

.alert-card {
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--surface-soft);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.alert-card .alert-info {
    flex: 1;
}

.alert-card .alert-type {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.alert-card .alert-target {
    font-weight: 700;
    font-size: 1.1rem;
}

.alert-card .alert-delete {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--surface-soft-strong);
    background: transparent;
    color: var(--negative);
    cursor: pointer;
    font-size: 0.8rem;
}

.alert-card .alert-delete:hover {
    background: rgba(251, 113, 133, 0.1);
}

/* Backtest Card */
.backtest-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.backtest-params label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.backtest-params input {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--surface-soft-strong);
    background: var(--surface-soft);
    color: var(--text-primary);
    font: inherit;
}

.backtest-params input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.backtest-results {
    margin-top: 18px;
    padding: 16px;
    border-radius: 14px;
    background: var(--surface-soft);
    display: none;
}

.backtest-results.visible {
    display: block;
}

.backtest-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 14px;
}

.backtest-stat {
    padding: 10px;
    border-radius: 10px;
    background: var(--surface-tint);
}

.backtest-stat .label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.backtest-stat .value {
    font-size: 1.05rem;
    font-weight: 700;
    margin-top: 4px;
}

.backtest-trades {
    max-height: 200px;
    overflow-y: auto;
}

.backtest-trade {
    padding: 8px 10px;
    border-bottom: 1px solid var(--surface-soft-strong);
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.backtest-trade:last-child {
    border-bottom: none;
}

.backtest-trade .trade-action.buy {
    color: var(--positive);
}

.backtest-trade .trade-action.sell {
    color: var(--negative);
}

/* AI Tracking Stats */
.ai-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.ai-stat {
    padding: 14px;
    border-radius: 12px;
    background: var(--surface-soft);
}

.ai-stat .label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.ai-stat .value {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 4px;
}

.ai-stat.accent {
    background: linear-gradient(135deg, rgba(110, 231, 255, 0.12), rgba(74, 222, 128, 0.08));
}

.ai-accuracy-bar {
    height: 10px;
    border-radius: 999px;
    background: var(--surface-soft-strong);
    overflow: hidden;
    margin-top: 8px;
}

.ai-accuracy-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--positive));
    transition: width 0.5s ease;
}

.symbol-accuracy-list {
    margin-top: 14px;
}

.symbol-accuracy-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--surface-soft-strong);
}

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

.symbol-accuracy-item .symbol {
    font-weight: 700;
}

.symbol-accuracy-item .accuracy {
    font-size: 0.9rem;
}

/* Technical Indicators Panel */
.indicators-panel {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 14px;
}

.indicator-item {
    padding: 12px;
    border-radius: 10px;
    background: var(--surface-soft);
}

.indicator-item .label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.indicator-item .value {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 4px;
}

.indicator-item .signal {
    font-size: 0.75rem;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    display: inline-block;
}

.indicator-item .signal.bullish {
    background: rgba(74, 222, 128, 0.16);
    color: var(--positive);
}

.indicator-item .signal.bearish {
    background: rgba(251, 113, 133, 0.16);
    color: var(--negative);
}

.indicator-item .signal.neutral {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

/* Responsive Charts */
@media (max-width: 1100px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }

    .chart-main,
    .chart-sidebar,
    .alerts-setup-card,
    .backtest-card,
    .ai-accuracy-card {
        grid-column: 1 / -1;
    }

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

@media (max-width: 720px) {
    #price-chart {
        height: 300px;
    }

    .backtest-params,
    .ai-stats-grid,
    .indicators-panel,
    .indicators-grid,
    .results-grid {
        grid-template-columns: 1fr;
    }

    .alerts-form .form-row {
        flex-direction: column;
        align-items: stretch;
    }

    .form-select,
    .form-input {
        width: 100%;
    }

    .chart-legend,
    .rsi-zones {
        flex-wrap: wrap;
    }
}
