/**
 * SMARTDOCIFY - CV REBUILDER DESIGN SYSTEM
 * 3-Panel Desktop Grid, Mobile Stacked Wizard, 5 Professional A4 Templates, Live Preview & Print Styles
 */

/* ==========================================================================
   1. GLOBAL WRAPPER & TOOL HEADER
   ========================================================================== */
.tool-main-wrapper {
  max-width: 1560px;
  width: 100%;
  margin: 0 auto;
  padding-inline: 1.5rem;
  box-sizing: border-box;
}

.tool-breadcrumb {
  font-size: 0.85rem;
  color: var(--text-subtle);
  margin-bottom: 1.25rem;
}

.tool-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.tool-breadcrumb a:hover {
  color: var(--primary);
}

.tool-header-block {
  margin-bottom: 2rem;
}

.tool-badge-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.725rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.badge-pill.badge-primary {
  background-color: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.badge-pill.badge-privacy {
  background-color: var(--accent-emerald-light);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.tool-heading {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 0.5rem 0;
}

.tool-subheading {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 680px;
  line-height: 1.5;
  margin: 0;
}

/* ==========================================================================
   2. WORKFLOW STEPPER INDICATOR
   ========================================================================== */
.cv-stepper-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.stepper-step {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: none;
  border: none;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-muted);
}

.stepper-step .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: var(--bg-surface-alt);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 800;
  transition: all var(--transition-fast);
}

.stepper-step .step-label {
  font-size: 0.9rem;
  font-weight: 600;
}

.stepper-step:hover {
  background-color: var(--bg-surface-alt);
  color: var(--text-main);
}

.stepper-step.active {
  color: var(--primary);
}

.stepper-step.active .step-num {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
}

.stepper-step.completed .step-num {
  background-color: var(--accent-emerald);
  color: #ffffff;
}

.stepper-divider {
  flex-grow: 1;
  height: 2px;
  background-color: var(--border-subtle);
  margin-inline: 0.75rem;
}

/* Mobile View Tabs */
.mobile-view-tabs {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  background-color: var(--bg-surface);
  padding: 0.4rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
}

.mobile-tab-btn {
  padding: 0.65rem 0.5rem;
  border: none;
  background: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-fast);
}

.mobile-tab-btn.active {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   3. THREE-PANEL APPLICATION WORKSPACE GRID
   ========================================================================== */
.cv-workspace-grid {
  display: grid;
  grid-template-columns: 310px minmax(440px, 1fr) minmax(460px, 1.05fr);
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 4rem;
}

.workspace-panel {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background-color: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 10;
}

.panel-header-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.panel-header-title h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.panel-icon {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.panel-badge {
  font-size: 0.725rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface-alt);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.panel-badge.status-processing {
  background-color: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.panel-badge.status-ready {
  background-color: var(--accent-emerald-light);
  color: var(--accent-emerald);
}

.panel-body {
  padding: 1.25rem;
  overflow-y: auto;
  max-height: calc(100vh - 180px);
}

/* Custom Panel Scrollbars */
.panel-body::-webkit-scrollbar {
  width: 6px;
}
.panel-body::-webkit-scrollbar-track {
  background: transparent;
}
.panel-body::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 9999px;
}

/* ==========================================================================
   4. LEFT PANEL: SOURCE DOCUMENT & ORIGINAL PREVIEW
   ========================================================================== */
.cv-dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  background-color: var(--bg-surface-alt);
  transition: all var(--transition-fast);
  position: relative;
  margin-bottom: 1.25rem;
}

.cv-dropzone:hover,
.cv-dropzone.dragover {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

.cv-file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.dropzone-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem auto;
}

.dropzone-icon-circle svg {
  width: 24px;
  height: 24px;
}

.dropzone-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 0.25rem 0;
}

.dropzone-types {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 0.35rem 0;
}

.dropzone-hint {
  font-size: 0.78rem;
  color: var(--text-subtle);
  margin: 0;
}

.browse-link {
  color: var(--primary);
  text-decoration: underline;
  font-weight: 600;
}

/* Extraction Progress Box */
.extraction-progress-box {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background-color: var(--primary-light);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
}

.extraction-spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid rgba(37, 99, 235, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: cvSpin 0.75s linear infinite;
  flex-shrink: 0;
}

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

.extraction-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary);
}

.extraction-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Alert Box */
.cv-alert-box {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  font-size: 0.825rem;
  line-height: 1.4;
  margin-bottom: 1.25rem;
  background-color: var(--accent-amber-light);
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.cv-alert-box svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Uploaded Files List */
.uploaded-files-section {
  margin-bottom: 1.5rem;
}

.section-subheading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.section-subheading-row h3 {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0;
}

.btn-text-sm {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.uploaded-files-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.uploaded-file-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.75rem;
  gap: 0.65rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.uploaded-file-card:hover {
  background-color: var(--bg-surface-elevated);
  border-color: var(--primary-light);
}

.uploaded-file-card.active-file {
  background-color: var(--primary-light);
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.file-card-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex-grow: 1;
}

.file-thumbnail-mini {
  width: 34px;
  height: 44px;
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-thumbnail-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-thumbnail-mini svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.file-meta-col {
  min-width: 0;
}

.file-name-text {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.file-specs-text {
  font-size: 0.72rem;
  color: var(--text-subtle);
}

.file-card-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.btn-icon-xs {
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 0.25rem;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.btn-icon-xs:hover {
  background-color: var(--bg-surface);
  color: var(--text-main);
}

.btn-icon-xs.delete-btn:hover {
  color: var(--accent-rose);
  border-color: var(--accent-rose);
}

.btn-icon-xs svg {
  width: 14px;
  height: 14px;
}

/* Original Preview Card */
.original-preview-card {
  background-color: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  margin-bottom: 1.5rem;
}

.original-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.page-nav-btns {
  display: flex;
  gap: 0.35rem;
}

.page-nav-btn {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 0.15rem 0.5rem;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text-main);
}

.page-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.original-canvas-viewport {
  background-color: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  min-height: 260px;
  max-height: 380px;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.original-preview-img,
.original-preview-canvas {
  max-width: 100%;
  height: auto;
  box-shadow: var(--shadow-sm);
  display: block;
}

.original-preview-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-subtle);
  font-size: 0.8rem;
}

.original-preview-fallback svg {
  width: 32px;
  height: 32px;
}

/* Quick Sections Jump Nav */
.section-jump-nav {
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.jump-nav-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 0.5rem 0;
}

.jump-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.jump-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background-color: var(--bg-surface-alt);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-xs);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.jump-tag:hover {
  background-color: var(--primary-light);
  color: var(--primary);
}

/* ==========================================================================
   5. CENTER PANEL: EXTRACTED INFORMATION & SECTION EDITOR
   ========================================================================== */
.editor-quick-actions {
  display: flex;
  gap: 0.4rem;
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
}

.editor-section-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.section-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.15rem;
  background-color: var(--bg-surface-alt);
  border-bottom: 1px solid var(--border-subtle);
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-icon-badge {
  font-size: 1.1rem;
}

.section-card-header h3 {
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.section-header-note {
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.section-card-body {
  padding: 1.15rem;
}

/* Form Elements */
.form-group {
  margin-bottom: 0.85rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.req {
  color: var(--accent-rose);
}

.form-control {
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--text-main);
  background-color: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-control-sm {
  padding: 0.35rem 0.55rem;
  font-size: 0.825rem;
}

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.form-row-3col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.85rem;
}

/* Photo Editor */
.photo-editor-wrap {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.photo-thumbnail-box {
  width: 80px;
  height: 80px;
  border: 2px dashed var(--border-strong);
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background-color: var(--bg-surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: border-radius var(--transition-fast);
}

.photo-thumbnail-box.shape-square {
  border-radius: var(--radius-sm);
}

.photo-thumbnail-box.shape-rounded {
  border-radius: var(--radius-lg);
}

.photo-thumbnail-box.shape-circle {
  border-radius: 50%;
}

.photo-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-empty-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-subtle);
  font-size: 0.65rem;
  font-weight: 600;
}

.photo-empty-placeholder svg {
  width: 26px;
  height: 26px;
  margin-bottom: 2px;
}

.photo-controls-col {
  flex-grow: 1;
}

.photo-buttons-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.photo-options-row {
  margin-bottom: 0.35rem;
}

.photo-shape-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.photo-shape-label select {
  width: auto;
}

.photo-tip {
  font-size: 0.75rem;
  color: var(--text-subtle);
  margin: 0;
}

.btn-danger-soft {
  background-color: var(--accent-rose-light);
  color: var(--accent-rose);
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-danger-soft:hover {
  background-color: var(--accent-rose);
  color: #ffffff;
}

/* Dynamic Item Cards (Experience, Education, Projects, etc.) */
.dynamic-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.dynamic-item-card {
  background-color: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  position: relative;
}

.item-card-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-subtle);
}

.item-card-title-preview {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-main);
}

.item-card-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Skills Chips Input */
.skills-input-group {
  margin-bottom: 0.85rem;
}

.skill-entry-row {
  display: flex;
  gap: 0.5rem;
}

.skills-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0.5rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface-alt);
}

.skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 9999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
}

.skill-chip-remove {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  padding: 0;
  font-size: 0.9rem;
  line-height: 1;
  display: flex;
  align-items: center;
}

.skill-chip-remove:hover {
  color: var(--accent-rose);
}

/* Custom Checkbox */
.custom-checkbox-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.85rem;
  user-select: none;
}

.custom-checkbox-wrap input {
  display: none;
}

.checkbox-box {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-xs);
  background-color: var(--bg-input);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.custom-checkbox-wrap input:checked + .checkbox-box {
  background-color: var(--primary);
  border-color: var(--primary);
}

.custom-checkbox-wrap input:checked + .checkbox-box::after {
  content: "✓";
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
}

/* ==========================================================================
   6. RIGHT PANEL: LIVE PREVIEW, TEMPLATES & EXPORT
   ========================================================================== */
/* Design Toolbar */
.preview-design-toolbar {
  display: grid;
  grid-template-columns: 1.4fr 1.2fr auto 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0.85rem;
  background-color: var(--bg-surface-alt);
  border-radius: var(--radius-md);
  margin-bottom: 0.85rem;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.toolbar-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.color-palette-pills {
  display: flex;
  gap: 0.35rem;
}

.color-pill {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  cursor: pointer;
  box-shadow: 0 0 0 1px var(--border-subtle);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  padding: 0;
}

.color-pill:hover,
.color-pill.active {
  transform: scale(1.15);
  box-shadow: 0 0 0 2px var(--primary);
}

/* Subtoolbar (Zoom & View Mode) */
.preview-subtoolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.preview-mode-toggle {
  display: inline-flex;
  background-color: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.btn-mode {
  border: none;
  background: none;
  padding: 0.25rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-xs);
  transition: all var(--transition-fast);
}

.btn-mode.active {
  background-color: var(--bg-surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.preview-page-pagination {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-page-step {
  background-color: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 0.2rem 0.5rem;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--text-main);
}

.preview-current-page-text {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.preview-zoom-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-zoom {
  background-color: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 0.2rem 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-main);
}

.zoom-level-text {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 38px;
  text-align: center;
}

/* A4 Document Viewport Stage */
.cv-viewport-stage {
  background-color: #cbd5e1;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  overflow: auto;
  max-height: 540px;
  display: flex;
  justify-content: center;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .cv-viewport-stage {
  background-color: #0f172a;
  border-color: #334155;
}

.cv-render-canvas {
  transform-origin: top center;
  transition: transform 0.15s ease-out;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

/* Standard A4 Document Page Sheet */
.cv-page-sheet {
  width: 794px; /* A4 at 96 DPI */
  min-height: 1123px; /* A4 at 96 DPI */
  background-color: #ffffff;
  color: #1e293b;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
  padding: 48px 52px;
  position: relative;
  overflow: hidden;
  font-family: 'Plus Jakarta Sans', sans-serif;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Page Number Badge */
.page-sheet-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 1rem;
  font-size: 0.72rem;
  color: #94a3b8;
  border-top: 1px solid #f1f5f9;
}

/* ==========================================================================
   7. THE 5 ATS-FRIENDLY CV TEMPLATES
   ========================================================================== */

/* --------------------------------------------------------------------------
   TEMPLATE 1: PROFESSIONAL (Clean Blue Accent, 2-Column Balanced ATS)
   -------------------------------------------------------------------------- */
.cv-template-professional .cv-sheet-header {
  border-bottom: 2px solid var(--cv-accent, #1e3a8a);
  padding-bottom: 18px;
  margin-bottom: 22px;
}

.cv-template-professional .cv-header-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.cv-template-professional .cv-name {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px 0;
  letter-spacing: -0.02em;
}

.cv-template-professional .cv-headline {
  font-size: 15px;
  font-weight: 700;
  color: var(--cv-accent, #1e3a8a);
  margin: 0 0 10px 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cv-template-professional .cv-contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: #475569;
}

.cv-template-professional .cv-contact-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cv-template-professional .cv-photo-frame {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--cv-accent, #1e3a8a);
  flex-shrink: 0;
}

.cv-template-professional .cv-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cv-template-professional .cv-body-layout {
  display: grid;
  grid-template-columns: 1.75fr 1fr;
  gap: 28px;
  flex-grow: 1;
}

.cv-template-professional .cv-section {
  margin-bottom: 20px;
}

.cv-template-professional .cv-section-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--cv-accent, #1e3a8a);
  letter-spacing: 0.06em;
  padding-bottom: 4px;
  border-bottom: 1px solid #e2e8f0;
  margin: 0 0 10px 0;
}

.cv-template-professional .cv-summary-text {
  font-size: 12.5px;
  color: #334155;
  line-height: 1.55;
  margin: 0;
}

.cv-template-professional .cv-entry-block {
  margin-bottom: 14px;
}

.cv-template-professional .cv-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2px;
}

.cv-template-professional .cv-entry-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.cv-template-professional .cv-entry-dates {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748B;
}

.cv-template-professional .cv-entry-subtitle {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 4px;
}

.cv-template-professional .cv-bullet-list {
  margin: 4px 0 0 0;
  padding-left: 16px;
  font-size: 12px;
  color: #334155;
  line-height: 1.45;
}

.cv-template-professional .cv-skill-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cv-template-professional .cv-skill-badge {
  background-color: #f1f5f9;
  color: #1e293b;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

/* --------------------------------------------------------------------------
   TEMPLATE 2: MODERN (Left Accent Sidebar, Pill Badges)
   -------------------------------------------------------------------------- */
.cv-template-modern {
  padding: 0 !important;
}

.cv-template-modern .modern-sheet-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 1123px;
  flex-grow: 1;
}

.cv-template-modern .modern-sidebar {
  background-color: #f8fafc;
  border-right: 1px solid #e2e8f0;
  padding: 44px 28px;
}

.cv-template-modern .modern-photo-wrap {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 20px auto;
  border: 3px solid var(--cv-accent, #1e3a8a);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.cv-template-modern .modern-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cv-template-modern .modern-side-section {
  margin-bottom: 22px;
}

.cv-template-modern .modern-side-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cv-accent, #1e3a8a);
  margin: 0 0 10px 0;
  padding-bottom: 3px;
  border-bottom: 1.5px solid var(--cv-accent, #1e3a8a);
}

.cv-template-modern .modern-contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 11.5px;
  color: #475569;
}

.cv-template-modern .modern-contact-list li {
  margin-bottom: 8px;
  word-break: break-all;
}

.cv-template-modern .modern-skills-pill-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.cv-template-modern .modern-skill-pill {
  background-color: #ffffff;
  border: 1px solid var(--cv-accent, #1e3a8a);
  color: var(--cv-accent, #1e3a8a);
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 9999px;
}

.cv-template-modern .modern-main {
  padding: 44px 38px;
}

.cv-template-modern .modern-name {
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px 0;
  letter-spacing: -0.02em;
}

.cv-template-modern .modern-headline {
  font-size: 15px;
  font-weight: 700;
  color: var(--cv-accent, #1e3a8a);
  margin: 0 0 24px 0;
  text-transform: uppercase;
}

.cv-template-modern .modern-main-section {
  margin-bottom: 22px;
}

.cv-template-modern .modern-main-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cv-accent, #1e3a8a);
  margin: 0 0 10px 0;
  padding-bottom: 4px;
  border-bottom: 1.5px solid #e2e8f0;
}

.cv-template-modern .modern-entry {
  margin-bottom: 14px;
}

.cv-template-modern .modern-entry-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.cv-template-modern .modern-entry-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.cv-template-modern .modern-entry-dates {
  font-size: 11px;
  font-weight: 700;
  color: var(--cv-accent, #1e3a8a);
  background-color: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
}

.cv-template-modern .modern-entry-sub {
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
  margin-bottom: 4px;
}

.cv-template-modern .modern-bullets {
  margin: 4px 0 0 0;
  padding-left: 16px;
  font-size: 12px;
  color: #334155;
  line-height: 1.45;
}

/* --------------------------------------------------------------------------
   TEMPLATE 3: MINIMAL (Monochrome Elegant Typography)
   -------------------------------------------------------------------------- */
.cv-template-minimal {
  font-family: 'Lora', Georgia, serif;
}

.cv-template-minimal .cv-sheet-header {
  text-align: center;
  margin-bottom: 26px;
  padding-bottom: 16px;
  border-bottom: 1px solid #1e293b;
}

.cv-template-minimal .cv-name {
  font-family: 'Playfair Display', serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #0f172a;
  margin: 0 0 4px 0;
}

.cv-template-minimal .cv-headline {
  font-size: 13px;
  font-style: italic;
  color: #475569;
  margin: 0 0 10px 0;
}

.cv-template-minimal .cv-contact-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 11.5px;
  color: #64748B;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.cv-template-minimal .cv-section {
  margin-bottom: 22px;
}

.cv-template-minimal .cv-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f172a;
  border-bottom: 1px solid #cbd5e1;
  padding-bottom: 3px;
  margin: 0 0 12px 0;
}

.cv-template-minimal .cv-entry-block {
  margin-bottom: 14px;
}

.cv-template-minimal .cv-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.cv-template-minimal .cv-entry-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}

.cv-template-minimal .cv-entry-dates {
  font-size: 11.5px;
  color: #64748B;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.cv-template-minimal .cv-entry-subtitle {
  font-size: 12px;
  font-style: italic;
  color: #475569;
  margin-bottom: 4px;
}

.cv-template-minimal .cv-bullet-list {
  margin: 4px 0 0 0;
  padding-left: 16px;
  font-size: 12px;
  line-height: 1.5;
  color: #334155;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* --------------------------------------------------------------------------
   TEMPLATE 4: CORPORATE (Executive Traditional Boxed Headings)
   -------------------------------------------------------------------------- */
.cv-template-corporate .cv-sheet-header {
  background-color: var(--cv-accent, #1e3a8a);
  color: #ffffff;
  padding: 24px 28px;
  margin: -48px -52px 26px -52px;
}

.cv-template-corporate .cv-name {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 4px 0;
  letter-spacing: 0.01em;
}

.cv-template-corporate .cv-headline {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 12px 0;
  text-transform: uppercase;
}

.cv-template-corporate .cv-contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
}

.cv-template-corporate .cv-section {
  margin-bottom: 20px;
}

.cv-template-corporate .cv-section-title {
  background-color: #f1f5f9;
  border-left: 4px solid var(--cv-accent, #1e3a8a);
  padding: 4px 10px;
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0f172a;
  margin: 0 0 12px 0;
}

.cv-template-corporate .cv-entry-block {
  margin-bottom: 14px;
}

.cv-template-corporate .cv-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.cv-template-corporate .cv-entry-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.cv-template-corporate .cv-entry-dates {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--cv-accent, #1e3a8a);
}

.cv-template-corporate .cv-entry-subtitle {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 4px;
}

.cv-template-corporate .cv-bullet-list {
  margin: 4px 0 0 0;
  padding-left: 16px;
  font-size: 12px;
  color: #334155;
  line-height: 1.45;
}

/* --------------------------------------------------------------------------
   TEMPLATE 5: SIMPLE (Clean Single-Column High ATS Scanner Standard)
   -------------------------------------------------------------------------- */
.cv-template-simple .cv-sheet-header {
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid #94a3b8;
}

.cv-template-simple .cv-name {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 2px 0;
}

.cv-template-simple .cv-headline {
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  margin: 0 0 6px 0;
}

.cv-template-simple .cv-contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: #334155;
}

.cv-template-simple .cv-section {
  margin-bottom: 18px;
}

.cv-template-simple .cv-section-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  color: #0f172a;
  margin: 0 0 8px 0;
  letter-spacing: 0.04em;
  border-bottom: 1px dashed #cbd5e1;
  padding-bottom: 3px;
}

.cv-template-simple .cv-entry-block {
  margin-bottom: 12px;
}

.cv-template-simple .cv-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.cv-template-simple .cv-entry-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.cv-template-simple .cv-entry-dates {
  font-size: 11.5px;
  color: #64748B;
}

.cv-template-simple .cv-entry-subtitle {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.cv-template-simple .cv-bullet-list {
  margin: 4px 0 0 0;
  padding-left: 16px;
  font-size: 12px;
  color: #334155;
  line-height: 1.45;
}

/* Spacing & Density Modifiers */
.cv-page-sheet.density-compact {
  padding: 32px 38px;
  line-height: 1.35;
}
.cv-page-sheet.density-compact .cv-section,
.cv-page-sheet.density-compact .modern-main-section,
.cv-page-sheet.density-compact .modern-side-section {
  margin-bottom: 12px;
}
.cv-page-sheet.density-compact .cv-entry-block,
.cv-page-sheet.density-compact .modern-entry {
  margin-bottom: 8px;
}
.cv-page-sheet.density-compact .cv-sheet-header {
  padding-bottom: 10px;
  margin-bottom: 14px;
}
.cv-page-sheet.density-compact .modern-main {
  padding: 30px 26px;
}
.cv-page-sheet.density-compact .modern-sidebar {
  padding: 30px 20px;
}

.cv-page-sheet.density-relaxed {
  padding: 56px 60px;
  line-height: 1.6;
}
.cv-page-sheet.density-relaxed .cv-section,
.cv-page-sheet.density-relaxed .modern-main-section,
.cv-page-sheet.density-relaxed .modern-side-section {
  margin-bottom: 26px;
}
.cv-page-sheet.density-relaxed .cv-entry-block,
.cv-page-sheet.density-relaxed .modern-entry {
  margin-bottom: 18px;
}
.cv-page-sheet.density-relaxed .cv-sheet-header {
  padding-bottom: 22px;
  margin-bottom: 28px;
}
.cv-page-sheet.density-relaxed .modern-main {
  padding: 52px 46px;
}
.cv-page-sheet.density-relaxed .modern-sidebar {
  padding: 52px 34px;
}

/* ==========================================================================
   8. EXPORT & DOWNLOAD FOOTER
   ========================================================================== */
.cv-export-footer {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.filename-config-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.filename-config-row label {
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.filename-input-wrapper {
  display: flex;
  align-items: center;
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background-color: var(--bg-input);
  overflow: hidden;
}

.filename-input {
  border: none;
  background: transparent;
  padding: 0.5rem 0.65rem;
  font-size: 0.85rem;
  color: var(--text-main);
  flex-grow: 1;
}

.filename-input:focus {
  outline: none;
}

.filename-ext {
  padding: 0.5rem 0.65rem;
  background-color: var(--bg-surface-alt);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  border-left: 1px solid var(--border-subtle);
}

.branding-checkbox-row {
  margin-bottom: 1rem;
}

.export-actions-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 0.65rem;
}

.btn-export {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
}

.btn-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ==========================================================================
   9. COMPARISON MODAL
   ========================================================================== */
.cv-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  box-sizing: border-box;
}

.cv-modal-dialog {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 1280px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.cv-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--bg-surface-elevated);
}

.cv-modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}

.comparison-modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  padding: 1.5rem;
  overflow-y: auto;
}

.comparison-column {
  display: flex;
  flex-direction: column;
}

.comparison-col-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  margin: 0 0 0.75rem 0;
}

.comparison-preview-wrap {
  background-color: #cbd5e1;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1rem;
  min-height: 480px;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.comparison-preview-wrap img,
.comparison-preview-wrap canvas {
  max-width: 100%;
  box-shadow: var(--shadow-md);
}

/* ==========================================================================
   10. SEO CONTENT & INFORMATIONAL SECTION STYLES
   ========================================================================== */
.tool-seo-section {
  margin-bottom: 2.5rem;
}

.tool-seo-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-sm);
}

.tool-seo-card h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 1rem 0;
}

.tool-seo-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 1rem;
}

.tool-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.tool-feature-item {
  background-color: var(--bg-surface-alt);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.tool-feature-item h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 0.5rem 0;
}

.tool-feature-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.use-case-card {
  background-color: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.use-case-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 0.5rem 0;
}

.use-case-card p {
  font-size: 0.825rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* How to Use Steps */
.tool-howto-section {
  margin-bottom: 2.5rem;
}

.tool-howto-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-sm);
}

.faq-badge {
  display: inline-block;
  font-size: 0.725rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--primary);
  background-color: var(--primary-light);
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  margin-bottom: 0.5rem;
}

.tool-howto-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.tool-howto-step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.tool-howto-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.tool-howto-step p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* FAQ Accordion */
.faq-section {
  margin-bottom: 3.5rem;
}

.faq-header {
  text-align: center;
  margin-bottom: 2rem;
}

.faq-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 0.5rem 0;
}

.faq-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0;
}

.faq-accordion {
  max-width: 840px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.accordion-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.accordion-item.active {
  border-color: var(--primary);
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.25rem;
  background: none;
  border: none;
  text-align: left;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
}

.accordion-icon {
  width: 20px;
  height: 20px;
  color: var(--text-subtle);
  transition: transform var(--transition-fast);
}

.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
  color: var(--primary);
}

.accordion-panel {
  padding: 0 1.25rem 1.15rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* Related Tools Grid */
.tool-related-section {
  margin-bottom: 3.5rem;
}

.related-tools-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1.25rem;
  text-align: center;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

/* ==========================================================================
   11. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1280px) {
  .cv-workspace-grid {
    grid-template-columns: 280px minmax(380px, 1fr) minmax(420px, 1fr);
    gap: 1rem;
  }
  .preview-design-toolbar {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
}

@media (max-width: 1024px) {
  .mobile-view-tabs {
    display: grid;
  }
  .cv-stepper-container {
    display: none;
  }
  .cv-workspace-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Wizard Tabbed View Behavior on Mobile */
  .workspace-panel {
    display: none;
  }
  .workspace-panel.active-mobile-tab {
    display: flex;
  }

  .panel-body {
    max-height: none;
  }
  .tool-features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .use-cases-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tool-howto-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .tool-main-wrapper {
    padding-inline: 1rem;
  }
  .form-row-2col,
  .form-row-3col {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }
  .export-actions-grid {
    grid-template-columns: 1fr;
  }
  .comparison-modal-body {
    grid-template-columns: 1fr;
  }
  .tool-features-grid,
  .use-cases-grid,
  .tool-howto-steps {
    grid-template-columns: 1fr;
  }
  .cv-viewport-stage {
    padding: 0.75rem 0.35rem;
  }
}

@media (max-width: 390px) {
  .photo-editor-wrap {
    flex-direction: column;
    text-align: center;
  }
  .panel-header {
    padding: 0.75rem;
  }
  .panel-body {
    padding: 0.85rem;
  }
  .preview-design-toolbar {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   11. DARK MODE PARITY ([data-theme="dark"])
   ========================================================================== */
[data-theme="dark"] .cv-stepper-container {
  background-color: var(--bg-surface);
  border-color: var(--border-subtle);
}

[data-theme="dark"] .workspace-panel {
  background-color: var(--bg-surface);
  border-color: var(--border-subtle);
}

[data-theme="dark"] .panel-header {
  background-color: var(--bg-surface-elevated);
  border-bottom-color: var(--border-subtle);
}

[data-theme="dark"] .cv-dropzone {
  background-color: #162036;
  border-color: #334155;
}

[data-theme="dark"] .cv-dropzone:hover,
[data-theme="dark"] .cv-dropzone.dragover {
  background-color: rgba(59, 130, 246, 0.15);
  border-color: #3b82f6;
}

[data-theme="dark"] .original-preview-card,
[data-theme="dark"] .preview-design-toolbar {
  background-color: #162036;
  border-color: var(--border-subtle);
}

[data-theme="dark"] .original-canvas-viewport {
  background-color: #0b0f19;
  border-color: #334155;
}

[data-theme="dark"] .cv-viewport-stage {
  background-color: #0b0f19;
  border-color: #1e293b;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.6);
}

/* CV Document Sheet MUST ALWAYS remain crisp white A4 physical paper */
[data-theme="dark"] .cv-page-sheet {
  background-color: #ffffff !important;
  color: #1e293b !important;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .cv-page-sheet * {
  color: inherit;
}

[data-theme="dark"] .cv-page-sheet .cv-name {
  color: #0f172a !important;
}

[data-theme="dark"] .editor-section-card {
  background-color: var(--bg-surface);
  border-color: var(--border-subtle);
}

[data-theme="dark"] .section-card-header {
  background-color: var(--bg-surface-alt);
  border-bottom-color: var(--border-subtle);
}

[data-theme="dark"] .dynamic-item-card {
  background-color: #162036;
  border-color: #1e293b;
}

[data-theme="dark"] .item-card-top-bar {
  border-bottom-color: #1e293b;
}

[data-theme="dark"] .skills-chips-wrap {
  background-color: #10172a;
  border-color: #1e293b;
}

[data-theme="dark"] .custom-checkbox-wrap .checkbox-box {
  background-color: #10172a;
  border-color: #334155;
}

[data-theme="dark"] .photo-thumbnail-box {
  background-color: #162036;
  border-color: #334155;
}

[data-theme="dark"] .color-pill {
  border-color: #1e293b;
}

[data-theme="dark"] .btn-page-step,
[data-theme="dark"] .btn-zoom,
[data-theme="dark"] .page-nav-btn {
  background-color: #162036;
  border-color: #334155;
  color: var(--text-main);
}

[data-theme="dark"] .btn-page-step:hover,
[data-theme="dark"] .btn-zoom:hover,
[data-theme="dark"] .page-nav-btn:hover {
  background-color: #1e293b;
  border-color: var(--primary);
}

[data-theme="dark"] .btn-mode {
  color: var(--text-muted);
}

[data-theme="dark"] .btn-mode.active {
  background-color: #1e293b;
  color: #60a5fa;
}

[data-theme="dark"] .cv-alert-box {
  background-color: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fcd34d;
}

[data-theme="dark"] .btn-danger-soft {
  background-color: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

[data-theme="dark"] .cv-modal-dialog {
  background-color: var(--bg-surface);
  border-color: #334155;
}

[data-theme="dark"] .cv-modal-header {
  background-color: var(--bg-surface-elevated);
  border-bottom-color: var(--border-subtle);
}

[data-theme="dark"] .comparison-preview-wrap {
  background-color: #0b0f19;
  border-color: #334155;
}

[data-theme="dark"] .tool-feature-item,
[data-theme="dark"] .use-case-card {
  background-color: var(--bg-surface-alt);
  border-color: var(--border-subtle);
}

[data-theme="dark"] .accordion-item {
  background-color: var(--bg-surface);
  border-color: var(--border-subtle);
}

/* ==========================================================================
   12. PRINT STYLESHEET (@media print)
   ========================================================================== */
@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }

  html, body {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  /* Hide entire web UI */
  .site-header,
  .tool-breadcrumb,
  .tool-header-block,
  .cv-stepper-container,
  .mobile-view-tabs,
  .cv-workspace-grid,
  .cv-modal-backdrop,
  #visual-seo-mount,
  .tool-seo-section,
  .tool-howto-section,
  .faq-section,
  .tool-related-section,
  #support-smartdocify-mount,
  .site-footer {
    display: none !important;
    visibility: hidden !important;
  }

  /* Show ONLY the CV print container */
  #cv-print-container {
    display: block !important;
    visibility: visible !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 210mm;
    margin: 0 !important;
    padding: 0 !important;
  }

  #cv-print-container * {
    visibility: visible !important;
  }

  #cv-print-container .cv-page-sheet {
    box-shadow: none !important;
    border: none !important;
    margin: 0 !important;
    width: 210mm !important;
    min-height: 297mm !important;
    height: 297mm !important;
    page-break-after: always !important;
    break-after: page !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  #cv-print-container .page-sheet-footer {
    display: none !important;
  }
}
