/* ==========================================
   SmartResume WEB CSS Styling System
   Premium Glassmorphic Workspace & Resume Templates
   ========================================== */

/* Google Fonts Import happens in HTML, but we specify fallbacks here */
:root {
  /* UI Colors (Dashboard Theme - Dark & Modern) */
  --bg-main: #0a0a0c;
  --bg-sidebar: #121216;
  --bg-card: rgba(30, 30, 38, 0.45);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #6366f1;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dark: #1f2937;
  --text-light: #f9fafb;
  --text-link: #818cf8;
  
  /* Accent Colors for UI Elements */
  --accent-blue: #3b82f6;
  --accent-green: #10b981;
  --accent-purple: #8b5cf6;
  --accent-red: #ef4444;
  --accent-amber: #f59e0b;
  
  /* Resume Document Engine Default Variables (Modified in Real-time) */
  --resume-primary: #4f46e5;
  --resume-font: 'Inter', sans-serif;
  --resume-font-size: 10pt;
  --resume-line-height: 1.4;
  --resume-margins: 0.75in;
  --resume-spacing: 15px;
  --resume-text-color: #374151;
  --resume-header-color: #111827;
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

button, input, textarea, select {
  font-family: inherit;
}

/* Scrollbar Customization for Chrome/Safari */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* App Shell (Dashboard Grid) */
.app-header {
  height: 64px;
  background-color: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 10;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.logo-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #ffffff, #d1d5db);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 12px;
  background-color: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

.btn-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background-color: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.3);
}

/* Main Dashboard Workspace Layout */
.workspace {
  display: flex;
  flex: 1;
  overflow: hidden;
  height: calc(100vh - 64px);
  position: relative;
}

/* Left panel: Form editor container */
.editor-pane {
  width: 50%;
  min-width: 520px;
  max-width: 750px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.editor-tabs {
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid var(--border-color);
  padding: 0 12px;
  background-color: rgba(0, 0, 0, 0.15);
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: color 0.2s ease;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  color: #818cf8;
  font-weight: 600;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 2px;
  background-color: #6366f1;
  border-radius: 2px 2px 0 0;
  box-shadow: 0 -2px 10px rgba(99, 102, 241, 0.5);
}

.editor-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.editor-section {
  display: none;
  animation: fadeIn 0.25s ease-out;
}

.editor-section.active {
  display: block;
}

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

/* Right panel: Live print-ready PDF preview container */
.preview-pane {
  flex: 1;
  background-color: var(--bg-main);
  overflow-y: auto;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.preview-controls {
  width: 100%;
  max-width: 816px; /* standard 8.5in letter width in pixels at 96dpi */
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.template-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.template-selector span {
  font-size: 13px;
  color: var(--text-muted);
}

.select-input {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  cursor: pointer;
  transition: all 0.2s;
}

.select-input:focus {
  border-color: var(--border-focus);
}

/* Forms & Editor Layout Items */
.section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #ffffff;
  border-left: 3px solid #6366f1;
  padding-left: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-group {
  margin-bottom: 16px;
}

.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text-main);
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}

.form-control:focus {
  border-color: var(--border-focus);
  background-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

/* Repeater Items (Work Experience, Education, Projects) */
.repeater-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.repeater-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px;
  position: relative;
  transition: all 0.2s ease;
}

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

.repeater-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  cursor: pointer;
}

.card-title-summary {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title-summary span {
  font-weight: normal;
  color: var(--text-muted);
}

.card-actions {
  display: flex;
  gap: 6px;
}

.action-icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.action-icon-btn:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.08);
}

.action-icon-btn.delete:hover {
  color: #f87171;
  background-color: rgba(239, 68, 68, 0.15);
}

.repeater-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.repeater-card-body.collapsed {
  display: none;
}

/* Bullet Points Lists (Rich lists within experience / projects) */
.bullets-group {
  margin-top: 10px;
}

.bullet-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.bullet-row .form-control {
  padding: 8px 12px;
}

/* Skills Category Manager */
.skills-group-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}

/* Styling Options Panel specific */
.styling-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.color-palette-picker {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.color-swatch {
  height: 48px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 4px 6px;
  font-size: 10px;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  transition: all 0.2s;
}

.color-swatch.active {
  border-color: white;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

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

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.slider-input {
  width: 100%;
  accent-color: #6366f1;
  background: rgba(255,255,255,0.08);
  height: 6px;
  border-radius: 3px;
  outline: none;
}

/* MOBILE TOGGLE FOR RESUME PREVIEW */
.mobile-preview-toggle {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

/* ==========================================================================
   RESUME DOCUMENT SHEET (A4/Letter Paper Simulation)
   ========================================================================== */

.resume-sheet-container {
  padding: 10px;
  display: flex;
  justify-content: center;
  width: 100%;
}

.resume-sheet {
  background-color: #ffffff;
  color: var(--resume-text-color);
  font-family: var(--resume-font);
  font-size: var(--resume-font-size);
  line-height: var(--resume-line-height);
  padding: var(--resume-margins);
  
  width: 8.5in;              /* Standard US Letter width */
  min-height: 11in;          /* Standard US Letter height */
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  border-radius: 2px;
  transition: all 0.15s ease-out;
  position: relative;
  overflow: hidden;
  text-align: left;
  
  /* Page break visual guides (repeating every 11 inches on screen only) */
  background-image: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent calc(11in - 1px),
    #cbd5e1 calc(11in - 1px),
    #cbd5e1 11in
  );
  background-size: 100% 11in;
}

/* Resume Typography Defaults */
.resume-sheet h1, 
.resume-sheet h2, 
.resume-sheet h3, 
.resume-sheet h4 {
  color: var(--resume-header-color);
  font-family: var(--resume-font);
  font-weight: 700;
}

.resume-sheet a {
  color: var(--resume-primary);
  text-decoration: none;
}

.resume-sheet a:hover {
  text-decoration: underline;
}

/* Core Document Elements */
.r-header {
  margin-bottom: calc(var(--resume-spacing) * 1.2);
}

.r-name {
  font-size: 2.2em;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--resume-header-color);
  margin-bottom: 4px;
}

.r-title {
  font-size: 1.2em;
  font-weight: 500;
  color: var(--resume-primary);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.r-contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9em;
  color: #4b5563;
}

.r-contact-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.r-contact-item i {
  color: var(--resume-primary);
  font-size: 10px;
  width: 12px;
  text-align: center;
}

/* Sections Structure */
.r-section {
  margin-bottom: var(--resume-spacing);
}

.r-section-title {
  font-size: 1.1em;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid var(--resume-primary);
  padding-bottom: 4px;
  margin-bottom: calc(var(--resume-spacing) * 0.7);
  font-weight: 700;
}

.r-summary {
  font-size: 0.95em;
  text-align: justify;
}

/* Grid & Items */
.r-item {
  margin-bottom: calc(var(--resume-spacing) * 0.8);
}

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

.r-item-header {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1em;
  color: var(--resume-header-color);
  margin-bottom: 2px;
}

.r-item-subheader {
  display: flex;
  justify-content: space-between;
  font-size: 0.92em;
  color: #4b5563;
  font-style: italic;
  margin-bottom: 6px;
}

.r-bullets {
  list-style-type: square;
  padding-left: 18px;
  font-size: 0.92em;
}

.r-bullets li {
  text-align: left;
  margin-bottom: 4px;
}

.r-bullets li:last-child {
  margin-bottom: 0;
}

/* Skills Layout */
.r-skills-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.r-skills-row {
  font-size: 0.92em;
}

.r-skills-category {
  font-weight: 700;
  color: var(--resume-header-color);
  display: inline-block;
  min-width: 120px;
}

.r-skills-items {
  display: inline;
}

/* ==========================================================================
   TEMPLATE MODIFIERS
   ========================================================================== */

/* --- TEMPLATE 1: MODERN SINGLE COLUMN (default) --- */
.template-modern .r-section-title {
  border-bottom-color: var(--resume-primary);
  color: var(--resume-primary);
}

/* --- TEMPLATE 2: TWO COLUMN CREATIVE --- */
.template-creative .resume-sheet {
  display: grid;
  grid-template-columns: 2.3in 1fr; /* Sidebar is 2.3in, rest is main */
  grid-gap: 20px;
  padding: 0; /* Override margins for full-bleed layouts */
}

.template-creative .r-sidebar {
  background-color: #f3f4f6;
  border-right: 1px solid #e5e7eb;
  padding: var(--resume-margins) 15px var(--resume-margins) 20px;
  display: flex;
  flex-direction: column;
  gap: var(--resume-spacing);
  height: 100%;
}

.template-creative .r-mainbar {
  padding: var(--resume-margins) var(--resume-margins) var(--resume-margins) 5px;
  display: flex;
  flex-direction: column;
  gap: var(--resume-spacing);
}

.template-creative .r-header {
  grid-column: 1 / span 2;
  background-color: #111827;
  color: #ffffff;
  padding: 24px var(--resume-margins);
  margin-bottom: 0;
}

.template-creative .r-header .r-name {
  color: #ffffff;
}

.template-creative .r-header .r-title {
  color: #818cf8;
}

.template-creative .r-header .r-contact-list {
  color: #d1d5db;
}

.template-creative .r-header .r-contact-item i {
  color: #818cf8;
}

.template-creative .r-sidebar .r-section-title {
  border-bottom: 2px solid var(--resume-primary);
  font-size: 0.95em;
  padding-bottom: 2px;
}

.template-creative .r-sidebar .r-contact-list {
  flex-direction: column;
  gap: 8px;
}

.template-creative .r-sidebar .r-contact-item {
  font-size: 11px;
  align-items: flex-start;
  max-width: 100%;
}

.template-creative .r-sidebar .r-contact-item i {
  margin-top: 3px;
}

.template-creative .r-sidebar .r-contact-item span,
.template-creative .r-sidebar .r-contact-item a {
  word-break: break-all;
  overflow-wrap: anywhere;
  white-space: normal;
  max-width: calc(100% - 16px);
}

.template-creative .r-sidebar .r-skills-category {
  display: block;
  font-weight: 700;
  margin-bottom: 2px;
}

.template-creative .r-sidebar .r-skills-row {
  margin-bottom: 8px;
}

/* --- TEMPLATE 3: EXECUTIVE CLASSIC --- */
.template-executive .r-header {
  text-align: center;
  border-bottom: 1px solid #d1d5db;
  padding-bottom: 15px;
}

.template-executive .r-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.4em;
  letter-spacing: 0.5px;
}

.template-executive .r-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: normal;
  text-transform: uppercase;
  font-size: 1.05em;
  letter-spacing: 1px;
}

.template-executive .r-contact-list {
  justify-content: center;
}

.template-executive .r-section-title {
  font-family: 'Playfair Display', Georgia, serif;
  border-bottom: 1px double #9ca3af;
  text-align: center;
  color: var(--resume-header-color);
  font-size: 1em;
}

.template-executive .r-item-header {
  font-family: 'Playfair Display', Georgia, serif;
}

.template-executive .r-bullets {
  list-style-type: circle;
}

/* ==========================================================================
   RESPONSIVE DESIGN (FOR BROWSER / EDITOR INTERFACE)
   ========================================================================== */

@media (max-width: 1024px) {
  .workspace {
    flex-direction: column;
    overflow-y: auto;
  }
  
  .editor-pane {
    width: 100%;
    max-width: 100%;
    min-width: 100%;
    height: auto;
    overflow: visible;
  }
  
  .editor-content {
    overflow-y: visible;
  }
  
  .preview-pane {
    width: 100%;
    height: auto;
    overflow: visible;
    padding: 20px 10px;
    border-top: 1px solid var(--border-color);
  }
  
  .resume-sheet {
    width: 100%;
    max-width: 100%;
    min-height: auto;
    height: auto;
    aspect-ratio: 1 / 1.414; /* A4 aspect ratio */
  }
}

/* Mobile Toggle Layout when pane visibility is controlled by JS */
@media (max-width: 768px) {
  body {
    overflow: auto;
  }
  .workspace {
    display: block;
    height: auto;
  }
  .editor-pane {
    display: block;
  }
  .preview-pane {
    display: none; /* Hidden on mobile by default, toggled via JS class */
  }
  .workspace.preview-active .editor-pane {
    display: none;
  }
  .workspace.preview-active .preview-pane {
    display: flex;
  }
  .mobile-preview-toggle {
    display: flex;
  }
}

/* ==========================================================================
   PRINT OVERRIDES - CRITICAL FOR CREATING BEAUTIFUL SELECTABLE RESUME PDFs
   ========================================================================== */

@media print {
  /* Hide all dashboard/UI elements completely */
  html, body {
    background-color: #ffffff !important;
    color: #000000 !important;
    height: auto !important;
    overflow: visible !important;
  }

  .app-header,
  .editor-pane,
  .preview-controls,
  .mobile-preview-toggle,
  .action-icon-btn,
  .btn {
    display: none !important;
  }

  .workspace {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
  }

  .preview-pane {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    background: none !important;
    height: auto !important;
    border: none !important;
  }

  .resume-sheet-container {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
  }

  .resume-sheet {
    box-shadow: none !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important; /* Reset padding and let @page handle the margins on every page boundary */
    width: 100% !important;
    min-height: 100% !important;
    height: auto !important;
    overflow: visible !important;
    page-break-after: avoid;
    page-break-inside: auto;
    background-image: none !important; /* Hide page break visual guides when printing */
  }
  
  .r-item {
    page-break-inside: auto !important;
    break-inside: auto !important;
  }
  
  .r-item-header, .r-item-subheader {
    page-break-after: avoid !important;
    break-after: avoid !important;
  }
  
  .r-item li, .r-item p {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  
  .r-section {
    page-break-inside: auto !important;
    break-inside: auto !important;
  }

  /* Set page settings with print margin safety space */
  @page {
    size: letter;
    margin: 0.6in 0.75in; /* Fallback for browsers that do not support CSS variables in @page */
    margin: var(--resume-margins, 0.6in 0.75in);
  }
}

/* ==========================================================================
   RESUME VERSION MANAGER CARDS & ACTIONS
   ========================================================================== */

.version-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

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

.version-card.active {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
  background-color: rgba(99, 102, 241, 0.05);
}

.version-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.version-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.version-active-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background-color: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  text-transform: uppercase;
}

.version-visibility-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.version-visibility-badge.public {
  background-color: rgba(5, 150, 105, 0.2);
  color: #a7f3d0;
}

.version-visibility-badge.private {
  background-color: rgba(107, 114, 128, 0.2);
  color: #d1d5db;
}

.version-date {
  font-size: 11px;
  color: var(--text-muted);
}

.version-actions {
  display: flex;
  gap: 6px;
}

/* ==========================================================================
   MODAL OVERLAY & CARD ELEMENTS
   ========================================================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: modalFadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-content {
  background-color: #121216;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  position: relative;
  animation: modalSlideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalSlideUp {
  from { transform: translateY(12px) scale(0.97); }
  to { transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.2px;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.05);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* ==========================================================================
   CUSTOM TOGGLE SLIDER SWITCH
   ========================================================================== */

.switch-container {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch-container input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-switch {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.08);
  transition: .25s ease;
  border-radius: 24px;
  border: 1px solid var(--border-color);
}

.slider-switch:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: .25s ease;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.switch-container input:checked + .slider-switch {
  background-color: #6366f1;
  border-color: #6366f1;
}

.switch-container input:checked + .slider-switch:before {
  transform: translateX(20px);
}

/* ==========================================================================
   USER PROFILE HEADER CARD
   ========================================================================== */

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-info-text {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  line-height: 1.2;
}

.user-display-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.user-email-text {
  font-size: 10px;
  color: var(--text-muted);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #6366f1;
  background-color: rgba(99, 102, 241, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #a5b4fc;
  font-size: 13px;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

/* ==========================================================================
   SHARED PUBLIC READ-ONLY VIEW
   ========================================================================== */

body.shared-view-mode {
  overflow: auto;
  background-color: #0d0e12;
}

body.shared-view-mode .app-header {
  display: none !important;
}

body.shared-view-mode .editor-pane {
  display: none !important;
}

body.shared-view-mode .preview-controls {
  display: none !important;
}

body.shared-view-mode .workspace {
  display: block !important;
  height: auto !important;
  overflow: visible !important;
  padding: 40px 0 !important;
  max-width: 820px;
  margin: 0 auto;
}

body.shared-view-mode .preview-pane {
  display: flex !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
  height: auto !important;
  width: 100% !important;
}

body.shared-view-mode .resume-sheet-container {
  padding: 0 !important;
}

body.shared-view-mode .resume-sheet {
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6) !important;
}

/* ==========================================================================
   RECRUITER SEARCH PORTAL
   ========================================================================== */

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

.recruiter-hero {
  text-align: center;
  margin-bottom: 40px;
}

.recruiter-hero h1 {
  font-size: 2.2em;
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #a5b4fc 0%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.recruiter-hero p {
  color: var(--text-muted);
  font-size: 1.1em;
}

.recruiter-search-section {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.search-input-wrapper {
  display: flex;
  gap: 12px;
}

.search-input-wrapper input {
  font-size: 15px;
  padding: 12px 18px;
  border-radius: 8px;
}

.recruiter-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.candidate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.candidate-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.candidate-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #6366f1, #a5b4fc);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.candidate-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.15);
}

.candidate-card:hover::before {
  opacity: 1;
}

.candidate-info h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.candidate-title {
  font-weight: 500;
  font-size: 13px;
  color: var(--text-link);
  margin-bottom: 12px;
}

.candidate-meta {
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.candidate-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.candidate-summary {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 54px;
  text-overflow: ellipsis;
}

.candidate-skills-label {
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.candidate-skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
  min-height: 52px;
}

.candidate-skill-badge {
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.candidate-skill-badge.highlight {
  background-color: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
  font-weight: 600;
}

.candidate-actions {
  display: flex;
  gap: 10px;
}

.candidate-actions .btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 12px;
}

/* Recruiter Table View styling */
.recruiter-table-container {
  width: 100%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow-x: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  margin-bottom: 30px;
}

.recruiter-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 900px;
}

.recruiter-th {
  background-color: rgba(18, 18, 22, 0.6);
  padding: 16px 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.recruiter-tr {
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s ease;
}

.recruiter-tr:last-child {
  border-bottom: none;
}

.recruiter-tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

.recruiter-td {
  padding: 16px 20px;
  font-size: 13px;
  vertical-align: middle;
  color: var(--text-main);
}

/* Candidate Profile Info cell */
.candidate-profile-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.candidate-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  flex-shrink: 0;
}

.candidate-name-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.candidate-name-title h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
}

.candidate-name-title span {
  font-size: 12px;
  color: var(--text-link);
}

/* Summary cell styling */
.recruiter-summary-text {
  max-width: 340px;
  line-height: 1.5;
  color: var(--text-muted);
  font-size: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========================== */

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

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  min-width: 170px;
  padding: 6px 0;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.dropdown-item {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-main);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s;
  box-sizing: border-box;
}

.dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.dropdown-item i {
  width: 16px;
  text-align: center;
  color: var(--text-muted);
}

.dropdown.active .dropdown-menu {
  display: block;
}

/* ==========================================================================
   GEMINI AI PDF PREVIEW MODAL STYLES
   ========================================================================== */
.preview-sections-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.gemini-prev-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
}

.gemini-prev-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.gemini-prev-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.gemini-prev-stat-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.gemini-prev-stat-number {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-link);
}

.gemini-prev-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.gemini-prev-skills-group {
  margin-bottom: 12px;
}

.gemini-prev-skills-group:last-child {
  margin-bottom: 0;
}

.gemini-prev-skills-title {
  font-weight: 600;
  font-size: 12px;
  color: var(--text-color);
  margin-bottom: 6px;
}

.gemini-prev-skill-badge {
  display: inline-block;
  background: rgba(99, 102, 241, 0.1);
  color: #818cf8;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  margin-right: 6px;
  margin-bottom: 6px;
}
