/* ==================== LAYOUT ==================== */
.builder-layout {
    display: grid;
    grid-template-columns: 240px 1fr 320px;
    height: calc(100vh - 64px);
    overflow: hidden;
}

/* ==================== SIDEBAR ==================== */
.builder-sidebar {
    background: var(--gray-900);
    border-right: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.sidebar-models { flex: 1; overflow-y: auto; padding: 20px 16px; }
.sidebar-help { flex-shrink: 0; padding: 16px; border-top: 1px solid rgba(255,255,255,0.06); background: var(--gray-900); }
.sidebar-title { font-size: 11px; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; }

.model-list { display: flex; flex-direction: column; gap: 4px; }
.model-item { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px; cursor: pointer; transition: background 0.15s; }
.model-item:hover { background: rgba(255,255,255,0.04); }
.model-item.active { background: rgba(34,197,94,0.12); }
.model-item.starter { border: 1px dashed rgba(34,197,94,0.3); }
.model-item.dragging { opacity: 0.4; background: rgba(34,197,94,0.2); }

.drag-grip { color: var(--gray-600); font-size: 10px; cursor: grab; user-select: none; margin-right: 4px; }
.drag-grip:active { cursor: grabbing; }
.model-icon { font-size: 14px; }
.model-info { flex: 1; min-width: 0; }
.model-name-text { font-size: 13px; font-weight: 500; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.model-meta { font-size: 11px; color: var(--gray-500); }
.starter-tag { font-size: 9px; background: rgba(34,197,94,0.2); color: var(--green-400); padding: 2px 5px; border-radius: 3px; margin-left: 4px; }

.new-model-btn { width: 100%; background: var(--green-500); color: var(--gray-950); border: none; padding: 10px; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; margin-top: 12px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.new-model-btn:hover { background: var(--green-400); }

.help-link { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; color: var(--gray-400); font-size: 13px; cursor: pointer; }
.help-link:hover { background: rgba(255,255,255,0.04); color: white; }

/* ==================== MAIN ==================== */
.builder-main { padding: 24px 32px; overflow-y: auto; background: var(--gray-950); height: 100%; }

.builder-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.builder-title { display: flex; align-items: center; gap: 8px; }

.model-name-input { background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 6px 10px; font-size: 20px; font-weight: 600; color: white; outline: none; max-width: 280px; }
.model-name-input:hover { border-color: rgba(255,255,255,0.1); }
.model-name-input:focus { border-color: var(--green-500); background: rgba(255,255,255,0.03); }

.edit-icon { font-size: 14px; cursor: pointer; opacity: 0.5; }
.edit-icon:hover { opacity: 1; }

.status-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.2); padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 500; color: var(--green-400); }
.status-badge::before { content: ''; width: 6px; height: 6px; background: var(--green-500); border-radius: 50%; }

.builder-actions { display: flex; gap: 8px; }
.btn-sm { padding: 8px 14px; font-size: 12px; }
.btn-danger:hover { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.5); color: #f87171; }

/* ==================== SECTIONS ==================== */
.builder-section { background: var(--gray-900); border: 1px solid rgba(255,255,255,0.06); border-radius: 14px; margin-bottom: 20px; }
.section-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; }
.section-title-group { display: flex; align-items: center; gap: 12px; }
.section-num { width: 28px; height: 28px; background: rgba(34,197,94,0.15); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: var(--green-400); }
.section-title-text h3 { font-size: 15px; font-weight: 600; color: white; margin: 0 0 2px 0; }
.section-title-text p { font-size: 12px; color: var(--gray-500); margin: 0; }

.status-pill { padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 500; background: rgba(255,255,255,0.05); color: var(--gray-400); }
.status-pill.complete { background: rgba(34,197,94,0.1); color: var(--green-400); }

.section-body { padding: 0 20px 20px; }

/* ==================== TARGET ==================== */
.target-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.target-card { background: var(--gray-850); border: 2px solid rgba(255,255,255,0.06); border-radius: 12px; padding: 18px; cursor: pointer; transition: all 0.2s; }
.target-card:hover { border-color: rgba(255,255,255,0.12); }
.target-card.selected { border-color: var(--green-500); background: rgba(34,197,94,0.05); }

.target-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.target-icon { width: 36px; height: 36px; background: rgba(255,255,255,0.05); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.target-card.selected .target-icon { background: rgba(34,197,94,0.15); }
.target-check { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.15); border-radius: 50%; font-size: 10px; display: flex; align-items: center; justify-content: center; color: transparent; }
.target-card.selected .target-check { border-color: var(--green-500); background: var(--green-500); color: var(--gray-950); }

.target-card h4 { font-size: 14px; font-weight: 600; color: white; margin: 0 0 4px 0; }
.target-card > p { font-size: 12px; color: var(--gray-500); margin: 0 0 10px 0; }
.target-outcomes { display: flex; flex-wrap: wrap; gap: 5px; }
.outcome-tag { font-size: 10px; padding: 3px 7px; background: rgba(255,255,255,0.05); border-radius: 4px; color: var(--gray-400); }
.target-card.selected .outcome-tag { background: rgba(34,197,94,0.12); color: var(--green-400); }

/* ==================== FEATURE TABS ==================== */
.feature-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.feature-tab { padding: 10px 16px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.08); background: transparent; color: var(--gray-400); font-size: 13px; font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.feature-tab:hover { border-color: rgba(255,255,255,0.15); color: white; }
.feature-tab.active { background: var(--green-500); border-color: var(--green-500); color: var(--gray-950); }

.info-icon { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; font-size: 9px; font-style: normal; font-weight: 600; background: rgba(255,255,255,0.15); border-radius: 50%; cursor: help; position: relative; }
.feature-tab.active .info-icon { background: rgba(0,0,0,0.2); }

.info-icon::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: var(--gray-800); border: 1px solid rgba(255,255,255,0.15); border-radius: 8px; padding: 10px 12px; width: 200px; font-size: 12px; font-weight: 400; color: var(--gray-300); line-height: 1.4; white-space: normal; opacity: 0; visibility: hidden; transition: all 0.15s; z-index: 100; pointer-events: none; box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.info-icon:hover::after { opacity: 1; visibility: visible; }

/* ==================== SUB FILTERS ==================== */
.sub-filters { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.04); border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; }
.sub-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.sub-row:last-child { margin-bottom: 0; }
.sub-label { font-size: 11px; color: var(--gray-500); min-width: 60px; }
.sub-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.sub-btn { padding: 5px 10px; border-radius: 5px; border: 1px solid rgba(255,255,255,0.08); background: transparent; color: var(--gray-400); font-size: 11px; cursor: pointer; }
.sub-btn:hover { border-color: rgba(255,255,255,0.2); color: white; }
.sub-btn.active { background: var(--green-500); border-color: var(--green-500); color: var(--gray-950); }

/* ==================== FEATURE GRID ==================== */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-height: 280px; overflow-y: auto; padding-right: 8px; }
.feature-grid::-webkit-scrollbar { width: 5px; }
.feature-grid::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

.feature-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--gray-850); border: 1px solid rgba(255,255,255,0.04); border-radius: 8px; cursor: pointer; }
.feature-item:hover { border-color: rgba(255,255,255,0.1); }
.feature-item.selected { border-color: var(--green-500); background: rgba(34,197,94,0.08); }

.feat-check { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.15); border-radius: 4px; font-size: 10px; display: flex; align-items: center; justify-content: center; color: transparent; flex-shrink: 0; }
.feature-item.selected .feat-check { border-color: var(--green-500); background: var(--green-500); color: var(--gray-950); }

.feat-info { flex: 1; min-width: 0; }
.feat-name { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 500; color: white; }
.feat-desc { font-size: 10px; color: var(--gray-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ==================== SELECTED ==================== */
.selected-section { margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.06); }
.selected-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.selected-header span { font-size: 13px; color: var(--gray-400); }
.selected-header strong { color: var(--green-400); font-family: 'JetBrains Mono', monospace; }
.clear-btn { background: none; border: none; color: var(--gray-500); font-size: 12px; cursor: pointer; }
.clear-btn:hover { color: var(--red-500); }

.selected-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.sel-tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.2); border-radius: 6px; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--green-400); }
.sel-tag button { background: none; border: none; color: var(--green-400); cursor: pointer; font-size: 14px; opacity: 0.6; padding: 0; }
.sel-tag button:hover { opacity: 1; }

.empty-msg { color: var(--gray-600); font-size: 12px; font-style: italic; }

/* ==================== CUSTOM SECTION ==================== */
.custom-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.custom-header h4 { font-size: 14px; color: white; margin: 0; }

.custom-builder { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; padding: 16px; margin-bottom: 16px; position: relative; }
.custom-builder h5 { font-size: 14px; color: white; margin: 0 0 4px 0; }
.custom-builder > p { font-size: 12px; color: var(--gray-500); margin: 0 0 14px 0; }

.builder-close { position: absolute; top: 12px; right: 12px; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.05); border-radius: 4px; color: var(--gray-400); cursor: pointer; font-size: 16px; }
.builder-close:hover { background: rgba(255,255,255,0.1); color: white; }

.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 12px; color: var(--gray-400); margin-bottom: 4px; }
.form-group input[type="text"] { width: 100%; background: var(--gray-850); border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; padding: 8px 10px; color: white; font-size: 13px; outline: none; }
.form-group input:focus { border-color: var(--green-500); }

.custom-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.custom-row .row-op { color: var(--gray-500); font-size: 14px; width: 16px; text-align: center; }
.custom-select { flex: 1; background: var(--gray-850); border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; padding: 8px; color: white; font-size: 12px; }
.custom-weight { width: 50px; background: var(--gray-850); border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; padding: 8px; color: white; font-size: 12px; text-align: center; }
.weight-pct { color: var(--gray-500); font-size: 12px; }
.row-remove { background: none; border: none; color: var(--gray-500); font-size: 16px; cursor: pointer; padding: 4px; }
.row-remove:hover { color: var(--red-500); }

.add-row-btn { background: none; border: 1px dashed rgba(255,255,255,0.15); border-radius: 6px; padding: 8px; color: var(--gray-400); font-size: 12px; cursor: pointer; width: 100%; margin-bottom: 12px; }
.add-row-btn:hover { border-color: var(--green-500); color: var(--green-400); }

.weight-total { font-size: 12px; color: var(--gray-400); margin-bottom: 12px; }
.weight-total span { font-weight: 600; color: white; }
.weight-error { color: var(--red-500); margin-left: 8px; }
.weight-ok { color: var(--green-400); margin-left: 8px; }

.formula-box { margin-bottom: 14px; }
.formula-box label { font-size: 11px; color: var(--gray-500); display: block; margin-bottom: 4px; }
.formula-text { background: var(--gray-850); border-radius: 6px; padding: 10px; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--green-400); }

.custom-list { margin-top: 8px; }
.custom-item { display: flex; justify-content: space-between; align-items: flex-start; background: var(--gray-850); border: 1px solid rgba(255,255,255,0.06); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.custom-item strong { font-size: 12px; color: white; }
.custom-item .formula-small { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--gray-500); }
.custom-item button { background: none; border: none; color: var(--gray-500); font-size: 16px; cursor: pointer; }
.custom-item button:hover { color: var(--red-500); }

/* ==================== DATA SPLIT ==================== */
.data-split-info { margin-bottom: 20px; }
.info-box { display: flex; gap: 14px; background: rgba(234,179,8,0.08); border: 1px solid rgba(234,179,8,0.2); border-radius: 10px; padding: 14px 16px; }
.info-icon-lg { font-size: 20px; }
.info-box strong { color: white; font-size: 13px; display: block; margin-bottom: 4px; }
.info-box p { color: var(--gray-400); font-size: 12px; margin: 0; line-height: 1.5; }

.data-column-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.data-label { font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 5px; }
.data-label.training { background: rgba(59,130,246,0.15); color: #60a5fa; }
.data-label.backtest { background: rgba(168,85,247,0.15); color: #c084fc; }
.data-count { font-size: 12px; color: var(--gray-500); }
.data-desc { font-size: 11px; color: var(--gray-500); margin-bottom: 12px; }

.year-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; padding-right: 4px; }
.year-list::-webkit-scrollbar { width: 5px; }
.year-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

.data-split-container { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.data-column { background: var(--gray-850); border-radius: 10px; padding: 14px; }

.year-block { background: var(--gray-900); border: 1px solid rgba(255,255,255,0.04); border-radius: 6px; }
.year-block.selected { border-color: rgba(255,255,255,0.1); }

.year-header { display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; }
.year-header:hover { background: rgba(255,255,255,0.02); }
.year-expand { font-size: 10px; color: var(--gray-500); width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 4px; flex-shrink: 0; }
.year-expand:hover { background: rgba(255,255,255,0.1); color: white; }
.year-header input[type="checkbox"] { accent-color: var(--green-500); flex-shrink: 0; }
.year-label { font-size: 13px; font-weight: 500; color: white; flex: 1; }
.year-count { font-size: 11px; color: var(--gray-500); flex-shrink: 0; }

.year-tournaments { padding: 0 12px 12px 44px; border-top: 1px solid rgba(255,255,255,0.04); display: flex; flex-direction: column; gap: 6px; max-height: 200px; overflow-y: auto; }
.year-tournaments::-webkit-scrollbar { width: 4px; }
.year-tournaments::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.tournament-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--gray-400); padding: 4px 0; }
.tournament-item input { accent-color: var(--green-500); flex-shrink: 0; }
.tournament-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ==================== MODEL TYPE ==================== */
.model-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.model-card { background: var(--gray-850); border: 2px solid rgba(255,255,255,0.06); border-radius: 12px; padding: 18px; text-align: center; cursor: pointer; }
.model-card:hover { border-color: rgba(255,255,255,0.12); }
.model-card.selected { border-color: var(--green-500); background: rgba(34,197,94,0.05); }

.model-card-icon { width: 44px; height: 44px; background: rgba(255,255,255,0.05); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; margin: 0 auto 10px; }
.model-card.selected .model-card-icon { background: rgba(34,197,94,0.15); }

.model-card h4 { font-size: 14px; font-weight: 600; color: white; margin: 0 0 4px 0; }
.model-card p { font-size: 12px; color: var(--gray-500); margin: 0 0 10px 0; }

.model-badge { display: inline-block; font-size: 10px; padding: 3px 8px; background: rgba(255,255,255,0.05); border-radius: 4px; color: var(--gray-400); }
.model-card.selected .model-badge { background: rgba(34,197,94,0.15); color: var(--green-400); }
.model-badge.rec { background: rgba(34,197,94,0.15); color: var(--green-400); }

.model-help-text { text-align: center; margin-top: 14px; font-size: 13px; color: var(--gray-500); cursor: pointer; }
.model-help-text:hover { color: var(--green-400); }

/* ==================== TRAIN ==================== */
.train-section { text-align: center; padding: 32px; background: linear-gradient(180deg, rgba(34,197,94,0.08) 0%, transparent 100%); border: 1px solid rgba(34,197,94,0.15); border-radius: 14px; margin-bottom: 40px; }

.train-btn { width: 100%; max-width: 400px; padding: 18px 40px; font-size: 18px; font-weight: 700; background: var(--green-500); color: var(--gray-950); border: none; border-radius: 12px; cursor: pointer; transition: all 0.2s; }
.train-btn:hover { background: var(--green-400); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(34,197,94,0.3); }

.train-hint { margin-top: 12px; font-size: 13px; color: var(--gray-500); }

/* ==================== RESULTS PANEL ==================== */
.results-panel { background: var(--gray-900); border-left: 1px solid rgba(255,255,255,0.06); padding: 20px; overflow-y: auto; height: 100%; }

.panel-title { font-size: 14px; font-weight: 600; color: white; margin-bottom: 16px; }

.results-card { background: var(--gray-850); border-radius: 10px; padding: 16px; margin-bottom: 14px; }
.card-title { font-size: 11px; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; }

.metric { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 13px; }
.metric:last-child { border-bottom: none; }
.metric span:first-child { color: var(--gray-400); display: flex; align-items: center; gap: 6px; }
.metric-val { font-family: 'JetBrains Mono', monospace; font-weight: 500; color: white; }

.imp-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.imp-name { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--gray-400); width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-bar { flex: 1; height: 6px; background: rgba(255,255,255,0.05); border-radius: 3px; overflow: hidden; }
.imp-fill { height: 100%; background: linear-gradient(90deg, var(--green-500), var(--green-400)); border-radius: 3px; }
.imp-pct { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--gray-500); width: 28px; text-align: right; }

/* ==================== BACKTEST ==================== */
.backtest-locked { text-align: center; padding: 12px 0; }
.backtest-locked p { font-size: 12px; color: var(--gray-500); margin-bottom: 12px; }

.backtest-btn { background: rgba(168,85,247,0.15); border: 1px solid rgba(168,85,247,0.3); color: #c084fc; padding: 10px 20px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.backtest-btn:hover { background: rgba(168,85,247,0.25); }
.backtest-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.backtest-results { }
.backtest-stat { margin-bottom: 14px; }
.backtest-stat:last-of-type { margin-bottom: 8px; }

.stat-header { display: flex; justify-content: space-between; margin-bottom: 6px; }
.stat-header span:first-child { font-size: 12px; color: var(--gray-400); }
.stat-value { font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 600; color: var(--green-400); }

.stat-bar { height: 6px; background: rgba(255,255,255,0.05); border-radius: 3px; overflow: hidden; margin-bottom: 4px; }
.stat-fill { height: 100%; background: linear-gradient(90deg, #c084fc, #a855f7); border-radius: 3px; transition: width 0.5s; }
.stat-fill.good { background: linear-gradient(90deg, var(--green-500), var(--green-400)); }

.stat-baseline { font-size: 11px; color: var(--gray-500); }
.stat-baseline .lift { color: var(--green-400); font-weight: 600; margin-left: 4px; }

.backtest-note { font-size: 11px; color: var(--gray-600); text-align: center; margin-top: 12px; font-style: italic; }

/* ==================== EXPORT ==================== */
.export-section { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.06); }

.export-btn { width: 100%; padding: 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.03); color: white; font-size: 13px; font-weight: 500; cursor: pointer; margin-bottom: 8px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.export-btn:hover { background: rgba(255,255,255,0.06); }
.export-btn.primary { background: var(--green-500); border-color: var(--green-500); color: var(--gray-950); }
.export-btn.primary:hover { background: var(--green-400); }
.export-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ==================== WARNING MODAL ==================== */
.warning-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.warning-modal {
    background: var(--gray-900);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    text-align: center;
}

.warning-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.warning-modal h3 {
    font-size: 20px;
    font-weight: 600;
    color: white;
    margin: 0 0 12px 0;
}

.warning-modal > p {
    font-size: 14px;
    color: var(--gray-400);
    margin: 0 0 16px 0;
}

.overlap-list {
    text-align: left;
    background: rgba(234,179,8,0.1);
    border: 1px solid rgba(234,179,8,0.2);
    border-radius: 8px;
    padding: 12px 16px 12px 32px;
    margin: 0 0 16px 0;
    color: var(--gray-300);
    font-size: 13px;
}

.overlap-list li {
    margin-bottom: 4px;
}

.overlap-list li:last-child {
    margin-bottom: 0;
}

.warning-explanation {
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 20px;
    text-align: left;
}

.warning-explanation p {
    font-size: 13px;
    color: var(--gray-400);
    margin: 0;
    line-height: 1.5;
}

.warning-actions {
    display: flex;
    gap: 12px;
}

.warning-actions .btn {
    flex: 1;
    padding: 12px 16px;
}

.btn-muted {
    opacity: 0.7;
}

.btn-muted:hover {
    opacity: 1;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1100px) {
    .builder-layout { grid-template-columns: 1fr; height: auto; }
    .builder-sidebar, .results-panel { display: none; }
    .builder-main { height: auto; overflow: visible; }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .model-cards, .data-split-container { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .feature-tabs { flex-direction: column; }
    .feature-grid, .target-cards { grid-template-columns: 1fr; }
}
