*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #0f0f1a; color: #e0e0e0; height: 100vh; overflow: hidden; }
.app { display: flex; height: 100vh; }

/* ── LEFT PANEL ─────────────────────────────────────────────────────────── */
.form-panel { width: 440px; min-width: 400px; background: #161625; border-right: 1px solid #2a2a40; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.logo { font-size: 18px; font-weight: 700; color: #7c8fff; letter-spacing: 0.5px; padding-bottom: 10px; border-bottom: 1px solid #2a2a40; }
.section-block { display: flex; flex-direction: column; gap: 7px; }
label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: #7c8fff; }
.label-hint { font-size: 10px; color: #555575; text-transform: none; letter-spacing: 0; font-weight: 400; }
.required-hint { font-size: 10px; color: #f87171; text-transform: none; letter-spacing: 0; font-weight: 400; }
input, textarea { background: #1e1e32; border: 1px solid #2a2a40; color: #e0e0e0; padding: 9px 12px; border-radius: 8px; font-size: 13px; font-family: inherit; width: 100%; resize: vertical; transition: border-color 0.2s; }
input:focus, textarea:focus { outline: none; border-color: #7c8fff; }
input::placeholder, textarea::placeholder { color: #555575; }
input.field-error { border-color: #f87171; background: #1a0f0f; }
.field-wrap { display: flex; flex-direction: column; gap: 3px; }
.field-err { font-size: 11px; color: #f87171; }

/* ── Client rows ─────────────────────────────────────────────────────────── */
.client-row { display: flex; flex-direction: column; gap: 5px; background: #1a1a2e; border: 1px solid #2a2a40; border-radius: 10px; padding: 10px 12px; margin-bottom: 6px; }
.client-row-header { font-size: 11px; font-weight: 600; color: #7c8fff; margin-bottom: 2px; }
.client-row-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.client-row-fields input { font-size: 12px; padding: 7px 10px; }
.client-row-fields input.full { grid-column: 1 / -1; }

/* Date range picker */
.date-range-row { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.date-range-group { display: flex; align-items: center; gap: 6px; flex: 1; }
.date-range-label { font-size: 10px; color: #7c8fff; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; }
.date-range-sep { color: #555575; font-size: 14px; flex-shrink: 0; }
input[type="month"] { background: #1e1e32; border: 1px solid #2a2a40; color: #e0e0e0; padding: 7px 10px; border-radius: 8px; font-size: 12px; font-family: inherit; width: 100%; cursor: pointer; }
input[type="month"]:focus { outline: none; border-color: #7c8fff; }
input[type="month"]:disabled { opacity: 0.4; cursor: not-allowed; }
input[type="month"]::-webkit-calendar-picker-indicator { filter: invert(1); opacity: 0.6; cursor: pointer; }
.present-label { display: flex; align-items: center; gap: 4px; font-size: 11px; color: #aaa; white-space: nowrap; cursor: pointer; user-select: none; }
.present-label input[type="checkbox"] { width: auto; margin: 0; cursor: pointer; accent-color: #7c8fff; }

/* ── Education rows ──────────────────────────────────────────────────────── */
.edu-row { display: flex; flex-direction: column; gap: 5px; background: #1a1a2e; border: 1px solid #2a2a40; border-radius: 10px; padding: 10px 12px; margin-bottom: 6px; }
.edu-row-header { display: flex; justify-content: space-between; align-items: center; }
.edu-row-title { font-size: 11px; font-weight: 600; color: #7c8fff; }
.edu-remove-btn { background: none; border: none; color: #555575; cursor: pointer; font-size: 14px; padding: 0 2px; transition: color 0.15s; }
.edu-remove-btn:hover { color: #f87171; }
.edu-row-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.edu-row-fields input { font-size: 12px; padding: 7px 10px; }
.edu-row-fields input.full { grid-column: 1 / -1; }
.add-edu-btn { background: #1e1e32; color: #7c8fff; border: 1px dashed #3a3a70; padding: 8px; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 600; transition: all 0.15s; width: 100%; }
.add-edu-btn:hover { background: #2a2a50; border-color: #7c8fff; }

/* ── Number selectors ────────────────────────────────────────────────────── */
.num-selector { display: flex; gap: 8px; }
.num-selector.small .num-btn { padding: 6px; font-size: 13px; }
.num-btn { flex: 1; padding: 8px; border: 2px solid #2a2a40; border-radius: 8px; background: #1e1e32; color: #aaa; cursor: pointer; font-size: 14px; font-weight: 600; transition: all 0.15s; }
.num-btn:hover { border-color: #7c8fff; color: #7c8fff; }
.num-btn.active { border-color: #7c8fff; background: #2a2a50; color: #fff; }

/* ── Bullet slider ───────────────────────────────────────────────────────── */
.bullet-slider-row { display: flex; align-items: center; gap: 12px; }
.bullet-slider-row input[type="range"] { flex: 1; -webkit-appearance: none; height: 4px; border-radius: 2px; background: #2a2a40; outline: none; cursor: pointer; }
.bullet-slider-row input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #7c8fff; cursor: pointer; border: 2px solid #1e1e32; }
.bullet-count-badge { background: #2a2a50; color: #7c8fff; border: 1px solid #4a4a80; border-radius: 20px; padding: 3px 12px; font-size: 12px; font-weight: 600; white-space: nowrap; min-width: 74px; text-align: center; }
.bullet-marks { display: flex; justify-content: space-between; padding: 0 2px; }
.bullet-marks span { font-size: 10px; color: #555575; }

/* ── Summary format ──────────────────────────────────────────────────────── */
.summary-type-row { display: flex; gap: 8px; }
.type-btn { flex: 1; padding: 8px; border: 2px solid #2a2a40; border-radius: 8px; background: #1e1e32; color: #aaa; cursor: pointer; font-size: 13px; font-weight: 600; transition: all 0.15s; }
.type-btn:hover { border-color: #7c8fff; color: #7c8fff; }
.type-btn.active { border-color: #7c8fff; background: #2a2a50; color: #fff; }
.summary-lines-row { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.summary-lines-label { font-size: 11px; color: #888; white-space: nowrap; }

/* ── Template thumbnails ─────────────────────────────────────────────────── */
.template-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.tpl-card { cursor: pointer; border: 2px solid #2a2a40; border-radius: 8px; overflow: hidden; transition: all 0.15s; }
.tpl-card:hover { border-color: #7c8fff; }
.tpl-card.active { border-color: #7c8fff; box-shadow: 0 0 0 1px #7c8fff; }
.tpl-preview { background: #fff; height: 80px; overflow: hidden; }
.tpl-label { font-size: 10px; text-align: center; padding: 4px; color: #aaa; background: #1a1a2e; }
.tpl-card.active .tpl-label { color: #7c8fff; font-weight: 600; }

.modern-prev { padding: 5px 6px; display: flex; flex-direction: column; gap: 2px; }
.mp-name { height: 6px; width: 65%; background: #1e293b; border-radius: 2px; }
.mp-desig { height: 3px; width: 50%; background: #2563eb; border-radius: 2px; margin-top: 1px; }
.mp-contact { height: 3px; width: 80%; background: #94a3b8; border-radius: 2px; margin-bottom: 2px; }
.mp-rule { height: 2px; background: #2563eb; margin-bottom: 3px; }
.mp-rule.blue { background: #2563eb; }
.mp-section { display: flex; gap: 3px; align-items: flex-start; }
.mp-bar { width: 3px; height: 20px; border-radius: 1px; flex-shrink: 0; }
.mp-bar.blue-left { background: #2563eb; }
.mp-lines { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.mp-line { height: 3px; background: #e2e8f0; border-radius: 2px; width: 100%; }
.mp-line.short { width: 70%; }

.classic-prev { padding: 5px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cp-name { height: 6px; width: 55%; background: #000; border-radius: 2px; }
.cp-desig { height: 3px; width: 45%; background: #555; border-radius: 2px; }
.cp-contact { height: 3px; width: 70%; background: #888; border-radius: 2px; }
.cp-dbl { width: 100%; height: 3px; border-top: 1px solid #000; border-bottom: 1px solid #000; margin: 2px 0; }
.cp-title { height: 4px; width: 50%; background: #000; border-radius: 2px; margin-bottom: 1px; }
.cp-rule { width: 100%; height: 1px; background: #000; margin-bottom: 2px; }
.cp-line { height: 3px; width: 100%; background: #ddd; border-radius: 2px; margin-bottom: 2px; }
.cp-line.short { width: 75%; }

.minimal-prev { padding: 7px 6px; display: flex; flex-direction: column; gap: 0; }
.mnp-name { height: 8px; width: 60%; background: #111827; border-radius: 2px; margin-bottom: 2px; }
.mnp-desig { height: 3px; width: 45%; background: #6b7280; border-radius: 2px; margin-bottom: 2px; }
.mnp-contact { height: 3px; width: 75%; background: #9ca3af; border-radius: 2px; }
.mnp-gap { height: 6px; }
.mnp-label { height: 3px; width: 25%; background: #d1d5db; border-radius: 2px; margin-bottom: 3px; }
.mnp-line { height: 3px; width: 90%; background: #f3f4f6; border-radius: 2px; margin-bottom: 2px; }
.mnp-line.short { width: 65%; }

.exec-prev { display: flex; height: 80px; }
.ep-sidebar { width: 32%; background: #1e3a5f; padding: 5px 4px; display: flex; flex-direction: column; gap: 2px; }
.ep-sname { height: 5px; background: #fff; border-radius: 1px; width: 85%; }
.ep-sdesig { height: 3px; background: #93b8d4; border-radius: 1px; width: 75%; }
.ep-semail { height: 3px; background: #7fb3d3; border-radius: 1px; width: 90%; }
.ep-sgap { height: 3px; }
.ep-slabel { height: 3px; background: #7fb3d3; border-radius: 1px; width: 60%; margin-bottom: 2px; }
.ep-skill { height: 3px; background: rgba(255,255,255,0.5); border-radius: 1px; width: 80%; margin-bottom: 2px; }
.ep-main { flex: 1; background: #fff; padding: 5px 5px; display: flex; flex-direction: column; gap: 2px; }
.ep-title { height: 4px; background: #1e3a5f; border-radius: 1px; width: 60%; }
.ep-rule { height: 1px; background: #1e3a5f; margin: 2px 0; }
.ep-line { height: 3px; background: #e5e7eb; border-radius: 1px; width: 100%; }
.ep-line.short { width: 70%; }
.ep-role { height: 4px; background: #c7d2fe; border-radius: 1px; width: 80%; margin: 2px 0; }

.creative-prev { display: flex; flex-direction: column; }
.crp-header { background: #0d9488; padding: 6px; }
.crp-name { height: 6px; background: rgba(255,255,255,0.9); border-radius: 2px; width: 70%; margin-bottom: 2px; }
.crp-desig { height: 3px; background: rgba(255,255,255,0.6); border-radius: 2px; width: 55%; margin-bottom: 2px; }
.crp-contact { height: 3px; background: rgba(255,255,255,0.5); border-radius: 2px; width: 85%; }
.crp-body { padding: 5px 6px; display: flex; flex-direction: column; gap: 3px; flex: 1; background: #fff; }
.crp-section { display: flex; align-items: center; gap: 3px; }
.crp-diamond { width: 5px; height: 5px; background: #0d9488; transform: rotate(45deg); flex-shrink: 0; }
.crp-title { height: 4px; background: #134e4a; border-radius: 2px; width: 50%; }
.crp-line { height: 3px; background: #e5e7eb; border-radius: 2px; width: 100%; }
.crp-line.short { width: 70%; }

/* ── Folder ──────────────────────────────────────────────────────────────── */
.folder-row { display: flex; gap: 8px; }
.folder-row input { flex: 1; }
.pick-btn { background: #1e1e32; border: 1px solid #2a2a40; border-radius: 8px; padding: 9px 12px; font-size: 16px; cursor: pointer; transition: all 0.15s; }
.pick-btn:hover { background: #2a2a50; border-color: #7c8fff; }
.load-btn { background: #2a2a50; color: #7c8fff; border: 1px solid #3a3a70; padding: 9px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.load-btn:hover { background: #3a3a70; }
.parse-status { font-size: 12px; padding: 8px 10px; border-radius: 6px; background: #0f2a1a; color: #4ade80; border: 1px solid #166534; }
.parse-status.error { background: #2a0f0f; color: #f87171; border-color: #7f1d1d; }
.parse-status.info { background: #1a1a35; color: #7c8fff; border-color: #3a3a70; }
.file-list { display: flex; flex-direction: column; gap: 4px; max-height: 120px; overflow-y: auto; }
.file-item { display: flex; align-items: center; gap: 8px; background: #1e1e32; border: 1px solid #2a2a40; border-radius: 6px; padding: 6px 10px; font-size: 12px; }
.file-item.success { border-color: #166534; background: #0f2a1a; }
.file-item.error { border-color: #7f1d1d; background: #2a0f0f; }
.file-icon { font-size: 13px; }
.file-name { flex: 1; color: #ccc; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-badge { font-size: 10px; padding: 1px 6px; border-radius: 10px; }
.file-badge.cached { background: #2a2a50; color: #7c8fff; }
.file-badge.new { background: #0f2a1a; color: #4ade80; }
.file-badge.err { background: #2a0f0f; color: #f87171; }

/* ── Enrich toggle ───────────────────────────────────────────────────────── */
.enrich-toggle-row { display: flex; flex-direction: column; gap: 6px; }
.toggle-label { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.toggle-track { position: relative; width: 36px; height: 20px; background: #2a2a40; border-radius: 10px; transition: background 0.2s; flex-shrink: 0; }
.toggle-track:has(input:checked) { background: #166534; }
.toggle-track input { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.toggle-thumb { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: transform 0.2s; pointer-events: none; }
.toggle-track:has(input:checked) .toggle-thumb { transform: translateX(16px); }
.toggle-text { font-size: 13px; color: #ccc; }
.toggle-text.off { color: #555575; }
.toggle-hint { font-size: 11px; color: #555575; line-height: 1.5; padding-left: 46px; }
.toggle-hint.off { color: #3a3a5a; }

/* ── Batch session ───────────────────────────────────────────────────────── */
.session-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.session-indicator { font-size: 12px; color: #888; flex: 1; }
.session-indicator.active { color: #4ade80; font-weight: 600; }
.session-start-btn { background: #1a1a2e; color: #7c8fff; border: 1px solid #3a3a70; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 600; white-space: nowrap; transition: all 0.15s; }
.session-start-btn:hover { background: #2a2a50; border-color: #7c8fff; }
.session-clear-btn { background: #2a0f0f; color: #f87171; border: 1px solid #7f1d1d; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 600; white-space: nowrap; transition: all 0.15s; }
.session-clear-btn:hover { background: #3a0f0f; }
.session-hint { font-size: 11px; color: #555575; line-height: 1.5; }
.session-panel { background: #1a1a2e; border: 1px solid #2a2a40; border-radius: 8px; padding: 10px 12px; margin-top: 4px; }
.session-panel-title { font-size: 10px; font-weight: 600; color: #7c8fff; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 8px; }
.session-candidate { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #2a2a40; }
.session-candidate:last-child { border-bottom: none; }
.session-num { width: 20px; height: 20px; border-radius: 50%; background: #2a2a50; color: #7c8fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.session-info { flex: 1; }
.session-name { font-size: 12px; color: #e0e0e0; font-weight: 600; }
.session-meta { font-size: 10px; color: #555575; margin-top: 1px; }
.session-done { color: #4ade80; font-size: 14px; }

/* ── Generate button ─────────────────────────────────────────────────────── */
.generate-btn { background: linear-gradient(135deg, #5b6ef5, #7c8fff); color: #fff; border: none; padding: 13px; border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer; width: 100%; margin-top: 4px; transition: opacity 0.2s; }
.generate-btn:hover { opacity: 0.9; }
.generate-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── RIGHT PANEL ─────────────────────────────────────────────────────────── */
.preview-panel { flex: 1; display: flex; flex-direction: column; background: #12121e; overflow: hidden; min-width: 0; }
.preview-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid #2a2a40; font-size: 14px; font-weight: 600; color: #aaa; flex-shrink: 0; }
.header-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.validation-banner { background: #2a0f0f; border-bottom: 1px solid #7f1d1d; padding: 10px 20px; font-size: 13px; color: #f87171; flex-shrink: 0; line-height: 1.6; }
.validation-banner .vb-title { font-weight: 700; margin-bottom: 4px; }
.validation-banner .vb-item { font-size: 12px; }

.enrich-btn { background: #1a2a1a; color: #86efac; border: 1px solid #166534; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 600; transition: all 0.15s; }
.enrich-btn:hover:not(:disabled) { background: #166534; color: #fff; }
.enrich-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.ats-btn { background: #1a1a35; color: #a78bfa; border: 1px solid #4c1d95; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 600; transition: all 0.15s; }
.ats-btn:hover:not(:disabled) { background: #4c1d95; color: #fff; }
.ats-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.crosscheck-btn { background: #1a2a1a; color: #4ade80; border: 1px solid #166534; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 600; transition: all 0.15s; }
.crosscheck-btn:hover:not(:disabled) { background: #166534; color: #fff; }
.crosscheck-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.download-btn { background: #1e3a5f; color: #60a5fa; border: 1px solid #2563eb; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 600; transition: all 0.15s; }
.download-btn:hover:not(:disabled) { background: #2563eb; color: #fff; }
.download-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Preflight panel ─────────────────────────────────────────────────────── */
.preflight-panel { background: #1a120a; border-bottom: 1px solid #854d0e; padding: 16px 24px; flex-shrink: 0; max-height: 360px; overflow-y: auto; }
.pf-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.pf-header span { font-size: 14px; font-weight: 700; color: #fbbf24; }
.cc-close { background: none; border: none; color: #888; cursor: pointer; font-size: 16px; }
.cc-close:hover { color: #fff; }
.pf-score-row { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.pf-score-circle { width: 70px; height: 70px; border-radius: 50%; border: 4px solid #854d0e; display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; }
.pf-score-circle.green { border-color: #166534; }
.pf-score-circle.red { border-color: #7f1d1d; }
.pf-score-num { font-size: 22px; font-weight: 700; }
.pf-score-num.green { color: #4ade80; }
.pf-score-num.amber { color: #fbbf24; }
.pf-score-num.red { color: #f87171; }
.pf-score-lbl { font-size: 9px; color: #888; text-transform: uppercase; }
.pf-assessment { font-size: 13px; color: #d97706; line-height: 1.6; flex: 1; }
.pf-assessment.green { color: #4ade80; }
.pf-disciplines { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.pf-disc-block { background: #1e1a0a; border: 1px solid #2a2010; border-radius: 8px; padding: 10px; }
.pf-disc-block.green { background: #0a1e0a; border-color: #166534; }
.pf-disc-title { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 5px; }
.pf-disc-title.amber { color: #fbbf24; }
.pf-disc-title.green { color: #4ade80; }
.pf-disc-value { font-size: 12px; color: #ccc; }
.pf-desig-box { background: #1a1a2e; border: 1px solid #3a3a70; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }
.pf-desig-title { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: #7c8fff; margin-bottom: 4px; }
.pf-desig-value { font-size: 13px; color: #c7d2fe; font-weight: 600; }
.pf-desig-hint { font-size: 11px; color: #555575; margin-top: 3px; }
.pf-missing { margin-bottom: 12px; }
.pf-missing-title { font-size: 11px; font-weight: 600; color: #f87171; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 6px; }
.pf-missing-tag { display: inline-block; font-size: 11px; background: #2a0f0f; color: #f87171; border: 1px solid #7f1d1d; border-radius: 10px; padding: 2px 8px; margin: 2px; }
.pf-relevant { margin-bottom: 14px; }
.pf-relevant-title { font-size: 11px; font-weight: 600; color: #4ade80; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 6px; }
.pf-relevant-bullet { font-size: 12px; color: #86efac; background: #0a1e0a; border: 1px solid #166534; border-radius: 6px; padding: 5px 8px; margin-bottom: 4px; }
.pf-actions { display: flex; gap: 10px; margin-top: 12px; }
.pf-proceed-btn { padding: 8px 20px; border-radius: 8px; border: none; font-size: 13px; font-weight: 600; cursor: pointer; background: #7f1d1d; color: #f87171; transition: all 0.15s; }
.pf-proceed-btn:hover { background: #991b1b; color: #fff; }
.pf-proceed-btn.green { background: #166534; color: #4ade80; }
.pf-proceed-btn.green:hover { background: #15803d; color: #fff; }

/* ── Enrich panel ────────────────────────────────────────────────────────── */
.enrich-panel { background: #0a1a0a; border-bottom: 1px solid #166534; padding: 16px 24px; flex-shrink: 0; max-height: 220px; overflow-y: auto; }
.enrich-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.enrich-header span { font-size: 13px; font-weight: 600; color: #86efac; }
.enrich-item { padding: 10px 0; border-bottom: 1px solid #1a2a1a; font-size: 12px; }
.enrich-item:last-child { border-bottom: none; }
.enrich-company { color: #7c8fff; font-size: 11px; font-weight: 600; margin-bottom: 4px; }
.enrich-original { color: #888; margin-bottom: 3px; font-style: italic; }
.enrich-original::before { content: 'Before: '; color: #555575; }
.enrich-new { color: #86efac; margin-bottom: 5px; }
.enrich-new::before { content: 'After: '; color: #4ade80; font-weight: 600; }
.enrich-tools { display: flex; flex-wrap: wrap; gap: 4px; }
.enrich-tool-tag { font-size: 10px; background: #0f2a1a; color: #4ade80; border: 1px solid #166534; border-radius: 10px; padding: 2px 8px; }
.enrich-unchanged { color: #555575; font-size: 12px; font-style: italic; padding: 8px 0; }

/* ── ATS panel ───────────────────────────────────────────────────────────── */
.ats-panel { background: #0d0d1f; border-bottom: 1px solid #4c1d95; padding: 16px 24px; flex-shrink: 0; max-height: 360px; overflow-y: auto; }
.ats-panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.ats-panel-header span { font-size: 14px; font-weight: 700; color: #a78bfa; }
.ats-top { display: flex; align-items: center; gap: 24px; margin-bottom: 16px; }
.ats-ring-wrap { position: relative; width: 80px; height: 80px; flex-shrink: 0; }
.ats-ring-wrap svg { transform: rotate(-90deg); }
.ats-ring-bg { fill: none; stroke: #2a2a40; stroke-width: 8; }
.ats-ring-fill { fill: none; stroke-width: 8; stroke-linecap: round; }
.ats-ring-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); text-align: center; }
.ats-ring-score { font-size: 20px; font-weight: 700; color: #fff; line-height: 1; }
.ats-ring-label { font-size: 9px; color: #888; text-transform: uppercase; }
.ats-verdict { font-size: 13px; color: #ccc; line-height: 1.6; flex: 1; }
.ats-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.ats-bar-item { background: #1a1a2e; border-radius: 8px; padding: 8px 10px; }
.ats-bar-label { font-size: 10px; color: #888; margin-bottom: 5px; display: flex; justify-content: space-between; }
.ats-bar-label span { color: #fff; font-weight: 600; }
.ats-bar-track { height: 5px; background: #2a2a40; border-radius: 3px; overflow: hidden; }
.ats-bar-fill { height: 100%; border-radius: 3px; }
.ats-keywords { display: flex; gap: 10px; margin-bottom: 14px; }
.ats-kw-block { flex: 1; }
.ats-kw-title { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 6px; }
.ats-kw-title.green { color: #4ade80; }
.ats-kw-title.red { color: #f87171; }
.ats-kw-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.ats-tag { font-size: 10px; padding: 2px 7px; border-radius: 10px; }
.ats-tag.match { background: #0f2a1a; color: #4ade80; border: 1px solid #166534; }
.ats-tag.miss { background: #2a0f0f; color: #f87171; border: 1px solid #7f1d1d; }
.ats-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ats-list-block { background: #1a1a2e; border-radius: 8px; padding: 10px; }
.ats-list-title { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 7px; }
.ats-list-title.purple { color: #a78bfa; }
.ats-list-title.amber { color: #fbbf24; }
.ats-list-block ul { list-style: none; padding: 0; }
.ats-list-block li { font-size: 11px; color: #ccc; padding: 3px 0; border-bottom: 1px solid #2a2a40; line-height: 1.5; }
.ats-list-block li:last-child { border-bottom: none; }
.ats-list-block.strength li::before { content: "✓  "; color: #4ade80; }
.ats-list-block.improve li::before { content: "→  "; color: #fbbf24; }

/* ── Cross-check panel ───────────────────────────────────────────────────── */
.crosscheck-panel { background: #0a150a; border-bottom: 1px solid #166534; padding: 16px 24px; flex-shrink: 0; max-height: 220px; overflow-y: auto; }
.cc-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cc-header span { font-size: 13px; font-weight: 600; color: #4ade80; }
.cc-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid #1a2a1a; font-size: 12px; }
.cc-item:last-child { border-bottom: none; }
.cc-icon { font-size: 16px; flex-shrink: 0; }
.cc-content { flex: 1; }
.cc-company { color: #7c8fff; font-size: 11px; font-weight: 600; margin-bottom: 2px; }
.cc-company-info { color: #555575; font-size: 11px; font-style: italic; margin-bottom: 2px; }
.cc-tool-note { color: #fbbf24; font-size: 11px; font-style: italic; margin-bottom: 4px; }
.cc-bullet { color: #ccc; line-height: 1.5; margin-bottom: 3px; }
.cc-note { color: #888; font-style: italic; }

/* ── PREVIEW AREA ────────────────────────────────────────────────────────── */
#resume-preview {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 32px 32px 80px 32px;
  background: #12121e;
}
#resume-preview > .resume-card { margin: 0 auto; display: block; }
#resume-preview > .empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 400px; }
.empty-state { text-align: center; color: #3a3a5a; }
.empty-icon { font-size: 40px; margin-bottom: 16px; }
.empty-state p { font-size: 15px; line-height: 1.8; }

/* ── RESUME CARDS ────────────────────────────────────────────────────────── */
.resume-card { width: 100%; max-width: 720px; border-radius: 8px; box-shadow: 0 4px 30px rgba(0,0,0,0.5); background: #fff; color: #1a1a2e; }

/* Modern */
.tpl-modern { padding: 44px; font-family: 'Segoe UI', system-ui, sans-serif; background: #fff; }
.tpl-modern .r-name { font-size: 32px; font-weight: 700; color: #1e293b; }
.tpl-modern .r-designation { font-size: 16px; color: #2563eb; font-weight: 500; margin: 3px 0 5px; }
.tpl-modern .r-contact { font-size: 13px; color: #64748b; margin-bottom: 10px; }
.tpl-modern .r-main-rule { border: none; border-top: 2.5px solid #2563eb; margin-bottom: 20px; }
.tpl-modern .r-section-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: #1e293b; text-transform: uppercase; letter-spacing: 1.2px; margin: 22px 0 10px; }
.tpl-modern .r-section-title::before { content: ''; display: block; width: 4px; height: 16px; background: #2563eb; border-radius: 2px; flex-shrink: 0; }
.tpl-modern .r-summary { font-size: 14px; color: #374151; line-height: 1.75; }
.tpl-modern .r-summary-bullets { padding-left: 18px; }
.tpl-modern .r-summary-bullets li { font-size: 14px; color: #374151; line-height: 1.7; margin-bottom: 4px; }
.tpl-modern .r-skills { font-size: 13px; color: #374151; line-height: 1.7; }
.tpl-modern .r-exp-block { margin-bottom: 18px; }
.tpl-modern .r-exp-header { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px; }
.tpl-modern .r-exp-role { font-size: 15px; font-weight: 700; color: #1e293b; }
.tpl-modern .r-exp-duration { font-size: 12px; color: #94a3b8; font-style: italic; }
.tpl-modern .r-exp-company { font-size: 13px; color: #2563eb; margin: 2px 0 8px; }
.tpl-modern .r-bullets { padding-left: 18px; }
.tpl-modern .r-bullets li { font-size: 13px; color: #374151; line-height: 1.7; margin-bottom: 3px; }
.tpl-modern .r-edu-block { margin-bottom: 10px; }
.tpl-modern .r-edu-degree { font-size: 14px; font-weight: 600; color: #1e293b; }
.tpl-modern .r-edu-meta { font-size: 13px; color: #64748b; margin-top: 2px; }

/* Classic */
.tpl-classic { padding: 44px; font-family: 'Times New Roman', Georgia, serif; background: #fff; }
.tpl-classic .r-classic-header { text-align: center; border-bottom: 3px double #000; padding-bottom: 12px; margin-bottom: 16px; }
.tpl-classic .r-name { font-size: 28px; font-weight: 700; color: #000; letter-spacing: 2px; text-transform: uppercase; }
.tpl-classic .r-designation { font-size: 15px; color: #333; margin: 4px 0; font-style: italic; }
.tpl-classic .r-contact { font-size: 13px; color: #555; margin-top: 4px; }
.tpl-classic .r-section-title { text-align: center; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: #000; border-bottom: 1px solid #000; padding-bottom: 4px; margin: 22px 0 12px; }
.tpl-classic .r-summary { font-size: 14px; color: #222; line-height: 1.7; text-align: justify; }
.tpl-classic .r-summary-bullets { padding-left: 20px; }
.tpl-classic .r-summary-bullets li { font-size: 14px; color: #222; line-height: 1.7; margin-bottom: 4px; }
.tpl-classic .r-skills { font-size: 13px; color: #222; text-align: center; line-height: 1.7; }
.tpl-classic .r-exp-block { margin-bottom: 18px; }
.tpl-classic .r-exp-role { font-size: 15px; font-weight: 700; color: #000; }
.tpl-classic .r-exp-meta { font-size: 13px; color: #555; font-style: italic; margin: 2px 0 8px; }
.tpl-classic .r-bullets { padding-left: 20px; }
.tpl-classic .r-bullets li { font-size: 13px; color: #222; line-height: 1.7; margin-bottom: 3px; }
.tpl-classic .r-edu-block { margin-bottom: 10px; }
.tpl-classic .r-edu-degree { font-size: 14px; font-weight: 700; color: #000; }
.tpl-classic .r-edu-meta { font-size: 13px; color: #555; font-style: italic; margin-top: 2px; }

/* Minimal */
.tpl-minimal { padding: 56px 52px; font-family: Georgia, serif; background: #fff; }
.tpl-minimal .r-name { font-size: 34px; font-weight: 300; color: #111827; }
.tpl-minimal .r-designation { font-size: 15px; color: #6b7280; margin: 4px 0; }
.tpl-minimal .r-contact { font-size: 12px; color: #9ca3af; margin: 4px 0 40px; }
.tpl-minimal .r-section-title { font-size: 10px; text-transform: uppercase; letter-spacing: 3px; color: #9ca3af; margin: 32px 0 12px; }
.tpl-minimal .r-summary { font-size: 14px; color: #374151; line-height: 1.8; }
.tpl-minimal .r-summary-bullets { padding-left: 16px; }
.tpl-minimal .r-summary-bullets li { font-size: 14px; color: #374151; line-height: 1.8; margin-bottom: 5px; }
.tpl-minimal .r-skills { font-size: 13px; color: #6b7280; line-height: 1.8; }
.tpl-minimal .r-exp-block { margin-bottom: 24px; }
.tpl-minimal .r-exp-role { font-size: 15px; color: #111827; }
.tpl-minimal .r-exp-meta { font-size: 12px; color: #9ca3af; margin: 3px 0 10px; }
.tpl-minimal .r-bullets { list-style: none; padding-left: 0; }
.tpl-minimal .r-bullets li { font-size: 13px; color: #4b5563; line-height: 1.8; margin-bottom: 4px; padding-left: 14px; position: relative; }
.tpl-minimal .r-bullets li::before { content: '—'; position: absolute; left: 0; color: #9ca3af; }
.tpl-minimal .r-edu-block { margin-bottom: 14px; }
.tpl-minimal .r-edu-degree { font-size: 14px; color: #111827; }
.tpl-minimal .r-edu-meta { font-size: 12px; color: #9ca3af; margin-top: 2px; }

/* Executive */
.tpl-executive { display: flex; min-height: 600px; }
.tpl-executive .exec-sidebar { width: 220px; min-width: 220px; background: #1e3a5f; padding: 36px 22px; }
.tpl-executive .exec-main { flex: 1; padding: 36px 32px; background: #fff; }
.tpl-executive .r-name { font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 4px; font-family: 'Segoe UI', sans-serif; }
.tpl-executive .r-designation { font-size: 12px; color: #93b8d4; margin-bottom: 6px; }
.tpl-executive .r-contact { font-size: 11px; color: #93b8d4; margin-bottom: 28px; line-height: 1.8; }
.tpl-executive .sidebar-label { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: #7fb3d3; margin-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.15); padding-bottom: 4px; }
.tpl-executive .sidebar-skill { font-size: 12px; color: #e2eef7; margin-bottom: 7px; padding-left: 8px; border-left: 2px solid #4a9aba; line-height: 1.4; }
.tpl-executive .sidebar-edu-item { margin-bottom: 10px; }
.tpl-executive .sidebar-edu-degree { font-size: 12px; font-weight: 600; color: #fff; }
.tpl-executive .sidebar-edu-meta { font-size: 10px; color: #93b8d4; margin-top: 2px; }
.tpl-executive .main-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: #1e3a5f; border-bottom: 2px solid #1e3a5f; padding-bottom: 4px; margin: 20px 0 12px; }
.tpl-executive .main-section-title:first-child { margin-top: 0; }
.tpl-executive .r-summary { font-size: 13px; color: #374151; line-height: 1.7; }
.tpl-executive .r-summary-bullets { padding-left: 16px; }
.tpl-executive .r-summary-bullets li { font-size: 13px; color: #374151; line-height: 1.7; margin-bottom: 4px; }
.tpl-executive .r-exp-block { margin-bottom: 16px; }
.tpl-executive .r-exp-role { font-size: 14px; font-weight: 700; color: #1e293b; }
.tpl-executive .r-exp-meta { font-size: 12px; color: #6b7280; font-style: italic; margin: 2px 0 7px; }
.tpl-executive .r-bullets { padding-left: 16px; }
.tpl-executive .r-bullets li { font-size: 12px; color: #374151; line-height: 1.7; margin-bottom: 3px; }

/* Creative */
.tpl-creative { font-family: 'Segoe UI', system-ui, sans-serif; background: #fff; }
.tpl-creative .creative-header { background: #0d9488; padding: 32px 44px; }
.tpl-creative .r-name { font-size: 32px; font-weight: 700; color: #fff; }
.tpl-creative .r-designation { font-size: 15px; color: #ccfbf1; margin: 3px 0; }
.tpl-creative .r-contact { font-size: 13px; color: #99f6e4; margin-top: 3px; }
.tpl-creative .creative-body { padding: 28px 44px; background: #fff; }
.tpl-creative .r-section-title { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: #134e4a; margin: 22px 0 10px; }
.tpl-creative .r-section-title::before { content: '◆'; color: #0d9488; font-size: 10px; }
.tpl-creative .r-summary { font-size: 14px; color: #374151; line-height: 1.75; }
.tpl-creative .r-summary-bullets { padding-left: 18px; }
.tpl-creative .r-summary-bullets li { font-size: 14px; color: #374151; line-height: 1.7; margin-bottom: 4px; }
.tpl-creative .r-skills { font-size: 13px; color: #374151; line-height: 1.7; }
.tpl-creative .r-exp-block { margin-bottom: 18px; }
.tpl-creative .r-exp-header { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px; }
.tpl-creative .r-exp-role { font-size: 15px; font-weight: 700; color: #134e4a; }
.tpl-creative .r-exp-duration { font-size: 12px; color: #6b7280; font-style: italic; }
.tpl-creative .r-exp-company { font-size: 13px; color: #0d9488; margin: 2px 0 8px; }
.tpl-creative .r-bullets { padding-left: 18px; }
.tpl-creative .r-bullets li { font-size: 13px; color: #374151; line-height: 1.7; margin-bottom: 3px; }
.tpl-creative .r-edu-block { margin-bottom: 12px; }
.tpl-creative .r-edu-degree { font-size: 14px; font-weight: 600; color: #134e4a; }
.tpl-creative .r-edu-meta { font-size: 13px; color: #6b7280; margin-top: 2px; }

.spinner { display: inline-block; width: 13px; height: 13px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: middle; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
/* ── Designation suggest button ──────────────────────────────────────────── */
.designation-row { display: flex; gap: 8px; align-items: center; }
.designation-row input { flex: 1; }
.suggest-btn { background: #1e1e32; border: 1px solid #2a2a40; border-radius: 8px; padding: 9px 12px; font-size: 16px; cursor: pointer; transition: all 0.15s; flex-shrink: 0; }
.suggest-btn:hover:not(:disabled) { background: #2a2a50; border-color: #7c8fff; }
.suggest-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.suggest-status { font-size: 11px; padding: 6px 10px; border-radius: 6px; margin-top: 2px; }
.suggest-status.success { background: #0f2a1a; color: #4ade80; border: 1px solid #166534; }
.suggest-status.error { background: #2a0f0f; color: #f87171; border: 1px solid #7f1d1d; }
/* ── Enhance existing resume ─────────────────────────────────────────────── */
.enhance-upload-row { display: flex; align-items: center; gap: 10px; }
.upload-file-btn { background: #1e1e32; color: #7c8fff; border: 1px dashed #3a3a70; padding: 8px 14px; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 600; white-space: nowrap; transition: all 0.15s; }
.upload-file-btn:hover { background: #2a2a50; border-color: #7c8fff; }
.uploaded-name { font-size: 11px; color: #555575; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.parsed-preview { background: #0f2a1a; border: 1px solid #166534; border-radius: 8px; padding: 10px 12px; margin-top: 4px; }
.parsed-preview-title { font-size: 11px; font-weight: 600; color: #4ade80; margin-bottom: 6px; }
.parsed-meta { display: flex; flex-wrap: wrap; gap: 5px; }
.pm-tag { font-size: 11px; background: #1a2e1a; color: #86efac; border: 1px solid #166534; border-radius: 10px; padding: 2px 8px; }
.enhance-options-row { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.enhance-label { font-size: 11px; color: #888; white-space: nowrap; }
.enhance-btn { background: linear-gradient(135deg, #0d9488, #14b8a6); color: #fff; border: none; padding: 10px; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; width: 100%; margin-top: 4px; transition: opacity 0.2s; }
.enhance-btn:hover:not(:disabled) { opacity: 0.9; }
.enhance-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.enhance-note { font-size: 11px; color: #4ade80; margin-top: 6px; font-style: italic; width: 100%; }
/* ── API key save button ─────────────────────────────────────────────────── */
.apikey-row { display: flex; gap: 8px; align-items: center; }
.apikey-row input { flex: 1; }
.save-key-btn { background: #1e1e32; border: 1px solid #2a2a40; border-radius: 8px; padding: 9px 12px; font-size: 15px; cursor: pointer; transition: all 0.15s; flex-shrink: 0; }
.save-key-btn:hover:not(:disabled) { background: #2a2a50; border-color: #7c8fff; }
.save-key-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.save-key-status { font-size: 11px; padding: 5px 8px; border-radius: 6px; margin-top: 2px; }
.save-key-status.success { background: #0f2a1a; color: #4ade80; border: 1px solid #166534; }
.save-key-status.error   { background: #2a0f0f; color: #f87171; border: 1px solid #7f1d1d; }

/* ── Enhancement result panel (new bullets only) ─────────────────────────── */
.enhance-result-panel { background: #0a1520; border-bottom: 1px solid #1e3a5f; padding: 16px 24px; flex-shrink: 0; max-height: 320px; overflow-y: auto; }
.enhance-result-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.enhance-result-header span { font-size: 13px; font-weight: 700; color: #60a5fa; }
.er-exp-block { margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid #1a2a3a; }
.er-exp-block:last-child { border-bottom: none; }
.er-exp-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.er-company { font-size: 12px; font-weight: 700; color: #7c8fff; }
.er-role { font-size: 11px; color: #555575; }
.er-bullet { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: #cce4ff; line-height: 1.6; margin-bottom: 6px; background: #0d1e2e; border: 1px solid #1e3a5f; border-radius: 6px; padding: 7px 10px; }
.er-new-badge { background: #1e3a5f; color: #60a5fa; font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 4px; white-space: nowrap; flex-shrink: 0; margin-top: 1px; }
.er-empty { font-size: 12px; color: #555575; font-style: italic; padding: 8px 0; }
/* ── API key status banner ────────────────────────────────────────────────── */
.key-status-banner {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 12px;
}
.key-status-banner.ok    { background: #d1fae5; color: #065f46; }
.key-status-banner.error { background: #fee2e2; color: #991b1b; }
.key-status-banner code  { background: rgba(0,0,0,0.08); padding: 2px 5px; border-radius: 3px; font-family: monospace; }

/* ── Streaming progress bar ───────────────────────────────────────────────── */
.stream-progress {
  padding: 10px 16px 12px;
  border-bottom: 1px solid #e2e8f0;
}
.stream-progress-bar {
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  overflow: hidden;
}
.stream-progress-fill {
  height: 100%;
  background: #2563EB;
  border-radius: 2px;
  transition: width 0.3s ease;
  width: 0%;
}
.stream-status-text {
  font-size: 12px;
  color: #64748b;
  margin-top: 6px;
}

/* ── Plain template thumbnail ─────────────────────────────────────────────── */
.plain-prev { padding: 6px; }
.pp-name    { height: 6px; width: 55%; background: #111; border-radius: 1px; margin-bottom: 3px; }
.pp-contact { height: 2px; width: 80%; background: #555; border-radius: 1px; margin-bottom: 4px; }
.pp-rule    { height: 1px; width: 100%; background: #111; margin-bottom: 4px; }
.pp-section-title { height: 3px; width: 30%; background: #111; border-radius: 1px; margin-bottom: 3px; }
.pp-role-row { display: flex; justify-content: space-between; margin-bottom: 2px; }
.pp-role    { height: 3px; width: 45%; background: #333; border-radius: 1px; }
.pp-date    { height: 3px; width: 25%; background: #888; border-radius: 1px; }
.pp-line    { height: 2px; width: 88%; background: #ccc; border-radius: 1px; margin-bottom: 2px; }
.pp-line.short { width: 60%; }

/* ── Plain template full preview ──────────────────────────────────────────── */
.tpl-plain {
  padding: 48px 52px;
  font-family: 'Times New Roman', Times, serif;
  background: #fff;
  color: #000;
}
.tpl-plain .r-name {
  font-size: 22px;
  font-weight: 700;
  color: #000;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  margin-bottom: 4px;
}
.tpl-plain .r-designation {
  font-size: 14px;
  font-weight: 400;
  color: #000;
  text-align: center;
  margin-bottom: 4px;
}
.tpl-plain .r-contact {
  font-size: 12px;
  color: #000;
  text-align: center;
  margin-bottom: 8px;
}
.tpl-plain .r-main-rule {
  border: none;
  border-top: 1px solid #000;
  margin: 6px 0 14px;
}
.tpl-plain .r-section-title {
  font-size: 12px;
  font-weight: 700;
  color: #000;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-bottom: 1px solid #000;
  padding-bottom: 2px;
  margin: 16px 0 8px;
}
.tpl-plain .r-summary {
  font-size: 13px;
  color: #000;
  line-height: 1.65;
}
.tpl-plain .r-summary-bullets { padding-left: 18px; }
.tpl-plain .r-summary-bullets li {
  font-size: 13px;
  color: #000;
  line-height: 1.65;
  margin-bottom: 3px;
}
.tpl-plain .r-skills {
  font-size: 13px;
  color: #000;
  line-height: 1.65;
}
.tpl-plain .r-exp-block { margin-bottom: 14px; }
.tpl-plain .r-exp-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.tpl-plain .r-exp-role {
  font-size: 13px;
  font-weight: 700;
  color: #000;
}
.tpl-plain .r-exp-duration {
  font-size: 12px;
  color: #000;
  font-style: italic;
}
.tpl-plain .r-exp-company {
  font-size: 13px;
  color: #000;
  font-style: italic;
  margin: 1px 0 6px;
}
.tpl-plain .r-bullets { padding-left: 18px; }
.tpl-plain .r-bullets li {
  font-size: 13px;
  color: #000;
  line-height: 1.65;
  margin-bottom: 2px;
}
.tpl-plain .r-edu-block { margin-bottom: 10px; }
.tpl-plain .r-edu-degree {
  font-size: 13px;
  font-weight: 700;
  color: #000;
}
.tpl-plain .r-edu-meta {
  font-size: 12px;
  color: #000;
  font-style: italic;
}

/* ── Folder hint ──────────────────────────────────────────────────────────── */
.folder-hint {
  margin-top: 8px;
  padding: 10px 12px;
  background: #1a1a2e;
  border: 1px solid #2a2a40;
  border-radius: 8px;
  font-size: 12px;
}
.folder-hint-title { color: #94a3b8; margin-bottom: 4px; }
.folder-hint-path  {
  display: block;
  color: #7c8fff;
  font-family: monospace;
  font-size: 12px;
  word-break: break-all;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  background: #0f0f1a;
  margin: 4px 0;
}
.folder-hint-path:hover { background: #1e1e3a; }
.folder-hint-sub { color: #64748b; margin-top: 4px; font-size: 11px; }
.folder-hint-sub code { color: #7c8fff; background: #0f0f1a; padding: 1px 4px; border-radius: 3px; font-family: monospace; }

/* ── Discipline summary ───────────────────────────────────────────────────── */
.discipline-summary { margin-top: 8px; padding: 8px 12px; background: #0f0f1a; border: 1px solid #2a2a40; border-radius: 8px; }
.disc-title { font-size: 11px; color: #64748b; margin-bottom: 6px; }
.disc-tag { display: inline-block; font-size: 11px; background: #1e1e32; color: #7c8fff; border: 1px solid #2a2a40; border-radius: 20px; padding: 2px 10px; margin: 2px 3px 2px 0; text-transform: capitalize; }

/* ───────────────────────────────────────────────────────────────────────────
   Online-mode additions: login overlay, account bar, upload UI, file-delete
   ─────────────────────────────────────────────────────────────────────────── */

.login-overlay {
  position: fixed; inset: 0;
  background: rgba(12, 14, 20, 0.82);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
}
.login-card {
  background: #1a1d27;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 36px 32px;
  width: 360px; max-width: 92vw;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.login-logo {
  font-size: 22px; font-weight: 700; color: #f3f4f6;
  text-align: center;
}
.login-sub {
  font-size: 13px; color: #9ca3af;
  text-align: center; margin-top: 4px; margin-bottom: 24px;
}
.login-form { display: flex; flex-direction: column; gap: 10px; }
.login-form input {
  background: #12141c; color: #f3f4f6;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 11px 14px; border-radius: 8px;
  font-size: 14px; outline: none;
}
.login-form input:focus { border-color: #6366f1; }
.login-form button {
  background: #6366f1; color: white; border: none;
  padding: 11px; border-radius: 8px; font-weight: 600;
  cursor: pointer; font-size: 14px;
}
.login-form button:hover:not(:disabled) { background: #4f46e5; }
.login-form button:disabled { opacity: 0.6; cursor: not-allowed; }
.login-form .login-cancel {
  background: transparent; color: #9ca3af; border: 1px solid rgba(255,255,255,0.1);
}
.login-form .login-cancel:hover { background: rgba(255,255,255,0.04); }
.login-error {
  color: #ef4444; font-size: 13px; margin-top: 6px;
  padding: 8px 10px; background: rgba(239,68,68,0.08); border-radius: 6px;
}

/* Account bar (top of form panel) */
.logo-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 8px;
}
.account-menu { display: flex; align-items: center; gap: 6px; }
.account-name {
  font-size: 12px; color: #9ca3af;
  max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.account-btn {
  background: transparent; color: #9ca3af;
  border: 1px solid rgba(255,255,255,0.08);
  width: 28px; height: 28px; border-radius: 6px;
  cursor: pointer; font-size: 13px;
}
.account-btn:hover { background: rgba(255,255,255,0.06); color: #f3f4f6; }

/* Bank upload row */
.bank-upload-row { display: flex; gap: 8px; align-items: center; }
.load-btn.secondary { background: rgba(255,255,255,0.06); color: #d1d5db; }
.load-btn.danger { background: rgba(239,68,68,0.15); color: #fca5a5; }
.load-btn.danger:hover { background: rgba(239,68,68,0.25); }

/* File-list delete button */
.file-del {
  background: transparent; color: #9ca3af;
  border: none; cursor: pointer; padding: 2px 6px;
  font-size: 14px; margin-left: auto;
}
.file-del:hover { color: #ef4444; }
.file-item { position: relative; }

/* ─── Phase 1: bank search/filter ─────────────────────────────────────── */
.bank-filter-row {
  display: flex; gap: 8px; align-items: center;
  margin-top: 10px; margin-bottom: 8px;
}
.bank-filter-row input[type="text"],
.bank-filter-row input#bankSearch {
  flex: 1;
  background: #12141c; color: #f3f4f6;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 8px 12px; border-radius: 6px;
  font-size: 13px; outline: none;
}
.bank-filter-row input#bankSearch:focus { border-color: #6366f1; }
.bank-filter-row select {
  background: #12141c; color: #f3f4f6;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 8px 10px; border-radius: 6px;
  font-size: 13px; outline: none; cursor: pointer;
}
.bank-count {
  font-size: 12px; color: #9ca3af;
  white-space: nowrap;
  padding: 0 6px;
}
.file-disc {
  font-size: 11px; color: #93c5fd;
  background: rgba(59,130,246,0.12);
  padding: 2px 8px; border-radius: 10px;
  margin-left: 6px; margin-right: 6px;
  white-space: nowrap;
}
.bank-empty {
  padding: 14px;
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
  font-style: italic;
}

/* ─── Phase 2: embedding status banner ───────────────────────────────── */
.embed-status {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  line-height: 1.5;
}
.embed-status.ok {
  background: rgba(34,197,94,0.10);
  color: #86efac;
  border: 1px solid rgba(34,197,94,0.18);
}
.embed-status.warn {
  background: rgba(250,204,21,0.10);
  color: #fde68a;
  border: 1px solid rgba(250,204,21,0.20);
}
.embed-status.running {
  background: rgba(99,102,241,0.10);
  color: #c7d2fe;
  border: 1px solid rgba(99,102,241,0.22);
}
