/* =========================================================================
   MULTIBAGGER SCREENER STYLES
   ========================================================================= */

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

.mb-badge-updated { font-size: 9px; color: #22c55e; font-weight: 700; text-transform: uppercase; border: 1px solid rgba(34,197,94,0.3); padding: 2px 6px; border-radius: 4px; background: rgba(34,197,94,0.1); }

.mb-header-right { display: flex; align-items: center; gap: 16px; }
.mb-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; }
.mb-dropdown .lbl { font-size: 9px; color: var(--text-muted); text-transform: uppercase; }
.mb-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; }
.mb-last-updated { font-size: 11px; color: var(--text-muted); text-align: right; padding: 0 8px; line-height: 1.4; }

.mb-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; }
.mb-btn-secondary:hover { background: var(--bg-hover); border-color: rgba(255,255,255,0.2); }
.mb-btn-icon { background: transparent; border: 1px solid var(--border-subtle); color: var(--text-secondary); width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s; }
.mb-btn-icon:hover { color: var(--text-primary); border-color: var(--text-muted); }


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

.mb-strat-card { flex: 1; min-width: 220px; background: transparent; border: 1px solid var(--border-subtle); border-radius: 8px; padding: 16px; display: flex; align-items: flex-start; gap: 16px; cursor: pointer; transition: 0.2s; }
.mb-strat-card:hover { border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.02); }
.mb-strat-card.selected { border-color: #a855f7; background: rgba(168, 85, 247, 0.05); }

.mb-sc-icon { font-size: 20px; }
.mb-sc-info { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.mb-sc-title { font-size: 13px; font-weight: 600; color: var(--text-primary); text-transform: uppercase; }
.mb-sc-desc { font-size: 11px; color: var(--text-secondary); line-height: 1.4; }


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

.mb-cond-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.mb-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; }
.mb-ccard-top { display: flex; align-items: flex-start; gap: 8px; }
.mb-ccard-top i { color: #22c55e; font-size: 14px; margin-top: 2px; }
.mb-ccard-top span { font-size: 12px; font-weight: 600; color: var(--text-primary); line-height: 1.3; }
.mb-ccard-stats { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--text-secondary); margin-top: auto; }
.mb-ccard-stats .m { color: #22c55e; font-weight: 600; font-size: 14px; }


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

/* 4a. Left Sidebar Filters */
.mb-sidebar { width: 240px; flex-shrink: 0; background: transparent; border: 1px solid var(--border-subtle); border-radius: 8px; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.mb-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; }
.mb-sidebar .sb-header h3 { font-size: 14px; font-weight: 600; margin: 0; color: var(--text-primary); text-transform: uppercase; }
.mb-sidebar .sb-clear { font-size: 11px; color: #7c3aed; cursor: pointer; }

.mb-sidebar .sb-group { display: flex; flex-direction: column; gap: 6px; }
.mb-sidebar .sb-group label { font-size: 11px; color: var(--text-secondary); font-weight: 500; }
.mb-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; }
.mb-sidebar .sb-range-inputs { display: flex; align-items: center; gap: 6px; }
.mb-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; }
.mb-sidebar .sb-range-inputs span { font-size: 10px; color: var(--text-muted); }

.mb-sidebar .sb-btn-apply { background: #6d28d9; border: none; color: #fff; padding: 10px; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer; transition: 0.2s; margin-top: 8px; }
.mb-sidebar .sb-btn-apply:hover { background: #5b21b6; }
.mb-sidebar .sb-more-filters { font-size: 11px; color: #8b5cf6; text-align: center; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }


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

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

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

.mb-table-wrapper { background: transparent; border: 1px solid var(--border-subtle); border-radius: 8px; overflow-x: auto; flex: 1; }
.mb-table { width: 100%; border-collapse: collapse; }
.mb-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; line-height: 1.3; }
.mb-table th:nth-child(2) { text-align: left; }
.mb-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; }
.mb-table tr:hover td { background: rgba(255,255,255,0.02); }
.mb-table tr.selected td { background: rgba(168, 85, 247, 0.1); }

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

.mb-val-mono { font-family: 'JetBrains Mono', monospace; font-weight: 500; }
.mb-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: 12px; margin: 0 auto; color: var(--text-primary); }
.mb-score-ring.g-high { border-color: #22c55e; }
.mb-score-ring.g-mid { border-color: #84cc16; }

/* Pagination */
.mb-bottom-bar { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; }
.mb-pag-text { font-size: 11px; color: var(--text-secondary); }
.mb-bottom-bar .pag-controls { display: flex; gap: 4px; }
.mb-bottom-bar .pag-controls button { background: transparent; 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; }
.mb-bottom-bar .pag-controls button.active { background: rgba(124, 58, 237, 0.2); border-color: #7c3aed; color: #a855f7; }
.mb-pag-rows { font-size: 11px; color: var(--text-secondary); }
.mb-pag-rows select { background: transparent; border: 1px solid var(--border-subtle); color: var(--text-primary); font-size: 11px; padding: 2px 4px; border-radius: 4px; }

.mb-disclaimer { font-size: 10px; color: var(--text-muted); line-height: 1.4; margin-top: 12px; }


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

.mdp-header { padding: 16px; border-bottom: 1px solid var(--border-subtle); position: relative; }
.mdp-close { position: absolute; top: 16px; right: 16px; font-size: 14px; color: var(--text-muted); cursor: pointer; }
.mdp-close:hover { color: var(--text-primary); }
.mdp-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin: 0 0 8px 0; padding-right: 20px; text-transform: uppercase; }
.mdp-badges { display: flex; gap: 8px; margin-bottom: 12px; }
.mdp-badge { background: rgba(255, 255, 255, 0.05); color: var(--text-secondary); border: 1px solid rgba(255, 255, 255, 0.1); padding: 2px 8px; border-radius: 4px; font-size: 10px; }
.mdp-badge.green { color: #22c55e; border-color: rgba(34,197,94,0.3); background: rgba(34,197,94,0.05); }

.mdp-price-row { display: flex; flex-direction: column; gap: 4px; }
.mdp-price-val { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; font-family: 'JetBrains Mono', monospace; }
.mdp-price-pct { font-size: 12px; color: #22c55e; font-weight: 500; font-family: 'JetBrains Mono', monospace; }
.mdp-mcap { font-size: 11px; color: var(--text-secondary); }

.mdp-section { padding: 16px; border-bottom: 1px solid var(--border-subtle); }
.mdp-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 */
.mdp-score-card { display: flex; gap: 20px; align-items: center; }
.mdp-big-score { display: flex; flex-direction: column; align-items: center; }
.mdp-bs-val { font-size: 32px; font-weight: 700; color: #22c55e; line-height: 1; font-family: 'JetBrains Mono', monospace; }
.mdp-bs-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.mdp-score-bars { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.mdp-bar-row { display: flex; align-items: center; font-size: 10px; }
.mdp-bar-lbl { width: 80px; color: var(--text-secondary); }
.mdp-bar-bg { flex: 1; height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; margin: 0 8px; }
.mdp-bar-fill { height: 100%; background: #22c55e; border-radius: 2px; }
.mdp-bar-val { width: 16px; text-align: right; color: var(--text-primary); font-weight: 600; font-family: 'JetBrains Mono', monospace; }

/* Mini Tables & Grids */
.mdp-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mdp-mini-table { width: 100%; font-size: 11px; }
.mdp-mini-table th { color: var(--text-muted); font-weight: 500; text-align: right; padding-bottom: 8px; font-size: 10px; }
.mdp-mini-table th:first-child { text-align: left; }
.mdp-mini-table th .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 4px; }
.mdp-mini-table td { color: var(--text-primary); text-align: right; padding: 4px 0; font-family: 'JetBrains Mono', monospace; }
.mdp-mini-table td:first-child { text-align: left; font-family: inherit; color: var(--text-secondary); }
.mdp-mini-table td.pos { color: #22c55e; }

.mdp-data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 11px; }
.mdp-dg-item { display: flex; justify-content: space-between; align-items: center; }
.mdp-dg-lbl { color: var(--text-secondary); }
.mdp-dg-val { color: var(--text-primary); font-family: 'JetBrains Mono', monospace; font-weight: 500; }

/* Ownership Donut */
.mdp-own-container { display: flex; align-items: center; gap: 20px; }
.mdp-own-left { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.mdp-own-right { flex: 1; }
.mdp-donut { width: 80px; height: 80px; border-radius: 50%; background: conic-gradient(#22c55e 0% 58.4%, #3b82f6 58.4% 69.6%, #ef4444 69.6% 78.2%, #8b5cf6 78.2% 100%); display: flex; align-items: center; justify-content: center; }
.mdp-donut-inner { width: 50px; height: 50px; border-radius: 50%; background: var(--bg-default); }
.mdp-leg-item { display: flex; align-items: center; justify-content: space-between; font-size: 10px; margin-bottom: 4px; }
.mdp-leg-lbl { display: flex; align-items: center; gap: 4px; color: var(--text-secondary); }
.mdp-leg-dot { width: 6px; height: 6px; border-radius: 50%; }
.mdp-leg-val { color: var(--text-primary); font-family: 'JetBrains Mono', monospace; }

/* Valuation / Risk Check */
.mdp-status-pill { font-size: 10px; color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.3); padding: 2px 6px; border-radius: 12px; background: rgba(34, 197, 94, 0.05); display: inline-block; margin-bottom: 12px; }
.mdp-risk-list { display: flex; flex-direction: column; gap: 8px; font-size: 11px; }
.mdp-risk-item { display: flex; align-items: flex-start; gap: 6px; color: var(--text-primary); }
.mdp-risk-item i.ok { color: #22c55e; margin-top: 2px; }
.mdp-risk-item i.warn { color: #f59e0b; margin-top: 2px; }

/* Button */
.mdp-btn-full { display: block; width: calc(100% - 32px); margin: 16px; background: #6d28d9; 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; }
.mdp-btn-full:hover { background: #5b21b6; }
