.ff-wrap{padding:16px;color:var(--t1)}
.ff-head{display:flex;align-items:center;gap:12px;margin-bottom:12px}
.ff-badge{font-size:12px;color:var(--t2);border:1px solid var(--bd);border-radius:10px;padding:2px 8px}
.ff-dash{display:grid;grid-template-columns:repeat(auto-fill,minmax(420px,1fr));gap:12px}
.ff-col-card{background:var(--bg2);border:1px solid var(--bd);border-radius:8px;padding:12px}
.ff-col-card.ff-disabled{opacity:.5}
.ff-col-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}
.ff-transient{background:#3a2e00;color:#ffd24d;padding:4px 8px;border-radius:4px;font-size:13px;margin:4px 0}
.ff-tbl{width:100%;border-collapse:collapse;font-size:13px}
.ff-tbl th,.ff-tbl td{padding:3px 6px;border-bottom:1px solid var(--bd);text-align:left}
.ff-num{text-align:right;font-variant-numeric:tabular-nums}
.ff-rec{font-weight:600;color:#7fd1ff}
.ff-stale{opacity:.45}
.ff-role-LevelDriven{color:#9aa}.ff-role-Monitor{color:#777}.ff-role-Commanded{color:#7fd1ff}
.ff-grade-A{color:#4caf50}.ff-grade-B{color:#ffb300}.ff-grade-C{color:#ff5252}
.ff-mb,.ff-note{font-size:12px;color:var(--t2);margin-top:6px}
.ff-msg.err{color:#ff5252}
.ff-cfg{margin-top:16px;border-top:1px solid var(--bd);padding-top:12px}
.ff-cfg-bar{display:flex;gap:8px;align-items:center;margin-bottom:12px}
.ff-cfg-item{padding:6px 0;border-bottom:1px solid var(--bd);font-size:13px}
.ff-msg{font-size:12px;margin-left:8px}

/* ── 폼 에디터 모달 ───────────────────────────────── */
.ff-modal{position:fixed;inset:0;z-index:900;display:flex;align-items:center;justify-content:center}
.ff-modal-overlay{position:absolute;inset:0;background:rgba(0,0,0,.55)}
.ff-modal-box{position:relative;background:var(--s2);border:1px solid var(--bd2);border-radius:var(--rl);width:min(1100px,95vw);max-height:92vh;display:flex;flex-direction:column}
.ff-modal-hd{padding:14px 16px;border-bottom:1px solid var(--bd);font-weight:700;font-size:15px;color:var(--t0)}
.ff-modal-id{font-weight:400;font-size:12px;color:var(--t2);margin-left:8px}
.ff-modal-body{overflow-y:auto;flex:1;padding:16px}
.ff-modal-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:16px}
.ff-modal-col{display:flex;flex-direction:column;gap:8px}
.ff-modal-col label{font-size:12px;color:var(--t2);display:flex;flex-direction:column;gap:2px}
.ff-modal-col label input[type="checkbox"]{margin:6px 0}
.ff-modal-sec-hd{display:flex;align-items:center;gap:8px;font-weight:700;font-size:13px;color:var(--t0);margin-bottom:8px}
.ff-key-legend{font-weight:400;font-size:11px;color:var(--t2)}
.ff-stream-tbl{font-size:11px}
.ff-stream-tbl th,.ff-stream-tbl td{padding:2px 4px;white-space:nowrap}
.ff-stream-tbl .inp{width:64px;min-width:0;padding:4px 6px;font-size:11px}
.ff-stream-tbl select.inp{width:auto}
.ff-stream-tbl td:first-child .inp{width:48px}
.ff-stream-tbl td:nth-child(2) .inp{width:80px}
.ff-stream-tbl td input[type="checkbox"]{margin:0}
.ff-modal-ft{display:flex;gap:8px;align-items:center;justify-content:flex-end;padding:12px 16px;border-top:1px solid var(--bd)}
.ff-modal-ft .ff-msg{margin-right:auto}
.danger{color:var(--red);border:1px solid var(--red)}.danger:hover{background:var(--red);color:#fff}
.ff-lvl-hint{font-size:10px;color:var(--t2);margin-left:4px;white-space:nowrap}
.ff-lvl-by{font-size:10px;color:var(--t2);font-weight:400}
.ff-lvl-tag{width:72px!important;font-size:10px!important;padding:2px 4px!important}
.ff-desc{font-size:12px;color:var(--t3);line-height:1.4}
/* WO-2 온도 프로파일(PCT) 모니터 행 */
.ff-temps{font-size:12px;color:var(--t2);margin-top:6px;display:flex;flex-wrap:wrap;gap:4px 10px}
.ff-temp{white-space:nowrap}
.ff-temp small{color:#7fd1ff}
.ff-temp.ff-stale{opacity:.45}
/* WO-3 θ 자동튜닝 제안 행 */
.ff-theta{font-size:12px;color:#cdb4ff;margin-top:6px}
.ff-theta small{color:var(--t2)}
/* WO-4 K_obs 제안 */
.ff-kobs{color:#9fd;opacity:.8}
/* WO-5 프론트 위치 */
.ff-front{font-size:12px;color:var(--t2);margin-top:6px}
.ff-front-warn{color:#ffd24d}
.ff-front-warn b{color:#ffb300}
/* WO-6 전환류 모드 */
.ff-modeline{margin:4px 0;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.ff-mode{font-size:12px;font-weight:600;padding:2px 8px;border-radius:10px}
.ff-mode-rec{background:#5a3000;color:#ffb74d}
.ff-mode-ret{background:#003a4d;color:#7fd1ff}
.ff-mode-arm{background:#5a0000;color:#ff8a80;animation:ffblink 1s step-start infinite}
@keyframes ffblink{50%{opacity:.4}}
/* WO-7 설정폼 신규 섹션 */
.ff-modal-subhd{font-weight:600;margin:4px 0 6px;color:var(--t1);border-bottom:1px solid var(--bd);padding-bottom:3px}
.ff-modal-subhd small{font-weight:400;color:var(--t2)}
.ff-recovery-col{background:rgba(90,0,0,.08);border-radius:6px;padding:6px}
.ff-trig{border-color:#ff8a80 !important}
/* Phase II: auto-write */
.ff-write-badge{font-size:10px;background:#003a4d;color:#7fd1ff;padding:2px 8px;border-radius:8px;margin-left:6px}
.ff-write{font-size:10px;color:#7fd1ff;opacity:.8}
.ff-write-err{color:#ff8a80}
.ff-wg-blocked{font-size:12px;color:#ff8a80;background:#3a0000;padding:4px 8px;border-radius:4px;margin:4px 0}
.ff-wg-blocked b{color:#ff5252}

/* ── WP7: 램프 계산기 ────────────────────────────────── */
.ff-ramp{border:1px solid var(--bd);border-radius:8px;padding:12px;margin-bottom:12px;background:var(--bg2)}
.ff-ramp-body{display:flex;gap:16px;flex-wrap:wrap}
.ff-ramp-inputs{display:flex;flex-wrap:wrap;gap:8px;align-items:end}
.ff-ramp-inputs label{font-size:12px;color:var(--t2);display:flex;flex-direction:column;gap:2px}
.ff-ramp-inputs .inp{width:80px}
.ff-ramp-result{flex:1;min-width:200px}
.ff-ramp-table{font-size:13px;border-collapse:collapse;width:100%}
.ff-ramp-table td{padding:3px 8px;border-bottom:1px solid var(--bd)}
.ff-ramp-table td:first-child{color:var(--t2)}
.ff-ramp-warn{font-size:11px;color:#ffb74d;margin-top:6px;line-height:1.5}
.ff-ramp-hold{color:#ff8a80;font-weight:600}
.ff-ramp-err{color:#ff5252}
/* ── WP7: 온도 프로파일 상태 뱃지 ────────────────────── */
.ff-tp-badge{font-size:12px;padding:2px 8px;border-radius:10px;display:inline-block;margin-top:4px}
.ff-tp-ok{background:#003a1a;color:#69f0ae}
.ff-tp-warn{background:#3a2e00;color:#ffd24d}
.ff-tp-collapse{background:#5a0000;color:#ff8a80}
.ff-tp-inv{background:#5a0000;color:#ff5252;font-weight:700;animation:fftpblink 0.8s step-start infinite}
.ff-tp-na{background:#222;color:var(--t3)}
.ff-tp-badge small{font-weight:400;opacity:.7}
@keyframes fftpblink{50%{opacity:.5}}
/* ── WP7: Sim Override 패널 ──────────────────────────── */
.ff-sim{border:1px solid #ffb74d;border-radius:8px;padding:12px;margin-top:12px;background:rgba(255,183,77,.04)}
.ff-sim-head{font-weight:700;font-size:13px;margin-bottom:8px;color:#ffb74d}
.ff-sim-head small{font-weight:400;color:var(--t2)}
.ff-sim-body{display:flex;flex-direction:column;gap:8px}
.ff-sim-body textarea{background:var(--bg1);color:var(--t0);border:1px solid var(--bd);border-radius:4px;padding:6px;font-size:12px;font-family:monospace;width:100%}
.ff-sim-actions{display:flex;gap:8px;align-items:center}

/* WP5 1단계: 2-point front */
.ff-front2 { display:flex; gap:8px; margin-top:4px; flex-wrap:wrap; }
.ff-f2 { font-size:12px; padding:2px 8px; border-radius:4px; background:#1e2733; color:#cbd5e1; }
.ff-f2-up { background:#7c2d12; color:#fed7aa; }
.ff-f2-dn { background:#1e3a5f; color:#bfdbfe; }
.ff-f2-ok { background:#14532d; color:#bbf7d0; }

/* WP5 2·3단계: 조성 권장SP */
.ff-comp { margin-top:4px; font-size:12px; color:#cbd5e1; background:#172033; padding:3px 8px; border-radius:4px; }
.ff-comp small { color:#94a3b8; }

/* WP5 3단계: 조성 입력 폼 */
.ff-comp-body { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.ff-comp-list { width:100%; margin-top:4px; font-size:12px; color:#94a3b8; }
