@font-face {
  font-family: "Segoe UI";
  src: url("../fonts/segoeui.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Segoe UI";
  src: url("../fonts/segoeui.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Segoe UI";
  src: url("../fonts/segoeui.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

body {
  direction: ltr;
  font-family: "Segoe UI", sans-serif;
  background: #eef3f5;
  color: #222;
}
/* Set a sensible printed/PDF page margin so content never touches the paper edge */
@page {
  margin: 18mm;
}
html,
body {
  height: 100%;
  margin: 0;
  /* Add an inner page padding for on-screen preview so pages appear inset in the UI */
  padding: 36px;
}

.navbar {
  background: rgba(255, 255, 255, 0.94) !important;
  border: 1px solid rgba(30, 99, 112, 0.12);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(20, 47, 55, 0.08);
  padding: 12px 18px;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #1e6370 !important;
  font-weight: 800;
  letter-spacing: 0;
}

.navbar-brand-icon {
  display: inline-grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  background: #1e6370;
  border-radius: 6px;
  color: #fff;
}

.navbar-brand-icon svg {
  width: 19px;
  height: 19px;
  stroke-width: 2.2;
}

.navbar-brand:hover .navbar-brand-icon,
.navbar-brand:focus .navbar-brand-icon {
  background: #c75b00;
}

.navbar .nav-link {
  color: #274852 !important;
  font-weight: 600;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: #c75b00 !important;
}

.btn {
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0;
}

.btn-primary,
.btn-success {
  border-color: #1e6370;
  background: #1e6370;
}

.btn-primary:hover,
.btn-success:hover {
  border-color: #c75b00;
  background: #c75b00;
}

.btn-secondary,
.btn-outline-info,
.btn-outline-success {
  border-color: #1e6370;
  color: #1e6370;
  background: #fff;
}

.btn-secondary:hover,
.btn-outline-info:hover,
.btn-outline-success:hover {
  border-color: #1e6370;
  background: #1e6370;
  color: #fff;
}

.form-control,
.form-select {
  border-color: #c9d5d9;
  border-radius: 6px;
}

.form-control:focus,
.form-select:focus {
  border-color: #1e6370;
  box-shadow: 0 0 0 0.2rem rgba(30, 99, 112, 0.16);
}

body > .container > h2,
body > .container > h3,
body > .container-fluid > h2,
body > .container-fluid > h3 {
  color: #1e6370;
  font-weight: 800;
}

.app-page {
  max-width: 1240px;
}

.app-shell {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.app-eyebrow {
  display: inline-flex;
  align-items: center;
  color: #c75b00;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 34px;
  align-items: stretch;
  background: linear-gradient(135deg, #1e6370 0%, #174e59 100%);
  border-radius: 8px;
  color: #fff;
  padding: 34px;
  box-shadow: 0 20px 48px rgba(21, 54, 64, 0.22);
}

.dashboard-hero-copy {
  align-self: center;
}

.dashboard-hero h1 {
  color: #fff;
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
  margin: 10px 0 14px;
}

.dashboard-hero p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 16px;
  line-height: 1.55;
  margin: 0;
}

.dashboard-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.dashboard-hero .btn-primary {
  background: #c75b00;
  border-color: #c75b00;
}

.dashboard-hero .btn-outline-success {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.72);
  color: #fff;
}

.dashboard-profile-card,
.app-panel,
.dashboard-action-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(30, 99, 112, 0.12);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(20, 47, 55, 0.08);
}

.dashboard-profile-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  color: #1e6370;
  padding: 18px;
  text-align: left;
  gap: 14px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 249, 250, 0.98) 100%);
}

.dashboard-profile-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg, #1e6370 0%, #c75b00 100%);
}

.dashboard-profile-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eef3f5;
  color: #1e6370;
  border: 1px solid #dce6e9;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 6px 10px;
  text-transform: uppercase;
}

.dashboard-profile-identity {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding-top: 2px;
}

.dashboard-profile-card img,
.dashboard-avatar-placeholder {
  width: 88px;
  height: 88px;
  border: 4px solid #1e6370;
  border-radius: 50%;
  object-fit: cover;
  margin: 0;
  box-shadow: 0 8px 18px rgba(20, 47, 55, 0.12);
}

.dashboard-avatar-placeholder {
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 30%, #f4ead3 0%, #dedbc4 100%);
  color: #1e6370;
  font-size: 38px;
  font-weight: 800;
}

.dashboard-profile-card h2 {
  color: #1e6370;
  font-size: 19px;
  font-weight: 800;
  margin: 0 0 4px;
}

.dashboard-profile-card p {
  color: #607178;
  margin: 3px 0 8px;
}

.dashboard-profile-card p:first-of-type {
  font-size: 15px;
  color: #274852;
  font-weight: 600;
}

.dashboard-profile-card code {
  display: inline-block;
  background: #eef3f5;
  color: #174e59;
  border-radius: 6px;
  padding: 5px 9px;
}

.dashboard-profile-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.dashboard-profile-actions .btn {
  white-space: nowrap;
  min-width: 0;
}

.dashboard-photo-controls {
  border-top: 1px solid #dce6e9;
  margin-top: 4px;
  padding-top: 14px;
}

.dashboard-photo-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.dashboard-photo-label {
  display: inline-block;
  color: #465c63;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-photo-hint {
  color: #7c8c92;
  font-size: 12px;
}

.dashboard-photo-controls .alert {
  font-size: 12px;
  margin-bottom: 8px;
  padding: 8px 10px;
}

.dashboard-remove-photo {
  margin-top: 8px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.dashboard-action-card {
  display: block;
  min-height: 178px;
  padding: 22px;
  color: #24454d;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.dashboard-action-card:hover {
  border-color: rgba(199, 91, 0, 0.48);
  color: #24454d;
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(20, 47, 55, 0.14);
}

.dashboard-action-card span {
  color: #c75b00;
  font-size: 13px;
  font-weight: 900;
}

.dashboard-action-card h3 {
  color: #1e6370;
  font-size: 20px;
  font-weight: 800;
  margin: 22px 0 8px;
}

.dashboard-action-card p {
  color: #64777e;
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
}

.dashboard-action-card.primary {
  background: #dedbc4;
}

.dashboard-management {
  display: block;
}

.app-panel {
  padding: 24px;
}

.app-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.app-panel h2 {
  color: #1e6370;
  font-size: 22px;
  font-weight: 800;
  margin: 4px 0 0;
}

.dashboard-link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-link-grid a {
  display: flex;
  align-items: center;
  min-height: 48px;
  background: #f6f8f9;
  border: 1px solid #dce6e9;
  border-radius: 6px;
  color: #1e6370;
  font-weight: 800;
  padding: 10px 12px;
  text-decoration: none;
}

.dashboard-link-grid a:hover {
  background: #1e6370;
  border-color: #1e6370;
  color: #fff;
}

.dashboard-upload {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.dashboard-upload .form-control {
  background: #fff;
  border-color: #cfdbe0;
  box-shadow: none;
}

.dashboard-upload .btn,
.dashboard-remove-photo .btn {
  min-height: 36px;
  padding-left: 14px;
  padding-right: 14px;
}

.app-page > form,
body.container > form,
body.container > .table,
body.container > table {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(30, 99, 112, 0.12);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(20, 47, 55, 0.08);
  margin-top: 18px;
  padding: 22px;
}

body.container > table,
body.container > .table {
  overflow: hidden;
}

.table {
  color: #274852;
}

.table thead,
table thead {
  background: #1e6370;
  color: #fff;
}

.table th,
.table td,
table th,
table td {
  vertical-align: middle;
}

.alert {
  border-radius: 8px;
}

code {
  background: #eef3f5;
  color: #174e59;
  border-radius: 6px;
  padding: 3px 7px;
}

@media (max-width: 980px) {
  .dashboard-hero {
    grid-template-columns: 1fr;
  }

  .dashboard-profile-card {
    grid-row: 2;
  }

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

@media (max-width: 640px) {
  .resume-preview-shell {
    padding: 12px;
  }

  .resume-preview-toolbar {
    align-items: stretch;
    flex-direction: column;
    padding: 18px;
  }

  .resume-preview-actions {
    flex-wrap: wrap;
  }

  .pdf-preview-stage {
    padding: 8px;
  }

  .pdf-preview-viewer {
    height: 72vh;
    min-height: 560px;
  }

  .dashboard-hero {
    padding: 24px;
  }

  .dashboard-hero h1 {
    font-size: 34px;
  }

  .dashboard-grid,
  .dashboard-link-grid,
  .dashboard-upload {
    grid-template-columns: 1fr;
  }

  .dashboard-profile-identity,
  .dashboard-profile-actions {
    grid-template-columns: 1fr;
  }

  .dashboard-profile-identity {
    justify-items: start;
  }

  .dashboard-profile-badge {
    align-self: center;
  }

  .dashboard-photo-header {
    justify-content: center;
    text-align: center;
  }
}
.resume {
  background: #fff;
  /* keep internal padding but allow the page padding (body) to provide outer margins */
  padding: 24px;
  border: 1px solid #ddd;
  border-radius: 12px;
  /* default accent variable (can be overridden inline) */
  --accent: #0d6efd;
  max-width: 960px;
  margin: 36px auto;
  line-height: 1.45;
}

/* Prevent long words or links from overflowing the resume width */
.resume,
.resume * {
  box-sizing: border-box;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

/* Make summary paragraphs hyphenate and wrap nicely */
.resume .summary {
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Allow the preview page to present a wider, horizontal resume to avoid overflow */
.preview-horizontal .resume {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  /* give extra internal horizontal padding in the wide preview so text doesn't reach the edge */
  padding-left: 40px !important;
  padding-right: 60px !important;
  border: 1px solid #0d6efd !important;
}

.preview-horizontal .resume-preview-frame {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

html.resume-preview-document,
html.resume-preview-document body.preview-horizontal {
  margin: 0 !important;
  padding: 0 !important;
}

.resume-preview-shell {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 24px;
}

.resume-preview-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-end;
  margin: 18px 0;
  padding: 22px;
  background: #ffffff;
  border: 1px solid rgba(30, 99, 112, 0.14);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(20, 47, 55, 0.08);
}

.resume-preview-toolbar h1 {
  color: #1e6370;
  font-size: 28px;
  font-weight: 800;
  margin: 4px 0 6px;
}

.resume-preview-toolbar p {
  color: #607178;
  line-height: 1.45;
  margin: 0;
}

.resume-preview-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.pdf-preview-stage {
  padding: 18px;
  background: #25292c;
  border: 1px solid #16191b;
  border-radius: 8px;
  box-shadow: 0 22px 50px rgba(18, 28, 32, 0.22);
}

.pdf-preview-viewer {
  display: block;
  width: 100%;
  height: min(82vh, 980px);
  min-height: 720px;
  border: 0;
  background: #33383b;
}

.resume-preview-packs {
  margin-top: 18px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid rgba(30, 99, 112, 0.13);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(20, 47, 55, 0.08);
}

.resume-preview-packs h5 {
  color: #1e6370;
  font-weight: 800;
  margin-bottom: 4px;
}

/* Ensure header's flex children can shrink properly (avoid overflow) */
.resume header > div,
.resume header > div > div {
  min-width: 0;
}

/* Explicit printable wrapper for PDFs/print previews */
.resume.printable {
  padding: 64px 36px !important;
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
}

.resume.resume-premium.printable {
  display: block !important;
  min-height: 0 !important;
  padding: 0 !important;
}

.resume.resume-premium.printable .premium-sidebar,
.resume.resume-premium.printable .premium-main {
  box-sizing: border-box;
}
.resume header h1 {
  margin: 0 0 8px 0;
  font-size: 26px;
  line-height: 1.1;
}
.resume header h2 {
  margin: 0 0 12px 0;
  font-size: 16px;
  color: #555;
}
.resume header .summary {
  font-size: 13px;
  margin-bottom: 10px;
  margin-right: 50px;
}
p.summary {
  margin-right: 50px !important;
}
.resume section {
  margin-top: 18px;
}
.resume section h3 {
  font-size: 15px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 4px;
  margin-bottom: 8px;
}
.resume .links ul {
  padding-left: 0;
  margin: 0.25rem 0 0 0;
}
.resume .links li {
  margin-bottom: 0.25rem;
}
.resume .links a {
  display: block;
  color: #0d6efd;
  text-decoration: none;
}
.resume .links a:hover {
  text-decoration: underline;
}
.theme-dark {
  /* richer dark background with subtle gradient */
  background: linear-gradient(135deg, #0f0f0f 0%, #2a2a2a 100%);
  color: #eee;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
.resume.theme-dark {
  padding: 64px;
}
.theme-dark h1,
.theme-dark h2,
.theme-dark h3 {
  color: #fff;
}
.theme-dark a {
  color: #9fd3ff;
}

/* Force printable / PDF-friendly defaults (DOMPDF and print) */
@media print {
  body,
  .resume,
  .theme-default,
  .theme-dark,
  .resume * {
    background: #ffffff !important;
    color: #222 !important;
  }
  /* Make the resume fill the printable page when generating PDF */
  html,
  body {
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .resume {
    border: none !important;
    box-shadow: none !important;
    /* keep internal padding but remove outer page margins */
    padding: 36px !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    min-height: 100% !important;
  }
  .resume h1 {
    font-size: 26px !important;
  }
  .resume h2 {
    font-size: 16px !important;
  }
  .resume h3 {
    font-size: 15px !important;
  }
  .resume a {
    color: #0d6efd !important;
    text-decoration: underline !important;
  }
}

/* Light theme explicit (default) */
.theme-default {
  /* soft, slightly-tinted light background using a faint gradient */
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  color: #222;
  box-shadow: 0 4px 12px rgba(20, 30, 60, 0.04);
}

/* Accent color packs (applied as class on .resume) */
.resume.accent-blue h1,
.resume.accent-blue h2,
.resume.accent-blue h3 {
  color: #0d6efd;
}
.resume.accent-blue .links a {
  color: #0d6efd;
}

.resume h1,
.resume h2,
.resume h3 {
  color: var(--accent);
}
.resume .links a {
  color: var(--accent);
}

/* legacy accent classes (still available for specificity) */
.resume.accent-blue {
  --accent: #0d6efd;
}
.resume.accent-green {
  --accent: #198754;
}
.resume.accent-red {
  --accent: #dc3545;
}
.resume.accent-teal {
  --accent: #20c997;
}
.resume.accent-purple {
  --accent: #6f42c1;
}

.resume.accent-red h1,
.resume.accent-red h2,
.resume.accent-red h3 {
  color: #dc3545;
}
.resume.accent-red .links a {
  color: #dc3545;
}

.resume.accent-teal h1,
.resume.accent-teal h2,
.resume.accent-teal h3 {
  color: #20c997;
}
.resume.accent-teal .links a {
  color: #20c997;
}

.resume.accent-purple h1,
.resume.accent-purple h2,
.resume.accent-purple h3 {
  color: #6f42c1;
}
.resume.accent-purple .links a {
  color: #6f42c1;
}

/* Bootstrap palette accents */
.resume.accent-primary {
  --accent: #0d6efd;
}
.resume.accent-primary h1,
.resume.accent-primary h2,
.resume.accent-primary h3 {
  color: #0d6efd;
}
.resume.accent-primary .links a {
  color: #0d6efd;
}

.resume.accent-secondary {
  --accent: #6c757d;
}
.resume.accent-secondary h1,
.resume.accent-secondary h2,
.resume.accent-secondary h3 {
  color: #6c757d;
}
.resume.accent-secondary .links a {
  color: #6c757d;
}

.resume.accent-success {
  --accent: #198754;
}
.resume.accent-success h1,
.resume.accent-success h2,
.resume.accent-success h3 {
  color: #198754;
}
.resume.accent-success .links a {
  color: #198754;
}

.resume.accent-danger {
  --accent: #dc3545;
}
.resume.accent-danger h1,
.resume.accent-danger h2,
.resume.accent-danger h3 {
  color: #dc3545;
}
.resume.accent-danger .links a {
  color: #dc3545;
}

.resume.accent-warning {
  --accent: #ffc107;
}
.resume.accent-warning h1,
.resume.accent-warning h2,
.resume.accent-warning h3 {
  color: #856404;
}
.resume.accent-warning .links a {
  color: #856404;
}

.resume.accent-info {
  --accent: #0dcaf0;
}
.resume.accent-info h1,
.resume.accent-info h2,
.resume.accent-info h3 {
  color: #0dcaf0;
}
.resume.accent-info .links a {
  color: #0dcaf0;
}

.resume.accent-light {
  --accent: #f8f9fa;
}
.resume.accent-light h1,
.resume.accent-light h2,
.resume.accent-light h3 {
  color: #212529;
}
.resume.accent-light .links a {
  color: #212529;
}

.resume.accent-dark {
  --accent: #212529;
}
.resume.accent-dark h1,
.resume.accent-dark h2,
.resume.accent-dark h3 {
  color: #212529;
}
.resume.accent-dark .links a {
  color: #212529;
}

/* Education layout tweaks */
.education-item {
  margin-bottom: 10px;
}
.edu-field-list {
  margin: 4px 0 6px 18px;
  padding: 0;
}
.edu-field-list li {
  list-style: disc;
  margin-left: 0;
}
.edu-place {
  font-size: 13px;
  color: #444;
}

/* Slightly larger margins for section content */
.resume section {
  margin-top: 22px;
}
.resume header .summary {
  margin-bottom: 14px;
  /* Ensure summary text is justified and hyphenated — placed late to override earlier rules */
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
}

/* ---------- Additional decorative backgrounds & utilities ---------- */
/* Enhance dark theme with a micro-pattern overlay */
.resume.theme-dark {
  background-image: linear-gradient(135deg, #0f0f0f 0%, #2a2a2a 100%),
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.02) 0 2px,
      transparent 2px 14px
    );
  background-blend-mode: overlay;
  padding: 64px; /* ensures dark theme has comfortable inner spacing */
}

/* Enhance light theme with a soft radial highlight */
.resume.theme-default {
  background-image: radial-gradient(
      circle at 10% 10%,
      rgba(13, 110, 253, 0.03) 0%,
      transparent 12%
    ),
    linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  background-blend-mode: overlay;
}

/* Utility background patterns you can add to the resume wrapper: */
.resume.bg-diagonal {
  background-image: repeating-linear-gradient(
      135deg,
      rgba(0, 0, 0, 0.03) 0 4px,
      transparent 4px 20px
    ),
    linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  background-blend-mode: multiply;
}

.resume.bg-grid {
  background-image: linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.02) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px),
    linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  background-size: 20px 20px, 20px 20px, auto;
  background-blend-mode: multiply;
}

.resume.bg-soft {
  background-image: radial-gradient(
      circle at 20% 10%,
      rgba(255, 215, 180, 0.04) 0%,
      transparent 20%
    ),
    linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.resume {
  transition: background 260ms ease, box-shadow 260ms ease;
}

/* End decorative backgrounds */

/* Color swatches in builder */
.color-swatches {
  margin-top: 10px;
}
.color-swatch {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: inline-block;
  margin: 0 8px 8px 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04) inset;
  padding: 0;
  position: relative;
  overflow: hidden;
}
.color-swatch.selected {
  outline: 3px solid rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}
.color-preview {
  display: inline-block;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  border: 1px solid #ddd;
  margin-left: 8px;
  vertical-align: middle;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) inset;
}

/* small theme preview square next to color controls */
.theme-preview {
  display: inline-block;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  border: 1px solid #ddd;
  margin-left: 8px;
  vertical-align: middle;
}

/* Two-tone support: JS will set a gradient on the swatch and the ::after can add the bottom tint if needed */
.color-swatch::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 50%;
  opacity: 0.95;
  background: var(--swatch-bottom, transparent);
}

/* Theme swatches (Light / Dark) */
.theme-swatches {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.theme-swatch {
  width: 46px;
  height: 36px;
  border-radius: 6px;
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, 0.08);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.theme-swatch .label {
  position: absolute;
  left: 6px;
  bottom: 4px;
  font-size: 11px;
  color: rgba(0, 0, 0, 0.6);
}
.theme-swatch.dark .label {
  color: rgba(255, 255, 255, 0.85);
}
.theme-swatch.selected {
  outline: 3px solid rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

/* Background swatches (bigger, solid blocks) */
.bg-swatches {
  margin-top: 8px;
}
.bg-swatch {
  width: 46px;
  height: 36px;
  border-radius: 6px;
  display: inline-block;
  margin: 0 8px 8px 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04) inset;
}
.bg-swatch.selected {
  outline: 3px solid rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

/* Keep theme preview / color preview sizes consistent */
.color-preview,
.theme-preview {
  transition: background 220ms ease, border 220ms ease;
}

/* Pack swatches: compact document previews for builder color systems */
.pack-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  gap: 10px;
}

.pack-swatch {
  width: 100%;
  min-height: 72px;
  border-radius: 6px;
  border: 1px solid #d8e2e6;
  background: #ffffff;
  cursor: pointer;
  padding: 9px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  box-shadow: 0 6px 18px rgba(20, 47, 55, 0.06);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.pack-swatch:hover {
  border-color: rgba(30, 99, 112, 0.42);
  box-shadow: 0 10px 24px rgba(20, 47, 55, 0.1);
  transform: translateY(-1px);
}

.pack-mini-page {
  display: block;
  width: 38px;
  height: 50px;
  border: 1px solid rgba(23, 48, 56, 0.14);
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  overflow: hidden;
  position: relative;
}

.pack-mini-rail {
  position: absolute;
  inset: 0 auto 0 0;
  width: 13px;
}

.pack-mini-lines {
  position: absolute;
  left: 18px;
  right: 5px;
  top: 10px;
  display: grid;
  gap: 5px;
}

.pack-mini-lines span {
  display: block;
  height: 3px;
  border-radius: 999px;
  opacity: 0.88;
}

.pack-mini-lines span:first-child {
  height: 4px;
}

.pack-swatch .pack-label {
  color: #274852;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pack-swatch.selected {
  border-color: #1e6370;
  box-shadow: 0 0 0 3px rgba(30, 99, 112, 0.16), 0 10px 24px rgba(20, 47, 55, 0.1);
}

.preview-pack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.preview-pack-list form {
  margin: 0;
}

.preview-pack-swatch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 82px;
  height: 38px;
  padding: 4px 7px;
  background: #ffffff;
  border: 1px solid #d5e0e4;
  border-radius: 6px;
  color: #274852;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.preview-pack-swatch:hover,
.preview-pack-swatch.selected {
  border-color: #1e6370;
  box-shadow: 0 0 0 2px rgba(30, 99, 112, 0.14);
}

.preview-pack-page {
  position: relative;
  display: block;
  flex: 0 0 22px;
  width: 22px;
  height: 28px;
  overflow: hidden;
  border: 1px solid rgba(23, 48, 56, 0.16);
  border-radius: 3px;
}

.preview-pack-rail {
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
}

.preview-pack-lines {
  position: absolute;
  top: 7px;
  left: 10px;
  right: 3px;
  display: grid;
  gap: 4px;
}

.preview-pack-lines span {
  display: block;
  height: 2px;
  border-radius: 2px;
}

.job-vacancy-panel,
.job-analysis {
  background: #ffffff;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  padding: 18px;
}

.job-analysis {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.keyword-list span,
.match-count {
  background: #eef4ff;
  border: 1px solid #cfe0ff;
  border-radius: 999px;
  color: #174ea6;
  font-size: 13px;
  padding: 4px 10px;
}

.match-section ul {
  margin-bottom: 10px;
}

.builder-page {
  max-width: 1240px;
}

.builder-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 20px;
  align-items: stretch;
  margin: 18px 0;
  padding: 28px;
  background: #ffffff;
  border: 1px solid rgba(30, 99, 112, 0.14);
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(20, 47, 55, 0.1);
}

.builder-hero h1 {
  color: #1e6370;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.1;
  margin: 8px 0 10px;
}

.builder-hero p,
.builder-panel p,
.builder-section-intro p {
  color: #607178;
  line-height: 1.5;
  margin: 0;
}

.builder-hero-status {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 130px;
  background: #eef3f5;
  border: 1px solid #d7e3e7;
  border-radius: 8px;
  color: #1e6370;
  text-align: center;
}

.builder-hero-status strong {
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
}

.builder-hero-status span {
  color: #607178;
  font-size: 13px;
  font-weight: 700;
}

.builder-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.builder-panel,
.builder-section-intro {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(30, 99, 112, 0.13);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(20, 47, 55, 0.08);
  padding: 22px;
}

.builder-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.builder-panel h2,
.builder-section-intro h2 {
  color: #1e6370;
  font-size: 22px;
  font-weight: 800;
  margin: 3px 0 6px;
}

.builder-step {
  color: #c75b00;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.builder-count {
  flex: 0 0 auto;
  background: #eef3f5;
  border: 1px solid #d7e3e7;
  border-radius: 999px;
  color: #1e6370;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 10px;
}

.builder-section-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 7px;
  align-items: center;
  min-height: 34px;
  padding: 5px 9px;
  background: #eef3f5;
  border: 1px solid #d7e3e7;
  border-radius: 6px;
  color: #1e6370;
  font-size: 12px;
  font-weight: 800;
}

.builder-static-section {
  padding: 14px;
  background: #f8fafb;
  border: 1px dashed #c8d7dc;
  border-radius: 8px;
  color: #607178;
}

.builder-title-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.builder-title-row .form-select {
  min-width: 260px;
}

.builder-title-row .form-control {
  max-width: 520px;
}

.builder-section-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.builder-section-actions {
  display: flex;
  gap: 8px;
  margin: -4px 0 14px;
}

.builder-option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.builder-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-height: 58px;
  margin: 0;
  padding: 12px;
  background: #f8fafb;
  border: 1px solid #dce6e9;
  border-radius: 8px;
  color: #274852;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.builder-option:hover {
  background: #ffffff;
  border-color: rgba(30, 99, 112, 0.36);
  box-shadow: 0 8px 20px rgba(20, 47, 55, 0.08);
}

.builder-option .form-check-input {
  flex: 0 0 auto;
  margin-top: 3px;
}

.builder-option strong {
  display: block;
  color: #24454d;
  font-size: 14px;
  line-height: 1.25;
}

.builder-option small {
  display: block;
  color: #6a7b82;
  font-size: 12px;
  line-height: 1.3;
  margin-top: 4px;
}

.builder-empty {
  background: #f8fafb;
  border: 1px dashed #c8d7dc;
  border-radius: 8px;
  color: #607178;
  padding: 16px;
}

.builder-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
  padding: 14px 0 4px;
  background: linear-gradient(180deg, rgba(238, 243, 245, 0), #eef3f5 32%);
}

.job-title-page {
  max-width: 1240px;
}

.job-title-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 20px;
  align-items: stretch;
  margin: 18px 0;
  padding: 28px;
  background: #ffffff;
  border: 1px solid rgba(30, 99, 112, 0.14);
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(20, 47, 55, 0.1);
}

.job-title-hero h1 {
  color: #1e6370;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.1;
  margin: 8px 0 10px;
}

.job-title-hero p,
.job-title-panel-heading p {
  color: #607178;
  line-height: 1.5;
  margin: 0;
}

.job-title-count {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 120px;
  background: #eef3f5;
  border: 1px solid #d7e3e7;
  border-radius: 8px;
  color: #1e6370;
  text-align: center;
}

.job-title-count strong {
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
}

.job-title-count span {
  color: #607178;
  font-size: 13px;
  font-weight: 700;
}

.job-title-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.job-title-editor,
.job-title-library {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(30, 99, 112, 0.13);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(20, 47, 55, 0.08);
  padding: 22px;
}

.job-title-editor {
  position: static;
}

.job-title-panel-heading {
  margin-bottom: 18px;
}

.job-title-panel-heading h2 {
  color: #1e6370;
  font-size: 22px;
  font-weight: 800;
  margin: 3px 0 6px;
}

.job-title-form {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.job-title-form .form-label {
  color: #274852;
  font-weight: 800;
}

.job-title-form-actions,
.job-title-footer,
.job-title-item-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.job-title-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.job-title-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 16px;
  background: #f8fafb;
  border: 1px solid #dce6e9;
  border-radius: 8px;
}

.job-title-item:hover {
  background: #ffffff;
  border-color: rgba(30, 99, 112, 0.34);
}

.job-title-item h3 {
  color: #1e6370;
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 6px;
}

.job-title-item p {
  color: #566a72;
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

.job-title-item-actions form {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.job-title-empty {
  display: grid;
  gap: 3px;
  padding: 22px;
  background: #f8fafb;
  border: 1px dashed #c8d7dc;
  border-radius: 8px;
  color: #607178;
  text-align: center;
}

.job-title-empty strong {
  color: #1e6370;
}

.job-title-footer {
  justify-content: flex-end;
  margin-top: 18px;
}

.section-manager-page {
  max-width: 1240px;
}

.section-manager-hero,
.section-create-panel,
.section-manager-card {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(30, 99, 112, 0.13);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(20, 47, 55, 0.08);
}

.section-manager-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  margin: 18px 0;
  padding: 28px;
}

.section-manager-hero h1 {
  color: #1e6370;
  font-size: 34px;
  font-weight: 800;
  margin: 8px 0 10px;
}

.section-manager-hero p,
.section-create-panel p,
.section-manager-card-head p {
  color: #607178;
  margin: 0;
}

.section-manager-summary {
  display: flex;
  gap: 8px;
}

.section-manager-summary span {
  display: grid;
  min-width: 86px;
  padding: 12px;
  background: #eef3f5;
  border: 1px solid #d7e3e7;
  border-radius: 8px;
  color: #607178;
  font-size: 12px;
  text-align: center;
}

.section-manager-summary strong {
  color: #1e6370;
  font-size: 24px;
}

.section-create-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(440px, auto);
  gap: 22px;
  align-items: end;
  padding: 22px;
}

.section-create-panel h2,
.section-manager-card h2 {
  color: #1e6370;
  font-size: 22px;
  font-weight: 800;
  margin: 3px 0 6px;
}

.section-create-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 160px auto;
  gap: 8px;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.section-manager-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 14px;
}

.section-placement-group {
  display: grid;
  gap: 12px;
}

.section-placement-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding: 4px 2px;
}

.section-placement-heading h2 {
  color: #1e6370;
  font-size: 20px;
  font-weight: 800;
  margin: 4px 0 0;
}

.section-placement-heading strong {
  color: #607178;
  font-size: 13px;
}

.section-manager-card {
  padding: 20px;
}

.section-manager-card.is-disabled {
  opacity: 0.7;
}

.section-manager-card-head,
.custom-items-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.section-type-label,
.section-state {
  color: #c75b00;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section-state {
  padding: 5px 9px;
  background: #eef3f5;
  border-radius: 999px;
  color: #1e6370;
}

.section-settings-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px 82px auto auto auto;
  gap: 10px;
  align-items: end;
  margin: 16px 0 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.section-settings-form label > span {
  display: block;
  color: #607178;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.section-visible-toggle,
.custom-item-enabled {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 38px;
  color: #274852;
  font-size: 13px;
  font-weight: 700;
}

.custom-items {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #dce6e9;
}

.custom-items-heading h3 {
  color: #1e6370;
  font-size: 17px;
  font-weight: 800;
}

.custom-items-heading span {
  color: #607178;
  font-size: 12px;
}

.custom-item-row,
.custom-item-add {
  display: grid;
  grid-template-columns: minmax(140px, 0.9fr) minmax(150px, 1fr) minmax(190px, 1.2fr) 70px auto auto auto;
  gap: 8px;
  align-items: center;
  margin: 8px 0 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.custom-item-add {
  grid-template-columns: minmax(140px, 0.9fr) minmax(150px, 1fr) minmax(190px, 1.2fr) 70px auto;
  padding-top: 10px !important;
  border-top: 1px dashed #c8d7dc !important;
}

.section-delete-form {
  margin: 14px 0 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.section-manager-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

@media (max-width: 980px) {
  .builder-hero {
    grid-template-columns: 1fr;
  }

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

  .job-title-hero,
  .job-title-layout {
    grid-template-columns: 1fr;
  }

  .job-title-editor {
    position: static;
  }

  .section-manager-hero,
  .section-create-panel {
    grid-template-columns: 1fr;
  }

  .section-settings-form,
  .custom-item-row,
  .custom-item-add {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .builder-hero,
  .builder-panel,
  .builder-section-intro {
    padding: 18px;
  }

  .builder-title-row,
  .builder-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .builder-title-row .form-select,
  .builder-title-row .form-control {
    width: 100% !important;
    max-width: none;
  }

  .builder-option-grid {
    grid-template-columns: 1fr;
  }

  .job-title-hero,
  .job-title-editor,
  .job-title-library {
    padding: 18px;
  }

  .job-title-item {
    grid-template-columns: 1fr;
  }

  .job-title-footer,
  .job-title-form-actions,
  .job-title-item-actions {
    flex-wrap: wrap;
  }

  .section-manager-hero,
  .section-create-panel,
  .section-manager-card {
    padding: 18px;
  }

  .section-manager-summary,
  .section-manager-footer {
    flex-wrap: wrap;
  }

  .section-create-form,
  .section-settings-form,
  .custom-item-row,
  .custom-item-add {
    grid-template-columns: 1fr;
  }
}

/* Social link / icon defaults (ensures icons are visible and links inline) */
.resume .links {
  display: flex;
  gap: 8px; /* reduced gap so icons are closer together */
  align-items: center;
  margin-top: 8px;
  margin-bottom: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  position: relative; /* for the divider pseudo-element */
  padding-top: 10px; /* space to place the divider above icons */
}
.resume .links::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 140px; /* short centered divider above icons */
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 2px;
}
.resume .links a.link-item {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0 !important; /* no gap inside anchor since label removed */
  white-space: nowrap !important;
  flex: 0 0 auto !important;
  color: inherit;
  text-decoration: none;
  padding: 4px !important; /* tighter padding for icon-only links */
  margin-top: 6px; /* ensure icons sit below the divider */
}
.resume .links a.link-item svg,
.resume .links a.link-item img {
  width: 14px !important;
  height: 14px !important;
  display: inline-block !important;
  vertical-align: middle !important;
  flex: 0 0 14px !important;
}
/* Force inline SVG icons to inherit the link color so they are visible */
.resume .links a.link-item svg {
  fill: currentColor !important;
}

/* Premium resume template */
.resume.resume-premium {
  --premium-sidebar-width: 280px;
  --premium-sidebar: #1e6370;
  --premium-sidebar-dark: #195761;
  --premium-paper: #dedbc4;
  --premium-ink: #0f5363;
  --premium-accent: #c75b00;
  --premium-green: #18815b;
  display: flex;
  align-items: stretch;
  max-width: 1050px;
  min-height: 1120px;
  margin: 24px auto;
  padding: 0 !important;
  border: 2px solid #111;
  border-radius: 0;
  background: linear-gradient(
    90deg,
    var(--premium-sidebar) 0,
    var(--premium-sidebar) var(--premium-sidebar-width),
    var(--premium-paper) var(--premium-sidebar-width),
    var(--premium-paper) 100%
  ) !important;
  color: var(--premium-ink) !important;
  box-shadow: 0 18px 45px rgba(18, 34, 38, 0.18);
  font-family: "Segoe UI", sans-serif;
  line-height: 1.42;
  overflow: hidden;
}

.preview-horizontal .resume.resume-premium {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  min-height: 100vh !important;
  padding: 0 !important;
  border: 2px solid #111 !important;
}

.resume-premium .premium-sidebar {
  flex: 0 0 var(--premium-sidebar-width);
  width: var(--premium-sidebar-width);
  background: var(--premium-sidebar);
  color: #ffffff;
  padding: 32px 24px 30px;
  border-right: 4px solid var(--premium-accent);
}

.resume-premium .premium-sidebar-content {
  min-height: 100%;
  box-sizing: border-box;
}

.resume-premium .premium-main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 48px 42px 34px 30px;
  background: var(--premium-paper);
  overflow: visible;
}

.resume-premium .premium-main-content,
.resume-premium .premium-header,
.resume-premium .premium-header p,
.resume-premium .premium-section {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: visible;
  white-space: normal;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  word-break: normal;
}

.resume-premium .premium-photo-wrap {
  width: 176px;
  height: 176px;
  margin: 0 auto 24px;
  border: 5px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  padding: 6px;
  background: var(--premium-sidebar-dark);
}

.resume-premium .premium-photo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.72);
}

.resume-premium .premium-side-section {
  margin-top: 22px;
}

.resume-premium .premium-side-section h3 {
  position: relative;
  color: var(--premium-side-heading, #ffffff) !important;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.18;
  margin: 0 0 10px;
  padding: 0 0 7px 14px;
  border-bottom: 2px solid var(--premium-side-heading, rgba(255, 255, 255, 0.72));
}

.resume-premium .premium-side-section h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.42) 0%,
    var(--premium-side-heading, #ffffff) 52%,
    rgba(255, 255, 255, 0.24) 100%
  );
}

.resume-premium .premium-side-section h3::after {
  content: "";
  position: absolute;
  left: 7px;
  bottom: -2px;
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: var(--premium-side-heading, #ffffff);
}

.resume-premium .premium-contact-list,
.resume-premium .premium-side-list,
.resume-premium .premium-cert-list,
.resume-premium .premium-bullets {
  margin: 0;
  padding: 0;
  list-style: none;
}

.resume-premium .premium-contact-list li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  color: #fff;
  font-size: 13.5px;
  line-height: 1.4;
  margin: 7px 0;
}

.resume-premium .premium-contact-list span {
  flex: 0 0 18px;
  color: #fff;
  font-weight: 400;
  text-align: center;
}

.resume-premium .premium-contact-list span svg,
.resume-premium .premium-contact-list span img {
  width: 14px;
  height: 14px;
  display: inline-block;
  object-fit: contain;
  vertical-align: -2px;
}

.resume-premium .premium-contact-list .premium-contact-icon-wrap svg {
  color: #fff !important;
  fill: #fff !important;
  stroke: #fff;
}

.resume-premium .premium-contact-list .premium-contact-icon {
  filter: brightness(0) invert(1) !important;
}

.resume-premium .premium-contact-list a {
  color: #fff !important;
  text-decoration: none;
}

.resume-premium .premium-side-list li {
  position: relative;
  color: #fff;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  margin: 7px 0;
  padding-left: 24px;
}

.resume-premium .premium-side-list li::before,
.resume-premium .premium-bullets li::before,
.resume-premium .premium-cert-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: currentColor;
  font-size: 15px;
  line-height: 1.1;
  top: -1px;
}

.resume-premium .premium-side-list small {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11.5px;
  font-weight: 500;
  margin-top: 2px;
}

.resume-premium .premium-header {
  margin-bottom: 8px;
}

.resume-premium .premium-header h1 {
  color: var(--premium-ink) !important;
  font-family: "Segoe UI", sans-serif;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.04;
  margin: 0;
  padding-bottom: 6px;
  border-bottom: 4px solid var(--premium-accent);
}

.resume-premium .premium-role {
  color: var(--premium-accent);
  font-family: "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 700;
  margin-top: 6px;
  letter-spacing: 0;
}

.resume-premium .premium-header p {
  color: var(--premium-ink);
  font-family: "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  margin: 8px 0 0;
  text-align: justify;
}

.resume-premium .premium-section {
  margin-top: 16px;
}

.resume-premium,
.resume-premium * {
  font-weight: 400 !important;
}

.resume-premium .premium-section h2 {
  display: inline-block;
  color: var(--premium-accent) !important;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 8px;
  padding: 0;
  border-bottom: 2px solid var(--premium-accent);
}

.resume-premium .premium-item {
  margin: 0 0 16px 14px;
}

.resume-premium .premium-compact-item {
  margin-bottom: 10px;
}

.resume-premium .premium-item h3 {
  color: var(--premium-ink) !important;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.32;
  margin: 0 0 6px;
  border: 0;
  padding: 0;
}

.resume-premium .premium-item h3 span,
.resume-premium .premium-item h3 a {
  font-weight: 500;
  font-size: 12px;
}

.resume-premium .premium-position {
  color: var(--premium-ink);
  font-size: 12px;
  font-weight: 400;
  margin: 0 0 6px 14px;
}

.resume-premium .premium-references-section > h2 {
  margin-bottom: 5px;
}

.resume-premium .premium-reference-item {
  margin: 0 0 7px 8px;
}

.resume-premium .premium-reference-item h3 {
  margin-bottom: 2px;
}

.resume-premium .premium-reference-field {
  display: table;
  width: 100%;
  color: var(--premium-ink);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.25;
  margin: 1px 0;
}

.resume-premium .premium-reference-field > * {
  display: table-cell;
  vertical-align: top;
}

.resume-premium .premium-reference-icon {
  width: 17px;
  padding: 1px 5px 0 0;
  text-align: center;
}

.resume-premium .premium-reference-icon img {
  display: inline-block;
  width: 10px;
  height: 10px;
  opacity: 0.8;
}

.resume-premium .premium-reference-field a {
  color: inherit;
  text-decoration: none;
}

.resume-premium .premium-bullets {
  margin-left: 14px;
}

.resume-premium .premium-bullets li,
.resume-premium .premium-cert-list li {
  position: relative;
  color: var(--premium-ink);
  font-size: 12.8px;
  font-weight: 600;
  line-height: 1.42;
  margin: 3px 0;
  padding-left: 24px;
}

.resume-premium .premium-cert-list {
  column-count: 2;
  column-gap: 28px;
  margin-left: 16px;
}

.resume-premium .premium-cert-list li {
  break-inside: avoid;
  margin-bottom: 7px;
  padding-left: 0;
}

.resume-premium .premium-cert-list span {
  color: var(--premium-green);
  font-weight: 500;
}

.resume-premium .premium-certificate-link {
  display: inline-block;
  color: inherit !important;
  font-size: 11px;
  font-weight: 600;
  margin-left: 4px;
  text-decoration: none !important;
}

.resume-premium .premium-custom-link {
  display: inline-block;
  color: inherit !important;
  font-size: 0.82em;
  font-weight: 600;
  margin-left: 4px;
  text-decoration: none !important;
}

.resume-premium .premium-certificate-provider {
  display: block;
  color: var(--premium-green);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.3;
  margin-top: 2px;
}

/* Profile editor */
.profile-edit-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 28px 0 24px;
}

.profile-edit-hero h1 {
  margin: 4px 0 8px;
}

.profile-edit-hero p,
.profile-edit-section-heading p,
.profile-role-panel p {
  color: #5d6775;
  margin: 0;
}

.profile-edit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: start;
}

.profile-edit-form {
  display: grid;
  gap: 18px;
}

.profile-edit-section,
.profile-role-panel {
  background: #fff;
  border: 1px solid #dce1e7;
  border-radius: 8px;
  padding: 24px;
}

.profile-edit-section-heading {
  display: flex;
  gap: 14px;
  margin-bottom: 22px;
}

.profile-edit-section-heading > span {
  color: #66717f;
  font-size: 12px;
  font-weight: 700;
  padding-top: 4px;
}

.profile-edit-section-heading h2,
.profile-role-panel h2 {
  font-size: 20px;
  margin: 0 0 5px;
}

.profile-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.profile-link-wide {
  grid-column: 1 / -1;
}

.profile-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.profile-role-panel {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 18px;
}

.profile-role-panel strong {
  color: #263445;
  font-size: 14px;
}

@media (max-width: 800px) {
  .profile-edit-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-edit-layout {
    grid-template-columns: 1fr;
  }

  .profile-role-panel {
    position: static;
  }
}

@media (max-width: 560px) {
  .profile-link-grid {
    grid-template-columns: 1fr;
  }

  .profile-link-wide {
    grid-column: auto;
  }
}

/* Authentication */
html.auth-root {
  height: 100%;
  margin: 0;
  padding: 0;
  background: #eaf0f2;
}

body.auth-page {
  min-height: 100%;
  margin: 0;
  padding: 0;
  background: #eaf0f2;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(480px, 1.15fr);
  min-height: 100vh;
}

.auth-brand-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(rgba(23, 78, 89, 0.96), rgba(19, 63, 72, 0.98)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-opacity='.08' d='M0 24h96M0 72h96M24 0v96M72 0v96'/%3E%3C/svg%3E");
  color: #fff;
  padding: clamp(32px, 6vw, 76px);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #1e6370;
  font-size: 22px;
  font-weight: 900;
  text-decoration: none;
}

.auth-brand-light {
  color: #fff;
}

.auth-brand-icon {
  display: inline-grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  background: #c75b00;
  border-radius: 7px;
  color: #fff;
}

.auth-brand-icon svg {
  width: 21px;
  height: 21px;
}

.auth-brand-content {
  position: relative;
  z-index: 1;
}

.auth-brand-panel h1 {
  max-width: 560px;
  color: #fff;
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.04;
  margin: 12px 0 20px;
}

.auth-brand-panel p {
  max-width: 540px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
  line-height: 1.6;
  margin: 0;
}

.auth-benefits {
  display: grid;
  gap: 14px;
  max-width: 540px;
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
}

.auth-benefits li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  font-weight: 650;
}

.auth-benefits svg {
  width: 19px;
  height: 19px;
  color: #f0a463;
}

.auth-security-note {
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.auth-security-note svg {
  width: 17px;
  height: 17px;
  color: #f0a463;
}

.auth-form-panel {
  display: grid;
  place-items: center;
  background: #edf2f3;
  padding: 42px 28px;
}

.auth-form-wrap {
  width: min(100%, 440px);
  background: #fff;
  border: 1px solid #d8e2e5;
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(20, 47, 55, 0.12);
  padding: 34px;
}

.auth-form-wide {
  width: min(100%, 620px);
}

.auth-form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 22px;
  margin-bottom: 26px;
  border-bottom: 1px solid #e3e9eb;
  color: #728087;
  font-size: 12px;
  font-weight: 700;
}

.auth-form-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.auth-form-meta svg {
  width: 15px;
  height: 15px;
}

.auth-form-meta a {
  color: #1e6370;
  font-size: 13px;
  text-decoration: none;
}

.auth-heading {
  margin-bottom: 24px;
}

.auth-heading h1,
.auth-heading h2 {
  color: #173f49;
  font-size: 32px;
  font-weight: 850;
  margin: 6px 0 8px;
}

.auth-heading p {
  color: #65757b;
  line-height: 1.55;
  margin: 0;
}

.auth-form {
  display: grid;
  gap: 17px;
}

.auth-form .form-label {
  color: #304d55;
  font-size: 14px;
  font-weight: 750;
  margin-bottom: 7px;
}

.auth-field {
  min-width: 0;
}

.auth-input-wrap {
  position: relative;
}

.auth-input-wrap > svg {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 14px;
  width: 18px;
  height: 18px;
  color: #75868c;
  transform: translateY(-50%);
  pointer-events: none;
}

.auth-form .auth-input-wrap .form-control {
  min-height: 48px;
  background: #fff;
  padding-left: 43px;
}

.auth-password-wrap .form-control {
  padding-right: 48px;
}

.auth-password-toggle {
  position: absolute;
  z-index: 3;
  top: 50%;
  right: 7px;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: #697b81;
  transform: translateY(-50%);
}

.auth-password-toggle:hover,
.auth-password-toggle:focus {
  background: #edf3f4;
  color: #1e6370;
}

.auth-password-toggle svg {
  width: 17px;
  height: 17px;
}

.auth-field-help {
  display: block;
  color: #7b898e;
  font-size: 11px;
  margin-top: 6px;
}

.auth-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.auth-label-row a,
.auth-switch a,
.auth-back-link,
.auth-debug-link a {
  color: #1e6370;
  font-weight: 750;
}

.auth-label-row a {
  font-size: 13px;
  text-decoration: none;
}

.auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  margin-top: 2px;
}

.auth-submit svg {
  width: 17px;
  height: 17px;
}

.auth-google-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  background: #fff;
  border: 1px solid #cbd7da;
  border-radius: 6px;
  color: #263f46;
  font-weight: 750;
  text-decoration: none;
}

.auth-google-button:hover {
  border-color: #1e6370;
  color: #1e6370;
}

.auth-google-mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid #d8e0e3;
  border-radius: 50%;
  color: #4285f4;
  font-family: "Segoe UI", sans-serif;
  font-weight: 800;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #829095;
  font-size: 12px;
  margin: 20px 0;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #dce5e7;
}

.auth-switch {
  color: #66777d;
  font-size: 14px;
  margin: 24px 0 0;
  text-align: center;
}

.auth-password-meter {
  display: grid;
  gap: 7px;
  color: #77868b;
  font-size: 11px;
}

.auth-password-meter-bar {
  display: block;
  height: 4px;
  overflow: hidden;
  background: #e1e8ea;
  border-radius: 4px;
}

.auth-password-meter-bar > span {
  display: block;
  width: 0;
  height: 100%;
  background: #b7c2c6;
  transition: width 160ms ease, background 160ms ease;
}

.auth-password-meter[data-score="1"] .auth-password-meter-bar > span {
  width: 34%;
  background: #c75b00;
}

.auth-password-meter[data-score="2"] .auth-password-meter-bar > span {
  width: 67%;
  background: #d49a24;
}

.auth-password-meter[data-score="3"] .auth-password-meter-bar > span {
  width: 100%;
  background: #28835f;
}

.auth-password-meter[data-score="3"] .auth-password-meter-label {
  color: #247353;
}

.auth-page-compact {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px !important;
}

.auth-compact-card {
  width: min(100%, 480px);
  background: #fff;
  border: 1px solid #d8e2e5;
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(20, 47, 55, 0.12);
  padding: 32px;
}

.auth-compact-card > .auth-brand {
  display: inline-block;
  margin-bottom: 30px;
}

.auth-back-link {
  display: block;
  font-size: 14px;
  margin-top: 22px;
  text-align: center;
  text-decoration: none;
}

.auth-debug-link {
  display: grid;
  gap: 4px;
  background: #fff8e8;
  border: 1px solid #ead8a7;
  border-radius: 6px;
  color: #604d20;
  font-size: 13px;
  padding: 12px;
}

@media (max-width: 860px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-brand-panel {
    min-height: 300px;
    padding: 32px;
  }

  .auth-brand-panel h1 {
    font-size: 40px;
  }

  .auth-benefits {
    display: none;
  }
}

@media (max-width: 560px) {
  .auth-field-grid {
    grid-template-columns: 1fr;
  }

  .auth-form-panel {
    padding: 34px 20px;
  }

  .auth-brand-panel {
    min-height: 240px;
  }

  .auth-brand-panel h1 {
    font-size: 34px;
  }

  .auth-compact-card {
    padding: 24px;
  }

  .auth-form-wrap {
    padding: 24px;
  }

  .auth-form-meta {
    margin-bottom: 22px;
  }
}

.resume-premium .premium-cert-list li::before {
  position: static;
  display: inline-block;
  margin-right: 10px;
  line-height: 1;
}

.certification-page {
  max-width: 1180px;
}

.certification-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 20px;
  align-items: stretch;
  margin: 18px 0;
  padding: 26px;
  background: #ffffff;
  border: 1px solid rgba(30, 99, 112, 0.14);
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(20, 47, 55, 0.1);
}

.certification-hero h1 {
  color: #1e6370;
  font-size: 32px;
  font-weight: 800;
  margin: 7px 0 8px;
}

.certification-hero p {
  color: #607178;
  margin: 0;
}

.certification-count {
  display: grid;
  place-items: center;
  align-content: center;
  background: #eef3f5;
  border: 1px solid #d7e3e7;
  border-radius: 8px;
  color: #607178;
  text-align: center;
}

.certification-count strong {
  color: #1e6370;
  font-size: 38px;
  line-height: 1;
}

.certification-editor,
.certification-library {
  padding: 20px;
  background: #ffffff;
  border: 1px solid rgba(30, 99, 112, 0.13);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(20, 47, 55, 0.08);
}

.certification-form {
  display: grid;
  grid-template-columns: minmax(190px, 1.1fr) minmax(170px, 0.9fr) 90px minmax(240px, 1.2fr) auto;
  gap: 10px;
  align-items: end;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

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

.reference-form .certification-form-actions {
  grid-column: 1 / -1;
}

.certification-form label > span {
  display: block;
  color: #607178;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.certification-form-actions,
.certification-item-actions,
.certification-footer {
  display: flex;
  gap: 8px;
  align-items: center;
}

.certification-library {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.certification-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 15px;
  background: #f8fafb;
  border: 1px solid #dce6e9;
  border-radius: 8px;
}

.certification-item h2 {
  color: #1e6370;
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 4px;
}

.certification-item p {
  color: #607178;
  font-size: 13px;
  margin: 0 0 4px;
}

.certification-item a {
  overflow-wrap: anywhere;
}

.certification-item-actions form {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.certification-footer {
  justify-content: flex-end;
  margin-top: 16px;
}

@media (max-width: 980px) {
  .certification-hero,
  .certification-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .certification-hero,
  .certification-editor,
  .certification-library {
    padding: 18px;
  }

  .certification-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  html,
  body {
    padding: 12px;
  }

  .resume.resume-premium {
    display: block;
    min-height: 0;
  }

  .resume-premium .premium-sidebar {
    width: auto;
    border-right: 0;
    border-bottom: 4px solid var(--premium-accent);
  }

  .resume-premium .premium-main {
    padding: 30px 24px;
  }

  .resume-premium .premium-cert-list {
    column-count: 1;
  }
}
