/* ==========================================================================
   ResumeCraft AI — Enterprise Design System & Stylesheet
   ========================================================================== */

:root {
  /* UI Dark Theme Palette */
  --ui-bg-deep: #090d16;
  --ui-bg-card: #111827;
  --ui-bg-surface: #1f293d;
  --ui-bg-input: #0f172a;
  --ui-border: #283548;
  --ui-border-light: #374151;
  --ui-text-bright: #f8fafc;
  --ui-text-body: #cbd5e1;
  --ui-text-muted: #8492a6;
  
  /* Brand Gradients & Accents */
  --brand-blue: #3b82f6;
  --brand-indigo: #6366f1;
  --brand-cyan: #06b6d4;
  --brand-emerald: #10b981;
  --brand-amber: #f59e0b;
  --brand-rose: #f43f5e;
  --brand-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
  --brand-gradient-subtle: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);

  /* Dynamic Resume Document Variables (Updated by user in real time) */
  --resume-theme-color: #1e293b;
  --resume-font-family: 'Inter', sans-serif;
  --resume-font-size: 9.8pt;
  --resume-line-height: 1.42;
  --resume-section-gap: 1.05rem;
  --resume-item-gap: 0.7rem;
  --resume-bullet-gap: 0.22rem;
  --resume-pad-v: 1.6rem;
  --resume-pad-h: 1.8rem;
  --resume-sidebar-pad-v: 1.6rem;
  --resume-sidebar-pad-h: 1.3rem;
  --resume-zoom: 1;

  /* Elevation Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.25);
  --shadow-sheet: 0 20px 40px -15px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);

  /* Dimensions */
  --header-height: 64px;
}

/* Base Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--ui-bg-deep);
  color: var(--ui-text-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--ui-bg-deep);
}
::-webkit-scrollbar-thumb {
  background: var(--ui-border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--ui-border-light);
}

/* ==========================================================================
   Header Navigation Bar
   ========================================================================== */

.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ui-border);
}

.header-container {
  max-width: 100%;
  height: 100%;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.header-container::-webkit-scrollbar {
  display: none;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.back-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ui-text-bright);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--ui-border);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.back-home-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--brand-indigo);
  color: #ffffff;
  transform: translateX(-1px);
}

.header-v-divider {
  width: 1px;
  height: 22px;
  background: var(--ui-border);
  flex-shrink: 0;
}

.brand-group {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  user-select: none;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--brand-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.15;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ui-text-bright);
  white-space: nowrap;
  line-height: 1.15;
  display: block;
}

.gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge-version {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-cyan);
  white-space: nowrap;
  line-height: 1.15;
  margin-top: 2px;
  display: block;
}

/* Nav Tabs */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(15, 23, 42, 0.6);
  padding: 0.3rem;
  border-radius: 12px;
  border: 1px solid var(--ui-border);
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--ui-text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-btn:hover {
  color: var(--ui-text-bright);
  background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
  color: #fff;
  background: var(--brand-indigo);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  white-space: nowrap;
}

/* ATS Score Pill in Header */
.header-score-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.8rem;
  border-radius: 20px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
}

.header-score-pill:hover {
  background: rgba(16, 185, 129, 0.2);
  transform: translateY(-1px);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--brand-emerald);
  box-shadow: 0 0 8px var(--brand-emerald);
  animation: pulseAnimation 2s infinite;
}

@keyframes pulseAnimation {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px var(--brand-emerald); }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.score-label {
  font-size: 0.75rem;
  color: var(--ui-text-muted);
}

.score-val {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-emerald);
}

.score-grade {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ui-text-bright);
  background: rgba(255, 255, 255, 0.1);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

/* Dropdown Menu Component */
.dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 280px;
  background: var(--ui-bg-card);
  border: 1px solid var(--ui-border);
  border-radius: 12px;
  padding: 0.5rem;
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 1000;
  animation: dropFadeIn 0.15s ease-out;
}

@keyframes dropFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-menu.show {
  display: flex;
}

.dropdown-menu-right {
  right: 0;
  left: auto;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--ui-text-body);
  text-align: left;
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
}

.dropdown-item:hover {
  background: var(--ui-bg-surface);
  color: var(--ui-text-bright);
}

.dropdown-item.highlight {
  background: rgba(59, 130, 246, 0.12);
  color: var(--brand-blue);
}

.dropdown-item.highlight:hover {
  background: rgba(59, 130, 246, 0.2);
}

.dropdown-item.danger {
  color: var(--brand-rose);
}

.dropdown-item.danger:hover {
  background: rgba(244, 63, 94, 0.1);
}

.dropdown-item .profile-icon {
  font-size: 1.25rem;
}

.dropdown-item strong {
  display: block;
  font-weight: 600;
  line-height: 1.2;
}

.dropdown-item small {
  display: block;
  font-size: 0.72rem;
  color: var(--ui-text-muted);
  line-height: 1.2;
  margin-top: 2px;
}

.dropdown-divider {
  height: 1px;
  background: var(--ui-border);
  margin: 0.35rem 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  text-decoration: none;
}

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

.btn-primary {
  background: var(--brand-blue);
  color: #fff;
  border-color: var(--brand-blue);
}

.btn-primary:hover {
  background: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  color: var(--ui-text-bright);
  border-color: var(--ui-border);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--ui-border-light);
}

.btn-block {
  width: 100%;
}

.btn-text-action {
  background: none;
  border: none;
  color: var(--brand-cyan);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}

.btn-text-action:hover {
  text-decoration: underline;
  color: #38bdf8;
}

/* ==========================================================================
   Main Application Container & Views
   ========================================================================== */

.app-main-content {
  width: 100%;
  height: calc(100vh - var(--header-height));
  overflow: hidden;
}

.app-view {
  display: none;
  width: 100%;
  height: 100%;
  overflow-y: auto;
}

.app-view.active {
  display: block;
}

/* ==========================================================================
   VIEW 1: RESUME BUILDER & LIVE PREVIEW (SPLIT PANE)
   ========================================================================== */

.builder-layout {
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Left Pane: Editor Controls */
.builder-editor-pane {
  width: 480px;
  min-width: 420px;
  max-width: 540px;
  height: 100%;
  background: var(--ui-bg-card);
  border-right: 1px solid var(--ui-border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.editor-header {
  padding: 1.25rem 1.25rem 0.75rem 1.25rem;
  border-bottom: 1px solid var(--ui-border);
  background: var(--ui-bg-card);
  position: sticky;
  top: 0;
  z-index: 10;
}

.pane-title-group h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ui-text-bright);
}

.pane-title-group p {
  font-size: 0.75rem;
  color: var(--ui-text-muted);
}

/* Style Quick Bar */
.style-quick-bar {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.85rem;
  padding: 0.75rem;
  background: var(--ui-bg-surface);
  border-radius: 10px;
  border: 1px solid var(--ui-border);
}

.style-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.style-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ui-text-muted);
  white-space: nowrap;
}

.style-group select.form-select-sm {
  width: auto;
  min-width: 160px;
  max-width: 220px;
  font-size: 0.78rem;
  padding: 0.28rem 0.55rem;
}

.color-palette-swatches {
  display: flex;
  gap: 0.4rem;
}

.color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.color-swatch:hover {
  transform: scale(1.15);
}

.color-swatch.active {
  border-color: #fff;
  box-shadow: 0 0 0 2px var(--brand-blue);
  transform: scale(1.15);
}

/* Accordion Component */
.accordion-container {
  padding: 1rem 1.25rem 2rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.accordion-card {
  background: var(--ui-bg-surface);
  border: 1px solid var(--ui-border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.accordion-card.open {
  border-color: var(--ui-border-light);
}

.accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: transparent;
  border: none;
  color: var(--ui-text-bright);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.accordion-header:hover {
  background: rgba(255, 255, 255, 0.03);
}

.accordion-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

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

.chevron {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--ui-text-muted);
}

.accordion-card.open .chevron {
  transform: rotate(180deg);
}

.accordion-body {
  display: none;
  padding: 1rem;
  border-top: 1px solid var(--ui-border);
  background: rgba(15, 23, 42, 0.4);
}

.accordion-card.open .accordion-body {
  display: block;
}

/* Forms */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.form-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ui-text-muted);
}

.label-with-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-control {
  width: 100%;
  background: var(--ui-bg-input);
  border: 1px solid var(--ui-border);
  border-radius: 6px;
  padding: 0.5rem 0.7rem;
  font-size: 0.82rem;
  color: var(--ui-text-bright);
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.form-select {
  background: var(--ui-bg-input);
  border: 1px solid var(--ui-border);
  border-radius: 6px;
  padding: 0.45rem 0.6rem;
  font-size: 0.8rem;
  color: var(--ui-text-bright);
  font-family: inherit;
  cursor: pointer;
}

.form-select-sm {
  padding: 0.3rem 0.5rem;
  font-size: 0.78rem;
}

.form-select:focus {
  outline: none;
  border-color: var(--brand-blue);
}

.field-hint {
  font-size: 0.68rem;
  color: var(--ui-text-muted);
  margin-top: 2px;
}

.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }

/* Dynamic List Items (Experience, Projects, Education) */
.dynamic-entries-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.entry-card {
  background: var(--ui-bg-card);
  border: 1px solid var(--ui-border);
  border-radius: 8px;
  padding: 0.85rem;
  position: relative;
}

.entry-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.entry-card-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ui-text-bright);
}

.btn-delete-entry {
  background: none;
  border: none;
  color: var(--brand-rose);
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 4px;
}

.btn-delete-entry:hover {
  background: rgba(244, 63, 94, 0.15);
}

/* Bullet Points in Entries */
.bullets-group {
  margin-top: 0.5rem;
}

.bullet-item {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.bullet-item textarea {
  flex: 1;
}

.btn-del-bullet {
  background: none;
  border: none;
  color: var(--ui-text-muted);
  cursor: pointer;
  padding: 0.2rem;
  margin-top: 0.3rem;
}

.btn-del-bullet:hover {
  color: var(--brand-rose);
}

/* ==========================================================================
   Right Pane: Real-Time Resume Sheet Live Canvas Preview
   ========================================================================== */

.builder-preview-pane {
  flex: 1;
  height: 100%;
  background: #0f172a;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.preview-control-bar {
  height: 48px;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid var(--ui-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  z-index: 5;
}

.doc-status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--ui-text-muted);
}

.status-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-emerald);
  flex-shrink: 0;
}

.pipe {
  color: var(--ui-border);
}

/* Page Fill Telemetry Widget */
.page-fill-pill {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--ui-bg-surface);
  border: 1px solid var(--ui-border);
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: default;
  transition: all 0.2s ease;
}

.page-fill-pill.fill-optimal {
  border-color: rgba(16, 185, 129, 0.45);
  color: #34d399;
}

.page-fill-pill.fill-overflow {
  border-color: rgba(244, 63, 94, 0.55);
  background: rgba(244, 63, 94, 0.12);
  color: #fb7185;
}

.page-fill-pill.fill-sparse {
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
}

.fill-meter-bar {
  width: 34px;
  height: 5px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
}

.fill-meter-progress {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--brand-emerald);
  transition: width 0.3s ease, background-color 0.3s ease;
}

.page-fill-pill.fill-overflow .fill-meter-progress {
  background: var(--brand-rose);
}

.page-fill-pill.fill-sparse .fill-meter-progress {
  background: var(--brand-blue);
}

/* Quick Auto-Fit Action Button */
.btn-quick-autofit {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  color: #ffffff;
  border: none;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.22rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.btn-quick-autofit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.45);
}

.btn-quick-autofit.pulse {
  animation: autofitPulse 1.6s infinite;
}

@keyframes autofitPulse {
  0% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(244, 63, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); }
}

.preview-zoom-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--ui-bg-surface);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--ui-border);
}

.zoom-btn {
  background: transparent;
  border: none;
  color: var(--ui-text-bright);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.zoom-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.zoom-level {
  font-size: 0.75rem;
  color: var(--ui-text-body);
  min-width: 38px;
  text-align: center;
}

.resume-sheet-viewport {
  flex: 1;
  overflow: auto;
  display: flex;
  justify-content: center;
  padding: 2.5rem 1.5rem 4rem 1.5rem;
  background: #0b1120;
  position: relative;
}

/* ==========================================================================
   THE RESUME CANVAS DOCUMENT (Printable 8.5" x 11" Sheet)
   ========================================================================== */

.resume-sheet {
  width: 8.5in;
  min-height: 11in;
  background-color: #ffffff;
  color: #1e293b;
  box-shadow: var(--shadow-sheet);
  border-radius: 2px;
  font-family: var(--resume-font-family);
  font-size: var(--resume-font-size);
  line-height: var(--resume-line-height);
  transform-origin: top center;
  transition: transform 0.1s ease;
  overflow: visible; /* Prevents text from being amputated/clipped! */
  box-sizing: border-box;
  position: relative;
}

/* Page Break Boundary Guide for Visual Feedback */
.page-boundary-guide {
  position: absolute;
  top: 11in;
  left: -24px;
  right: -24px;
  display: none;
  align-items: center;
  pointer-events: none;
  z-index: 10;
}

.page-boundary-guide.visible {
  display: flex;
}

.page-boundary-guide .guide-line {
  flex: 1;
  border-top: 2px dashed #f43f5e;
}

.page-boundary-guide .guide-badge {
  background: #f43f5e;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.4);
  margin: 0 10px;
  white-space: nowrap;
}

/* Multi-Page Mode Guidelines */
.resume-sheet.mode-multi-page {
  box-shadow: var(--shadow-sheet);
  margin-bottom: 3rem;
}

.page-two-boundary-guide {
  position: absolute;
  top: 22in;
  left: -24px;
  right: -24px;
  display: none;
  align-items: center;
  pointer-events: none;
  z-index: 10;
}

.page-two-boundary-guide.visible {
  display: flex;
}

.page-two-boundary-guide .guide-line {
  flex: 1;
  border-top: 2px dashed var(--brand-indigo);
}

.page-two-boundary-guide .guide-badge {
  background: var(--brand-indigo);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 10px;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   TEMPLATE 1: MODERN EXECUTIVE (Sidebar Architecture)
   -------------------------------------------------------------------------- */

.template-modern-executive {
  display: flex;
  min-height: 11in;
  background: linear-gradient(to right, var(--resume-theme-color) 0%, var(--resume-theme-color) 33%, #ffffff 33%, #ffffff 100%);
}

.template-modern-executive .resume-sidebar {
  width: 33%;
  background-color: var(--resume-theme-color);
  color: #f8fafc;
  padding: var(--resume-sidebar-pad-v) var(--resume-sidebar-pad-h);
  display: flex;
  flex-direction: column;
  gap: var(--resume-section-gap);
  box-sizing: border-box;
  flex-shrink: 0;
}

.template-modern-executive .resume-main {
  width: 67%;
  padding: var(--resume-pad-v) var(--resume-pad-h);
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: var(--resume-section-gap);
  box-sizing: border-box;
}

.template-modern-executive .sidebar-header h1 {
  font-size: calc(var(--resume-font-size) * 1.55);
  font-weight: 800;
  line-height: 1.15;
  color: #ffffff;
  margin-bottom: 0.2rem;
}

.template-modern-executive .sidebar-header .resume-tagline {
  font-size: calc(var(--resume-font-size) * 0.9);
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

.template-modern-executive .sidebar-section-title {
  font-size: calc(var(--resume-font-size) * 0.82);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 0.25rem;
  margin-bottom: calc(var(--resume-item-gap) * 0.7);
}

.template-modern-executive .contact-list {
  display: flex;
  flex-direction: column;
  gap: calc(var(--resume-bullet-gap) * 1.4);
  font-size: calc(var(--resume-font-size) * 0.85);
}

.template-modern-executive .contact-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  word-break: break-all;
  color: rgba(255, 255, 255, 0.85);
}

.template-modern-executive .skill-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.template-modern-executive .skill-pill {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: calc(var(--resume-font-size) * 0.76);
  font-weight: 500;
}

.template-modern-executive .sidebar-edu-item {
  margin-bottom: var(--resume-item-gap);
  font-size: calc(var(--resume-font-size) * 0.85);
  break-inside: avoid;
  page-break-inside: avoid;
}

.template-modern-executive .sidebar-edu-item strong {
  display: block;
  color: #ffffff;
}

.template-modern-executive .sidebar-edu-item .school {
  color: rgba(255, 255, 255, 0.8);
}

.template-modern-executive .main-section-title {
  font-size: calc(var(--resume-font-size) * 1.05);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--resume-theme-color);
  border-bottom: 2px solid var(--resume-theme-color);
  padding-bottom: 0.2rem;
  margin-bottom: calc(var(--resume-item-gap) * 0.8);
}

.template-modern-executive .resume-summary-text {
  font-size: var(--resume-font-size);
  color: #334155;
  line-height: var(--resume-line-height);
  text-align: justify;
}

.template-modern-executive .timeline-item {
  margin-bottom: var(--resume-item-gap);
  break-inside: avoid;
  page-break-inside: avoid;
}

.template-modern-executive .item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.15rem;
}

.template-modern-executive .item-role {
  font-size: calc(var(--resume-font-size) * 0.98);
  font-weight: 700;
  color: #0f172a;
}

.template-modern-executive .item-company {
  font-size: calc(var(--resume-font-size) * 0.92);
  font-weight: 600;
  color: var(--resume-theme-color);
}

.template-modern-executive .item-date {
  font-size: calc(var(--resume-font-size) * 0.82);
  font-weight: 600;
  color: #64748b;
}

.template-modern-executive .item-bullets {
  list-style-type: square;
  padding-left: 1.15rem;
  margin-top: calc(var(--resume-bullet-gap) * 0.8);
}

.template-modern-executive .item-bullets li {
  font-size: calc(var(--resume-font-size) * 0.9);
  color: #334155;
  margin-bottom: var(--resume-bullet-gap);
  line-height: var(--resume-line-height);
}

/* --------------------------------------------------------------------------
   TEMPLATE 2: MINIMALIST TECH (Silicon Valley Single-Column ATS)
   -------------------------------------------------------------------------- */

.template-minimalist-tech {
  padding: var(--resume-pad-v) var(--resume-pad-h);
  display: flex;
  flex-direction: column;
  gap: var(--resume-section-gap);
  min-height: 11in;
  box-sizing: border-box;
}

.template-minimalist-tech .resume-header {
  text-align: center;
  border-bottom: 1.5px solid #0f172a;
  padding-bottom: calc(var(--resume-item-gap) * 0.8);
}

.template-minimalist-tech .resume-header h1 {
  font-size: calc(var(--resume-font-size) * 1.75);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin-bottom: 0.15rem;
}

.template-minimalist-tech .resume-header .resume-tagline {
  font-size: calc(var(--resume-font-size) * 0.95);
  font-weight: 600;
  color: var(--resume-theme-color);
  margin-bottom: 0.35rem;
}

.template-minimalist-tech .contact-inline {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: calc(var(--resume-font-size) * 0.82);
  color: #475569;
}

.template-minimalist-tech .contact-inline span:not(:last-child)::after {
  content: "•";
  margin-left: 0.5rem;
  color: #94a3b8;
}

.template-minimalist-tech .section-block {
  margin-bottom: calc(var(--resume-item-gap) * 0.5);
  break-inside: avoid;
  page-break-inside: avoid;
}

.template-minimalist-tech .section-heading {
  font-size: calc(var(--resume-font-size) * 0.92);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0f172a;
  border-bottom: 1px solid #cbd5e1;
  padding-bottom: 0.15rem;
  margin-bottom: calc(var(--resume-item-gap) * 0.6);
}

.template-minimalist-tech .item-row {
  margin-bottom: var(--resume-item-gap);
  break-inside: avoid;
  page-break-inside: avoid;
}

.template-minimalist-tech .item-title-line {
  display: flex;
  justify-content: space-between;
  font-size: calc(var(--resume-font-size) * 0.92);
}

.template-minimalist-tech .item-title-line strong {
  color: #0f172a;
}

.template-minimalist-tech .item-title-line span {
  font-size: calc(var(--resume-font-size) * 0.82);
  font-weight: 600;
  color: #64748b;
}

.template-minimalist-tech .item-sub-line {
  font-size: calc(var(--resume-font-size) * 0.84);
  font-style: italic;
  color: #475569;
  margin-bottom: 0.25rem;
}

.template-minimalist-tech .bullet-points {
  padding-left: 1.1rem;
}

.template-minimalist-tech .bullet-points li {
  font-size: calc(var(--resume-font-size) * 0.9);
  color: #334155;
  margin-bottom: var(--resume-bullet-gap);
  line-height: var(--resume-line-height);
}

/* --------------------------------------------------------------------------
   TEMPLATE 3: CREATIVE DESIGNER (Accent Banner & Visual Grid)
   -------------------------------------------------------------------------- */

.template-creative-designer {
  display: flex;
  flex-direction: column;
  min-height: 11in;
  box-sizing: border-box;
}

.template-creative-designer .creative-top-banner {
  background: var(--resume-theme-color);
  color: #ffffff;
  padding: calc(var(--resume-pad-v) * 0.8) var(--resume-pad-h);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
}

.template-creative-designer .banner-info h1 {
  font-size: calc(var(--resume-font-size) * 1.7);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.2rem;
}

.template-creative-designer .banner-info .tagline {
  font-size: calc(var(--resume-font-size) * 0.95);
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

.template-creative-designer .banner-contacts {
  text-align: right;
  font-size: calc(var(--resume-font-size) * 0.82);
  color: rgba(255, 255, 255, 0.9);
  line-height: var(--resume-line-height);
}

.template-creative-designer .creative-body {
  padding: var(--resume-pad-v) var(--resume-pad-h);
  display: grid;
  grid-template-columns: 1.85fr 1.15fr;
  gap: calc(var(--resume-section-gap) * 1.15);
  box-sizing: border-box;
}

.template-creative-designer .c-section-heading {
  font-size: calc(var(--resume-font-size) * 0.96);
  font-weight: 800;
  color: var(--resume-theme-color);
  margin-bottom: calc(var(--resume-item-gap) * 0.7);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.template-creative-designer .c-section-heading::after {
  content: "";
  flex: 1;
  height: 2px;
  background: rgba(0, 0, 0, 0.08);
}

.template-creative-designer .c-timeline-entry {
  margin-bottom: var(--resume-item-gap);
  break-inside: avoid;
  page-break-inside: avoid;
}

.template-creative-designer .c-role {
  font-size: calc(var(--resume-font-size) * 0.94);
  font-weight: 700;
  color: #0f172a;
}

.template-creative-designer .c-meta {
  font-size: calc(var(--resume-font-size) * 0.82);
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.template-creative-designer .c-bullets {
  padding-left: 1.1rem;
  font-size: calc(var(--resume-font-size) * 0.88);
  color: #334155;
}

.template-creative-designer .c-bullets li {
  margin-bottom: var(--resume-bullet-gap);
  line-height: var(--resume-line-height);
}

/* --------------------------------------------------------------------------
   TEMPLATE 4: IVY LEAGUE CLASSIC (Academic Serif)
   -------------------------------------------------------------------------- */

.template-ivy-classic {
  font-family: 'Merriweather', Georgia, serif;
  padding: var(--resume-pad-v) var(--resume-pad-h);
  color: #111827;
  min-height: 11in;
  box-sizing: border-box;
}

.template-ivy-classic .ivy-header {
  text-align: center;
  margin-bottom: calc(var(--resume-section-gap) * 0.8);
}

.template-ivy-classic .ivy-header h1 {
  font-size: calc(var(--resume-font-size) * 1.65);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #111827;
}

.template-ivy-classic .ivy-header .ivy-tagline {
  font-size: calc(var(--resume-font-size) * 0.9);
  font-style: italic;
  color: #4b5563;
  margin-top: 0.15rem;
}

.template-ivy-classic .ivy-contacts {
  font-size: calc(var(--resume-font-size) * 0.82);
  color: #4b5563;
  margin-top: 0.35rem;
}

.template-ivy-classic .double-rule {
  border-top: 1.5px solid #111827;
  border-bottom: 0.5px solid #111827;
  height: 3px;
  margin: 0.6rem 0 0.9rem 0;
}

.template-ivy-classic .ivy-section-title {
  font-size: calc(var(--resume-font-size) * 0.88);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #111827;
  border-bottom: 1px solid #9ca3af;
  padding-bottom: 0.15rem;
  margin-bottom: calc(var(--resume-item-gap) * 0.65);
}

.template-ivy-classic .ivy-item {
  margin-bottom: var(--resume-item-gap);
  break-inside: avoid;
  page-break-inside: avoid;
}

.template-ivy-classic .ivy-item-row {
  display: flex;
  justify-content: space-between;
  font-size: calc(var(--resume-font-size) * 0.9);
}

.template-ivy-classic .ivy-item-row strong {
  color: #111827;
}

.template-ivy-classic .ivy-item-row span {
  font-size: calc(var(--resume-font-size) * 0.82);
  font-style: italic;
  color: #4b5563;
}

.template-ivy-classic .ivy-bullets {
  padding-left: 1.2rem;
  margin-top: calc(var(--resume-bullet-gap) * 0.8);
}

.template-ivy-classic .ivy-bullets li {
  font-size: calc(var(--resume-font-size) * 0.88);
  color: #1f2937;
  margin-bottom: var(--resume-bullet-gap);
  line-height: var(--resume-line-height);
}

/* --------------------------------------------------------------------------
   TEMPLATE 5: COMPACT ONE-PAGER (High Density Layout)
   -------------------------------------------------------------------------- */

.template-compact-onepage {
  padding: calc(var(--resume-pad-v) * 0.8) calc(var(--resume-pad-h) * 0.85);
  font-size: var(--resume-font-size);
  line-height: var(--resume-line-height);
  min-height: 11in;
  box-sizing: border-box;
}

.template-compact-onepage .compact-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--resume-theme-color);
  padding-bottom: 0.3rem;
  margin-bottom: calc(var(--resume-section-gap) * 0.5);
}

.template-compact-onepage .compact-header h1 {
  font-size: calc(var(--resume-font-size) * 1.45);
  font-weight: 800;
  color: #0f172a;
}

.template-compact-onepage .compact-header .c-tagline {
  font-size: calc(var(--resume-font-size) * 0.85);
  font-weight: 600;
  color: var(--resume-theme-color);
}

.template-compact-onepage .compact-contacts {
  font-size: calc(var(--resume-font-size) * 0.76);
  text-align: right;
  color: #475569;
}

.template-compact-onepage .compact-section-title {
  font-size: calc(var(--resume-font-size) * 0.82);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--resume-theme-color);
  border-bottom: 1px solid #cbd5e1;
  padding-bottom: 0.15rem;
  margin: calc(var(--resume-section-gap) * 0.5) 0 calc(var(--resume-item-gap) * 0.4) 0;
}

.template-compact-onepage .compact-item {
  margin-bottom: var(--resume-item-gap);
  break-inside: avoid;
  page-break-inside: avoid;
}

.template-compact-onepage .compact-row {
  display: flex;
  justify-content: space-between;
  font-size: calc(var(--resume-font-size) * 0.88);
}

.template-compact-onepage .compact-bullets {
  padding-left: 1rem;
}

.template-compact-onepage .compact-bullets li {
  font-size: calc(var(--resume-font-size) * 0.84);
  color: #334155;
  margin-bottom: var(--resume-bullet-gap);
  line-height: var(--resume-line-height);
}

/* ==========================================================================
   VIEW 2: ATS TELEMETRY & RESUME ANALYZER STYLES
   ========================================================================== */

.analyzer-dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.analyzer-hero-card {
  background: var(--ui-bg-card);
  border: 1px solid var(--ui-border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.analyzer-hero-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero-score-badge-cluster {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

/* Circular SVG Gauge */
.score-radial-progress {
  width: 140px;
  height: 140px;
  flex-shrink: 0;
}

.circular-chart {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 100%;
}

.circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 3.2;
}

.circle-stroke {
  fill: none;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke: var(--brand-emerald);
  transition: stroke-dasharray 0.8s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.3s ease;
}

.percentage {
  fill: #ffffff;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.55rem;
  text-anchor: middle;
}

.percentage-sub {
  fill: var(--ui-text-muted);
  font-size: 0.25rem;
  text-anchor: middle;
}

.hero-score-meta {
  flex: 1;
}

.ats-classification-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--brand-emerald);
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 20px;
  margin-bottom: 0.6rem;
}

.badge-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-emerald);
}

.hero-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--ui-text-bright);
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.hero-subtitle {
  font-size: 0.9rem;
  color: var(--ui-text-body);
  line-height: 1.55;
  max-width: 800px;
  margin-bottom: 1.25rem;
}

.hero-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.hero-stat-item {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--brand-blue);
}

.stat-lbl {
  font-size: 0.75rem;
  color: var(--ui-text-muted);
}

/* 4-Pillar Telemetry Grid */
.telemetry-pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.telemetry-card {
  background: var(--ui-bg-card);
  border: 1px solid var(--ui-border);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

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

.card-title-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-title-group h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ui-text-bright);
}

.pillar-score-badge {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand-emerald);
  background: rgba(16, 185, 129, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--brand-emerald);
  border-radius: 4px;
  transition: width 0.8s ease;
}

.pillar-summary {
  font-size: 0.78rem;
  color: var(--ui-text-body);
  line-height: 1.45;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag-pill {
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ui-text-bright);
  border: 1px solid var(--ui-border);
}

.tag-pill.success {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.checklist-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.75rem;
}

.checklist-items li.check-pass {
  color: #34d399;
}

.readability-stats-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.75rem;
}

.r-stat {
  display: flex;
  justify-content: space-between;
}

.r-stat span { color: var(--ui-text-muted); }
.r-stat strong { color: var(--ui-text-bright); }

/* Deep Dive Optimizer */
.analyzer-deep-dive-card {
  background: var(--ui-bg-card);
  border: 1px solid var(--ui-border);
  border-radius: 12px;
  padding: 1.5rem;
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.card-title-row h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ui-text-bright);
}

.card-title-row p {
  font-size: 0.78rem;
  color: var(--ui-text-muted);
}

.bullet-optimizations-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.bullet-opt-item {
  background: var(--ui-bg-surface);
  border: 1px solid var(--ui-border);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.opt-before, .opt-after {
  display: flex;
  gap: 0.6rem;
  font-size: 0.82rem;
  line-height: 1.45;
}

.opt-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  align-self: flex-start;
  flex-shrink: 0;
}

.opt-tag.weak {
  background: rgba(244, 63, 94, 0.15);
  color: var(--brand-rose);
}

.opt-tag.strong {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.opt-actions {
  display: flex;
  justify-content: flex-end;
}

/* ==========================================================================
   VIEW 3: JOB MATCH RADAR STYLES
   ========================================================================== */

.job-match-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.match-control-card {
  background: var(--ui-bg-card);
  border: 1px solid var(--ui-border);
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.match-control-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.match-control-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ui-text-bright);
}

.match-control-header p {
  font-size: 0.8rem;
  color: var(--ui-text-muted);
}

.archetype-selector-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.archetype-selector-group label {
  font-size: 0.78rem;
  color: var(--ui-text-muted);
}

.job-description-input-zone label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ui-text-muted);
  margin-bottom: 0.35rem;
  display: block;
}

.match-results-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.5rem;
}

.match-score-card {
  background: var(--ui-bg-card);
  border: 1px solid var(--ui-border);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.match-percentage-badge {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.pct-num {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--brand-cyan);
  line-height: 1;
}

.pct-lbl {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ui-text-muted);
}

.match-score-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ui-text-bright);
}

.match-score-card p {
  font-size: 0.82rem;
  color: var(--ui-text-body);
  line-height: 1.5;
}

.match-action-box {
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: 8px;
  padding: 0.85rem;
  margin-top: 0.5rem;
}

.match-action-box h4 {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-cyan);
  margin-bottom: 0.25rem;
}

.match-matrix-card {
  background: var(--ui-bg-card);
  border: 1px solid var(--ui-border);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.matrix-title-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.status-chip {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
}

.status-chip.success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.status-chip.danger {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
}

.matrix-title-group small {
  font-size: 0.72rem;
  color: var(--ui-text-muted);
}

.keywords-pill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.keyword-pill {
  font-size: 0.78rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid transparent;
}

.keyword-pill.matched {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: #a7f3d0;
}

.keyword-pill.missing {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.3);
  color: #fecdd3;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.keyword-pill.missing:hover {
  transform: translateY(-1px);
  background: rgba(244, 63, 94, 0.25);
}

.matrix-divider {
  height: 1px;
  background: var(--ui-border);
}

/* ==========================================================================
   VIEW 4: TEMPLATE GALLERY STYLES
   ========================================================================== */

.gallery-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem 1.5rem;
}

.gallery-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.gallery-header h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--ui-text-bright);
  margin-bottom: 0.4rem;
}

.gallery-header p {
  font-size: 0.92rem;
  color: var(--ui-text-muted);
}

.templates-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

.template-card {
  background: var(--ui-bg-card);
  border: 1px solid var(--ui-border);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.template-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-indigo);
  box-shadow: 0 12px 24px -8px rgba(99, 102, 241, 0.3);
}

.template-thumbnail {
  height: 180px;
  background: #0f172a;
  border-bottom: 1px solid var(--ui-border);
  padding: 1.25rem;
  display: flex;
  position: relative;
  overflow: hidden;
}

.thumb-modern-executive .mini-sidebar {
  width: 32%;
  height: 100%;
  background: #1e293b;
  border-radius: 4px;
}

.thumb-modern-executive .mini-body {
  width: 68%;
  height: 100%;
  background: #ffffff;
  padding: 0.6rem;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.mini-line {
  height: 5px;
  background: #cbd5e1;
  border-radius: 2px;
}

.mini-line.mini-title {
  height: 8px;
  width: 65%;
  background: #0f172a;
}

.thumb-minimalist-tech .full-width {
  width: 100%;
  height: 100%;
  background: #ffffff;
  padding: 0.75rem;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.mini-line.center {
  margin: 0 auto;
}

.mini-rule {
  height: 1px;
  background: #0f172a;
  margin: 2px 0;
}

.mini-dense-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem;
  height: 60%;
}

.mini-col {
  background: #f1f5f9;
  border-radius: 2px;
}

.template-meta {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.t-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.15);
  color: var(--brand-blue);
  align-self: flex-start;
  margin-bottom: 0.6rem;
}

.t-badge.success { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.t-badge.purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.t-badge.amber { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.t-badge.cyan { background: rgba(6, 182, 212, 0.15); color: #22d3ee; }

.template-meta h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ui-text-bright);
  margin-bottom: 0.35rem;
}

.template-meta p {
  font-size: 0.8rem;
  color: var(--ui-text-muted);
  line-height: 1.45;
  margin-bottom: 0.85rem;
  flex: 1;
}

.t-tags {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.t-tags span {
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: var(--ui-bg-surface);
  color: var(--ui-text-body);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.toast {
  background: #1e293b;
  border: 1px solid var(--ui-border);
  color: #fff;
  padding: 0.75rem 1.15rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: slideToast 0.25s ease-out;
}

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

/* ==========================================================================
   PRINT / PDF EXPORT OPTIMIZATIONS (@media print)
   ========================================================================== */

@media print {
  @page {
    margin: 0;
    size: letter portrait;
  }

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

  .no-print,
  .app-header,
  .builder-editor-pane,
  .preview-control-bar,
  .toast-container,
  .page-boundary-guide,
  .page-two-boundary-guide {
    display: none !important;
  }

  .app-main-content,
  .builder-layout,
  .builder-preview-pane,
  .resume-sheet-viewport {
    display: block !important;
    width: 100% !important;
    min-height: 100% !important;
    height: auto !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
  }

  .resume-sheet {
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    transform: none !important;
    width: 100% !important;
    min-height: 11in !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    margin: 0 auto !important;
    padding: 0 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .template-modern-executive {
    display: flex !important;
    min-height: 11in !important;
    background: linear-gradient(to right, var(--resume-theme-color) 0%, var(--resume-theme-color) 33%, #ffffff 33%, #ffffff 100%) !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .template-modern-executive .resume-sidebar {
    width: 33% !important;
    min-height: 11in !important;
    background-color: var(--resume-theme-color) !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
  }

  .template-modern-executive .resume-main {
    width: 67% !important;
    box-sizing: border-box !important;
    background-color: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .timeline-item, .item-row, .c-timeline-entry, .compact-item, .ivy-item, .sidebar-edu-item, .sidebar-section, .main-section, .section-block {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
}
