/* ══════════════════════════════════════════════════════
   PAGES — Стили для специфичных страниц/секций
   ══════════════════════════════════════════════════════ */

/* ── Welcome Screen ────────────────────────────────── */
.welcome-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--header-height) - var(--statusbar-height) - 40px);
    text-align: center;
    padding: 40px 20px;
}
.welcome-icon { font-size: 56px; margin-bottom: 16px; }
.welcome-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ffd54f, #ffb300, #fff);
    background-size: 200% auto;
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 6s ease-in-out infinite;
}
.welcome-sub { color: var(--text-muted); margin-bottom: 36px; font-size: 14px; font-weight: 500; }
.welcome-features { display: flex; justify-content: center; gap: 32px; margin-bottom: 40px; flex-wrap: wrap; }
.welcome-feat { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); }
.welcome-feat-icon {
    width: 48px; height: 48px;
    border-radius: 14px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
}

/* ── Dashboard Page — Master Signal ────────────────── */
.master-signal {
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 16px;
}
.master-signal.ms-buy   { border-color: rgba(0,212,170,0.2); }
.master-signal.ms-sell  { border-color: rgba(255,71,87,0.2); }
.master-signal.ms-hold  { border-color: rgba(255,179,71,0.2); }

.ms-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    background: var(--surface-1);
    flex-wrap: wrap;
}
.ms-verdict-wrap { display: flex; align-items: center; gap: 12px; }
.ms-icon { font-size: 28px; }
.ms-verdict {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.ms-verdict.buy  { color: var(--accent-green); }
.ms-verdict.sell { color: var(--accent-red); }
.ms-verdict.hold { color: var(--accent-yellow); }
.ms-score {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 6px;
    background: var(--surface-2);
    border: 1px solid var(--border);
}
.ms-confidence-wrap { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 180px; }
.ms-conf-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 700; white-space: nowrap; }
.ms-conf-bar-bg { flex: 1; height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.ms-conf-bar-fill { height: 100%; border-radius: 4px; transition: width 0.6s ease; }
.ms-conf-value { font-family: var(--font-mono); font-size: 14px; font-weight: 700; min-width: 40px; text-align: right; }
.ms-modules { font-size: 11px; color: var(--text-muted); font-weight: 600; padding: 4px 12px; border-radius: 20px; background: var(--surface-1); border: 1px solid var(--border); }

.ms-summary { padding: 10px 20px; font-size: 13px; color: var(--text-secondary); line-height: 1.6; border-bottom: 1px solid var(--border); background: var(--surface-1); }

.ms-reasons-wrap { display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 800px) { .ms-reasons-wrap { grid-template-columns: 1fr; } }
.ms-reasons-col { padding: 12px 16px; }
.ms-reasons-col:first-child { border-right: 1px solid var(--border); }
.ms-reasons-title { font-size: 11px; font-weight: 800; letter-spacing: 0.5px; margin-bottom: 8px; text-transform: uppercase; }
.ms-reasons-title-buy  { color: var(--accent-green); }
.ms-reasons-title-sell { color: var(--accent-red); }
.ms-reasons-list { display: flex; flex-direction: column; gap: 4px; }
.ms-reason {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 5px 8px; border-radius: var(--radius-xs);
    background: var(--surface-1); border: 1px solid var(--border);
    font-size: 12px; line-height: 1.4;
    transition: all var(--transition-fast);
}
.ms-reason:hover { background: var(--surface-2); border-color: var(--border-light); }
.ms-reason-icon { font-size: 13px; flex-shrink: 0; margin-top: 1px; }
.ms-reason-text { color: var(--text-primary); flex: 1; }
.ms-reason-strength {
    font-family: var(--font-mono); font-size: 10px; font-weight: 700;
    padding: 2px 6px; border-radius: 4px; flex-shrink: 0;
}
.ms-reason-strength.buy-str  { background: rgba(0,212,170,0.1); color: var(--accent-green); }
.ms-reason-strength.sell-str { background: rgba(255,71,87,0.1); color: var(--accent-red); }

.ms-levels {
    display: flex; gap: 8px; padding: 10px 20px; flex-wrap: wrap;
    border-top: 1px solid var(--border); background: var(--surface-1);
}
.ms-level-chip {
    font-family: var(--font-mono); font-size: 11px; font-weight: 700;
    padding: 5px 12px; border-radius: 6px; border: 1px solid var(--border);
}
.ms-entry { background: rgba(77,171,247,0.1); color: var(--accent-blue); border-color: rgba(77,171,247,0.25); }
.ms-sl    { background: rgba(255,71,87,0.1); color: var(--accent-red); border-color: rgba(255,71,87,0.25); }
.ms-tp    { background: rgba(0,212,170,0.1); color: var(--accent-green); border-color: rgba(0,212,170,0.25); }
.ms-tp2   { background: rgba(0,212,170,0.07); color: var(--accent-green); border-color: rgba(0,212,170,0.2); }
.ms-rr    { background: rgba(255,179,71,0.1); color: var(--accent-yellow); border-color: rgba(255,179,71,0.25); }

.ms-enhancements { padding: 8px 20px 12px; border-top: 1px solid var(--border); }
.ms-enh-row { display: flex; gap: 6px; flex-wrap: wrap; }
.ms-enh-chip {
    font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 6px;
    background: var(--surface-1); border: 1px solid var(--border);
    color: var(--text-secondary); white-space: nowrap; transition: background var(--transition-fast);
}
.ms-enh-chip.good { background: rgba(0,212,170,0.08); color: var(--accent-green); border-color: rgba(0,212,170,0.2); }
.ms-enh-chip.warn { background: rgba(255,179,71,0.08); color: var(--accent-yellow); border-color: rgba(255,179,71,0.2); }
.ms-enh-chip.bad  { background: rgba(255,71,87,0.08); color: var(--accent-red); border-color: rgba(255,71,87,0.2); }
.ms-enh-detail { margin-top: 6px; padding: 6px 10px; background: var(--surface-1); border-radius: 6px; font-size: 11px; color: var(--text-muted); line-height: 1.6; }

/* ── Chart Page ────────────────────────────────────── */
.chart-container { width: 100%; height: 560px; }

/* ── Prediction Card ───────────────────────────────── */
.prob-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.prob-label { width: 65px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.prob-bar-bg { flex: 1; height: 18px; background: var(--surface-2); border-radius: 9px; overflow: hidden; }
.prob-bar {
    height: 100%; border-radius: 9px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.prob-bar::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}
.prob-pct { font-family: var(--font-mono); font-size: 12px; font-weight: 700; width: 50px; text-align: right; }

/* ── Trajectory ────────────────────────────────────── */
.traj-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.traj-item { padding: 10px; background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.traj-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.traj-val { font-family: var(--font-mono); font-size: 15px; font-weight: 700; }
.traj-direction { grid-column: 1 / -1; text-align: center; padding: 10px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.traj-direction.up      { background: rgba(0,212,170,0.1); color: var(--accent-green); border: 1px solid rgba(0,212,170,0.2); }
.traj-direction.down    { background: rgba(255,71,87,0.1); color: var(--accent-red); border: 1px solid rgba(255,71,87,0.2); }
.traj-direction.neutral { background: rgba(255,179,71,0.1); color: var(--accent-yellow); border: 1px solid rgba(255,179,71,0.2); }
.traj-range { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 11px; }
.traj-range-bar { flex: 1; height: 5px; background: linear-gradient(90deg, var(--accent-red), var(--accent-yellow), var(--accent-green)); border-radius: 3px; position: relative; }
.traj-range-marker { width: 11px; height: 11px; background: white; border: 2px solid var(--bg-primary); border-radius: 50%; position: absolute; top: -3px; transform: translateX(-50%); box-shadow: 0 0 6px rgba(255,255,255,0.4); }

/* ── Trade Levels ──────────────────────────────────── */
.trade-levels-grid { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.trade-level-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px; border-radius: var(--radius-sm);
    background: var(--surface-1); border: 1px solid var(--border);
}
.trade-level-row .level-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; }
.trade-level-row .level-price { font-family: var(--font-mono); font-size: 14px; font-weight: 700; }
.trade-level-row.entry .level-label { color: var(--text-secondary); }
.trade-level-row.sl .level-label, .trade-level-row.sl .level-price { color: var(--accent-red); }
.trade-level-row.tp1 .level-label, .trade-level-row.tp1 .level-price { color: var(--accent-green); }
.trade-level-row.tp2 .level-label, .trade-level-row.tp2 .level-price { color: var(--accent-cyan); }
.trade-rr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }

/* ── Patterns Grid ─────────────────────────────────── */
.patterns-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.pattern-card {
    padding: 7px 10px; background: var(--surface-1); border: 1px solid var(--border);
    border-radius: var(--radius-sm); display: flex; justify-content: space-between; align-items: center;
    transition: all var(--transition-fast);
}
.pattern-card:hover { background: var(--surface-2); border-color: var(--border-light); }
.pattern-name { font-size: 11px; font-weight: 500; color: var(--text-secondary); }
.pattern-count { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--accent-blue); }

/* ── Feature importance ────────────────────────────── */
.feat-row { display: flex; align-items: center; gap: 10px; padding: 3px 0; }
.feat-name { width: 130px; font-size: 11px; font-family: var(--font-mono); color: var(--text-muted); flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feat-bar-bg { flex: 1; height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.feat-bar { height: 100%; background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple)); border-radius: 3px; transition: width 0.6s ease; }

/* ── Backtest ──────────────────────────────────────── */
.bt-equity { width: 100%; height: 80px; }
.bt-trades-list { max-height: 200px; overflow-y: auto; }
.bt-trade-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 4px 8px; font-size: 10px; border-bottom: 1px solid var(--border);
}
.bt-trade-row:hover { background: var(--surface-1); }

/* ── Strategy Cards ────────────────────────────────── */
.strat-item {
    padding: 10px 12px; background: var(--surface-1); border: 1px solid var(--border);
    border-radius: var(--radius-sm); margin-bottom: 6px; transition: all var(--transition-fast);
}
.strat-item:hover { background: var(--surface-2); border-color: var(--border-light); }
.strat-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.strat-name { font-size: 12px; font-weight: 700; }
.strat-signal-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 10px; border-radius: 50px;
    font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
}
.strat-signal-badge.long    { background: rgba(0,212,170,0.15); color: var(--accent-green); }
.strat-signal-badge.short   { background: rgba(255,71,87,0.15); color: var(--accent-red); }
.strat-signal-badge.neutral { background: var(--surface-2); color: var(--text-muted); }
.strat-conf-bar { height: 4px; border-radius: 2px; background: var(--surface-2); margin: 6px 0 4px; }
.strat-conf-fill { height: 100%; border-radius: 2px; transition: width 0.5s ease; }
.strat-rationale { font-size: 10px; color: var(--text-muted); line-height: 1.4; }
.strat-levels { display: flex; gap: 8px; margin-top: 6px; font-family: var(--font-mono); font-size: 10px; }
.strat-level-chip { padding: 2px 8px; border-radius: 4px; font-weight: 600; }
.strat-level-entry { background: rgba(77,171,247,0.12); color: #4dabf7; }
.strat-level-sl    { background: rgba(255,71,87,0.12); color: var(--accent-red); }
.strat-level-tp    { background: rgba(0,212,170,0.12); color: var(--accent-green); }

/* ── SMC specific ──────────────────────────────────── */
.smc-break {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 3px 10px; border-radius: 50px;
    font-size: 10px; font-weight: 700; margin: 2px; letter-spacing: 0.3px;
    transition: transform var(--transition-fast);
}
.smc-break:hover { transform: scale(1.05); }
.smc-break.bos-bull   { background: rgba(0,212,170,0.1); color: var(--accent-green); }
.smc-break.bos-bear   { background: rgba(255,71,87,0.1); color: var(--accent-red); }
.smc-break.choch-bull { background: rgba(0,212,170,0.2); color: #4cdfcb; border: 1px solid rgba(0,212,170,0.3); }
.smc-break.choch-bear { background: rgba(255,71,87,0.2); color: #ff8a80; border: 1px solid rgba(255,71,87,0.3); }

/* ── Wyckoff specific ──────────────────────────────── */
.wyckoff-event {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 10px; background: var(--surface-1); border: 1px solid var(--border);
    border-radius: var(--radius-sm); margin-bottom: 4px; font-size: 12px;
    transition: all var(--transition-fast);
}
.wyckoff-event:hover { background: var(--surface-2); }
.wyckoff-event-badge {
    font-family: var(--font-mono); font-size: 10px; font-weight: 800;
    padding: 2px 8px; border-radius: 50px; min-width: 48px; text-align: center;
}
.wyckoff-vsa-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 5px 10px; background: var(--surface-1); border: 1px solid var(--border);
    border-radius: var(--radius-sm); margin-bottom: 3px; font-size: 11px;
}
.wyckoff-vsa-signal {
    font-family: var(--font-mono); font-size: 10px; font-weight: 700;
    padding: 2px 8px; border-radius: 50px;
}

/* ══════════════════════════════════════════════════════
   ADDITIONAL CLASSES for renderers.js
   ══════════════════════════════════════════════════════ */

/* ── Stat rows ─────────────────────────────────────── */
.stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 12px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.stat-row:last-child { border-bottom: none; }

/* ── Probability bars ──────────────────────────────── */
.prob-bar-wrap { margin-bottom: 6px; }
.prob-label {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 3px;
    color: var(--text-secondary);
}
.prob-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s ease;
}
.prob-fill.bull { background: linear-gradient(90deg, rgba(0,212,170,0.4), var(--accent-green)); }
.prob-fill.bear { background: linear-gradient(90deg, rgba(255,71,87,0.4), var(--accent-red)); }

/* ── Feature importance rows ───────────────────────── */
.feature-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
}
.feature-name {
    width: 120px;
    flex-shrink: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    color: var(--text-muted);
}
.feature-bar-wrap {
    flex: 1;
    height: 6px;
    background: var(--surface-2);
    border-radius: 3px;
    overflow: hidden;
}
.feature-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}
.feature-bar.bull { background: linear-gradient(90deg, var(--accent-blue), var(--accent-green)); }
.feature-bar.bear { background: linear-gradient(90deg, var(--accent-red), #ff8a80); }
.feature-value {
    width: 55px;
    flex-shrink: 0;
    text-align: right;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
}

/* ── Signal list items ─────────────────────────────── */
.signal-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.signal-item:last-child { border-bottom: none; }

/* ── Pattern chips ─────────────────────────────────── */
.pattern-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ── Strategy card (inline) ────────────────────────── */
.strategy-card {
    padding: 10px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}
.strategy-card:hover { background: var(--surface-2); border-color: var(--border-light); }

/* ── MS reason items ───────────────────────────────── */
.ms-reason-item {
    font-size: 11px;
    color: var(--text-secondary);
    padding: 3px 8px;
    border-left: 2px solid var(--border);
    margin-bottom: 3px;
    line-height: 1.4;
}
.ms-reasons-col .ms-reason-item:nth-child(odd) { background: rgba(255,255,255,0.015); }

/* ── MS verdict colors ─────────────────────────────── */
.ms-verdict.ms-buy { color: var(--accent-green); }
.ms-verdict.ms-sell { color: var(--accent-red); }
.ms-verdict.ms-neutral { color: var(--accent-yellow); }

/* ── Confidence bar fills ──────────────────────────── */
.ms-conf-bar-fill.ms-buy { background: linear-gradient(90deg, rgba(0,212,170,0.3), var(--accent-green)); }
.ms-conf-bar-fill.ms-sell { background: linear-gradient(90deg, rgba(255,71,87,0.3), var(--accent-red)); }
.ms-conf-bar-fill.ms-neutral { background: linear-gradient(90deg, rgba(255,179,71,0.3), var(--accent-yellow)); }

/* ── Traj target (inline) ──────────────────────────── */
.traj-target {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 12px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.traj-target small { font-size: 10px; color: var(--text-muted); }

/* ── Tab content ───────────────────────────────────── */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Zone items ────────────────────────────────────── */
.zone-item { padding: 2px 0; }

/* ── Page visibility ───────────────────────────────── */
.page-content { display: none; }
.page-content.active { display: block; }

/* ── Header price colors ───────────────────────────── */
.header-price.bullish { color: var(--accent-green); }
.header-price.bearish { color: var(--accent-red); }
.header-price.flash { animation: pulse 0.4s ease; }
