/* Resume Studio Styles */
:root {
  --res-theme: #1e3a8a;
  --res-font: 'Inter', sans-serif;
}

body {
  background-color: #f1f5f9;
  font-family: var(--font-body);
}

.resume-app-container {
  display: flex;
  max-width: 1440px;
  margin: 0 auto;
  min-height: calc(100vh - 130px);
  gap: 1rem;
  padding: 0.75rem 1rem;
}

/* Sidebar Inputs & Controls */
.resume-sidebar {
  width: 410px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  padding-right: 4px;
}

.resume-sidebar::-webkit-scrollbar {
  width: 5px;
}

.resume-sidebar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.quick-actions-card {
  display: flex;
  gap: 0.5rem;
  background: #ffffff;
  padding: 0.6rem;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
}

.btn-sample, .btn-reset {
  flex: 1;
  padding: 0.5rem 0.4rem;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-sample {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: #1e40af;
  border: 1px solid #93c5fd;
}

.btn-reset {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #cbd5e1;
}

/* Job Preset Card */
.job-preset-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
  border: 1.5px solid #86efac;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.08);
}

.job-preset-icon {
  font-size: 1.4rem;
  background: #dcfce7;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid #bbf7d0;
  flex-shrink: 0;
}

.job-profile-select {
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1.5px solid #16a34a;
  background: #ffffff;
  color: #0f172a;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.job-profile-select:focus {
  border-color: #15803d;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
}

.job-profile-select optgroup {
  font-weight: 800;
  color: #1e3a8a;
  background: #f8fafc;
}

.job-profile-select option {
  font-weight: 600;
  color: #0f172a;
  padding: 6px;
  background: #ffffff;
}

.job-quick-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.job-pill {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.job-pill:hover {
  background: #ecfdf5;
  border-color: #10b981;
  color: #047857;
  transform: translateY(-1px);
}

.job-pill.active {
  background: #15803d;
  color: #ffffff;
  border-color: #15803d;
}

.section-card {
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  padding: 0.85rem;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.section-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.section-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.6rem;
}

.btn-add-item {
  padding: 3px 8px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px dashed #3b82f6;
  border-radius: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.45rem;
}

.template-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  font-weight: 600;
  font-size: 0.74rem;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 38px;
  box-sizing: border-box;
}

.template-btn.active {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1d4ed8;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12);
}

.tpl-name {
  font-weight: 700;
  font-size: 0.73rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tpl-badge {
  background: #f1f5f9;
  color: #475569;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.template-btn.active .tpl-badge {
  background: #2563eb;
  color: #ffffff;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.6rem;
}

.form-group label, .form-row-2 label {
  font-size: 0.74rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.form-group input, .form-group select, .form-group textarea, .form-row-2 select, .form-row-2 input {
  width: 100%;
  height: 36px;
  padding: 0 0.55rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.76rem;
  font-family: inherit;
  outline: none;
  background: #ffffff;
  box-sizing: border-box;
}

.form-group textarea {
  height: auto;
  padding: 0.45rem 0.55rem;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus, .form-row-2 select:focus, .form-row-2 input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.color-picker-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 2px 4px;
  height: 36px;
  box-sizing: border-box;
}

.color-picker-wrapper input[type="color"] {
  width: 22px;
  height: 22px;
  border: none;
  background: none;
  cursor: pointer;
  flex-shrink: 0;
}

.color-picker-wrapper select {
  border: none;
  font-size: 0.75rem;
  padding: 0;
  background: transparent;
  outline: none;
  height: 100%;
  flex: 1;
}

/* Dynamic Item Card */
.dynamic-item-card {
  position: relative;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.6rem;
  margin-bottom: 0.5rem;
}

.btn-remove-item {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #fee2e2;
  color: #ef4444;
  border: none;
  border-radius: 4px;
  width: 20px;
  height: 20px;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.export-card {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.2);
  margin-top: 0.75rem;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.export-card .section-title {
  color: #ffffff;
}

.export-btn-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.btn-export-pdf {
  padding: 0.6rem;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-export-print {
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-export-img {
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.76rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-export-img:hover {
  background: rgba(255, 255, 255, 0.22);
}

.btn-export-share {
  padding: 0.5rem;
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.76rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
  transition: all 0.2s ease;
}

.btn-export-wa {
  padding: 0.5rem;
  background: #25d366;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.76rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.25);
  transition: all 0.2s ease;
}

/* Resume Live Preview Stage */
.resume-preview-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: #cbd5e1;
  border-radius: 12px;
  padding: 1rem;
  overflow: auto;
  min-height: calc(100vh - 140px);
}

.resume-stage-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.export-stage-container {
  width: 100%;
  max-width: 794px;
  margin-top: 1.2rem;
  margin-bottom: 1.5rem;
}

.export-toggle-bar {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  margin-bottom: 0.5rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.export-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.86rem;
  color: #0f172a;
  cursor: pointer;
  user-select: none;
}

.export-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
  cursor: pointer;
}

.resume-wrapper {
  position: relative;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
  border-radius: 2px;
  overflow: hidden;
}

/* Dynamic Page Dimensions & Background */
.resume-page {
  width: 210mm;
  min-height: 297mm;
  padding: 16mm;
  box-sizing: border-box;
  background: var(--res-bg, #ffffff);
  color: #1e293b;
  font-family: var(--res-font);
  position: relative;
  transition: all 0.2s ease;
}

.resume-page.size-a4 {
  width: 210mm;
  min-height: 297mm;
}

.resume-page.size-letter {
  width: 216mm;
  min-height: 279mm;
}

.resume-page.size-legal {
  width: 216mm;
  min-height: 356mm;
}

.resume-page.size-a5 {
  width: 148mm;
  min-height: 210mm;
  padding: 10mm;
  font-size: 0.85em;
}

/* Page Border Styles */
.resume-page.border-solid-thin {
  border: var(--res-border-w, 1px) solid var(--res-border-c, var(--res-theme));
  border-radius: var(--res-border-r, 0px);
}

.resume-page.border-solid-bold {
  border: var(--res-border-w, 3px) solid var(--res-border-c, var(--res-theme));
  border-radius: var(--res-border-r, 0px);
}

.resume-page.border-double {
  border: var(--res-border-w, 4px) double var(--res-border-c, var(--res-theme));
  border-radius: var(--res-border-r, 0px);
}

.resume-page.border-dashed {
  border: var(--res-border-w, 2px) dashed var(--res-border-c, var(--res-theme));
  border-radius: var(--res-border-r, 0px);
}

.resume-page.border-dotted {
  border: var(--res-border-w, 2px) dotted var(--res-border-c, var(--res-theme));
  border-radius: var(--res-border-r, 0px);
}

.resume-page.border-inner-box {
  outline: var(--res-border-w, 2px) solid var(--res-border-c, var(--res-theme));
  outline-offset: -8mm;
  border-radius: var(--res-border-r, 0px);
}

.resume-page.border-corner-accent {
  border-radius: var(--res-border-r, 0px);
}
.resume-page.border-corner-accent::before {
  content: '';
  position: absolute;
  top: 5mm; left: 5mm; right: 5mm; bottom: 5mm;
  border-top: var(--res-border-w, 3px) solid var(--res-border-c, var(--res-theme));
  border-bottom: var(--res-border-w, 3px) solid var(--res-border-c, var(--res-theme));
  pointer-events: none;
}

.resume-page.border-gradient {
  border: var(--res-border-w, 3px) solid transparent;
  border-image: linear-gradient(135deg, var(--res-theme), #2563eb, #7c3aed, #eab308) 1;
}

/* Common Section Styling */
.res-sec-title {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--res-theme);
  border-bottom: 2px solid var(--res-theme);
  padding-bottom: 2px;
  margin-top: 8px;
  margin-bottom: 5px;
}

.res-item-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
}

.res-item-subtitle {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
}

.res-item-date {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
}

.res-item-desc {
  font-size: 0.78rem;
  color: #334155;
  line-height: 1.45;
  margin-top: 3px;
}

/* 1. Template: Modern 2-Column */
.tpl-modern {
  display: grid;
  grid-template-columns: 66mm 1fr;
  gap: 10mm;
  padding: 0 !important;
  min-height: 297mm;
  align-items: stretch;
}

.tpl-modern .res-sidebar-col {
  background: var(--res-sidebar-bg, var(--res-theme));
  color: #ffffff;
  padding: 12mm 9mm;
  min-height: 100%;
  box-sizing: border-box;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.tpl-modern .res-sidebar-col * {
  color: #ffffff !important;
}

.tpl-modern .res-sidebar-col .res-sec-title {
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff !important;
  margin-top: 14px;
}

.tpl-modern .res-main-col {
  background: var(--res-main-bg, #ffffff);
  padding: 12mm 12mm 12mm 0;
  box-sizing: border-box;
}

.tpl-modern .res-profile-photo {
  width: 34mm;
  height: 34mm;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ffffff;
  margin-bottom: 12px;
}

/* 2. Template: Executive Banner */
.tpl-executive .res-header-banner {
  background: var(--res-theme);
  color: #ffffff;
  padding: 10mm 14mm;
  margin: -16mm -16mm 10mm -16mm;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 7. Template: Corporate Elegant */
.tpl-corporate {
  text-align: center;
}
.tpl-corporate .res-sec-title {
  border-bottom: 2px double var(--res-theme);
  text-align: center;
}

/* 8. Template: Tech Developer */
.tpl-tech .tech-header {
  background: #0f172a;
  color: #38bdf8;
  padding: 10mm 14mm;
  margin: -16mm -16mm 10mm -16mm;
}

/* 9. Template: Infographic Visual */
.tpl-infographic .res-sec-title {
  background: var(--res-theme);
  color: #ffffff !important;
  padding: 4px 10px;
  border-radius: 4px;
  border-bottom: none;
}

/* 10. Template: Split Banner */
.tpl-split .split-top {
  display: flex;
  background: var(--res-theme);
  color: #ffffff;
  padding: 12mm;
  margin: -16mm -16mm 10mm -16mm;
}

/* 11. Template: Classic Timeless */
.tpl-classic {
  font-family: 'Merriweather', serif !important;
}

/* 12. Template: Modern Glassmorphic Pill */
.tpl-glass .res-sec-title {
  background: #eff6ff;
  color: var(--res-theme);
  padding: 4px 12px;
  border-radius: 999px;
  border-bottom: none;
  display: inline-block;
}

.tpl-executive .res-header-banner * {
  color: #ffffff !important;
}

.tpl-executive .res-header-banner h1 {
  font-size: 1.6rem;
  font-weight: 800;
}

/* 3. Template: ATS Minimalist */
.tpl-ats {
  padding: 14mm !important;
}

.tpl-ats .res-sec-title {
  border-bottom: 1px solid #000000;
  color: #000000 !important;
  font-family: Arial, sans-serif;
}

/* 4. Template: Creative Accent */
.tpl-creative {
  border-left: 12px solid var(--res-theme);
}

.tpl-creative .skill-tag {
  display: inline-block;
  background: #eff6ff;
  color: var(--res-theme);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  margin: 2px;
}

/* Mobile View Switching Rules */
@media (max-width: 900px) {
  .resume-app-container {
    flex-direction: column;
    padding: 0.5rem;
  }
  .resume-sidebar {
    width: 100% !important;
    max-height: none;
  }
}

.resume-app-container.view-page-only {
  padding: 0.25rem 0.5rem !important;
  margin: 0 auto !important;
  min-height: auto !important;
}

.resume-app-container.view-page-only .resume-sidebar {
  display: none !important;
}

.resume-app-container.view-page-only .resume-preview-container {
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: center !important;
  padding: 0.5rem 0.5rem !important;
  margin: 0 auto !important;
  overflow: auto !important;
  min-height: calc(100vh - 120px) !important;
}

/* Print Rules for Full A4 Page Print */
@page {
  size: A4 portrait;
  margin: 0mm;
}

@media print {
  html, body {
    width: 210mm !important;
    height: 297mm !important;
    max-height: 297mm !important;
    background: #ffffff !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  body * {
    visibility: hidden !important;
  }

  .resume-app-container, .resume-preview-container, .resume-wrapper, .resume-page, .resume-page * {
    visibility: visible !important;
  }

  .resume-app-container, .resume-preview-container, .resume-wrapper {
    position: static !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 297mm !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    overflow: hidden !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
  }

  .resume-page {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 210mm !important;
    height: 297mm !important;
    max-height: 297mm !important;
    transform: none !important;
    margin: 0 !important;
    padding: 10mm 12mm !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .resume-page.tpl-modern {
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: 65mm 1fr !important;
    gap: 8mm !important;
    width: 210mm !important;
    height: 297mm !important;
    max-height: 297mm !important;
    overflow: hidden !important;
  }

  .tpl-modern .res-sidebar-col {
    background: var(--res-sidebar-bg, var(--res-theme)) !important;
    padding: 10mm 8mm !important;
    height: 297mm !important;
    max-height: 297mm !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .tpl-modern .res-main-col {
    background: var(--res-main-bg, #ffffff) !important;
    padding: 10mm 10mm 10mm 0 !important;
  }
}

/* Desktop Master Workspace (Computers & Laptops) */
@media (min-width: 993px) {
  .view-tabs-bar {
    display: none !important;
  }

  .resume-app-container {
    display: flex !important;
    flex-direction: row !important;
    max-width: 1540px !important;
    margin: 0 auto !important;
    padding: 1.25rem 1.5rem !important;
    gap: 1.75rem !important;
    min-height: calc(100vh - 120px) !important;
  }

  .resume-sidebar {
    width: 440px !important;
    flex-shrink: 0 !important;
    max-height: calc(100vh - 130px) !important;
    overflow-y: auto !important;
    display: flex !important;
  }

  .resume-preview-container {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: flex-start !important;
    min-height: calc(100vh - 130px) !important;
  }
}

/* Mobile Optimization Rules */
@media (max-width: 768px) {
  .view-tabs-bar {
    padding: 0.35rem 0.5rem;
    gap: 4px;
  }
  
  .id-view-tab {
    font-size: 0.70rem !important;
    padding: 6px 4px !important;
  }

  .resume-app-container {
    flex-direction: column;
    padding: 0.4rem;
    gap: 0.75rem;
  }

  .resume-sidebar {
    width: 100% !important;
    max-height: none;
    padding-bottom: 75px; /* Space for mobile bottom nav dock */
  }

  .export-card {
    position: relative !important;
    bottom: auto !important;
    z-index: 10 !important;
    margin-top: 0.75rem !important;
    margin-bottom: 1.5rem !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.3) !important;
  }

  .section-card {
    padding: 0.85rem 0.9rem;
    border-radius: 10px;
  }

  .section-title {
    font-size: 0.88rem;
  }

  .form-row-2 {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .template-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
  }

  .template-btn {
    padding: 0.5rem 0.6rem;
    font-size: 0.75rem;
  }

  .resume-preview-container {
    width: 100% !important;
    padding: 0.6rem 0.4rem;
    min-height: auto;
    border-radius: 10px;
    overflow: auto;
  }

  /* Prevent unwanted iOS Safari input zoom on focus */
  input, select, textarea {
    font-size: 16px !important;
  }
}

@media (max-width: 480px) {
  .template-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  .export-btn-group button {
    font-size: 0.76rem !important;
    padding: 0.55rem !important;
  }

  .id-view-tab {
    font-size: 0.66rem !important;
    padding: 6px 2px !important;
    letter-spacing: -0.2px;
  }
}






/* ==========================================================================
   MOBILE BOTTOM NAVIGATION DOCK WITH SLEEK UP/DOWN ARROW TOGGLE
   ========================================================================== */

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 992px) {
  body {
    padding-bottom: 68px !important;
  }

  .mobile-bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 999999 !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-top: 1px solid rgba(226, 232, 240, 0.9) !important;
    height: 58px !important;
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08) !important;
    margin: 0 !important;
    padding: 0 !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  /* Sleek Up / Down Toggle Arrow Tab */
  .mobile-nav-toggle-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    top: -20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 42px !important;
    height: 20px !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-bottom: none !important;
    border-radius: 10px 10px 0 0 !important;
    box-shadow: 0 -3px 8px rgba(15, 23, 42, 0.08) !important;
    color: #475569 !important;
    cursor: pointer !important;
    z-index: 1000000 !important;
    padding: 0 !important;
    outline: none !important;
    transition: all 0.2s ease !important;
  }

  .mobile-nav-toggle-btn:hover, .mobile-nav-toggle-btn:active {
    background: #f8fafc !important;
    color: #0284c7 !important;
  }

  .mobile-nav-toggle-btn .arrow-down {
    display: block !important;
  }

  .mobile-nav-toggle-btn .arrow-up {
    display: none !important;
  }

  /* Minimized State: Dock slides down smoothly */
  .mobile-bottom-nav.nav-minimized {
    transform: translateY(100%) !important;
  }

  .mobile-bottom-nav.nav-minimized .mobile-nav-toggle-btn {
    top: -22px !important;
  }

  .mobile-bottom-nav.nav-minimized .mobile-nav-toggle-btn .arrow-down {
    display: none !important;
  }

  .mobile-bottom-nav.nav-minimized .mobile-nav-toggle-btn .arrow-up {
    display: block !important;
  }

  .mobile-bottom-nav-inner {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    justify-content: flex-start !important;
    align-items: center !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-behavior: smooth !important;
    padding: 3px 6px !important;
    margin: 0 !important;
    gap: 4px !important;
  }

  .mobile-bottom-nav-inner::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  .mobile-bottom-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 62px !important;
    flex-shrink: 0 !important;
    height: 100% !important;
    text-decoration: none !important;
    color: #64748b !important;
    font-size: 0.66rem !important;
    font-weight: 700 !important;
    gap: 2px !important;
    padding: 4px 6px !important;
    border-radius: 10px !important;
    transition: all 0.2s ease !important;
    background: transparent !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
    white-space: nowrap !important;
  }

  .mobile-bottom-item span,
  .mobile-bottom-item .mobile-bottom-label {
    color: #64748b !important;
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
  }

  .mobile-bottom-item .mobile-bottom-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 24px !important;
  }

  .mobile-bottom-item svg {
    width: 22px !important;
    height: 22px !important;
    stroke: #64748b !important;
    stroke-width: 2 !important;
    transition: transform 0.2s ease, stroke 0.2s ease !important;
  }

  /* ACTIVE STATE: High-contrast Electric Blue Pill with Pure Crisp White Text & Icon */
  .mobile-bottom-item.active {
    background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 14px rgba(29, 78, 216, 0.35) !important;
    padding: 5px 6px !important;
  }

  .mobile-bottom-item.active span,
  .mobile-bottom-item.active .mobile-bottom-label {
    color: #ffffff !important;
    font-weight: 800 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25) !important;
  }

  .mobile-bottom-item.active svg {
    stroke: #ffffff !important;
    stroke-width: 2.3 !important;
    transform: scale(1.1) !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3)) !important;
  }
}

/* ==========================================================================
   RESUME BUILDER — UNIVERSAL PC SCREEN AUTO-FIT ENGINE
   ========================================================================== */
html, body {
  width: 100% !important;
  max-width: 100vw !important;
  overflow-x: clip !important;
}

.resume-app-container {
  width: 100% !important;
  max-width: min(1500px, 96vw) !important;
  margin: 0 auto !important;
}

@media (min-width: 993px) {
  .resume-sidebar {
    width: clamp(340px, 28vw, 420px) !important;
    flex-shrink: 0 !important;
  }
}

@media (max-width: 992px) {
  .resume-app-container {
    flex-direction: column !important;
    padding: 0.5rem 0.5rem 6.5rem 0.5rem !important;
    gap: 0.75rem !important;
  }

  /* When NOT in Full Page Preview: Show ONLY Edit Sidebar Controls */
  .resume-app-container:not(.view-page-only) .resume-preview-container {
    display: none !important;
  }

  .resume-app-container:not(.view-page-only) .resume-sidebar {
    display: flex !important;
    width: 100% !important;
    max-height: none !important;
  }

  /* When IN Full Page Preview: Show ONLY Resume Paper & Export Actions */
  .resume-app-container.view-page-only .resume-sidebar {
    display: none !important;
  }

  .resume-app-container.view-page-only .resume-preview-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: calc(100vh - 140px) !important;
    overflow-x: auto !important;
    padding-bottom: 2rem !important;
  }

  .resume-paper-wrapper {
    max-width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    margin: 0 auto !important;
  }

  .resume-paper {
    transform-origin: top center !important;
    max-width: 100% !important;
  }

  .resume-actions-bar {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 8px !important;
  }

  .btn-resume-action,
  .btn-download-resume {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.75rem 1rem !important;
  }

  .view-tabs-bar {
    position: sticky !important;
    top: 55px !important;
    z-index: 100 !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    margin: 2px auto 4px auto !important;
    padding: 0 0.5rem !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
    padding-bottom: 4px !important;
    box-sizing: border-box !important;
  }

  .id-view-tab {
    flex: 1 !important;
    padding: 4px 6px !important;
    border-radius: 6px !important;
    font-size: 0.70rem !important;
    font-weight: 700 !important;
    border: none !important;
    height: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
  }

  /* Mobile Grid Controls */
  .template-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
  }

  .template-btn {
    padding: 0.5rem 0.35rem !important;
    font-size: 0.72rem !important;
  }

  .quick-actions-card {
    flex-direction: row !important;
    gap: 6px !important;
  }
}




