/* CVForge AI – Plugin Stylesheet v2.0 */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600&display=swap');

/* ── Reset inside plugin scope ── */
.cvforge-root *, .cvforge-root *::before, .cvforge-root *::after { box-sizing: border-box; margin: 0; padding: 0; }
.cvforge-root { font-family: 'Plus Jakarta Sans', sans-serif; color: #e0e0f0; line-height: 1.6; }
.cvforge-root[data-theme="light"] { --bg: #f4f4f9; --bg2: #fff; --bg3: #eaeaf5; --border: #d0d0e0; --text: #1a1a2e; --sub: #5050808; --sub2: #7070a0; --accent: #5558e8; --accent2: #818cf8; }
.cvforge-root[data-theme="dark"]  { --bg: #07070f; --bg2: #0d0d1c; --bg3: #090914; --border: #1c1c2c; --text: #e0e0f0; --sub: #6868a0; --sub2: #9090b8; --accent: #5558e8; --accent2: #818cf8; }
.cvforge-root { background: var(--bg); color: var(--text); min-height: 400px; border-radius: 16px; overflow: hidden; }

/* ── Loading ── */
.cvforge-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 300px; gap: 16px; color: var(--sub); }
.cvf-spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--accent2); border-radius: 50%; animation: cvf-spin .75s linear infinite; }
@keyframes cvf-spin { to { transform: rotate(360deg); } }

/* ── Header ── */
.cvf-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 28px; border-bottom: 1px solid var(--border); background: var(--bg2); }
.cvf-logo { font-family: 'Syne', sans-serif; font-size: 1.4rem; font-weight: 800; color: var(--text); cursor: pointer; }
.cvf-logo span { color: var(--accent2); }
.cvf-mode-pill { padding: 5px 14px; border-radius: 20px; font-size: .76rem; font-weight: 700; background: var(--bg3); border: 1px solid var(--border); color: var(--sub2); }
.cvf-mode-pill.blue { background: #14143a; color: var(--accent2); border-color: #818cf840; }
.cvf-mode-pill.green { background: #0a200a; color: #22c55e; border-color: #22c55e40; }
.cvf-switch-btn { background: none; border: 1px solid var(--border); color: var(--sub); border-radius: 7px; padding: 6px 13px; font-size: .78rem; cursor: pointer; font-family: inherit; transition: all .2s; }
.cvf-switch-btn:hover { border-color: var(--accent2); color: var(--accent2); }

/* ── Inner wrap ── */
.cvf-inner { max-width: 1060px; margin: 0 auto; padding: 0 24px 60px; }

/* ── Landing ── */
.cvf-landing { padding-top: 44px; }
.cvf-hero { text-align: center; margin-bottom: 44px; }
.cvf-hero-badge { display: inline-block; background: #14103a; border: 1px solid #818cf840; color: var(--accent2); padding: 6px 18px; border-radius: 24px; font-size: .8rem; font-weight: 600; margin-bottom: 18px; }
.cvf-hero h1 { font-family: 'Syne', sans-serif; font-size: clamp(1.8rem,4vw,2.8rem); font-weight: 800; color: var(--text); line-height: 1.15; margin-bottom: 14px; }
.cvf-hero h1 em { font-style: normal; background: linear-gradient(135deg,#818cf8,#a78bfa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.cvf-hero p { color: var(--sub); font-size: .96rem; max-width: 500px; margin: 0 auto; line-height: 1.75; }

.cvf-mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 36px; }
@media(max-width:640px){ .cvf-mode-grid { grid-template-columns: 1fr; } }
.cvf-mode-card { background: var(--bg2); border: 2px solid var(--border); border-radius: 20px; padding: 28px; cursor: pointer; transition: all .25s; }
.cvf-mode-card.card-a:hover { border-color: var(--accent2); box-shadow: 0 8px 40px #818cf812; transform: translateY(-4px); }
.cvf-mode-card.card-b:hover { border-color: #22c55e; box-shadow: 0 8px 40px #22c55e12; transform: translateY(-4px); }
.cvf-mode-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 14px; }
.cvf-mode-icon.blue { background: #14143a; border: 1px solid #818cf840; }
.cvf-mode-icon.green { background: #0a200a; border: 1px solid #22c55e40; }
.cvf-badge-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.cvf-opt-num { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; }
.cvf-opt-num.blue { color: var(--accent2); } .cvf-opt-num.green { color: #22c55e; }
.cvf-hot { background: #818cf820; color: var(--accent2); padding: 2px 9px; border-radius: 10px; font-size: .68rem; font-weight: 700; }
.cvf-new { background: #22c55e20; color: #22c55e; padding: 2px 9px; border-radius: 10px; font-size: .68rem; font-weight: 700; }
.cvf-mode-card h3 { font-family: 'Syne', sans-serif; font-size: 1.2rem; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.cvf-mode-card p { color: var(--sub); font-size: .86rem; line-height: 1.7; margin-bottom: 18px; }
.cvf-steps-list { list-style: none; margin-bottom: 22px; display: flex; flex-direction: column; gap: 7px; }
.cvf-steps-list li { color: var(--sub2); font-size: .84rem; display: flex; align-items: center; gap: 10px; }
.cvf-dot { width: 21px; height: 21px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .68rem; font-weight: 700; flex-shrink: 0; }
.cvf-dot.blue { background: #818cf820; color: var(--accent2); } .cvf-dot.green { background: #22c55e20; color: #22c55e; }
.cvf-cta { padding: 12px 18px; border-radius: 12px; font-weight: 700; font-size: .9rem; text-align: center; }
.cvf-cta.blue { background: linear-gradient(135deg,#5558e8,#818cf8); color: #fff; }
.cvf-cta.green { background: linear-gradient(135deg,#15943a,#22c55e); color: #fff; }

/* ── ATS explainer ── */
.cvf-explainer { background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; padding: 28px; text-align: center; }
.cvf-explainer h3 { font-family: 'Syne', sans-serif; font-size: 1.05rem; color: var(--text); margin-bottom: 10px; }
.cvf-explainer > p { color: var(--sub); font-size: .86rem; max-width: 620px; margin: 0 auto 20px; line-height: 1.75; }
.cvf-stats { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cvf-stat { background: var(--bg3); border: 1px solid var(--border); border-radius: 12px; padding: 14px 20px; min-width: 160px; }
.cvf-stat strong { display: block; font-family: 'Syne', sans-serif; font-size: 1.45rem; color: var(--accent2); margin-bottom: 4px; }
.cvf-stat span { color: var(--sub); font-size: .78rem; }

/* ── Progress bar ── */
.cvf-progress { display: flex; align-items: center; justify-content: center; padding: 28px 0 20px; flex-wrap: wrap; row-gap: 6px; }
.cvf-prog-step { display: flex; align-items: center; }
.cvf-prog-dot { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--border); background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: .74rem; font-weight: 700; color: #505070; flex-shrink: 0; transition: all .3s; }
.cvf-prog-step.active .cvf-prog-dot { border-color: var(--accent2); color: var(--accent2); box-shadow: 0 0 12px #818cf840; }
.cvf-prog-step.done .cvf-prog-dot { background: var(--accent2); border-color: var(--accent2); color: #fff; }
.cvf-prog-label { font-size: .7rem; color: #505070; margin: 0 4px; white-space: nowrap; }
.cvf-prog-step.active .cvf-prog-label, .cvf-prog-step.done .cvf-prog-label { color: var(--sub2); }
.cvf-prog-line { width: 26px; height: 2px; background: var(--border); }

/* ── Card ── */
.cvf-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 18px; padding: 32px; max-width: 640px; margin: 0 auto; }
.cvf-card.wide { max-width: 100%; }
.cvf-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: .7rem; font-weight: 700; letter-spacing: 1px; margin-bottom: 14px; }
.cvf-badge.blue { background: #14143a; color: var(--accent2); border: 1px solid #818cf840; }
.cvf-badge.green { background: #0a200a; color: #22c55e; border: 1px solid #22c55e40; }
.cvf-card h2 { font-family: 'Syne', sans-serif; font-size: 1.65rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.cvf-card .cvf-sub { color: var(--sub); font-size: .88rem; line-height: 1.7; margin-bottom: 20px; }

/* ── Drop zone ── */
.cvf-drop { border: 2px dashed var(--border); border-radius: 14px; padding: 48px 20px; text-align: center; cursor: pointer; transition: all .2s; margin-bottom: 14px; }
.cvf-drop:hover, .cvf-drop.over { border-color: var(--accent2); background: #12122a; }
.cvf-drop-icon { font-size: 2.4rem; margin-bottom: 10px; }
.cvf-drop p { color: var(--sub2); font-size: .94rem; margin-bottom: 5px; }
.cvf-drop .cvf-link { color: var(--accent2); text-decoration: underline; }
.cvf-drop small { color: #505070; font-size: .8rem; }
.cvf-fmt-badges { display: flex; justify-content: center; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.cvf-fmt { background: var(--bg3); border: 1px solid var(--border); padding: 3px 10px; border-radius: 6px; font-size: .72rem; color: var(--sub); }

/* ── Photo ── */
.cvf-photo-row { display: flex; align-items: center; gap: 14px; padding: 10px 0; }
.cvf-photo-box { width: 74px; height: 74px; border-radius: 12px; border: 2px dashed var(--border); display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; gap: 3px; font-size: .72rem; color: #505070; transition: border-color .2s; flex-shrink: 0; }
.cvf-photo-box:hover { border-color: var(--accent2); }
.cvf-photo-box img { width: 100%; height: 100%; object-fit: cover; }
.cvf-photo-box.large { width: 104px; height: 104px; }
.cvf-photo-hint { color: var(--sub); font-size: .8rem; }

/* ── Form elements ── */
.cvf-label { display: block; font-size: .8rem; color: var(--sub); margin-bottom: 6px; margin-top: 14px; }
.cvf-label .req { color: #ef4444; }
.cvf-label .opt { color: #404060; font-size: .75rem; }
.cvf-input, .cvf-textarea, .cvf-select { background: var(--bg3); border: 1px solid var(--border); border-radius: 9px; padding: 10px 14px; color: var(--text); font-family: inherit; font-size: .9rem; width: 100%; transition: border-color .2s; }
.cvf-input:focus, .cvf-textarea:focus { outline: none; border-color: var(--accent2); }
.cvf-input::placeholder, .cvf-textarea::placeholder { color: #303048; }
.cvf-textarea { resize: vertical; line-height: 1.6; }
.cvf-textarea.tall { min-height: 180px; }
.cvf-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media(max-width:480px){ .cvf-two-col { grid-template-columns: 1fr; } }
.cvf-personal-grid { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; }
.cvf-personal-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media(max-width:580px){ .cvf-personal-grid { grid-template-columns: 1fr; } .cvf-personal-fields { grid-template-columns: 1fr; } }

/* ── Tags ── */
.cvf-tags { display: flex; flex-wrap: wrap; gap: 7px; min-height: 10px; margin-bottom: 8px; }
.cvf-tag { background: #181830; border: 1px solid var(--border); padding: 4px 10px 4px 13px; border-radius: 20px; font-size: .8rem; color: var(--sub2); display: inline-flex; align-items: center; gap: 6px; }
.cvf-tag button { background: none; border: none; color: #505070; cursor: pointer; font-size: .86rem; padding: 0; line-height: 1; }
.cvf-tag button:hover { color: #ef4444; }
.cvf-tag-row { display: flex; gap: 8px; }
.cvf-tag-field { flex: 1; }
.cvf-tag.warn { background: #221500; border-color: #f59e0b40; color: #f59e0b; }

/* ── Sections ── */
.cvf-section { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.cvf-section:last-of-type { border-bottom: none; }
.cvf-section-title { font-family: 'Syne', sans-serif; font-size: .93rem; font-weight: 700; color: var(--sub2); margin-bottom: 6px; }
.cvf-section-hint { color: #505070; font-size: .78rem; margin-bottom: 12px; }

/* ── Exp cards ── */
.cvf-exp-card { background: var(--bg3); border: 1px solid var(--border); border-radius: 11px; padding: 16px; margin-bottom: 10px; }
.cvf-exp-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cvf-exp-num { font-size: .74rem; font-weight: 700; color: var(--accent2); text-transform: uppercase; letter-spacing: 1px; }
.cvf-empty-state { border: 1px dashed var(--border); border-radius: 10px; padding: 24px; text-align: center; color: #505070; font-size: .86rem; margin-bottom: 14px; }
.cvf-empty-state span { font-size: 1.7rem; display: block; margin-bottom: 7px; }

/* ── Buttons ── */
.cvf-btn-primary { background: linear-gradient(135deg,#5558e8,#818cf8); color: #fff; border: none; border-radius: 9px; padding: 11px 26px; font-family: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; transition: all .2s; display: inline-block; }
.cvf-btn-primary:hover { filter: brightness(1.12); transform: translateY(-1px); }
.cvf-btn-primary:disabled { opacity: .38; cursor: not-allowed; transform: none; }
.cvf-btn-primary.big { padding: 14px 36px; font-size: .98rem; }
.cvf-btn-primary.green { background: linear-gradient(135deg,#15943a,#22c55e); }
.cvf-btn-primary.full { width: 100%; text-align: center; }
.cvf-btn-ghost { background: none; border: 1px solid var(--border); color: var(--sub); border-radius: 9px; padding: 10px 20px; font-family: inherit; font-size: .88rem; cursor: pointer; transition: all .2s; }
.cvf-btn-ghost:hover { border-color: var(--accent2); color: var(--accent2); }
.cvf-btn-ghost:disabled { opacity: .38; cursor: not-allowed; }
.cvf-btn-ghost.full { width: 100%; text-align: center; margin-bottom: 8px; }
.cvf-btn-xs { background: var(--bg3); border: 1px solid var(--border); color: var(--sub2); border-radius: 7px; padding: 7px 13px; font-family: inherit; font-size: .78rem; cursor: pointer; white-space: nowrap; }
.cvf-btn-del { background: none; border: 1px solid #3a1212; color: #ef4444; border-radius: 6px; padding: 4px 10px; font-size: .74rem; cursor: pointer; font-family: inherit; }
.cvf-btn-del:hover { background: #2a0e0e; }
.cvf-btn-add { background: none; border: 1px dashed var(--border); color: var(--sub); border-radius: 9px; padding: 10px 20px; font-family: inherit; font-size: .85rem; cursor: pointer; width: 100%; transition: all .2s; margin-bottom: 12px; }
.cvf-btn-add:hover { border-color: var(--accent2); color: var(--accent2); }
.cvf-btn-row { display: flex; gap: 12px; align-items: center; margin-top: 18px; flex-wrap: wrap; }

/* ── Tip box ── */
.cvf-tip { background: #10082a; border: 1px solid #818cf820; border-radius: 10px; padding: 13px 15px; display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; font-size: .83rem; color: #8888b0; line-height: 1.65; }
.cvf-tip-icon { flex-shrink: 0; margin-top: 1px; }

/* ── Spinner ── */
.cvf-spin-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--sub); font-size: .87rem; padding: 20px 0; }
.cvf-spin-wrap.big { padding: 60px 0; }
.cvf-spin { width: 34px; height: 34px; border: 3px solid var(--border); border-top-color: var(--accent2); border-radius: 50%; animation: cvf-spin .75s linear infinite; }
.cvf-spin.green { border-top-color: #22c55e; }
.cvf-spin-inline { display: inline-block; width: 13px; height: 13px; border: 2px solid var(--border); border-top-color: var(--accent2); border-radius: 50%; animation: cvf-spin .75s linear infinite; margin-right: 8px; vertical-align: middle; }
.cvf-err { color: #f59e0b; font-size: .82rem; margin-top: 10px; }
.cvf-no-key { background: #2a0a0a; border: 1px solid #ef444440; border-radius: 10px; padding: 18px; color: #fca5a5; font-size: .88rem; line-height: 1.7; text-align: center; margin: 16px 0; }

/* ── Score meter ── */
.cvf-score-outer { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.cvf-score-svg { width: 145px; }
.cvf-score-lbl { color: var(--sub); font-size: .74rem; margin-top: 4px; text-align: center; }

/* ── Result ── */
.cvf-result-hero { display: flex; gap: 22px; align-items: center; background: var(--bg2); border: 1px solid var(--border); border-radius: 18px; padding: 24px 28px; margin-bottom: 16px; flex-wrap: wrap; }
.cvf-result-info { flex: 1; min-width: 200px; }
.cvf-result-title { font-family: 'Syne', sans-serif; font-size: 1.45rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.cvf-result-sub { color: var(--sub); font-size: .88rem; margin-bottom: 14px; }
.cvf-result-sub strong { color: var(--accent2); }
.cvf-score-bar-wrap { background: var(--border); border-radius: 10px; height: 8px; overflow: hidden; margin-bottom: 7px; }
.cvf-score-bar { height: 100%; border-radius: 10px; transition: width 1.2s ease; }
.cvf-score-interp { font-size: .82rem; font-weight: 600; }
.cvf-missing-panel { background: #120c00; border: 1px solid #f59e0b28; border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.cvf-missing-title { font-size: .82rem; color: #f59e0b; margin-bottom: 9px; font-weight: 600; }
.cvf-missing-hint { font-size: .74rem; color: #6060a0; margin-top: 8px; }
.cvf-result-body { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
@media(max-width:800px){ .cvf-result-body { grid-template-columns: 1fr; } }
.cvf-action-panel { position: sticky; top: 20px; background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 4px; }
.cvf-action-title { font-family: 'Syne', sans-serif; font-size: .92rem; font-weight: 700; color: var(--text); margin-bottom: 11px; }
.cvf-dl-grid { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.cvf-dl-btn { background: var(--bg3); border: 1px solid var(--border); border-radius: 12px; padding: 13px; display: flex; gap: 12px; align-items: flex-start; cursor: pointer; transition: border-color .2s; text-align: left; color: var(--text); font-family: inherit; width: 100%; }
.cvf-dl-btn:hover { border-color: var(--accent2); }
.cvf-dl-ico { font-size: 1.45rem; flex-shrink: 0; }
.cvf-dl-btn strong { display: block; font-size: .86rem; margin-bottom: 3px; }
.cvf-dl-btn p { color: var(--sub); font-size: .76rem; line-height: 1.5; }
.cvf-cover-panel { background: var(--bg3); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 9px; }
.cvf-cover-out { background: var(--bg); border-radius: 8px; padding: 13px; margin-top: 9px; }
.cvf-cover-out pre { white-space: pre-wrap; font-family: inherit; font-size: .78rem; color: #a8a8c8; line-height: 1.7; margin-bottom: 9px; }
.cvf-reopt-panel { display: flex; flex-direction: column; gap: 0; padding-top: 4px; }

/* ── CV white preview ── */
.cvf-cv-preview { background: #fff; color: #1a1a2e; border-radius: 14px; padding: 28px 32px; font-family: Calibri,Arial,sans-serif; line-height: 1.6; font-size: .88rem; }
.cvf-cv-head { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 2.5px solid #1a1a2e; }
.cvf-cv-photo { width: 74px; height: 74px; border-radius: 5px; object-fit: cover; flex-shrink: 0; }
.cvf-cv-preview-title { font-size: 1.5rem; font-weight: 700; color: #1a1a2e; margin-bottom: 3px; }
.cvf-cv-contact { color: #444; font-size: .78rem; }
.cvf-cv-sec { font-size: .65rem; text-transform: uppercase; letter-spacing: 2.5px; color: #1a1a2e; border-bottom: 1.5px solid #1a1a2e; padding-bottom: 3px; margin: 13px 0 7px; font-weight: 700; }
.cvf-cv-p { color: #333; font-size: .84rem; line-height: 1.65; }
.cvf-cv-skills-row { color: #333; font-size: .82rem; line-height: 1.8; }
.cvf-cv-exp { margin-bottom: 10px; }
.cvf-cv-exp-hdr { display: flex; justify-content: space-between; align-items: baseline; }
.cvf-cv-exp-hdr strong { font-size: .88rem; }
.cvf-cv-dur { font-size: .74rem; color: #666; }
.cvf-cv-company { color: #444; font-size: .8rem; margin: 2px 0 3px; }
.cvf-cv-ul { padding-left: 15px; margin-top: 3px; }
.cvf-cv-ul li { font-size: .81rem; color: #333; margin-bottom: 2px; }
