/* ========================================
   RESUME BUILDER - Styles
   ======================================== */

/* ---- Top Bar ---- */
.rb-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border-bottom: none;
}
.rb-topbar-left { display: flex; align-items: center; gap: 0.6rem; }
.rb-topbar-right { display: flex; align-items: center; gap: 0.5rem; }
.rb-topbar-lbl { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }

/* Template Dropdown */
.rb-tpl-dropdown { position: relative; }
.rb-tpl-dropdown-btn {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.35rem 0.75rem 0.35rem 0.5rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.875rem; font-weight: 600;
  cursor: pointer;
  transition: border-color var(--transition);
  min-width: 160px;
}
.rb-tpl-dropdown-btn:hover { border-color: var(--color-primary); }

/* Mini thumb inside dropdown button */
.rb-tpl-dropdown-thumb {
  width: 24px; height: 32px;
  border: 1px solid var(--border-color);
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
  display: block;
}
.rb-tpl-dropdown-thumb .tm { padding: 2px; }

.rb-tpl-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 200;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hover);
  padding: 0.4rem;
  display: none;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.4rem;
  width: 420px;
}
.rb-tpl-dropdown-menu.open { display: grid; }
@media (max-width: 600px) {
  .rb-tpl-dropdown-menu { width: 280px; grid-template-columns: repeat(3, 1fr); }
}

.rb-tpl-menu-item {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  overflow: hidden;
  transition: border-color var(--transition);
}
.rb-tpl-menu-item:hover { border-color: var(--color-primary); }
.rb-tpl-menu-item.selected { border-color: var(--color-primary); }
.rb-tpl-menu-item .rb-tpl-thumb { width: 100%; aspect-ratio: 8.5 / 11; display: block; }
.rb-tpl-menu-item .rb-tpl-name {
  font-size: 0.62rem; font-weight: 700;
  text-align: center; padding: 0.2rem;
  background: var(--bg-secondary);
  color: var(--text-secondary);
}
.rb-tpl-menu-item.selected .rb-tpl-name { color: var(--color-primary); }

/* Fullscreen button */
.rb-fs-btn {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.825rem; padding: 0.35rem 0.75rem;
  white-space: nowrap;
}
@media (max-width: 600px) {
  #rb-fs-label { display: none; }
  .rb-fs-btn { padding: 0.35rem 0.5rem; }
}

/* Fullscreen mode */
.rb-app-wrap.rb-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1000 !important;
  background: var(--bg-primary) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  border-radius: 0 !important;
}
.rb-app-wrap.rb-fullscreen .rb-topbar {
  border-radius: 0;
  flex-shrink: 0;
}
.rb-app-wrap.rb-fullscreen .rb-app {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border-radius: 0;
  border-top: none;
}
.rb-app-wrap.rb-fullscreen .rb-sidebar {
  overflow-y: auto;
}
.rb-app-wrap.rb-fullscreen .rb-main {
  overflow-y: auto;
}
.rb-app-wrap.rb-fullscreen .rb-preview-wrap {
  overflow-y: auto;
  max-height: none;
  position: static;
}

/* ---- Layout ---- */
.rb-app-wrap {
  /* wrapper for topbar + app */
}
.rb-app {
  display: grid;
  grid-template-columns: 220px 1fr 400px;
  gap: 0;
  min-height: 80vh;
  border: 1px solid var(--border-color);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
}

@media (max-width: 1200px) {
  .rb-app { grid-template-columns: 200px 1fr 360px; }
}
@media (max-width: 960px) {
  .rb-app { grid-template-columns: 1fr; }
}

/* ---- Sidebar ---- */
.rb-sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0;
}
@media (max-width: 960px) {
  .rb-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0.5rem;
    gap: 0.25rem;
  }
}

.rb-sidebar-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0 1rem 0.75rem;
}
@media (max-width: 960px) { .rb-sidebar-title { display: none; } }

.rb-progress-wrap {
  padding: 0 1rem 1rem;
}
@media (max-width: 960px) { .rb-progress-wrap { display: none; } }

.rb-progress-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
}
.rb-progress-bar {
  height: 4px;
  background: var(--border-color);
  border-radius: 100px;
  overflow: hidden;
}
.rb-progress-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 100px;
  transition: width 0.3s ease;
  width: 0%;
}

.rb-step {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  border-left: 3px solid transparent;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.rb-step:hover { background: var(--bg-primary); color: var(--text-primary); }
.rb-step.active {
  background: var(--bg-primary);
  border-left-color: var(--color-primary);
  color: var(--color-primary);
  font-weight: 700;
}
@media (max-width: 960px) {
  .rb-step {
    border-left: none;
    border-radius: var(--radius-sm);
    padding: 0.35rem 0.6rem;
    font-size: 0.78rem;
    border: 1.5px solid var(--border-color);
  }
  .rb-step.active { border-color: var(--color-primary); background: var(--color-primary); color: #fff; }
}

.rb-step-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700;
  flex-shrink: 0;
  transition: all var(--transition);
}
.rb-step.active .rb-step-num { border-color: var(--color-primary); background: var(--color-primary); color: #fff; }
.rb-step.done .rb-step-num { border-color: #16a34a; background: #16a34a; color: #fff; }
.rb-step.done .rb-step-num::after { content: '✓'; font-size: 0.65rem; }
.rb-step.done .rb-step-num span { display: none; }
@media (max-width: 960px) { .rb-step-num { display: none; } }

.rb-step-label { flex: 1; }
.rb-step-opt { font-size: 0.68rem; color: var(--text-muted); margin-top: 1px; }
@media (max-width: 960px) { .rb-step-opt { display: none; } }

/* ---- Main Form Area ---- */
.rb-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.rb-panel {
  display: none;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  flex: 1;
}
.rb-panel.active { display: flex; }

.rb-panel-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0.25rem;
}
.rb-panel-hint {
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-top: -0.5rem;
  margin-bottom: 0.5rem;
}

/* ---- Form Fields ---- */
label.rb-lbl {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 3px;
}
input.rb-input, textarea.rb-ta, select.rb-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-input, var(--bg-primary));
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: inherit;
  transition: border-color var(--transition);
}
input.rb-input:focus, textarea.rb-ta:focus, select.rb-select:focus {
  outline: none;
  border-color: var(--color-primary);
}
textarea.rb-ta { min-height: 90px; resize: vertical; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
@media (max-width: 600px) { .form-row-2 { grid-template-columns: 1fr; } }

/* ---- Entry Cards ---- */
.rb-entry {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.875rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--bg-primary);
}
.rb-entry + .rb-entry { margin-top: 0.75rem; }
.rb-entry-remove {
  position: absolute; top: 0.5rem; right: 0.5rem;
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 0.9rem;
  padding: 0.2rem 0.4rem; border-radius: var(--radius-sm);
}
.rb-entry-remove:hover { color: #dc2626; background: #fee2e2; }

/* ---- Navigation Footer ---- */
.rb-nav-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
}
.rb-nav-footer-right { display: flex; gap: 0.5rem; }

/* ---- Toast ---- */
.rb-toast {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  background: #1f2937; color: #fff;
  padding: 0.5rem 1rem; border-radius: var(--radius-md);
  font-size: 0.825rem; font-weight: 600;
  opacity: 0; pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
  z-index: 9999;
}
.rb-toast.show { opacity: 1; transform: translateY(0); }

/* ---- Template Grid (Finalize step) ---- */
.rb-tpl-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 700px) { .rb-tpl-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 400px) { .rb-tpl-grid { grid-template-columns: repeat(2, 1fr); } }

.rb-tpl-card {
  border: 2.5px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition);
  position: relative;
}
.rb-tpl-card:hover { border-color: var(--color-primary); transform: translateY(-2px); }
.rb-tpl-card.selected { border-color: var(--color-primary); }
.rb-tpl-card.selected::after {
  content: '✓';
  position: absolute; top: 4px; right: 6px;
  background: var(--color-primary); color: #fff;
  font-size: 0.65rem; font-weight: 900;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  line-height: 16px; text-align: center;
}
.rb-tpl-card.selected .rb-tpl-name { color: var(--color-primary); }

/* ---- Shared thumbnail sizes (used in dropdown + grid) ---- */
.rb-tpl-thumb {
  width: 100%;
  aspect-ratio: 8.5 / 11;
  overflow: hidden;
  display: block;
}
.rb-tpl-name {
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
  padding: 0.3rem;
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

/* ---- Thumbnail inner mockup shapes ---- */
.tm { width: 100%; height: 100%; padding: 6px; box-sizing: border-box; }
.tm-bar { height: 3px; border-radius: 2px; margin-bottom: 3px; }
.tm-bar.wide { width: 80%; }
.tm-bar.half { width: 50%; }
.tm-bar.short { width: 30%; }
.tm-bar.xshort { width: 20%; }
.tm-bar.thin { height: 2px; }
.tm-bar.thinner { height: 1.5px; }
.tm-line { height: 1px; background: #ddd; margin: 3px 0; }
.tm-row { display: flex; gap: 3px; margin-bottom: 3px; }
.tm-row .tm-bar { margin: 0; }

/* Template 1: Classic - serif, name bar dark, double rule */
.tm-classic { background: #fff; }
.tm-classic .tm-name { height: 5px; width: 60%; background: #111; border-radius: 2px; margin-bottom: 2px; }
.tm-classic .tm-sub { height: 2.5px; width: 40%; background: #555; border-radius: 2px; margin-bottom: 3px; }
.tm-classic .tm-rule { height: 2px; background: #111; margin-bottom: 1px; }
.tm-classic .tm-rule2 { height: 1px; background: #444; margin-bottom: 4px; }
.tm-classic .tm-sh { height: 2px; width: 35%; background: #888; border-radius: 2px; margin: 4px 0 2px; border-bottom: 1px solid #ccc; }

/* Template 2: Modern - sans, grey pill headers */
.tm-modern { background: #fff; }
.tm-modern .tm-name { height: 5px; width: 55%; background: #1f2937; border-radius: 2px; margin-bottom: 2px; }
.tm-modern .tm-sub { height: 2px; width: 35%; background: #4b5563; border-radius: 2px; margin-bottom: 3px; border-bottom: 1px solid #d1d5db; padding-bottom: 3px; }
.tm-modern .tm-sh { height: 7px; background: #f3f4f6; border-radius: 3px; margin: 4px 0 2px; }

/* Template 3: Minimal - hairline only */
.tm-minimal { background: #fff; }
.tm-minimal .tm-name { height: 4px; width: 55%; background: #111; border-radius: 1px; margin-bottom: 2px; }
.tm-minimal .tm-sub { height: 2px; width: 35%; background: #6b7280; border-radius: 1px; margin-bottom: 3px; }
.tm-minimal .tm-sh { height: 2px; width: 30%; background: #9ca3af; border-radius: 1px; margin: 4px 0 2px; border-bottom: 1px solid #e5e7eb; }

/* Template 4: Executive - dark left sidebar */
.tm-exec { background: #fff; display: flex; padding: 0; }
.tm-exec-left { width: 35%; background: #1e293b; padding: 5px 4px; flex-shrink: 0; }
.tm-exec-right { flex: 1; padding: 5px 4px; }
.tm-exec .tm-bar-w { height: 2.5px; background: #fff; opacity: 0.7; border-radius: 2px; margin-bottom: 2px; }
.tm-exec .tm-bar-w.sub { background: #94a3b8; height: 1.5px; }
.tm-exec .tm-div { height: 1px; background: #334155; margin: 3px 0; }
.tm-exec-right .tm-name { height: 4px; width: 70%; background: #1e293b; border-radius: 1px; margin-bottom: 2px; }
.tm-exec-right .tm-sh { height: 2px; width: 50%; background: #475569; margin: 3px 0 2px; }

/* Template 5: Creative - purple header band */
.tm-creative { background: #fff; }
.tm-creative .tm-header { background: #7c3aed; padding: 5px 6px; margin: -6px -6px 4px; }
.tm-creative .tm-header .tm-name { height: 5px; width: 55%; background: #fff; border-radius: 2px; margin-bottom: 2px; }
.tm-creative .tm-header .tm-sub { height: 2px; width: 35%; background: rgba(255,255,255,0.6); border-radius: 2px; }
.tm-creative .tm-sh { height: 2.5px; width: 30%; background: #7c3aed; border-radius: 2px; margin: 4px 0 2px; }

/* Template 6: Navy Pro - deep navy titles, gold underline */
.tm-navy { background: #fff; }
.tm-navy .tm-name { height: 5px; width: 60%; background: #1e3a5f; border-radius: 2px; margin-bottom: 2px; }
.tm-navy .tm-sub { height: 1.5px; width: 40%; background: #c9a84c; border-radius: 2px; margin-bottom: 3px; }
.tm-navy .tm-sh { height: 2px; width: 35%; background: #1e3a5f; border-radius: 1px; margin: 4px 0 2px; border-bottom: 1px solid #c9a84c; }

/* Template 7: Bold Serif - extra large name */
.tm-bold { background: #fff; }
.tm-bold .tm-name { height: 7px; width: 70%; background: #111; border-radius: 2px; margin-bottom: 2px; }
.tm-bold .tm-sub { height: 2px; width: 40%; background: #444; border-radius: 1px; margin-bottom: 4px; }
.tm-bold .tm-rule { height: 2px; background: #111; margin-bottom: 4px; }
.tm-bold .tm-sh { height: 2px; width: 30%; background: #111; text-transform: uppercase; letter-spacing: 0.1em; margin: 4px 0 2px; }

/* Template 8: Soft - rounded cards with shadow */
.tm-soft { background: #f8fafc; }
.tm-soft .tm-name { height: 4px; width: 55%; background: #0f172a; border-radius: 2px; margin-bottom: 2px; }
.tm-soft .tm-sub { height: 2px; width: 35%; background: #64748b; border-radius: 2px; margin-bottom: 3px; }
.tm-soft .tm-card { background: #fff; border-radius: 3px; padding: 3px; margin-bottom: 3px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.tm-soft .tm-sh { height: 2px; width: 40%; background: #3b82f6; border-radius: 2px; margin-bottom: 2px; }

/* Template 9: Timeline - left border stripe with dots */
.tm-timeline { background: #fff; }
.tm-timeline .tm-name { height: 4px; width: 55%; background: #111; border-radius: 2px; margin-bottom: 2px; }
.tm-timeline .tm-sub { height: 2px; width: 35%; background: #555; border-radius: 2px; margin-bottom: 3px; }
.tm-timeline .tm-sh { height: 2px; width: 35%; background: #6b7280; border-radius: 2px; margin: 4px 0 2px; }
.tm-timeline .tm-entry { display: flex; gap: 3px; margin-bottom: 3px; }
.tm-timeline .tm-entry-bar { width: 2px; background: #d1d5db; border-radius: 2px; flex-shrink: 0; position: relative; }
.tm-timeline .tm-entry-bar::before { content: ''; position: absolute; top: 1px; left: -2px; width: 6px; height: 6px; border-radius: 50%; background: var(--color-primary, #7c3aed); }
.tm-timeline .tm-entry-content { flex: 1; }

/* Template 10: Compact - dense, small font */
.tm-compact { background: #fff; }
.tm-compact .tm-name { height: 3.5px; width: 50%; background: #111; border-radius: 1px; margin-bottom: 1.5px; }
.tm-compact .tm-sub { height: 1.5px; width: 35%; background: #555; border-radius: 1px; margin-bottom: 2px; }
.tm-compact .tm-sh { height: 1.5px; width: 28%; background: #888; margin: 2px 0 1.5px; }
.tm-compact .tm-bar { height: 1.5px; margin-bottom: 1.5px; }

/* ========================================
   RESUME PREVIEW - Live Preview Panel
   ======================================== */
.rb-preview-wrap {
  border-left: 1px solid var(--border-color);
  background: #e5e7eb;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1rem;
  overflow-y: auto;
  max-height: 90vh;
  position: sticky;
  top: 0;
}
@media (max-width: 960px) {
  .rb-preview-wrap {
    border-left: none;
    border-top: 1px solid var(--border-color);
    max-height: none;
    position: static;
  }
}

.rb-preview-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
  margin-bottom: 0.75rem;
}

.rb-preview-scaler {
  width: 100%;
  max-width: 360px;
  transform-origin: top center;
}

.rb-preview {
  background: #fff;
  color: #111;
  font-family: 'Georgia', serif;
  font-size: 11pt;
  line-height: 1.5;
  padding: 2rem 2rem 2.5rem;
  width: 210mm;
  min-height: 297mm;
  transform-origin: top left;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
}

/* Scale preview to fit panel - set via JS */
.rb-preview-scaler .rb-preview {
  transform: scale(var(--rb-scale, 0.5));
  margin-bottom: calc((297mm * var(--rb-scale, 0.5)) - 297mm);
}

/* ---- Preview elements ---- */
.rv-name { font-size: 22pt; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 2px; color: #111; }
.rv-title { font-size: 11pt; color: #555; margin-bottom: 8px; }
.rv-contact { font-size: 9.5pt; color: #444; display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 14px; border-bottom: 2px solid #111; padding-bottom: 10px; }
.rv-contact span { white-space: nowrap; }
.rv-section-title { font-size: 10.5pt; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #111; border-bottom: 1px solid #ccc; margin: 14px 0 8px; padding-bottom: 3px; }
.rv-summary { font-size: 10pt; color: #333; margin-bottom: 4px; }
.rv-entry { margin-bottom: 10px; }
.rv-entry-head { display: flex; justify-content: space-between; align-items: baseline; }
.rv-entry-org { font-weight: 700; font-size: 10.5pt; }
.rv-entry-date { font-size: 9pt; color: #666; white-space: nowrap; }
.rv-entry-sub { font-size: 10pt; color: #555; font-style: italic; margin-bottom: 3px; }
.rv-entry-desc { font-size: 9.5pt; color: #333; margin: 4px 0 0; padding-left: 1.2em; }
.rv-entry-desc li { margin-bottom: 2px; }
.rv-skills-list { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 9.5pt; color: #333; }
.rv-skill { background: #f3f4f6; padding: 2px 8px; border-radius: 100px; }
.rv-empty { color: #aaa; font-style: italic; font-size: 9.5pt; }

/* ---- Template: Modern ---- */
.tpl-modern { font-family: 'Inter', 'Segoe UI', Arial, sans-serif; }
.tpl-modern .rv-name { font-size: 24pt; color: #1f2937; }
.tpl-modern .rv-title { color: #4b5563; font-weight: 600; }
.tpl-modern .rv-contact { border-bottom: 1px solid #d1d5db; padding-bottom: 9px; }
.tpl-modern .rv-section-title { text-transform: none; letter-spacing: 0; border-bottom: none; color: #111827; background: #f3f4f6; padding: 4px 8px; border-radius: 4px; margin: 12px 0 8px; }
.tpl-modern .rv-skill { border-radius: 6px; background: #e5e7eb; }

/* ---- Template: Minimal ---- */
.tpl-minimal { font-family: Arial, Helvetica, sans-serif; }
.tpl-minimal .rv-name { font-size: 20pt; letter-spacing: 0; }
.tpl-minimal .rv-title { font-size: 10pt; color: #6b7280; margin-bottom: 6px; }
.tpl-minimal .rv-contact { border-bottom: 1px solid #d4d4d8; gap: 4px 12px; }
.tpl-minimal .rv-section-title { border-bottom: 1px solid #e5e7eb; text-transform: uppercase; letter-spacing: 0.05em; font-size: 9.5pt; margin: 10px 0 6px; padding-bottom: 2px; }
.tpl-minimal .rv-entry { margin-bottom: 8px; }
.tpl-minimal .rv-skill { background: transparent; border: 1px solid #e5e7eb; }

/* ---- Template: Executive ---- */
.tpl-executive {
  font-family: 'Segoe UI', Arial, sans-serif;
  padding: 0;
  display: flex;
  min-height: 297mm;
}
.tpl-executive .rv-exec-left {
  width: 35%;
  background: #1e293b;
  padding: 2rem 1.5rem;
  flex-shrink: 0;
}
.tpl-executive .rv-exec-right {
  flex: 1;
  padding: 2rem 1.5rem;
}
.tpl-executive .rv-name { font-size: 18pt; color: #fff; margin-bottom: 3px; }
.tpl-executive .rv-title { font-size: 10pt; color: #94a3b8; margin-bottom: 10px; }
.tpl-executive .rv-contact {
  border-bottom: 1px solid #334155;
  flex-direction: column;
  gap: 3px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  font-size: 8.5pt;
  color: #cbd5e1;
}
.tpl-executive .rv-section-title.left-title {
  font-size: 9pt; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: #94a3b8;
  border-bottom: 1px solid #334155;
  margin: 12px 0 6px; padding-bottom: 3px;
}
.tpl-executive .rv-skills-list { flex-direction: column; gap: 2px; }
.tpl-executive .rv-skill { background: #334155; color: #e2e8f0; font-size: 8.5pt; border-radius: 3px; }
.tpl-executive .rv-section-title { font-size: 11pt; color: #1e293b; border-bottom: 2px solid #1e293b; text-transform: uppercase; letter-spacing: 0.06em; margin: 12px 0 8px; }
.tpl-executive .rv-entry-org { color: #1e293b; }
.tpl-executive .rv-summary { font-size: 9.5pt; }

/* ---- Template: Creative ---- */
.tpl-creative { font-family: 'Segoe UI', Arial, sans-serif; padding: 0; }
.tpl-creative .rv-header-band { background: #7c3aed; padding: 1.5rem 2rem; }
.tpl-creative .rv-name { font-size: 26pt; color: #fff; margin-bottom: 3px; }
.tpl-creative .rv-title { color: rgba(255,255,255,0.8); font-size: 11pt; margin-bottom: 0; }
.tpl-creative .rv-contact { border-bottom: none; padding: 0.75rem 2rem; background: #f5f3ff; margin-bottom: 0; font-size: 9pt; gap: 4px 14px; }
.tpl-creative .rv-body { padding: 1rem 2rem 2rem; }
.tpl-creative .rv-section-title { color: #7c3aed; border-bottom: 2px solid #7c3aed; text-transform: uppercase; letter-spacing: 0.08em; margin: 12px 0 8px; }
.tpl-creative .rv-skill { background: #ede9fe; color: #5b21b6; border-radius: 100px; }

/* ---- Template: Navy Pro ---- */
.tpl-navypro { font-family: 'Segoe UI', Arial, sans-serif; }
.tpl-navypro .rv-name { font-size: 22pt; color: #1e3a5f; }
.tpl-navypro .rv-title { color: #4b6584; font-size: 10.5pt; margin-bottom: 3px; }
.tpl-navypro .rv-contact { border-bottom: 2px solid #c9a84c; padding-bottom: 8px; font-size: 9pt; color: #374151; }
.tpl-navypro .rv-section-title { color: #1e3a5f; border-bottom: 2px solid #c9a84c; text-transform: uppercase; letter-spacing: 0.08em; margin: 12px 0 7px; }
.tpl-navypro .rv-entry-org { color: #1e3a5f; }
.tpl-navypro .rv-skill { background: #fef9ee; border: 1px solid #c9a84c; }

/* ---- Template: Bold Serif ---- */
.tpl-boldserif { font-family: 'Georgia', 'Times New Roman', serif; }
.tpl-boldserif .rv-name { font-size: 28pt; font-weight: 900; letter-spacing: -0.03em; color: #000; }
.tpl-boldserif .rv-title { font-size: 11pt; color: #374151; font-style: italic; margin-bottom: 6px; }
.tpl-boldserif .rv-contact { border-bottom: 3px double #000; padding-bottom: 8px; font-size: 9pt; }
.tpl-boldserif .rv-section-title { text-transform: uppercase; letter-spacing: 0.12em; font-size: 10pt; border-bottom: 2px solid #000; margin: 14px 0 8px; padding-bottom: 2px; }
.tpl-boldserif .rv-entry-org { font-size: 11pt; }

/* ---- Template: Soft ---- */
.tpl-soft { font-family: 'Segoe UI', Arial, sans-serif; background: #f8fafc; }
.tpl-soft .rv-name { font-size: 22pt; color: #0f172a; }
.tpl-soft .rv-title { color: #64748b; }
.tpl-soft .rv-contact { border-bottom: 1px solid #e2e8f0; font-size: 9pt; color: #475569; }
.tpl-soft .rv-section-title { text-transform: none; border-bottom: none; color: #0f172a; font-size: 11pt; background: none; margin: 12px 0 6px; }
.tpl-soft .rv-entry { background: #fff; border-radius: 6px; padding: 8px 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.07); margin-bottom: 8px; }
.tpl-soft .rv-entry-head { margin-bottom: 2px; }
.tpl-soft .rv-skill { background: #dbeafe; color: #1d4ed8; border-radius: 6px; }

/* ---- Template: Timeline ---- */
.tpl-timeline { font-family: 'Segoe UI', Arial, sans-serif; }
.tpl-timeline .rv-name { font-size: 22pt; color: #111; }
.tpl-timeline .rv-contact { border-bottom: 1px solid #d1d5db; font-size: 9pt; }
.tpl-timeline .rv-section-title { border-bottom: 1px solid #e5e7eb; text-transform: uppercase; letter-spacing: 0.06em; font-size: 10pt; margin: 12px 0 8px; }
.tpl-timeline .rv-entry { border-left: 3px solid #d1d5db; padding-left: 12px; position: relative; margin-bottom: 12px; }
.tpl-timeline .rv-entry::before {
  content: '';
  position: absolute;
  left: -6px; top: 4px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--color-primary, #7c3aed);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--color-primary, #7c3aed);
}
.tpl-timeline .rv-skill { background: #f3f4f6; }

/* ---- Template: Compact ---- */
.tpl-compact { font-family: Arial, Helvetica, sans-serif; font-size: 9.5pt; line-height: 1.3; }
.tpl-compact .rv-name { font-size: 16pt; letter-spacing: 0; margin-bottom: 1px; }
.tpl-compact .rv-title { font-size: 9.5pt; color: #555; margin-bottom: 4px; }
.tpl-compact .rv-contact { border-bottom: 1px solid #d4d4d8; gap: 2px 10px; font-size: 8.5pt; padding-bottom: 5px; margin-bottom: 7px; }
.tpl-compact .rv-section-title { font-size: 9pt; margin: 7px 0 4px; padding-bottom: 1px; }
.tpl-compact .rv-entry { margin-bottom: 5px; }
.tpl-compact .rv-entry-org { font-size: 9.5pt; }
.tpl-compact .rv-entry-date { font-size: 8pt; }
.tpl-compact .rv-entry-desc { font-size: 8.5pt; }
.tpl-compact .rv-skill { font-size: 8.5pt; padding: 1px 6px; }

/* ---- Finalize Step download button area ---- */
.rb-finalize-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  padding: 1.25rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}
.rb-finalize-actions p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  flex-basis: 100%;
}
