/* =========================================================================
   LONG TERM VALUE SCREENER STYLES
   ========================================================================= */

/* 1. Header */
.ltv-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border-subtle); }
.ltv-header-left { display: flex; gap: 24px; align-items: center; }
.ltv-title-block { display: flex; gap: 12px; align-items: center; }
.ltv-icon-diamond { font-size: 32px; color: #6366f1; background: rgba(99, 102, 241, 0.1); width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid rgba(99, 102, 241, 0.2); }
.ltv-title-text { display: flex; flex-direction: column; gap: 4px; }
.ltv-title { font-size: 24px; font-weight: 700; color: var(--text-primary); margin: 0; }
.ltv-subtitle { font-size: 13px; color: var(--text-secondary); }

.ltv-badge-updated { display: flex; flex-direction: column; gap: 2px; }
.ltv-badge-updated .lbl { font-size: 9px; color: #22c55e; font-weight: 700; text-transform: uppercase; }
.ltv-badge-updated .val { font-size: 12px; color: var(--text-primary); }

.ltv-header-right { display: flex; align-items: center; gap: 16px; }
.ltv-dropdown { display: flex; flex-direction: column; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: 6px; padding: 4px 12px; min-width: 120px; }
.ltv-dropdown .lbl { font-size: 9px; color: var(--text-muted); text-transform: uppercase; }
.ltv-dropdown select { background: transparent; border: none; color: var(--text-primary); font-size: 13px; font-weight: 500; outline: none; cursor: pointer; padding: 0; appearance: none; padding-right: 16px; position: relative; }
.ltv-last-updated { font-size: 12px; color: var(--text-muted); padding: 0 8px; }

.ltv-btn-secondary { background: var(--bg-surface); border: 1px solid var(--border-subtle); color: var(--text-primary); padding: 8px 16px; border-radius: 6px; font-size: 13px; font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: 0.2s; }
.ltv-btn-secondary:hover { background: var(--bg-hover); border-color: rgba(255,255,255,0.2); }


/* 2. Top Strategy Cards */
.ltv-cards-container { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 16px; }
.ltv-cards-container::-webkit-scrollbar { height: 6px; }
.ltv-cards-container::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

.ltv-strat-card { flex: 1; min-width: 240px; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: 8px; padding: 16px; display: flex; align-items: flex-start; gap: 16px; cursor: pointer; transition: 0.2s; }
.ltv-strat-card:hover { border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.02); }
.ltv-strat-card.selected { border-color: #6366f1; background: rgba(99, 102, 241, 0.05); }

.ltv-sc-icon { font-size: 24px; }
.ltv-sc-info { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ltv-sc-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.ltv-sc-desc { font-size: 11px; color: var(--text-secondary); line-height: 1.4; }
.ltv-sc-stocks { font-size: 13px; font-weight: 600; color: #6366f1; margin-top: 4px; }
.ltv-strat-card.selected .ltv-sc-stocks { color: #818cf8; }


/* 3. Conditions Section */
.ltv-cond-section { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: 8px; padding: 16px; margin-bottom: 24px; }
.ltv-cond-pills { display: flex; gap: 12px; margin-bottom: 16px; overflow-x: auto; }
.ltv-cond-pills::-webkit-scrollbar { display: none; }
.ltv-pill { background: transparent; border: 1px solid transparent; color: var(--text-secondary); padding: 6px 16px; border-radius: 20px; font-size: 12px; font-weight: 500; cursor: pointer; transition: 0.2s; white-space: nowrap; }
.ltv-pill:hover { color: var(--text-primary); }
.ltv-pill.active { background: #4f46e5; color: #fff; }

.ltv-cond-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.ltv-ccard { background: rgba(0,0,0,0.2); border: 1px solid var(--border-subtle); border-radius: 6px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.ltv-ccard-top { display: flex; align-items: center; gap: 8px; }
.ltv-ccard-top i { color: #22c55e; font-size: 14px; }
.ltv-ccard-top span { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.ltv-ccard-stats { display: flex; flex-direction: column; gap: 4px; padding-left: 22px; font-size: 11px; color: var(--text-secondary); }
.ltv-ccard-stats .m { color: #22c55e; }


/* 4. Main 3-Pane Layout */
.ltv-main-layout { display: flex; gap: 16px; }

/* 4a. Left Sidebar Filters */
.ltv-sidebar { width: 220px; flex-shrink: 0; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: 8px; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.ltv-sidebar .sb-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-subtle); padding-bottom: 12px; margin-bottom: 4px; }
.ltv-sidebar .sb-header h3 { font-size: 14px; font-weight: 600; margin: 0; color: var(--text-primary); }
.ltv-sidebar .sb-clear { font-size: 11px; color: #6366f1; cursor: pointer; }

.ltv-sidebar .sb-group { display: flex; flex-direction: column; gap: 6px; }
.ltv-sidebar .sb-group label { font-size: 11px; color: var(--text-secondary); font-weight: 500; }
.ltv-sidebar .sb-group select { background: transparent; border: 1px solid var(--border-subtle); color: var(--text-primary); font-size: 12px; border-radius: 4px; padding: 6px 8px; outline: none; cursor: pointer; appearance: none; }
.ltv-sidebar .sb-range-inputs { display: flex; align-items: center; gap: 6px; }
.ltv-sidebar .sb-range-inputs input { flex: 1; width: 0; background: transparent; border: 1px solid var(--border-subtle); color: var(--text-primary); font-size: 12px; border-radius: 4px; padding: 6px 8px; outline: none; text-align: center; }
.ltv-sidebar .sb-range-inputs span { font-size: 10px; color: var(--text-muted); }

.ltv-sidebar .sb-btn-apply { background: #4f46e5; border: none; color: #fff; padding: 10px; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer; transition: 0.2s; margin-top: 8px; }
.ltv-sidebar .sb-btn-apply:hover { background: #4338ca; }
.ltv-sidebar .sb-more-filters { font-size: 11px; color: #6366f1; text-align: center; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.ltv-disclaimer { font-size: 10px; color: var(--text-muted); line-height: 1.4; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-subtle); }


/* 4b. Center Table Area */
.ltv-table-area { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.ltv-rh { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.ltv-rh-left { display: flex; align-items: center; gap: 16px; }
.ltv-rh-title { font-size: 14px; font-weight: 600; color: #22c55e; margin: 0; }
.ltv-sort { font-size: 12px; color: var(--text-secondary); cursor: pointer; }

.ltv-rh-right { display: flex; gap: 8px; }

.ltv-table-wrapper { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: 8px; overflow-x: auto; flex: 1; }
.ltv-table { width: 100%; border-collapse: collapse; }
.ltv-table th { font-size: 10px; font-weight: 600; color: var(--text-muted); text-align: center; padding: 10px; border-bottom: 1px solid var(--border-subtle); white-space: nowrap; }
.ltv-table th:nth-child(2) { text-align: left; }
.ltv-table td { padding: 12px 10px; border-bottom: 1px solid rgba(255,255,255,0.03); font-size: 12px; color: var(--text-primary); vertical-align: middle; white-space: nowrap; cursor: pointer; transition: 0.1s; }
.ltv-table tr:hover td { background: rgba(255,255,255,0.02); }
.ltv-table tr.selected td { background: rgba(99, 102, 241, 0.1); }

.ltv-sym-col { display: flex; align-items: center; gap: 10px; }
.ltv-logo { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: #fff; }
.ltv-sym-text { display: flex; flex-direction: column; gap: 2px; }
.ltv-sym-main { font-weight: 600; color: #818cf8; font-size: 12px; }
.ltv-sym-sub { font-size: 10px; color: var(--text-secondary); }

.ltv-val-mono { font-family: 'JetBrains Mono', monospace; font-weight: 500; }
.ltv-price-block { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.ltv-price-sub { font-size: 10px; font-family: 'JetBrains Mono', monospace; }
.ltv-price-sub.pos { color: #22c55e; }
.ltv-price-sub.neg { color: #ef4444; }

.ltv-score-ring { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #22c55e; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; margin: 0 auto; }

/* Pagination */
.ltv-bottom-bar { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; }
.ltv-pag-text { font-size: 11px; color: var(--text-secondary); }
.ltv-bottom-bar .pag-controls { display: flex; gap: 4px; }
.ltv-bottom-bar .pag-controls button { background: var(--bg-surface); border: 1px solid var(--border-subtle); color: var(--text-secondary); width: 24px; height: 24px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 10px; cursor: pointer; }
.ltv-bottom-bar .pag-controls button.active { background: rgba(79, 70, 229, 0.2); border-color: #4f46e5; color: #818cf8; }
.ltv-pag-rows { font-size: 11px; color: var(--text-secondary); }
.ltv-pag-rows select { background: transparent; border: 1px solid var(--border-subtle); color: var(--text-primary); font-size: 11px; padding: 2px 4px; border-radius: 4px; }


/* 4c. Right Details Panel */
.ltv-details-panel { width: 340px; flex-shrink: 0; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: 8px; display: none; flex-direction: column; overflow-y: auto; max-height: 800px; }
.ltv-details-panel.open { display: flex; }
.ltv-details-panel::-webkit-scrollbar { width: 6px; }
.ltv-details-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

.dp-header { padding: 16px; border-bottom: 1px solid var(--border-subtle); position: relative; }
.dp-close { position: absolute; top: 16px; right: 16px; font-size: 14px; color: var(--text-muted); cursor: pointer; }
.dp-close:hover { color: var(--text-primary); }
.dp-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin: 0 0 8px 0; padding-right: 20px; }
.dp-badges { display: flex; gap: 8px; margin-bottom: 12px; }
.dp-badge { background: rgba(99, 102, 241, 0.1); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.2); padding: 2px 6px; border-radius: 4px; font-size: 10px; }
.dp-price-row { display: flex; flex-direction: column; gap: 4px; }
.dp-price-val { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.dp-price-pct { font-size: 12px; color: #22c55e; font-weight: 500; }
.dp-mcap { font-size: 11px; color: var(--text-secondary); }

.dp-section { padding: 16px; border-bottom: 1px solid var(--border-subtle); }
.dp-sec-title { font-size: 11px; font-weight: 700; color: #eab308; text-transform: uppercase; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }

/* Score Card */
.dp-score-card { display: flex; gap: 20px; align-items: center; }
.dp-big-score { display: flex; flex-direction: column; align-items: center; }
.dp-bs-val { font-size: 28px; font-weight: 700; color: #22c55e; line-height: 1; }
.dp-bs-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.dp-score-bars { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.dp-bar-row { display: flex; align-items: center; font-size: 10px; }
.dp-bar-lbl { width: 70px; color: var(--text-secondary); }
.dp-bar-bg { flex: 1; height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; margin: 0 8px; }
.dp-bar-fill { height: 100%; background: #22c55e; border-radius: 2px; }
.dp-bar-val { width: 16px; text-align: right; color: var(--text-primary); font-weight: 600; }

/* Status text */
.dp-status-text { font-size: 10px; color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.3); padding: 2px 6px; border-radius: 12px; }

/* Mini Tables */
.dp-mini-table { width: 100%; font-size: 11px; }
.dp-mini-table th { color: var(--text-muted); font-weight: 500; text-align: right; padding-bottom: 8px; }
.dp-mini-table th:first-child { text-align: left; }
.dp-mini-table td { color: var(--text-primary); text-align: right; padding: 4px 0; font-family: 'JetBrains Mono', monospace; }
.dp-mini-table td:first-child { text-align: left; font-family: inherit; color: var(--text-secondary); }
.dp-mini-table td.pos { color: #22c55e; }
.dp-mini-table td.neg { color: #ef4444; }

/* Health Badges */
.dp-health-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; font-size: 11px; }
.dp-hg-item { display: flex; justify-content: space-between; }
.dp-hg-lbl { color: var(--text-secondary); }
.dp-hg-val { color: var(--text-primary); font-family: 'JetBrains Mono', monospace; }
.dp-hg-badge { display: flex; align-items: center; gap: 4px; color: #22c55e; font-weight: 500; }

/* Button */
.dp-btn-full { display: block; width: calc(100% - 32px); margin: 16px; background: #4f46e5; color: #fff; text-align: center; padding: 12px; border-radius: 6px; text-decoration: none; font-size: 13px; font-weight: 600; transition: 0.2s; border: none; cursor: pointer; }
.dp-btn-full:hover { background: #4338ca; }
