    :root {
      color-scheme: light;
      --ink: #172026;
      --muted: #4c5e69;
      --line: #d9e1e6;
      --surface: #ffffff;
      --soft: #f4f7f8;
      --accent: #3b82c4;
      --accent-dark: #245f91;
      --focus: #69aee6;
      --danger: #b42318;
      --success: #23845b;
      --cloud: #eaf4fc;
      --cloud-strong: #d7eafa;
      --navy: #16364f;
      --teal: #18776f;
      --warning: #a86316;
      --shadow-sm: 0 1px 2px rgba(23, 32, 38, .05), 0 4px 14px rgba(23, 32, 38, .04);
      --shadow-md: 0 12px 32px rgba(23, 54, 79, .12);
    }
    * { box-sizing: border-box; }
    body {
      margin: 0;
      font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      color: var(--ink);
      background: var(--soft);
      line-height: 1.45;
    }
    .page-loader[hidden] { display: none; }
    .page-loader {
      position: fixed;
      inset: 0;
      z-index: 1000;
      display: grid;
      place-items: center;
      padding: 20px;
      background: rgba(244, 249, 252, .78);
      backdrop-filter: blur(3px);
    }
    .page-loader-content {
      display: grid;
      justify-items: center;
      gap: 13px;
      min-width: 160px;
      padding: 22px 28px;
      border: 1px solid #c9e0f0;
      border-radius: 8px;
      background: #fff;
      box-shadow: var(--shadow-md);
      color: var(--navy);
      font-size: 13px;
      font-weight: 700;
    }
    .loader-mark { display: flex; align-items: center; gap: 7px; height: 28px; }
    .loader-mark span {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: var(--accent);
      animation: loader-wave 1s ease-in-out infinite;
    }
    .loader-mark span:nth-child(2) { animation-delay: .13s; background: var(--teal); }
    .loader-mark span:nth-child(3) { animation-delay: .26s; background: var(--accent-dark); }
    @keyframes loader-wave {
      0%, 60%, 100% { transform: translateY(0); opacity: .6; }
      30% { transform: translateY(-8px); opacity: 1; }
    }
    @media (prefers-reduced-motion: reduce) {
      .loader-mark span { animation: none; opacity: 1; }
    }
    a { color: var(--accent-dark); text-decoration: none; }
    a:hover { text-decoration: underline; }
    header {
      background: var(--surface);
      border-bottom: 1px solid var(--line);
      min-height: 64px;
      padding: 10px 22px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      position: sticky;
      top: 0;
      z-index: 40;
      box-shadow: 0 1px 10px rgba(23, 54, 79, .06);
    }
    .brand { display: inline-flex; align-items: center; gap: 11px; color: var(--navy); text-decoration: none; }
    .brand:hover { text-decoration: none; }
    .brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; background: var(--accent); color: #fff; }
    .brand-mark svg { width: 20px; height: 20px; }
    .brand-copy { display: grid; line-height: 1.05; }
    .brand-copy strong { font-size: 15px; }
    .brand-copy small { margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 600; }
    .mobile-nav-toggle { display: none; width: 40px; height: 40px; padding: 0; box-shadow: none; }
    .user-nav { display: flex; gap: 12px; flex-wrap: wrap; font-size: 14px; align-items: center; }
    .account-menu { position: relative; }
    .user-identity {
      display: inline-flex;
      align-items: center;
      gap: 9px;
      width: auto;
      min-height: 0;
      padding: 0;
      border: 0;
      border-radius: 0;
      background: transparent;
      color: var(--ink);
      font: inherit;
      font-weight: 700;
      text-decoration: none;
      box-shadow: none;
    }
    .user-identity:hover { color: var(--accent-dark); background: transparent; text-decoration: none; }
    .user-identity:focus-visible { outline: 3px solid rgba(59, 130, 196, .25); outline-offset: 4px; }
    .user-avatar {
      width: 38px;
      height: 38px;
      flex: 0 0 38px;
      display: grid;
      place-items: center;
      overflow: hidden;
      border: 2px solid #c5ddf0;
      border-radius: 50%;
      background: var(--cloud);
      color: var(--accent-dark);
      font-size: 14px;
      font-weight: 700;
      text-transform: uppercase;
    }
    .user-avatar img { width: 100%; height: 100%; object-fit: cover; }
    .account-chevron { font-size: 11px; color: var(--muted); transition: transform .15s ease; }
    .account-menu.is-open .account-chevron { transform: rotate(180deg); }
    .account-dropdown {
      display: none;
      position: absolute;
      top: calc(100% + 10px);
      right: 0;
      width: 190px;
      padding: 7px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fff;
      box-shadow: 0 14px 32px rgba(23, 32, 38, .18);
      z-index: 30;
    }
    .account-menu.is-open .account-dropdown { display: grid; }
    .account-dropdown a,
    .account-dropdown .menu-logout {
      width: 100%;
      min-height: 40px;
      display: flex;
      align-items: center;
      padding: 9px 11px;
      border: 0;
      border-radius: 6px;
      background: transparent;
      color: var(--ink);
      font: inherit;
      font-weight: 600;
      text-align: left;
      text-decoration: none;
      box-shadow: none;
    }
    .account-dropdown a:hover,
    .account-dropdown .menu-logout:hover { background: var(--cloud); color: var(--accent-dark); text-decoration: none; }
    .account-dropdown .logout-form { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
    .logout-form { margin: 0; }
    .logout-button {
      border: 0;
      background: transparent;
      color: var(--accent-dark);
      padding: 0;
      font: inherit;
      font-size: 14px;
    }
    .app-shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: calc(100vh - 64px); }
    .sidebar {
      background: var(--navy);
      color: #eff7f6;
      padding: 18px 14px;
      position: sticky;
      top: 64px;
      height: calc(100vh - 64px);
      overflow: auto;
    }
    .sidebar-section { margin-bottom: 14px; }
    .sidebar-heading {
      width: 100%;
      min-height: 36px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 7px 9px;
      border: 0;
      border-radius: 6px;
      background: transparent;
      box-shadow: none;
      color: #b9d4e8;
      font-size: 12px;
      font-weight: 700;
      letter-spacing: .04em;
      text-transform: uppercase;
      cursor: pointer;
    }
    .sidebar-heading:hover { background: rgba(255, 255, 255, .08); color: #fff; box-shadow: none; }
    .sidebar-heading:focus-visible { outline: 2px solid #9ccbec; outline-offset: 2px; }
    .sidebar-heading .sidebar-chevron { width: 16px; height: 16px; transition: transform .18s ease; }
    .sidebar-heading[aria-expanded="false"] .sidebar-chevron { transform: rotate(-90deg); }
    .sidebar-links { display: grid; gap: 2px; margin-top: 5px; }
    .sidebar-links[hidden] { display: none; }
    .sidebar a {
      color: #eff7f6;
      display: flex;
      align-items: center;
      gap: 10px;
      min-height: 40px;
      padding: 9px 10px;
      border-radius: 6px;
      text-decoration: none;
      font-size: 14px;
    }
    .sidebar a svg {
      width: 18px;
      height: 18px;
      flex: 0 0 18px;
      color: #9ccbec;
    }
    .sidebar a:hover { background: rgba(255, 255, 255, .09); color: #fff; text-decoration: none; }
    .sidebar a.is-active { background: #fff; color: var(--navy); font-weight: 700; box-shadow: var(--shadow-sm); }
    .sidebar a.is-active svg { color: var(--accent); }
    .sidebar a:hover svg { color: #fff; }
    main { width: min(1240px, calc(100% - 40px)); margin: 28px auto 56px; }
    h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: 0; }
    .page-title { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
    .page-title h1 { color: var(--navy); font-size: 32px; }
    .page-title p { margin: 7px 0 0; max-width: 720px; }
    .page-title .section-translation {
      margin: 0 0 5px;
      color: var(--accent-dark);
      font-size: 12px;
      font-weight: 800;
      line-height: 1.2;
      text-transform: uppercase;
    }
    .muted { color: var(--muted); }
    .grid { display: grid; gap: 14px; }
    .stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
    .management-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
    .card {
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 16px;
      box-shadow: var(--shadow-sm);
    }
    a.card { transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
    a.card:hover { border-color: #a9cbe5; box-shadow: var(--shadow-md); transform: translateY(-2px); text-decoration: none; }
    .card > h2:first-child, .card > div > h2:first-child { color: var(--navy); font-size: 18px; }
    .stat-value { font-size: 28px; font-weight: 700; margin-top: 6px; }
    .columns { grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); align-items: start; }
    .table-scroll { width: 100%; max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-sm); }
    table { width: 100%; min-width: 100%; border-collapse: collapse; background: var(--surface); }
    th, td { padding: 12px 14px; border-bottom: 1px solid #e7edf1; text-align: left; vertical-align: middle; }
    th { background: #edf6fc; font-size: 12px; color: #294f70; text-transform: uppercase; font-weight: 800; }
    tbody tr:last-child td { border-bottom: 0; }
    tbody tr { transition: background .12s ease; }
    tbody tr:hover { background: #f8fbfd; }
    form.search { display: flex; gap: 8px; margin-bottom: 14px; }
    input[type="search"] { flex: 1; min-width: 0; }
    .member-summary { grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); margin-bottom: 18px; }
    .member-summary .card { padding: 13px 15px; border-top: 3px solid #b9d7ed; }
    .member-summary .stat-value { font-size: 24px; }
    .member-summary .card small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
    .member-filter-panel { margin-bottom: 20px; padding: 0; overflow: hidden; }
    .member-filter-heading { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #fbfdff; }
    .member-filter-heading h2 { color: var(--navy); font-size: 17px; }
    .member-filter-heading p { margin: 3px 0 0; font-size: 12px; }
    .member-filter-heading > svg { width: 20px; color: var(--accent-dark); }
    .member-filters {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
      gap: 10px;
      align-items: end;
      padding: 16px;
    }
    .member-filters label { font-size: 12px; margin-bottom: 5px; }
    .member-filters > div:first-child { grid-column: span 2; }
    .member-filters .filter-action { min-height: 46px; }
    .member-filters .filter-action svg { width: 16px; height: 16px; }
    input, select, textarea {
      width: 100%;
      max-width: none;
      min-height: 46px;
      padding: 11px 13px;
      border: 1px solid #c8d5dd;
      border-radius: 8px;
      background: #fff;
      color: var(--ink);
      font: inherit;
      box-shadow: inset 0 1px 2px rgba(23, 32, 38, .035);
      transition: border-color .15s ease, box-shadow .15s ease;
    }
    textarea { min-height: 118px; resize: vertical; }
    select { appearance: auto; }
    .select2-container { width: 100% !important; font: inherit; }
    .select2-container .select2-selection--single {
      height: 46px;
      border: 1px solid #c8d5dd;
      border-radius: 8px;
      background: #fff;
      box-shadow: inset 0 1px 2px rgba(23, 32, 38, .035);
    }
    .select2-container .select2-selection--single .select2-selection__rendered {
      height: 44px;
      display: flex;
      align-items: center;
      padding: 0 42px 0 13px;
      color: var(--ink);
      line-height: 1.25;
    }
    .select2-container .select2-selection--single .select2-selection__placeholder { color: #52646f; }
    .select2-container .select2-selection--single .select2-selection__arrow { width: 38px; height: 44px; }
    .select2-container .select2-selection--single .select2-selection__clear {
      position: absolute;
      top: 50%;
      right: 34px;
      z-index: 2;
      margin: 0;
      padding: 2px 5px;
      border-radius: 4px;
      color: var(--muted);
      font-size: 17px;
      line-height: 1;
      transform: translateY(-50%);
    }
    .select2-container .select2-selection--single .select2-selection__clear:hover { background: var(--cloud); color: var(--danger); }
    .select2-container--default.select2-container--focus .select2-selection--single,
    .select2-container--default.select2-container--open .select2-selection--single {
      border-color: var(--focus);
      box-shadow: 0 0 0 3px rgba(59, 130, 196, .16);
    }
    .select2-dropdown {
      overflow: hidden;
      border: 1px solid #afc6d7;
      border-radius: 8px;
      background: #fff;
      box-shadow: var(--shadow-md);
    }
    .select2-search--dropdown { padding: 10px; background: #f7fafc; border-bottom: 1px solid var(--line); }
    .select2-container--default .select2-search--dropdown .select2-search__field {
      min-height: 40px;
      padding: 8px 11px;
      border: 1px solid #b8cad6;
      border-radius: 6px;
      outline: none;
    }
    .select2-results__options { padding: 5px; }
    .select2-container--default .select2-results__option { padding: 9px 10px; border-radius: 5px; }
    .select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--accent); color: #fff; }
    .select2-container--default .select2-results__option[aria-selected="true"] { background: var(--cloud); color: var(--accent-dark); font-weight: 700; }
    .select2-results__group { padding: 9px 10px 5px !important; color: var(--muted); font-size: 12px; text-transform: uppercase; }
    input:focus, select:focus, textarea:focus {
      border-color: var(--focus);
      box-shadow: 0 0 0 3px rgba(59, 130, 196, .16);
      outline: none;
    }
    input[type="checkbox"], input[type="radio"] {
      width: auto;
      min-height: 0;
      margin-right: 8px;
      box-shadow: none;
    }
    input[type="file"] {
      min-height: 48px;
      padding: 9px;
    }
    .date-picker {
      min-height: 50px;
      padding: 10px 48px 10px 14px;
      cursor: pointer;
      font-variant-numeric: tabular-nums;
      background-color: #fff;
      background-image:
        linear-gradient(90deg, transparent calc(100% - 48px), var(--cloud) calc(100% - 48px)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%233b82c4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: 0 0, calc(100% - 14px) center;
    }
    .date-picker:hover {
      border-color: #91bfe2;
    }
    .date-picker:disabled {
      cursor: not-allowed;
      background: var(--soft);
    }
    .ui-datepicker {
      width: 19rem;
      padding: 12px;
      border: 1px solid var(--line) !important;
      border-radius: 8px;
      box-shadow: 0 12px 30px rgba(23, 32, 38, .18);
      font-family: Arial, Helvetica, sans-serif;
      z-index: 100 !important;
    }
    .ui-datepicker .ui-datepicker-header {
      border: 0;
      border-radius: 6px;
      background: var(--cloud);
      color: var(--ink);
      padding: 7px 4px;
    }
    .ui-datepicker select.ui-datepicker-month,
    .ui-datepicker select.ui-datepicker-year {
      width: 42%;
      min-height: 34px;
      padding: 4px 6px;
      margin: 0 3px;
      font-size: 13px;
    }
    .ui-datepicker td a,
    .ui-datepicker td span {
      border: 0 !important;
      border-radius: 5px;
      background: transparent !important;
      text-align: center;
      padding: 7px !important;
    }
    .ui-datepicker td a:hover,
    .ui-datepicker .ui-state-active {
      background: var(--accent) !important;
      color: #fff !important;
    }
    .ui-datepicker .ui-datepicker-buttonpane button {
      border: 1px solid var(--accent);
      border-radius: 5px;
      background: var(--accent);
      color: #fff;
      opacity: 1;
      padding: 6px 10px;
    }
    label { display: block; font-weight: 700; margin-bottom: 7px; color: #24343a; }
    label:not(.required)::after { color: var(--muted); font-weight: 500; }
    .form-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
      gap: 18px 20px;
      align-items: start;
    }
    .form-grid > div {
      min-width: 0;
    }
    .phone-input-group { display: grid; grid-template-columns: minmax(170px, .8fr) minmax(180px, 1.2fr); gap: 8px; }
    .phone-input-group > label,
    .phone-input-group > .helptext,
    .phone-input-group > .muted,
    .phone-input-group > .errorlist { grid-column: 1 / -1; }
    .phone-input-group > label { margin-bottom: -1px; }
    .phone-input-group > .select2-container { grid-column: 1; }
    .phone-input-group > input[type="tel"] { grid-column: 2; }
    .form-grid > div:has(textarea),
    .form-grid > div:has(input[type="file"]),
    .form-grid > div:has(.errorlist),
    .form-grid > button,
    .form-grid > .form-actions {
      grid-column: 1 / -1;
    }
    .form-grid > button {
      justify-self: start;
      min-width: 180px;
    }
    .form-grid > div:has(input[type="checkbox"]) {
      align-self: end;
      display: flex;
      align-items: center;
      min-height: 46px;
      padding-top: 25px;
    }
    .form-grid > div:has(input[type="checkbox"]) label {
      display: inline;
      margin: 0;
      order: 2;
    }
    .form-grid > div:has(input[type="checkbox"]) input {
      order: 1;
    }
    .form-grid .muted {
      margin: 6px 0 0;
      font-size: 13px;
      color: #536570;
    }
    .sectioned-form {
      display: grid;
      gap: 18px;
    }
    .form-section {
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 18px;
      background: #fff;
      box-shadow: var(--shadow-sm);
    }
    .form-section-header {
      margin-bottom: 16px;
      padding-bottom: 12px;
      border-bottom: 1px solid #dce8ef;
      border-left: 4px solid var(--accent);
      padding-left: 12px;
    }
    .form-section-header h2 {
      font-size: 18px;
      margin: 0;
    }
    .form-section-header p {
      margin: 5px 0 0;
    }
    .errorlist {
      color: var(--danger);
      margin: 6px 0 0;
      padding-left: 18px;
      font-size: 13px;
    }
    .hidden-field { display: none !important; }
    .messages { display: grid; gap: 8px; margin-bottom: 16px; }
    .message { background: var(--cloud); border: 1px solid #b8d5ec; border-left: 4px solid var(--accent); border-radius: 8px; padding: 12px 14px; box-shadow: var(--shadow-sm); }
    button, .button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      border: 1px solid var(--accent);
      background: var(--accent);
      color: white;
      border-radius: 6px;
      padding: 10px 14px;
      font-weight: 700;
      line-height: 1.2;
      text-decoration: none;
      cursor: pointer;
      box-shadow: 0 2px 5px rgba(36, 95, 145, .16);
      transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
    }
    button:hover, .button:hover {
      background: var(--accent-dark);
      border-color: var(--accent-dark);
      color: #fff;
      text-decoration: none;
      box-shadow: 0 4px 10px rgba(36, 95, 145, .22);
    }
    button:active, .button:active { transform: translateY(1px); }
    button > svg, .button > svg { width: 16px; height: 16px; flex: 0 0 16px; }
    .button-secondary { background: #fff; border-color: #9bb8ce; color: var(--accent-dark); box-shadow: none; }
    .button-secondary:hover { background: var(--cloud); border-color: var(--accent); color: var(--accent-dark); }
    .button-success { background: var(--success); border-color: var(--success); }
    .button-success:hover { background: #176b48; border-color: #176b48; }
    .button-danger { background: #c23b32; border-color: #c23b32; }
    .button-danger:hover { background: #9f2f28; border-color: #9f2f28; }
    .button-small { min-height: 34px; padding: 7px 10px; font-size: 13px; }
    .action-group { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
    .action-group form { margin: 0; }
    .pagination {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-top: 14px;
      padding: 10px 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fff;
    }
    .pagination-summary { margin: 0; color: var(--muted); font-size: 13px; }
    .pagination-links { display: flex; gap: 5px; flex-wrap: wrap; }
    .page-link {
      min-width: 34px;
      min-height: 34px;
      display: inline-grid;
      place-items: center;
      padding: 6px 9px;
      border: 1px solid #b9cee0;
      border-radius: 6px;
      background: #fff;
      color: var(--accent-dark);
      font-size: 13px;
      font-weight: 700;
      text-decoration: none;
    }
    .page-link:hover { background: var(--cloud); text-decoration: none; }
    .page-link.is-current { border-color: var(--accent); background: var(--accent); color: #fff; }
    .directory-panel { margin-top: 20px; }
    .directory-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
    .directory-heading h2 { color: var(--navy); font-size: 20px; }
    .directory-heading p { margin: 4px 0 0; font-size: 13px; }
    .management-import-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 16px; padding: 0; overflow: hidden; }
    .management-import-panel[hidden] { display: none; }
    .import-option { display: grid; align-content: space-between; gap: 14px; padding: 17px; }
    .import-option + .import-option { border-left: 1px solid var(--line); }
    .import-option h3 { display: inline; margin: 0; color: var(--navy); font-size: 16px; }
    .import-option p { margin: 5px 0 0 32px; font-size: 12px; }
    .import-step { width: 24px; height: 24px; display: inline-grid; place-items: center; margin-right: 7px; border-radius: 50%; background: var(--cloud-strong); color: var(--accent-dark); font-size: 12px; font-weight: 800; }
    .management-import-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 9px; }
    .management-import-form .errorlist { grid-column: 1 / -1; }
    .management-import-form button { min-height: 48px; }
    .management-import-panel > .import-errors { grid-column: 1 / -1; margin: 0 17px 17px; padding: 12px 14px; border: 1px solid #efbbb6; border-radius: 6px; background: #fff4f2; color: #8d2d26; }
    .management-import-panel > .import-errors ul { margin-bottom: 0; }
    .report-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; }
    .report-summary .card { border-top: 3px solid var(--accent); }
    .report-summary .card small { display: block; margin-top: 4px; color: var(--muted); }
    .report-breakdown { display: grid; grid-template-columns: minmax(240px, .8fr) minmax(420px, 1.6fr); gap: 18px; margin-bottom: 18px; }
    .report-panel { padding: 18px; }
    .report-panel h2 { color: var(--navy); font-size: 18px; }
    .report-panel > p { margin: 4px 0 16px; font-size: 12px; }
    .report-bars { display: grid; gap: 12px; }
    .report-bar-heading { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 5px; font-size: 13px; }
    .report-bar-heading small { color: var(--muted); }
    .report-bar-track { height: 8px; overflow: hidden; border-radius: 4px; background: var(--cloud); }
    .report-bar-fill { height: 100%; border-radius: inherit; background: var(--accent); }
    .report-table-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 22px 0 10px; }
    .report-table-heading h2 { color: var(--navy); font-size: 20px; }
    .report-table-heading p { margin: 4px 0 0; font-size: 13px; }
    .directory-search { width: min(100%, 620px); margin: 0 !important; }
    .search-field { position: relative; flex: 1; min-width: 240px; }
    .search-field svg { position: absolute; top: 50%; left: 13px; width: 18px; height: 18px; color: var(--muted); transform: translateY(-50%); pointer-events: none; }
    .search-field input { padding-left: 40px; }
    .member-code { color: #314752; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; font-weight: 650; }
    .member-name { font-weight: 750; }
    .member-directory-heading { margin-top: 24px; }
    .member-directory-table th:first-child { width: 210px; }
    .member-identity { display: inline-flex; align-items: center; gap: 10px; color: var(--accent-dark); text-decoration: none; }
    .member-identity:hover { text-decoration: none; }
    .member-list-avatar { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: var(--cloud); color: var(--accent-dark); font-size: 11px; font-weight: 800; }
    .member-list-avatar img { width: 100%; height: 100%; object-fit: cover; }
    .role-label { color: var(--muted); font-size: 13px; }
    .life-badge { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 750; }
    .life-badge.is-living { background: #e6f5ee; color: #176b48; }
    .life-badge.is-deceased { background: #eef0f2; color: #56636b; }
    .status-badge { display: inline-flex; align-items: center; min-height: 26px; padding: 4px 8px; border-radius: 999px; background: #edf1f3; color: #42535d; font-size: 12px; font-weight: 750; }
    .status-verified { background: #e6f5ee; color: #176b48; }
    .status-submitted, .status-pending_verification { background: #fff2dc; color: #875013; }
    .status-rejected { background: #fff0ef; color: #9f2f28; }
    .status-archived { background: #eef0f2; color: #56636b; }
    .row-actions { flex-wrap: nowrap; }
    .row-actions .button svg, .page-title .button svg { width: 16px; height: 16px; }
    .empty-state { padding: 36px !important; text-align: center; color: var(--muted); }
    .empty-state svg { width: 24px; height: 24px; margin-right: 8px; vertical-align: middle; }
    .verification-section { margin-bottom: 18px; padding: 0; overflow: hidden; }
    .verification-heading { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
    .verification-heading h2 { color: var(--navy); font-size: 19px; }
    .verification-heading p { margin: 4px 0 0; font-size: 13px; }
    .verification-section .table-scroll { border: 0; border-radius: 0; box-shadow: none; }
    .verification-table th:nth-child(2) { width: 170px; }
    .verification-table th:last-child { width: 220px; }
    .verification-table td { padding-block: 16px; }
    .verification-record { color: #263942; font-weight: 650; }
    .relationship-review { display: grid; grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr); align-items: center; gap: 14px; }
    .review-person { min-width: 0; display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
    .review-person:hover { color: var(--accent-dark); text-decoration: none; }
    .review-person > span:last-child { min-width: 0; display: grid; }
    .review-person strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
    .review-person small { overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
    .review-initial { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 50%; background: var(--cloud); color: var(--accent-dark); font-weight: 800; text-transform: uppercase; }
    .relationship-type { padding: 5px 9px; border: 1px solid #bfd9ec; border-radius: 999px; background: #f4f9fd; color: var(--accent-dark); font-size: 11px; font-weight: 800; text-transform: uppercase; }
    .verification-actions { flex-wrap: nowrap; }
    .verification-actions form { flex: 1; }
    .verification-actions button { width: 100%; }
    .import-errors { margin-bottom: 18px; border-color: #e4aaa5; background: #fff8f7; }
    .import-errors h2, .import-errors li { color: var(--danger); }
    .profile { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 18px; }
    .member-profile-card { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 24px; padding: 22px; }
    .member-profile-aside { display: flex; align-items: center; flex-direction: column; gap: 12px; }
    .member-profile-aside .photo svg { width: 54px; height: 54px; color: #94a8b5; }
    .status-pill { padding: 5px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; }
    .status-pill.is-living { background: #e5f5eb; color: #286b43; }
    .status-pill.is-deceased { background: #eef1f3; color: #566571; }
    .profile-section-heading span { color: var(--accent-dark); font-size: 11px; font-weight: 800; text-transform: uppercase; }
    .profile-section-heading h2 { margin-top: 3px; color: var(--navy); font-size: 20px; }
    .profile-biography { margin: 14px 0 0; color: var(--muted); line-height: 1.6; }
    .profile-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 18px 0 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
    .profile-detail-grid > div { min-width: 0; padding: 13px 15px; border-bottom: 1px solid var(--line); }
    .profile-detail-grid > div:nth-child(odd) { border-right: 1px solid var(--line); }
    .profile-detail-grid > div:nth-last-child(-n + 2) { border-bottom: 0; }
    .profile-detail-grid .detail-wide { grid-column: 1 / -1; border-right: 0; }
    .profile-detail-grid dt { margin-bottom: 4px; color: #52708a; font-size: 10px; font-weight: 800; text-transform: uppercase; }
    .profile-detail-grid dd { margin: 0; overflow-wrap: anywhere; color: var(--text); font-size: 14px; font-weight: 600; }
    .profile-detail-grid dd span { color: var(--muted); font-weight: 400; }
    .profile-family-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; margin-top: 18px; }
    .add-child-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .add-child-option { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 22px; }
    .add-child-option h2 { color: var(--navy); font-size: 19px; }
    .add-child-option p { margin: 0; }
    .add-child-option form { display: grid; gap: 10px; width: 100%; }
    .add-child-option form button { justify-self: start; }
    .family-panel { padding: 0; overflow: hidden; }
    .family-panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 15px 16px; border-bottom: 1px solid var(--line); }
    .family-panel-heading h2 { color: var(--navy); font-size: 18px; }
    .family-panel-heading span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
    .icon-button { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid #a9cbe5; border-radius: 6px; background: var(--cloud); color: var(--accent-dark); }
    .icon-button:hover { border-color: var(--accent); background: var(--accent); color: #fff; text-decoration: none; }
    .icon-button svg { width: 18px; height: 18px; }
    .family-record-list { display: grid; }
    .family-record { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; min-height: 62px; padding: 10px 15px; border-bottom: 1px solid var(--line); color: var(--text); }
    .family-record:hover { background: #f6faff; text-decoration: none; }
    .family-record > span:nth-child(2) { display: grid; min-width: 0; }
    .family-record strong { overflow: hidden; color: var(--navy); text-overflow: ellipsis; white-space: nowrap; }
    .family-record small { color: var(--muted); font-size: 10px; }
    .family-record > svg { width: 17px; color: var(--muted); }
    .family-record-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--cloud); color: var(--accent-dark); }
    .family-record-icon svg { width: 16px; }
    .relationship-badge { padding: 4px 7px; border-radius: 5px; background: var(--cloud); color: var(--accent-dark); font-size: 9px; font-weight: 800; text-transform: uppercase; }
    .family-empty { display: grid; place-items: center; gap: 7px; min-height: 122px; padding: 20px; color: var(--muted); text-align: center; }
    .family-empty svg { width: 25px; height: 25px; color: #9db4c4; }
    .family-empty p { margin: 0; }
    .tree-shell {
      min-height: 520px;
      position: relative;
      overflow: auto;
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 18px;
    }
    .tree-root-picker {
      display: grid;
      grid-template-columns: minmax(280px, 1fr) auto;
      gap: 12px;
      align-items: end;
      margin-bottom: 16px;
      padding: 16px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fff;
      box-shadow: var(--shadow-sm);
    }
    .tree-root-picker label { margin-bottom: 6px; }
    .tree-root-picker button { min-height: 46px; }
    .outline-tree-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
    .outline-tree-heading > div { display: grid; gap: 2px; }
    .outline-tree-heading > div span { color: var(--accent-dark); font-size: 11px; font-weight: 800; text-transform: uppercase; }
    .outline-tree-heading strong { color: var(--navy); font-size: 18px; }
    .outline-help { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
    .outline-help svg { width: 16px; height: 16px; }
    .outline-tree { width: min(100%, 840px); margin: 20px auto 0; }
    .tree-loading { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 100px; color: var(--muted); font-size: 13px; }
    .tree-loading .loader-mark { transform: scale(.7); }
    .outline-tree ul { margin: 0; padding: 0; list-style: none; }
    .outline-children { position: relative; margin-left: 22px !important; padding-left: 24px !important; }
    .outline-children::before { content: ""; position: absolute; top: 0; bottom: 24px; left: 0; border-left: 1px solid #b9cddd; }
    .outline-children > .outline-item { position: relative; }
    .outline-item + .outline-item { margin-top: 8px; }
    .outline-children > .outline-item::before { content: ""; position: absolute; top: 28px; left: -24px; width: 22px; border-top: 1px solid #b9cddd; }
    .outline-row { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 5px; min-height: 58px; }
    .outline-toggle { display: grid; place-items: center; width: 28px; min-height: 28px; padding: 0; border: 0; border-radius: 4px; background: transparent; box-shadow: none; color: var(--accent); font-size: 25px; font-weight: 400; line-height: 1; }
    .outline-toggle:hover { background: var(--cloud); }
    .outline-toggle.is-loading { color: transparent; position: relative; }
    .outline-toggle.is-loading::after {
      content: "";
      position: absolute;
      width: 15px;
      height: 15px;
      border: 2px solid #bdd9ee;
      border-top-color: var(--accent-dark);
      border-radius: 50%;
      animation: loader-spin .7s linear infinite;
    }
    @keyframes loader-spin { to { transform: rotate(360deg); } }
    @media (prefers-reduced-motion: reduce) { .outline-toggle.is-loading::after { animation: none; } }
    .outline-toggle.is-leaf { color: #9babb6; cursor: default; }
    .outline-person { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 7px 10px; border-radius: 6px; color: var(--navy); }
    .outline-person:hover { background: #f3f8fc; }
    .outline-family-unit { display: flex; align-items: stretch; min-width: 0; border-radius: 7px; }
    .outline-family-unit.has-different-union { border-left: 4px solid #e58a1f; background: #fff7e8; }
    .outline-family-unit.has-missing-parent { border-left: 4px solid #efb45d; background: #fffbf3; }
    .outline-row.is-root .outline-family-unit { background: var(--cloud); font-size: 16px; }
    .outline-spouse-divider { width: 3px; margin: 8px 12px; background: var(--accent); }
    .outline-spouse { display: grid; align-content: center; gap: 2px; min-width: 150px; padding: 7px 12px 7px 0; color: var(--navy); }
    .outline-spouse small { color: var(--accent-dark); font-size: 10px; font-weight: 800; text-transform: uppercase; }
    .outline-spouse strong { font-size: 14px; }
    .outline-spouse:hover strong { color: var(--accent-dark); text-decoration: underline; }
    .outline-avatar { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; overflow: hidden; border-radius: 50%; background: #d7e8f6; color: var(--accent-dark); font-size: 12px; font-weight: 800; }
    .outline-avatar img { width: 100%; height: 100%; object-fit: cover; }
    .outline-copy { display: grid; min-width: 0; }
    .outline-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .outline-copy small { color: var(--muted); font-size: 11px; }
    .outline-parentage { display: flex; align-items: center; gap: 7px; margin-top: 3px; font-size: 11px; }
    .outline-parentage > span { color: var(--muted); }
    .outline-parentage em { padding: 2px 6px; border: 1px solid #efc47f; border-radius: 999px; background: #fff7e8; color: #85520b; font-size: 9px; font-style: normal; font-weight: 800; text-transform: uppercase; }
    .outline-parentage.is-different-union > span { color: #85520b; }
    .outline-parentage.is-missing-parent em { border-color: #f2d39f; background: #fffbf3; color: #85520b; }
    .relationship-label {
      padding: 4px 8px;
      border-radius: 6px;
      background: var(--cloud);
      color: var(--accent-dark);
      font-size: 12px;
      font-weight: 700;
      text-transform: capitalize;
    }
    .tree-summary { margin: 18px 0; }
    .summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
    .summary-item { display: grid; gap: 3px; padding: 16px; border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 8px; background: #fff; box-shadow: var(--shadow-sm); }
    .summary-item strong { color: var(--navy); font-size: 25px; }
    .summary-item span { color: var(--muted); font-size: 13px; }
    .section-block { margin-top: 22px; }
    .section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 12px; }
    .section-heading h2 { color: var(--navy); font-size: 20px; }
    .section-heading p { margin: 5px 0 0; }
    .photo {
      width: 180px;
      aspect-ratio: 1;
      border-radius: 8px;
      background: #dfe8ea;
      display: grid;
      place-items: center;
      color: var(--muted);
      overflow: hidden;
      justify-self: center;
      margin-inline: auto;
    }
    .photo img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
    .profile-summary {
      display: flex;
      align-items: center;
      gap: 18px;
      margin-bottom: 18px;
    }
    .profile-page-avatar {
      width: 112px;
      height: 112px;
      flex: 0 0 112px;
      display: grid;
      place-items: center;
      overflow: hidden;
      border: 4px solid #d2e6f6;
      border-radius: 50%;
      background: var(--cloud);
      color: var(--accent-dark);
      font-size: 36px;
      font-weight: 700;
      text-transform: uppercase;
    }
    .profile-page-avatar img, .user-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
    input[type="file"]::file-selector-button { margin-right: 12px; padding: 8px 11px; border: 0; border-radius: 6px; background: var(--cloud); color: var(--accent-dark); font: inherit; font-weight: 700; cursor: pointer; }
    ::selection { background: var(--cloud-strong); color: var(--navy); }
    @media (max-width: 760px) {
      header { padding: 10px 14px; }
      .page-title { align-items: start; flex-direction: column; }
      .app-shell { grid-template-columns: 1fr; }
      .mobile-nav-toggle { display: inline-grid; place-items: center; }
      .brand-copy small { display: none; }
      .page-title h1 { font-size: 27px; }
      .sidebar { display: none; position: fixed; inset: 64px 0 0 0; height: auto; z-index: 35; padding: 18px; }
      .sidebar.is-open { display: block; }
      main { width: min(100% - 24px, 720px); margin: 20px auto 40px; }
      .columns, .profile, .member-profile-card, .profile-family-grid, .add-child-options { grid-template-columns: 1fr; }
      .profile-detail-grid { grid-template-columns: 1fr; }
      .profile-detail-grid > div, .profile-detail-grid > div:nth-child(odd), .profile-detail-grid > div:nth-last-child(-n + 2) { border-right: 0; border-bottom: 1px solid var(--line); }
      .profile-detail-grid > div:last-child { border-bottom: 0; }
      .form-grid { grid-template-columns: 1fr; }
      .phone-input-group { grid-template-columns: 1fr; }
      .phone-input-group > .select2-container,
      .phone-input-group > input[type="tel"] { grid-column: 1; }
      .form-section { padding: 14px; }
      form.search { flex-direction: column; }
      .member-filters { grid-template-columns: 1fr; }
      .report-summary, .report-breakdown { grid-template-columns: 1fr; }
      .directory-heading { align-items: stretch; flex-direction: column; }
      .management-import-panel, .management-import-form { grid-template-columns: 1fr; }
      .import-option + .import-option { border-top: 1px solid var(--line); border-left: 0; }
      .directory-search { width: 100%; }
      .row-actions { flex-wrap: wrap; }
      .relationship-review { grid-template-columns: 1fr; gap: 8px; }
      .relationship-type { justify-self: start; margin-left: 44px; }
      .verification-actions { flex-wrap: wrap; }
      .pagination { align-items: flex-start; flex-direction: column; }
      .photo { width: 140px; }
      .profile-summary { align-items: flex-start; }
      .profile-page-avatar { width: 88px; height: 88px; flex-basis: 88px; font-size: 28px; }
      .tree-root-picker { grid-template-columns: 1fr; }
      .table-scroll { white-space: nowrap; }
      .member-filters > div:first-child { grid-column: auto; }
      .outline-tree-heading { align-items: flex-start; flex-direction: column; }
      .outline-children { margin-left: 10px !important; padding-left: 18px !important; }
      .outline-children > .outline-item::before { left: -18px; width: 16px; }
      .outline-family-unit { align-items: flex-start; flex-direction: column; }
      .outline-spouse-divider { width: calc(100% - 20px); height: 1px; margin: 0 10px; }
      .outline-spouse { padding: 7px 10px 9px 58px; }
      .relationship-label { justify-self: start; }
      .user-identity > span:not(.user-avatar):not(.account-chevron) { display: none; }
    }
