/* ====================================
   ZOWL HV GENERATOR — STYLES
   ==================================== */

:root {
  --accent: #6C47FF;
  --accent2: #FF4778;
  --accent3: #00D4FF;
  --bg: #080C14;
  --bg2: #0E1420;
  --bg3: #151D2E;
  --surface: #1A2235;
  --surface2: #212C42;
  --border: rgba(255,255,255,0.08);
  --text: #EDF0F7;
  --text2: #8A94AA;
  --text3: #5A6478;
  --success: #00C896;
  --warning: #FFB020;
  --error: #FF4758;
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-accent: 0 8px 40px rgba(108,71,255,0.3);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  /* CV Theme vars */
  --cv-accent: #6C47FF;
  --cv-font: 'Syne', sans-serif;
  --cv-template: classic;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ====== SCREEN TRANSITIONS ====== */
.screen {
  display: none;
  min-height: 100vh;
  animation: fadeSlideIn 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.screen.active { display: flex; flex-direction: column; }
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ====== SPLASH SCREEN ====== */
#screen-splash {
  position: relative;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
}

.splash-bg {
  position: absolute; inset: 0;
  pointer-events: none;
}

.splash-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
}
.orb1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #6C47FF, transparent 70%);
  top: -100px; left: -100px;
  animation: orbFloat 8s ease-in-out infinite;
}
.orb2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #FF4778, transparent 70%);
  bottom: -80px; right: 10%;
  animation: orbFloat 10s ease-in-out infinite reverse;
}
.orb3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, #00D4FF, transparent 70%);
  top: 40%; left: 50%;
  animation: orbFloat 12s ease-in-out infinite;
}
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.05); }
  66% { transform: translate(-20px, 30px) scale(0.97); }
}

.grid-overlay {
  position: absolute; inset: 0;
  background-image: 
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
}

.splash-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px 20px;
  max-width: 680px;
  width: 100%;
}

.brand-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent3);
  background: rgba(0,212,255,0.1);
  border: 1px solid rgba(0,212,255,0.2);
  padding: 6px 18px;
  border-radius: 100px;
  margin-bottom: 28px;
}

.splash-title {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 20px;
}
.title-line1 {
  display: block;
  font-size: clamp(72px, 15vw, 120px);
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.6) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -4px;
}
.title-line2 {
  display: block;
  font-size: clamp(32px, 7vw, 56px);
  color: var(--text2);
  letter-spacing: -1px;
  font-weight: 600;
}
.title-line2 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.splash-sub {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--text2);
  margin-bottom: 36px;
  font-weight: 300;
  line-height: 1.6;
}

.splash-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.stat {
  text-align: center;
  font-size: 13px;
  color: var(--text2);
}
.stat span {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 2px;
}
.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

/* ====== BUTTONS ====== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--accent), #8B6BFF);
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: 100px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-accent);
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.btn-primary svg { width: 18px; height: 18px; transition: transform 0.2s; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 48px rgba(108,71,255,0.45); }
.btn-primary:hover svg { transform: translateX(4px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary.btn-xl { padding: 18px 36px; font-size: 18px; border-radius: 100px; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  color: var(--text2);
  border: 1px solid var(--border);
  padding: 13px 24px;
  border-radius: 100px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-secondary:hover { background: var(--surface2); color: var(--text); border-color: rgba(255,255,255,0.15); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border);
  padding: 12px 24px;
  border-radius: 100px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 12px;
}
.btn-ghost svg { width: 16px; height: 16px; }
.btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,0.25); }

.btn-add {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(108,71,255,0.1);
  color: var(--accent);
  border: 1.5px dashed rgba(108,71,255,0.4);
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  justify-content: center;
}
.btn-add:hover { background: rgba(108,71,255,0.2); border-color: var(--accent); }

.btn-add-sm {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-add-sm:hover { background: #7c5cff; }

.help-btn {
  background: rgba(108,71,255,0.15);
  color: var(--accent);
  border: 1px solid rgba(108,71,255,0.3);
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  margin-left: 8px;
  font-family: var(--font-display);
  vertical-align: middle;
}
.help-btn:hover { background: rgba(108,71,255,0.3); }

/* ====== SELECT DROPDOWN FIX ====== */
select.field-input,
select {
  background-color: var(--bg3) !important;
  color: var(--text) !important;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  transition: var(--transition);
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A94AA' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 18px !important;
  padding-right: 40px !important;
}
select.field-input:focus,
select:focus {
  border-color: var(--accent);
  background-color: rgba(108,71,255,0.08) !important;
  box-shadow: 0 0 0 3px rgba(108,71,255,0.12);
}
select option {
  background-color: #151D2E !important;
  color: #EDF0F7 !important;
  padding: 10px 14px;
}
select option:hover,
select option:checked {
  background-color: #6C47FF !important;
  color: #fff !important;
}
/* Firefox fix */
@-moz-document url-prefix() {
  select.field-input, select { color: #EDF0F7 !important; background-color: #151D2E !important; }
}

/* ====== APP LAYOUT ====== */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.sidebar-progress {
  width: 200px;
  min-width: 200px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.logo-sm {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -1px;
}
.logo-sm span {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.progress-steps {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.progress-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  color: var(--text3);
  transition: var(--transition);
  cursor: default;
}
.progress-item.active {
  color: var(--text);
  background: rgba(108,71,255,0.15);
}
.progress-item.done { color: var(--text2); }
.progress-item.done .prog-num { background: var(--success); color: #fff; }
.progress-item.active .prog-num { background: var(--accent); color: #fff; }

.prog-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-display);
  flex-shrink: 0;
  transition: var(--transition);
}

/* ====== STEP MAIN (with live preview) ====== */
.step-main {
  flex: 0 0 560px;
  width: 560px;
  padding: 36px 40px;
  overflow-y: auto;
  min-width: 0;
  border-right: 1px solid var(--border);
}

/* ====== LIVE PREVIEW PANEL (right side) ====== */
.live-preview-panel {
  flex: 1;
  min-width: 240px;
  max-width: 420px;
  background: #0d1117;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  box-sizing: border-box;
}
.live-preview-label {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text3);
  text-align: center;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
}
.live-preview-label::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

/* Scaler: full remaining height, clips overflow */
.live-preview-scaler {
  flex: 1;
  overflow: hidden;
  position: relative;
  width: 100%;
}

/* live-cv-mini: absolute-fills the scaler, clips the scaled cv-doc */
.live-cv-mini {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 3px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08),
    0 12px 40px rgba(0,0,0,0.7);
  background: white;
}

/* cv-doc inside preview: ALWAYS 794px wide (real A4 px).
   JS applies transform:scale(s) where s = scaler-height / 1123
   so the FULL A4 height fits in the available panel height.     */
.live-cv-mini .cv-doc {
  position: absolute;
  top: 0;
  left: 0;
  width: 794px !important;    /* 210mm at 96dpi */
  min-height: 1123px !important; /* 297mm at 96dpi — shown via scale */
  max-width: none !important;
  transform-origin: top left;
  font-size: 11px !important;
  color: #1a1a1a !important;
  background: white !important;
  margin: 0 !important;
}

.live-preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 12px;
  color: var(--text3);
  text-align: center;
  padding: 20px;
}
.live-preview-placeholder svg { opacity: 0.3; }
.live-preview-placeholder p { font-size: 12px; line-height: 1.6; }

.step-header { margin-bottom: 36px; }

.step-chip {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(108,71,255,0.12);
  border: 1px solid rgba(108,71,255,0.25);
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.step-header h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.15;
}
.step-header p {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.65;
}

.vacancy-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent3);
  background: rgba(0,212,255,0.08);
  border: 1px solid rgba(0,212,255,0.2);
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 12px;
}
.vacancy-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent3);
  border-radius: 50%;
}

/* ====== FORM FIELDS ====== */
.card-field {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 16px;
  transition: border-color var(--transition);
}
.card-field:focus-within {
  border-color: rgba(108,71,255,0.5);
}

.card-field label {
  display: block;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: 0.3px;
}
.required { color: var(--accent2); }

.field-input {
  width: 100%;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  transition: var(--transition);
  outline: none;
}
.field-input:focus {
  border-color: var(--accent);
  background: rgba(108,71,255,0.05);
  box-shadow: 0 0 0 3px rgba(108,71,255,0.12);
}
.field-input::placeholder { color: var(--text3); }

.field-textarea {
  width: 100%;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  resize: vertical;
  transition: var(--transition);
  outline: none;
}
.field-textarea:focus {
  border-color: var(--accent);
  background: rgba(108,71,255,0.05);
  box-shadow: 0 0 0 3px rgba(108,71,255,0.12);
}
.field-textarea::placeholder { color: var(--text3); }

.field-hint {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text3);
  line-height: 1.5;
}
.field-hint svg { flex-shrink: 0; margin-top: 1px; }
.hint-warn { color: var(--warning) !important; }
.hint-warn svg { stroke: var(--warning); }

.fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.fields-grid .card-field { border-radius: 0; border-bottom-width: 0; border-right-width: 0; }
.fields-grid .card-field:nth-child(odd) { border-right-width: 1px; }
.fields-grid .card-field:nth-last-child(1),
.fields-grid .card-field:nth-last-child(2) { border-bottom-width: 1px; }
.fields-grid .card-field:first-child { border-top-left-radius: var(--radius); }
.fields-grid .card-field:nth-child(2) { border-top-right-radius: var(--radius); }
.fields-grid .card-field:nth-last-child(1) { border-bottom-right-radius: var(--radius); }
.fields-grid .card-field:nth-last-child(2) { border-bottom-left-radius: var(--radius); }
.fields-grid .card-field.full { grid-column: 1/-1; border-right-width: 1px; }

.step-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}

/* ====== RADIO GROUP ====== */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.radio-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: 100px;
  padding: 9px 18px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text2);
  transition: var(--transition);
}
.radio-opt:hover { border-color: var(--accent); color: var(--text); }
.radio-opt input { display: none; }
.radio-opt.selected {
  background: rgba(108,71,255,0.15);
  border-color: var(--accent);
  color: var(--text);
  font-weight: 600;
}

/* ====== ANALYZING ====== */
#screen-analyzing {
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.analyzing-wrapper {
  text-align: center;
  padding: 40px 20px;
  max-width: 500px;
}
.analyzing-animation {
  position: relative;
  width: 120px; height: 120px;
  margin: 0 auto 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.scan-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid transparent;
  animation: scanSpin 2s linear infinite;
}
.r1 {
  width: 120px; height: 120px;
  border-top-color: var(--accent);
  border-right-color: rgba(108,71,255,0.3);
}
.r2 {
  width: 88px; height: 88px;
  border-top-color: var(--accent2);
  border-right-color: rgba(255,71,120,0.3);
  animation-direction: reverse;
  animation-duration: 1.4s;
}
.r3 {
  width: 60px; height: 60px;
  border-top-color: var(--accent3);
  border-right-color: rgba(0,212,255,0.3);
  animation-duration: 1.8s;
}
.scan-icon { color: var(--text2); }
@keyframes scanSpin { to { transform: rotate(360deg); } }

.analyzing-wrapper h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 12px;
}
.analyzing-wrapper p { color: var(--text2); font-size: 15px; margin-bottom: 32px; }

.analyzing-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}
.a-step {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text3);
  transition: all 0.4s;
  display: flex;
  align-items: center;
  gap: 10px;
}
.a-step.active {
  background: rgba(108,71,255,0.12);
  border-color: var(--accent);
  color: var(--text);
}
.a-step.active::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 1s infinite;
}
.a-step.done { color: var(--success); border-color: rgba(0,200,150,0.3); }
.a-step.done::before {
  content: '✓';
  font-size: 11px;
  font-weight: 700;
  color: var(--success);
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* ====== ADVICE BOX ====== */
.advice-box {
  display: flex;
  gap: 14px;
  background: rgba(0,200,150,0.06);
  border: 1px solid rgba(0,200,150,0.2);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--text2);
  line-height: 1.6;
}
.advice-icon { color: var(--success); flex-shrink: 0; margin-top: 1px; }

/* ====== PROFILE CARDS ====== */
.profiles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.profile-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  cursor: pointer;
  transition: var(--transition);
}
.profile-card:hover {
  border-color: rgba(108,71,255,0.4);
  background: var(--surface2);
}
.profile-card.selected {
  border-color: var(--accent);
  background: rgba(108,71,255,0.08);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow-accent);
}

.profile-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.profile-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.profile-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  transition: var(--transition);
}
.profile-card.selected .profile-check {
  background: var(--accent);
  border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
}

.profile-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text2);
}

/* ====== EXPERIENCE ENTRIES ====== */
.exp-entry {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  position: relative;
}

.exp-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.exp-entry-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.btn-remove {
  background: rgba(255,71,88,0.1);
  border: 1px solid rgba(255,71,88,0.25);
  color: var(--error);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-display);
}
.btn-remove:hover { background: rgba(255,71,88,0.2); }

.exp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.mini-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mini-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text2);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.mini-field .field-input,
.mini-field .field-textarea { margin: 0; }

.still-working-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.toggle-check {
  width: 18px; height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}
.still-working-row label { font-size: 13px; color: var(--text2); cursor: pointer; }

.date-error {
  font-size: 12px;
  color: var(--error);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

/* ====== SKILLS ====== */
.skills-advice {
  background: rgba(108,71,255,0.06);
  border: 1px solid rgba(108,71,255,0.2);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 13.5px;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 16px;
}

.suggested-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 40px;
}
.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1.5px solid var(--border);
  background: var(--bg3);
  color: var(--text2);
  font-family: var(--font-display);
}
.skill-tag:hover {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(108,71,255,0.1);
}
.skill-tag.added {
  background: rgba(108,71,255,0.2);
  border-color: var(--accent);
  color: var(--text);
}
.skill-tag .tag-x {
  font-size: 14px;
  opacity: 0.6;
  font-weight: 400;
}

.selected-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 40px;
  padding: 4px 0;
}
.selected-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(0,200,150,0.12);
  border: 1.5px solid rgba(0,200,150,0.3);
  color: var(--success);
  font-family: var(--font-display);
}
.selected-tag button {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 14px;
  opacity: 0.7;
  padding: 0;
  transition: opacity 0.2s;
}
.selected-tag button:hover { opacity: 1; }

.add-skill-row {
  display: flex;
  gap: 10px;
}
.add-skill-row .field-input { flex: 1; }

.section-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 28px 0 20px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text3);
}
.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Language entry */
.lang-entry {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 12px;
}
.lang-grid {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 14px;
  align-items: end;
}

/* ====== DESIGN LAYOUT ====== */
#screen-design {
  flex-direction: row;
}
.design-layout {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

.design-editor {
  width: 400px;
  min-width: 400px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  padding: 40px 32px;
  overflow-y: auto;
  height: 100vh;
  position: sticky;
  top: 0;
}

.design-section { margin-bottom: 30px; }
.design-label {
  display: block;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text3);
  margin-bottom: 14px;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.template-opt {
  cursor: pointer;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  padding: 12px;
  transition: var(--transition);
  text-align: center;
}
.template-opt:hover { border-color: rgba(108,71,255,0.4); }
.template-opt.active {
  border-color: var(--accent);
  background: rgba(108,71,255,0.1);
}
.template-opt span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--text2);
  margin-top: 8px;
}

.tpl-preview {
  height: 70px;
  border-radius: 4px;
  background: var(--surface);
  overflow: hidden;
  position: relative;
}

.tpl-classic .tpl-bar {
  height: 18px;
  background: var(--accent);
  opacity: 0.7;
}
.tpl-classic .tpl-lines {
  padding: 6px 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tpl-classic .tpl-lines div {
  height: 5px;
  border-radius: 2px;
  background: var(--surface2);
}

.tpl-modern .tpl-sidebar-sm {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 28px;
  background: var(--accent);
  opacity: 0.6;
}
.tpl-modern .tpl-lines {
  margin-left: 34px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tpl-modern .tpl-lines div {
  height: 5px;
  border-radius: 2px;
  background: var(--surface2);
}

.tpl-executive .tpl-top-bar {
  height: 10px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  opacity: 0.8;
}
.tpl-executive .tpl-two-col {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4px;
  padding: 5px;
  height: calc(100% - 12px);
}
.tpl-executive .tpl-two-col > div {
  background: var(--surface2);
  border-radius: 2px;
}

/* Color Picker */
.color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.color-swatch {
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: var(--transition);
  position: relative;
}
.color-swatch:hover { transform: scale(1.15); }
.color-swatch.active {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
}

/* Font Grid */
.font-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.font-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  cursor: pointer;
  transition: var(--transition);
}
.font-opt:hover { border-color: rgba(108,71,255,0.4); }
.font-opt.active {
  border-color: var(--accent);
  background: rgba(108,71,255,0.08);
}
.font-opt span { font-size: 20px; }
.font-opt small { font-size: 11px; color: var(--text3); font-family: var(--font-body); }

/* ====== DESIGN PREVIEW ====== */
.design-preview-panel {
  flex: 1;
  background: #1a1a1a;
  display: flex;
  flex-direction: column;
  padding: 24px;
  overflow-y: auto;
}

.preview-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text3);
  text-align: center;
  margin-bottom: 16px;
}

.preview-scaler {
  display: flex;
  justify-content: center;
}

.cv-preview-wrapper {
  background: white;
  width: 100%;
  max-width: 620px;
  min-height: 800px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  border-radius: 4px;
  transform-origin: top center;
}

/* ====== EXPORT SCREEN ====== */
#screen-export {
  flex-direction: row;
}
.export-layout {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

.export-actions-panel {
  width: 360px;
  min-width: 360px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
}
.export-actions-panel h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
}
.export-actions-panel p { font-size: 14px; color: var(--text2); line-height: 1.6; }

.export-tips {
  background: rgba(0,200,150,0.06);
  border: 1px solid rgba(0,200,150,0.2);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.7;
}

.export-btns { display: flex; flex-direction: column; gap: 12px; }
.export-btns .btn-primary,
.export-btns .btn-secondary,
.export-btns .btn-ghost {
  width: 100%;
  justify-content: center;
  margin: 0;
}

.save-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text3);
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: auto;
}
.save-notice svg { stroke: var(--success); }

.export-preview-panel {
  flex: 1;
  background: #1a1a1a;
  padding: 40px 32px;
  overflow-y: auto;
  overflow-x: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
/* cv-final: show at actual 210mm width, centered, with scroll if needed */
#cv-final {
  flex-shrink: 0;
  width: 794px;   /* 210mm at 96dpi */
  background: white;
  box-shadow: 0 8px 48px rgba(0,0,0,0.7);
  border-radius: 2px;
}
#cv-final .cv-doc {
  width: 794px !important;
  min-height: 0 !important;
}

/* ====== MODAL ====== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-overlay.open { display: flex; }

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  max-width: 500px;
  width: 100%;
  position: relative;
  animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.85) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 34px; height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text2);
  transition: var(--transition);
}
.modal-close:hover { color: var(--text); background: var(--surface2); }

.modal-box h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 14px;
  padding-right: 30px;
}
.modal-box p, .modal-box div {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.7;
}

.modal-error-box {
  text-align: center;
  padding: 40px;
}
.error-icon {
  color: var(--error);
  margin: 0 auto 16px;
  width: 48px; height: 48px;
  background: rgba(255,71,88,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ====== LOADING ====== */
.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(8,12,20,0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.loading-spinner { text-align: center; }
.sp-ring {
  width: 56px; height: 56px;
  border: 3px solid rgba(108,71,255,0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin: 0 auto 20px;
}
.sp-r2 {
  width: 36px; height: 36px;
  margin-top: -44px;
  margin-bottom: 24px;
  border-top-color: var(--accent2);
  animation-duration: 0.6s;
  animation-direction: reverse;
}
.sp-text {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text2);
  letter-spacing: 1px;
  margin-top: 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ====== DUTY SUGGESTIONS ====== */
.duty-suggest-box {
  background: linear-gradient(135deg, rgba(139,92,246,0.08) 0%, rgba(0,200,150,0.06) 100%);
  border: 1px solid rgba(139,92,246,0.25);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.duty-suggest-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 10px;
  font-family: var(--font-display);
}
.duty-suggest-label svg { color: var(--accent); flex-shrink: 0; }

.duty-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 8px;
}

.duty-tag {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text);
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 11.5px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-display);
}
.duty-tag:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  transform: translateY(-1px);
}
.duty-tag.used {
  background: rgba(0,200,150,0.12);
  border-color: rgba(0,200,150,0.3);
  color: #00C896;
  cursor: default;
  text-decoration: line-through;
  opacity: 0.6;
}

.duty-suggest-hint {
  font-size: 11px;
  color: var(--text3);
  font-style: italic;
}


.cv-doc {
  font-family: Arial, sans-serif;
  color: #1a1a1a;
  line-height: 1.5;
  font-size: 11px;
  width: 210mm;
  /* No min-height: print only uses what content fills */
  background: white;
  orphans: 3;
  widows: 3;
}

/* Ensure sections don't break mid-block */
.cv-section,
.cv-section-min,
.cv-tl-section,
.cv-imp-section,
.cv-sidebar-section {
  break-inside: avoid;
  page-break-inside: avoid;
}

/* Exp/edu items don't cut in the middle */
.cv-exp-item,
.cv-exp-item-min,
.cv-tl-entry,
.cv-imp-exp,
.cv-edu-item,
.cv-edu-min,
.cv-tl-edu,
.cv-imp-edu {
  break-inside: avoid;
  page-break-inside: avoid;
}

/* Headers never appear alone on a page */
.cv-section-title,
.cv-section-title-min,
.cv-tl-stitle,
.cv-imp-stitle {
  break-after: avoid;
  page-break-after: avoid;
}

/* Design preview wrapper */
.cv-preview-wrapper .cv-doc {
  width: 100%;
  min-height: unset;
}
/* live-cv-mini .cv-doc is controlled by the rules above (794px + JS scale) */

/* Print: A4, content height only */
@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }
  @page {
    size: A4 portrait;
    margin: 12mm 15mm;
  }
  html, body {
    margin: 0 !important;
    padding: 0 !important;
    background: white !important;
    width: 100% !important;
  }
  /* Critical: remove preview-specific overrides so print uses content height */
  .live-cv-mini .cv-doc {
    position: static !important;
    width: 100% !important;
    min-height: 0 !important;
    transform: none !important;
    font-size: 10.5px !important;
  }
  .cv-doc {
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    font-size: 10.5px !important;
  }
}

/* ====== COMPATIBILITY PANEL ====== */
.compatibility-panel {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 0;
}

.compat-header { margin-bottom: 20px; }

.compat-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.compat-gauge {
  display: flex;
  align-items: center;
  gap: 16px;
}
.compat-gauge svg { flex-shrink: 0; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
.compat-label-wrap { flex: 1; }
.compat-score-label {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 4px;
}
.compat-score-desc {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.5;
}

.compat-bars { display: flex; flex-direction: column; gap: 12px; }

.compat-row {}
.compat-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}
.compat-row-label { font-size: 12px; font-weight: 600; font-family: var(--font-display); color: var(--text2); }
.compat-row-pct { font-size: 12px; font-weight: 800; font-family: var(--font-display); }

.compat-bar-track {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 5px;
}
.compat-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.compat-row-tip {
  font-size: 11px;
  color: var(--text3);
  line-height: 1.5;
}

/* CLASSIC TEMPLATE */
.cv-classic .cv-header {
  background: var(--cv-accent, #6C47FF);
  color: white;
  padding: 28px 36px;
}
.cv-classic .cv-name {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.cv-classic .cv-jobtitle {
  font-size: 13px;
  opacity: 0.85;
  margin-bottom: 12px;
}
.cv-classic .cv-contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11px;
  opacity: 0.9;
}
.cv-classic .cv-body { padding: 28px 36px; }
.cv-classic .cv-section { margin-bottom: 22px; }
.cv-classic .cv-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--cv-accent, #6C47FF);
  border-bottom: 2px solid var(--cv-accent, #6C47FF);
  padding-bottom: 6px;
  margin-bottom: 12px;
}
.cv-classic .cv-profile { font-size: 11.5px; line-height: 1.65; color: #333; }
.cv-classic .cv-exp-item { margin-bottom: 14px; }
.cv-classic .cv-exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}
.cv-classic .cv-exp-role { font-weight: 700; font-size: 12px; color: #1a1a1a; }
.cv-classic .cv-exp-dates { font-size: 10.5px; color: #666; white-space: nowrap; }
.cv-classic .cv-exp-company { font-size: 11px; color: #555; margin-bottom: 5px; }
.cv-classic .cv-exp-duties { font-size: 11px; color: #333; line-height: 1.6; }
.cv-classic .cv-skills-row { display: flex; flex-wrap: wrap; gap: 6px; }
.cv-classic .cv-skill-tag {
  background: rgba(108,71,255,0.1);
  border: 1px solid rgba(108,71,255,0.25);
  color: var(--cv-accent, #6C47FF);
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 600;
}
.cv-classic .cv-edu-item { margin-bottom: 10px; }
.cv-classic .cv-edu-header { display: flex; justify-content: space-between; }
.cv-classic .cv-edu-title { font-weight: 700; font-size: 11.5px; }
.cv-classic .cv-edu-dates { font-size: 10.5px; color: #666; }
.cv-classic .cv-edu-inst { font-size: 11px; color: #555; }
.cv-classic .cv-lang-row { display: flex; gap: 16px; flex-wrap: wrap; }
.cv-classic .cv-lang-item { font-size: 11px; }
.cv-classic .cv-lang-item strong { color: #1a1a1a; }

/* MODERN TEMPLATE */
.cv-modern {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 700px;
}
.cv-modern .cv-sidebar {
  background: var(--cv-accent, #6C47FF);
  color: white;
  padding: 32px 20px;
}
.cv-modern .cv-main-area { padding: 32px 28px; }
.cv-modern .cv-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.2;
}
.cv-modern .cv-jobtitle {
  font-size: 11px;
  opacity: 0.8;
  margin-bottom: 24px;
}
.cv-modern .cv-sidebar-section { margin-bottom: 22px; }
.cv-modern .cv-sidebar-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.7;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.25);
  padding-bottom: 5px;
}
.cv-modern .cv-contact-item { font-size: 10.5px; margin-bottom: 6px; opacity: 0.9; }
.cv-modern .cv-skill-bar { margin-bottom: 7px; }
.cv-modern .cv-skill-name { font-size: 10px; margin-bottom: 3px; opacity: 0.9; }
.cv-modern .cv-skill-track {
  height: 4px;
  background: rgba(255,255,255,0.25);
  border-radius: 2px;
}
.cv-modern .cv-skill-fill {
  height: 4px;
  background: rgba(255,255,255,0.85);
  border-radius: 2px;
}
.cv-modern .cv-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--cv-accent, #6C47FF);
  margin-bottom: 10px;
}
.cv-modern .cv-section { margin-bottom: 20px; }
.cv-modern .cv-exp-item { margin-bottom: 12px; padding-left: 12px; border-left: 2px solid rgba(108,71,255,0.25); }
.cv-modern .cv-exp-role { font-weight: 700; font-size: 12px; }
.cv-modern .cv-exp-company { font-size: 10.5px; color: #555; }
.cv-modern .cv-exp-dates { font-size: 10px; color: #888; margin-bottom: 4px; }
.cv-modern .cv-exp-duties { font-size: 10.5px; color: #333; line-height: 1.6; }
.cv-modern .cv-lang-row { display: flex; gap: 12px; flex-wrap: wrap; }
.cv-modern .cv-lang-item { font-size: 10.5px; padding: 3px 10px; background: rgba(108,71,255,0.1); border-radius: 100px; }

/* EXECUTIVE TEMPLATE */
.cv-executive .cv-header {
  border-top: 6px solid var(--cv-accent, #1a1a1a);
  padding: 24px 36px 20px;
}
.cv-executive .cv-name {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -1px;
  color: #1a1a1a;
}
.cv-executive .cv-jobtitle {
  font-size: 13px;
  color: var(--cv-accent, #555);
  font-weight: 600;
  margin-bottom: 12px;
}
.cv-executive .cv-contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 11px;
  color: #555;
  border-top: 1px solid #e0e0e0;
  padding-top: 10px;
}
.cv-executive .cv-body {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 0;
  padding: 0;
}
.cv-executive .cv-main-col { padding: 24px 28px 24px 36px; }
.cv-executive .cv-side-col {
  padding: 24px 24px 24px 16px;
  border-left: 1px solid #e8e8e8;
  background: #fafafa;
}
.cv-executive .cv-section { margin-bottom: 20px; }
.cv-executive .cv-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--cv-accent, #333);
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 1.5px solid var(--cv-accent, #e0e0e0);
}
.cv-executive .cv-exp-item { margin-bottom: 14px; }
.cv-executive .cv-exp-role { font-weight: 700; font-size: 12px; }
.cv-executive .cv-exp-company { font-size: 11px; color: #555; }
.cv-executive .cv-exp-dates { font-size: 10px; color: #888; margin-bottom: 5px; }
.cv-executive .cv-exp-duties { font-size: 11px; line-height: 1.6; color: #333; }
.cv-executive .cv-skill-tag {
  display: inline-block;
  border: 1px solid #ddd;
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 10px;
  margin: 3px 3px 0 0;
  color: #333;
}
.cv-executive .cv-lang-item { font-size: 11px; margin-bottom: 6px; }
.cv-executive .cv-edu-item { margin-bottom: 10px; }
.cv-executive .cv-edu-title { font-weight: 700; font-size: 11px; }
.cv-executive .cv-edu-inst { font-size: 10.5px; color: #555; }
.cv-executive .cv-edu-dates { font-size: 10px; color: #888; }

/* ====== SCROLLBAR ====== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }

/* ====== RESPONSIVE ====== */
@media (max-width: 1100px) {
  .design-editor { width: 320px; min-width: 320px; padding: 28px 20px; }
  .export-actions-panel { width: 300px; min-width: 300px; padding: 28px 20px; }
}

@media (max-width: 900px) {
  .app-layout { flex-direction: column; }
  .sidebar-progress {
    width: 100%; height: auto;
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding: 16px 20px;
    gap: 8px;
    align-items: center;
  }
  .progress-steps { flex-direction: row; gap: 4px; flex: 1; }
  .progress-item { flex-direction: column; gap: 4px; text-align: center; font-size: 10px; padding: 8px 6px; }
  .logo-sm { display: none; }

  .step-main { padding: 28px 24px; }
  .fields-grid { grid-template-columns: 1fr; }
  .fields-grid .card-field { border-right-width: 1px !important; border-radius: 0 !important; }
  .fields-grid .card-field:first-child { border-radius: var(--radius) var(--radius) 0 0 !important; }
  .fields-grid .card-field:last-child { border-radius: 0 0 var(--radius) var(--radius) !important; border-bottom-width: 1px !important; }

  .profiles-grid { grid-template-columns: 1fr; }

  #screen-design, #screen-export { flex-direction: column; }
  .design-layout, .export-layout { flex-direction: column; }

  .design-editor {
    width: 100%;
    min-width: unset;
    height: auto;
    position: static;
  }
  .design-preview-panel { min-height: 500px; }

  .export-actions-panel {
    width: 100%;
    min-width: unset;
    height: auto;
    position: static;
  }
  .export-preview-panel { min-height: 600px; }

  .cv-modern {
    grid-template-columns: 1fr;
  }
  .cv-modern .cv-sidebar {
    padding: 24px 20px;
  }
}

@media (max-width: 600px) {
  .splash-content { padding: 30px 16px; }
  .splash-stats { gap: 16px; }
  .step-main { padding: 20px 16px; }
  .step-header h2 { font-size: 22px; }

  .exp-grid { grid-template-columns: 1fr; }
  .lang-grid { grid-template-columns: 1fr; }

  .template-grid { grid-template-columns: repeat(3, 1fr); }
  .design-editor { padding: 20px 16px; }

  .step-actions { gap: 10px; }
  .btn-primary { padding: 13px 22px; font-size: 14px; }
  .btn-primary.btn-xl { padding: 16px 28px; font-size: 16px; }
}

/* ====== MINIMAL TEMPLATE ====== */
.cv-minimal { background: white; }
.cv-minimal .cv-header-min {
  padding: 32px 40px 20px;
  border-bottom: 1px solid #e8e8e8;
}
.cv-minimal .cv-name-min {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #111;
  margin-bottom: 4px;
}
.cv-minimal .cv-jobtitle-min {
  font-size: 13px;
  color: var(--cv-accent, #333);
  font-weight: 600;
  margin-bottom: 12px;
}
.cv-minimal .cv-contact-min {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11px;
  color: #666;
}
.cv-minimal .cv-contact-dot::before { content: ' · '; color: #ccc; }
.cv-minimal .cv-body-min { padding: 20px 40px; }
.cv-minimal .cv-section-min { margin-bottom: 20px; }
.cv-minimal .cv-section-title-min {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f0f0f0;
}
.cv-minimal .cv-profile-min { font-size: 11.5px; line-height: 1.7; color: #333; }
.cv-minimal .cv-exp-item-min { margin-bottom: 14px; }
.cv-minimal .cv-exp-row-min { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 2px; }
.cv-minimal .cv-exp-role-min { font-weight: 700; font-size: 12px; color: #111; }
.cv-minimal .cv-exp-dates-min { font-size: 10px; color: #999; }
.cv-minimal .cv-exp-company-min { font-size: 11px; color: var(--cv-accent, #555); font-weight: 600; margin-bottom: 5px; }
.cv-minimal .cv-exp-duties-min { font-size: 11px; color: #444; line-height: 1.6; }
.cv-minimal .cv-skill-min {
  display: inline-block;
  background: #f5f5f5;
  color: #333;
  padding: 4px 12px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  margin: 3px 4px 0 0;
  border-left: 2.5px solid var(--cv-accent, #6C47FF);
}
.cv-minimal .cv-lang-min { display: flex; gap: 16px; flex-wrap: wrap; }
.cv-minimal .cv-lang-item-min { font-size: 11px; color: #333; }
.cv-minimal .cv-edu-min { margin-bottom: 10px; }
.cv-minimal .cv-edu-row-min { display: flex; justify-content: space-between; }
.cv-minimal .cv-edu-title-min { font-weight: 700; font-size: 11.5px; color: #111; }
.cv-minimal .cv-edu-dates-min { font-size: 10.5px; color: #999; }
.cv-minimal .cv-edu-inst-min { font-size: 11px; color: #666; }

/* ====== TIMELINE TEMPLATE ====== */
.cv-timeline { background: white; }
.cv-timeline .cv-tl-header {
  background: #111;
  color: white;
  padding: 28px 36px;
  position: relative;
  overflow: hidden;
}
.cv-timeline .cv-tl-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cv-accent, #6C47FF), transparent);
}
.cv-timeline .cv-tl-name { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 4px; }
.cv-timeline .cv-tl-job { font-size: 12px; color: rgba(255,255,255,0.6); margin-bottom: 14px; }
.cv-timeline .cv-tl-contact { display: flex; flex-wrap: wrap; gap: 14px; font-size: 10.5px; color: rgba(255,255,255,0.7); }
.cv-timeline .cv-tl-body { display: grid; grid-template-columns: 200px 1fr; }
.cv-timeline .cv-tl-sidebar { background: #fafafa; padding: 20px 18px; border-right: 1px solid #eee; }
.cv-timeline .cv-tl-main { padding: 20px 28px; }
.cv-timeline .cv-tl-section { margin-bottom: 18px; }
.cv-timeline .cv-tl-stitle {
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px;
  color: var(--cv-accent, #6C47FF); margin-bottom: 10px;
}
.cv-timeline .cv-tl-contact-item { font-size: 10px; color: #555; margin-bottom: 5px; }
.cv-timeline .cv-tl-skill {
  display: inline-block; background: white; border: 1px solid #e5e5e5;
  padding: 3px 9px; border-radius: 100px; font-size: 9.5px; margin: 3px 3px 0 0; color: #333;
}
.cv-timeline .cv-tl-entry { padding-left: 18px; border-left: 2px solid var(--cv-accent, #6C47FF); margin-bottom: 14px; position: relative; }
.cv-timeline .cv-tl-entry::before {
  content: ''; position: absolute; left: -5px; top: 4px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cv-accent, #6C47FF);
}
.cv-timeline .cv-tl-role { font-weight: 700; font-size: 12px; color: #111; }
.cv-timeline .cv-tl-co { font-size: 10.5px; color: #555; margin-bottom: 2px; }
.cv-timeline .cv-tl-dates { font-size: 9.5px; color: #999; margin-bottom: 4px; }
.cv-timeline .cv-tl-duties { font-size: 10.5px; color: #333; line-height: 1.6; }
.cv-timeline .cv-tl-profile { font-size: 11px; line-height: 1.65; color: #333; margin-bottom: 14px; }
.cv-timeline .cv-tl-lang { font-size: 10.5px; color: #333; margin-bottom: 5px; }
.cv-timeline .cv-tl-edu { margin-bottom: 9px; }
.cv-timeline .cv-tl-edu-title { font-weight: 700; font-size: 10.5px; color: #111; }
.cv-timeline .cv-tl-edu-inst { font-size: 10px; color: #777; }

/* ====== IMPACT TEMPLATE ====== */
.cv-impact { background: white; }
.cv-impact .cv-imp-header {
  background: var(--cv-accent, #6C47FF);
  padding: 24px 32px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}
.cv-impact .cv-imp-name { font-size: 24px; font-weight: 800; color: white; letter-spacing: -0.5px; }
.cv-impact .cv-imp-job { font-size: 11px; color: rgba(255,255,255,0.8); margin-top: 3px; }
.cv-impact .cv-imp-contact-col { text-align: right; }
.cv-impact .cv-imp-ci { font-size: 10px; color: rgba(255,255,255,0.8); margin-bottom: 4px; }
.cv-impact .cv-imp-body { padding: 20px 32px; }
.cv-impact .cv-imp-section { margin-bottom: 18px; }
.cv-impact .cv-imp-stitle {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 2px;
  color: var(--cv-accent, #6C47FF); margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.cv-impact .cv-imp-stitle::after { content: ''; flex: 1; height: 1.5px; background: var(--cv-accent, #6C47FF); opacity: 0.2; }
.cv-impact .cv-imp-profile { font-size: 11.5px; line-height: 1.65; color: #222; }
.cv-impact .cv-imp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cv-impact .cv-imp-exp { padding: 8px 12px; background: #f8f8ff; border-radius: 4px; border-left: 3px solid var(--cv-accent, #6C47FF); margin-bottom: 8px; }
.cv-impact .cv-imp-role { font-weight: 700; font-size: 12px; }
.cv-impact .cv-imp-co { font-size: 10.5px; color: #555; }
.cv-impact .cv-imp-dates { font-size: 10px; color: #888; margin-bottom: 4px; }
.cv-impact .cv-imp-duties { font-size: 10.5px; color: #333; line-height: 1.6; }
.cv-impact .cv-imp-skill {
  display: inline-flex; align-items: center; gap: 4px;
  background: white; border: 1px solid #e0e0e0;
  color: #222; padding: 4px 10px; border-radius: 100px;
  font-size: 10px; font-weight: 600; margin: 3px 4px 0 0;
}
.cv-impact .cv-imp-skill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--cv-accent, #6C47FF); flex-shrink: 0; }
.cv-impact .cv-imp-lang { font-size: 11px; margin-bottom: 5px; color: #333; }
.cv-impact .cv-imp-edu { margin-bottom: 8px; }
.cv-impact .cv-imp-edu-title { font-weight: 700; font-size: 11px; }
.cv-impact .cv-imp-edu-inst { font-size: 10.5px; color: #666; }

/* ====== RESPONSIVE UPDATES ====== */
@media (max-width: 1280px) {
  .live-preview-panel { width: 260px; min-width: 240px; }
}
@media (max-width: 1100px) {
  .live-preview-panel { display: none; }
}

@media print {
  body { background: white; }
  .cv-doc { font-size: 11px; }
}