/* ========================================
   CVBuilder AI — Resume Builder Styles
======================================== */
:root {
  --primary: #6C63FF; --primary-light: #8B85FF; --primary-dark: #5048E5;
  --accent: #FF6B9D; --accent2: #00D2FF;
  --bg: #080B14; --bg-2: #0D1117;
  --bg-card: rgba(255,255,255,0.04); --bg-card-hover: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.08); --border-hover: rgba(108,99,255,0.4);
  --text: #F0F2FF; --text-muted: rgba(240,242,255,0.55); --text-dim: rgba(240,242,255,0.35);
  --gradient: linear-gradient(135deg, #6C63FF, #FF6B9D);
  --gradient2: linear-gradient(135deg, #6C63FF, #00D2FF);
  --radius: 12px; --radius-lg: 20px;
  --font: 'Be Vietnam Pro', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body { font-family: var(--font); background: var(--bg); color: var(--text); display: flex; flex-direction: column; }

/* ─── TEMPLATE: MINIMAL ─── */
.template-minimal {
  font-family: 'Inter', sans-serif;
  color: #111;
  background: white;
  padding: 40px;
  line-height: 1.6;
}
.cmn-header { text-align: center; margin-bottom: 30px; }
.cmn-avatar { width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 15px; display: flex; align-items: center; justify-content: center; background: #f0f0f0; color: #555; font-size: 1.5rem; font-weight: 700; }
.cmn-name { font-size: 2.2rem; font-weight: 800; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 5px; }
.cmn-role { font-size: 1.1rem; color: #555; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 15px; }
.cmn-contact { display: flex; justify-content: center; flex-wrap: wrap; gap: 15px; font-size: 0.85rem; color: #666; }
.cmn-section { margin-bottom: 25px; }
.cmn-section-title { font-size: 1.1rem; font-weight: 700; text-transform: uppercase; border-bottom: 1px solid #ddd; padding-bottom: 8px; margin-bottom: 15px; letter-spacing: 1px; }
.cmn-item { margin-bottom: 15px; }
.cmn-item-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.cmn-item-title { font-weight: 700; font-size: 1rem; }
.cmn-item-date { font-size: 0.85rem; color: #777; }
.cmn-item-company { font-weight: 500; font-style: italic; color: #444; margin-bottom: 6px; font-size: 0.95rem; }
.cmn-item-desc { font-size: 0.9rem; color: #333; }
.cmn-skills, .cmn-langs { display: flex; flex-wrap: wrap; gap: 10px; }
.cmn-tag { background: #f5f5f5; border: 1px solid #e0e0e0; padding: 4px 10px; border-radius: 4px; font-size: 0.85rem; color: #333; }

/* Mini preview */
.tp-minimal-mini { background: #fdfdfd; border: 1px solid #ccc; }

/* ─── TOP BAR ─── */
.top-bar {
  height: 60px; background: rgba(13,17,23,0.95);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 20px; gap: 20px;
  backdrop-filter: blur(20px); z-index: 100; flex-shrink: 0;
}
.top-logo {
  font-size: 1.1rem; font-weight: 800; color: var(--text);
  text-decoration: none; display: flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.logo-icon { color: var(--primary); }
.logo-ai { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* Progress */
.progress-bar-container { flex: 1; display: flex; justify-content: center; }
.progress-steps { display: flex; align-items: center; gap: 0; }
.progress-step {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 4px 8px; border-radius: 50px;
  transition: all 0.3s;
}
.step-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border); border: 2px solid rgba(255,255,255,0.2);
  transition: all 0.3s;
}
.step-label { font-size: 0.75rem; color: var(--text-dim); font-weight: 500; transition: all 0.3s; }
.progress-step.active .step-dot { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 10px rgba(108,99,255,0.6); }
.progress-step.active .step-label { color: var(--primary-light); font-weight: 700; }
.progress-step.done .step-dot { background: #4ADE80; border-color: #4ADE80; }
.progress-step.done .step-label { color: #4ADE80; }
.progress-line { width: 24px; height: 2px; background: var(--border); transition: background 0.3s; }
.progress-line.done { background: #4ADE80; }

.top-actions { display: flex; gap: 10px; }
.btn-template-toggle, .btn-export {
  padding: 8px 16px; border-radius: 50px; border: none; cursor: pointer;
  font-size: 0.85rem; font-weight: 600; font-family: var(--font);
  transition: all 0.2s;
}
.btn-template-toggle { background: var(--bg-card); border: 1px solid var(--border); color: var(--text); }
.btn-template-toggle:hover { border-color: var(--primary); color: var(--primary-light); }
.btn-export { background: var(--gradient); color: white; box-shadow: 0 4px 16px rgba(108,99,255,0.4); }
.btn-export:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(108,99,255,0.5); }

/* ─── MAIN LAYOUT ─── */
.builder-layout { display: flex; flex: 1; overflow: hidden; }

/* ─── FORM PANEL ─── */
.form-panel {
  width: 480px; min-width: 380px; flex-shrink: 0;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.step-panel {
  display: none; flex: 1;
  overflow-y: auto; padding: 28px;
  animation: slideIn 0.3s ease;
  scrollbar-width: thin; scrollbar-color: var(--primary) transparent;
}
.step-panel.active { display: block; }
@keyframes slideIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: translateX(0); } }

.step-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 28px; }
.step-icon { font-size: 2rem; }
.step-header h2 { font-size: 1.3rem; font-weight: 800; margin-bottom: 4px; }
.step-header p { font-size: 0.9rem; color: var(--text-muted); }

/* Form */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full-width { grid-column: 1 / -1; }
.form-group label { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); }
.required { color: var(--accent); }
.form-group input, .form-group textarea, .form-group select {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 11px 14px;
  color: var(--text); font-family: var(--font); font-size: 0.9rem;
  transition: all 0.2s; outline: none; width: 100%;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.15);
  background: rgba(108,99,255,0.05);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-dim); }
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group select { cursor: pointer; }
.form-group select option { background: #1a1a2e; }

/* Experience / Education items */
.exp-item, .edu-item, .lang-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px; margin-bottom: 14px;
  position: relative;
}
.exp-item:hover, .edu-item:hover { border-color: rgba(108,99,255,0.3); }
.item-header { display: flex; align-items: center; margin-bottom: 14px; gap: 10px; }
.drag-handle { 
  cursor: grab; color: var(--text-dim); font-size: 1.2rem; 
  display: flex; align-items: center; padding: 4px;
}
.drag-handle:active { cursor: grabbing; }
.item-title { font-size: 0.9rem; font-weight: 700; color: var(--primary-light); flex: 1; }
.btn-remove-item {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,107,157,0.15); border: 1px solid rgba(255,107,157,0.3);
  color: var(--accent); cursor: pointer; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; flex-shrink: 0;
}
.btn-remove-item:hover { background: rgba(255,107,157,0.3); transform: scale(1.1); }
.item-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.btn-add-item {
  width: 100%; padding: 12px;
  background: rgba(108,99,255,0.08);
  border: 1px dashed rgba(108,99,255,0.3);
  border-radius: var(--radius); color: var(--primary-light);
  font-family: var(--font); font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; margin-top: 4px;
}
.btn-add-item:hover { background: rgba(108,99,255,0.15); border-color: var(--primary); }

/* Avatar Upload & Sortable */
.avatar-upload-area {
  display: flex; align-items: center; gap: 16px;
  background: rgba(255,255,255,0.02); border: 1px dashed rgba(255,255,255,0.2);
  border-radius: var(--radius); padding: 16px; position: relative;
  transition: all 0.2s; overflow: hidden;
}
.avatar-upload-area:hover { border-color: var(--primary-light); background: rgba(108,99,255,0.05); }
.avatar-preview {
  width: 60px; height: 60px; border-radius: 50%; flex-shrink: 0;
  background: var(--gradient); display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 700; color: white;
  background-size: cover; background-position: center; border: 2px solid var(--border);
}
#avatarInput { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.avatar-upload-text { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.sortable-ghost { opacity: 0.4; background: rgba(108,99,255,0.1) !important; border: 1px dashed var(--primary) !important; }

/* AI Tips */
.ai-tip-box {
  display: flex; gap: 12px; align-items: flex-start;
  background: rgba(108,99,255,0.08);
  border: 1px solid rgba(108,99,255,0.2);
  border-radius: var(--radius); padding: 14px; margin-top: 20px;
}
.ai-icon { font-size: 1.2rem; flex-shrink: 0; }
.ai-tip-box strong { color: var(--primary-light); display: block; margin-bottom: 4px; }
.ai-tip-box div { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }

/* Skills */
.form-section-title { font-size: 0.85rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
.form-section-title.mt-24 { margin-top: 24px; }
.skills-input-area { display: flex; gap: 8px; margin-bottom: 12px; }
.skills-input-area input { flex: 1; }
.btn-add-skill {
  padding: 11px 16px; background: var(--gradient);
  border: none; border-radius: 10px; color: white;
  font-family: var(--font); font-weight: 600; cursor: pointer; font-size: 0.85rem;
  transition: transform 0.2s; white-space: nowrap;
}
.btn-add-skill:hover { transform: scale(1.05); }
.ai-skill-suggestions { margin-bottom: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.suggestion-label { font-size: 0.8rem; color: var(--text-dim); white-space: nowrap; }
.suggestion-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.suggestion-chip {
  background: rgba(108,99,255,0.1); border: 1px solid rgba(108,99,255,0.25);
  color: var(--primary-light); padding: 4px 12px; border-radius: 50px;
  font-size: 0.78rem; cursor: pointer; transition: all 0.2s;
}
.suggestion-chip:hover { background: rgba(108,99,255,0.25); transform: scale(1.05); }
.skills-tags { display: flex; flex-wrap: wrap; gap: 8px; min-height: 40px; }
.skill-tag {
  display: flex; align-items: center; gap: 6px;
  background: rgba(108,99,255,0.15); border: 1px solid rgba(108,99,255,0.3);
  color: var(--primary-light); padding: 6px 14px; border-radius: 50px;
  font-size: 0.85rem; font-weight: 600;
  animation: tagPop 0.2s ease;
}
@keyframes tagPop { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.skill-remove { cursor: pointer; color: var(--text-dim); font-size: 0.9rem; transition: color 0.2s; }
.skill-remove:hover { color: var(--accent); }

/* AI Generate */
.ai-generate-box {
  background: rgba(108,99,255,0.08);
  border: 1px solid rgba(108,99,255,0.25);
  border-radius: var(--radius-lg); padding: 20px; margin-top: 16px;
}
.ai-generate-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ai-generate-header strong { color: var(--primary-light); }
.ai-generate-box p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; }
.ai-tone-options { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tone-btn {
  padding: 8px 16px; border-radius: 50px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  color: var(--text-muted); font-family: var(--font); font-size: 0.85rem;
  cursor: pointer; transition: all 0.2s;
}
.tone-btn:hover, .tone-btn.active { background: rgba(108,99,255,0.2); border-color: var(--primary); color: var(--text); }
.btn-ai-generate {
  width: 100%; padding: 14px;
  background: var(--gradient); border: none;
  border-radius: var(--radius); color: white;
  font-family: var(--font); font-size: 0.95rem; font-weight: 700;
  cursor: pointer; transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(108,99,255,0.4);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-ai-generate:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(108,99,255,0.5); }
.btn-spinner { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.step-complete-box {
  background: rgba(74,222,128,0.08); border: 1px solid rgba(74,222,128,0.25);
  border-radius: var(--radius); padding: 20px; margin-top: 16px; text-align: center;
}
.step-complete-box h3 { font-size: 1.1rem; margin-bottom: 8px; }
.step-complete-box p { font-size: 0.9rem; color: var(--text-muted); }

/* Step Nav */
.step-navigation {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px; border-top: 1px solid var(--border);
  background: rgba(13,17,23,0.8); flex-shrink: 0;
}
.btn-prev, .btn-next {
  padding: 10px 24px; border-radius: 50px; border: none;
  font-family: var(--font); font-size: 0.9rem; font-weight: 700; cursor: pointer;
  transition: all 0.2s;
}
.btn-prev { background: rgba(255,255,255,0.06); border: 1px solid var(--border); color: var(--text-muted); }
.btn-prev:hover { border-color: var(--primary); color: var(--text); }
.btn-next { background: var(--gradient); color: white; box-shadow: 0 4px 16px rgba(108,99,255,0.4); }
.btn-next:hover { transform: translateY(-2px); }
.step-counter { font-size: 0.85rem; color: var(--text-dim); font-weight: 600; }

/* ─── PREVIEW PANEL ─── */
.preview-panel {
  flex: 1; background: #1a1a2a; display: flex; flex-direction: column; overflow: hidden;
}
.preview-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.3); font-size: 0.9rem; font-weight: 600; flex-shrink: 0;
}
.template-switcher { display: flex; gap: 6px; }
.tmpl-btn {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border);
  cursor: pointer; font-size: 10px; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.tmpl-btn:nth-child(1) { color: var(--primary); border-color: rgba(108,99,255,0.4); }
.tmpl-btn:nth-child(2) { color: #6B7280; border-color: rgba(107,114,128,0.4); }
.tmpl-btn:nth-child(3) { color: var(--accent); border-color: rgba(255,107,157,0.4); }
.tmpl-btn.active { transform: scale(1.3); border-width: 2px; }
.preview-scroll { flex: 1; overflow-y: auto; padding: 24px; display: flex; justify-content: center; }

/* ─── CV PAPER ─── */
.cv-paper {
  width: 210mm; min-height: 297mm;
  background: white; border-radius: 4px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  overflow: hidden; position: relative;
  transition: all 0.4s ease;
  font-family: 'Inter', 'Be Vietnam Pro', sans-serif;
  color: #1a1a2a;
}

/* ─── TEMPLATE: MODERN ─── */
.cv-paper.template-modern { display: flex; }
.cv-modern-sidebar {
  width: 35%; background: #1a1a3e; color: white;
  padding: 32px 24px; display: flex; flex-direction: column; gap: 24px;
}
.cv-modern-main { flex: 1; padding: 32px 28px; display: flex; flex-direction: column; gap: 20px; }
.cm-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, #6C63FF, #FF6B9D);
  margin: 0 auto 16px; display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 800; color: white;
}
.cm-name { font-size: 0.95rem; font-weight: 800; text-align: center; margin-bottom: 4px; color: white; }
.cm-role { font-size: 0.75rem; text-align: center; color: rgba(255,255,255,0.6); margin-bottom: 16px; }
.cm-contact-item { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 0.72rem; color: rgba(255,255,255,0.7); word-break: break-all; }
.cm-contact-icon { font-size: 0.8rem; flex-shrink: 0; }
.cm-section-title {
  font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px;
  color: rgba(255,255,255,0.5); border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 6px; margin-bottom: 10px;
}
.cm-skill-item { margin-bottom: 8px; }
.cm-skill-name { font-size: 0.72rem; color: rgba(255,255,255,0.8); margin-bottom: 3px; }
.cm-skill-bar { height: 4px; background: rgba(255,255,255,0.15); border-radius: 2px; overflow: hidden; }
.cm-skill-fill { height: 100%; background: linear-gradient(90deg, #6C63FF, #FF6B9D); border-radius: 2px; }
.cm-lang-item { font-size: 0.72rem; color: rgba(255,255,255,0.7); margin-bottom: 6px; display: flex; justify-content: space-between; }
.cm-lang-level { color: rgba(108,99,255,0.9); font-weight: 600; }

/* Main side */
.cmm-name { font-size: 1.6rem; font-weight: 900; color: #1a1a3e; }
.cmm-role { font-size: 0.9rem; color: #6C63FF; font-weight: 600; margin-bottom: 4px; }
.cmm-section-title {
  font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px;
  color: #6C63FF; border-bottom: 2px solid #6C63FF; padding-bottom: 6px; margin-bottom: 12px;
}
.cmm-summary { font-size: 0.8rem; line-height: 1.7; color: #4a4a6a; }
.cmm-exp-item, .cmm-edu-item { margin-bottom: 14px; }
.cmm-exp-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 2px; }
.cmm-exp-title { font-size: 0.82rem; font-weight: 700; color: #1a1a3e; }
.cmm-exp-date { font-size: 0.72rem; color: #888; background: rgba(108,99,255,0.1); padding: 2px 8px; border-radius: 50px; }
.cmm-exp-company { font-size: 0.78rem; color: #6C63FF; font-weight: 600; margin-bottom: 4px; }
.cmm-exp-desc { font-size: 0.75rem; line-height: 1.6; color: #4a4a6a; }
.cmm-skills-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.cmm-skill-tag { background: rgba(108,99,255,0.1); border: 1px solid rgba(108,99,255,0.2); color: #6C63FF; padding: 3px 10px; border-radius: 50px; font-size: 0.72rem; font-weight: 600; }

/* ─── TEMPLATE: CLASSIC ─── */
.cv-paper.template-classic { display: flex; flex-direction: column; }
.cv-classic-header { padding: 32px 40px 20px; border-bottom: 3px solid #2c3e50; }
.cch-name { font-size: 2rem; font-weight: 900; color: #2c3e50; }
.cch-role { font-size: 1rem; color: #7f8c8d; font-weight: 500; margin-bottom: 12px; }
.cch-contact { display: flex; gap: 24px; flex-wrap: wrap; }
.cch-contact-item { font-size: 0.78rem; color: #555; display: flex; align-items: center; gap: 6px; }
.cv-classic-body { display: flex; flex: 1; gap: 0; padding: 24px 40px; }
.cv-classic-left { width: 38%; padding-right: 28px; border-right: 1px solid #eee; display: flex; flex-direction: column; gap: 20px; }
.cv-classic-right { flex: 1; padding-left: 28px; display: flex; flex-direction: column; gap: 20px; }
.ccs-title { font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: #2c3e50; border-bottom: 2px solid #2c3e50; padding-bottom: 5px; margin-bottom: 10px; }
.ccs-item { margin-bottom: 10px; }
.ccs-item-title { font-size: 0.82rem; font-weight: 700; color: #2c3e50; }
.ccs-item-sub { font-size: 0.75rem; color: #777; margin-bottom: 3px; }
.ccs-item-desc { font-size: 0.75rem; color: #555; line-height: 1.5; }
.ccs-skill { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 0.78rem; color: #333; }
.ccs-skill-dot { width: 8px; height: 8px; border-radius: 50%; background: #2c3e50; }
.ccs-summary { font-size: 0.8rem; line-height: 1.7; color: #444; }
.ccs-tag { display: inline-block; background: #f0f4f8; color: #2c3e50; padding: 3px 10px; border-radius: 4px; font-size: 0.72rem; margin: 3px; }

/* ─── TEMPLATE: CREATIVE ─── */
.cv-paper.template-creative { display: flex; flex-direction: column; }
.cv-creative-top { height: 12px; background: linear-gradient(90deg, #6C63FF, #FF6B9D, #00D2FF); }
.cv-creative-header { display: flex; align-items: center; gap: 24px; padding: 28px 32px; background: #0f0f1a; }
.crt-avatar { width: 80px; height: 80px; border-radius: 16px; background: linear-gradient(135deg, #6C63FF, #FF6B9D); display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 800; color: white; flex-shrink: 0; }
.crt-info { flex: 1; }
.crt-name { font-size: 1.6rem; font-weight: 900; color: white; }
.crt-role { font-size: 0.9rem; background: linear-gradient(135deg, #6C63FF, #FF6B9D); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; font-weight: 700; }
.crt-contact { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.crt-contact-item { font-size: 0.75rem; color: rgba(255,255,255,0.6); display: flex; align-items: center; gap: 5px; }
.cv-creative-body { display: flex; flex: 1; }
.cv-creative-sidebar { width: 35%; background: #12122a; padding: 24px 20px; display: flex; flex-direction: column; gap: 20px; }
.cv-creative-main { flex: 1; padding: 24px 24px; background: white; display: flex; flex-direction: column; gap: 18px; }
.crs-title { font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 2px; color: rgba(255,255,255,0.4); margin-bottom: 10px; }
.crs-skill { margin-bottom: 8px; }
.crs-skill-name { font-size: 0.75rem; color: rgba(255,255,255,0.8); margin-bottom: 4px; }
.crs-skill-bar { height: 3px; background: rgba(255,255,255,0.1); border-radius: 2px; overflow: hidden; }
.crs-skill-fill { height: 100%; background: linear-gradient(90deg, #6C63FF, #FF6B9D); border-radius: 2px; }
.crs-lang { font-size: 0.75rem; color: rgba(255,255,255,0.6); margin-bottom: 6px; display: flex; justify-content: space-between; }
.crm-section-title { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; color: #6C63FF; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.crm-section-title::after { content: ''; flex: 1; height: 1px; background: rgba(108,99,255,0.2); }
.crm-summary { font-size: 0.78rem; line-height: 1.7; color: #444; }
.crm-exp-item { margin-bottom: 12px; }
.crm-exp-title { font-size: 0.82rem; font-weight: 700; color: #1a1a3e; }
.crm-exp-company { font-size: 0.75rem; color: #6C63FF; font-weight: 600; margin-bottom: 3px; }
.crm-exp-date { font-size: 0.7rem; color: #888; margin-bottom: 4px; }
.crm-exp-desc { font-size: 0.74rem; line-height: 1.6; color: #555; }
.crm-skill-tag { display: inline-block; background: linear-gradient(135deg, rgba(108,99,255,0.1), rgba(255,107,157,0.1)); border: 1px solid rgba(108,99,255,0.2); color: #6C63FF; padding: 3px 10px; border-radius: 50px; font-size: 0.72rem; margin: 3px; font-weight: 600; }

/* ─── TEMPLATE MODAL ─── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  display: none; z-index: 1000; backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-content {
  background: #0D1117; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 24px; padding: 28px; width: 600px; max-width: 90vw;
  animation: modalIn 0.3s ease;
}
@keyframes modalIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.modal-header h3 { font-size: 1.2rem; font-weight: 800; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; padding: 4px 8px; border-radius: 6px; transition: all 0.2s; }
.modal-close:hover { background: rgba(255,255,255,0.1); color: var(--text); }
.modal-templates { display: flex; gap: 16px; }
.modal-template {
  flex: 1; cursor: pointer; text-align: center; padding: 16px;
  background: rgba(255,255,255,0.03); border: 2px solid var(--border);
  border-radius: 16px; transition: all 0.3s;
}
.modal-template:hover, .modal-template.active { border-color: var(--primary); background: rgba(108,99,255,0.08); transform: translateY(-4px); }
.mt-preview { height: 100px; border-radius: 8px; margin-bottom: 10px; }
.tp-modern-mini { background: linear-gradient(135deg, #1a1a3e 35%, white 35%); }
.tp-classic-mini { background: white; border-top: 5px solid #2c3e50; }
.tp-creative-mini { background: #0f0f1a; border-top: 5px solid; border-image: linear-gradient(90deg, #6C63FF, #FF6B9D) 1; }
.modal-template strong { display: block; font-size: 0.9rem; margin-bottom: 4px; }
.modal-template span { font-size: 0.78rem; color: var(--text-dim); }

/* ─── MOBILE PREVIEW BUTTON ─── */
.btn-mobile-preview {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  padding: 14px 24px;
  border-radius: 50px;
  background: var(--gradient);
  color: white;
  border: none;
  font-family: var(--font);
  font-weight: 700;
  box-shadow: 0 8px 30px rgba(108,99,255,0.5);
  cursor: pointer;
  transition: transform 0.2s;
}
.btn-mobile-preview:hover { transform: translateY(-2px); }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .form-panel { width: 100%; border-right: none; }
  .preview-panel { 
    display: none; 
    position: fixed; 
    inset: 0; 
    top: 60px; /* Below top bar */
    z-index: 900; 
  }
  .preview-panel.mobile-active { display: flex; }
  .progress-steps { display: none; }
  .btn-mobile-preview { display: block; }
}
