:root {
    --bg-primary: #0b0d13;
    --bg-secondary: #11131a;
    --bg-card: rgba(255, 255, 255, 0.035);
    --bg-card-hover: rgba(255, 255, 255, 0.065);
    --border-subtle: rgba(255, 255, 255, 0.055);
    --border-hover: rgba(255, 255, 255, 0.14);
    --text-primary: #e4e5ea;
    --text-secondary: #7d7f8a;
    --text-tertiary: #50525c;
    --positive: #00d2a0;
    --negative: #ff4d5a;
    --arbitrage: #ff6b35;
    --arbitrage-dim: rgba(255, 107, 53, 0.12);
    --value: #b476f5;
    --value-dim: rgba(180, 118, 245, 0.12);
    --gold: #f5a623;
    --gold-dim: rgba(245, 166, 35, 0.12);
    --blue: #4facfe;
    --blue-dim: rgba(79, 172, 254, 0.12);
    --radius: 10px;
    --font: 'Inter', -apple-system, system-ui, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
}

/* ===== Login Gate ===== */
.login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 13, 19, 0.96);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.4s;
}

.login-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.login-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 48px 40px;
    text-align: center;
    min-width: 340px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.login-logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.login-subtitle {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 28px;
}

.login-form {
    display: flex;
    gap: 8px;
}

.login-input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.2s;
}

.login-input:focus {
    border-color: var(--gold);
}

.login-btn {
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--gold), #ff6b35);
    border: none;
    border-radius: 8px;
    color: #000;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

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

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

.login-error {
    margin-top: 12px;
    font-size: 12px;
    color: var(--negative);
    min-height: 18px;
}

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

html {
    font-size: 14px;
}

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

/* ===== Header ===== */
header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 20px;
    height: 52px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-secondary);
    white-space: nowrap;
}

.header-accent {
    color: var(--gold);
}

.header-tag {
    font-size: 10px;
    font-weight: 600;
    color: var(--gold);
    background: var(--gold-dim);
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.header-nav {
    display: flex;
    gap: 4px;
    margin-left: 8px;
}

.nav-btn {
    padding: 5px 14px;
    border-radius: 7px;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

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

.nav-btn.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.nav-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--gold);
    color: #000;
    font-size: 9px;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.header-stat,
.update-time {
    font-size: 11px;
    color: var(--text-tertiary);
    white-space: nowrap;
}

.countdown {
    font-size: 11px;
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
    min-width: 24px;
}

.refresh-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 7px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

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

.refresh-btn.spinning svg {
    animation: spin 0.8s linear infinite;
}

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

/* ===== Views ===== */
.view {
    display: none;
}

.view.active {
    display: block;
}

/* ===== Board ===== */
.board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 12px;
}

/* ===== Column ===== */
.column {
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border-subtle);
    overflow: hidden;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px 6px;
}

.column-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.column-title h2 {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.column-subtitle {
    font-size: 10px;
    color: var(--text-tertiary);
    padding: 0 16px 10px;
    border-bottom: 1px solid var(--border-subtle);
    letter-spacing: 0.02em;
}

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

.column[data-category="arbitrage"] .dot {
    background: var(--arbitrage);
    box-shadow: 0 0 8px var(--arbitrage-dim);
}

.column[data-category="value"] .dot {
    background: var(--value);
    box-shadow: 0 0 8px var(--value-dim);
}

.column[data-category="certainty"] .dot {
    background: var(--positive);
    box-shadow: 0 0 8px rgba(0, 210, 160, 0.3);
}

.column[data-category="arbitrage"] {
    --accent: var(--arbitrage);
}

.column[data-category="value"] {
    --accent: var(--value);
}

.column[data-category="certainty"] {
    --accent: var(--positive);
}

.column[data-category="noise"] .dot {
    background: #8b5cf6;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
}

.column[data-category="noise"] {
    --accent: #8b5cf6;
}

.column-count {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 10px;
}

.column-body {
    overflow-y: auto;
    padding: 8px;
    max-height: 78vh;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

.column-body::-webkit-scrollbar {
    width: 4px;
}

.column-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}

.value-group {
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    overflow: hidden;
}

.value-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    font-size: 11px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-subtle);
}

.value-group-title {
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.value-group-count {
    font-weight: 600;
    color: var(--text-tertiary);
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 8px;
    border-radius: 10px;
}

.value-group-body {
    padding: 8px;
}

.value-empty {
    padding: 16px 12px;
    font-size: 11px;
}

.search-header {
    padding: 16px 20px 0;
}

.search-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
}

.search-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 220px;
    padding: 8px 10px;
    border-radius: 7px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 12px;
    outline: none;
}

.search-input:focus {
    border-color: var(--border-hover);
}

.search-btn {
    padding: 6px 12px;
    border-radius: 7px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

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

.search-btn.ghost {
    opacity: 0.7;
}

.search-summary {
    margin-top: 10px;
    font-size: 11px;
    color: var(--text-tertiary);
}

.search-results {
    padding: 12px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.research-header {
    padding: 16px 20px 0;
}

.research-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
}

.research-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.research-input {
    flex: 1;
    min-width: 220px;
    padding: 8px 10px;
    border-radius: 7px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 12px;
    outline: none;
}

.research-input:focus {
    border-color: var(--border-hover);
}

.research-textarea {
    width: 100%;
    min-height: 96px;
    margin-top: 10px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 12px;
    resize: vertical;
    outline: none;
}

.research-textarea:focus {
    border-color: var(--border-hover);
}

.research-btn {
    padding: 6px 12px;
    border-radius: 7px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

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

.research-btn.ghost {
    opacity: 0.7;
}

.research-summary {
    margin-top: 10px;
    font-size: 11px;
    color: var(--text-tertiary);
}

.research-results {
    padding: 12px 20px 20px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.research-card {
    padding: 12px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
}

.research-card-title {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
}

.research-pre {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 60vh;
    overflow: auto;
    border-radius: 6px;
    padding: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
}

@media (max-width: 1024px) {
    .research-results {
        grid-template-columns: 1fr;
    }
}

.search-card {
    padding: 12px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    transition: all 0.2s;
}

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

.search-card-title {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
}

.search-card-title a {
    color: inherit;
    text-decoration: none;
}

.search-card-title a:hover {
    text-decoration: underline;
}

.search-card-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.search-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
    color: var(--text-tertiary);
}

.search-metric {
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 6px;
    border-radius: 6px;
}

.certainty-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.certainty-tab {
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    color: var(--text-tertiary);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.certainty-tab:hover {
    color: var(--text-secondary);
}

.certainty-tab.active {
    color: var(--text-primary);
    border-color: rgba(0, 210, 160, 0.5);
    background: rgba(0, 210, 160, 0.08);
}

/* ===== Opportunity Card ===== */
.opp-card {
    display: block;
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid transparent;
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.18s ease;
    margin-bottom: 8px;
    cursor: pointer;
}

.opp-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    border-left-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.opp-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 5px;
}

.opp-title {
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 7px;
    cursor: pointer;
    transition: color 0.2s;
}

.opp-title:hover {
    color: var(--accent, #6c9cff);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.opp-finding {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.45;
    margin-bottom: 6px;
}

.opp-action {
    font-size: 11px;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    padding: 6px 9px;
    border-radius: 6px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.opp-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 8px;
}

.opp-metric {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
}

.opp-metric.positive {
    color: var(--positive);
    background: rgba(0, 210, 160, 0.08);
}

.opp-metric.negative {
    color: var(--negative);
    background: rgba(255, 77, 90, 0.08);
}

.opp-metric.highlight {
    color: var(--gold);
    background: var(--gold-dim);
}

.opp-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.btn-detail {
    font-size: 11px;
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.2s;
}

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

/* ===== Portfolio View ===== */
.portfolio-header {
    padding: 16px 20px 0;
}

.pf-summary {
    display: flex;
    gap: 24px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
}

.pf-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pf-stat-label {
    font-size: 10px;
    color: var(--text-tertiary);
    letter-spacing: 0.03em;
}

.pf-stat-value {
    font-size: 18px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.portfolio-list {
    padding: 12px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ===== Portfolio Card ===== */
.pf-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 16px;
    transition: all 0.2s;
}

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

.pf-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.pf-card-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    flex: 1;
    margin-right: 12px;
}

.pf-pnl {
    font-size: 16px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.pf-pnl.pos {
    color: var(--positive);
}

.pf-pnl.neg {
    color: var(--negative);
}

.pf-legs {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.pf-leg {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: var(--bg-card);
    border-radius: 6px;
    font-size: 11px;
}

.pf-leg-label {
    color: var(--text-secondary);
    flex: 1;
}

.pf-leg-side {
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
}

.pf-leg-side.yes {
    background: rgba(0, 210, 160, 0.15);
    color: var(--positive);
}

.pf-leg-side.no {
    background: rgba(255, 77, 90, 0.15);
    color: var(--negative);
}

.pf-leg-price {
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
    margin-left: 8px;
}

.pf-leg-current {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    margin-left: 8px;
}

.pf-advice {
    font-size: 11px;
    padding: 8px 10px;
    border-radius: 6px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.pf-advice.neutral {
    background: var(--bg-card);
    color: var(--text-secondary);
}

.pf-advice.action {
    background: var(--gold-dim);
    color: var(--gold);
}

.pf-advice.urgent {
    background: rgba(255, 77, 90, 0.1);
    color: var(--negative);
}

.pf-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pf-meta {
    font-size: 10px;
    color: var(--text-tertiary);
}

.btn-close-pos {
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 77, 90, 0.3);
    background: transparent;
    color: var(--negative);
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.2s;
}

.btn-close-pos:hover {
    background: rgba(255, 77, 90, 0.1);
}

/* ===== Side Panel ===== */
.panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}

.panel-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.side-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 480px;
    max-width: 95vw;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-subtle);
    z-index: 201;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.side-panel.active {
    transform: translateX(0);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.panel-header h3 {
    font-size: 14px;
    font-weight: 700;
}

.panel-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

.panel-close:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

/* Panel sections */
.panel-section {
    margin-bottom: 20px;
}

.panel-section-title {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
}

.market-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: var(--bg-card);
    border-radius: 6px;
    margin-bottom: 5px;
    font-size: 12px;
}

.market-row-label {
    color: var(--text-secondary);
    flex: 1;
    margin-right: 8px;
}

.market-row-yes {
    color: var(--positive);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.market-row-no {
    color: var(--negative);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    margin-left: 8px;
}

.market-row-liq {
    color: var(--text-tertiary);
    font-size: 10px;
    margin-left: 8px;
}

.panel-finding {
    background: var(--arbitrage-dim);
    border-left: 3px solid var(--arbitrage);
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

.panel-finding.value {
    background: var(--value-dim);
    border-left-color: var(--value);
}

/* Hedge builder */
.hedge-builder {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 14px;
}

.hedge-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.hedge-label {
    font-size: 11px;
    color: var(--text-tertiary);
    width: 60px;
    flex-shrink: 0;
}

.hedge-select,
.hedge-input {
    flex: 1;
    min-width: 100px;
    padding: 6px 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 12px;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.2s;
}

.hedge-select:focus,
.hedge-input:focus {
    border-color: var(--gold);
}

.hedge-side-btn {
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-secondary);
    font-size: 11px;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.2s;
}

.hedge-side-btn.active-yes {
    background: rgba(0, 210, 160, 0.15);
    color: var(--positive);
    border-color: var(--positive);
}

.hedge-side-btn.active-no {
    background: rgba(255, 77, 90, 0.15);
    color: var(--negative);
    border-color: var(--negative);
}

.btn-gen-hedge {
    width: 100%;
    padding: 9px;
    border-radius: 7px;
    border: none;
    background: var(--gold);
    color: #000;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    margin-top: 6px;
    transition: opacity 0.2s;
}

.btn-gen-hedge:hover {
    opacity: 0.85;
}

/* Scenario table */
.scenario-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    margin-top: 8px;
}

.scenario-table th {
    text-align: left;
    color: var(--text-tertiary);
    font-weight: 600;
    padding: 5px 8px;
    border-bottom: 1px solid var(--border-subtle);
}

.scenario-table td {
    padding: 6px 8px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.scenario-table td.pos {
    color: var(--positive);
    font-weight: 600;
}

.scenario-table td.neg {
    color: var(--negative);
    font-weight: 600;
}

.scenario-table tr:last-child td {
    border-bottom: none;
}

.btn-enter-sim {
    width: 100%;
    padding: 10px;
    border-radius: 7px;
    border: none;
    background: var(--positive);
    color: #000;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    margin-top: 12px;
    transition: opacity 0.2s;
}

.btn-enter-sim:hover {
    opacity: 0.85;
}

/* ===== Modal ===== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    width: 420px;
    max-width: 95vw;
    max-height: 85vh;
    overflow-y: auto;
}

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

.modal-header h3 {
    font-size: 14px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 18px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

/* ===== Trade Form ===== */
.trade-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trade-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.trade-row label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 70px;
    flex-shrink: 0;
}

.trade-input {
    flex: 1;
    padding: 7px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-size: 13px;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.2s;
}

.trade-input:focus {
    border-color: var(--accent, #6c9cff);
}

select.trade-input {
    cursor: pointer;
}

.trade-side-btns {
    display: flex;
    gap: 6px;
    flex: 1;
}

.trade-side-btn {
    flex: 1;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    transition: all 0.2s;
}

.trade-side-btn.active.yes {
    background: rgba(0, 210, 160, 0.15);
    border-color: var(--positive);
    color: var(--positive);
}

.trade-side-btn.active.no {
    background: rgba(255, 77, 90, 0.15);
    border-color: var(--negative);
    color: var(--negative);
}

.trade-side-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.04);
}

/* Order Book */
.trade-book {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    margin-bottom: 4px;
}

.trade-book-title {
    font-size: 11px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
}

.trade-book-grid {
    padding: 4px 0;
    font-family: var(--font-mono);
    font-size: 11px;
}

.book-header {
    display: flex;
    justify-content: space-between;
    padding: 2px 10px;
    color: var(--text-tertiary);
    font-size: 10px;
    margin-bottom: 2px;
}

.book-row {
    display: flex;
    justify-content: space-between;
    padding: 1px 10px;
}

.book-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.book-price {
    margin: 0 auto;
    color: var(--text-secondary);
    font-weight: 600;
}

.book-size {
    width: 30%;
    text-align: left;
}

.book-size.bid {
    color: var(--positive);
}

.book-size.ask {
    color: var(--negative);
    text-align: right;
}

.book-spread-row {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 10px;
    padding: 2px 0;
    border-top: 1px dashed var(--border-subtle);
    border-bottom: 1px dashed var(--border-subtle);
    margin: 2px 0;
    opacity: 0.5;
}

/* Fill Info */
.trade-fill-info {
    margin-top: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fill-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
}

.fill-val {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--text-primary);
}

.fill-warn {
    color: #ffab00;
}

.trade-prices {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.trade-price-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex: 1;
}

.tp-label {
    font-size: 10px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tp-val {
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font-mono, monospace);
}

.trade-calc {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: var(--font-mono, monospace);
}

.trade-divider {
    border-top: 1px solid var(--border-subtle);
    margin: 4px 0;
}

.trade-row-half {
    gap: 16px;
}

.trade-row-half>div {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.trade-row-half label {
    min-width: 0;
}

.trade-preview {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.trade-preview-row {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    color: var(--text-secondary);
}

.trade-preview-row .pos {
    color: var(--positive);
    font-weight: 600;
}

.trade-preview-row .neg {
    color: var(--negative);
    font-weight: 600;
}

.trade-submit {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #6c9cff 0%, #8b5cf6 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.2s;
    letter-spacing: 0.02em;
}

.trade-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(108, 156, 255, 0.25);
}

.trade-submit:active {
    transform: translateY(0);
}

.trade-note {
    text-align: center;
    font-size: 10px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.btn-trade {
    padding: 3px 10px;
    border-radius: 5px;
    border: 1px solid rgba(108, 156, 255, 0.3);
    background: rgba(108, 156, 255, 0.08);
    color: #6c9cff;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font);
    transition: all 0.2s;
}

.btn-trade:hover {
    background: rgba(108, 156, 255, 0.18);
    border-color: #6c9cff;
}

/* ===== Empty & Loading ===== */
.empty-state {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-tertiary);
    font-size: 12px;
}

/* ===== Scan Progress Bar (non-blocking) ===== */
.scan-progress {
    position: sticky;
    top: 52px;
    z-index: 99;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0;
    transition: opacity 0.4s, max-height 0.4s;
    max-height: 40px;
    overflow: hidden;
}

.scan-progress.hidden {
    opacity: 0;
    max-height: 0;
    pointer-events: none;
    border-bottom-color: transparent;
}

.scan-progress-bar {
    height: 3px;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.scan-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--gold), #ff6b35, var(--gold));
    background-size: 200% 100%;
    border-radius: 0 2px 2px 0;
    transition: width 0.6s ease-out;
    animation: progressGlow 1.5s ease-in-out infinite;
}

@keyframes progressGlow {

    0%,
    100% {
        background-position: 0% 0;
    }

    50% {
        background-position: 100% 0;
    }
}

.scan-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 16px;
    font-size: 11px;
    color: var(--text-tertiary);
}

.scan-progress-info span:first-child {
    color: var(--text-secondary);
    font-weight: 500;
}

.spinner {
    width: 28px;
    height: 28px;
    border: 2.5px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}


.error-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 13, 19, 0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 200;
}

.error-overlay p {
    font-size: 13px;
    color: var(--negative);
    max-width: 400px;
    text-align: center;
    line-height: 1.5;
}

.retry-btn {
    padding: 8px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.2s;
}

.retry-btn:hover {
    background: var(--bg-card-hover);
}

.skeleton-card {
    height: 130px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.055) 50%, rgba(255, 255, 255, 0.03) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s ease infinite;
    border-radius: 8px;
    margin-bottom: 8px;
}

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

    100% {
        background-position: -200% 0
    }
}

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

    .side-panel {
        width: 100%;
    }
}

@media (max-width:600px) {
    header {
        padding: 0 12px;
        gap: 8px;
    }

    .header-tag {
        display: none;
    }

    .pf-summary {
        flex-wrap: wrap;
        gap: 12px;
    }
}

/* ===== TP/SL Gauge ===== */
.pf-tpsl {
    margin: 8px 0;
    padding: 6px 0;
}

.tpsl-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    margin-bottom: 4px;
}

.tpsl-labels .pos {
    color: var(--positive);
}

.tpsl-labels .neg {
    color: var(--negative);
}

.tpsl-bar {
    position: relative;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    overflow: visible;
}

.tpsl-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.tpsl-marker {
    position: absolute;
    top: -3px;
    width: 3px;
    height: 12px;
    background: #fff;
    border-radius: 2px;
    transform: translateX(-50%);
    transition: left 0.3s ease;
}

.tpsl-alert {
    font-size: 11px;
    font-weight: 700;
    margin-top: 6px;
    padding: 5px 10px;
    border-radius: 5px;
    animation: pulse 1.5s ease-in-out infinite;
}

.tpsl-alert.pos {
    background: rgba(0, 210, 160, 0.12);
    color: var(--positive);
}

.tpsl-alert.neg {
    background: rgba(255, 77, 90, 0.12);
    color: var(--negative);
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1
    }

    50% {
        opacity: 0.6
    }
}

.pf-card.tp-triggered {
    border-left: 3px solid var(--positive);
}

.pf-card.sl-triggered {
    border-left: 3px solid var(--negative);
}

.pf-card-btns {
    display: flex;
    gap: 6px;
}

.btn-close-watch {
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.2s;
}

.btn-close-watch:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

/* ===== History Cards ===== */
.hist-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 16px;
    transition: border-color 0.2s;
}

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

.hist-card.win {
    border-left: 3px solid var(--positive);
}

.hist-card.loss {
    border-left: 3px solid var(--negative);
}

.hist-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.hist-title {
    font-size: 13px;
    font-weight: 600;
    flex: 1;
    margin-right: 12px;
    line-height: 1.4;
}

.hist-outcome {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.hist-outcome.win {
    color: var(--positive);
}

.hist-outcome.loss {
    color: var(--negative);
}

.hist-meta {
    font-size: 10px;
    color: var(--text-tertiary);
    margin-bottom: 10px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hist-legs {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 10px;
}

.hist-leg {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 9px;
    background: var(--bg-card);
    border-radius: 5px;
    font-size: 11px;
}

.hist-leg-label {
    color: var(--text-secondary);
    flex: 1;
}

.hist-leg-side {
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 10px;
    margin: 0 6px;
}

.hist-leg-side.yes {
    background: rgba(0, 210, 160, 0.15);
    color: var(--positive);
}

.hist-leg-side.no {
    background: rgba(255, 77, 90, 0.15);
    color: var(--negative);
}

.hist-leg-prices {
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.hist-leg-legpnl {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    margin-left: 6px;
}

.hist-sparkline {
    margin: 4px 0 8px;
}

.hist-type-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hist-snapshots {
    font-size: 10px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
}

.stat-box {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 12px;
}

.stat-box-label {
    font-size: 10px;
    color: var(--text-tertiary);
    margin-bottom: 4px;
    letter-spacing: 0.03em;
}

.stat-box-value {
    font-size: 18px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.stat-box-value.pos {
    color: var(--positive);
}

.stat-box-value.neg {
    color: var(--negative);
}

.stat-box-value.neutral {
    color: var(--text-primary);
}

.stat-type-section {
    padding: 12px 20px;
}

.stat-type-title {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.stat-type-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: var(--bg-card);
    border-radius: 6px;
    font-size: 11px;
    margin-bottom: 4px;
}

.stat-type-name {
    color: var(--text-secondary);
}

.stat-type-stats {
    display: flex;
    gap: 12px;
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
}

.hist-clear-btn {
    font-size: 11px;
    padding: 5px 14px;
    border-radius: 6px;
    border: 1px solid rgba(255, 77, 90, 0.3);
    background: transparent;
    color: var(--negative);
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.2s;
}

.hist-clear-btn:hover {
    background: rgba(255, 77, 90, 0.1);
}

/* ===== Strategy View ===== */
.strat-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

.strat-hero {
    text-align: center;
    padding: 48px 20px 36px;
    margin-bottom: 32px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(14, 165, 233, 0.08));
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 16px;
}

.strat-hero-badge {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #818cf8;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.strat-hero-title {
    font-size: 32px;
    font-weight: 800;
    color: #f0f0f5;
    margin: 0 0 12px;
    letter-spacing: -0.5px;
}

.strat-hero-sub {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* Formula Card */
.strat-formula-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 36px;
    text-align: center;
}

.strat-formula-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 16px;
}

.strat-formula {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    font-family: var(--font-mono);
    font-size: 20px;
    color: #e2e8f0;
    margin-bottom: 16px;
}

.strat-f-main {
    color: #818cf8;
    font-weight: 700;
    font-size: 22px;
}

.strat-f-sep {
    color: var(--text-tertiary);
    font-size: 13px;
    font-style: italic;
}

.strat-f-detail {
    color: #94a3b8;
    font-size: 16px;
}

.strat-formula-note {
    font-size: 13px;
    color: var(--text-secondary);
}

.strat-sigma {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    font-size: 16px;
    font-family: var(--font-mono);
}

/* Section Titles */
.strat-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 40px 0 20px;
    padding-left: 12px;
    border-left: 3px solid #818cf8;
}

/* Three Layers */
.strat-layers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.strat-layer {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 24px;
    transition: border-color 0.3s, transform 0.2s;
}

.strat-layer:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.strat-layer:nth-child(1) {
    border-top: 2px solid #818cf8;
}

.strat-layer:nth-child(2) {
    border-top: 2px solid #0ea5e9;
}

.strat-layer:nth-child(3) {
    border-top: 2px solid #f59e0b;
}

.strat-layer-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.strat-layer-tag {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}

.strat-layer h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 10px;
}

.strat-layer p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 12px;
}

.strat-layer ul {
    margin: 0 0 14px;
    padding-left: 18px;
}

.strat-layer li {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    line-height: 1.5;
}

.strat-layer-output {
    font-size: 12px;
    color: var(--text-tertiary);
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
}

.strat-layer-output strong {
    color: #22d3ee;
}

/* Strategy Comparison Cards */
.strat-strategies {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.strat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.3s;
}

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

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

.strat-card-badge {
    font-size: 13px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 6px;
}

.badge-mm {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.badge-taker {
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.3);
}

.strat-card-diff {
    font-size: 12px;
    color: #f59e0b;
    letter-spacing: 1px;
}

.strat-card-body {
    padding: 20px;
}

.strat-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.strat-card-section {
    margin-bottom: 14px;
}

.strat-card-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 6px;
}

.strat-card-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.strat-risk {
    color: #f87171 !important;
}

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

.strat-card-tags span {
    font-size: 11px;
    padding: 3px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    color: var(--text-secondary);
}

.strat-card-meter {
    display: flex;
    align-items: center;
    gap: 12px;
}

.strat-card-meter span {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.meter-bar {
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, #818cf8, #a78bfa);
    flex-shrink: 0;
}

.meter-taker {
    background: linear-gradient(90deg, #0ea5e9, #38bdf8);
}

/* Knowledge Cards */
.strat-knowledge {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.strat-know-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 24px;
    transition: border-color 0.3s, transform 0.2s;
}

.strat-know-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.strat-know-icon {
    font-size: 28px;
    margin-bottom: 10px;
}

.strat-know-card h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px;
}

.strat-know-card ul {
    margin: 0;
    padding-left: 16px;
}

.strat-know-card li {
    font-size: 12.5px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    line-height: 1.5;
}

/* Getting Started Paths */
.strat-paths {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.strat-path {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 24px;
}

.strat-path-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.path-quant {
    background: rgba(139, 92, 246, 0.12);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.path-dev {
    background: rgba(14, 165, 233, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.25);
}

.strat-path-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.strat-step {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

.strat-step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #818cf8;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Insight Box */
.strat-insight {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.06), rgba(99, 102, 241, 0.06));
    border: 1px solid rgba(14, 165, 233, 0.15);
    border-radius: 12px;
    padding: 24px;
    margin: 36px 0 20px;
}

.strat-insight-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.strat-insight-text {
    font-size: 13.5px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.strat-insight-text strong {
    color: #38bdf8;
}

/* Warning Banner */
.strat-warning {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 10px;
    padding: 16px 24px;
}

/* Responsive */
@media (max-width: 900px) {

    .strat-layers,
    .strat-knowledge {
        grid-template-columns: 1fr;
    }

    .strat-strategies,
    .strat-paths {
        grid-template-columns: 1fr;
    }

    .strat-formula {
        flex-direction: column;
        gap: 8px;
    }
}