@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("fonts/open-sans-variable.ttf") format("truetype");
}

:root {
  --font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
  --ink: #20342f;
  --muted: #5f7066;
  --green: #477e5b;
  --green-dark: #315f45;
  --green-pale: #eff5ef;
  --blue: #176197;
  --line: #e8ece8;
  --canvas: #f6f8f5;
  --white: #fff;
  --red: #a33e36;
  --shadow: 0 12px 34px rgba(35, 61, 48, 0.055);
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 1.125rem/1.6 var(--font-family);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3,
strong {
  font-family: var(--font-family);
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 5;
  display: flex;
  width: 280px;
  flex-direction: column;
  padding: 25px 17px 15px;
  overflow-y: auto;
  background: #fff;
  border-right: 1px solid var(--line);
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 0 9px 17px;
  color: var(--muted);
  font: 700 0.875rem/1.5 var(--font-family);
  letter-spacing: 1px;
  text-align: center;
}
.brand-logo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
.brand em {
  color: var(--green);
  font-style: normal;
}
.brand small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font: 700 0.875rem/1.5 var(--font-family);
  letter-spacing: 1px;
}
.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 15px;
  background: var(--green-pale);
  color: var(--blue);
  font: 800 1.5rem var(--font-family);
}
.brand-mark span {
  color: var(--green);
}
.brand-mark.small {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 12px;
  font-size: 1.25rem;
}
.workspace {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 7px 15px;
  padding: 10px 11px;
  border-radius: 9px;
  background: #f7f9f6;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}
.workspace-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #7da887;
  box-shadow: 0 0 0 3px #e7f0e7;
}
.workspace-name {
  min-width: 0;
  overflow-wrap: anywhere;
}
.workspace-picker {
  display: grid;
  gap: 7px;
  margin: 0 7px 15px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.workspace-picker label {
  color: var(--muted);
  font-size: 0.875rem;
}
.workspace-picker select {
  min-height: 44px;
  padding: 6px 7px;
  font-size: 1rem;
}
.workspace-picker .button {
  min-height: 44px;
}
.nav-links {
  display: grid;
  gap: 5px;
}
.nav-links a {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 6px 13px;
  border-radius: 9px;
  color: #53645a;
  font-size: 1rem;
  font-weight: 600;
  transition:
    background 0.16s,
    color 0.16s;
}
.nav-links a::before {
  width: 18px;
  margin-right: 10px;
  color: #91a098;
  content: "◦";
  font-size: 21px;
  line-height: 1;
}
.nav-links a:hover,
.nav-links a.active {
  background: var(--green-pale);
  color: var(--green-dark);
}
.nav-links a.active::before {
  color: var(--green);
  content: "•";
}
.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 14px 5px 2px;
  border-top: 1px solid var(--line);
}
.avatar,
.patient-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 12px;
  background: #eaf1e8;
  color: var(--green-dark);
  font: 700 1.125rem var(--font-family);
}
.profile {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 1px;
}
.profile strong {
  overflow: hidden;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile span {
  color: var(--muted);
  font-size: 0.875rem;
}
.sidebar-footer form {
  margin: 0;
}
.logout {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.5rem;
}
.logout:hover {
  background: #f1f4f1;
}
.main-content {
  width: calc(100% - 280px);
  min-height: 100vh;
  margin-left: 280px;
  padding: 34px clamp(23px, 4vw, 58px) 22px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mobile-logout {
  display: none;
  margin: 0;
}
.topbar h1 {
  margin: 1px 0 0;
  font-size: 2rem;
  letter-spacing: -0.5px;
}
.topbar-date {
  color: var(--muted);
  font-size: 1rem;
}
.eyebrow {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 1px;
}
.panel {
  margin-bottom: 20px;
  padding: 23px 25px;
  border: 1px solid #edf0ed;
  border-radius: 15px;
  background: #fff;
  box-shadow: var(--shadow);
}
.panel-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 19px;
  padding-bottom: 17px;
  border-bottom: 2px solid #dce7de;
}
.panel-heading > div:first-child {
  flex: 1 1 auto;
}
.panel-heading h2 {
  margin: 0;
  font-size: 1.375rem;
  letter-spacing: -0.3px;
}
.count {
  display: inline-grid;
  min-width: 28px;
  min-height: 28px;
  margin-left: 5px;
  padding: 0 7px;
  place-items: center;
  border-radius: 99px;
  background: #f0f4ef;
  color: var(--green-dark);
  font: 600 0.875rem var(--font-family);
  vertical-align: 2px;
}
.welcome-card {
  position: relative;
  display: flex;
  min-height: 205px;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  margin-bottom: 19px;
  padding: 28px 35px;
  border-radius: 17px;
  background: linear-gradient(112deg, #285d48, #478063 63%, #669475);
  color: white;
}
.welcome-card > div:first-child {
  position: relative;
  z-index: 1;
  max-width: 510px;
}
.welcome-card .eyebrow {
  color: #d1e2d4;
}
.welcome-card h2 {
  max-width: 450px;
  margin: 3px 0 8px;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  letter-spacing: -0.5px;
  line-height: 1.25;
}
.welcome-card p:not(.eyebrow) {
  max-width: 470px;
  margin-bottom: 16px;
  color: #e0ebe1;
  font-size: 1.125rem;
}
.welcome-illustration {
  position: absolute;
  right: 44px;
  color: rgba(255, 255, 255, 0.13);
  font:
    220px/1 Arial,
    sans-serif;
  transform: rotate(-10deg);
}
.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 16px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  transition:
    transform 0.12s,
    background 0.12s;
}
.button:hover {
  transform: translateY(-1px);
}
.button.primary {
  background: var(--green);
  color: white;
}
.button.primary:hover {
  background: var(--green-dark);
}
.button.white {
  background: white;
  color: var(--green-dark);
}
.button.full {
  width: 100%;
}
.small-button {
  min-height: 30px;
  padding: 8px 12px;
  background: var(--green-pale);
  color: var(--green-dark);
  font-size: 1rem;
}
.small-button.action-icon {
  width: 30px;
  min-width: 30px !important;
  max-width: 30px !important;
  min-height: 30px !important;
  height: 30px !important;
}
.danger-button {
  background: #fff1ef;
  color: #9b433b;
}
.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}
.row-actions form {
  margin: 0;
}
.row-actions .button {
  min-height: 44px;
}
.disabled-action-hint {
  display: inline-flex;
  border-radius: 9px;
  cursor: not-allowed;
}
.disabled-action-hint > button {
  pointer-events: none;
}
.disabled-action-hint:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}
.record-choice {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.record-choice > span {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
}
.record-choice > strong {
  align-self: start;
  padding: 9px 10px;
  border: 1px solid #dce6dd;
  border-radius: 9px;
  background: var(--green-pale);
  overflow-wrap: anywhere;
}
.worker-visit-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 10px;
  white-space: nowrap;
}
.worker-visit-actions .button {
  white-space: normal;
}
.button.action-icon {
  display: inline-flex;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  height: 44px;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.action-icon svg {
  width: 20px;
  height: 20px;
  flex: none;
}
.action-tooltip {
  position: fixed;
  z-index: 20;
  width: max-content;
  max-width: min(280px, calc(100vw - 16px));
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--green-dark);
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 0.875rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.visit-item > div:last-child {
  min-width: 0;
}
.team-table-section {
  margin-top: 20px;
}
.form-dialog {
  width: min(860px, calc(100% - 28px));
  max-width: 860px;
  max-height: min(88vh, 820px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  color: var(--ink);
  box-shadow: 0 24px 90px rgba(22, 43, 31, 0.22);
}
.form-dialog::backdrop {
  background: rgba(24, 39, 31, 0.48);
  backdrop-filter: blur(2px);
}
.dialog-content {
  padding: 28px;
}
.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: -28px -28px 28px;
  padding: 24px 28px;
  border-bottom: 1px solid #dce6dd;
  background: var(--green-pale);
}
.dialog-heading > :first-child {
  min-width: 0;
}
.dialog-heading .eyebrow {
  margin-bottom: 6px;
  color: var(--green-dark);
}
.dialog-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.75rem;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: -0.5px;
  overflow-wrap: anywhere;
}
.dialog-content .form-grid {
  gap: 24px 22px;
}
.dialog-content label {
  gap: 8px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
}
.dialog-content label strong {
  display: block;
  color: #304139;
  font-size: 1rem;
}
.dialog-content
  > :is(label, .form-grid, .profile-photo-fields)
  + :is(label, .form-grid, .profile-photo-fields) {
  margin-top: 24px;
}
.dialog-content input,
.dialog-content select,
.dialog-content textarea {
  border-color: #c8d4cb;
  background: #fcfdfb;
}
.dialog-content input:focus,
.dialog-content select:focus,
.dialog-content textarea:focus {
  border-color: var(--green);
  background: #fff;
}
.dialog-content h3 {
  margin-top: 1em;
}
.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: #f1f5f1;
  color: #56655c;
  cursor: pointer;
  font-size: 1.75rem;
  line-height: 1;
}
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.dialog-actions [data-clear-form] {
  margin-right: auto;
  background: #f1f5f1;
  color: #56655c;
}
.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  filter: grayscale(1);
  transform: none;
}
.is-scheduled [data-schedule-lockable] {
  display: none !important;
}
input.is-locked {
  border-style: dashed;
  background: #f1f5f1;
  color: var(--muted);
  cursor: not-allowed;
}
.flatpickr-calendar {
  font-family: var(--font-family);
}
.flatpickr-wrapper {
  display: block;
  width: 100%;
}
/* Time-only pickers match their field so the right-hand one stays inside the modal. */
.flatpickr-calendar.noCalendar.static {
  width: 100%;
  min-width: 0;
}
.flatpickr-calendar.noCalendar.static::before,
.flatpickr-calendar.noCalendar.static::after {
  display: none;
}
/* Flatpickr styles its own month, year and time controls; keep the global field sizing off them. */
.flatpickr-calendar input,
.flatpickr-calendar select {
  min-height: 0;
}
.flatpickr-calendar input:focus,
.flatpickr-calendar select:focus {
  box-shadow: none;
}
.weekday-picker,
.scope-choice {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.weekday-picker[hidden],
.scope-choice[hidden] {
  display: none;
}
.weekday-picker legend,
.scope-choice legend {
  margin-bottom: 8px;
  padding: 0;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
}
.weekday-picker legend small,
.scope-choice legend small {
  display: block;
}
.weekday-picker {
  grid-template-columns: auto minmax(160px, 1fr);
  gap: 8px 16px;
}
/* A floated legend becomes an ordinary grid item, so it can share a row with Repeat until. */
.weekday-picker > legend {
  float: left;
  margin: 0;
}
.weekday-picker > .weekday-options {
  grid-column: 1;
}
.weekday-picker > [data-series-end] {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: grid;
  grid-template-rows: subgrid;
  min-width: 0;
}
.weekday-picker > [data-series-end][hidden] {
  display: none;
}
.weekday-picker > small {
  grid-column: 1 / -1;
  margin: 0;
}
.weekday-picker > small:empty {
  display: none;
}
.time-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}
.weekday-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dialog-content .weekday-options label {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}
.weekday-options input {
  position: absolute;
  width: 1px;
  min-height: 0;
  height: 1px;
  opacity: 0;
}
.weekday-options span {
  display: inline-grid;
  min-width: 46px;
  min-height: 46px;
  padding: 0 10px;
  place-items: center;
  border: 1px solid #c8d4cb;
  border-radius: 999px;
  background: #fcfdfb;
  color: #304139;
  font-weight: 700;
}
.weekday-options input:checked + span {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}
.weekday-options input:focus-visible + span {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}
.dialog-content .scope-choice label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #304139;
  font-size: 1rem;
}
.scope-choice input {
  width: auto;
  min-height: 0;
}
.repeat-badge svg {
  width: 16px;
  height: 16px;
}
.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-monthSelect-month.selected {
  border-color: var(--green);
  background: var(--green);
}
.list-tools {
  display: flex;
  flex-wrap: nowrap;
  max-width: 100%;
  min-width: 0;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.list-tools > .button,
.list-tools > .text-link {
  flex: 0 0 auto;
  white-space: nowrap;
}
.list-search {
  display: flex;
  flex-wrap: nowrap;
  width: auto;
  max-width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.list-search label {
  min-width: 0;
  flex: 1;
}
.list-search input {
  min-width: 0;
  min-height: 44px;
  padding: 7px 10px;
  font-size: 1rem;
}
.list-search button {
  min-height: 44px;
  flex: 0 0 auto;
}
.list-search .list-filter {
  flex: 0 1 160px;
  width: 160px;
  font-size: 0.875rem;
}
.list-search .search-query {
  flex: 1 1 180px;
  width: 180px;
}
.list-filter select {
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  padding: 7px;
  font-size: 1rem;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}
.metric-card {
  display: grid;
  min-height: 110px;
  align-content: center;
  gap: 3px;
  padding: 17px 20px;
  border: 1px solid #edf0ed;
  border-radius: 13px;
  background: #fff;
  box-shadow: var(--shadow);
}
.metric-card span {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
}
.metric-card strong {
  color: var(--ink);
  font-size: 2rem;
  letter-spacing: -0.5px;
}
.metric-card small {
  color: var(--muted);
  font-size: 0.875rem;
}
.text-link {
  color: var(--green-dark);
  font-size: 1rem;
  font-weight: 700;
}
.text-link:hover {
  text-decoration: underline;
}
.table-wrap {
  width: 100%;
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th {
  padding: 12px 13px;
  border-bottom: 2px solid #c3d7c8;
  background: #e9f1eb;
  color: var(--green-dark);
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  white-space: nowrap;
}
td {
  padding: 15px 13px;
  border-bottom: 1px solid #eff2ef;
  color: #53615a;
  font-size: 1rem;
  vertical-align: middle;
}
tbody tr:last-child td {
  border-bottom: 0;
}
th:empty,
th.actions-cell,
td:has(> .row-actions),
td:has(> .inline-form) {
  width: 1px;
  text-align: right;
  white-space: nowrap;
}
th.actions-cell {
  position: relative;
}
.form-dialog {
  text-align: left;
  white-space: normal;
}
td:has(> .inline-form) .inline-form {
  justify-content: flex-end;
  flex-wrap: nowrap;
}
.visit-instructions td {
  padding-top: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
tr:has(+ .visit-instructions) td {
  border-bottom: 0;
}
td strong {
  display: block;
  color: #304139;
  font-size: 1rem;
}
td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.875rem;
}
.empty-state {
  margin: 0;
  padding: 24px 10px;
  color: var(--muted);
  font-size: 1rem;
  text-align: center;
}
.empty-state.compact {
  padding: 13px 2px;
  text-align: left;
}
.muted {
  color: var(--muted);
  font-size: 1rem;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 18px;
}
label {
  display: grid;
  align-content: start;
  gap: 6px;
  color: #4f6057;
  font-size: 1rem;
  font-weight: 600;
}
input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 9px 11px;
  border: 1px solid #dfe6e0;
  border-radius: 7px;
  outline: none;
  background: #fff;
  color: #2c3d34;
  font-size: 1.125rem;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #7da88a;
  box-shadow: 0 0 0 3px rgba(71, 126, 91, 0.11);
}
select[multiple] {
  height: auto;
  min-height: 96px;
  padding: 6px;
}
.settings-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
}
.settings-checkbox input {
  width: 20px;
  min-height: 20px;
  flex: 0 0 20px;
}
textarea {
  min-height: 90px;
  resize: vertical;
}
label small,
.form-hint {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 400;
}
label small {
  display: contents;
}
.full-width {
  grid-column: 1 / -1;
}
.form-actions {
  grid-column: 1 / -1;
}
.form-hint {
  margin-top: -5px;
}
.alert {
  margin: 0 0 17px;
  padding: 11px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 1rem;
}
.alert.success {
  border-color: #d8e9d9;
  background: #eff7ef;
  color: #366144;
}
.alert.info {
  border-color: #dce8ef;
  background: #f1f7fa;
  color: #3b657b;
}
.alert.error {
  border-color: #f0d8d5;
  background: #fff4f2;
  color: var(--red);
}
.note-list {
  display: grid;
  gap: 12px;
}
.note-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.note-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fdfefd;
  overflow-wrap: anywhere;
}
.note-card > .note-meta {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  row-gap: 6px;
}
.note-content {
  padding: 4px 0 14px;
}
.note-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.note-author {
  color: var(--muted);
  font-size: 0.875rem;
}
.note-footer > .row-actions {
  margin-left: auto;
}
.note-card h3,
.family-note h3 {
  margin: 8px 0 4px;
  font-size: 1.25rem;
}
.note-card p,
.family-note p {
  margin-bottom: 9px;
  color: #53645a;
  font-size: 1.125rem;
  overflow-wrap: anywhere;
}
.note-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.875rem;
}
.note-meta strong {
  color: var(--green-dark);
  font-size: 1rem;
}
.attachment {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue);
  font-size: 1rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.family-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
.family-patient-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 24px;
}
.family-patient-columns.single-column {
  grid-template-columns: minmax(0, 1fr);
}
.family-patient-columns > section {
  min-width: 0;
  overflow-wrap: anywhere;
}
.family-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.patient-summary {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fdfefd;
  overflow-wrap: anywhere;
}
.patient-summary:only-child {
  grid-column: 1 / -1;
}
.patient-summary .patient-heading > div:last-child {
  min-width: 0;
}
.patient-summary > .button {
  align-self: flex-start;
  margin-top: auto;
  white-space: normal;
}
.patient-summary-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 22px;
}
.patient-summary-metrics > div {
  min-width: 0;
  padding: 12px;
  border-radius: 8px;
  background: var(--green-pale);
}
.patient-summary-metrics dt {
  color: var(--green-dark);
  font-size: 0.875rem;
}
.patient-summary-metrics dd {
  margin: 4px 0 0;
  color: var(--green-dark);
  font-size: 1.75rem;
  font-weight: 700;
}
.patient-panel {
  margin-bottom: 0;
}
.patient-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.patient-heading h2 {
  margin: 0;
  font-size: 1.375rem;
}
.patient-icon {
  width: 43px;
  height: 43px;
  flex-basis: 43px;
  border-radius: 14px;
  font-size: 1.25rem;
}
.section-label {
  margin: 20px 0 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.family-note {
  padding: 12px 0;
  border-bottom: 1px solid #eff2ef;
}
.family-note:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.family-note .note-meta {
  justify-content: flex-start;
}
.billing-list {
  display: grid;
  gap: 12px;
}
.family-bill {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #e3e9e3;
  border-radius: 10px;
}
.family-bill-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.family-bill-head > div {
  display: grid;
  gap: 2px;
}
.family-bill-head strong {
  color: #304139;
  font-size: 1.0625rem;
}
.family-bill-head small {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.family-bill-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--green-pale);
}
.family-bill-summary dt {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 700;
}
.family-bill-summary dd {
  margin: 0;
  color: #304139;
  font-size: 1rem;
  font-weight: 700;
}
.family-bill-total dd {
  color: var(--green-dark);
  font-size: 1.125rem;
}
.family-bill > .button {
  justify-self: start;
}
.statement-lines-details > summary {
  margin-top: 6px;
  color: var(--blue);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
}
.statement-lines-details[open] > summary {
  margin-bottom: 8px;
}
.line-table th,
.line-table td {
  padding: 6px 8px;
  font-size: 0.875rem;
}
.line-table th {
  border-bottom-width: 1px;
}
.line-table .numeric {
  text-align: right;
  white-space: nowrap;
}
.line-table .nowrap {
  white-space: nowrap;
}
.statement-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.875rem;
}
.collapsible-panel > summary {
  display: flex;
  cursor: pointer;
  list-style: none;
}
.collapsible-panel > summary::-webkit-details-marker {
  display: none;
}
.collapsible-panel > summary::after {
  content: "Show";
  align-self: center;
  margin-left: auto;
  color: var(--blue);
  font-size: 0.875rem;
  font-weight: 700;
}
.collapsible-panel[open] > summary::after {
  content: "Hide";
}
.collapsible-panel:not([open]) > summary {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}
.statement-issuer {
  display: flex;
  align-items: center;
  gap: 16px;
}
.statement-logo {
  max-width: 140px;
  max-height: 72px;
  object-fit: contain;
}
.status {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 20px;
  background: #eff3ef;
  color: #53645a;
  font-size: 0.875rem;
  font-weight: 700;
}
.status.active {
  background: #edf6ed;
  color: #47774f;
}
.status.inactive {
  background: #f3f1ee;
  color: #81796d;
}
.status.sent {
  background: #edf5fa;
  color: #386b8a;
}
.status.paid {
  background: #edf6ed;
  color: #47774f;
}
.status.approved {
  background: #edf6ed;
  color: #47774f;
}
.status.pending {
  background: #fff5df;
  color: #83601c;
}
.status.rejected {
  background: #fbecec;
  color: #a13d3d;
}
.entry-origin {
  display: inline-flex;
  vertical-align: middle;
  align-items: center;
  color: #47774f;
}
.entry-origin:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 3px;
}
.inline-form {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 155px;
}
.inline-form select {
  min-width: 130px;
  min-height: 44px;
  padding: 6px;
  font-size: 1rem;
}
.visit-list {
  display: grid;
}
.visit-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #eff2ef;
}
.visit-item:last-child {
  border-bottom: 0;
}
.date-chip {
  display: grid;
  width: 56px;
  min-height: 62px;
  flex: 0 0 56px;
  place-content: center;
  border-radius: 10px;
  background: var(--green-pale);
  color: var(--green-dark);
  text-align: center;
}
.date-chip strong {
  font-size: 1.375rem;
  line-height: 1.2;
}
.date-chip span {
  margin-top: 2px;
  font-size: 0.875rem;
  text-transform: uppercase;
}
.visit-item h3 {
  margin: 0 0 2px;
  font-size: 1.125rem;
}
.visit-item p,
.visit-item small {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}
.report-cell {
  min-width: 230px;
  max-width: 350px;
}
.app-footer {
  padding: 20px 0 4px;
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
}
.app-footer span {
  margin: 0 5px;
}

.auth-body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 25px;
  background:
    radial-gradient(ellipse at 15% 10%, #e9f1e8, transparent 38%), #f6f8f5;
}
.auth-card {
  width: min(100%, 480px);
  padding: 35px 37px 29px;
  border: 1px solid #edf0ed;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 20px 70px rgba(35, 61, 48, 0.09);
}
.auth-card .brand-mark {
  margin-bottom: 24px;
}
.auth-logo {
  display: block;
  width: 190px;
  height: 190px;
  margin: 0 auto 20px;
  border-radius: 12px;
  object-fit: contain;
}
.auth-card h1 {
  font-size: 2rem;
  letter-spacing: -0.5px;
  line-height: 1.25;
  text-align: center;
}
.auth-card > .muted {
  margin-bottom: 22px;
  text-align: center;
}
.auth-card .eyebrow {
  text-align: center;
}
.stack {
  display: grid;
  gap: 15px;
}
.fine-print {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
}
.pagination,
.pagination-links,
.calendar-controls,
.calendar-toolbar,
.month-picker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.pagination {
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  font-size: 1rem;
}
.pagination [aria-disabled="true"] {
  opacity: 0.5;
  cursor: default;
}
.calendar-controls {
  margin-bottom: 12px;
}
.calendar-view-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.calendar-view-toolbar > .calendar-controls {
  margin: 0;
}
.calendar-preferences {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.calendar-preferences > .calendar-controls {
  margin: 0;
}
.calendar-preferences [hidden],
form[data-timesheet-assignments] [hidden] {
  display: none;
}
form[data-timesheet-groups] [hidden],
form:has([data-group-target]) [hidden],
form[data-worker-assignments] [hidden] {
  display: none;
}
.group-card {
  padding: 18px;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.calendar-empty-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 0.875rem;
  cursor: pointer;
}
.calendar-empty-toggle input {
  width: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--green);
}
.calendar-empty-toggle[hidden],
.calendar-grid[hidden] {
  display: none;
}
.calendar-filters {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}
.calendar-filters > summary {
  display: none;
}
.calendar-toolbar {
  justify-content: space-between;
  margin: 16px 0;
}
.calendar-toolbar h3,
.calendar-toolbar .calendar-controls {
  margin: 0;
}
.calendar-month-jump {
  position: relative;
  min-width: 0;
}
.calendar-month-jump > summary {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
}
.calendar-month-jump > summary::after {
  content: "\25be";
  color: var(--muted);
}
.calendar-month-jump > summary::-webkit-details-marker {
  display: none;
}
.calendar-month-jump .month-picker {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 5;
  width: max-content;
  max-width: calc(100vw - 60px);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  box-shadow: var(--shadow);
}
.calendar-nav-icon,
.calendar-nav-short {
  display: none;
}
.month-picker {
  flex-wrap: nowrap;
}
.month-picker label {
  min-width: 0;
  font-size: 0.875rem;
}
.month-picker input {
  min-height: 44px;
  padding: 7px 10px;
  font-size: 1rem;
}
.month-picker button {
  flex: 0 0 auto;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.calendar-grid.hide-empty-days {
  grid-template-columns: 1fr;
}
.calendar-grid.hide-empty-days .calendar-weekday,
.calendar-grid.hide-empty-days .outside-month,
.calendar-grid.hide-empty-days [data-empty-day] {
  display: none;
}
.calendar-grid.hide-empty-days .calendar-mobile-weekday {
  display: inline;
}
.calendar-weekday {
  padding: 8px;
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
  border-right: 1px solid var(--line);
}
.calendar-day {
  min-height: 130px;
  min-width: 0;
  padding: 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.calendar-day.outside-month {
  background: #f7f9f6;
  color: var(--muted);
}
.calendar-day.today {
  background: var(--green-pale);
}
.calendar-day-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
  font-weight: 700;
}
.calendar-add {
  padding: 4px 7px;
  font-size: 0.875rem;
}
.calendar-mobile-weekday {
  display: none;
}
.calendar-entry {
  margin: 7px 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  overflow-wrap: anywhere;
  font-size: 0.875rem;
}
.calendar-entry summary {
  cursor: pointer;
}
.calendar-entry summary strong,
.calendar-entry summary time {
  display: block;
}
.calendar-entry p {
  margin: 8px 0;
  white-space: pre-wrap;
}
.calendar-entry .row-actions {
  flex-wrap: wrap;
}
.calendar-entry .row-actions .button {
  max-width: 100%;
  padding: 6px;
  font-size: 0.875rem;
  white-space: normal;
}
.calendar-entry .row-actions form {
  max-width: 100%;
}
.calendar-entry.inactive {
  opacity: 0.7;
}
.record-dialog {
  width: min(850px, calc(100% - 28px));
  max-width: 850px;
}
.record-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  margin: 20px 0;
}
.record-facts dt {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 700;
}
.record-facts dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-size: 1rem;
}
.record-facts small {
  display: block;
  color: var(--muted);
  font-size: 0.875rem;
}
.record-notes {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.record-links,
.record-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.record-tabs {
  padding-bottom: 15px;
  border-bottom: 2px solid var(--line);
}
.detail-page {
  max-width: 1000px;
  margin: 25px auto;
  background: white;
}
.detail-page [data-dialog-close] {
  display: none;
}
.statement-sheet {
  max-width: 1000px;
  margin: 25px auto;
  padding: 32px;
  background: var(--white);
}
.statement-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}
.statement-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--line);
}
.statement-header h1 {
  margin: 0 0 6px;
}
.statement-header p,
.statement-recipient p {
  margin: 0;
}
.statement-meta {
  display: grid;
  grid-template-columns: auto auto;
  gap: 4px 16px;
  margin: 0;
}
.statement-meta dt {
  color: var(--muted);
  font-weight: 700;
}
.statement-meta dd {
  margin: 0;
}
.statement-recipient {
  margin: 20px 0;
}
.statement-lines {
  width: 100%;
}
.statement-lines .amount {
  text-align: right;
}
.statement-lines tfoot th {
  text-align: right;
}
@media print {
  .statement-page {
    background: var(--white);
  }
  .statement-page .statement-toolbar,
  .statement-page .impersonation-banner {
    display: none;
  }
  .statement-sheet {
    max-width: none;
    margin: 0;
    padding: 0;
  }
}
.login-history-link {
  display: inline-block;
  max-width: 210px;
}

@media (max-width: 950px) {
  .sidebar {
    width: 250px;
  }
  .main-content {
    width: calc(100% - 250px);
    margin-left: 250px;
    padding-right: 24px;
    padding-left: 24px;
  }
  .panel {
    padding: 20px;
  }
}
@media (max-width: 1100px) {
  .family-patient-columns {
    grid-template-columns: minmax(0, 1fr);
  }
  .family-overview-grid {
    grid-template-columns: 1fr;
  }
  .note-grid {
    grid-template-columns: 1fr;
  }
  .calendar-grid {
    grid-template-columns: 1fr;
  }
  .calendar-weekday,
  .calendar-day.outside-month {
    display: none;
  }
  .calendar-mobile-weekday {
    display: inline;
  }
  .calendar-day {
    min-height: 70px;
  }
}
@media (max-width: 700px) {
  .weekday-picker {
    grid-template-columns: minmax(0, 1fr);
  }
  .weekday-picker > [data-series-end] {
    grid-column: 1;
    grid-row: auto;
    grid-template-rows: none;
  }
  .sidebar {
    position: sticky;
    inset: 0 0 auto;
    width: 100%;
    height: auto;
    padding: 10px 13px 7px;
    overflow-y: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 0 4px 9px;
  }
  .brand-logo {
    width: min(100%, 150px);
    height: auto;
  }
  .sidebar-footer {
    display: none;
  }
  .workspace {
    justify-content: center;
    margin: 0 0 8px;
    padding: 6px 10px;
  }
  .patient-summary {
    padding: 15px;
  }
  .nav-links {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar {
    display: none;
  }
  .nav-links a {
    min-height: 44px;
    flex: 0 0 auto;
    padding: 6px 10px;
    background: #f7f9f6;
    font-size: 1rem;
  }
  .nav-links a::before {
    display: none;
  }
  .main-content {
    width: 100%;
    min-height: calc(100vh - 87px);
    margin: 0;
    padding: 23px 15px 18px;
  }
  .topbar {
    align-items: flex-end;
    margin-bottom: 18px;
  }
  .topbar h1 {
    font-size: 1.75rem;
  }
  .topbar-date {
    max-width: 130px;
    font-size: 0.875rem;
    text-align: right;
  }
  .topbar-actions {
    align-self: center;
  }
  .topbar-actions .topbar-date {
    display: none;
  }
  .mobile-logout {
    display: block;
  }
  .welcome-card {
    min-height: 185px;
    padding: 23px 22px;
  }
  .welcome-card h2 {
    max-width: 300px;
    font-size: 1.75rem;
  }
  .welcome-card p:not(.eyebrow) {
    max-width: 290px;
    font-size: 1.125rem;
  }
  .welcome-illustration {
    right: -14px;
    font-size: 160px;
  }
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .metric-card {
    min-height: 96px;
    padding: 12px;
  }
  .metric-card span {
    font-size: 1rem;
  }
  .metric-card strong {
    font-size: 1.75rem;
  }
  .metric-card small {
    font-size: 0.875rem;
  }
  .panel {
    margin-bottom: 14px;
    padding: 17px 15px;
    border-radius: 12px;
  }
  .panel-heading {
    margin-bottom: 14px;
  }
  .panel-heading h2 {
    font-size: 1.25rem;
  }
  .panel-heading {
    align-items: center;
  }
  .list-tools {
    width: 100%;
    flex-wrap: wrap;
  }
  .list-search {
    width: 100%;
    flex-basis: 100%;
    flex-wrap: wrap;
  }
  .calendar-filters {
    flex: 1 1 0;
  }
  [data-calendar-panel]:has([data-calendar-grid])
    > .panel-heading
    > div:first-child {
    display: none;
  }
  [data-calendar-panel]:has([data-calendar-grid]) > .panel-heading {
    margin-bottom: 8px;
  }
  .calendar-filters > summary {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    color: var(--green-dark);
    font-weight: 600;
    cursor: pointer;
  }
  .calendar-filters > summary::before {
    content: "+";
  }
  .calendar-filters[open] > summary::before {
    content: "\2212";
  }
  .calendar-filters > summary small {
    color: var(--muted);
    font-size: 0.75rem;
  }
  .calendar-filters[open] {
    flex-basis: 100%;
    order: 1;
  }
  .calendar-view-toolbar {
    gap: 4px;
  }
  .calendar-view-toolbar > .calendar-controls {
    gap: 4px;
  }
  .calendar-view-toolbar > .calendar-controls .button {
    padding: 8px 10px;
    font-size: 0.875rem;
  }
  .calendar-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin: 10px 0;
  }
  .calendar-toolbar h3 {
    font-size: 1rem;
    overflow-wrap: anywhere;
  }
  .calendar-toolbar .calendar-controls {
    flex-wrap: nowrap;
    gap: 4px;
  }
  .calendar-toolbar .calendar-controls .button {
    width: 44px;
    min-height: 44px;
    padding: 4px;
  }
  .calendar-nav-label,
  .calendar-instructions {
    display: none;
  }
  .calendar-nav-icon,
  .calendar-nav-short {
    display: inline;
  }
  .calendar-nav-icon {
    font-size: 1.5rem;
  }
  .calendar-summary {
    margin: 4px 0 8px;
    font-size: 0.875rem;
  }
  .row-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .row-actions form,
  .row-actions .disabled-action-hint,
  .row-actions .button {
    width: 100%;
  }
  .worker-visit-actions.row-actions {
    flex-direction: row;
    align-items: center;
  }
  .worker-visit-actions.row-actions form,
  .worker-visit-actions.row-actions .button {
    width: auto;
  }
  .note-footer > .row-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .note-footer .row-actions form,
  .note-footer .row-actions .button {
    width: auto;
  }
  .dialog-content {
    padding: 22px 20px;
  }
  .dialog-heading {
    margin: -22px -20px 22px;
    padding: 20px;
  }
  .dialog-heading h2 {
    font-size: 1.5rem;
  }
  .dialog-content .form-grid {
    gap: 20px;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }
  .full-width,
  .form-actions {
    grid-column: auto;
  }
  .family-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .family-grid .panel {
    margin-bottom: 0;
  }
  th {
    padding: 9px;
    font-size: 0.875rem;
  }
  td {
    padding: 11px 9px;
    font-size: 1rem;
  }
  .calendar-grid {
    grid-template-columns: 1fr;
  }
  .calendar-weekday,
  .calendar-day.outside-month {
    display: none;
  }
  .calendar-mobile-weekday {
    display: inline;
  }
  .calendar-day {
    min-height: 70px;
  }
  .calendar-entry .row-actions {
    flex-direction: row;
    align-items: center;
  }
  .calendar-entry .row-actions form,
  .calendar-entry .row-actions .disabled-action-hint,
  .calendar-entry .row-actions .button {
    width: auto;
  }
  .record-facts {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 360px) {
  .calendar-empty-unit {
    display: none;
  }
}
.profile-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}
.facility-logo-fields {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}
.facility-logo-preview {
  max-width: 100%;
  width: 240px;
  max-height: 140px;
  object-fit: contain;
}
[data-facility-logo] {
  max-height: 160px;
  object-fit: contain;
}
.auth-card h1 {
  overflow-wrap: anywhere;
}
.impersonation-banner {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px 18px;
  border: 2px solid #b67516;
  border-radius: 10px;
  background: #fff4d6;
  color: #62410e;
}
.impersonation-banner > div {
  flex: 1 1 260px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.impersonation-banner strong,
.impersonation-banner small {
  display: block;
}
.impersonation-banner form {
  margin: 0;
}
.audit-reason {
  max-width: 360px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.profile-photo {
  display: block;
  width: 128px;
  height: 128px;
  max-width: 100%;
  object-fit: cover;
  border-radius: 12px;
}
.profile-photo-thumbnail {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
}
.profile-photo-fields {
  display: grid;
  gap: 12px;
  margin: 12px 0;
}
@media (max-width: 390px) {
  .metric-grid {
    grid-template-columns: 1fr;
  }
  .metric-card {
    min-height: 78px;
  }
  .auth-card {
    padding: 28px 22px 23px;
  }
}
