/* ===== Конструктор резюме ===== */
.builder-wrap{display:grid;grid-template-columns:1fr 480px;gap:0;min-height:calc(100vh - 70px);max-width:1440px;margin:0 auto}
.builder-side{padding:40px clamp(24px,4vw,56px);overflow-y:auto}
.builder-preview{background:var(--surface-2);padding:32px 28px;border-left:1px solid var(--border)}

/* Прогресс шагов */
.builder-progress{margin-bottom:36px}
.step-dots{display:flex;align-items:center;justify-content:center;gap:0;max-width:420px;margin:0 auto}
.step-dot{position:relative;width:38px;height:38px;border-radius:50%;background:var(--surface-2);border:2px solid var(--border);display:flex;align-items:center;justify-content:center;font-weight:700;color:var(--muted);flex-shrink:0;transition:.25s;z-index:1}
.step-dot span{font-size:.95rem}
.step-dot::after{content:'';position:absolute;left:100%;top:50%;width:90px;height:2px;background:var(--border);z-index:-1}
.step-dot:last-child::after{display:none}
.step-dot.active{background:var(--grad);border-color:transparent;color:#fff;box-shadow:0 4px 12px rgba(47,91,234,.3)}
.step-dot.active::after{background:var(--brand)}

/* Форма */
.builder-form h2{font-size:1.5rem;margin-bottom:22px;font-family:var(--font-serif)}
.form-group{margin-bottom:20px}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:20px}
.form-col{display:flex;flex-direction:column}
.form-col-date{gap:8px}
.form-col-date select,.form-col-date input{margin-bottom:0}
.builder-form label{display:block;font-weight:600;font-size:.92rem;margin-bottom:7px;color:var(--text)}
.builder-form input[type=text],
.builder-form input[type=email],
.builder-form input[type=tel],
.builder-form input[type=number],
.builder-form input[type=file],
.builder-form select,
.builder-form textarea{
  width:100%;padding:12px 15px;border:1.5px solid var(--border);border-radius:11px;
  font-family:var(--font-sans);font-size:.98rem;background:var(--surface);color:var(--text);
  transition:border-color .15s,box-shadow .15s;
}
.builder-form input:focus,.builder-form select:focus,.builder-form textarea:focus{
  outline:none;border-color:var(--brand);box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 15%,transparent);
}
.builder-form textarea{resize:vertical;min-height:80px}

/* Блоки опыта/образования */
.exp-block,.edu-block{background:var(--surface-2);border:1px solid var(--border);border-radius:14px;padding:20px;margin-bottom:16px;position:relative}
.btn-remove{margin-top:12px;background:none;border:1px solid var(--border);color:var(--muted);padding:7px 14px;border-radius:9px;cursor:pointer;font-size:.88rem;font-family:var(--font-sans);transition:.15s}
.btn-remove:hover{border-color:#ef4444;color:#ef4444}
.btn-add{width:100%;padding:14px;background:none;border:2px dashed var(--border);border-radius:12px;color:var(--brand);font-weight:600;cursor:pointer;font-size:.98rem;font-family:var(--font-sans);transition:.15s}
.btn-add:hover{border-color:var(--brand);background:color-mix(in srgb,var(--brand) 5%,transparent)}

/* Навыки */
.skills-list{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
.skill-tag{display:inline-flex;align-items:center;gap:6px;background:color-mix(in srgb,var(--brand) 12%,transparent);color:var(--brand);padding:7px 14px;border-radius:var(--radius-pill,999px);font-weight:600;font-size:.9rem}
.skill-remove{background:none;border:none;color:var(--brand);cursor:pointer;font-size:1.1rem;line-height:1;padding:0}
.skill-remove:hover{color:#ef4444}

/* Выбор шаблона */
.template-picker{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.tpl-option{cursor:pointer;position:relative}
.tpl-option input{position:absolute;opacity:0}
.tpl-thumb{position:relative;aspect-ratio:3/4;border-radius:10px;overflow:hidden;border:2px solid var(--border);transition:.2s;background:var(--surface-2)}
.tpl-thumb img{width:100%;height:100%;object-fit:cover}
.tpl-check{position:absolute;top:8px;right:8px;width:24px;height:24px;border-radius:50%;background:var(--brand);color:#fff;display:flex;align-items:center;justify-content:center;font-size:.85rem;opacity:0;transition:.2s}
.tpl-option.active .tpl-thumb,.tpl-option input:checked+.tpl-thumb{border-color:var(--brand);box-shadow:0 4px 14px rgba(47,91,234,.25)}
.tpl-option.active .tpl-check,.tpl-option input:checked+.tpl-thumb .tpl-check{opacity:1}
.tpl-label{display:block;text-align:center;font-size:.82rem;font-weight:600;margin-top:7px}

/* Навигация шагов */
.builder-nav{display:flex;justify-content:space-between;gap:14px;margin-top:36px;padding-top:24px;border-top:1px solid var(--border)}
.builder-nav .btn{min-width:130px}
.form-actions{display:flex;flex-wrap:wrap;gap:12px}

/* Предпросмотр */
.preview-sticky{position:sticky;top:100px}
.preview-sticky h3{font-family:var(--font-serif);font-size:1.15rem;margin-bottom:18px;color:var(--muted)}
.cv-preview-box{background:var(--surface);border-radius:12px;box-shadow:var(--shadow-2);max-height:calc(100vh - 160px);overflow-y:auto}
.cv-preview-box .cv-render{box-shadow:none;transform:scale(.92);transform-origin:top center}

@media(max-width:1080px){
  .builder-wrap{grid-template-columns:1fr}
  .builder-preview{border-left:none;border-top:1px solid var(--border);order:2}
  .preview-sticky{position:static}
  .cv-preview-box{max-height:none}
  .step-dot::after{width:60px}
}
@media(max-width:680px){
  .form-row{grid-template-columns:1fr}
  .template-picker{grid-template-columns:repeat(2,1fr)}
  .step-dot{width:32px;height:32px}
  .step-dot::after{width:36px}
  .builder-nav .btn{min-width:auto;flex:1}
}