/* v1.7.27 — Vuexy/TSC shell adapted for Silsilah Keluarga.
   Source visual reference: user-provided Tel-U Student Card project.
   Primary color intentionally kept at Vuexy purple #7367f0. */

html { font-size: 16px; }

:root,
[data-bs-theme="light"] {
  --primary: #7367f0;
  --primary-soft: #eeecff;
  --primary-dark: #685dd8;
  --bg: var(--bs-body-bg);
  --card: var(--bs-paper-bg);
  --text: var(--bs-heading-color);
  --muted: var(--bs-secondary-color);
  --border: var(--bs-border-color);
  --success: var(--bs-success);
  --danger: var(--bs-danger);
  --warning: var(--bs-warning);
  --info: var(--bs-info);
  --sidebar: var(--bs-paper-bg);
  --sidebar-text: var(--bs-body-color);
  --radius: .5rem;
}

[data-bs-theme="dark"] {
  --primary: #7367f0;
  --primary-soft: rgba(115, 103, 240, .18);
  --primary-dark: #8f85f3;
  --bg: var(--bs-body-bg);
  --card: var(--bs-paper-bg);
  --text: var(--bs-heading-color);
  --muted: var(--bs-secondary-color);
  --border: var(--bs-border-color);
  --sidebar: var(--bs-paper-bg);
  --sidebar-text: var(--bs-body-color);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --primary: #7367f0;
  --primary-soft: rgba(115, 103, 240, .18);
  --primary-dark: #8f85f3;
  --bg: var(--bs-body-bg);
  --card: var(--bs-paper-bg);
  --text: var(--bs-heading-color);
  --muted: var(--bs-secondary-color);
  --border: var(--bs-border-color);
  --sidebar: var(--bs-paper-bg);
  --sidebar-text: var(--bs-body-color);
}

/* Match the TSC/Vuexy fixed-navbar spacing (normally supplied by demo.css). */
.layout-navbar-fixed .layout-wrapper:not(.layout-horizontal):not(.layout-without-menu) .layout-page {
  padding-top: 72px !important;
}

.family-vuexy-body {
  min-height: 100vh;
  background: var(--bs-body-bg);
  color: #4b465c;
  font-family: var(--bs-body-font-family);
  font-size: var(--bs-body-font-size);
  font-weight: 500;
}
[data-bs-theme="dark"] .family-vuexy-body,
html[data-theme="dark"] .family-vuexy-body { color: #d7d2df; }
.family-vuexy-body .text-body-secondary,
.family-vuexy-body .text-muted,
.family-vuexy-body .page-subtitle { color: #6f6b7d !important; }
[data-bs-theme="dark"] .family-vuexy-body .text-body-secondary,
[data-bs-theme="dark"] .family-vuexy-body .text-muted,
[data-bs-theme="dark"] .family-vuexy-body .page-subtitle,
html[data-theme="dark"] .family-vuexy-body .text-body-secondary,
html[data-theme="dark"] .family-vuexy-body .text-muted,
html[data-theme="dark"] .family-vuexy-body .page-subtitle { color: #b8b2c2 !important; }

/* Vuexy/TSC menu */
.family-vuexy-body .layout-menu {
  z-index: 1081;
  background: linear-gradient(180deg, #7367f0 0%, #685dd8 100%) !important;
  box-shadow: .125rem 0 1rem rgba(47, 43, 61, .18);
  color: #fff;
}
.family-vuexy-body .family-app-brand {
  height: 72px;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
}
.family-vuexy-body .family-app-brand .app-brand-link {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  color: #fff;
}
.family-brand-logo {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: .625rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #7367f0;
  box-shadow: 0 .25rem .75rem rgba(115, 103, 240, .28);
  font-size: 1.25rem;
}
.family-vuexy-body .layout-menu .family-brand-logo {
  color: #7367f0;
  background: #fff;
  box-shadow: 0 .25rem .75rem rgba(38, 31, 117, .22);
}
.family-brand-initials { font-size: .72rem; font-weight: 800; letter-spacing: -.02em; }
.family-brand-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  letter-spacing: normal !important;
  text-transform: none !important;
}
.family-brand-text strong {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
}
.family-brand-text small {
  margin-top: .22rem;
  color: rgba(255,255,255,.78);
  font-size: .6875rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 11.5rem;
}
.family-sidebar-toggle,
.family-menu-close {
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.9);
  cursor: pointer;
}
.family-sidebar-toggle {
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  border-radius: 50%;
}
.family-sidebar-toggle:hover,
.family-menu-close:hover { color: #fff; background: rgba(255,255,255,.14); }
.family-menu-close { width: 2.25rem; height: 2.25rem; border-radius: .5rem; }

.family-vuexy-body .menu-inner { padding-inline: .75rem; }
.family-vuexy-body .menu-header {
  margin: .45rem 0 .25rem;
  padding-inline: .75rem;
  color: rgba(255,255,255,.60);
}
.family-vuexy-body .menu-header-text { font-size: .6875rem; letter-spacing: .05rem; font-weight: 700; }
.family-vuexy-body .menu-item { margin: .125rem 0; }
.family-vuexy-body .menu-link {
  min-height: 2.625rem;
  border-radius: .375rem;
  color: rgba(255,255,255,.88);
  font-weight: 600;
}
.family-vuexy-body .menu-link:hover { background: rgba(255,255,255,.11); color: #fff; }
.family-vuexy-body .menu-item.active > .menu-link {
  color: #5f54d5;
  background: #fff;
  box-shadow: 0 .2rem .65rem rgba(47, 38, 140, .24);
}
.family-vuexy-body .menu-item.active > .menu-link .menu-icon { color: #7367f0; }
.family-vuexy-body .menu-icon { color: rgba(255,255,255,.82); font-size: 1.25rem; }

/* The core template handles width/padding. This only keeps brand compact when collapsed. */
@media (min-width: 1200px) {
  .layout-menu-collapsed .family-app-brand { padding-inline: .9rem; }
  .layout-menu-collapsed .family-brand-text { opacity: 0; width: 0; overflow: hidden; }
  .layout-menu-collapsed .family-sidebar-toggle { position: absolute; right: -.65rem; top: 1.35rem; background: #fff; color: #7367f0; box-shadow: 0 .125rem .5rem rgba(47,43,61,.22); }
  .layout-menu-collapsed .family-sidebar-toggle:hover { background: #f4f2ff; color: #685dd8; }
  .layout-menu-collapsed .layout-menu .menu-header::before { background-color: rgba(255,255,255,.45) !important; }
}

/* Navbar */
.family-vuexy-body .layout-navbar.navbar-detached {
  margin: .75rem 1.5rem 0;
  width: auto;
  max-width: none;
  min-width: 0;
  min-height: 4rem;
  padding: 0 1rem;
  border: 1px solid rgba(var(--bs-body-color-rgb), .08);
  border-radius: .5rem;
  background: color-mix(in srgb, var(--bs-paper-bg) 94%, transparent) !important;
  box-shadow: var(--bs-box-shadow-sm);
  backdrop-filter: saturate(160%) blur(8px);
}
.family-navbar-date { font-size: .8125rem; white-space: nowrap; }
.family-navbar-actions { min-width: 0; }
.family-mobile-menu-btn { border: 0; background: transparent; color: var(--bs-body-color); font-size: 1.35rem; }
.family-user-chip { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.family-user-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--bs-primary-bg-subtle);
  color: var(--bs-primary);
  font-weight: 700;
  display: grid;
  place-items: center;
  flex: 0 0 2.25rem;
}
.family-user-meta { min-width: 0; line-height: 1.15; }
.family-user-meta strong { display: block; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8125rem; color: var(--bs-heading-color); }
.family-user-meta small { display: block; margin-top: .18rem; max-width: 15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--bs-secondary-color); font-size: .6875rem; }
.family-logout-btn { gap: .35rem !important; }

/* Preferences rendered in the Vuexy navbar */
.family-vuexy-body .preference-controls { gap: .35rem; }
.family-vuexy-body .language-switch,
.family-vuexy-body .theme-toggle {
  border-color: var(--bs-border-color);
  background: var(--bs-paper-bg);
  box-shadow: none;
}
.family-vuexy-body .language-switch { border-radius: .5rem; padding: .15rem; }
.family-vuexy-body .preference-option {
  min-width: 1.85rem;
  padding: .38rem .45rem;
  border-radius: .375rem;
  color: var(--bs-secondary-color);
  font-size: .6875rem;
}
.family-vuexy-body .preference-option.active { background: var(--bs-primary); color: #fff; }
.family-vuexy-body .theme-toggle {
  min-height: 2.25rem;
  height: 2.25rem;
  border-radius: .5rem;
  color: var(--bs-body-color);
  padding: 0 .65rem;
}

/* Stronger typography for the family application. */
.family-vuexy-body .card,
.family-vuexy-body .table,
.family-vuexy-body .form-control,
.family-vuexy-body .form-select,
.family-vuexy-body .select2-container,
.family-vuexy-body .family-modal { color: #4b465c; }
.family-vuexy-body .table td,
.family-vuexy-body .form-label,
.family-vuexy-body label { font-weight: 500; }
.family-vuexy-body .table th,
.family-vuexy-body .card-header,
.family-vuexy-body .page-title { color: #2f2b3d; font-weight: 700; }
[data-bs-theme="dark"] .family-vuexy-body .card,
[data-bs-theme="dark"] .family-vuexy-body .table,
[data-bs-theme="dark"] .family-vuexy-body .form-control,
[data-bs-theme="dark"] .family-vuexy-body .form-select,
[data-bs-theme="dark"] .family-vuexy-body .select2-container,
[data-bs-theme="dark"] .family-vuexy-body .family-modal,
html[data-theme="dark"] .family-vuexy-body .card,
html[data-theme="dark"] .family-vuexy-body .table,
html[data-theme="dark"] .family-vuexy-body .form-control,
html[data-theme="dark"] .family-vuexy-body .form-select,
html[data-theme="dark"] .family-vuexy-body .select2-container,
html[data-theme="dark"] .family-vuexy-body .family-modal { color: #d7d2df; }
[data-bs-theme="dark"] .family-vuexy-body .table th,
[data-bs-theme="dark"] .family-vuexy-body .card-header,
[data-bs-theme="dark"] .family-vuexy-body .page-title,
html[data-theme="dark"] .family-vuexy-body .table th,
html[data-theme="dark"] .family-vuexy-body .card-header,
html[data-theme="dark"] .family-vuexy-body .page-title { color: #eeeaf2; }

/* Keep the fixed detached navbar inside the viewport. */
@media (min-width: 1200px) {
  html:not(.layout-menu-collapsed) .family-vuexy-body .layout-navbar.navbar-detached {
    inline-size: calc(100% - var(--bs-menu-width) - 3rem) !important;
  }
  html.layout-menu-collapsed .family-vuexy-body .layout-navbar.navbar-detached {
    inline-size: calc(100% - var(--bs-menu-collapsed-width) - 3rem) !important;
  }
}

/* Main content */
.family-content { padding: 1.5rem !important; }
.family-vuexy-body .page-head { margin-bottom: 1.25rem; align-items: center; }
.family-vuexy-body .page-title { color: var(--bs-heading-color); font-size: 1.5rem; font-weight: 700; }
.family-vuexy-body .page-subtitle { color: var(--bs-secondary-color); }

/* Bring the existing application components in line with the TSC/Vuexy skin. */
.family-vuexy-body .card {
  border: 0;
  border-radius: .5rem;
  background: var(--bs-paper-bg);
  box-shadow: var(--bs-box-shadow-sm);
}
.family-vuexy-body .card-header {
  border-bottom: 1px solid var(--bs-border-color);
  background: transparent;
  color: var(--bs-heading-color);
  font-weight: 600;
  padding: 1rem 1.25rem;
}
.family-vuexy-body .card-body { padding: 1.25rem; }
.family-vuexy-body .btn {
  border-radius: .375rem;
  padding: .5rem .875rem;
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1.25;
  box-shadow: none;
}
.family-vuexy-body .btn-primary { background: var(--bs-primary); border-color: var(--bs-primary); color: #fff; }
.family-vuexy-body .btn-primary:hover { background: #685dd8; border-color: #685dd8; }
.family-vuexy-body .btn-outline { background: transparent; border-color: var(--bs-border-color); color: var(--bs-body-color); }
.family-vuexy-body .btn-outline:hover { background: var(--bs-primary-bg-subtle); border-color: var(--bs-primary-border-subtle); color: var(--bs-primary); }
.family-vuexy-body .btn-danger { background: var(--bs-danger); border-color: var(--bs-danger); }
.family-vuexy-body .form-label { color: var(--bs-heading-color); font-weight: 500; }
.family-vuexy-body .form-control,
.family-vuexy-body .form-select,
.family-vuexy-body .form-textarea {
  border-color: var(--bs-border-color);
  border-radius: .375rem;
  background-color: var(--bs-paper-bg);
  color: var(--bs-body-color);
  padding: .55rem .75rem;
}
.family-vuexy-body .form-control:focus,
.family-vuexy-body .form-select:focus,
.family-vuexy-body .form-textarea:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 .15rem rgba(var(--bs-primary-rgb), .15);
}
.family-vuexy-body .table th { background: color-mix(in srgb, var(--bs-body-bg) 75%, var(--bs-paper-bg)); color: var(--bs-secondary-color); }
.family-vuexy-body .table th,
.family-vuexy-body .table td { border-color: var(--bs-border-color); }
.family-vuexy-body .badge-primary { background: var(--bs-primary-bg-subtle); color: var(--bs-primary); }
.family-vuexy-body .stat-icon { border-radius: .375rem; background: var(--bs-primary-bg-subtle); color: var(--bs-primary); }
.family-vuexy-body .stat-value { color: var(--bs-heading-color); }
.family-vuexy-body .detail-item,
.family-vuexy-body .parent-pair-person,
.family-vuexy-body .tree-family-history-card { background: color-mix(in srgb, var(--bs-body-bg) 45%, var(--bs-paper-bg)); }

/* Keep Select2 visually aligned with Vuexy. */
.family-vuexy-body .select2-container .select2-selection--single {
  border-color: var(--bs-border-color);
  border-radius: .375rem;
  background: var(--bs-paper-bg);
}
.family-vuexy-body .select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--bs-body-color); }
.family-vuexy-body .select2-dropdown { border-color: var(--bs-border-color); background: var(--bs-paper-bg); color: var(--bs-body-color); }

/* Impersonation banner */
.family-impersonation-bar {
  margin: .75rem 1.5rem 0;
  border: 1px solid var(--bs-warning-border-subtle);
  border-radius: .5rem;
  background: var(--bs-warning-bg-subtle);
  color: var(--bs-warning-text-emphasis);
  box-shadow: var(--bs-box-shadow-sm);
  position: relative;
  z-index: 1030;
}

/* Modal should stay above the Vuexy navbar/menu. */
.family-modal { z-index: 1200; }
.family-modal-dialog { box-shadow: var(--bs-box-shadow-lg); border-radius: .625rem; }

/* Login page using the same TSC/Vuexy visual language. */
.family-login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 10%, rgba(115,103,240,.13), transparent 28rem),
    radial-gradient(circle at 90% 90%, rgba(115,103,240,.08), transparent 24rem),
    var(--bs-body-bg);
}
.family-login-wrapper { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; }
.family-login-card { width: min(27rem, 100%); border: 0 !important; box-shadow: var(--bs-box-shadow-lg) !important; }
.family-login-brand { display: flex; justify-content: center; align-items: center; gap: .75rem; margin-bottom: 1.5rem; }
.family-login-brand .family-brand-logo { width: 42px; height: 42px; flex-basis: 42px; }
.family-login-brand-copy { display: flex; flex-direction: column; line-height: 1.15; }
.family-login-brand-copy strong { color: var(--bs-heading-color); font-size: 1.1rem; }
.family-login-brand-copy small { color: var(--bs-secondary-color); font-size: .75rem; margin-top: .2rem; }

/* Mobile */
@media (max-width: 1199.98px) {
  .family-vuexy-body .layout-navbar.navbar-detached { margin-inline: .75rem; width: auto; inline-size: calc(100% - 1.5rem) !important; }
  .family-content { padding-inline: .875rem !important; }
  .family-app-brand { padding-inline: 1rem !important; }
}
@media (max-width: 575.98px) {
  .family-vuexy-body .layout-navbar.navbar-detached { min-height: 3.75rem; padding-inline: .75rem; }
  .family-vuexy-body .preference-option { min-width: 1.7rem; padding-inline: .35rem; }
  .family-vuexy-body .theme-label { display: none; }
  .family-vuexy-body .theme-toggle { width: 2.15rem; justify-content: center; padding: 0; }
  .family-user-chip { gap: .35rem; }
  .family-logout-btn { padding-inline: .55rem !important; }
}

@media (max-width: 767.98px) {
  .family-user-meta { display:none !important; }
  .family-navbar-actions { gap:.35rem !important; }
}

/* v1.7.28 — Sidebar polish + stronger light-mode content typography. */

/* Sidebar: keep the purple identity, but make spacing/states predictable. */
.family-vuexy-body .layout-menu {
  background: linear-gradient(180deg, #7367f0 0%, #695edc 100%) !important;
}
.family-vuexy-body .layout-menu .menu-inner {
  padding-inline: 0 !important;
}
.family-vuexy-body .layout-menu .menu-header {
  margin: .6rem 0 .22rem !important;
  padding: .8rem 1.5rem .35rem !important;
}
.family-vuexy-body .layout-menu .menu-header-text {
  color: rgba(255, 255, 255, .62) !important;
  font-size: .665rem !important;
  font-weight: 800 !important;
  letter-spacing: .065rem !important;
}
.family-vuexy-body .layout-menu .menu-item {
  margin-block: .12rem !important;
}
.family-vuexy-body .layout-menu .menu-item > .menu-link {
  min-height: 2.7rem !important;
  margin-inline: .75rem !important;
  padding-inline: .85rem !important;
  border-radius: .45rem !important;
  color: rgba(255,255,255,.94) !important;
  background: transparent !important;
  font-weight: 650 !important;
  transition: background-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease !important;
}
.family-vuexy-body .layout-menu .menu-item > .menu-link .menu-icon {
  color: rgba(255,255,255,.92) !important;
}
.family-vuexy-body .layout-menu .menu-item:not(.active) > .menu-link:hover,
.family-vuexy-body .layout-menu .menu-item:not(.active) > .menu-link:focus-visible {
  background: rgba(255,255,255,.16) !important;
  color: #fff !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.07) !important;
}
.family-vuexy-body .layout-menu .menu-item:not(.active) > .menu-link:hover .menu-icon,
.family-vuexy-body .layout-menu .menu-item:not(.active) > .menu-link:focus-visible .menu-icon {
  color: #fff !important;
}
.family-vuexy-body .layout-menu .menu-item.active > .menu-link,
.family-vuexy-body .layout-menu .menu-item.active > .menu-link:hover,
.family-vuexy-body .layout-menu .menu-item.active > .menu-link:focus-visible {
  background: #fff !important;
  color: #5b50d6 !important;
  box-shadow: 0 .28rem .8rem rgba(42,32,126,.22) !important;
}
.family-vuexy-body .layout-menu .menu-item.active > .menu-link .menu-icon,
.family-vuexy-body .layout-menu .menu-item.active > .menu-link:hover .menu-icon,
.family-vuexy-body .layout-menu .menu-item.active > .menu-link:focus-visible .menu-icon {
  color: #6559e8 !important;
}
.family-vuexy-body .layout-menu .menu-item.disabled > .menu-link {
  color: rgba(255,255,255,.55) !important;
  background: transparent !important;
  opacity: 1 !important;
}
.family-vuexy-body .layout-menu .menu-item.disabled > .menu-link .menu-icon {
  color: rgba(255,255,255,.5) !important;
}

/* Collapsed desktop mode: centered icon pills with no clipping. */
@media (min-width: 1200px) {
  html.layout-menu-collapsed .family-vuexy-body .layout-menu .menu-item > .menu-link {
    width: 2.8rem !important;
    min-width: 2.8rem !important;
    height: 2.8rem !important;
    min-height: 2.8rem !important;
    margin-inline: auto !important;
    padding: 0 !important;
    justify-content: center !important;
  }
  html.layout-menu-collapsed .family-vuexy-body .layout-menu .menu-item > .menu-link .menu-icon {
    margin-inline: 0 !important;
    font-size: 1.28rem !important;
  }
  html.layout-menu-collapsed .family-vuexy-body .layout-menu .menu-item > .menu-link > div:not(.badge) {
    width: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
  }
  html.layout-menu-collapsed .family-vuexy-body .layout-menu .menu-header {
    margin-block: .65rem .35rem !important;
    padding: .25rem 0 !important;
  }
  html.layout-menu-collapsed .family-vuexy-body .layout-menu .menu-header::before {
    width: 1.45rem !important;
    margin-inline: auto !important;
    background-color: rgba(255,255,255,.42) !important;
  }
}

/* Light mode content: use crisp near-black typography instead of washed-out gray. */
html:not([data-theme="dark"]) .family-vuexy-body,
html:not([data-theme="dark"]) .family-vuexy-body .content-wrapper,
html:not([data-theme="dark"]) .family-vuexy-body .family-content {
  color: #111827 !important;
}
html:not([data-theme="dark"]) .family-vuexy-body .page-title,
html:not([data-theme="dark"]) .family-vuexy-body h1,
html:not([data-theme="dark"]) .family-vuexy-body h2,
html:not([data-theme="dark"]) .family-vuexy-body h3,
html:not([data-theme="dark"]) .family-vuexy-body h4,
html:not([data-theme="dark"]) .family-vuexy-body h5,
html:not([data-theme="dark"]) .family-vuexy-body h6,
html:not([data-theme="dark"]) .family-vuexy-body .card-header,
html:not([data-theme="dark"]) .family-vuexy-body .detail-value,
html:not([data-theme="dark"]) .family-vuexy-body .tree-name,
html:not([data-theme="dark"]) .family-vuexy-body .stat-value {
  color: #0f172a !important;
}
html:not([data-theme="dark"]) .family-vuexy-body .card,
html:not([data-theme="dark"]) .family-vuexy-body .card-body,
html:not([data-theme="dark"]) .family-vuexy-body .table,
html:not([data-theme="dark"]) .family-vuexy-body .table td,
html:not([data-theme="dark"]) .family-vuexy-body .form-label,
html:not([data-theme="dark"]) .family-vuexy-body label,
html:not([data-theme="dark"]) .family-vuexy-body .form-control,
html:not([data-theme="dark"]) .family-vuexy-body .form-select,
html:not([data-theme="dark"]) .family-vuexy-body .form-textarea,
html:not([data-theme="dark"]) .family-vuexy-body .select2-selection__rendered,
html:not([data-theme="dark"]) .family-vuexy-body .family-modal,
html:not([data-theme="dark"]) .family-vuexy-body .family-user-meta strong {
  color: #111827 !important;
}
html:not([data-theme="dark"]) .family-vuexy-body .table td,
html:not([data-theme="dark"]) .family-vuexy-body .form-label,
html:not([data-theme="dark"]) .family-vuexy-body label {
  font-weight: 600 !important;
}
html:not([data-theme="dark"]) .family-vuexy-body .table th {
  color: #374151 !important;
  font-weight: 700 !important;
}
html:not([data-theme="dark"]) .family-vuexy-body .text-body-secondary,
html:not([data-theme="dark"]) .family-vuexy-body .text-muted,
html:not([data-theme="dark"]) .family-vuexy-body .page-subtitle,
html:not([data-theme="dark"]) .family-vuexy-body .form-help,
html:not([data-theme="dark"]) .family-vuexy-body .detail-label,
html:not([data-theme="dark"]) .family-vuexy-body .tree-meta,
html:not([data-theme="dark"]) .family-vuexy-body .family-user-meta small,
html:not([data-theme="dark"]) .family-vuexy-body .family-navbar-date {
  color: #4b5563 !important;
}
html:not([data-theme="dark"]) .family-vuexy-body input::placeholder,
html:not([data-theme="dark"]) .family-vuexy-body textarea::placeholder {
  color: #9ca3af !important;
  opacity: 1;
}

/* v1.7.29 — stronger dark-mode contrast + slightly darker purple identity. */
.family-vuexy-body {
  --family-purple: #6458d8;
  --family-purple-dark: #564bc1;
  --family-purple-soft: #efedff;
  --bs-primary: #6458d8;
  --bs-primary-rgb: 100, 88, 216;
  --bs-primary-bg-subtle: #efedff;
  --bs-primary-border-subtle: #c9c4f8;
}

/* Slightly darker purple than the previous #7367f0, while keeping the Vuexy character. */
.family-vuexy-body .layout-menu {
  background: linear-gradient(180deg, #6458d8 0%, #5146b9 100%) !important;
}
.family-vuexy-body .layout-menu .menu-item.active > .menu-link,
.family-vuexy-body .layout-menu .menu-item.active > .menu-link:hover,
.family-vuexy-body .layout-menu .menu-item.active > .menu-link:focus-visible {
  color: #5045b7 !important;
}
.family-vuexy-body .layout-menu .menu-item.active > .menu-link .menu-icon {
  color: #5b4fca !important;
}
.family-vuexy-body .layout-menu .family-brand-logo,
html.layout-menu-collapsed .family-vuexy-body .family-sidebar-toggle {
  color: #5a4ec8 !important;
}
.family-vuexy-body .btn-primary,
.family-vuexy-body .preference-option.active,
.family-vuexy-body .pagination .active span {
  background: #6458d8 !important;
  border-color: #6458d8 !important;
}
.family-vuexy-body .btn-primary:hover,
.family-vuexy-body .btn-primary:focus {
  background: #564bc1 !important;
  border-color: #564bc1 !important;
}
.family-vuexy-body .table a.link,
.family-vuexy-body a.link {
  color: #5c50cb;
}

/* Dark mode: increase separation between page, panels, controls and family-tree canvas. */
html[data-theme="dark"] .family-vuexy-body,
[data-bs-theme="dark"] .family-vuexy-body {
  --family-purple-soft: rgba(126, 112, 232, .20);
  --bs-primary: #7468df;
  --bs-primary-rgb: 116, 104, 223;
  --bs-primary-bg-subtle: rgba(116, 104, 223, .18);
  --bs-primary-border-subtle: rgba(150, 140, 239, .42);
  --bs-body-bg: #202435;
  --bs-paper-bg: #2b3046;
  --bs-body-color: #eef0f7;
  --bs-heading-color: #ffffff;
  --bs-secondary-color: #c0c6d7;
  --bs-border-color: #454d6a;
  color: #eef0f7 !important;
  background: #202435 !important;
}
html[data-theme="dark"] .family-vuexy-body .layout-page,
html[data-theme="dark"] .family-vuexy-body .content-wrapper,
html[data-theme="dark"] .family-vuexy-body .family-content,
[data-bs-theme="dark"] .family-vuexy-body .layout-page,
[data-bs-theme="dark"] .family-vuexy-body .content-wrapper,
[data-bs-theme="dark"] .family-vuexy-body .family-content {
  background: #202435 !important;
  color: #eef0f7 !important;
}
html[data-theme="dark"] .family-vuexy-body .layout-navbar.navbar-detached,
[data-bs-theme="dark"] .family-vuexy-body .layout-navbar.navbar-detached {
  background: rgba(45, 50, 73, .98) !important;
  border-color: #48506d !important;
  box-shadow: 0 .25rem 1rem rgba(4, 7, 18, .28) !important;
}
html[data-theme="dark"] .family-vuexy-body .page-title,
html[data-theme="dark"] .family-vuexy-body h1,
html[data-theme="dark"] .family-vuexy-body h2,
html[data-theme="dark"] .family-vuexy-body h3,
html[data-theme="dark"] .family-vuexy-body h4,
html[data-theme="dark"] .family-vuexy-body h5,
html[data-theme="dark"] .family-vuexy-body h6,
html[data-theme="dark"] .family-vuexy-body .card-header,
html[data-theme="dark"] .family-vuexy-body .detail-value,
html[data-theme="dark"] .family-vuexy-body .stat-value,
html[data-theme="dark"] .family-vuexy-body .tree-name,
[data-bs-theme="dark"] .family-vuexy-body .page-title,
[data-bs-theme="dark"] .family-vuexy-body h1,
[data-bs-theme="dark"] .family-vuexy-body h2,
[data-bs-theme="dark"] .family-vuexy-body h3,
[data-bs-theme="dark"] .family-vuexy-body h4,
[data-bs-theme="dark"] .family-vuexy-body h5,
[data-bs-theme="dark"] .family-vuexy-body h6,
[data-bs-theme="dark"] .family-vuexy-body .card-header,
[data-bs-theme="dark"] .family-vuexy-body .detail-value,
[data-bs-theme="dark"] .family-vuexy-body .stat-value,
[data-bs-theme="dark"] .family-vuexy-body .tree-name {
  color: #ffffff !important;
}
html[data-theme="dark"] .family-vuexy-body .text-body-secondary,
html[data-theme="dark"] .family-vuexy-body .text-muted,
html[data-theme="dark"] .family-vuexy-body .page-subtitle,
html[data-theme="dark"] .family-vuexy-body .form-help,
html[data-theme="dark"] .family-vuexy-body .detail-label,
html[data-theme="dark"] .family-vuexy-body .tree-meta,
html[data-theme="dark"] .family-vuexy-body .family-navbar-date,
html[data-theme="dark"] .family-vuexy-body .family-user-meta small,
[data-bs-theme="dark"] .family-vuexy-body .text-body-secondary,
[data-bs-theme="dark"] .family-vuexy-body .text-muted,
[data-bs-theme="dark"] .family-vuexy-body .page-subtitle,
[data-bs-theme="dark"] .family-vuexy-body .form-help,
[data-bs-theme="dark"] .family-vuexy-body .detail-label,
[data-bs-theme="dark"] .family-vuexy-body .tree-meta,
[data-bs-theme="dark"] .family-vuexy-body .family-navbar-date,
[data-bs-theme="dark"] .family-vuexy-body .family-user-meta small {
  color: #c3c9d9 !important;
}
html[data-theme="dark"] .family-vuexy-body .card,
html[data-theme="dark"] .family-vuexy-body .family-modal-dialog,
html[data-theme="dark"] .family-vuexy-body .tree-person-modal-card,
[data-bs-theme="dark"] .family-vuexy-body .card,
[data-bs-theme="dark"] .family-vuexy-body .family-modal-dialog,
[data-bs-theme="dark"] .family-vuexy-body .tree-person-modal-card {
  background: #2b3046 !important;
  border: 1px solid #414965 !important;
  box-shadow: 0 .3rem 1rem rgba(4, 7, 18, .20) !important;
}
html[data-theme="dark"] .family-vuexy-body .card-header,
[data-bs-theme="dark"] .family-vuexy-body .card-header {
  border-bottom-color: #454d6a !important;
}
html[data-theme="dark"] .family-vuexy-body .table,
html[data-theme="dark"] .family-vuexy-body .table td,
[data-bs-theme="dark"] .family-vuexy-body .table,
[data-bs-theme="dark"] .family-vuexy-body .table td {
  color: #eef0f7 !important;
}
html[data-theme="dark"] .family-vuexy-body .table th,
[data-bs-theme="dark"] .family-vuexy-body .table th {
  background: #30364d !important;
  color: #d8dce8 !important;
  border-color: #454d6a !important;
}
html[data-theme="dark"] .family-vuexy-body .table td,
[data-bs-theme="dark"] .family-vuexy-body .table td {
  border-color: #404761 !important;
}
html[data-theme="dark"] .family-vuexy-body .table tr:hover td,
[data-bs-theme="dark"] .family-vuexy-body .table tr:hover td {
  background: rgba(255,255,255,.035) !important;
}
html[data-theme="dark"] .family-vuexy-body .form-control,
html[data-theme="dark"] .family-vuexy-body .form-select,
html[data-theme="dark"] .family-vuexy-body .form-textarea,
html[data-theme="dark"] .family-vuexy-body .select2-container .select2-selection--single,
[data-bs-theme="dark"] .family-vuexy-body .form-control,
[data-bs-theme="dark"] .family-vuexy-body .form-select,
[data-bs-theme="dark"] .family-vuexy-body .form-textarea,
[data-bs-theme="dark"] .family-vuexy-body .select2-container .select2-selection--single {
  background: #282d42 !important;
  border-color: #515a78 !important;
  color: #f1f3f8 !important;
}
html[data-theme="dark"] .family-vuexy-body .select2-container--default .select2-selection--single .select2-selection__rendered,
[data-bs-theme="dark"] .family-vuexy-body .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #f1f3f8 !important;
}
html[data-theme="dark"] .family-vuexy-body input::placeholder,
html[data-theme="dark"] .family-vuexy-body textarea::placeholder,
[data-bs-theme="dark"] .family-vuexy-body input::placeholder,
[data-bs-theme="dark"] .family-vuexy-body textarea::placeholder {
  color: #969eb4 !important;
  opacity: 1;
}
html[data-theme="dark"] .family-vuexy-body .btn-outline,
[data-bs-theme="dark"] .family-vuexy-body .btn-outline {
  border-color: #555e7c !important;
  color: #eef0f7 !important;
  background: #2a2f44 !important;
}
html[data-theme="dark"] .family-vuexy-body .btn-outline:hover,
[data-bs-theme="dark"] .family-vuexy-body .btn-outline:hover {
  border-color: #786ce1 !important;
  background: rgba(116,104,223,.18) !important;
  color: #ffffff !important;
}

/* Family tree is the place where low contrast was most noticeable. */
html[data-theme="dark"] .family-vuexy-body .tree-viewport,
[data-bs-theme="dark"] .family-vuexy-body .tree-viewport {
  background-color: #24293c !important;
  background-image:
    linear-gradient(#3a425e 1px, transparent 1px),
    linear-gradient(90deg, #3a425e 1px, transparent 1px) !important;
  background-size: 24px 24px !important;
  border-color: #4a5371 !important;
}
html[data-theme="dark"] .family-vuexy-body .tree-node,
[data-bs-theme="dark"] .family-vuexy-body .tree-node {
  background: #30364d !important;
  border-color: #515a78 !important;
  box-shadow: 0 .2rem .7rem rgba(3, 6, 16, .30) !important;
  color: #f6f7fb !important;
}
html[data-theme="dark"] .family-vuexy-body .tree-node:hover,
[data-bs-theme="dark"] .family-vuexy-body .tree-node:hover {
  border-color: #8276e8 !important;
  box-shadow: 0 0 0 2px rgba(126,112,232,.18), 0 .3rem .9rem rgba(3,6,16,.32) !important;
}
html[data-theme="dark"] .family-vuexy-body .tree-node .tree-name,
[data-bs-theme="dark"] .family-vuexy-body .tree-node .tree-name {
  color: #ffffff !important;
  font-weight: 800 !important;
}
html[data-theme="dark"] .family-vuexy-body .tree-node .tree-meta,
[data-bs-theme="dark"] .family-vuexy-body .tree-node .tree-meta {
  color: #c2c8d8 !important;
}
html[data-theme="dark"] .family-vuexy-body .tree-node.is-deceased .tree-name,
[data-bs-theme="dark"] .family-vuexy-body .tree-node.is-deceased .tree-name {
  color: #d5d9e4 !important;
}
html[data-theme="dark"] .family-vuexy-body .detail-item,
html[data-theme="dark"] .family-vuexy-body .summary-box,
html[data-theme="dark"] .family-vuexy-body .parent-pair-person,
html[data-theme="dark"] .family-vuexy-body .tree-family-history-card,
html[data-theme="dark"] .family-vuexy-body .family-history-meta,
[data-bs-theme="dark"] .family-vuexy-body .detail-item,
[data-bs-theme="dark"] .family-vuexy-body .summary-box,
[data-bs-theme="dark"] .family-vuexy-body .parent-pair-person,
[data-bs-theme="dark"] .family-vuexy-body .tree-family-history-card,
[data-bs-theme="dark"] .family-vuexy-body .family-history-meta {
  background: #30364b !important;
  border-color: #48516e !important;
}
html[data-theme="dark"] .family-vuexy-body .tree-family-history-head,
[data-bs-theme="dark"] .family-vuexy-body .tree-family-history-head {
  background: #30364b !important;
}


/* v1.7.30 — tidy collapsed sidebar control + mobile modal scrolling */
/* Collapse control: use a compact rounded-square chevron instead of a floating circle. */
.family-vuexy-body .family-sidebar-toggle {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: .5rem;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.14);
  color: #fff;
  box-shadow: none;
}
.family-vuexy-body .family-sidebar-toggle:hover,
.family-vuexy-body .family-sidebar-toggle:focus-visible {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.28);
  color: #fff;
  outline: 0;
}
.family-vuexy-body .family-sidebar-toggle .family-collapse-icon {
  font-size: 1rem;
  line-height: 1;
}

@media (min-width: 1200px) {
  html.layout-menu-collapsed .family-vuexy-body .family-app-brand {
    position: relative;
    height: 88px;
    padding: 9px 0 10px !important;
    flex-direction: column;
    justify-content: flex-start;
    gap: 7px;
    overflow: visible;
  }
  html.layout-menu-collapsed .family-vuexy-body .family-app-brand .app-brand-link {
    flex: 0 0 auto;
    width: 38px;
    min-width: 38px;
    justify-content: center;
    gap: 0;
  }
  html.layout-menu-collapsed .family-vuexy-body .family-brand-logo {
    margin: 0 !important;
  }
  html.layout-menu-collapsed .family-vuexy-body .family-sidebar-toggle {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    margin: 0 !important;
    width: 26px;
    height: 22px;
    flex: 0 0 22px;
    border-radius: 6px;
    background: rgba(255,255,255,.14) !important;
    border: 1px solid rgba(255,255,255,.20) !important;
    color: #fff !important;
    box-shadow: none !important;
  }
  html.layout-menu-collapsed .family-vuexy-body .family-sidebar-toggle:hover,
  html.layout-menu-collapsed .family-vuexy-body .family-sidebar-toggle:focus-visible {
    background: rgba(255,255,255,.22) !important;
    color: #fff !important;
  }
}

/* Mobile: modal header stays visible, only modal content scrolls, so submit/save buttons remain reachable. */
@media (max-width: 760px) {
  .family-vuexy-body .family-modal,
  .family-vuexy-body .tree-person-modal {
    box-sizing: border-box;
    align-items: flex-start !important;
    justify-content: center !important;
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    padding-top: max(8px, env(safe-area-inset-top));
    padding-right: max(8px, env(safe-area-inset-right));
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    padding-left: max(8px, env(safe-area-inset-left));
    overflow: hidden !important;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }
  .family-vuexy-body .family-modal-dialog,
  .family-vuexy-body .tree-person-modal-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: calc(100vh - 16px);
    margin: 0 auto !important;
    overflow: hidden !important;
  }
  .family-vuexy-body .family-modal-head,
  .family-vuexy-body .tree-person-modal-head {
    position: relative !important;
    top: auto !important;
    flex: 0 0 auto;
    z-index: 30;
  }
  .family-vuexy-body .family-modal-body,
  .family-vuexy-body .tree-person-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    padding-bottom: calc(28px + env(safe-area-inset-bottom)) !important;
  }
  .family-vuexy-body .family-modal-body form,
  .family-vuexy-body .tree-person-modal-body form {
    min-height: min-content;
  }
  .family-vuexy-body .family-modal-body .actions,
  .family-vuexy-body .family-modal-body .form-actions,
  .family-vuexy-body .tree-person-modal-body .actions,
  .family-vuexy-body .tree-person-modal-body .form-actions {
    padding-bottom: 6px;
  }
}

@supports (height: 100dvh) {
  @media (max-width: 760px) {
    .family-vuexy-body .family-modal,
    .family-vuexy-body .tree-person-modal {
      height: 100dvh;
      max-height: 100dvh;
    }
    .family-vuexy-body .family-modal-dialog,
    .family-vuexy-body .tree-person-modal-card {
      max-height: calc(100dvh - 16px);
    }
  }
}

/* v1.7.31 — collapsed sidebar interaction + stronger typography/contrast. */
@media (min-width: 1200px) {
  /* When minimized, there is no extra circle/arrow. Click the SK logo to expand. */
  html.layout-menu-collapsed .family-vuexy-body .family-app-brand {
    height: 66px !important;
    padding: 10px 0 !important;
    justify-content: flex-start !important;
    gap: 0 !important;
  }
  html.layout-menu-collapsed .family-vuexy-body .family-sidebar-toggle {
    display: none !important;
  }
  html.layout-menu-collapsed .family-vuexy-body .family-app-brand .app-brand-link {
    width: 100% !important;
    min-width: 0 !important;
    justify-content: center !important;
    cursor: pointer;
  }
  html:not(.layout-menu-collapsed) .family-vuexy-body .family-sidebar-toggle {
    display: inline-flex !important;
  }
}

/* Light mode: make content typography clearly black instead of grayish-purple. */
html:not([data-theme="dark"]) .family-vuexy-body,
html:not([data-theme="dark"]) .family-vuexy-body .content-wrapper,
html:not([data-theme="dark"]) .family-vuexy-body .family-content,
html:not([data-theme="dark"]) .family-vuexy-body .card,
html:not([data-theme="dark"]) .family-vuexy-body .card-body,
html:not([data-theme="dark"]) .family-vuexy-body .table,
html:not([data-theme="dark"]) .family-vuexy-body .table td,
html:not([data-theme="dark"]) .family-vuexy-body .form-control,
html:not([data-theme="dark"]) .family-vuexy-body .form-select,
html:not([data-theme="dark"]) .family-vuexy-body .select2-selection__rendered,
html:not([data-theme="dark"]) .family-vuexy-body .family-modal {
  color: #050505 !important;
}
html:not([data-theme="dark"]) .family-vuexy-body .page-title,
html:not([data-theme="dark"]) .family-vuexy-body h1,
html:not([data-theme="dark"]) .family-vuexy-body h2,
html:not([data-theme="dark"]) .family-vuexy-body h3,
html:not([data-theme="dark"]) .family-vuexy-body h4,
html:not([data-theme="dark"]) .family-vuexy-body h5,
html:not([data-theme="dark"]) .family-vuexy-body h6,
html:not([data-theme="dark"]) .family-vuexy-body .form-label,
html:not([data-theme="dark"]) .family-vuexy-body label,
html:not([data-theme="dark"]) .family-vuexy-body .card-header,
html:not([data-theme="dark"]) .family-vuexy-body .detail-value,
html:not([data-theme="dark"]) .family-vuexy-body .tree-name,
html:not([data-theme="dark"]) .family-vuexy-body .stat-value {
  color: #000 !important;
}
html:not([data-theme="dark"]) .family-vuexy-body .text-body-secondary,
html:not([data-theme="dark"]) .family-vuexy-body .text-muted,
html:not([data-theme="dark"]) .family-vuexy-body .page-subtitle,
html:not([data-theme="dark"]) .family-vuexy-body .form-help,
html:not([data-theme="dark"]) .family-vuexy-body .detail-label,
html:not([data-theme="dark"]) .family-vuexy-body .tree-meta,
html:not([data-theme="dark"]) .family-vuexy-body .family-user-meta small,
html:not([data-theme="dark"]) .family-vuexy-body .family-navbar-date {
  color: #30343b !important;
}
html:not([data-theme="dark"]) .family-vuexy-body .table th {
  color: #20242a !important;
  font-weight: 800 !important;
}

/* Dark mode: purple text links become light lavender/white for readable contrast. */
html[data-theme="dark"] .family-vuexy-body a:not(.btn):not(.menu-link):not(.app-brand-link),
[data-bs-theme="dark"] .family-vuexy-body a:not(.btn):not(.menu-link):not(.app-brand-link),
html[data-theme="dark"] .family-vuexy-body .table a.link,
[data-bs-theme="dark"] .family-vuexy-body .table a.link,
html[data-theme="dark"] .family-vuexy-body a.link,
[data-bs-theme="dark"] .family-vuexy-body a.link {
  color: #c9c4ff !important;
  font-weight: 700;
}
html[data-theme="dark"] .family-vuexy-body a:not(.btn):not(.menu-link):not(.app-brand-link):hover,
[data-bs-theme="dark"] .family-vuexy-body a:not(.btn):not(.menu-link):not(.app-brand-link):hover,
html[data-theme="dark"] .family-vuexy-body .table a.link:hover,
[data-bs-theme="dark"] .family-vuexy-body .table a.link:hover,
html[data-theme="dark"] .family-vuexy-body a.link:hover,
[data-bs-theme="dark"] .family-vuexy-body a.link:hover {
  color: #fff !important;
}
html[data-theme="dark"] .family-vuexy-body .badge-primary,
html[data-theme="dark"] .family-vuexy-body .stat-icon,
[data-bs-theme="dark"] .family-vuexy-body .badge-primary,
[data-bs-theme="dark"] .family-vuexy-body .stat-icon {
  color: #ddd9ff !important;
}

/* v1.7.32 — exact collapsed-logo centering. */
@media (min-width: 1200px) {
  html.layout-menu-collapsed .family-vuexy-body .family-app-brand {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    height: 66px !important;
    padding: 0 !important;
  }
  html.layout-menu-collapsed .family-vuexy-body .family-app-brand .app-brand-link {
    position: absolute !important;
    top: 10px !important;
    left: 50% !important;
    right: auto !important;
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  html.layout-menu-collapsed .family-vuexy-body .family-brand-logo {
    width: 38px !important;
    height: 38px !important;
    flex: 0 0 38px !important;
    margin: 0 !important;
  }
}

/* v1.7.33 — exact collapsed-brand centering. */
@media (min-width: 1200px) {
  html.layout-menu-collapsed .family-vuexy-body .family-app-brand {
    position: relative !important;
    width: 100% !important;
    max-width: none !important;
    height: 66px !important;
    padding: 10px 0 !important;
    margin: 0 !important;
    display: block !important;
    box-sizing: border-box !important;
  }
  html.layout-menu-collapsed .family-vuexy-body .family-app-brand .app-brand-link {
    position: absolute !important;
    top: 10px !important;
    left: 50% !important;
    right: auto !important;
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  html.layout-menu-collapsed .family-vuexy-body .family-app-brand .family-brand-logo {
    width: 38px !important;
    height: 38px !important;
    flex: 0 0 38px !important;
    margin: 0 !important;
  }
}

/* v1.7.34 — collapsed logo visual centering + dashboard statistic label contrast. */
@media (min-width: 1200px) {
  /* Vuexy collapsed menu is 4.375rem (70px). The app-brand's internal box is
     slightly narrower because of the menu geometry, so compensate visually
     to align SK with the centered menu icons below it. */
  html.layout-menu-collapsed .family-vuexy-body .family-app-brand .app-brand-link {
    left: calc(50% + 0.375rem) !important;
  }
}

/* Dashboard statistic captions should be crisp black in light mode. */
html:not([data-theme="dark"]) .family-vuexy-body .stat-label {
  color: #000 !important;
  font-weight: 700 !important;
  opacity: 1 !important;
}

/* v1.7.35 — mobile navigation must stay above the dimming overlay. */
@media (max-width: 1199.98px) {
  /* The custom desktop rule used z-index 1081, while Vuexy's overlay is 1099.
     That put the overlay on top of the open menu and swallowed every tap. */
  .family-vuexy-body .layout-menu {
    z-index: 1110 !important;
    pointer-events: auto !important;
  }
  .family-vuexy-body .layout-overlay {
    z-index: 1100 !important;
  }
  html.layout-menu-expanded .family-vuexy-body .layout-menu,
  .layout-menu-expanded .family-vuexy-body .layout-menu {
    pointer-events: auto !important;
  }
  .family-vuexy-body .layout-menu .menu-link {
    position: relative;
    z-index: 1;
    pointer-events: auto !important;
    touch-action: manipulation;
  }
}

/* v1.7.36 — Mobile-first form usability across all create/edit/import forms. */
@media (max-width: 767.98px) {
  /* Keep every form and control inside the viewport. */
  .family-vuexy-body,
  .family-vuexy-body .layout-page,
  .family-vuexy-body .content-wrapper,
  .family-vuexy-body .family-content {
    min-width: 0 !important;
    overflow-x: hidden;
  }
  .family-vuexy-body .family-content {
    padding: 1rem .75rem 2rem !important;
  }
  .family-vuexy-body form,
  .family-vuexy-body .card,
  .family-vuexy-body .card-body,
  .family-vuexy-body .form-grid,
  .family-vuexy-body .form-group {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  /* All input forms become a predictable single column on phones. */
  .family-vuexy-body .form-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: .9rem !important;
  }
  .family-vuexy-body .form-group,
  .family-vuexy-body .form-group.full {
    grid-column: 1 / -1 !important;
    width: 100% !important;
  }
  .family-vuexy-body .card-header {
    padding: .9rem 1rem !important;
  }
  .family-vuexy-body .card-body {
    padding: 1rem !important;
  }
  .family-vuexy-body .form-label {
    margin-bottom: .42rem !important;
    line-height: 1.35;
  }
  .family-vuexy-body .form-help {
    line-height: 1.45;
  }

  /* 16px prevents Safari/iOS from zooming the page when a field receives focus. */
  .family-vuexy-body .form-control,
  .family-vuexy-body .form-select,
  .family-vuexy-body .form-textarea,
  .family-vuexy-body input.form-control,
  .family-vuexy-body select.form-select,
  .family-vuexy-body textarea,
  .family-vuexy-body .select2-container--default .select2-selection--single,
  .family-vuexy-body .select2-container--default .select2-search--dropdown .select2-search__field {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 46px;
    font-size: 16px !important;
  }
  .family-vuexy-body .form-control,
  .family-vuexy-body .form-select,
  .family-vuexy-body .form-textarea {
    padding: .68rem .75rem !important;
  }
  .family-vuexy-body textarea.form-control,
  .family-vuexy-body .form-textarea {
    min-height: 118px !important;
    line-height: 1.5;
    resize: vertical;
  }
  .family-vuexy-body input[type="file"].form-control {
    height: auto !important;
    min-height: 48px;
    padding: .38rem !important;
    overflow: hidden;
  }
  .family-vuexy-body input[type="file"]::file-selector-button {
    min-height: 36px;
    margin-right: .55rem;
    padding: .45rem .65rem;
    border: 0;
    border-radius: .4rem;
    cursor: pointer;
  }

  /* Select2 must behave like a native full-width mobile field. */
  .family-vuexy-body .select2-container,
  .family-vuexy-body .form-group > .select2-container,
  .family-vuexy-body .form-group .select2-container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  .family-vuexy-body .select2-container .select2-selection--single {
    height: 46px !important;
  }
  .family-vuexy-body .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 44px !important;
    padding-left: .75rem !important;
    padding-right: 2.25rem !important;
  }
  .family-vuexy-body .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 44px !important;
  }
  .family-vuexy-body .select2-dropdown {
    max-width: calc(100vw - 16px) !important;
  }
  .family-vuexy-body .select2-results__option {
    min-height: 42px;
    padding: .65rem .75rem !important;
    line-height: 1.35;
  }

  /* Radio/choice groups become large touch targets and never overflow. */
  .family-vuexy-body .choice-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: .55rem !important;
    width: 100%;
  }
  .family-vuexy-body .choice-pill {
    display: flex !important;
    width: 100% !important;
    min-height: 48px;
    padding: .7rem .8rem !important;
    align-items: center;
    justify-content: flex-start;
    white-space: normal;
    line-height: 1.35;
  }
  .family-vuexy-body .choice-pill input[type="radio"],
  .family-vuexy-body .choice-pill input[type="checkbox"],
  .family-vuexy-body .checkbox input[type="checkbox"],
  .family-vuexy-body .checkbox input[type="radio"] {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
  }
  .family-vuexy-body .checkbox {
    min-height: 44px;
    align-items: center !important;
    line-height: 1.35;
  }

  /* Parent pair, photo and inline-select actions stack cleanly. */
  .family-vuexy-body .parent-pair-summary {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: .5rem !important;
  }
  .family-vuexy-body .parent-pair-symbol {
    min-height: 26px;
    display: grid;
    place-items: center;
  }
  .family-vuexy-body .person-photo-field {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: .8rem !important;
    padding: .85rem !important;
  }
  .family-vuexy-body .person-photo-preview {
    align-self: center;
  }
  .family-vuexy-body .person-photo-input {
    width: 100% !important;
  }
  .family-vuexy-body .select-action-row {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .family-vuexy-body .select-action-row > .btn {
    width: 100% !important;
  }

  /* Buttons are comfortable touch targets. */
  .family-vuexy-body .btn {
    min-height: 44px;
    padding: .65rem .85rem !important;
    touch-action: manipulation;
  }
  .family-vuexy-body .page-head {
    gap: .75rem !important;
    margin-bottom: 1rem !important;
  }
  .family-vuexy-body .page-head > .btn,
  .family-vuexy-body .page-head > a.btn {
    width: 100%;
  }

  /* Save/Cancel stays reachable while filling long forms. */
  .family-vuexy-body .form-actions {
    position: sticky;
    bottom: 0;
    z-index: 55;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: .55rem !important;
    width: 100%;
    margin-top: 1rem !important;
    padding: .7rem 0 calc(.7rem + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bs-body-bg) 94%, transparent);
    border-top: 1px solid var(--bs-border-color);
    box-shadow: 0 -.45rem .9rem rgba(20, 20, 35, .05);
    backdrop-filter: blur(10px);
  }
  .family-vuexy-body .form-actions > .btn,
  .family-vuexy-body .form-actions > a.btn,
  .family-vuexy-body .form-actions > button,
  .family-vuexy-body .form-actions > form {
    min-width: 0;
    width: 100% !important;
  }
  .family-vuexy-body .form-actions > form .btn {
    width: 100% !important;
  }

  /* Modals behave like mobile sheets; only the content area scrolls. */
  .family-vuexy-body .family-modal,
  .family-vuexy-body .tree-person-modal {
    padding: max(6px, env(safe-area-inset-top)) max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left)) !important;
  }
  .family-vuexy-body .family-modal-dialog,
  .family-vuexy-body .tree-person-modal-card {
    width: 100% !important;
    max-width: 100% !important;
    max-height: calc(100dvh - 12px) !important;
    border-radius: .75rem !important;
  }
  .family-vuexy-body .family-modal-head,
  .family-vuexy-body .tree-person-modal-head {
    padding: .85rem .9rem !important;
  }
  .family-vuexy-body .family-modal-body,
  .family-vuexy-body .tree-person-modal-body {
    min-height: 0 !important;
    padding: .9rem .8rem calc(1rem + env(safe-area-inset-bottom)) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }
  .family-vuexy-body .family-modal-body .form-actions,
  .family-vuexy-body .tree-person-modal-body .form-actions {
    margin-left: -.8rem !important;
    margin-right: -.8rem !important;
    width: calc(100% + 1.6rem) !important;
    padding-left: .8rem !important;
    padding-right: .8rem !important;
    background: color-mix(in srgb, var(--bs-paper-bg) 96%, transparent);
  }

  /* Date picker remains fully visible and touch-friendly. */
  .family-vuexy-body .family-date-popover {
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: none !important;
    max-height: calc(100dvh - 16px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .family-vuexy-body .family-date-month-select,
  .family-vuexy-body .family-date-year-input {
    min-height: 42px;
    font-size: 16px !important;
  }
  .family-vuexy-body .family-date-cell,
  .family-vuexy-body .family-date-blank {
    min-height: 40px;
    height: 40px;
  }

  /* Import form and filter forms also fit one-handed phone usage. */
  .family-vuexy-body .import-drop {
    padding: 1rem !important;
  }
  .family-vuexy-body .import-drop .btn {
    width: 100%;
  }
  .family-vuexy-body .filters,
  .family-vuexy-body .ajax-table-toolbar-left,
  .family-vuexy-body .ajax-table-toolbar-right {
    align-items: stretch !important;
  }
  .family-vuexy-body .filters .form-control,
  .family-vuexy-body .filters .form-select,
  .family-vuexy-body .filters .select2-container,
  .family-vuexy-body .ajax-table-toolbar .form-control,
  .family-vuexy-body .ajax-table-toolbar .form-select,
  .family-vuexy-body .ajax-table-toolbar .select2-container {
    width: 100% !important;
    min-width: 0 !important;
  }
}

@media (max-width: 399.98px) {
  .family-vuexy-body .form-actions {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

html[data-theme="dark"] .family-vuexy-body .form-actions,
[data-bs-theme="dark"] .family-vuexy-body .form-actions {
  background: rgba(32, 36, 53, .96);
  border-top-color: #454d6a;
  box-shadow: 0 -.45rem .9rem rgba(0,0,0,.16);
}
html[data-theme="dark"] .family-vuexy-body .family-modal-body .form-actions,
html[data-theme="dark"] .family-vuexy-body .tree-person-modal-body .form-actions,
[data-bs-theme="dark"] .family-vuexy-body .family-modal-body .form-actions,
[data-bs-theme="dark"] .family-vuexy-body .tree-person-modal-body .form-actions {
  background: rgba(43, 48, 70, .97);
}

/* v1.7.37 — Phone landscape usability.
   Modern phones can be wider than 768px when rotated, so width-only mobile
   breakpoints are not sufficient. Target short/coarse landscape viewports too. */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1024px) {
  .family-vuexy-body,
  .family-vuexy-body .layout-page,
  .family-vuexy-body .content-wrapper,
  .family-vuexy-body .family-content {
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  /* Compact shell for the short vertical viewport. */
  .family-vuexy-body .layout-navbar.navbar-detached {
    min-height: 3.25rem !important;
    margin: .4rem .6rem 0 !important;
    inline-size: calc(100% - 1.2rem) !important;
    width: auto !important;
    padding-inline: .65rem !important;
  }
  .family-vuexy-body .family-navbar-date,
  .family-vuexy-body .family-user-meta,
  .family-vuexy-body .theme-label {
    display: none !important;
  }
  .family-vuexy-body .family-navbar-actions {
    gap: .3rem !important;
    min-width: 0 !important;
  }
  .family-vuexy-body .preference-controls {
    gap: .25rem !important;
  }
  .family-vuexy-body .theme-toggle,
  .family-vuexy-body .family-mobile-menu-btn,
  .family-vuexy-body .family-logout-btn {
    min-height: 2.25rem !important;
  }
  .family-content,
  .family-vuexy-body .family-content {
    padding: .75rem .7rem 1.25rem !important;
  }
  .family-vuexy-body .page-head {
    margin-bottom: .7rem !important;
    gap: .55rem !important;
  }
  .family-vuexy-body .page-title {
    font-size: 1.2rem !important;
    line-height: 1.25 !important;
  }
  .family-vuexy-body .page-subtitle {
    font-size: .78rem !important;
  }

  /* Forms: use the extra horizontal space, but keep every field inside its cell. */
  .family-vuexy-body form,
  .family-vuexy-body .card,
  .family-vuexy-body .card-body,
  .family-vuexy-body .form-grid,
  .family-vuexy-body .form-group {
    min-width: 0 !important;
    max-width: 100% !important;
  }
  .family-vuexy-body .form-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: .7rem .85rem !important;
  }
  .family-vuexy-body .form-group.full,
  .family-vuexy-body .form-group.form-group-full,
  .family-vuexy-body .form-group[data-full="true"],
  .family-vuexy-body .form-actions,
  .family-vuexy-body .form-grid > .alert,
  .family-vuexy-body .form-grid > .section-title,
  .family-vuexy-body .form-grid > fieldset {
    grid-column: 1 / -1 !important;
  }
  .family-vuexy-body .card-header {
    padding: .7rem .9rem !important;
  }
  .family-vuexy-body .card-body {
    padding: .85rem !important;
  }
  .family-vuexy-body .form-label {
    margin-bottom: .3rem !important;
    line-height: 1.25 !important;
  }
  .family-vuexy-body .form-help {
    margin-top: .25rem !important;
    line-height: 1.3 !important;
  }

  /* Keep 16px text to prevent iOS focus zoom even in landscape. */
  .family-vuexy-body .form-control,
  .family-vuexy-body .form-select,
  .family-vuexy-body .form-textarea,
  .family-vuexy-body input.form-control,
  .family-vuexy-body select.form-select,
  .family-vuexy-body textarea,
  .family-vuexy-body .select2-container,
  .family-vuexy-body .select2-container--default .select2-selection--single,
  .family-vuexy-body .select2-container--default .select2-search--dropdown .select2-search__field {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    font-size: 16px !important;
  }
  .family-vuexy-body .form-control,
  .family-vuexy-body .form-select,
  .family-vuexy-body .form-textarea,
  .family-vuexy-body .select2-container .select2-selection--single {
    min-height: 42px !important;
  }
  .family-vuexy-body .form-control,
  .family-vuexy-body .form-select,
  .family-vuexy-body .form-textarea {
    padding: .55rem .65rem !important;
  }
  .family-vuexy-body textarea.form-control,
  .family-vuexy-body .form-textarea {
    min-height: 88px !important;
  }
  .family-vuexy-body .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 40px !important;
    padding-left: .65rem !important;
    padding-right: 2rem !important;
  }
  .family-vuexy-body .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px !important;
  }
  .family-vuexy-body .select2-dropdown {
    max-width: calc(100vw - 12px) !important;
  }

  /* Choice blocks can use two columns in landscape instead of creating a very tall form. */
  .family-vuexy-body .choice-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: .45rem !important;
  }
  .family-vuexy-body .choice-pill {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 42px !important;
    padding: .55rem .65rem !important;
    white-space: normal !important;
  }
  .family-vuexy-body .checkbox {
    min-height: 40px !important;
  }

  /* Pair/photo/inline action rows should exploit landscape width rather than stack excessively. */
  .family-vuexy-body .parent-pair-summary {
    grid-template-columns: minmax(0,1fr) auto minmax(0,1fr) !important;
    gap: .55rem !important;
    align-items: stretch !important;
  }
  .family-vuexy-body .person-photo-field {
    flex-direction: row !important;
    align-items: center !important;
    gap: .8rem !important;
  }
  .family-vuexy-body .person-photo-input {
    min-width: 0 !important;
    width: 100% !important;
  }
  .family-vuexy-body .select-action-row {
    grid-template-columns: minmax(0,1fr) auto !important;
    gap: .5rem !important;
  }
  .family-vuexy-body .select-action-row > .btn {
    width: auto !important;
    white-space: nowrap;
  }

  /* Compact, reachable action bar. */
  .family-vuexy-body .btn {
    min-height: 40px !important;
    padding: .55rem .75rem !important;
    touch-action: manipulation;
  }
  .family-vuexy-body .page-head > .btn,
  .family-vuexy-body .page-head > a.btn {
    width: auto !important;
  }
  .family-vuexy-body .form-actions {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 70 !important;
    display: flex !important;
    justify-content: flex-end !important;
    flex-wrap: wrap !important;
    gap: .45rem !important;
    width: 100% !important;
    margin-top: .75rem !important;
    padding: .5rem 0 calc(.5rem + env(safe-area-inset-bottom)) !important;
  }
  .family-vuexy-body .form-actions > .btn,
  .family-vuexy-body .form-actions > a.btn,
  .family-vuexy-body .form-actions > button,
  .family-vuexy-body .form-actions > form {
    width: auto !important;
    min-width: 7rem !important;
  }
  .family-vuexy-body .form-actions > form .btn {
    width: 100% !important;
  }

  /* Forms/modal opened from the family tree: full usable short-screen sheet. */
  .family-vuexy-body .family-modal,
  .family-vuexy-body .tree-person-modal {
    align-items: flex-start !important;
    padding: 4px max(4px, env(safe-area-inset-right)) 4px max(4px, env(safe-area-inset-left)) !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
  }
  .family-vuexy-body .family-modal-dialog,
  .family-vuexy-body .tree-person-modal-card {
    display: flex !important;
    flex-direction: column !important;
    width: min(920px, 100%) !important;
    max-width: 100% !important;
    max-height: calc(100dvh - 8px) !important;
    margin: 0 auto !important;
    overflow: hidden !important;
    border-radius: .65rem !important;
  }
  .family-vuexy-body .family-modal-head,
  .family-vuexy-body .tree-person-modal-head {
    flex: 0 0 auto !important;
    padding: .6rem .75rem !important;
  }
  .family-vuexy-body .family-modal-body,
  .family-vuexy-body .tree-person-modal-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: .7rem .75rem calc(.75rem + env(safe-area-inset-bottom)) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }
  .family-vuexy-body .family-modal-body .form-actions,
  .family-vuexy-body .tree-person-modal-body .form-actions {
    margin-left: -.75rem !important;
    margin-right: -.75rem !important;
    width: calc(100% + 1.5rem) !important;
    padding-left: .75rem !important;
    padding-right: .75rem !important;
  }

  /* Date picker and tables must stay usable in the short viewport. */
  .family-vuexy-body .family-date-popover {
    left: 6px !important;
    right: 6px !important;
    width: auto !important;
    max-width: none !important;
    max-height: calc(100dvh - 12px) !important;
    overflow-y: auto !important;
  }
  .family-vuexy-body .table-responsive,
  .family-vuexy-body .table-wrap,
  .family-vuexy-body .ajax-table-wrap {
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .family-vuexy-body .filters,
  .family-vuexy-body .ajax-table-toolbar,
  .family-vuexy-body .ajax-table-toolbar-left,
  .family-vuexy-body .ajax-table-toolbar-right {
    gap: .45rem !important;
  }
}

/* Very narrow landscape phones still use a single form column. */
@media (orientation: landscape) and (max-height: 480px) and (max-width: 700px) {
  .family-vuexy-body .form-grid,
  .family-vuexy-body .choice-row {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .family-vuexy-body .parent-pair-summary,
  .family-vuexy-body .select-action-row {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .family-vuexy-body .person-photo-field {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .family-vuexy-body .select-action-row > .btn {
    width: 100% !important;
  }
}

/* v1.7.38 — robust phone form scrolling and always-reachable actions.
   Fixes portrait submit/save actions disappearing and simplifies phone landscape. */
@media (max-width: 767.98px), (orientation: landscape) and (max-height: 600px) and (max-width: 1024px) {
  /* Do not let the Vuexy shell become the scroll container on phones. */
  html,
  body.family-vuexy-body {
    min-height: 100% !important;
    height: auto !important;
  }
  body.family-vuexy-body:not(.modal-open) {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
  }
  .family-vuexy-body .layout-wrapper,
  .family-vuexy-body .layout-container,
  .family-vuexy-body .layout-page,
  .family-vuexy-body .content-wrapper,
  .family-vuexy-body .family-content {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  /* Leave room for the fixed page action bar. */
  .family-vuexy-body .family-content {
    padding-bottom: calc(6.25rem + env(safe-area-inset-bottom)) !important;
  }
  .family-vuexy-body .family-content > form[data-ajax-form] {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom)) !important;
  }

  /* Page forms: Save/Cancel are always visible instead of only becoming sticky at the end. */
  .family-vuexy-body .family-content > form[data-ajax-form] > .form-actions {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 1090 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: .55rem !important;
    width: auto !important;
    margin: 0 !important;
    padding: .7rem max(.75rem, env(safe-area-inset-right)) calc(.7rem + env(safe-area-inset-bottom)) max(.75rem, env(safe-area-inset-left)) !important;
    background: rgba(255, 255, 255, .97) !important;
    border-top: 1px solid var(--bs-border-color) !important;
    box-shadow: 0 -.45rem 1rem rgba(20, 20, 35, .10) !important;
    backdrop-filter: blur(12px);
  }
  .family-vuexy-body .family-content > form[data-ajax-form] > .form-actions > .btn,
  .family-vuexy-body .family-content > form[data-ajax-form] > .form-actions > a.btn,
  .family-vuexy-body .family-content > form[data-ajax-form] > .form-actions > button,
  .family-vuexy-body .family-content > form[data-ajax-form] > .form-actions > form {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  /* Modal forms: make the dialog a true viewport-height flex sheet. */
  .family-vuexy-body .family-modal.show,
  .family-vuexy-body .tree-person-modal.show {
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
  }
  .family-vuexy-body .family-modal.show .family-modal-dialog,
  .family-vuexy-body .tree-person-modal.show .tree-person-modal-card {
    display: flex !important;
    flex-direction: column !important;
    height: calc(100vh - 12px) !important;
    max-height: calc(100vh - 12px) !important;
    overflow: hidden !important;
  }
  .family-vuexy-body .family-modal.show .family-modal-head,
  .family-vuexy-body .tree-person-modal.show .tree-person-modal-head {
    flex: 0 0 auto !important;
  }
  .family-vuexy-body .family-modal.show .family-modal-body,
  .family-vuexy-body .tree-person-modal.show .tree-person-modal-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-y: contain;
    padding-bottom: calc(6.5rem + env(safe-area-inset-bottom)) !important;
  }

  /* Modal Save/Cancel are pinned above the browser safe area and stay inside the form. */
  .family-vuexy-body .family-modal.show .family-modal-body > form[data-ajax-form] > .form-actions,
  .family-vuexy-body .tree-person-modal.show .tree-person-modal-body form[data-ajax-form] > .form-actions {
    position: fixed !important;
    left: max(6px, env(safe-area-inset-left)) !important;
    right: max(6px, env(safe-area-inset-right)) !important;
    bottom: max(6px, env(safe-area-inset-bottom)) !important;
    z-index: 1305 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: .55rem !important;
    width: auto !important;
    margin: 0 !important;
    padding: .65rem !important;
    background: rgba(255,255,255,.98) !important;
    border: 1px solid var(--bs-border-color) !important;
    border-radius: .7rem !important;
    box-shadow: 0 -.2rem 1rem rgba(20,20,35,.16) !important;
    backdrop-filter: blur(12px);
  }
  .family-vuexy-body .family-modal.show .family-modal-body > form[data-ajax-form] > .form-actions > *,
  .family-vuexy-body .tree-person-modal.show .tree-person-modal-body form[data-ajax-form] > .form-actions > * {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  /* A phone in landscape should still behave like a phone, not a cramped desktop form. */
  .family-vuexy-body .form-grid,
  .family-vuexy-body .choice-row {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .family-vuexy-body .parent-pair-summary,
  .family-vuexy-body .select-action-row {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .family-vuexy-body .person-photo-field {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .family-vuexy-body .person-photo-preview {
    align-self: center !important;
  }
  .family-vuexy-body .select-action-row > .btn {
    width: 100% !important;
  }
}

@supports (height: 100dvh) {
  @media (max-width: 767.98px), (orientation: landscape) and (max-height: 600px) and (max-width: 1024px) {
    .family-vuexy-body .family-modal.show,
    .family-vuexy-body .tree-person-modal.show {
      height: 100dvh !important;
      max-height: 100dvh !important;
    }
    .family-vuexy-body .family-modal.show .family-modal-dialog,
    .family-vuexy-body .tree-person-modal.show .tree-person-modal-card {
      height: calc(100dvh - 12px) !important;
      max-height: calc(100dvh - 12px) !important;
    }
  }
}

@media (max-width: 399.98px) {
  .family-vuexy-body .family-content > form[data-ajax-form] > .form-actions,
  .family-vuexy-body .family-modal.show .family-modal-body > form[data-ajax-form] > .form-actions,
  .family-vuexy-body .tree-person-modal.show .tree-person-modal-body form[data-ajax-form] > .form-actions {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .family-vuexy-body .family-content {
    padding-bottom: calc(9.5rem + env(safe-area-inset-bottom)) !important;
  }
  .family-vuexy-body .family-modal.show .family-modal-body,
  .family-vuexy-body .tree-person-modal.show .tree-person-modal-body {
    padding-bottom: calc(10rem + env(safe-area-inset-bottom)) !important;
  }
}

html[data-theme="dark"] .family-vuexy-body .family-content > form[data-ajax-form] > .form-actions,
[data-bs-theme="dark"] .family-vuexy-body .family-content > form[data-ajax-form] > .form-actions,
html[data-theme="dark"] .family-vuexy-body .family-modal.show .family-modal-body > form[data-ajax-form] > .form-actions,
[data-bs-theme="dark"] .family-vuexy-body .family-modal.show .family-modal-body > form[data-ajax-form] > .form-actions,
html[data-theme="dark"] .family-vuexy-body .tree-person-modal.show .tree-person-modal-body form[data-ajax-form] > .form-actions,
[data-bs-theme="dark"] .family-vuexy-body .tree-person-modal.show .tree-person-modal-body form[data-ajax-form] > .form-actions {
  background: rgba(43, 48, 70, .98) !important;
  border-color: #4a5371 !important;
}

/* v1.7.40 — keep tree modal above Vuexy mobile overlay and restore clickability. */
.family-vuexy-body .tree-person-modal {
  z-index: 1400 !important;
}
.family-vuexy-body .tree-person-modal.show {
  pointer-events: auto !important;
  opacity: 1 !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: rgba(15, 23, 42, .42) !important;
}
.family-vuexy-body .tree-person-modal.show .tree-person-modal-card {
  position: relative !important;
  z-index: 1401 !important;
  pointer-events: auto !important;
  opacity: 1 !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.family-vuexy-body .tree-person-modal-close {
  position: relative !important;
  z-index: 1402 !important;
  pointer-events: auto !important;
  touch-action: manipulation;
  opacity: 1 !important;
}
/* A stale Vuexy menu overlay must never sit on top of an open family modal. */
body.modal-open .layout-overlay {
  pointer-events: none !important;
}
body.modal-open .tree-person-modal.show {
  isolation: isolate;
}

/* v1.7.42 — bagan silsilah: detail panel + trace keturunan + mobile sorting. */
/* Form edit selalu di atas panel detail (sebelumnya 1200 vs tree 1400). */
.family-vuexy-body .family-modal.show { z-index: 1800 !important; }
.family-vuexy-body .family-modal.show .family-modal-dialog { position: relative; z-index: 1801 !important; }

/* Bagan tidak lagi tertutup backdrop gelap: pengguna bisa melihat dan menelusuri jalur. */
.family-vuexy-body .tree-person-modal.show {
  z-index: 1400 !important;
  background: transparent !important;
  backdrop-filter: none !important;
  pointer-events: none !important;
  justify-content: flex-end !important;
  align-items: center !important;
  padding: 12px !important;
}
.family-vuexy-body .tree-person-modal.show .tree-person-modal-card {
  pointer-events: auto !important;
  width: min(432px, 37vw) !important;
  max-width: 100% !important;
  height: min(82vh, 850px) !important;
  max-height: calc(100dvh - 24px) !important;
  margin: 0 !important;
  border: 1px solid var(--bs-border-color) !important;
  box-shadow: 0 14px 44px rgba(20,20,35,.24) !important;
  background: var(--bs-paper-bg) !important;
}
.family-vuexy-body .tree-person-modal.show .tree-person-modal-body { overflow-y: auto !important; min-height: 0 !important; }

/* Trace SVG mengikuti sambungan parent -> anak (tidak mengubah garis asli). */
.tree-svg .tree-lineage-layer { pointer-events: none; }
.tree-svg .tree-lineage-trace {
  fill: none !important;
  stroke: #ffad18 !important;
  stroke-width: 5.5px !important;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 12 6;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 4px rgba(255,150,0,.75));
  animation: tree-lineage-pulse 1.35s ease-in-out infinite alternate;
}
@keyframes tree-lineage-pulse {
  from { opacity: .52; stroke-dashoffset: 0; }
  to { opacity: 1; stroke-dashoffset: -36; }
}
.tree-node.is-lineage-root {
  z-index: 12 !important;
  outline: 3px solid #ffa200 !important;
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(255,173,24,.17), 0 0 22px rgba(255,173,24,.55) !important;
}
.tree-node.is-lineage-descendant {
  z-index: 11 !important;
  outline: 2px solid #fbbf24 !important;
  outline-offset: 2px;
  box-shadow: 0 0 14px rgba(245,158,11,.30) !important;
}
.family-vuexy-body .tree-toolbar .tree-lineage-hint { font-size: 12px; font-weight: 600; color: var(--bs-body-color); }
.family-vuexy-body .tree-toolbar button[hidden] { display: none !important; }

.tree-child-sorter-head { margin-bottom: 13px; }
.tree-child-sorter-head strong { font-size: 15px; color: var(--bs-heading-color); }
.tree-child-sorter-head p { font-size: 12px; margin: 7px 0 0; color: var(--bs-secondary-color); line-height: 1.5; }
.tree-child-sort-list { display: grid; gap: 8px; }
.tree-child-sort-row {
  display: flex; align-items: center; min-width: 0; gap: 9px;
  background: var(--bs-paper-bg); border: 1px solid var(--bs-border-color);
  border-radius: 10px; padding: 9px 7px;
}
.tree-child-sort-row.is-dragging { opacity: .64; border: 2px dashed var(--bs-primary); background: var(--bs-primary-bg-subtle); }
.tree-sort-handle { touch-action: none; cursor: grab; flex: 0 0 34px; width: 34px; height: 38px; border: none; background: transparent; color: var(--bs-primary); font-size: 20px; }
.tree-sort-handle:active { cursor: grabbing; }
.tree-sort-rank { display: inline-grid; place-items: center; flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; background: var(--bs-primary-bg-subtle); color: var(--bs-primary); font-size: 12px; font-weight: 800; }
.tree-sort-name { font-size: 13px; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.tree-sort-moves { display: flex; gap: 3px; flex: 0 0 auto; }
.tree-sort-move { border: 1px solid var(--bs-border-color); border-radius: 7px; background: var(--bs-paper-bg); color: var(--bs-heading-color); width: 32px; height: 34px; font-size: 16px; cursor: pointer; }
.tree-sort-move:disabled { opacity: .3; cursor: default; }
.tree-child-sort-message { margin-top: 12px; color: var(--bs-danger); font-size: 12px; font-weight: 600; }
.tree-child-sort-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

@media (max-width: 899px) {
  .family-vuexy-body .tree-person-modal.show { align-items: flex-end !important; justify-content: center !important; padding: 6px !important; }
  .family-vuexy-body .tree-person-modal.show .tree-person-modal-card {
    width: min(680px, 100%) !important;
    height: min(66dvh, 600px) !important;
    max-height: 66dvh !important;
    border-radius: 16px 16px 10px 10px !important;
  }
  .tree-sort-move { width: 38px; height: 38px; }
}
@media (max-width: 380px) {
  .tree-child-sort-row { gap: 5px; padding: 6px 4px; }
  .tree-sort-name { font-size: 12px; }
  .tree-sort-move { width: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .tree-svg .tree-lineage-trace { animation: none !important; stroke-dasharray: none !important; opacity: 1; }
}

/* v1.7.43 — drag and autosave langsung pada kartu anak di panel silsilah. */
.family-vuexy-body .tree-inline-sort-list { gap: 6px; min-width: 0; }
.family-vuexy-body .tree-related-row.tree-inline-sort-row {
  display: grid; grid-template-columns: 27px minmax(0, 1fr) auto;
  gap: 7px; align-items: center; min-width: 0;
  padding: 2px 0; border-radius: 9px; transition: background .15s ease;
}
.family-vuexy-body .tree-inline-sort-handle {
  display: grid; place-items: center; width: 27px; height: 40px;
  padding: 0; border: 1px solid var(--bs-border-color);
  border-radius: 8px; color: var(--bs-primary);
  background: var(--bs-paper-bg); font-size: 20px; line-height: 1;
  cursor: grab; touch-action: none; user-select: none;
}
.family-vuexy-body .tree-inline-sort-handle:hover,
.family-vuexy-body .tree-inline-sort-handle:focus-visible {
  background: var(--bs-primary-bg-subtle); border-color: var(--bs-primary);
}
.family-vuexy-body .tree-inline-sort-handle:active { cursor: grabbing; }
.family-vuexy-body .tree-inline-sort-row .tree-person-link { min-width: 0; }
.family-vuexy-body .tree-inline-sort-row .tree-related-edit { width: auto; min-width: 51px; }
.family-vuexy-body .tree-inline-sort-row.is-dragging {
  opacity: .56; background: var(--bs-primary-bg-subtle);
  outline: 2px dashed var(--bs-primary); outline-offset: -2px;
}
.family-vuexy-body .tree-inline-sort-list.is-saving { opacity: .65; pointer-events: none; }
.family-vuexy-body .tree-inline-sort-status {
  font-size: 12px; margin: 5px 0 9px; color: var(--bs-primary); font-weight: 600;
}
.family-vuexy-body .tree-inline-sort-status.is-error { color: var(--bs-danger); }
.family-vuexy-body .tree-inline-sort-hint {
  display: inline-block; margin-left: 8px; color: var(--bs-secondary-color);
  font-size: 11px; font-weight: 500;
}
@media(max-width: 560px) {
  .family-vuexy-body .tree-related-row.tree-inline-sort-row {
    grid-template-columns: 27px minmax(0, 1fr) 55px;
  }
  .family-vuexy-body .tree-inline-sort-row .tree-related-edit { min-width: 0; padding-inline: 6px; }
}


/* v1.7.44 — centered family-tree details, non-sticky inner sections, safe phone sorting. */
/* Navbar mengikuti halaman saat di-scroll, bukan fixed/sticky. */
.family-vuexy-body .layout-navbar.navbar-detached {
  position: relative !important;
  top: auto !important;
  inset-block-start: auto !important;
}
/* Only the modal's own title may remain in place. The partner/history sections scroll normally. */
.family-vuexy-body .tree-person-modal-body .tree-family-history-head,
.family-vuexy-body .tree-person-modal-body .family-history-head,
.family-vuexy-body .family-modal-body .family-history-head,
.family-vuexy-body .family-content .family-history-head {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
  box-shadow: none !important;
}
/* Modal detail tetap di tengah pada semua layar, termasuk HP dan tablet. */
.family-vuexy-body .tree-person-modal.show {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 12px !important;
  pointer-events: none !important;
}
.family-vuexy-body .tree-person-modal.show .tree-person-modal-card {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  width: min(640px, calc(100vw - 24px)) !important;
  max-width: calc(100vw - 24px) !important;
  height: auto !important;
  max-height: calc(100vh - 24px) !important;
  max-height: calc(100dvh - 24px) !important;
  margin: 0 auto !important;
  overflow: hidden !important;
  border-radius: 14px !important;
}
.family-vuexy-body .tree-person-modal.show .tree-person-modal-head {
  position: relative !important;
  top: auto !important;
  flex: 0 0 auto !important;
  z-index: 2 !important;
}
.family-vuexy-body .tree-person-modal.show .tree-person-modal-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
/* Desktop drag handle; mobile uses explicit arrow buttons (no swipe-to-sort). */
.family-vuexy-body .tree-inline-sort-controls { display: flex; align-items: center; width: 27px; min-width: 0; }
.family-vuexy-body .tree-inline-sort-moves { display: none; }
.family-vuexy-body .tree-inline-hint-mobile { display: none; }
@media (max-width: 899px), (hover: none) and (pointer: coarse) {
  .family-vuexy-body .tree-person-modal.show {
    align-items: center !important;
    justify-content: center !important;
    padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)) !important;
  }
  .family-vuexy-body .tree-person-modal.show .tree-person-modal-card {
    width: min(640px, calc(100vw - 20px)) !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: calc(100vh - 20px) !important;
    max-height: calc(100dvh - 20px) !important;
    border-radius: 13px !important;
    margin: 0 auto !important;
  }
  .family-vuexy-body .tree-inline-sort-handle { display: none !important; }
  .family-vuexy-body .tree-inline-sort-moves {
    display: flex; flex-direction: column; gap: 3px; align-items: center;
  }
  .family-vuexy-body .tree-inline-sort-move {
    display: grid; place-items: center;
    padding: 0 !important; width: 30px; height: 25px; min-height: 25px !important;
    border: 1px solid var(--bs-border-color);
    border-radius: 6px; color: var(--bs-primary);
    background: var(--bs-paper-bg); font-size: 18px; font-weight: 800;
    line-height: 1; touch-action: manipulation; cursor: pointer;
  }
  .family-vuexy-body .tree-inline-sort-move:disabled { opacity: .27; cursor: default; }
  .family-vuexy-body .tree-inline-sort-controls { width: 30px; }
  .family-vuexy-body .tree-inline-hint-desktop { display: none; }
  .family-vuexy-body .tree-inline-hint-mobile { display: inline; }
  .family-vuexy-body .tree-related-row.tree-inline-sort-row {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
  }
}


/* v1.7.45 — Full-width purple topbar (within the content area). */
/* The layout-page ALREADY accounts for the sidebar. Do not subtract the menu
   width for a second time: doing so cuts the navbar short on desktop. */
@media (min-width: 1200px) {
  html:not(.layout-menu-collapsed) body.family-vuexy-body #layout-navbar,
  html.layout-menu-collapsed body.family-vuexy-body #layout-navbar {
    box-sizing: border-box;
    width: calc(100% - 3rem) !important;
    inline-size: calc(100% - 3rem) !important;
    max-width: none !important;
    margin-inline: 1.5rem !important;
  }
}
/* Keep the same responsive margins as the existing sidebar/tablet layout. */
@media (max-width: 1199.98px) {
  body.family-vuexy-body #layout-navbar {
    box-sizing: border-box;
    width: calc(100% - 1.5rem) !important;
    inline-size: calc(100% - 1.5rem) !important;
    max-width: none !important;
    margin-inline: .75rem !important;
  }
}
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1024px) {
  body.family-vuexy-body #layout-navbar {
    width: calc(100% - 1.2rem) !important;
    inline-size: calc(100% - 1.2rem) !important;
    margin-inline: .6rem !important;
  }
}
/* Same purple family as the sidebar, across both light and dark modes. */
html[data-theme="light"] body.family-vuexy-body #layout-navbar,
html[data-theme="dark"] body.family-vuexy-body #layout-navbar,
[data-bs-theme="light"] body.family-vuexy-body #layout-navbar,
[data-bs-theme="dark"] body.family-vuexy-body #layout-navbar {
  background: linear-gradient(100deg, #6458d8 0%, #564bc1 100%) !important;
  border: 1px solid rgba(255,255,255,.15) !important;
  box-shadow: 0 .28rem .95rem rgba(59,48,147,.21) !important;
  backdrop-filter: none;
}
/* Force legible text, without changing typography/colors elsewhere. */
html body.family-vuexy-body #layout-navbar .family-navbar-date,
html body.family-vuexy-body #layout-navbar .family-navbar-date i,
html body.family-vuexy-body #layout-navbar .family-user-meta strong,
html body.family-vuexy-body #layout-navbar .family-user-meta small {
  color: #fff !important;
}
html body.family-vuexy-body #layout-navbar .family-user-meta small {
  opacity: .84;
}
html body.family-vuexy-body #layout-navbar .family-mobile-menu-btn {
  color: #fff !important;
}
/* Subtle translucent controls, white active language choice. */
html body.family-vuexy-body #layout-navbar .language-switch,
html body.family-vuexy-body #layout-navbar .theme-toggle,
html body.family-vuexy-body #layout-navbar .family-logout-btn {
  background: rgba(255,255,255,.12) !important;
  border-color: rgba(255,255,255,.32) !important;
  color: #fff !important;
}
html body.family-vuexy-body #layout-navbar .preference-option {
  color: rgba(255,255,255,.84) !important;
}
html body.family-vuexy-body #layout-navbar .preference-option.active {
  background: #fff !important;
  border-color: #fff !important;
  color: #564bc1 !important;
}
html body.family-vuexy-body #layout-navbar .theme-toggle:hover,
html body.family-vuexy-body #layout-navbar .family-logout-btn:hover,
html body.family-vuexy-body #layout-navbar .family-mobile-menu-btn:hover {
  background: rgba(255,255,255,.22) !important;
  border-color: rgba(255,255,255,.55) !important;
  color: #fff !important;
}
html body.family-vuexy-body #layout-navbar .family-user-avatar {
  background: #f0edff !important;
  color: #5549bd !important;
}
/* No sticky header regression: it should scroll away with the page. */
body.family-vuexy-body #layout-navbar {
  position: relative !important;
  top: auto !important;
}

/* v1.7.47 - Dropdown Select2 pada modal jangan tertutup dialog di desktop/HP.
 * Select2 menambahkan dropdown sebagai anak langsung overlay modal, sedangkan
 * dialog memiliki z-index 1801. Aturan lama .family-modal .select2-container
 * (z-index:1) membuat opsi terbuka di belakang dialog. */
.family-vuexy-body .family-modal.show > .select2-container--open {
  position: absolute;
  z-index: 1905 !important;
  pointer-events: auto !important;
}
/* Modal detail bagan juga menjadi parent dropdown bila ada select di dalamnya. */
.family-vuexy-body .tree-person-modal.show > .select2-container--open {
  z-index: 1505 !important;
  pointer-events: auto !important;
}
/* Daftar pilihan dapat di-scroll tanpa menggeser konten form modal. */
.family-vuexy-body .family-modal.show > .select2-container--open .select2-results__options,
.family-vuexy-body .tree-person-modal.show > .select2-container--open .select2-results__options {
  max-height: min(280px, 42dvh) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* Fallback saat JavaScript belum mengukur ukuran dropdown: jangan selebar overlay HP. */
@media (max-width: 767.98px), (orientation: landscape) and (max-height: 600px) and (max-width: 1024px) {
  .family-vuexy-body .family-modal.show > .select2-container--open,
  .family-vuexy-body .tree-person-modal.show > .select2-container--open {
    width: calc(100vw - 56px) !important;
    max-width: calc(100vw - 16px) !important;
  }
}


/* v1.7.52 — Select2 across all family forms (page + dialog + mobile).
   Dropdown is appended to <body> by forms.js so it is not clipped by the
   scrollable modal body and is not trapped below .family-modal-dialog. */
body.family-vuexy-body > .select2-container.family-select2-floating {
  position: absolute !important;
  max-width: calc(100vw - 16px) !important;
  z-index: 1190 !important;
  pointer-events: auto !important;
}
body.family-vuexy-body > .select2-container.family-select2-floating.family-select2-floating-modal {
  z-index: 2305 !important; /* modal: 1800; modal dialog: 1801 */
}
body.family-vuexy-body > .family-select2-floating .select2-dropdown {
  max-width: 100% !important;
  width: 100% !important;
  border-color: var(--bs-border-color, #d9d5df);
  box-shadow: 0 9px 24px rgba(25, 19, 46, .18);
}
body.family-vuexy-body > .family-select2-floating .select2-results__options {
  max-height: min(280px, 43dvh) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
body.family-vuexy-body > .family-select2-floating .select2-search__field {
  font-size: 16px !important; /* prevent iOS focus zoom */
}
