:root {
  --primary: #173B6C;
  --secondary: #2F80ED;
  --light-blue: #EAF3FF;
  --page-bg: #F5F7FA;
  --white: #FFFFFF;
  --text: #263238;
  --muted: #607D8B;
  --success: #198754;
  --warning: #F59E0B;
  --danger: #DC3545;
  --border: #DDE3EA;
  --sidebar-bg: #071b2f;
  --sidebar-accent: #224a78;
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
}

body, .app-shell, .card, .table, .form-control, .form-select, .btn {
  transition: all 0.2s ease-in-out;
}

.app-body {
  background: linear-gradient(135deg, #f7fbff 0%, #eef4ff 100%);
}

.app-shell {
  min-height: 100vh;
  display: flex;
}

.app-sidebar {
  width: 280px;
  background: var(--sidebar-bg);
  color: #f8fbff;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1030;
  transform: translateX(0);
  overflow-y: auto;
  transition: transform 0.25s ease;
}

.app-main {
  flex: 1;
  margin-left: 280px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.4rem 0.2rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-subtitle {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.72);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.9rem;
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  font-weight: 600;
}

.sidebar-link:hover,
.sidebar-link:focus,
.sidebar-link.active {
  background: rgba(255,255,255,0.12);
  color: #ffffff;
  text-decoration: none;
}

.nav-icon {
  width: 1.2rem;
  text-align: center;
  color: #6dd3ff;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.5rem;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.sidebar-toggle {
  display: none;
  border: 0;
  background: var(--light-blue);
  color: var(--primary);
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.8rem;
  padding: 0.5rem;
}

.sidebar-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  margin: 4px 0;
}

.header-action {
  border: 0;
  background: var(--light-blue);
  color: var(--primary);
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 0.75rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.user-pill__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  font-weight: 700;
}

.user-role {
  font-size: 0.8rem;
  color: var(--muted);
}

.page-content {
  padding: 1.4rem 1.5rem 2rem;
}

.page-title {
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.page-subtitle {
  color: var(--muted);
  margin-bottom: 0;
}

.card {
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(23, 59, 108, 0.06);
}

.btn {
  border-radius: 999px;
  padding: 0.7rem 1.1rem;
  font-weight: 600;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  color: var(--white);
}

.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  color: var(--white);
}

.btn-danger {
  background: var(--danger);
  border: none;
  color: var(--white);
}

.btn-danger:hover, .btn-danger:focus {
  background: #c82333;
  color: var(--white);
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--secondary);
}

.btn-outline-primary:hover {
  background: var(--light-blue);
  color: var(--primary);
}

.form-control, .form-select, .form-control:focus, .form-select:focus {
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  color: var(--text);
}

.form-control:focus, .form-select:focus {
  box-shadow: 0 0 0 0.2rem rgba(47, 128, 237, 0.15);
  border-color: var(--secondary);
}

.table thead th {
  background: var(--light-blue);
  color: var(--primary);
  font-weight: 700;
}

.table-hover tbody tr:hover {
  background: #f7fbff;
}

.badge {
  font-weight: 600;
}

.bg-primary-soft {
  background: rgba(23, 59, 108, 0.12);
  color: var(--primary);
}

.bg-success-soft {
  background: rgba(25, 135, 84, 0.12);
  color: var(--success);
}

.bg-info-soft {
  background: rgba(47, 128, 237, 0.12);
  color: var(--secondary);
}

.bg-warning-soft {
  background: rgba(245, 158, 11, 0.14);
  color: var(--warning);
}

.bg-light-blue {
  background: var(--light-blue);
  color: var(--secondary);
}

.bg-danger-soft {
  background: rgba(220, 53, 69, 0.12);
  color: var(--danger);
}

.alert-success-soft {
  background: rgba(25, 135, 84, 0.12);
  color: var(--success);
  border: 1px solid rgba(25, 135, 84, 0.18);
}

.alert-danger-soft {
  background: rgba(220, 53, 69, 0.12);
  color: var(--danger);
  border: 1px solid rgba(220, 53, 69, 0.18);
}

.metric-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 1.1rem;
  box-shadow: 0 8px 22px rgba(23, 59, 108, 0.05);
}

.metric-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 0.8rem;
  font-size: 1.1rem;
}

.metric-label {
  color: var(--muted);
  font-size: 0.85rem;
}

.metric-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.hero-shell {
  padding: 2rem;
  background: linear-gradient(135deg, var(--light-blue), var(--white));
  border: 1px solid var(--border);
  border-radius: 1.5rem;
}

.hero-card, .feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: 0 10px 28px rgba(23, 59, 108, 0.06);
}

.hero-badge {
  display: inline-block;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--light-blue);
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 1rem;
}

.feature-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.feature-list li {
  padding: 0.45rem 0;
  color: var(--text);
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.page-header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.status-badge.active {
  background: rgba(25, 135, 84, 0.12);
  color: var(--success);
}

.status-badge.inactive {
  background: rgba(220, 53, 69, 0.12);
  color: var(--danger);
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  background: var(--white);
  border: 1px dashed var(--border);
  border-radius: 1.2rem;
}

.sidebar-backdrop {
  display: none;
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #f8fbff 0%, #eef4ff 100%);
}

@media (max-width: 991px) {
  .app-sidebar {
    transform: translateX(-100%);
    box-shadow: 0 18px 40px rgba(7, 27, 47, 0.4);
  }

  .app-main {
    margin-left: 0;
  }

  .sidebar-toggle {
    display: inline-block;
  }

  .app-shell.sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(7, 27, 47, 0.55);
    z-index: 1020;
  }

  .app-shell.sidebar-open .sidebar-backdrop {
    display: block;
  }
}

@media (max-width: 767px) {
  .app-header {
    padding: 1rem;
    flex-wrap: wrap;
    gap: 0.8rem;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .page-content {
    padding: 1rem;
  }
}

.employee-filters { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(150px, 1fr)) auto auto; gap: .75rem; }
.employee-cell { display: flex; align-items: center; gap: .85rem; min-width: 210px; }
.employee-avatar, .profile-avatar { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.profile-avatar { width: 92px; height: 92px; font-size: 1.6rem; }
.placeholder-avatar { display: inline-grid; place-items: center; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; font-weight: 700; }
.status-badge.pending { background: rgba(245,158,11,.14); color: #9a6500; }
.form-section { background: #fff; border: 1px solid var(--border); border-radius: 1.2rem; padding: 1.4rem; margin-bottom: 1rem; box-shadow: 0 8px 22px rgba(23,59,108,.04); }
.form-section h4 { color: var(--primary); font-size: 1.05rem; font-weight: 700; padding-bottom: .8rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border); }
.section-help { color: var(--muted); font-size: .88rem; }
.form-actions, .profile-actions { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; margin-top: 1.25rem; }
.profile-header { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; padding: 1.5rem; margin-bottom: 1rem; border-radius: 1.25rem; color: #fff; background: linear-gradient(135deg, #071b2f, #173b6c); }
.profile-header .status-badge.active { background: rgba(122,231,170,.2); color: #baf3d2; }
.profile-header .status-badge.inactive, .profile-header .status-badge.pending { background: rgba(255,255,255,.13); color: #fff; }
.profile-header .profile-actions { margin-top: 0; justify-content: flex-end; }
.profile-header .btn-outline-secondary { border-color: rgba(255,255,255,.55); color: #fff; }
.employee-action { min-height: 44px; padding: .65rem 1rem; border: 0; color: #fff !important; font-weight: 700; box-shadow: 0 4px 12px rgba(0,0,0,.16); }
.employee-action:hover, .employee-action:focus { color: #fff !important; filter: brightness(.92); }
.employee-action-edit { background: #1769d2; }
.employee-action-pin { background: #c66a00; }
.employee-action-deactivate { background: #c92a3a; }
.employee-action-activate { background: #168247; }
.employee-action-print { background: #34495e; }
.employee-profile-header { padding: 1.65rem; }
.employee-profile-header p { color: #f1f5f9; }
.employee-profile-header .status-badge { font-weight: 700; }
.details-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.payroll-section { grid-column: 1 / -1; }
.detail-list { display: grid; grid-template-columns: minmax(120px, .7fr) 1.5fr; gap: .7rem 1rem; margin: 0; }
.detail-list dt { color: #3f4d5d; font-weight: 700; }
.detail-list dd { margin: 0; color: #17212b; font-weight: 500; overflow-wrap: anywhere; }
.details-grid .form-section h4 { color: #123c70; font-weight: 800; }
.details-grid .section-help, .employee-field-help { color: #536273; }
.employee-print-brand, .employee-print-footer { display: none; }
.employee-photo-preview { width: 90px; height: 90px; object-fit: cover; border-radius: 1rem; }
.photo-editor { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 1.25rem; align-items: center; }
.photo-preview-frame { width: 180px; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--border); border-radius: 1rem; background: #f4f7fb; }
.photo-preview { width: 100%; height: 100%; object-fit: cover; }
.photo-placeholder { width: 100%; height: 100%; display: grid; place-items: center; align-content: center; gap: .35rem; color: var(--muted); text-align: center; }
.photo-placeholder span { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; font-size: 2rem; }
.photo-editor-actions { min-width: 0; }
.photo-client-error, .camera-error { margin-top: .75rem; padding: .75rem .9rem; border: 1px solid rgba(220,53,69,.25); border-radius: .75rem; background: rgba(220,53,69,.08); color: var(--danger); }
.camera-open { overflow: hidden; }
.camera-dialog { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 1rem; }
.camera-dialog-backdrop { position: absolute; inset: 0; background: rgba(7,27,47,.76); backdrop-filter: blur(3px); }
.camera-dialog-panel { position: relative; width: min(680px, 100%); max-height: calc(100vh - 2rem); overflow: auto; border-radius: 1.25rem; background: #fff; box-shadow: 0 24px 70px rgba(0,0,0,.35); }
.camera-dialog-header { display: flex; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.25rem; }
.camera-dialog-header h5 { margin: 0 0 .2rem; color: var(--primary); font-weight: 700; }
.camera-dialog-header p { margin: 0; color: var(--muted); font-size: .9rem; }
.camera-close { width: 44px; height: 44px; flex: 0 0 auto; border: 0; border-radius: 50%; background: #eef3f9; color: var(--primary); font-size: 1.65rem; line-height: 1; }
.camera-stage { position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: #071b2f; }
.camera-stage video, .camera-stage img { width: 100%; height: 100%; object-fit: cover; }
.camera-stage video { transform: scaleX(-1); }
.camera-loading { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(7,27,47,.5); }
.camera-error { margin: 1rem 1.25rem 0; }
.camera-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .65rem; padding: 1.1rem 1.25rem 1.25rem; }
.form-card { max-width: 620px; }

@media (max-width: 1100px) { .employee-filters { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 767px) {
  .employee-filters, .details-grid { grid-template-columns: 1fr; }
  .profile-header { align-items: flex-start; flex-direction: column; }
  .profile-header .profile-actions { justify-content: flex-start; }
  .detail-list { grid-template-columns: 1fr; gap: .2rem; }
  .detail-list dd { margin-bottom: .7rem; }
  .form-actions .btn, .profile-actions .btn, .profile-actions form { width: 100%; }
  .profile-actions form .btn { width: 100%; }
  .photo-editor { grid-template-columns: 1fr; }
  .photo-preview-frame { width: min(100%, 320px); }
  .camera-dialog { padding: 0; align-items: end; }
  .camera-dialog-panel { max-height: 100vh; border-radius: 1.25rem 1.25rem 0 0; }
  .camera-dialog-actions .btn { flex: 1 1 135px; min-height: 46px; }
}


.alert-danger-soft {
  background: rgba(220, 53, 69, 0.10);
  border: 1px solid rgba(220, 53, 69, 0.2);
  color: var(--danger);
  border-radius: 0.9rem;
  padding: 0.9rem 1rem;
}

.footer {
  background: var(--white);
  color: var(--muted);
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.btn:focus, .btn:active:focus, .form-control:focus, .form-select:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(47, 128, 237, 0.18);
}

@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-shell {
    padding: 1.2rem;
  }
}

.sidebar-link.active { box-shadow: inset 3px 0 0 #6dd3ff; }
.sidebar-link.disabled { cursor: not-allowed; opacity: .58; }
.empty-state-icon { display: inline-grid; place-items: center; width: 3.5rem; height: 3.5rem; margin-bottom: 1rem; border-radius: 1rem; background: var(--light-blue); color: var(--primary); font-size: 1.8rem; }
.search-form, .table-actions { display: flex; gap: 0.5rem; justify-content: flex-end; }
.search-form .form-control { min-width: 220px; }
.field-validation-error { display: block; margin-top: 0.35rem; font-size: 0.85rem; }
.input-validation-error { border-color: var(--danger) !important; }

.attendance-clock-card { max-width: 820px; margin: 0 auto; padding: 1.5rem; border: 1px solid var(--border); border-radius: 1.25rem; background: #fff; box-shadow: 0 12px 30px rgba(23,59,108,.08); }
.attendance-fields { display: grid; grid-template-columns: minmax(0,1.8fr) minmax(180px,.7fr); gap: 1rem; }
.attendance-control { min-height: 50px; font-size: 1rem; }
.employee-combobox { position: relative; }
.employee-options { position: absolute; z-index: 1000; top: calc(100% - 1px); left: 0; right: 0; max-height: 280px; overflow-y: auto; border: 1px solid #9aa9ba; border-radius: 0 0 .8rem .8rem; background: #fff; box-shadow: 0 12px 25px rgba(7,27,47,.16); }
.employee-options button { display: block; width: 100%; padding: .8rem .9rem; border: 0; border-bottom: 1px solid #e6ebf1; background: #fff; color: #17212b; text-align: left; }
.employee-options button:hover, .employee-options button:focus { background: #eaf3ff; color: #0b4d9b; outline: 0; }
.employee-options-empty { padding: 1rem; color: #536273; }
.attendance-status { margin: 1rem 0; padding: .9rem 1rem; border-radius: .8rem; }
.attendance-status.clocked-out { border: 1px solid #a9b6c3; background: #f3f6f9; color: #283746; }
.attendance-status.clocked-in { border: 1px solid #7cc59c; background: #e8f7ee; color: #126437; }
.attendance-roster { margin: -0.25rem 0 1rem; padding: .75rem 1rem; border-left: 4px solid #2f80ed; background: #eef5ff; color: #23364a; }
.attendance-camera { display: grid; gap: .8rem; margin: 1rem 0; padding: 1rem; border: 1px solid var(--border); border-radius: 1rem; background: #f8fafc; }
.attendance-camera h3 { margin: 0 0 .2rem; font-size: 1rem; color: #123c70; }
.attendance-camera p { margin: 0; color: #536273; }
.attendance-camera-frame { display: grid; place-items: center; width: min(100%, 480px); aspect-ratio: 4 / 3; overflow: hidden; border-radius: .9rem; background: #071b2f; color: #fff; }
.attendance-camera-frame video, .attendance-camera-frame canvas { width: 100%; height: 100%; object-fit: cover; }
.attendance-camera-frame video { transform: scaleX(-1); }
.attendance-submit { width: 100%; min-height: 54px; font-size: 1.05rem; font-weight: 700; }

@media (max-width: 767px) {
  .user-pill > div:last-child { display: none; }
  .page-header-actions, .search-form { width: 100%; flex-wrap: wrap; }
  .search-form .form-control { min-width: 0; flex: 1 1 150px; }
  .table-actions { justify-content: flex-start; }
  .attendance-clock-card { padding: 1rem; }
  .attendance-fields { grid-template-columns: 1fr; }
  .employee-options button { min-height: 48px; }
}

@page {
  size: A4 portrait;
  margin: 12mm;
}

@media print {
  html, body {
    width: 100%;
    min-width: 0;
    background: #fff !important;
    color: #1b1f23 !important;
    font-size: 9.5pt;
  }

  .app-sidebar,
  .sidebar-backdrop,
  .app-header,
  .profile-actions,
  .form-actions,
  .page-content > .alert,
  .sidebar-toggle {
    display: none !important;
  }

  .app-shell,
  .app-main,
  .page-content,
  main {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #fff !important;
  }

  .employee-print-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 7mm;
    padding-bottom: 3mm;
    border-bottom: 1px solid #55606c;
    color: #17212b;
  }

  .employee-print-brand .brand-mark {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .employee-print-brand strong,
  .employee-print-brand span {
    display: block;
  }

  .employee-print-brand strong {
    font-size: 15pt;
  }

  .employee-print-brand span {
    color: #3f4d5d;
    font-size: 8.5pt;
  }

  .employee-profile-header {
    padding: 4mm !important;
    margin-bottom: 4mm;
    border: 1px solid #697480;
    border-radius: 3mm;
    color: #17212b !important;
    background: #fff !important;
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .employee-profile-header h2,
  .employee-profile-header p {
    color: #17212b !important;
  }

  .employee-profile-header .profile-avatar {
    width: 23mm;
    height: 23mm;
  }

  .employee-profile-header .status-badge {
    border: 1px solid #5d6874;
    background: #fff !important;
    color: #17212b !important;
  }

  .details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3mm;
  }

  .details-grid .form-section {
    min-width: 0;
    margin: 0;
    padding: 3.5mm;
    border: 1px solid #a7afb8;
    border-radius: 2.5mm;
    background: #fff !important;
    box-shadow: none;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .details-grid .form-section h4 {
    margin-bottom: 2.5mm;
    padding-bottom: 1.5mm;
    color: #17212b;
    font-size: 10.5pt;
  }

  .detail-list {
    grid-template-columns: minmax(28mm, .75fr) 1.4fr;
    gap: 1.2mm 2.5mm;
  }

  .detail-list dt,
  .detail-list dd,
  .section-help {
    color: #252b31 !important;
    overflow-wrap: anywhere;
  }

  .alert {
    display: none !important;
  }

  .employee-print-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 5mm;
    padding-top: 2.5mm;
    border-top: 1px solid #7b858f;
    color: #3f4d5d;
    font-size: 8pt;
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
.page-navigation {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1rem;
    margin-bottom: 1rem;
}

.page-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    padding: 0;
    margin: 0;
    list-style: none;
    min-width: 0;
    color: var(--bs-secondary-color);
    font-size: .9rem;
}

.page-breadcrumbs li:not(:last-child)::after {
    content: "›";
    margin-left: .35rem;
    color: var(--bs-border-color);
}

.page-breadcrumbs a {
    color: inherit;
    text-decoration: none;
}

.page-breadcrumbs a:hover,
.page-breadcrumbs a:focus-visible {
    color: var(--bs-primary);
    text-decoration: underline;
}

.page-back-button {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: .55rem .9rem;
    border: 1px solid var(--bs-primary);
    border-radius: .5rem;
    background: var(--bs-body-bg);
    color: var(--bs-primary);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.page-back-button:hover,
.page-back-button:focus-visible {
    background: var(--bs-primary);
    color: #fff;
}

@media (max-width: 575.98px) {
    .page-navigation {
        align-items: stretch;
    }

    .page-breadcrumbs {
        flex-basis: 100%;
        overflow-wrap: anywhere;
    }

    .page-back-button {
        width: 100%;
        justify-content: center;
    }
}
