/* ============================================================
   ZENITH RESUME BUILDER PRO — Builder Tool Styles
   Prime Tools Hub | support@primetoolshub.in
   ============================================================
   [DEVELOPER NOTE]:
   This file controls the styles ONLY for builder.html (the app).
   If you want to edit the actual Resume Templates that the user sees 
   in the right panel, look at js/templates.js (the templates are injected).
   ============================================================
   Sections:
     1.  App Layout (Grid)
     2.  Header Controls
     3.  Left Sidebar (Navigation)
     4.  Editor Panel & Forms
     5.  Right Sidebar (Preview)
     6.  Specific Feature UI (Photo, Modals, Tags)
   ============================================================ */

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

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

/* User Request: Fully rounded "circle corner" design for the builder interface */
.builder-page {
  --r-xs: 16px;
  --r-sm: 20px;
  --r-md: 24px;
  --r-lg: 32px;
  --r-xl: 40px;
  --r-2xl: 48px;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow: hidden; /* prevent body scroll — panels scroll internally */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   -- APP HEADER --
   Sticky glassmorphic top bar with logo + action controls
   ============================================================ */

.app-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.25rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 1px 24px rgba(0, 0, 0, 0.40);
}

/* Logo */
.app-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  text-decoration: none;
  flex-shrink: 0;
}

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

.app-logo svg,
.app-logo .logo-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

/* Header right action group */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* -- Autosave Badge -- */
.autosave-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.25rem 0.6rem;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  background: var(--bg-glass-light);
  transition: color var(--t-fast);
  white-space: nowrap;
}

.autosave-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
  flex-shrink: 0;
  animation: pulse-dot 2.5s ease-in-out infinite;
}

.autosave-badge.saving .dot {
  background: var(--warning);
  box-shadow: 0 0 6px var(--warning);
  animation: none;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

/* ============================================================
   -- STRENGTH METER (App Header) --
   Thin animated bar + percentage text shown in header
   Color: Red 0-40% | Yellow 40-70% | Green 70-100%
   ============================================================ */

.strength-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 260px; /* Made it significantly longer! */
}

.strength-bar-track {
  flex: 1;
  height: 8px; /* Thicker like landing page */
  border-radius: var(--r-full);
  background: var(--bg-surface); /* Darker contrast */
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

.strength-bar-fill {
  height: 100%;
  border-radius: var(--r-full);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.6s ease,
              box-shadow 0.6s ease;
  min-width: 4px;
}

/* Beautiful gradients matching the landing page style */
.strength-bar-fill[data-level="low"]  { background: linear-gradient(90deg, #ef4444, #f59e0b); box-shadow: 0 0 10px rgba(239,68,68,0.4); }
.strength-bar-fill[data-level="mid"]  { background: linear-gradient(90deg, #f59e0b, #84cc16); box-shadow: 0 0 10px rgba(245,158,11,0.4); }
.strength-bar-fill[data-level="high"] { background: linear-gradient(90deg, #f59e0b, #10b981); box-shadow: 0 0 12px rgba(16,185,129,0.5); }

.strength-pct {
  font-size: 0.85rem;
  font-weight: 800;
  min-width: 40px;
  text-align: right;
  transition: color var(--t-fast);
}

.strength-pct[data-level="low"]  { color: #ef4444; }
.strength-pct[data-level="mid"]  { color: #f59e0b; }
.strength-pct[data-level="high"] { color: #10b981; }

/* ============================================================
   -- HEADER BUTTONS (shared small icon buttons) --
   ============================================================ */

.hdr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
  transition: all var(--t-fast);
  white-space: nowrap;
  line-height: 1;
}

.hdr-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.hdr-btn:active { transform: translateY(0); scale: 0.96; }

.hdr-btn svg { width: 14px; height: 14px; flex-shrink: 0; transition: transform var(--t-fast); }
.hdr-btn:hover svg { transform: scale(1.1); }

/* Primary "Save" / "PDF" buttons */
.hdr-btn--primary {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3), inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.hdr-btn--primary:hover {
  background: linear-gradient(135deg, #b86bf8, #f065a9);
  box-shadow: 0 8px 25px rgba(236, 72, 153, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.4);
  border-color: transparent;
  color: #fff;
  transform: translateY(-2px) scale(1.02);
}

/* Danger button (Clear) */
.hdr-btn--danger {
  border-color: rgba(239, 68, 68, 0.25);
  color: var(--danger);
}
.hdr-btn--danger:hover {
  background: rgba(239, 68, 68, 0.10);
  border-color: rgba(239, 68, 68, 0.45);
  color: #f87171;
}

/* Icon-only buttons */
.hdr-btn--icon {
  padding: 0.4rem;
  width: 34px;
  height: 34px;
}

/* ============================================================
   -- APP LAYOUT --
   2-column grid: Editor (40%) | Preview (60%)
   ============================================================ */

.app-layout {
  display: grid;
  grid-template-columns: 40% 60%;
  height: calc(100vh - 56px);
  overflow: hidden;
}

/* ============================================================
   -- EDITOR PANEL --
   Left column: tab nav + scrollable form content
   ============================================================ */

.editor-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-right: 1px solid var(--border);
  background: var(--bg-surface);
  overflow: hidden;
}

/* Editor scrollable content */
.editor-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.25rem 1rem 2rem;
  scroll-behavior: smooth;
}

/* Custom scrollbar for editor */
.editor-content::-webkit-scrollbar {
  width: 5px;
}
.editor-content::-webkit-scrollbar-track {
  background: transparent;
}
.editor-content::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--r-full);
}
.editor-content::-webkit-scrollbar-thumb:hover {
  background: var(--border-brand);
}

/* Section Panels (hide inactive tabs) */
.sec-panel {
  display: none;
  animation: fadeIn var(--t-base);
}

.sec-panel.active {
  display: block;
}

/* ============================================================
   -- SECTION TABS (.sec-tabs) --
   Horizontal pill tabs, scrollable, active = gradient + glow
   ============================================================ */

.sec-tabs {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.6rem 0.75rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  scrollbar-width: none; /* Firefox */
  flex-shrink: 0;
  cursor: grab;
}

.sec-tabs:active {
  cursor: grabbing;
}

.sec-tabs.dragging {
  cursor: grabbing;
  user-select: none;
  scroll-behavior: auto;
}

.sec-tabs.dragging * {
  pointer-events: none;
}

.sec-tabs::-webkit-scrollbar { display: none; }

.sec-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.02);
  transition: all var(--t-fast);
  line-height: 1;
}

.sec-tab:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  transform: translateY(-1px);
}

.sec-tab.active {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.sec-tab svg { width: 13px; height: 13px; flex-shrink: 0; }

/* ============================================================
   -- FORM BLOCK (.form-block) --
   Glassmorphic card wrapping each form section
   ============================================================ */

.form-block {
  background: var(--bg-glass-light);
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  padding: 1rem;
  margin-bottom: 1rem;
  transition: border-color var(--t-base);
}

.form-block:hover {
  border-color: var(--border-strong);
}

/* Form block header: icon + label */
.form-block-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.875rem;
}

.form-block-header .block-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--r-xs);
  background: linear-gradient(135deg, rgba(139,92,246,0.20), rgba(236,72,153,0.20));
  border: 1px solid var(--border-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.form-block-header .block-icon svg {
  width: 14px;
  height: 14px;
  color: var(--brand);
}

.form-block-header .block-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.70rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Visibility toggle button in header */
.vis-toggle-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  margin-left: auto;
  transition: all 0.3s ease;
}

.vis-toggle-btn:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.4);
  color: #fff;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
  transform: scale(1.05);
}

.vis-toggle-btn i {
  font-size: 0.85rem;
}

.vis-toggle-btn.is-hidden {
  color: var(--text-faint);
  background: transparent;
  border-style: dashed;
}

/* ============================================================
   -- FORM GRID (.form-grid) --
   2-column responsive grid for form fields
   ============================================================ */

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

.form-grid .field--full {
  grid-column: 1 / -1;
}

/* Single column override */
.form-grid--1col {
  grid-template-columns: 1fr;
}

/* ============================================================
   -- FIELD (.field) --
   Label + Input stacked vertically
   ============================================================ */

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

.field label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  user-select: none;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  padding: 0.65rem 1rem;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
  color-scheme: dark;
}

/* Make date picker icon pinkish and bright */
.field input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: invert(0.6) sepia(1) saturate(5) hue-rotate(270deg) brightness(1.2);
  opacity: 0.8;
  transition: all var(--t-fast);
}

.field input[type="date"]:hover::-webkit-calendar-picker-indicator,
.field input[type="date"]:focus::-webkit-calendar-picker-indicator {
  opacity: 1;
  filter: invert(0.6) sepia(1) saturate(6) hue-rotate(270deg) brightness(1.5);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-faint);
}

.field input:hover,
.field textarea:hover,
.field select:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--brand);
  background: rgba(139, 92, 246, 0.08);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.25), inset 0 1px 2px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

/* ============================================================
   -- INPUT WITH ICON (.input-icon-wrap) --
   ============================================================ */

.input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-icon-wrap .input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
  transition: color var(--t-fast);
  z-index: 2;
}

.input-icon-wrap input {
  padding-left: 2.8rem !important; /* Make room for the absolute icon */
}

/* Glow icon when input inside wrap is focused */
.input-icon-wrap:focus-within .input-icon {
  color: var(--brand);
}

/* Textarea */
.field textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.55;
}

/* Select arrow */
.field select {
  background-image: none; /* We use the font-awesome icon instead */
  padding-right: 2.5rem;
  cursor: pointer;
}

.select-wrap {
  position: relative;
  width: 100%;
}

.select-wrap select.field-input {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
}

.select-wrap .select-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none; /* Crucial: lets clicks pass to select */
  color: var(--text-faint);
  font-size: 0.85rem;
  transition: color var(--t-fast);
}

.select-wrap:focus-within .select-icon,
.select-wrap:hover .select-icon {
  color: var(--brand);
}

.field select option {
  background: var(--bg-elevated);
  color: var(--text);
}

/* Field hint text */
.field-hint {
  font-size: 0.68rem;
  color: var(--text-faint);
  margin-top: 0.15rem;
}

/* Field with error state */
.field--error input,
.field--error textarea,
.field--error select {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.field-error-msg {
  font-size: 0.68rem;
  color: var(--danger);
  margin-top: 0.15rem;
}

/* ============================================================
   -- REPEAT CARDS (.repeat-card) --
   Expandable/collapsible accordion for experience, education,
   projects entries. Smooth animation on expand/collapse.
   ============================================================ */

.repeat-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.repeat-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.02);
  margin-bottom: 1rem; /* FIX: Added proper gap between cards */
}

.repeat-card:last-child {
  margin-bottom: 0;
}

.repeat-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
}

.repeat-card.card-open {
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3), inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 0 0 1px rgba(139, 92, 246, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

/* Card header (always visible) */
.repeat-card-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  cursor: pointer;
  user-select: none;
  transition: background var(--t-fast);
}

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

.drag-handle {
  color: var(--text-faint);
  cursor: grab;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: color var(--t-fast);
}

.drag-handle:hover {
  color: var(--text-muted);
}

.drag-handle:active { cursor: grabbing; }

.card-title {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.repeat-card.card-open .card-title {
  color: #fff;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

/* Toggle chevron */
.card-toggle-btn, .card-delete-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--r-xs);
  background: transparent;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  transition: all var(--t-fast);
}

.card-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.repeat-card.card-open .card-toggle-btn {
  transform: rotate(180deg);
}

.card-delete-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

/* Card body (collapsible) */
.repeat-card-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.repeat-card.card-open .repeat-card-body {
  grid-template-rows: 1fr;
}

.repeat-card-body > .form-grid {
  overflow: hidden;
  padding: 0 1rem;
}

.repeat-card.card-open .repeat-card-body > .form-grid {
  padding: 0 1rem 1rem;
}

/* ============================================================
   -- REPEAT CARD ACTION BUTTONS & VERBS --
   ============================================================ */

.verb-suggestion-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin-bottom: 1rem;
}

.verb-bar-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.verb-bar-label i {
  color: var(--brand);
}

.verb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex: 1;
}

.verb-chip {
  padding: 0.3rem 0.8rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
}

.verb-chip:hover {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

.btn-add-item, .btn-bullet-improver {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.8rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin-top: 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  color: var(--text-muted);
  backdrop-filter: blur(8px);
}

.btn-add-item i, .btn-bullet-improver i {
  transition: transform var(--t-fast);
}

.btn-add-item:hover, .btn-bullet-improver:hover {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.4);
  color: var(--brand);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-add-item:hover i, .btn-bullet-improver:hover i {
  transform: scale(1.2);
}

.btn-bullet-improver {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.08);
}

.btn-bullet-improver:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(236, 72, 153, 0.15));
  color: #fff;
  border-color: rgba(236, 72, 153, 0.4);
}

/* ============================================================
   -- SKILL TAGS (.skill-tag) --
   Pill-shaped chips with X remove button, gradient-tinted
   ============================================================ */

.skill-input-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  min-height: 54px;
  background: rgba(11, 17, 32, 0.4);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-md);
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
  margin-bottom: 1.2rem; /* FIX: Added gap between input and tags */
  position: relative;
}

.skill-input-wrap:focus-within {
  border-color: rgba(139, 92, 246, 0.6);
  background: rgba(11, 17, 32, 0.6);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15), inset 0 2px 4px rgba(0,0,0,0.2);
}

.skill-input-wrap .input-icon-wrap {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.6rem 0.8rem;
}

/* The container for tags */
.skill-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  min-height: 48px;
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.6rem 0.35rem 0.9rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.85), rgba(236, 72, 153, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: tag-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

@keyframes tag-pop {
  from { transform: scale(0.5) translateY(15px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

.skill-tag:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 20px rgba(236, 72, 153, 0.4);
  background: linear-gradient(135deg, #a855f7, #ec4899);
  border-color: rgba(255, 255, 255, 0.4);
}

.skill-remove-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  border: none;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
  padding: 0;
}

.skill-remove-btn:hover {
  background: #ef4444;
  color: #fff;
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
}

.skill-remove-btn i,
.skill-remove-btn svg { width: 10px; height: 10px; font-size: 10px; }

/* Skill input inside wrap */
#skillInput {
  flex: 1;
  min-width: 140px;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: 'Outfit', sans-serif;
  padding: 0.4rem 0.5rem;
}

#skillInput::placeholder { color: rgba(255,255,255,0.3); font-weight: 400; }

/* ============================================================
   -- RELATED SKILLS SUGGESTIONS --
   ============================================================ */
.skill-related-box {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--r-md);
  transition: all 0.3s ease;
}

.skill-related-box.hidden {
  display: none !important;
}

.skill-related-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.skill-related-label i,
.skill-related-label svg {
  color: rgba(139, 92, 246, 0.8);
}

.skill-related-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.skill-related-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 0.35rem 0.8rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: inherit;
  display: inline-flex;
  align-items: center;
}

.skill-related-chip:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.5);
  color: #fff;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
}
   -- SKILL DROPDOWN (.skill-dropdown) --
   Autocomplete suggestions beneath skill input
   ============================================================ */

.skill-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--r-md);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(139, 92, 246, 0.1);
  z-index: 100;
  overflow: hidden;
  max-height: 250px;
  overflow-y: auto;
  animation: dropdown-in 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
}

.skill-dropdown.hidden {
  display: none !important;
}

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

.skill-dropdown::-webkit-scrollbar { width: 6px; }
.skill-dropdown::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.4);
  border-radius: var(--r-full);
}

.skill-dropdown-item {
  box-sizing: border-box;
  width: 100% !important;
  min-width: 100%;
  padding: 1rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: block !important;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.skill-dropdown-item:last-child {
  border-bottom: none;
}

.skill-dropdown-item:hover,
.skill-dropdown-item.is-highlighted {
  background: rgba(139, 92, 246, 0.25);
  color: #fff;
  padding-left: 1.6rem;
}

.skill-dropdown-item .match-highlight {
  color: #fff;
  font-weight: 700;
}

/* Skills container wrapper (for dropdown positioning) */
.skills-field-wrap {
  position: relative;
}

/* ============================================================
   -- VERB CHIPS (.verb-chip) --
   Action verb suggestion buttons for experience bullets
   ============================================================ */

.verb-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.verb-chip {
  padding: 0.22rem 0.55rem;
  border-radius: var(--r-full);
  font-size: 0.71rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-muted);
  background: var(--bg-glass-light);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast),
              border-color var(--t-fast), transform var(--t-fast);
  line-height: 1.2;
}

.verb-chip:hover {
  background: rgba(139, 92, 246, 0.14);
  border-color: var(--border-brand);
  color: var(--brand);
  transform: translateY(-1px);
}

.verb-chips-label {
  font-size: 0.68rem;
  color: var(--text-faint);
  margin-bottom: 0.25rem;
  font-style: italic;
}

/* ============================================================
   -- PHOTO SECTION (.photo-row / .photo-preview) --
   Circular avatar with camera overlay + toggles
   ============================================================ */

.photo-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.photo-preview-wrap {
  position: relative;
  flex-shrink: 0;
  width: max-content;
  height: max-content;
  display: inline-block;
}

.photo-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3), 0 0 0 4px rgba(139, 92, 246, 0.05);
  backdrop-filter: blur(8px);
}

.photo-preview:hover {
  border-color: #a855f7;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3), 0 0 0 4px rgba(139, 92, 246, 0.25), 0 4px 15px rgba(139, 92, 246, 0.3);
  transform: translateY(-2px) scale(1.02);
}

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

.photo-preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.photo-preview-empty svg { width: 22px; height: 22px; color: var(--text-faint); }
.photo-preview-empty span { font-size: 0.58rem; color: var(--text-faint); }

/* Camera overlay button */
.photo-edit-btn {
  position: absolute;
  bottom: 0px;
  right: -4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  border: 2.5px solid #0b1120;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4), inset 0 1px 2px rgba(255, 255, 255, 0.3);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  z-index: 3;
}

.photo-edit-btn:hover {
  transform: scale(1.15) rotate(5deg);
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.4);
  background: linear-gradient(135deg, #b86bf8, #f065a9);
}

.photo-edit-btn svg, .photo-edit-btn i { width: 12px; height: 12px; font-size: 12px; }

.photo-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-top: 0.25rem;
}

/* ============================================================
   -- TOGGLE SWITCH (.toggle-switch) --
   Custom styled checkbox toggle
   ============================================================ */

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: flex-start; /* FIX: Keep switch and label close together */
  gap: 0.85rem;
  margin-top: 0.2rem;
}

.toggle-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  user-select: none;
  cursor: pointer;
  transition: color var(--t-fast);
}

.toggle-label:hover {
  color: #fff;
}

.toggle-switch {
  position: relative;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-track {
  position: absolute;
  inset: 0;
  border-radius: var(--r-full);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  cursor: pointer;
  transition: background var(--t-base), border-color var(--t-base),
              box-shadow var(--t-base);
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-faint);
  transition: transform var(--t-base), background var(--t-base);
}

.toggle-switch input:checked + .toggle-track {
  background: var(--gradient);
  border-color: transparent;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.40);
}

.toggle-switch input:checked + .toggle-track::after {
  transform: translateX(16px);
  background: #fff;
}

.toggle-switch input:focus + .toggle-track {
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
}

/* ============================================================
   -- DESIGN TAB --
   Template grid, color swatches, font buttons,
   spacing controls, scale slider, section order list
   ============================================================ */

/* Template Grid */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.tpl-card {
  position: relative;
  border-radius: var(--r-md);
  border: 2px solid rgba(255, 255, 255, 0.05);
  background: rgba(11, 17, 32, 0.4);
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
}

.tpl-card:hover {
  background: rgba(255, 255, 255, 0.03);
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(139, 92, 246, 0.1);
}

.tpl-card.active {
  border-color: var(--brand);
  background: rgba(139, 92, 246, 0.08);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.25), inset 0 0 0 1px rgba(139, 92, 246, 0.4);
}

/* Active check badge */
.tpl-card.active::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(139,92,246,0.5);
}

/* Thumbnail Area */
.tpl-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 0.75;
  background: #ffffff;
  padding: 12%;
  box-sizing: border-box;
  overflow: hidden;
  pointer-events: none;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.tpl-card:hover .tpl-thumb {
  opacity: 0.9;
}

/* Miniature Visual Representations */
.tpl-thumb-name { font-size: 8px; font-weight: 800; color: #1e293b; margin-bottom: 6px; text-transform: uppercase; line-height: 1.1; }
.tpl-thumb-section { font-size: 5px; font-weight: 700; color: #64748b; margin-bottom: 3px; letter-spacing: 0.5px; }
.tpl-thumb-line { width: 100%; height: 2px; background: #cbd5e1; margin-bottom: 6px; }
.tpl-thumb-bar { width: 100%; height: 5px; background: #3b82f6; margin-bottom: 6px; }
.tpl-thumb-row { width: 85%; height: 3px; background: #e2e8f0; margin-bottom: 3px; border-radius: 2px; }
.tpl-thumb-mono { font-size: 4px; font-weight: 500; color: #475569; text-align: center; margin-bottom: 6px; letter-spacing: 1px; }

.tpl-thumb-tech .tpl-thumb-name { text-align: center; font-family: monospace; }
.tpl-thumb-harvard .tpl-thumb-name { text-transform: none; color: #0f172a; }

/* Elegant Executive layout */
.tpl-thumb-executive { display: flex; padding: 0; background: #f8fafc; }
.tpl-thumb-executive .tpl-thumb-sidebar { width: 32%; height: 100%; background: #1e293b; }
.tpl-thumb-executive .tpl-thumb-main { width: 68%; padding: 12%; }

/* Info Section (Name & Badge) */
.tpl-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: rgba(11, 17, 32, 0.6);
  flex-grow: 1;
}

.tpl-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f8fafc;
  letter-spacing: 0.02em;
}

.tpl-badge {
  font-size: 0.65rem;
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  padding: 3px 8px;
  border-radius: var(--r-full);
  align-self: flex-start;
  font-weight: 600;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.tpl-badge.new {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.2);
}

/* Color Swatches */
.design-subsection {
  margin-bottom: 1rem;
}

.design-sublabel {
  font-size: 0.70rem;
  font-weight: 600;
  color: var(--text-faint);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  padding: 0.4rem 0;
}

.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2), inset 0 0 0 1px rgba(255,255,255,0.1);
}

.color-swatch:hover {
  transform: scale(1.15) translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(255,255,255,0.2);
}

/* Premium Ring Effect for Active Color */
.color-swatch.active,
.color-swatch.is-active {
  transform: scale(1.15);
  box-shadow: 0 0 0 3px #1e293b, 
              0 0 0 5px rgba(255,255,255,0.9),
              0 4px 15px rgba(0,0,0,0.5);
}

/* For the custom color picker swatch */
.color-custom-swatch {
  background: var(--bg-glass-light);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(255,255,255,0.3);
}
.color-custom-swatch:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.1);
}

/* Font Buttons */
.font-buttons,
.font-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0.2rem 0;
}

.font-btn {
  padding: 0.5rem 1.2rem;
  border-radius: var(--r-md);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  letter-spacing: 0.02em;
}

.font-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.font-btn.active,
.font-btn.is-active {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.25), inset 0 0 0 1px rgba(139, 92, 246, 0.3);
  transform: translateY(-2px);
}

/* Segmented Control (.seg-ctrl) — spacing / size options */
.seg-ctrl {
  display: flex;
  background: rgba(11, 17, 32, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-md);
  padding: 0.3rem;
  gap: 0.3rem;
  width: 100%;
}

.seg-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 0.2rem;
  border-radius: calc(var(--r-md) - 2px);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  letter-spacing: 0.02em;
}

.seg-btn i {
  color: var(--text-faint);
  transition: all 0.3s ease;
}

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

.seg-btn:hover i {
  color: var(--text-secondary);
}

.seg-btn.active,
.seg-btn.is-active {
  background: rgba(139, 92, 246, 0.15);
  color: #fff;
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.seg-btn.active i,
.seg-btn.is-active i {
  color: #a78bfa; /* Light purple */
}

/* Auto Fit Button & Alert */
.auto-fit-btn {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 0.25rem 0.6rem;
  border-radius: var(--r-sm);
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.15);
}

.auto-fit-btn:hover {
  background: rgba(139, 92, 246, 0.25);
  color: #fff;
  border-color: rgba(139, 92, 246, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.auto-fit-btn:active {
  transform: scale(0.95);
}

.scale-alert {
  margin-top: 0.8rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--success-light);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
  transition: all 0.3s ease;
}

.scale-alert.danger {
  background: var(--danger-light);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.2);
}

/* Scale Slider */
.scale-slider-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.scale-slider-wrap span {
  font-size: 0.72rem;
  color: var(--text-muted);
  min-width: 28px;
  text-align: center;
}

input[type="range"].scale-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: var(--r-full);
  background: linear-gradient(to right,
    var(--brand) 0%,
    var(--brand) var(--val, 50%),
    var(--bg-elevated) var(--val, 50%),
    var(--bg-elevated) 100%);
  outline: none;
  cursor: pointer;
  transition: background var(--t-fast);
}

input[type="range"].scale-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--brand);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.50);
  cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}

input[type="range"].scale-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.70);
}

input[type="range"].scale-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--brand);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.50);
}

/* Section Order List (draggable) */
.header-sub {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  padding: 4px 10px;
  border-radius: var(--r-full);
  margin-left: 12px;
  vertical-align: middle;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.section-order-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.section-order-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--r-sm);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: grab;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.section-order-item:hover {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.section-order-item.sortable-ghost {
  opacity: 0.4;
  background: rgba(139, 92, 246, 0.05) !important;
  border: 1px dashed var(--brand, #8b5cf6) !important;
  transform: none !important;
  box-shadow: none !important;
}

.section-order-item.sortable-drag {
  cursor: grabbing !important;
  background: rgba(139, 92, 246, 0.15) !important;
  border-color: var(--brand, #8b5cf6) !important;
  box-shadow: 0 12px 32px rgba(139, 92, 246, 0.3) !important;
  transform: scale(1.02) !important;
  backdrop-filter: blur(8px);
}

.section-order-item:active { cursor: grabbing; }

.section-order-item .drag-handle {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.section-order-item:hover .drag-handle {
  color: var(--brand-light, #a78bfa);
}

.section-order-item .drag-handle svg { width: 16px; height: 16px; }

.section-order-item .order-label {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.3px;
  transition: color 0.2s;
}

.section-order-item .list-eye-btn {
  background: transparent;
  border: none;
  color: var(--text-faint);
  font-size: 0.85rem;
  padding: 4px 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: var(--r-xs);
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-order-item .list-eye-btn:hover {
  color: var(--brand-light, #a78bfa);
  background: rgba(139, 92, 246, 0.15);
}

.section-order-item.hidden-state {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.04);
}

.section-order-item.hidden-state .order-label {
  text-decoration: line-through;
  color: var(--text-faint);
}

.section-order-item.hidden-state .list-eye-btn i {
  color: #ef4444;
}

.section-order-item .order-toggle {
  /* re-use toggle-switch mini version */
}

/* ============================================================
   -- ATS TAB --
   ATS Score ring, checklist, strength, platform modes, JD matcher
   ============================================================ */

/* ATS Score Layout */
.ats-score-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 1.5rem;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--r-md);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ats-score-layout:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 0 15px rgba(139, 92, 246, 0.1);
}

.ats-ring-container {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

.ats-ring-svg {
  position: absolute;
  inset: 0;
  width: 120px;
  height: 120px;
  transform: rotate(-90deg);
  overflow: visible;
}

.ats-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.03);
  stroke-width: 8;
}

.ats-ring-fg {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 301.6; /* 2 * pi * 48 */
  stroke-dashoffset: 301.6;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ats-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.ats-score-num {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.ats-score-label {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}

.ats-grade-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ats-grade-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 1rem;
  background: rgba(139, 92, 246, 0.1);
  color: #c084fc;
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 20px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
  width: fit-content;
}

.ats-grade-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

/* ATS Checklist */
.ats-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ats-check-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.ats-check-item:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ats-check-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ats-check-icon--pass {
  background: rgba(16, 185, 129, 0.18);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.ats-check-icon--fail {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.30);
}

.ats-check-icon--warn {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.30);
}

.ats-check-icon svg { width: 10px; height: 10px; }

.ats-check-text {
  flex: 1;
  font-size: 0.77rem;
  color: var(--text-secondary);
}

.ats-check-item.pass .ats-check-text { color: var(--text-secondary); }
.ats-check-item.fail .ats-check-text { color: var(--danger); }

/* Platform Mode Toggle */
.platform-intro {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.2rem;
  padding: 0.5rem 0;
}

.platform-toggle {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.platform-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--r-full);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.platform-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.platform-btn.active {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
  transform: translateY(-1px);
}

.platform-tips {
  padding: 1rem;
  background: rgba(139, 92, 246, 0.05);
  border-left: 3px solid #c084fc;
  border-radius: 0 8px 8px 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 1rem;
}

.platform-tips strong {
  color: #c084fc;
  display: block;
  margin-bottom: 0.3rem;
}

/* JD Matcher Premium Styles */
.jd-input-wrap {
  position: relative;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.4);
  padding: 2px;
  background-clip: padding-box;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.premium-textarea {
  width: 100%;
  background: transparent;
  border: none;
  color: #fff;
  padding: 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
}

.premium-textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.premium-textarea:focus {
  background: rgba(139, 92, 246, 0.05);
}

.jd-input-wrap:focus-within {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2), inset 0 2px 10px rgba(0, 0, 0, 0.2);
}

.btn-neon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: var(--r-md);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.5px;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
  background-size: 200% auto;
  border: none;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}

.btn-neon:hover {
  background-position: right center;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(168, 85, 247, 0.6);
}

.btn-neon:active {
  transform: translateY(1px);
}

.platform-btn svg { width: 13px; height: 13px; }

/* JD Keyword Matcher */
.jd-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.80rem;
  padding: 0.6rem 0.75rem;
  resize: vertical;
  min-height: 90px;
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  line-height: 1.55;
}

.jd-textarea::placeholder { color: var(--text-faint); }

.jd-textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}

.jd-results {
  margin-top: 0.75rem;
}

.jd-results-label {
  font-size: 0.70rem;
  color: var(--text-faint);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.jd-keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.jd-keyword {
  padding: 0.20rem 0.5rem;
  border-radius: var(--r-full);
  font-size: 0.72rem;
  font-weight: 500;
  border: 1px solid;
}

.jd-keyword--found {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: var(--success);
}

.jd-keyword--missing {
  background: rgba(239, 68, 68, 0.10);
  border-color: rgba(239, 68, 68, 0.28);
  color: #f87171;
}

/* ============================================================
   -- EXPORT TAB --
   Export list cards for PDF, Print, JSON, Text + Import section
   ============================================================ */

.export-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.export-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--r-xs);
  background: var(--bg-glass-light);
  border: 1px solid var(--border);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--text);
  transition: background var(--t-fast), border-color var(--t-fast),
              box-shadow var(--t-fast), transform var(--t-fast);
  width: 100%;
}

.export-item:hover {
  background: var(--bg-hover);
  border-color: var(--border-brand);
  box-shadow: var(--shadow-brand);
  transform: translateX(4px);
}

.export-item-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-xs);
  background: linear-gradient(135deg, rgba(139,92,246,0.18), rgba(236,72,153,0.12));
  border: 1px solid var(--border-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.export-item-icon svg { width: 18px; height: 18px; color: var(--brand); }

.export-item-text { flex: 1; }

.export-item-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.1rem;
}

.export-item-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.export-item-arrow {
  color: var(--text-faint);
  transition: color var(--t-fast), transform var(--t-fast);
}

.export-item:hover .export-item-arrow {
  color: var(--brand);
  transform: translateX(3px);
}

.export-item-arrow svg { width: 14px; height: 14px; }

/* Import section */
.import-zone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--r-xs);
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.import-zone:hover {
  border-color: var(--border-brand);
  background: rgba(139, 92, 246, 0.05);
}

.import-zone.is-drag-over {
  border-color: var(--brand);
  background: rgba(139, 92, 246, 0.10);
  box-shadow: 0 0 0 4px rgba(139,92,246,0.12);
}

.import-zone svg { width: 28px; height: 28px; color: var(--text-faint); }
.import-zone p { font-size: 0.78rem; color: var(--text-muted); }
.import-zone span { font-size: 0.70rem; color: var(--text-faint); }

/* ============================================================
   -- PREVIEW PANEL (.preview-panel) --
   Right column: toolbar + scrollable dark preview area
   ============================================================ */

.preview-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: #050810;
}

/* Preview toolbar */
.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 0.75rem;
}

.preview-toolbar-left,
.preview-toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.preview-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Preview scroll area */
.preview-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: auto;
  padding: 2rem 1.5rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(139,92,246,0.06) 0%, transparent 70%),
    #050810;
}

.preview-scroll::-webkit-scrollbar { width: 6px; height: 6px; }
.preview-scroll::-webkit-scrollbar-track { background: transparent; }
.preview-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08);
  border-radius: var(--r-full);
}
.preview-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.14);
}

.preview-scale-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}

/* ============================================================
   -- RESUME SHEET (.resume-sheet) --
   White A4 paper floating in dark room with shadow glow
   ============================================================ */

.resume-sheet {
  width: 210mm;
  min-height: 297mm;
  background: #ffffff;
  color: #1a1a1a;
  border-radius: 2px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.05),
    0 8px 32px rgba(0,0,0,0.60),
    0 32px 80px rgba(0,0,0,0.50),
    0 0 60px rgba(139,92,246,0.08);
  position: relative;
  transition: box-shadow var(--t-base);
  flex-shrink: 0;
}

/* Scale the content inside the paper, not the paper itself */
.resume-sheet > div {
  zoom: var(--content-scale, 1);
}

/* ============================================================
   -- EMPTY STATE (When resume has no data) --
   ============================================================ */
.resume-empty {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  background: radial-gradient(circle at center, rgba(139, 92, 246, 0.04) 0%, transparent 60%);
  border-radius: 2px;
}

.resume-empty-icon {
  font-size: 4rem;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #a78bfa, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.9;
  filter: drop-shadow(0 8px 16px rgba(139, 92, 246, 0.25));
  animation: floatEmptyIcon 3s ease-in-out infinite;
}

.resume-sheet .resume-empty p {
  font-size: 1.5rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 12px;
  line-height: 1.4;
  text-transform: none;
}

.resume-sheet .resume-empty span {
  font-size: 1.05rem;
  color: #94a3b8;
  font-weight: 400;
  display: block;
  max-width: 320px;
  margin: 0 auto;
}

@keyframes floatEmptyIcon {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
  100% { transform: translateY(0px); }
}

/* Reset typography colors for white paper inside dark mode app */
.resume-sheet h1,
.resume-sheet h2,
.resume-sheet h3,
.resume-sheet h4,
.resume-sheet h5,
.resume-sheet h6 {
  color: #111111;
}

.resume-sheet p,
.resume-sheet span,
.resume-sheet div,
.resume-sheet li,
.resume-sheet strong {
  color: inherit;
}

.resume-sheet a {
  color: var(--brand, #000);
}

/* ============================================================
   -- TEMPLATE: Classic India --
   ============================================================ */
.tpl-classic-india {
  padding: 12mm 15mm;
  font-size: 10pt;
  line-height: 1.5;
  color: #222;
}

.tpl-classic-india h1,
.tpl-classic-india h2,
.tpl-classic-india h3 {
  margin: 0;
  line-height: 1.2;
}

.tc-header {
  text-align: left;
  margin-bottom: 4mm;
}

.tc-header h1 {
  font-size: 24pt;
  color: var(--c, #8b5cf6);
  margin-bottom: 1.5mm;
  letter-spacing: -0.5px;
}

.tc-title {
  font-size: 12pt;
  font-weight: 600;
  color: #444;
  margin-bottom: 2mm;
}

.tc-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 3mm;
  font-size: 9pt;
  color: #555;
}

.tc-contact span {
  display: inline-flex;
  align-items: center;
  gap: 1.5mm;
}

.tc-line {
  height: 1px;
  background: #ccc;
  margin: 4mm 0;
}

.tc-section {
  margin-bottom: 6mm;
}

.tc-section h2 {
  font-size: 14pt;
  color: #111;
  border-bottom: 2px solid var(--c, #8b5cf6);
  padding-bottom: 1.5mm;
  margin-bottom: 3mm;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tc-item {
  margin-bottom: 4mm;
}

.tc-item:last-child {
  margin-bottom: 0;
}

.tc-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1mm;
}

.tc-item-header strong {
  font-size: 11pt;
  color: #111;
}

.tc-item-header span {
  font-size: 9.5pt;
  font-weight: 600;
  color: var(--c, #8b5cf6);
}

.tc-item-sub {
  display: flex;
  justify-content: space-between;
  font-size: 10pt;
  color: #444;
  font-style: italic;
  margin-bottom: 1.5mm;
}

.tc-bullets ul {
  margin: 0;
  padding-left: 5mm;
  list-style-type: disc;
}

.tc-bullets li {
  margin-bottom: 1mm;
  font-size: 9.5pt;
  color: #333;
}

/* Harvard Template Bullets */
.th-bullets ul {
  padding-left: 5mm;
  margin: 1mm 0 0 0;
  list-style-type: disc;
}
.th-bullets li {
  margin-bottom: 0.5mm;
  line-height: 1.5;
}

/* Tech Minimal Template Bullets */
.tm-bullets ul {
  padding-left: 5mm;
  margin: 1mm 0 0 0;
  list-style-type: disc;
}
.tm-bullets li {
  margin-bottom: 0.5mm;
  line-height: 1.6;
}

/* Elegant Executive Template Bullets */
.te-bullets ul {
  padding-left: 5mm;
  margin: 1mm 0 0 0;
  list-style-type: disc;
}
.te-bullets li {
  margin-bottom: 0.5mm;
  line-height: 1.5;
}
.te-sidebar .te-bullets li {
  color: rgba(255,255,255,0.8);
}
.te-main .te-bullets li {
  color: #374151;
}

/* Indian Fresher Template Bullets */
.tf-bullets ul {
  padding-left: 5mm;
  margin: 1mm 0 0 0;
  list-style-type: disc;
}
.tf-bullets li {
  margin-bottom: 0.5mm;
  line-height: 1.5;
}

/* Fresh Graduate Template Bullets */
.tfg-bullets ul {
  padding-left: 5mm;
  margin: 1mm 0 0 0;
  list-style-type: disc;
}
.tfg-bullets li {
  margin-bottom: 0.5mm;
  line-height: 1.5;
}

/* Modern Split Template Bullets */
.tms-bullets ul {
  padding-left: 5mm;
  margin: 1mm 0 0 0;
  list-style-type: disc;
}
.tms-bullets li {
  margin-bottom: 0.5mm;
  line-height: 1.6;
}
.tms-sidebar .tms-bullets li {
  color: rgba(255,255,255,0.85);
}

/* Corporate Bold Template Bullets */
.tcb-bullets ul {
  padding-left: 6mm;
  margin: 1mm 0 0 0;
  list-style-type: square;
}
.tcb-bullets li {
  margin-bottom: 1mm;
  line-height: 1.6;
}

/* Minimalist Pro Template Bullets */
.tmp-bullets ul {
  padding-left: 5mm;
  margin: 1mm 0 0 0;
  list-style-type: circle;
}
.tmp-bullets li {
  margin-bottom: 0.5mm;
  line-height: 1.6;
}

/* Creative Spark Template Bullets */
.tcs-bullets ul {
  padding-left: 5mm;
  margin: 1mm 0 0 0;
  list-style-type: disc;
}
.tcs-bullets li {
  margin-bottom: 0.5mm;
  line-height: 1.6;
}

.tc-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5mm;
}

.tc-skill {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 1mm 2mm;
  border-radius: 2px;
  font-size: 9pt;
  color: #222;
}

/* Simulate paper texture subtly */
.resume-sheet::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23noise)' opacity='0.015'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* Page overflow indicator */
.page-overflow-warn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--r-xs);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.30);
  color: var(--warning);
  font-size: 0.72rem;
  font-weight: 500;
  animation: fadeIn 0.3s ease;
  max-width: 210mm;
}

.page-overflow-warn svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Second page separator line */
.page-overflow-line {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 210mm;
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    rgba(239, 68, 68, 0.8) 0px,
    rgba(239, 68, 68, 0.8) 8px,
    transparent 8px,
    transparent 16px
  );
  top: 297mm;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
}

.overflow-badge {
  background: #ef4444;
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* ============================================================
   -- KEYBOARD SHORTCUTS OVERLAY (.shortcuts-overlay) --
   Full-screen dark glassmorphic overlay with shortcut grid
   ============================================================ */

.shortcuts-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(11, 17, 32, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: overlay-in 0.2s ease;
  padding: 1.5rem;
}

@keyframes overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.shortcuts-panel {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-xl);
  box-shadow: 0 25px 80px rgba(0,0,0,0.8),
              0 0 0 1px rgba(139, 92, 246, 0.2),
              0 0 40px rgba(139, 92, 246, 0.15);
  padding: 2rem 2.5rem;
  max-width: 520px;
  width: 100%;
  position: relative;
  overflow: hidden;
  animation: modal-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Glowing ambient background effect */
.shortcuts-panel::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
  z-index: 0;
  pointer-events: none;
  animation: rotate-glow 20s linear infinite reverse;
}

.shortcuts-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t-fast);
  z-index: 10;
}

.shortcuts-close-btn:hover {
  background: #ef4444;
  color: #fff;
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}

.shortcuts-panel h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.shortcuts-panel h2 i {
  color: var(--brand);
  font-size: 1.4rem;
}

.shortcuts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.5rem;
  position: relative;
  z-index: 1;
}

.shortcut-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  gap: 0.75rem;
}

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

.shortcut-keys {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.key-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  font-family: 'Inter', monospace;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  min-width: 22px;
  box-shadow: 0 2px 0 var(--border-strong);
}

.key-plus {
  font-size: 0.65rem;
  color: var(--text-faint);
}

/* ============================================================
   -- BULLET IMPROVER MODAL (.bullet-modal) --
   Modal with before/after textareas + suggestion chips
   ============================================================ */

.bullet-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(11, 17, 32, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: overlay-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bullet-modal {
  position: relative;
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.95), rgba(11, 15, 25, 0.98));
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 28px;
  box-shadow: 0 30px 100px rgba(0,0,0,0.9), 
              inset 0 1px 1px rgba(255,255,255,0.1), 
              0 0 0 1px rgba(168, 85, 247, 0.4),
              0 0 50px rgba(168, 85, 247, 0.15);
  padding: 3rem;
  max-width: 760px;
  width: 100%;
  animation: modal-up 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bullet-modal-header {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-right: 2rem;
}

.bullet-modal-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
  box-shadow: 0 8px 25px rgba(236, 72, 153, 0.4), inset 0 2px 4px rgba(255,255,255,0.3);
}

.bullet-modal-title-wrap h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.bullet-modal-title-wrap p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

.bullet-modal .field label {
  font-size: 0.95rem;
  color: #fff;
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bullet-modal textarea {
  min-height: 140px;
  font-size: 1.05rem;
  padding: 1.2rem 1.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  color: #fff;
  line-height: 1.6;
  box-shadow: inset 0 4px 10px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
}

.bullet-modal textarea:focus {
  background: rgba(168, 85, 247, 0.05);
  border-color: #a855f7;
  box-shadow: inset 0 4px 10px rgba(0,0,0,0.3), 0 0 0 4px rgba(168, 85, 247, 0.2);
}

#bulletImproveBtn {
  background: linear-gradient(135deg, #a855f7, #ec4899) !important;
  border: none !important;
  border-radius: 50px !important;
  padding: 1.2rem !important;
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  color: #fff !important;
  box-shadow: 0 8px 25px rgba(236, 72, 153, 0.4), inset 0 2px 4px rgba(255,255,255,0.2) !important;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2rem !important;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

#bulletImproveBtn:hover {
  transform: translateY(-3px) scale(1.02) !important;
  box-shadow: 0 12px 35px rgba(236, 72, 153, 0.6), inset 0 2px 4px rgba(255,255,255,0.3) !important;
  background: linear-gradient(135deg, #b86bf8, #f065a9) !important;
}

#bulletImproveBtn i {
  font-size: 1.2rem;
}

.bullet-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast);
}

.bullet-modal-close:hover {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  transform: rotate(90deg);
}

.bullet-modal-close svg { width: 14px; height: 14px; }

.bullet-modal-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.bullet-col-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-faint);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.bullet-col-label.after-label { color: var(--success); }

.bullet-textarea {
  width: 100%;
  min-height: 100px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.80rem;
  padding: 0.55rem 0.7rem;
  resize: vertical;
  outline: none;
  line-height: 1.55;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.bullet-textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.18);
}

.bullet-textarea.after-area {
  border-color: rgba(16, 185, 129, 0.30);
  background: rgba(16, 185, 129, 0.04);
}

/* Suggestion chips */
.bullet-suggestions {
  margin-bottom: 1rem;
}

.bullet-suggestions-label {
  font-size: 0.68rem;
  color: var(--text-faint);
  margin-bottom: 0.4rem;
}

.bullet-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.bullet-chip {
  padding: 0.25rem 0.6rem;
  border-radius: var(--r-full);
  font-size: 0.73rem;
  font-family: inherit;
  color: var(--text-muted);
  background: var(--bg-glass-light);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast),
              border-color var(--t-fast);
}

.bullet-chip:hover {
  background: rgba(139,92,246,0.12);
  border-color: var(--border-brand);
  color: var(--brand);
}

.bullet-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* ============================================================
   -- TOAST NOTIFICATIONS --
   Container positioned at bottom-right (shared.css has toast
   animation; we just ensure correct positioning)
   ============================================================ */

.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

/* Individual toast (override / extend from shared.css) */
.toast {
  pointer-events: auto;
  min-width: 240px;
  max-width: 380px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xs);
  padding: 0.7rem 1rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.40), var(--shadow-brand);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.80rem;
  color: var(--text-secondary);
  animation: toast-slide-in 0.3s cubic-bezier(0.34,1.56,0.64,1);
  backdrop-filter: blur(12px);
}

@keyframes toast-slide-in {
  from { opacity: 0; transform: translateX(40px) scale(0.92); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

.toast.hide {
  animation: toast-slide-out 0.25s ease forwards;
}

@keyframes toast-slide-out {
  to { opacity: 0; transform: translateX(40px) scale(0.90); }
}

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

.toast--success { border-left: 3px solid var(--success); }
.toast--success .toast-icon { color: var(--success); }
.toast--error   { border-left: 3px solid var(--danger); }
.toast--error   .toast-icon { color: var(--danger); }
.toast--warn    { border-left: 3px solid var(--warning); }
.toast--warn    .toast-icon { color: var(--warning); }
.toast--info    { border-left: 3px solid var(--brand); }
.toast--info    .toast-icon { color: var(--brand); }

/* ============================================================
   -- CUSTOM CONFIRM MODAL --
   Glassmorphic dark confirmation dialog
   ============================================================ */

.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(11, 17, 32, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: overlay-in 0.25s ease;
}

.confirm-modal {
  position: relative;
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.95), rgba(11, 15, 25, 0.98));
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 28px;
  box-shadow: 0 30px 100px rgba(0,0,0,0.9), 
              inset 0 1px 1px rgba(255,255,255,0.1), 
              0 0 0 1px rgba(239, 68, 68, 0.3),
              0 0 50px rgba(239, 68, 68, 0.15);
  padding: 3.5rem 2.5rem 3rem;
  max-width: 480px;
  width: 100%;
  animation: modal-up 0.4s cubic-bezier(0.34,1.56,0.64,1);
  text-align: center;
}

.confirm-modal-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(185, 28, 28, 0.3));
  border: 1px solid rgba(239, 68, 68, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.3), inset 0 2px 4px rgba(255,255,255,0.2);
  color: #ef4444;
  font-size: 2.2rem;
}

.confirm-modal-icon i,
.confirm-modal-icon svg { width: 32px; height: 32px; color: #ef4444; }

.confirm-modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.8rem;
  letter-spacing: -0.02em;
}

.confirm-modal-msg {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

.confirm-modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.confirm-modal-actions .btn-ghost {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #fff !important;
  padding: 1.1rem 2rem !important;
  font-size: 1.05rem !important;
  font-weight: 600 !important;
  border-radius: 50px !important;
  transition: all 0.3s ease !important;
  flex: 1;
}

.confirm-modal-actions .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

.confirm-modal-actions .btn-danger {
  background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
  border: none !important;
  color: #fff !important;
  padding: 1.1rem 2rem !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  border-radius: 50px !important;
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4), inset 0 2px 4px rgba(255,255,255,0.2) !important;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  flex: 1;
}

.confirm-modal-actions .btn-danger:hover {
  transform: translateY(-3px) scale(1.02) !important;
  box-shadow: 0 12px 35px rgba(239, 68, 68, 0.6), inset 0 2px 4px rgba(255,255,255,0.3) !important;
  background: linear-gradient(135deg, #f87171, #dc2626) !important;
}

/* ============================================================
   -- GUIDE MODAL (.guide-modal-overlay) --
   Full screen overlay with 4-step tutorial grid
   ============================================================ */

.guide-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(11, 17, 32, 0.90);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: overlay-in 0.22s ease;
}

.guide-modal {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-xl);
  box-shadow: 0 25px 80px rgba(0,0,0,0.8),
              0 0 0 1px rgba(139, 92, 246, 0.2),
              0 0 40px rgba(139, 92, 246, 0.15);
  padding: 3rem;
  max-width: 800px;
  width: 100%;
  position: relative;
  overflow: hidden;
  animation: modal-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Glowing ambient background effect */
.guide-modal::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
  z-index: 0;
  pointer-events: none;
  animation: rotate-glow 20s linear infinite;
}

@keyframes rotate-glow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes modal-pop {
  0% { opacity: 0; transform: scale(0.9) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.guide-close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t-fast);
  z-index: 10;
}

.guide-close-btn:hover {
  background: var(--danger);
  color: #fff;
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}

.guide-header {
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 1;
}

.guide-badge {
  display: inline-block;
  background: rgba(139, 92, 246, 0.15);
  color: var(--brand);
  padding: 0.25rem 0.85rem;
  border-radius: var(--r-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.guide-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.guide-header p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* 4-step grid */
.guide-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 1;
}

.guide-step-card {
  background: var(--bg-glass-light);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: all var(--t-base);
  position: relative;
}

.guide-step-card:hover {
  background: rgba(139, 92, 246, 0.05);
  border-color: var(--border-brand);
  box-shadow: var(--shadow-brand);
  transform: translateY(-5px);
}

.guide-step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 4px 14px rgba(139,92,246,0.40);
  transition: transform var(--t-bounce);
}

.guide-step-card:hover .guide-step-num {
  transform: scale(1.15) rotate(-5deg);
}

.guide-step-icon {
  font-size: 1.4rem;
  color: var(--brand);
  margin-bottom: 0.75rem;
  transition: transform var(--t-bounce);
}

.guide-step-card:hover .guide-step-icon {
  transform: scale(1.1) translateY(-2px);
}

.guide-step-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
  font-family: 'Outfit', sans-serif;
}

.guide-step-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.guide-footer {
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 1;
}

/* ============================================================
   -- SHARED BUTTON SYSTEM (used across all modals + panels)
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
  transition: all var(--t-fast);
  line-height: 1;
  text-decoration: none;
  user-select: none;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.btn:active { transform: translateY(0); scale: 0.98; }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; transition: transform var(--t-fast); }
.btn:hover svg { transform: scale(1.1); }

.btn--primary {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3), inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.btn--primary:hover {
  background: linear-gradient(135deg, #b86bf8, #f065a9);
  box-shadow: 0 8px 25px rgba(236, 72, 153, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.4);
  border-color: transparent;
  color: #fff;
  transform: translateY(-2px) scale(1.02);
}

.btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
}

.btn--ghost:hover {
  background: var(--bg-hover);
  border-color: var(--border);
  color: var(--text-secondary);
}

.btn--danger {
  border-color: rgba(239,68,68,0.30);
  color: var(--danger);
  background: rgba(239,68,68,0.08);
}

.btn--danger:hover {
  background: rgba(239,68,68,0.16);
  border-color: rgba(239,68,68,0.50);
  color: #f87171;
}

.btn--sm {
  padding: 0.32rem 0.7rem;
  font-size: 0.74rem;
}

.btn--lg {
  padding: 0.65rem 1.5rem;
  font-size: 0.88rem;
}

/* ============================================================
   -- MISC UTILITY STYLES --
   Dividers, section labels, empty states, loading spinner
   ============================================================ */

/* Section divider */
.section-divider {
  height: 1px;
  background: var(--border);
  margin: 1rem 0;
  border: none;
}

/* Subsection label */
.subsec-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.subsec-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Character counter */
.char-counter {
  text-align: right;
  font-size: 0.66rem;
  color: var(--text-faint);
  margin-top: 0.15rem;
  transition: color var(--t-fast);
}

.char-counter.near-limit { color: var(--warning); }
.char-counter.at-limit   { color: var(--danger); }

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-faint);
}

.empty-state svg { width: 36px; height: 36px; opacity: 0.5; }
.empty-state p { font-size: 0.78rem; color: var(--text-faint); }

/* Inline spinner */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

.spinner--sm { width: 12px; height: 12px; }
.spinner--lg { width: 24px; height: 24px; }

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

/* Fade in */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Badge pill */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  border-radius: var(--r-full);
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge--brand  { background: rgba(139,92,246,0.18); color: var(--brand); border: 1px solid rgba(139,92,246,0.28); }
.badge--success{ background: rgba(16,185,129,0.14); color: var(--success); border: 1px solid rgba(16,185,129,0.28); }
.badge--warn   { background: rgba(245,158,11,0.14); color: var(--warning); border: 1px solid rgba(245,158,11,0.28); }
.badge--danger { background: rgba(239,68,68,0.12); color: var(--danger); border: 1px solid rgba(239,68,68,0.28); }

/* Tooltip */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 0.70rem;
  font-weight: 500;
  padding: 0.3rem 0.6rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--t-fast), transform var(--t-fast);
  transform: translateX(-50%) translateY(4px);
  z-index: var(--z-modal);
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}

[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   -- SCROLLBAR GLOBAL OVERRIDE (Firefox) --
   ============================================================ */

* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

/* ============================================================
   -- RESPONSIVE ADJUSTMENTS --
   Below 1200px: collapse to narrower layout
   Below 900px: stack panels
   ============================================================ */

@media (max-width: 1400px) {
  .app-layout {
    grid-template-columns: 45% 55%;
  }

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

@media (max-width: 1100px) {
  .app-layout {
    grid-template-columns: 50% 50%;
  }

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

@media (max-width: 900px) {
  .app-layout {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  body { overflow: auto; }

  .editor-panel {
    height: auto;
    max-height: 60vh;
  }

  .preview-panel {
    height: 70vw;
    min-height: 400px;
  }

  .bullet-modal-cols {
    grid-template-columns: 1fr;
  }

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

  .header-actions .autosave-badge,
  .header-actions .strength-wrap {
    display: none;
  }

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

@media (max-width: 540px) {
  .app-header {
    padding: 0 0.75rem;
  }

  .guide-steps-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .resume-sheet {
    width: 100%;
    min-height: auto;
  }
}

/* Custom Super-Premium Start Button for Guide */
#guideStartBtn {
  background: linear-gradient(135deg, #a855f7, #ec4899) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 50px !important;
  padding: 1.1rem 2.8rem !important;
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.8rem !important;
  cursor: pointer !important;
  box-shadow: 0 10px 30px rgba(236, 72, 153, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.3) !important;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
}

#guideStartBtn i {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  font-size: 1.2rem !important;
}

#guideStartBtn:hover {
  transform: translateY(-4px) scale(1.05) !important;
  box-shadow: 0 15px 40px rgba(236, 72, 153, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.4) !important;
  background: linear-gradient(135deg, #b86bf8, #f065a9) !important;
}

#guideStartBtn:hover i {
  transform: translateX(8px) !important;
}

#guideStartBtn:active {
  transform: translateY(1px) scale(0.98) !important;
  box-shadow: 0 5px 15px rgba(236, 72, 153, 0.4) !important;
}

/* ============================================================
   @MEDIA PRINT — PDF / Print Export
   Hides all UI and shows only the pure resume sheet.
   The browser's "Save as PDF" handles A4, multi-page & scale.
   ============================================================ */

@media print {

  /* 1. A4 page, zero margins */
  @page {
    size: A4 portrait;
    margin: 0;
  }

  /* 2. Hide ALL UI chrome — only resume survives */
  .app-header,
  .editor-panel,
  .preview-toolbar,
  .page-overflow-line,
  .preview-toolbar-left,
  .preview-toolbar-right,
  .toast-container {
    display: none !important;
  }

  /* 3. Reset body & page background */
  html, body {
    background: #ffffff !important;
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    overflow: visible !important;
  }

  /* 4. Reset all layout wrappers so resume flows naturally */
  .app-main,
  .app-layout,
  .preview-panel,
  .preview-scroll,
  .preview-scale-wrap {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  /* 5. The resume sheet — full width, no decoration */
  .resume-sheet {
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #ffffff !important;
    overflow: visible !important;
    page-break-after: auto !important;
  }

  /* 6. NOTE: zoom is intentionally NOT reset here.
     Auto Fit zoom is preserved — JS beforeprint handles hiding.
     Browser scale in print dialog controls final sizing. */

  /* 7. Avoid breaking sections across pages */
  .resume-section {
    break-inside: avoid;
    page-break-inside: avoid;
  }

}
