/* CV Builder Styles */
:root {
  --primary: #3d2b1f;
  --primary-light: #5a4332;
  --accent: #d4a574;
  --text: #1a1a1a;
  --text-secondary: #666;
  --bg: #fafafa;
  --card-bg: #ffffff;
  --border: #e5e5e5;
  --success: #22c55e;
  --error: #ef4444;
  --ai-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
  text-decoration: none;
}

.header-actions {
  display: flex;
  gap: 20px;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--primary);
}

/* Main */
.main {
  padding: 40px 0 80px;
}

/* Progress Bar */
.progress-container {
  margin-bottom: 40px;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0.4;
  transition: opacity 0.3s;
}

.progress-step.active,
.progress-step.completed {
  opacity: 1;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.3s;
}

.progress-step.active .step-number {
  background: var(--primary);
  color: white;
}

.progress-step.completed .step-number {
  background: var(--success);
  color: white;
}

.step-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  width: 14.28%;
  transition: width 0.4s ease;
}

/* Step Sections */
.step-section {
  display: none;
  background: var(--card-bg);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.step-section.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--primary);
}

.step-subtitle {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full-width {
  grid-column: span 2;
}

.form-group label {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text);
}

.required {
  color: var(--error);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="date"],
textarea,
select {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(61, 43, 31, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.char-count {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: right;
}

/* Date Dropdowns */
.date-dropdowns {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.date-select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  background: white;
  cursor: pointer;
  min-width: 100px;
}

.date-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(61, 43, 31, 0.1);
}

.date-select.full-width {
  width: 100%;
}

.date-select:disabled {
  background: #f5f5f5;
  color: #999;
  cursor: not-allowed;
}

.present-checkbox {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
}

.present-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-light);
}

.btn-primary:disabled {
  background: var(--border);
  cursor: not-allowed;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--bg);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #16a34a;
}

.btn-ai {
  background: var(--ai-gradient);
  color: white;
  margin-top: 16px;
}

.btn-ai:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.ai-icon {
  font-size: 1.1rem;
}

.btn-add {
  background: transparent;
  border: 2px dashed var(--border);
  color: var(--text-secondary);
  width: 100%;
  padding: 16px;
  margin-top: 16px;
}

.btn-add:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-block {
  width: 100%;
  margin-bottom: 12px;
}

.btn-remove {
  background: transparent;
  border: none;
  color: var(--error);
  cursor: pointer;
  font-size: 0.85rem;
}

.step-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* Template Grid */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.template-card {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.template-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.template-card.selected {
  border-color: var(--primary);
  background: rgba(61, 43, 31, 0.05);
}

.template-preview {
  aspect-ratio: 3/4;
  border-radius: 8px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.template-mock {
  width: 85%;
  height: 90%;
  background: white;
  border-radius: 4px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mock-header {
  height: 14px;
  border-radius: 2px;
  margin-bottom: 4px;
}

.mock-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mock-line {
  height: 6px;
  background: #e5e7eb;
  border-radius: 2px;
}

.mock-line.short {
  width: 60%;
}

.mock-line.medium {
  width: 80%;
}

.template-name {
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  text-transform: capitalize;
}

.template-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: center;
}

/* Template Color Dots */
.template-colors {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.color-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s, border-color 0.2s;
}

.color-dot:hover {
  transform: scale(1.2);
}

.color-dot.active {
  border-color: #333;
  transform: scale(1.15);
}

/* Color Picker in Preview Sidebar */
.color-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.color-picker .color-dot {
  width: 24px;
  height: 24px;
}

.color-picker.expanded {
  max-height: 200px;
  overflow-y: auto;
}

/* Format Controls */
.format-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.format-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 12px 0;
}

.slider-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.slider-row label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.slider-row span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  min-width: 30px;
  text-align: right;
}

.format-slider {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  outline: none;
  margin-bottom: 12px;
  -webkit-appearance: none;
  appearance: none;
}

.format-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
}

.format-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

/* Color Picker Controls */
.color-control {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.color-control span {
  font-size: 12px;
  color: #4b5563;
}

.color-input {
  width: 40px;
  height: 28px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  background: none;
}

.color-input::-webkit-color-swatch-wrapper {
  padding: 2px;
}

.color-input::-webkit-color-swatch {
  border-radius: 2px;
  border: none;
}

/* Template Thumbnails */
.template-preview {
  aspect-ratio: 3/4;
  border-radius: 8px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f8f9fa;
  border: 1px solid #e5e7eb;
}

/* Thumbnail Layouts */
.template-preview > div {
  width: 85%;
  height: 90%;
  background: white;
  border-radius: 4px;
  padding: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.template-preview .line {
  height: 5px;
  background: #e5e7eb;
  border-radius: 2px;
  margin: 3px 0;
}

.template-preview .line.short {
  width: 60%;
}
.template-preview .line.wide {
  width: 100%;
}

/* Thumb Classic */
.thumb-classic .thumb-header {
  height: 12px;
  background: var(--primary);
  border-radius: 2px;
  margin-bottom: 6px;
}

/* Thumb Modern - Left Bar */
.thumb-modern {
  display: flex !important;
  padding: 0 !important;
}

.thumb-modern .thumb-sidebar {
  width: 6px;
  background: var(--primary);
}

.thumb-modern .thumb-content {
  flex: 1;
  padding: 6px;
}

/* Thumb Sidebar Left */
.thumb-sidebar-left {
  display: flex !important;
  padding: 0 !important;
}

.thumb-sidebar-left .thumb-left {
  width: 35%;
  background: #1e40af;
}

.thumb-sidebar-left .thumb-right {
  flex: 1;
  padding: 6px;
}

/* Thumb Sidebar Right */
.thumb-sidebar-right {
  display: flex !important;
  padding: 0 !important;
}

.thumb-sidebar-right .thumb-left {
  flex: 1;
  padding: 6px;
}

.thumb-sidebar-right .thumb-right {
  width: 30%;
  background: #e5e7eb;
  border-left: 2px solid #1e40af;
}

/* Thumb Two Column */
.thumb-two-col .thumb-header {
  height: 14px;
  background: #1e40af;
  border-radius: 2px;
  margin-bottom: 4px;
}

.thumb-two-col .thumb-cols {
  display: flex;
  gap: 4px;
}

.thumb-two-col .col {
  flex: 1;
  height: 40px;
  background: #e5e7eb;
  border-radius: 2px;
}

/* Thumb Executive */
.thumb-exec .thumb-dark-header {
  height: 18px;
  background: #1a1a1a;
  border-radius: 2px 2px 0 0;
  margin: -6px -6px 6px -6px;
}

.thumb-exec .thumb-content {
  padding-top: 4px;
}

/* Thumb Bold Header */
.thumb-bold .thumb-big-header {
  height: 22px;
  background: #1e40af;
  border-radius: 2px;
  margin-bottom: 6px;
}

/* Thumb Infographic */
.thumb-info {
  display: flex !important;
  padding: 0 !important;
}

.thumb-info .thumb-left-col {
  width: 35%;
  background: #1e40af;
}

.thumb-info .thumb-right-col {
  flex: 1;
  padding: 6px;
}

/* Thumb Frame */
.thumb-frame {
  border: 2px solid #1e40af !important;
}

/* Thumb Top Bar */
.thumb-topbar .thumb-bar {
  height: 6px;
  background: #1e40af;
  margin: -6px -6px 6px -6px;
}

/* Thumb Split Header */
.thumb-split .thumb-header-split {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.thumb-split .thumb-header-split > div {
  width: 40%;
  height: 10px;
  background: #e5e7eb;
  border-radius: 2px;
}

.thumb-split .thumb-header-split > div:first-child {
  background: #1e40af;
}

/* Thumb Accent Line */
.thumb-accent .line-header {
  height: 8px;
  background: #1e40af;
  border-radius: 2px;
  margin-bottom: 4px;
}

.thumb-accent .line-header.short {
  width: 50%;
  margin-top: 6px;
}

/* Thumb Grid */
.thumb-grid .thumb-header {
  height: 12px;
  background: #1e40af;
  border-radius: 2px;
  margin-bottom: 4px;
}

.thumb-grid .thumb-boxes {
  display: flex;
  gap: 4px;
}

.thumb-grid .box {
  flex: 1;
  height: 30px;
  background: #f3f4f6;
  border-radius: 2px;
  border-left: 2px solid #1e40af;
}

/* Thumb Professional */
.thumb-prof .line-border {
  height: 10px;
  border-bottom: 2px solid #1e40af;
  margin-bottom: 6px;
}

/* Thumb Elegant */
.thumb-elegant {
  text-align: center;
}

.thumb-elegant .line-center {
  height: 10px;
  background: #e5e7eb;
  width: 70%;
  margin: 0 auto 4px;
  border-radius: 2px;
}

.thumb-elegant .line-border-thin {
  height: 0;
  border-top: 1px solid #1e40af;
  border-bottom: 1px solid #1e40af;
  padding: 2px 0;
  margin: 6px 10%;
}

/* Thumb Tech */
.thumb-tech .thumb-name-block {
  height: 12px;
  background: #1e40af;
  border-radius: 2px;
  width: 50%;
  margin-bottom: 6px;
}

.thumb-tech .thumb-tags {
  display: flex;
  gap: 3px;
  margin-bottom: 4px;
}

.thumb-tech .thumb-tags span {
  width: 20px;
  height: 6px;
  background: #e5e7eb;
  border: 1px solid #1e40af;
  border-radius: 2px;
}

/* Thumb Creative */
.thumb-creative .thumb-name-block {
  height: 14px;
  background: #1e40af;
  border-radius: 2px;
  width: 60%;
  margin-bottom: 6px;
}

/* Thumb Timeline */
.thumb-timeline .thumb-tl {
  display: flex;
  align-items: flex-start;
  padding-left: 4px;
}

.thumb-timeline .dot {
  width: 6px;
  height: 6px;
  background: #1e40af;
  border-radius: 50%;
  margin-right: 4px;
  margin-top: 2px;
}

.thumb-timeline .thumb-tl .line {
  flex: 1;
}

/* Thumb Compact & Minimal */
.thumb-compact,
.thumb-minimal {
  justify-content: flex-start;
  padding-top: 8px !important;
}

/* Mini CV Previews - Realistic Text Content */
.mini-cv {
  width: 100%;
  height: 100%;
  padding: 8px;
  font-family: Arial, sans-serif;
  overflow: hidden;
  background: white;
}

.mini-cv .mini-name {
  font-size: 7px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.mini-cv .mini-divider {
  height: 1px;
  width: 100%;
  margin-bottom: 3px;
}

.mini-cv .mini-contact {
  font-size: 4px;
  color: #666;
  margin-bottom: 5px;
}

.mini-cv .mini-section-title {
  font-size: 5px;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 4px;
  margin-bottom: 2px;
}

.mini-cv .mini-job {
  font-size: 5px;
  font-weight: 600;
  color: #333;
}

.mini-cv .mini-company {
  font-size: 4px;
  color: #666;
  font-style: italic;
}

.mini-cv .mini-edu {
  font-size: 4px;
  color: #333;
}

.mini-cv .mini-bullet {
  font-size: 4px;
  color: #555;
  padding-left: 4px;
}

.mini-cv .mini-text {
  font-size: 4px;
  color: #555;
}

/* Modern - Sidebar Layout */
.mini-cv.modern {
  display: flex;
  padding: 0;
}

.mini-cv.modern .mini-sidebar {
  width: 28%;
  padding: 6px 4px;
  color: white;
}

.mini-cv.modern .mini-name-sidebar {
  font-size: 8px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 6px;
}

.mini-cv.modern .mini-sidebar-section {
  font-size: 4px;
  font-weight: 600;
  margin-top: 4px;
  margin-bottom: 2px;
}

.mini-cv.modern .mini-skill-dot {
  width: 80%;
  height: 3px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 2px;
  margin: 2px 0;
}

.mini-cv.modern .mini-main {
  flex: 1;
  padding: 6px;
}

/* Minimal */
.mini-cv.minimal .mini-name-accent {
  font-size: 7px;
  font-weight: 600;
  padding-bottom: 2px;
  margin-bottom: 3px;
}

.mini-cv.minimal .mini-section-accent {
  font-size: 4px;
  font-weight: 600;
  margin-top: 4px;
  margin-bottom: 1px;
  text-transform: capitalize;
}

/* Professional - Bold Header */
.mini-cv.professional {
  padding: 0;
}

.mini-cv.professional .mini-header-bold {
  padding: 6px;
  margin-bottom: 4px;
}

.mini-cv.professional .mini-name-white {
  font-size: 7px;
  font-weight: 700;
  color: white;
  text-align: center;
}

.mini-cv.professional .mini-title-white {
  font-size: 4px;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
}

.mini-cv.professional .mini-body {
  padding: 0 6px 6px;
}

.mini-cv.professional .mini-skills-row {
  font-size: 4px;
  color: #666;
}

/* Elegant - Centered */
.mini-cv.elegant {
  text-align: center;
}

.mini-cv.elegant .mini-name-center {
  font-size: 7px;
  font-weight: 600;
  margin-bottom: 2px;
}

.mini-cv.elegant .mini-elegant-line {
  height: 1px;
  background: #1f2937;
  width: 60%;
  margin: 0 auto 3px;
}

.mini-cv.elegant .mini-contact-center {
  font-size: 4px;
  color: #666;
  margin-bottom: 4px;
}

.mini-cv.elegant .mini-section-center {
  font-size: 4px;
  font-weight: 600;
  color: #333;
  margin-top: 3px;
  margin-bottom: 1px;
}

.mini-cv.elegant .mini-job-center,
.mini-cv.elegant .mini-edu-center {
  font-size: 4px;
  color: #555;
}

/* Creative - Top Bar */
.mini-cv.creative {
  padding: 0;
}

.mini-cv.creative .mini-topbar {
  height: 6px;
  margin-bottom: 4px;
}

.mini-cv.creative .mini-name-creative {
  font-size: 7px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1px;
  padding: 0 6px;
}

.mini-cv.creative .mini-tagline {
  font-size: 4px;
  color: #666;
  text-align: center;
  margin-bottom: 4px;
}

.mini-cv.creative .mini-section-title {
  padding: 0 6px;
}

.mini-cv.creative .mini-text {
  padding: 0 6px;
}

.mini-cv.creative .mini-skills-tags {
  display: flex;
  gap: 3px;
  padding: 0 6px;
}

.mini-cv.creative .mini-skills-tags span {
  font-size: 3px;
  padding: 1px 3px;
  border-radius: 2px;
}

.experience-item,
.education-item {
  background: var(--bg);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
  position: relative;
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.item-number {
  font-weight: 600;
  color: var(--primary);
}

.experience-item .form-grid,
.education-item .form-grid {
  grid-template-columns: repeat(2, 1fr);
}

.achievements-list {
  margin-top: 16px;
}

.achievements-list label {
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 8px;
  display: block;
}

.achievements-list textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  line-height: 1.6;
  resize: vertical;
  font-family: inherit;
}

.achievement-input {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.achievement-input input {
  flex: 1;
}

/* Skills Section */
.skills-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.skill-category h4 {
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--primary);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 40px;
  margin-bottom: 12px;
}

.skill-tag {
  background: var(--primary);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.skill-tag button {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.skill-tag button:hover {
  color: white;
}

.skill-input-wrapper {
  display: flex;
  gap: 8px;
}

.skill-input-wrapper input {
  flex: 1;
}

/* Preview Section */
.preview-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  min-height: 600px;
}

.preview-sidebar {
  background: var(--bg);
  border-radius: 12px;
  padding: 20px;
  height: fit-content;
  position: sticky;
  top: 100px;
}

.ats-score-widget {
  text-align: center;
  margin-bottom: 24px;
}

.ats-score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: conic-gradient(var(--success) 0deg, var(--border) 0deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  position: relative;
}

.ats-score-circle::before {
  content: "";
  position: absolute;
  width: 100px;
  height: 100px;
  background: var(--bg);
  border-radius: 50%;
}

.ats-score-value {
  position: relative;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.ats-score-label {
  position: relative;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.preview-actions label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 6px;
}

.form-select {
  width: 100%;
  margin-bottom: 16px;
}

.preview-main {
  background: #e5e5e5;
  border-radius: 12px;
  padding: 24px;
  overflow: auto;
}

.resume-preview {
  max-width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  /* No padding or background - templates handle their own styling */
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.loading-overlay.active {
  display: flex;
}

.loading-content {
  text-align: center;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text);
  color: white;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s;
  z-index: 1001;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Resume Preview Styles */
.resume-preview h1 {
  color: #1e40af;
  font-size: 1.75rem;
  text-align: center;
  margin-bottom: 8px;
}

.resume-preview .contact-info {
  text-align: center;
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 16px;
}

.resume-preview .divider {
  border: none;
  border-top: 1px solid #000;
  margin: 16px 0;
}

.resume-preview h2 {
  color: #1e40af;
  font-size: 1rem;
  margin: 20px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #e2e8f0;
}

.resume-preview .summary {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #333;
}

.resume-preview .job {
  margin-bottom: 16px;
}

.resume-preview .job-header {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

.resume-preview .job-title {
  color: #000;
}

.resume-preview .job-dates {
  color: #666;
  font-weight: normal;
}

.resume-preview .job-company {
  font-style: italic;
  color: #666;
  margin-bottom: 8px;
}

.resume-preview ul {
  margin-left: 20px;
  font-size: 0.9rem;
  color: #333;
}

.resume-preview li {
  margin-bottom: 4px;
}

.resume-preview .skills-list {
  font-size: 0.9rem;
  color: #333;
}

.resume-preview .education-item {
  margin-bottom: 12px;
  padding: 0;
  background: none;
}

.resume-preview .education-item .degree {
  font-weight: 600;
}

.resume-preview .education-item .institution {
  color: #666;
}

/* Responsive */
@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-group.full-width {
    grid-column: span 1;
  }

  .progress-steps {
    gap: 4px;
  }

  .step-label {
    display: none;
  }

  .skills-section {
    grid-template-columns: 1fr;
  }

  .preview-container {
    grid-template-columns: 1fr;
  }

  .preview-sidebar {
    position: static;
  }

  .template-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
