:root {
  color-scheme: light;
  --ink: #18212f;
  --muted: #607080;
  --line: #d8dee4;
  --paper: #ffffff;
  --wash: #f5f7f8;
  --green: #1f7a5c;
  --blue: #2b5c9e;
  --red: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--wash);
}

button,
input {
  font: inherit;
}

textarea,
select {
  font: inherit;
}

a {
  color: inherit;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.muted {
  color: var(--muted);
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--green);
  color: white;
  font-weight: 800;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: #edf3f1;
}

.login-frame {
  display: grid;
  width: min(100%, 980px);
  min-height: 620px;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  overflow: hidden;
  border: 1px solid #d2ddd8;
  border-radius: 8px;
  background: white;
  box-shadow: 0 28px 90px rgba(24, 33, 47, 0.14);
}

.login-visual {
  position: relative;
  display: grid;
  align-content: end;
  min-height: 620px;
  padding: 34px;
  overflow: hidden;
  background: #163d34;
  color: white;
}

.login-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-visual::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(90deg, rgba(9, 35, 30, 0.68) 0%, rgba(9, 35, 30, 0.3) 46%, rgba(9, 35, 30, 0.04) 82%), linear-gradient(0deg, rgba(9, 35, 30, 0.42) 0%, transparent 55%);
  content: "";
}

.login-visual > div {
  position: relative;
  z-index: 1;
  max-width: 470px;
}

.login-visual p {
  margin: 0 0 8px;
  color: #a9e4c8;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.login-visual h2 {
  margin: 0 0 10px;
  font-size: 32px;
  line-height: 1.08;
  letter-spacing: 0;
}

.login-visual span {
  display: block;
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
  line-height: 1.5;
}

.login-panel {
  display: grid;
  align-content: center;
  width: 100%;
  padding: 42px;
  background: var(--paper);
}

.login-panel h1 {
  margin: 0 0 10px;
  font-size: 30px;
  letter-spacing: 0;
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.login-form label {
  display: grid;
  gap: 7px;
  color: #344253;
  font-size: 14px;
  font-weight: 650;
}

.login-form input {
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #c8d0d8;
  border-radius: 8px;
  color: var(--ink);
}

.login-form button,
.secondary {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: white;
  font-weight: 750;
  cursor: pointer;
}

.login-forgot-link,
.login-back-link {
  color: var(--blue);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.login-forgot-link {
  justify-self: end;
  margin-top: -6px;
}

.login-back-link {
  display: inline-flex;
  gap: 7px;
  margin-top: 20px;
}

.login-forgot-link:hover,
.login-back-link:hover {
  text-decoration: underline;
}

.secondary {
  padding: 0 16px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

.form-error {
  padding: 10px 12px;
  border: 1px solid #f3b4ae;
  border-radius: 8px;
  background: #fff2f0;
  color: var(--red);
  font-weight: 650;
}

.form-success {
  padding: 10px 12px;
  border: 1px solid #b7dbc9;
  border-radius: 8px;
  background: #eef8f3;
  color: #176348;
  font-weight: 650;
  line-height: 1.45;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 280px 1fr;
  transition: grid-template-columns 180ms ease;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  min-height: 0;
  flex-direction: column;
  padding: 24px;
  box-sizing: border-box;
  overflow: visible;
  border-right: 1px solid var(--line);
  background: #ffffff;
  z-index: 20;
  transition: padding 180ms ease;
}

.sidebar-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  margin-bottom: 32px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.sidebar-brand-copy {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 120ms ease, width 180ms ease;
}

.sidebar-brand-toggle {
  flex: 0 0 42px;
  padding: 0;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.sidebar-brand-toggle:focus-visible {
  outline: 3px solid rgba(31, 127, 96, 0.25);
  outline-offset: 3px;
}

.sidebar-brand span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.sidebar-toggle {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
  border-color: #b8d3c6;
  background: #eaf3ef;
  color: var(--green);
}

.sidebar nav {
  display: grid;
  gap: 6px;
}

.sidebar-footer {
  display: grid;
  gap: 6px;
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.sidebar-help-link,
.sidebar-account-link,
.sidebar-logout,
.sidebar-user {
  position: relative;
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 8px;
}

.sidebar-help-link,
.sidebar-account-link,
.sidebar-logout {
  color: #37465a;
  font-weight: 650;
  text-decoration: none;
}

.sidebar-help-link:hover,
.sidebar-help-link:focus-visible,
.sidebar-account-link:hover,
.sidebar-account-link:focus-visible {
  background: #eaf3ef;
  color: var(--green);
}

.sidebar-logout:hover,
.sidebar-logout:focus-visible {
  background: #fff0ef;
  color: var(--red);
}

.sidebar-help-link i,
.sidebar-account-link i,
.sidebar-logout i,
.sidebar-user > i {
  width: 18px;
  flex: 0 0 18px;
  color: #718091;
  text-align: center;
}

.sidebar-help-link:hover i,
.sidebar-help-link:focus-visible i,
.sidebar-account-link:hover i,
.sidebar-account-link:focus-visible i,
.sidebar-logout:hover i,
.sidebar-logout:focus-visible i,
.sidebar-user > i {
  color: currentColor;
}

.sidebar-user {
  color: var(--muted);
}

.sidebar-user-copy {
  min-width: 0;
  overflow: hidden;
}

.sidebar-user-copy span,
.sidebar-user-copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-copy span {
  margin-bottom: 2px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.sidebar-user-copy strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}

.sidebar nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 11px 12px;
  border-radius: 8px;
  color: #37465a;
  font-weight: 650;
  text-decoration: none;
}

.sidebar nav a i {
  width: 18px;
  flex: 0 0 18px;
  text-align: center;
  color: #718091;
  transition: color 120ms ease;
}

.sidebar nav a.active i,
.sidebar nav a:hover i {
  color: currentColor;
}

.sidebar nav a.active,
.sidebar nav a:hover {
  background: #eaf3ef;
  color: var(--green);
}

.sidebar nav a.is-disabled,
.sidebar nav a.is-disabled:hover,
.sidebar nav a.is-disabled:focus-visible {
  background: #f3f5f6;
  color: #aab4be;
  cursor: not-allowed;
}

.sidebar nav a.is-disabled i,
.sidebar nav a.is-disabled:hover i,
.sidebar nav a.is-disabled:focus-visible i {
  color: #c1c9d0;
}

form.is-disabled {
  opacity: 0.62;
}

.admin-app .primary-link.is-disabled,
.admin-app .secondary-link.is-disabled,
.admin-app .patient-table-row a.is-disabled,
.admin-app .client-card > a.is-disabled {
  border-color: #d5dde2;
  background: #e7ebed;
  color: #8996a1;
  cursor: not-allowed;
}

.admin-app button:disabled,
.admin-app input[type="submit"]:disabled,
.admin-app button.is-disabled,
.admin-app input[type="submit"].is-disabled {
  border-color: #d5dde2 !important;
  background: #e7ebed !important;
  color: #8996a1 !important;
  cursor: not-allowed !important;
  opacity: 1;
}

.admin-app button:disabled:hover,
.admin-app input[type="submit"]:disabled:hover,
.admin-app button.is-disabled:hover,
.admin-app input[type="submit"].is-disabled:hover {
  border-color: #d5dde2 !important;
  background: #e7ebed !important;
  color: #8996a1 !important;
}

.admin-app form[data-read-only] input:disabled,
.admin-app form[data-read-only] select:disabled,
.admin-app form[data-read-only] textarea:disabled {
  background: #f7f9fa;
  color: #475564;
  opacity: 1;
}

.change-history-panel {
  min-width: 0;
}

.change-history-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin: 0 0 16px;
}

.change-history-toolbar label {
  display: grid;
  min-width: min(100%, 320px);
  flex: 1 1 280px;
  gap: 6px;
  color: #344253;
  font-size: 13px;
  font-weight: 700;
}

.change-history-toolbar input {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--ink);
}

.change-history-toolbar button {
  min-height: 40px;
  padding: 0 15px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: white;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.change-history-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.change-history-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  background: white;
  font-size: 13px;
}

.change-history-table th,
.change-history-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e6eaed;
  text-align: left;
  vertical-align: top;
}

.change-history-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7f9fa;
  color: #4b5a69;
  font-size: 12px;
  text-transform: uppercase;
}

.change-history-table td:nth-child(1),
.change-history-table td:nth-child(2),
.change-history-table td:nth-child(3) {
  white-space: nowrap;
}

.change-history-table tbody tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 620px) {
  .change-history-toolbar > * {
    width: 100%;
  }

  .change-history-toolbar .secondary-link,
  .change-history-toolbar button {
    justify-content: center;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sidebar-collapsed {
  grid-template-columns: 76px 1fr;
}

.sidebar-collapsed .sidebar {
  padding: 24px 16px;
}

.sidebar-collapsed .sidebar-header {
  align-items: center;
  flex-direction: column;
  gap: 14px;
}

.sidebar-collapsed .sidebar-brand {
  justify-content: center;
}

.sidebar-collapsed .sidebar-brand-copy {
  width: 0;
  opacity: 0;
}

.sidebar-collapsed .sidebar-brand-toggle {
  position: relative;
}

.sidebar-collapsed .sidebar-toggle {
  display: none;
}

.sidebar-collapsed .sidebar nav a {
  justify-content: center;
  gap: 0;
  width: 44px;
  margin: 0 auto;
  padding: 11px 0;
}

.sidebar-collapsed .sidebar-label {
  display: none;
}

.sidebar-collapsed .sidebar-footer {
  align-items: center;
}

.sidebar-collapsed .sidebar-logout,
.sidebar-collapsed .sidebar-help-link,
.sidebar-collapsed .sidebar-account-link,
.sidebar-collapsed .sidebar-user {
  justify-content: center;
  gap: 0;
  width: 44px;
  margin: 0 auto;
  padding: 11px 0;
}

.sidebar-collapsed .sidebar-user-copy {
  display: none;
}

.sidebar-collapsed .sidebar nav a[data-tooltip]::after,
.sidebar-collapsed .sidebar-toggle[data-tooltip]::after {
  position: absolute;
  top: 50%;
  left: calc(100% + 10px);
  z-index: 1000;
  padding: 7px 9px;
  border-radius: 6px;
  background: #18212f;
  color: #ffffff;
  content: attr(data-tooltip);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(-4px);
  transition: opacity 120ms ease, transform 120ms ease;
  white-space: nowrap;
}

.sidebar-collapsed .sidebar nav a[data-tooltip]:hover::after,
.sidebar-collapsed .sidebar nav a[data-tooltip]:focus-visible::after,
.sidebar-collapsed .sidebar-toggle[data-tooltip]:hover::after,
.sidebar-collapsed .sidebar-toggle[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.sidebar-collapsed .sidebar-brand-toggle[data-tooltip]::after,
.sidebar-collapsed .sidebar-footer [data-tooltip]::after {
  position: absolute;
  top: 50%;
  left: calc(100% + 10px);
  z-index: 1000;
  padding: 7px 9px;
  border-radius: 6px;
  background: #18212f;
  color: #ffffff;
  content: attr(data-tooltip);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(-4px);
  transition: opacity 120ms ease, transform 120ms ease;
  white-space: nowrap;
}

.sidebar-collapsed .sidebar-brand-toggle[data-tooltip]:hover::after,
.sidebar-collapsed .sidebar-brand-toggle[data-tooltip]:focus-visible::after,
.sidebar-collapsed .sidebar-footer [data-tooltip]:hover::after,
.sidebar-collapsed .sidebar-footer [data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.sidebar-collapsed .sidebar-toggle {
  position: relative;
}

.help-app {
  background: #f2f6f4;
  color: #172331;
}

.help-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 52px;
}

.help-hero {
  display: grid;
  grid-template-columns: minmax(220px, 0.65fr) minmax(0, 1.35fr);
  gap: 34px;
  align-items: end;
  padding: 30px 34px;
  border: 1px solid #d5e1dc;
  border-radius: 8px;
  background: #ffffff;
}

.help-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1e7f62;
}

.help-brand strong {
  font-size: 24px;
}

.help-brand > span:last-child {
  color: #5e6d78;
  font-size: 14px;
  font-weight: 700;
}

.help-hero h1,
.help-section h2,
.help-section h3 {
  margin: 0;
  letter-spacing: 0;
}

.help-hero h1 {
  max-width: 620px;
  font-size: 34px;
  line-height: 1.12;
}

.help-hero p:not(.eyebrow) {
  max-width: 660px;
  margin: 12px 0 0;
  color: #5c6c78;
  line-height: 1.6;
}

.help-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px 0 4px;
}

.help-toc a {
  padding: 8px 11px;
  border: 1px solid #d5e1dc;
  border-radius: 6px;
  background: #ffffff;
  color: #295e50;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.help-toc a:hover,
.help-toc a:focus-visible {
  border-color: #1e7f62;
  background: #eaf3ef;
}

.help-section {
  scroll-margin-top: 20px;
  padding: 36px 0;
  border-bottom: 1px solid #d8e2de;
}

.help-section-heading {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 22px;
  align-items: baseline;
  margin-bottom: 18px;
}

.help-section-heading h2 {
  font-size: 25px;
}

.help-copy {
  max-width: 820px;
  color: #40515e;
  line-height: 1.65;
}

.help-copy p {
  margin: 0 0 10px;
}

.help-grid {
  display: grid;
  gap: 16px;
}

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

.help-grid.three-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.help-grid > div {
  padding: 18px 0;
  border-top: 3px solid #8ec6b1;
}

.help-grid h3 {
  font-size: 17px;
}

.help-grid p {
  margin: 9px 0 0;
  color: #485966;
  line-height: 1.58;
}

.help-figure {
  margin: 24px 0 0;
  overflow: hidden;
  border: 1px solid #cbd9d4;
  border-radius: 8px;
  background: #ffffff;
}

.help-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.help-figure figcaption {
  padding: 12px 15px;
  color: #5d6c77;
  font-size: 13px;
  line-height: 1.45;
}

.help-note {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 24px 0 0;
  padding: 14px 16px;
  border-left: 4px solid #1e7f62;
  background: #eaf3ef;
  color: #325347;
  line-height: 1.55;
}

.help-note i {
  margin-top: 3px;
  color: #1e7f62;
}

.help-access-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0 0;
}

.help-access-list div {
  padding: 16px 0;
  border-top: 3px solid #8ec6b1;
}

.help-access-list dt {
  color: #1d3d35;
  font-weight: 800;
}

.help-access-list dd {
  margin: 8px 0 0;
  color: #52626e;
  line-height: 1.5;
}

.help-steps {
  display: grid;
  gap: 14px;
  max-width: 850px;
  margin: 0;
  padding-left: 24px;
  color: #445560;
  line-height: 1.58;
}

.help-steps li::marker {
  color: #1e7f62;
  font-weight: 850;
}

.help-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 26px;
  color: #64737d;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 760px) {
  .help-shell {
    width: min(100% - 28px, 1120px);
    padding-top: 14px;
  }

  .help-hero,
  .help-section-heading,
  .help-grid.two-columns,
  .help-grid.three-columns,
  .help-access-list {
    grid-template-columns: 1fr;
  }

  .help-hero {
    gap: 22px;
    padding: 23px 20px;
  }

  .help-hero h1 {
    font-size: 29px;
  }

  .help-section {
    padding: 28px 0;
  }

  .help-section-heading {
    gap: 7px;
  }

  .help-section-heading h2 {
    font-size: 22px;
  }

  .help-toc {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 10px;
  }

  .help-toc a {
    flex: 0 0 auto;
  }
}

.workspace {
  padding: 28px;
}

.child-workspace {
  padding: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.topbar h1 {
  margin: 0;
  font-size: 32px;
  letter-spacing: 0;
}

.dashboard-section {
  margin-bottom: 22px;
}

.dashboard-section .section-heading {
  margin-bottom: 12px;
}

.dashboard-section .section-heading h2 {
  margin: 0;
  font-size: 21px;
}

.dashboard-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.dashboard-table th,
.dashboard-table td {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

.dashboard-table thead th {
  border-top: 0;
  background: #f7f9fa;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.dashboard-table tbody th {
  font-weight: 700;
}

.dashboard-table tbody td:nth-child(2) {
  width: 130px;
  font-size: 20px;
  font-weight: 800;
}

.dashboard-table a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.session-card {
  max-width: 820px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.session-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 22px;
  margin: 0;
}

.session-details div {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.session-details dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.session-details dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.summary-strip div,
.module-card,
.visit-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.summary-strip div {
  padding: 16px;
}

.flow-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.flow-strip span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: #37465a;
  font-size: 13px;
  font-weight: 750;
}

.summary-strip span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

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

.module-card {
  display: grid;
  min-height: 230px;
  align-content: space-between;
  padding: 20px;
}

.module-card h2 {
  margin: 10px 0;
  font-size: 21px;
  letter-spacing: 0;
}

.module-card p {
  color: var(--muted);
  line-height: 1.5;
}

.module-card a {
  color: var(--blue);
  font-weight: 750;
  text-decoration: none;
}

.badge {
  display: inline-block;
  margin: 0;
  color: var(--green);
  font-size: 13px;
  font-weight: 750;
}

.placeholder {
  max-width: 760px;
  padding: 48px 28px;
}

.placeholder h1 {
  margin: 0 0 12px;
}

.settings-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 24px 56px;
}

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

.settings-header h1 {
  margin: 0 0 8px;
  font-size: 32px;
  letter-spacing: 0;
}

.settings-header p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.secondary-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
}

.primary-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--green);
  color: white;
  font-weight: 750;
  text-decoration: none;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(420px, 1.1fr);
  gap: 18px;
}

.settings-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.settings-card.single {
  max-width: 820px;
}

.settings-card.wide-edit-card {
  max-width: none;
  width: 100%;
}

.settings-card h2,
.settings-card h3 {
  margin: 0 0 14px;
  letter-spacing: 0;
}

.settings-card h3 {
  margin-top: 10px;
  font-size: 16px;
}

.settings-wide-shell {
  width: 100%;
  max-width: none;
}

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

.table-page-shell > .settings-overview-layout {
  min-height: 0;
  flex: 1 1 auto;
}

.settings-users-module {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
}

.settings-users-module > .client-toolbar {
  flex: 0 0 auto;
}

.settings-users-module > .table-section {
  min-height: 0;
  flex: 1 1 auto;
}

.settings-launcher {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
}

.settings-launcher > .eyebrow {
  margin: 0 0 12px;
}

.settings-launcher nav {
  display: grid;
  gap: 10px;
}

.settings-launcher-link {
  display: grid;
  min-width: 0;
  min-height: 66px;
  grid-template-columns: 38px minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #c8ddd3;
  border-radius: 8px;
  background: white;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 150ms ease, background 150ms ease;
}

.settings-launcher-link:hover,
.settings-launcher-link.active {
  border-color: var(--green);
  background: #eff9f4;
}

.settings-launcher-icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--green);
  color: white;
}

.settings-launcher-copy {
  min-width: 0;
}

.settings-launcher-copy strong,
.settings-launcher-copy small {
  display: block;
  overflow-wrap: anywhere;
}

.settings-launcher-copy strong {
  font-size: 14px;
  line-height: 1.25;
}

.settings-launcher-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.settings-launcher-arrow {
  color: var(--green);
  font-size: 12px;
}

.smtp-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.smtp-summary-card {
  display: grid;
  gap: 4px;
  min-height: 88px;
  align-content: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.smtp-summary-card strong {
  font-size: 24px;
  line-height: 1.1;
}

.smtp-summary-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.smtp-summary-card.ready {
  border-color: #9fd2ba;
}

.smtp-summary-card.ready strong {
  color: var(--green);
}

.smtp-summary-card.warning strong {
  color: #9a5c00;
}

.smtp-summary-card.muted strong {
  color: var(--muted);
}

.smtp-main {
  min-width: 0;
}

.smtp-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.smtp-config-card,
.smtp-test-card {
  min-width: 0;
}

.smtp-config-card .section-heading p:not(.eyebrow),
.smtp-help,
.smtp-updated,
.smtp-config-form label > small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.smtp-config-form label > small {
  font-weight: 500;
}

.smtp-clear-password,
.smtp-enabled {
  grid-template-columns: 20px minmax(0, 1fr) !important;
}

.smtp-config-form button,
.smtp-test-card button {
  width: 100%;
}

.smtp-config-form button:disabled,
.smtp-test-card button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.smtp-updated,
.smtp-help {
  margin: 14px 0 0;
}

.stack-form {
  display: grid;
  gap: 16px;
}

.stack-form label:not(.check-row) {
  display: grid;
  gap: 7px;
  color: #344253;
  font-size: 14px;
  font-weight: 650;
}

.stack-form input,
.stack-form select,
.stack-form textarea {
  min-height: 42px;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #c8d0d8;
  border-radius: 8px;
  background: white;
  color: var(--ink);
}

.stack-form textarea {
  resize: vertical;
}

.form-grid {
  display: grid;
  gap: 12px;
}

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

.form-grid.three {
  grid-template-columns: 0.7fr 1fr 1fr;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.form-actions button {
  min-width: 150px;
  padding: 0 16px;
}

.stack-form button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: white;
  font-weight: 750;
  cursor: pointer;
}

.temporary-password-reset {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px;
  border: 1px solid #c8ddd3;
  border-radius: 8px;
  background: #f2f8f5;
}

.temporary-password-reset strong,
.temporary-password-reset small {
  display: block;
}

.temporary-password-reset small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

.temporary-password-reset button.secondary {
  display: inline-flex;
  width: auto;
  min-width: 310px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid var(--green);
  background: white;
  color: var(--green);
}

.check-list {
  display: grid;
  gap: 8px;
}

.check-row {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.check-row input {
  width: 16px;
  min-height: 16px;
  margin-top: 2px;
}

.check-row small,
.permission-row small,
.user-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
}

.permission-matrix {
  display: grid;
  gap: 8px;
}

.permission-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.user-table {
  display: grid;
  gap: 8px;
}

.user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 0.5fr);
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
}

.user-row:hover {
  border-color: #9fb9ad;
  background: #f7fbf9;
}

.user-row em {
  display: inline-flex;
  margin-top: 5px;
  color: var(--green);
  font-size: 13px;
  font-style: normal;
  font-weight: 750;
}

.notice {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 650;
}

.notice.success {
  border: 1px solid #b7dbc9;
  background: #eef8f3;
  color: #176348;
}

.notice.error {
  border: 1px solid #f3b4ae;
  background: #fff2f0;
  color: var(--red);
}

.clients-shell {
  max-width: 1320px;
}

.calendar-shell {
  max-width: 1680px;
}

.calendar-workspace {
  min-width: 0;
  height: 100vh;
  overflow: hidden;
}

.calendar-page-shell {
  display: flex;
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  flex-direction: column;
}

.table-workspace {
  min-width: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.table-page-shell {
  display: flex;
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 32px 28px 36px;
  flex-direction: column;
}

.table-page-shell > .settings-header,
.table-page-shell > .notice,
.table-page-shell > .client-toolbar,
.table-page-shell > .filter-links,
.table-page-shell > .report-toolbar,
.table-page-shell > .report-summary {
  flex: 0 0 auto;
}

.table-section {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
}

.table-region {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.table-scroll {
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: auto;
  overflow-y: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.table-region > .table-scroll {
  border: 0;
  border-radius: 0;
}

.table-scroll > .patient-table {
  overflow: visible;
  border: 0;
  border-radius: 0;
}

.table-scroll .patient-table-head {
  position: sticky;
  top: 0;
  z-index: 3;
}

.table-pagination {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: white;
}

.table-pagination-summary {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.table-pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-pagination-controls strong {
  min-width: 105px;
  color: var(--ink);
  font-size: 13px;
  text-align: center;
}

.table-pagination-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--blue);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.table-pagination-link:hover,
.table-pagination-link:focus-visible {
  border-color: #9fb9ad;
  background: #f7fbf9;
}

.table-pagination-link.is-disabled {
  color: #a1adb7;
  cursor: default;
}

.calendar-page-shell > .settings-header,
.calendar-page-shell > .calendar-toolbar,
.calendar-page-shell > .calendar-meta,
.calendar-page-shell > .notice {
  flex: 0 0 auto;
}

.calendar-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.calendar-week-navigation,
.calendar-filter,
.calendar-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.calendar-week-navigation strong {
  min-width: 190px;
  color: var(--ink);
  text-align: center;
}

.calendar-filter {
  justify-content: flex-end;
}

.calendar-filter label {
  display: grid;
  gap: 5px;
  min-width: 245px;
  color: #344253;
  font-size: 12px;
  font-weight: 750;
}

.calendar-filter select {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #c8d0d8;
  border-radius: 7px;
  background: white;
  color: var(--ink);
}

.calendar-filter button {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: white;
  font-weight: 750;
  cursor: pointer;
}

.calendar-filter button:hover {
  background: #176248;
}

.calendar-meta {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.calendar-conflict-note {
  color: var(--red);
  font-weight: 750;
}

.calendar-scroll {
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: auto;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.calendar-grid {
  display: grid;
  grid-template-columns: 62px repeat(7, minmax(150px, 1fr));
  min-width: 1120px;
}

.calendar-time-axis {
  height: 1978px;
}

.calendar-day-body {
  height: 1920px;
}

.calendar-time-axis {
  position: relative;
  border-right: 1px solid var(--line);
  background: #f7f9fa;
}

.calendar-time-axis span {
  position: absolute;
  right: 8px;
  transform: translateY(-8px);
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.calendar-day {
  min-width: 0;
  border-right: 1px solid var(--line);
}

.calendar-day:last-child {
  border-right: 0;
}

.calendar-day > header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  gap: 2px;
  min-height: 58px;
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  background: #f7f9fa;
}

.calendar-day > header span {
  color: var(--muted);
  font-size: 12px;
}

.calendar-day-body {
  position: relative;
  background-image: linear-gradient(to bottom, rgba(207, 216, 221, 0.62) 1px, transparent 1px), linear-gradient(to bottom, transparent 79px, rgba(166, 180, 187, 0.72) 80px, transparent 81px);
  background-size: 100% 20px, 100% 80px;
}

.calendar-task-block {
  position: absolute;
  right: 4px;
  left: 4px;
  z-index: 1;
  display: block;
  overflow: hidden;
  padding: 6px 7px;
  border: 1px solid #96c4b2;
  border-radius: 6px;
  background: #eaf5ef;
  box-shadow: 0 2px 5px rgba(24, 33, 47, 0.08);
  color: #17483b;
  font-size: 11px;
  line-height: 1.25;
  text-decoration: none;
}

.calendar-task-block:hover {
  z-index: 3;
  border-color: var(--green);
  background: #dceee5;
}

.calendar-task-block strong,
.calendar-task-block span,
.calendar-task-block small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-task-block small {
  margin-top: 3px;
  color: #4b6f63;
  font-size: 10px;
}

.calendar-task-block em {
  display: block;
  margin-top: 4px;
  color: var(--blue);
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
}

.calendar-task-block.is-conflict {
  border-color: #d98282;
  background: #fff0ef;
  color: #8e2c2c;
}

.calendar-task-block.is-conflict small {
  color: #a85a5a;
}

.calendar-detail-shell {
  max-width: 1050px;
}

.calendar-detail-card {
  max-width: none;
}

.calendar-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
  margin: 0;
}

.calendar-detail-grid div {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.calendar-detail-grid dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.calendar-detail-grid dd {
  margin: 5px 0 0;
  color: var(--ink);
}

.calendar-detail-grid a {
  color: var(--blue);
  font-weight: 750;
  text-decoration: none;
}

.calendar-detail-notes {
  margin-top: 24px;
}

.calendar-detail-notes h2 {
  margin: 0 0 8px;
  font-size: 16px;
}

.calendar-detail-notes p {
  margin: 0;
  color: #4c5967;
  line-height: 1.55;
  white-space: pre-wrap;
}

.calendar-execution-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 24px;
  margin: 0;
}

.calendar-execution-grid div {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.calendar-execution-grid dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.calendar-execution-grid dd {
  margin: 5px 0 0;
  color: var(--ink);
}

.calendar-execution-task-list {
  display: grid;
  gap: 10px;
}

.calendar-execution-task {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.calendar-execution-task p {
  margin-top: 5px;
}

.calendar-execution-note {
  color: var(--ink) !important;
  font-size: 13px;
}

.calendar-execution-task-meta {
  display: grid;
  flex: 0 0 auto;
  justify-items: end;
  gap: 5px;
}

.calendar-execution-task-meta small {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.client-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.search-form input,
.search-form select {
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #c8d0d8;
  border-radius: 8px;
  background: white;
  color: var(--ink);
}

.client-filter-form {
  grid-template-columns: minmax(0, 1fr) 210px 190px auto;
}

.patient-filter-form {
  grid-template-columns: minmax(0, 1fr) 230px 190px auto;
}

.search-form button {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-weight: 750;
  cursor: pointer;
}

.caregiver-toolbar .search-form {
  grid-template-columns: minmax(0, 1fr) 180px auto;
}

.filter-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -6px 0 16px;
}

.filter-links a {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.filter-links a.active,
.filter-links a:hover {
  border-color: #9fb9ad;
  background: #eaf3ef;
  color: var(--green);
}

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

.client-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.client-card h2 {
  margin: 10px 0 4px;
  font-size: 21px;
  letter-spacing: 0;
}

.client-card p {
  margin: 0;
  color: var(--muted);
}

.client-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.client-card dl div {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 10px;
}

.client-card dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.client-card dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.client-card > a {
  color: var(--blue);
  font-weight: 750;
  text-decoration: none;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef3f6;
  color: #344253;
  font-size: 12px;
  font-weight: 800;
}

.status-pill.active {
  background: #e8f5ee;
  color: #176348;
}

.status-pill.lead,
.status-pill.candidate {
  background: #fff5dc;
  color: #775108;
}

.status-pill.paused {
  background: #edf1f7;
  color: #2b5c9e;
}

.status-pill.ended,
.status-pill.archived,
.status-pill.rejected {
  background: #f1f2f4;
  color: #607080;
}

.status-pill.invited {
  background: #fff5dc;
  color: #775108;
}

.status-pill.suspended {
  background: #edf1f7;
  color: #2b5c9e;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 34px;
  border: 1px dashed #bfc9d2;
  border-radius: 8px;
  background: white;
  text-align: center;
}

.form-section {
  display: grid;
  gap: 14px;
  padding-top: 6px;
}

.form-section + .form-section {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.form-section h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: 0;
}

.form-tabs {
  margin-bottom: 4px;
}

.tab-list {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 4px;
  border-bottom: 1px solid var(--line);
}

.tab-button {
  min-height: 40px;
  flex: 0 0 auto;
  padding: 0 13px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

.tab-button:hover,
.tab-button.is-active {
  border-bottom-color: var(--green);
  color: var(--green);
}

.stack-form .tab-button {
  background: white;
  color: var(--muted);
}

.stack-form .tab-button:hover {
  background: #f7fbf9;
  color: var(--green);
}

.stack-form .tab-button.is-active {
  background: #eaf3ef;
  color: var(--green);
}

.tab-panel[hidden] {
  display: none;
}

.stack-form > .tab-panel.form-section + .tab-panel.form-section {
  padding-top: 6px;
  border-top: 0;
}

.field-hint,
.table-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.patient-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.patient-table-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) minmax(150px, 1fr) minmax(130px, 0.9fr) minmax(120px, 0.8fr) 100px 62px;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

.patient-table-row:first-child {
  border-top: 0;
}

.patient-table-head {
  border-top: 0;
  background: #f7f9fa;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.patient-table-row small,
.related-patient small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.patient-table-row a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.patient-table-head .table-sort-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
}

.patient-table-head .table-sort-link:hover {
  color: var(--blue);
}

.table-sort-indicator {
  color: var(--blue);
  font-size: 15px;
  line-height: 1;
}

.client-table .patient-table-row {
  grid-template-columns: minmax(180px, 1.25fr) minmax(145px, 1fr) minmax(150px, 1fr) minmax(120px, 0.9fr) 100px 100px 62px;
}

.caregiver-table .patient-table-row {
  grid-template-columns: minmax(170px, 1.25fr) 105px minmax(150px, 1.15fr) minmax(130px, 1fr) 95px 95px 62px;
}

.user-table-grid .patient-table-row {
  grid-template-columns: minmax(190px, 1.35fr) minmax(160px, 1.1fr) 110px 150px 130px 62px;
}

.availability-table {
  display: grid;
  gap: 8px;
}

.availability-head,
.availability-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 130px 30px 130px;
  gap: 10px;
  align-items: center;
}

.availability-head {
  padding: 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.availability-row {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.availability-row input[type="time"] {
  min-height: 38px;
}

.availability-day {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
}

.availability-day input {
  width: 16px;
  min-height: 16px;
}

.availability-separator {
  color: var(--muted);
  text-align: center;
}

.caregiver-choice-list {
  display: grid;
  gap: 8px;
}

.assignment-list {
  display: grid;
  gap: 8px;
}

.assigned-caregiver-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef8f3;
}

.assigned-caregiver-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.danger-link {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--red);
  border-radius: 7px;
  background: var(--red);
  color: white;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.danger-link:hover {
  border-color: #8f1d14;
  background: #8f1d14;
  color: white;
}

.assignment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.assignment-actions button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-weight: 750;
  cursor: pointer;
}

.assignment-actions button:hover {
  border-color: #9fb9ad;
  background: #f7fbf9;
  color: var(--green);
}

.caregiver-picker {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fa;
}

.caregiver-picker[hidden] {
  display: none;
}

.caregiver-picker > label {
  display: grid;
  gap: 7px;
  color: #344253;
  font-size: 14px;
  font-weight: 650;
}

.caregiver-picker input[type="search"] {
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #c8d0d8;
  border-radius: 8px;
  background: white;
  color: var(--ink);
}

.caregiver-picker .check-row[hidden] {
  display: none;
}

.caregiver-picker > button {
  justify-self: start;
}

.weekly-day-group {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.weekly-day-group h3,
.weekly-task-editor h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
}

.weekly-task-list {
  display: grid;
  gap: 8px;
}

.weekly-task-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.weekly-task-time strong,
.weekly-task-main strong {
  display: block;
}

.weekly-task-time small,
.weekly-task-main small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.weekly-task-main p {
  margin: 7px 0 0;
  color: #4c5967;
  font-size: 13px;
  line-height: 1.45;
}

.weekly-task-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.visit-tasks-editor {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fa;
}

.visit-tasks-editor h4 {
  margin: 0;
  font-size: 15px;
}

.visit-task-editor-row {
  display: grid;
  grid-template-columns: minmax(170px, 0.8fr) minmax(220px, 1.3fr) auto;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.visit-task-editor-row label {
  display: grid;
  gap: 6px;
  color: #344253;
  font-size: 13px;
  font-weight: 700;
}

.visit-task-editor-row select,
.visit-task-editor-row textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #c8d0d8;
  border-radius: 7px;
  background: white;
  color: var(--ink);
}

.form-note {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #d9e5df;
  border-radius: 8px;
  background: #f1f7f4;
  color: #456155;
  font-size: 13px;
  line-height: 1.4;
}

.form-note strong {
  color: var(--green);
}

.dictionary-card {
  max-width: none;
}

.dictionary-create-form,
.dictionary-row {
  display: grid;
  align-items: end;
  gap: 12px;
}

.dictionary-create-form {
  grid-template-columns: minmax(220px, 1fr) 130px auto;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.dictionary-create-form label,
.dictionary-row label {
  display: grid;
  gap: 6px;
  color: #344253;
  font-size: 13px;
  font-weight: 700;
}

.dictionary-create-form input,
.dictionary-row input:not([type="checkbox"]) {
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #c8d0d8;
  border-radius: 8px;
  background: white;
  color: var(--ink);
}

.dictionary-checkbox {
  display: flex !important;
  align-items: center;
  gap: 8px !important;
  min-height: 42px;
}

.dictionary-checkbox input {
  width: 16px;
  min-height: 16px;
}

.dictionary-create-form button,
.dictionary-row button {
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: white;
  font-weight: 750;
  cursor: pointer;
}

.dictionary-row button.secondary {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

.dictionary-list {
  display: grid;
  gap: 8px;
}

.dictionary-row {
  grid-template-columns: minmax(170px, 0.8fr) minmax(200px, 1fr) 100px auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.dictionary-row > div {
  align-self: center;
}

.dictionary-row strong,
.dictionary-row small {
  display: block;
}

.dictionary-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.weekly-task-editor {
  display: grid;
  gap: 14px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.form-actions.compact {
  margin-top: 0;
}

@media (max-width: 620px) {
  .weekly-task-row {
    grid-template-columns: 1fr auto;
  }

  .weekly-task-main {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

.public-site {
  background: #f5f8f6;
}

.public-home {
  min-height: 100vh;
  overflow: hidden;
}

.public-hero {
  position: relative;
  display: flex;
  min-height: 90vh;
  flex-direction: column;
  overflow: hidden;
  background: #183f35;
  color: white;
}

.public-hero-media,
.public-hero-media img,
.public-hero-media span {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.public-hero-media img {
  object-fit: cover;
  object-position: center 42%;
}

.public-hero-media span {
  background: rgba(7, 35, 29, 0.62);
}

.public-nav,
.public-hero-content,
.public-next-hint {
  position: relative;
  z-index: 1;
}

.public-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 24px 28px;
}

.public-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: white;
  text-decoration: none;
}

.public-brand > span:last-child {
  display: grid;
  gap: 2px;
}

.public-brand strong {
  font-size: 20px;
  letter-spacing: 0;
}

.public-brand small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: uppercase;
}

.public-brand-mark {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 22px;
  font-weight: 850;
}

.public-nav-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  color: white;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.public-nav-link:hover,
.public-nav-link:focus-visible {
  background: rgba(255, 255, 255, 0.14);
}

.public-hero-content {
  width: min(100%, 1240px);
  margin: auto auto 0;
  padding: 60px 28px 78px;
}

.public-kicker {
  margin: 0 0 14px;
  color: #a9e4c8;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.public-hero h1 {
  max-width: 720px;
  margin: 0 0 22px;
  font-size: 58px;
  line-height: 1.02;
  letter-spacing: 0;
}

.public-hero-lead {
  max-width: 590px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.55;
}

.public-primary-link {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 19px;
  border-radius: 9px;
  background: #d8f0df;
  color: #154f3b;
  font-weight: 850;
  text-decoration: none;
}

.public-primary-link:hover,
.public-primary-link:focus-visible {
  background: white;
}

.public-hero-note {
  display: block;
  margin-top: 13px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.public-next-hint {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 0 28px 24px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.public-next-hint span:first-child {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  font-size: 18px;
}

.public-intro,
.public-company {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 96px 28px;
}

.public-section-heading {
  max-width: 680px;
}

.public-section-heading h2,
.public-company h2 {
  margin: 0 0 15px;
  color: var(--ink);
  font-size: 40px;
  line-height: 1.08;
  letter-spacing: 0;
}

.public-section-heading > p:last-child,
.public-company p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.public-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin-top: 64px;
}

.public-values article {
  padding-top: 18px;
  border-top: 2px solid #b7d9c5;
}

.public-value-number {
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.public-values h3 {
  margin: 24px 0 8px;
  color: var(--ink);
  font-size: 23px;
  letter-spacing: 0;
}

.public-values p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.public-company {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  gap: 64px;
  align-items: end;
  border-top: 1px solid #d6e1db;
}

.public-company address {
  display: grid;
  gap: 7px;
  padding-left: 22px;
  border-left: 3px solid var(--green);
  color: #384b48;
  font-style: normal;
  line-height: 1.45;
}

.public-company address strong {
  margin-bottom: 5px;
  color: var(--ink);
}

.public-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 25px 28px 32px;
  border-top: 1px solid #d6e1db;
  color: #71807d;
  font-size: 12px;
}

.public-brand-dark {
  color: var(--ink);
}

.public-brand-dark small {
  color: var(--muted);
}

.public-brand-dark .public-brand-mark {
  border-color: #b7d9c5;
  background: #e6f2eb;
  color: var(--green);
}

.public-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.public-footer nav a {
  color: #50625e;
  font-weight: 700;
  text-decoration: none;
}

.public-footer nav a:hover,
.public-footer nav a:focus-visible {
  color: var(--green);
}

.public-document {
  display: grid;
  min-height: 100vh;
  grid-template-rows: auto 1fr auto;
  background: #f5f8f6;
}

.public-document-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: 24px 28px;
}

.public-document-back {
  color: var(--blue);
  font-weight: 750;
  text-decoration: none;
}

.public-document article {
  width: min(100%, 760px);
  margin: auto;
  padding: 80px 28px;
}

.public-document article h1 {
  margin: 0 0 15px;
  color: var(--ink);
  font-size: 46px;
  letter-spacing: 0;
}

.public-document article p:not(.public-kicker) {
  max-width: 620px;
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.public-primary-link-dark {
  background: var(--green);
  color: white;
}

.public-primary-link-dark:hover,
.public-primary-link-dark:focus-visible {
  background: #176348;
}

.public-footer-document {
  width: min(100%, 1080px);
}

@media (max-width: 760px) {
  .public-nav,
  .public-hero-content,
  .public-next-hint,
  .public-intro,
  .public-company,
  .public-footer,
  .public-document-header {
    padding-right: 18px;
    padding-left: 18px;
  }

  .public-nav {
    padding-top: 16px;
  }

  .public-nav-link {
    width: 44px;
    padding: 0;
    justify-content: center;
    font-size: 0;
  }

  .public-nav-link span {
    font-size: 22px;
  }

  .public-hero {
    min-height: 92svh;
  }

  .public-hero-content {
    padding-top: 42px;
    padding-bottom: 58px;
  }

  .public-hero h1 {
    font-size: 39px;
  }

  .public-hero-lead {
    font-size: 16px;
  }

  .public-intro,
  .public-company {
    padding-top: 66px;
    padding-bottom: 66px;
  }

  .public-section-heading h2,
  .public-company h2 {
    font-size: 32px;
  }

  .public-values,
  .public-company {
    grid-template-columns: 1fr;
  }

  .public-values {
    gap: 28px;
    margin-top: 42px;
  }

  .public-company {
    gap: 32px;
  }

  .public-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-document article {
    padding: 56px 18px;
  }

  .public-document article h1 {
    font-size: 36px;
  }
}

@media (max-width: 620px) {
  .assigned-caregiver-row {
    align-items: flex-start;
    flex-direction: column;
  }
}


.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
}

.related-patients {
  display: grid;
  gap: 8px;
}

.related-patient {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
}

.related-patient:hover {
  border-color: #9fb9ad;
  background: #f7fbf9;
}

.empty-state h2 {
  margin: 0 0 8px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
}

.sweet-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(24, 33, 47, 0.36);
}

.sweet-alert {
  width: min(100%, 430px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  text-align: center;
  box-shadow: 0 24px 80px rgba(24, 33, 47, 0.18);
}

.sweet-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 999px;
  color: white;
  font-size: 28px;
  font-weight: 850;
}

.sweet-alert.success .sweet-icon {
  background: var(--green);
}

.sweet-alert.error .sweet-icon {
  background: var(--red);
}

.sweet-alert h2 {
  margin: 0 0 8px;
  font-size: 24px;
  letter-spacing: 0;
}

.sweet-alert p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.sweet-alert a {
  display: inline-flex;
  min-width: 110px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  border-radius: 8px;
  background: var(--green);
  color: white;
  font-weight: 750;
  text-decoration: none;
}

.sweet-alert.error a {
  background: var(--red);
}

.mobile-preview {
  display: grid;
  min-height: 100vh;
  place-items: start center;
  padding: 24px;
  background: #edf5f2;
}

.mobile-preview section {
  width: min(100%, 420px);
}

.mobile-preview h1 {
  margin: 0 0 18px;
  font-size: 38px;
  letter-spacing: 0;
}

.visit-card {
  padding: 18px;
}

.visit-card span {
  color: var(--green);
  font-weight: 800;
}

.visit-card strong {
  display: block;
  margin: 8px 0;
}

.map-link {
  display: inline-flex;
  margin-top: 10px;
  color: var(--blue);
  font-weight: 750;
  text-decoration: none;
}

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

  .table-page-shell {
    padding: 24px 18px 28px;
  }

  .table-pagination {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .table-pagination-summary {
    text-align: center;
  }

  .table-pagination-controls {
    justify-content: space-between;
  }

  .sidebar {
    position: relative;
    height: auto;
    min-height: auto;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar nav,
  .summary-strip,
  .module-grid,
  .settings-grid,
  .settings-overview-layout,
  .settings-content-layout,
  .smtp-summary-grid,
  .smtp-workspace-grid,
  .session-details {
    grid-template-columns: 1fr;
  }

  .table-page-shell > .settings-overview-layout {
    overflow-y: auto;
  }

  .settings-users-module {
    min-height: 520px;
  }

  .settings-header {
    flex-direction: column;
  }

  .temporary-password-reset {
    align-items: stretch;
    flex-direction: column;
  }

  .temporary-password-reset button.secondary {
    width: 100%;
    min-width: 0;
  }

  .permission-row,
  .user-row {
    grid-template-columns: 1fr;
  }

  .client-toolbar,
  .search-form,
  .client-grid,
  .form-grid.two,
  .form-grid.three {
    grid-template-columns: 1fr;
  }

  .caregiver-toolbar .search-form {
    grid-template-columns: 1fr;
  }

  .patient-table-head {
    display: none;
  }

  .patient-table-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px 14px;
  }

  .patient-table-row > div:nth-child(1) {
    grid-column: 1 / -1;
  }

  .patient-table-row > div:nth-child(6) {
    text-align: right;
  }

  .client-table .patient-table-row > div:nth-child(7) {
    text-align: right;
  }

  .caregiver-table .patient-table-row > div:nth-child(7) {
    text-align: right;
  }

  .user-table-grid .patient-table-row > div:nth-child(6) {
    text-align: right;
  }

  .availability-head {
    display: none;
  }

  .availability-row {
    grid-template-columns: 1fr 1fr;
  }

  .availability-day {
    grid-column: 1 / -1;
  }

  .availability-separator {
    display: none;
  }

  .section-heading {
    flex-direction: column;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .login-shell {
    padding: 14px;
  }

  .login-frame {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 260px;
    padding: 24px;
  }

  .login-visual h2 {
    font-size: 25px;
  }

  .login-panel {
    padding: 28px;
  }
}

@media (max-width: 900px) {
  .calendar-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-filter {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .calendar-week-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .calendar-week-navigation strong {
    grid-column: 1 / -1;
    grid-row: 1;
    min-width: 0;
  }

  .calendar-week-navigation a:last-child {
    text-align: right;
  }

  .calendar-filter label {
    min-width: 0;
    width: 100%;
  }

  .calendar-filter button,
  .calendar-filter .secondary-link {
    flex: 1 1 auto;
    text-align: center;
  }

  .calendar-detail-grid {
    grid-template-columns: 1fr;
  }

  .calendar-execution-grid {
    grid-template-columns: 1fr;
  }

  .calendar-execution-task {
    flex-direction: column;
  }

  .calendar-execution-task-meta {
    justify-items: start;
  }

  .calendar-execution-task-meta small {
    text-align: left;
  }

  .visit-task-editor-row,
  .dictionary-create-form,
  .dictionary-row {
    grid-template-columns: 1fr;
  }

  .weekly-task-actions {
    justify-content: flex-start;
  }
}

body.caregiver-app {
  background: #edf5f2;
}

.caregiver-mobile-shell {
  width: min(100%, 720px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 18px 42px;
}

.caregiver-password-shell {
  display: grid;
  min-height: 100vh;
  align-content: center;
}

.caregiver-password-card {
  background: white;
}

.caregiver-password-form {
  display: grid;
  gap: 15px;
}

.caregiver-password-form label {
  display: grid;
  gap: 7px;
  color: #344253;
  font-size: 14px;
  font-weight: 700;
}

.caregiver-password-form input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #c8d0d8;
  border-radius: 8px;
  background: white;
  color: var(--ink);
}

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

.caregiver-header h1 {
  margin: 0 0 6px;
  font-size: clamp(28px, 7vw, 38px);
  line-height: 1.05;
  letter-spacing: 0;
}

.caregiver-header p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.caregiver-back {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--blue);
  font-weight: 750;
  text-decoration: none;
}

.caregiver-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.caregiver-user-name {
  max-width: 150px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.caregiver-icon-button,
.caregiver-day-arrow {
  display: inline-grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  color: var(--green);
  font-size: 24px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}

.caregiver-day-navigation {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: 12px;
  align-items: center;
  margin: 0 -18px 20px;
  padding: 10px 18px;
  border-top: 1px solid rgba(216, 222, 228, 0.84);
  border-bottom: 1px solid rgba(216, 222, 228, 0.84);
  background: rgba(237, 245, 242, 0.95);
  backdrop-filter: blur(10px);
}

.caregiver-day-navigation > div {
  min-width: 0;
  text-align: center;
}

.caregiver-day-navigation strong,
.caregiver-day-navigation span {
  display: block;
}

.caregiver-day-navigation strong {
  font-size: 17px;
}

.caregiver-day-navigation span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.caregiver-day-arrow:last-child {
  justify-self: end;
}

.caregiver-notice,
.caregiver-readonly-note {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: var(--muted);
  line-height: 1.4;
}

.caregiver-notice.error {
  border-color: #f3b4ae;
  background: #fff2f0;
  color: var(--red);
}

.caregiver-notice.success {
  border-color: #a5d8bd;
  background: #f0fbf4;
  color: #176343;
}

.caregiver-section-heading,
.caregiver-detail-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.caregiver-section-heading h2,
.caregiver-detail-section-heading h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: 0;
}

.caregiver-count {
  display: inline-grid;
  min-width: 32px;
  min-height: 32px;
  padding: 0 8px;
  place-items: center;
  border-radius: 999px;
  background: #dcefe6;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.caregiver-visit-list {
  display: grid;
  gap: 12px;
}

.caregiver-visit-card {
  display: block;
  padding: 17px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 10px;
  background: white;
  box-shadow: 0 6px 18px rgba(24, 33, 47, 0.04);
  text-decoration: none;
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.caregiver-visit-card:hover,
.caregiver-visit-card:focus-visible {
  border-color: #8eb9a4;
  box-shadow: 0 10px 24px rgba(24, 33, 47, 0.08);
  transform: translateY(-1px);
}

.caregiver-visit-card-top,
.caregiver-visit-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.caregiver-visit-time {
  color: var(--green);
  font-size: 25px;
  font-weight: 850;
}

.caregiver-visit-card h2 {
  margin: 12px 0 5px;
  font-size: 20px;
  letter-spacing: 0;
}

.caregiver-visit-meta {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.caregiver-visit-card-bottom {
  margin-top: 16px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 750;
}

.caregiver-status-pill {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef1f3;
  color: #536271;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.caregiver-status-pill.in_progress {
  background: #fff4d6;
  color: #8b5d00;
}

.caregiver-status-pill.completed {
  background: #dff3e7;
  color: #176343;
}

.caregiver-status-pill.cancelled {
  background: #fff0ee;
  color: var(--red);
}

.caregiver-empty {
  padding: 24px 18px;
  border: 1px dashed #b7c7c0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.64);
  text-align: center;
}

.caregiver-empty.compact {
  padding: 16px;
  text-align: left;
}

.caregiver-empty strong,
.caregiver-empty h1 {
  display: block;
  margin: 0 0 7px;
}

.caregiver-empty p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.caregiver-detail-section,
.caregiver-health-section {
  margin-bottom: 14px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.caregiver-map-section {
  margin-bottom: 14px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.caregiver-map-section .caregiver-address {
  margin: 0 0 14px;
  color: #3d4b59;
  line-height: 1.5;
}

.caregiver-map-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.caregiver-map-actions .caregiver-primary-button,
.caregiver-map-actions .caregiver-secondary-button {
  width: 100%;
}

.caregiver-map-status {
  min-height: 22px;
  margin: 14px 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.caregiver-map-status.is-error {
  color: var(--red);
  font-weight: 700;
}

.caregiver-map {
  width: 100%;
  height: min(58vh, 520px);
  min-height: 340px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #e9efec;
}

.caregiver-map .leaflet-container {
  width: 100%;
  height: 100%;
  background: #e9efec;
  font: inherit;
}

.caregiver-map-attribution {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.caregiver-detail-section h2,
.caregiver-health-section h2 {
  letter-spacing: 0;
}

.caregiver-patient-summary {
  border-top: 4px solid var(--green);
}

.caregiver-address,
.caregiver-health-summary > p {
  margin: 10px 0;
  color: #3d4b59;
  line-height: 1.5;
}

.caregiver-contact-link {
  display: inline-block;
  color: var(--blue);
  font-weight: 750;
  text-decoration: none;
}

.caregiver-action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 15px;
}

.caregiver-primary-button,
.caregiver-secondary-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.caregiver-primary-button {
  width: 100%;
  background: var(--green);
  color: white;
}

.caregiver-primary-button:disabled {
  background: #aab8b2;
  cursor: not-allowed;
}

.caregiver-secondary-button {
  border-color: var(--line);
  background: #f9fbfb;
  color: var(--blue);
}

.caregiver-access-note,
.caregiver-highlight {
  margin: 15px 0 0;
  padding: 12px;
  border-left: 3px solid #e3ae32;
  background: #fff9e9;
  color: #5e4b1b;
  line-height: 1.5;
}

.caregiver-access-note strong,
.caregiver-highlight strong {
  color: #755a0e;
}

.caregiver-highlight p {
  margin: 5px 0 0;
}

.caregiver-task-list {
  display: grid;
  gap: 8px;
}

.caregiver-task-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 64px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfc;
}

.caregiver-task-row.is-done {
  border-color: #a5d8bd;
  background: #f1faf4;
}

.caregiver-task-row form {
  display: grid;
}

.caregiver-task-check {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid #aebbc4;
  border-radius: 999px;
  background: white;
  color: var(--green);
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
}

.caregiver-task-check.is-done {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.caregiver-task-check.is-disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.caregiver-task-row strong {
  display: block;
  line-height: 1.25;
}

.caregiver-task-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.caregiver-task-status {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-align: right;
}

.caregiver-visit-controls {
  margin-top: 16px;
}

.caregiver-visit-action-form {
  display: grid;
  gap: 8px;
}

.caregiver-inline-note,
.caregiver-muted {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.caregiver-completed-banner {
  padding: 13px;
  border-radius: 9px;
  background: #dff3e7;
  color: #176343;
  font-weight: 800;
  text-align: center;
}

.caregiver-health-section {
  margin-bottom: 14px;
}

.caregiver-health-list {
  display: grid;
  gap: 8px;
}

.caregiver-health-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.caregiver-health-item p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.caregiver-health-item.priority-urgent,
.caregiver-health-item.priority-high {
  border-left: 3px solid var(--red);
}

@media (max-width: 520px) {
  .caregiver-mobile-shell {
    padding: 14px 14px 32px;
  }

  .caregiver-day-navigation {
    margin-right: -14px;
    margin-left: -14px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .caregiver-header {
    gap: 8px;
  }

  .caregiver-user-name {
    display: none;
  }

  .caregiver-action-row {
    grid-template-columns: 1fr;
  }

  .caregiver-map-actions {
    grid-template-columns: 1fr;
  }

  .caregiver-map {
    height: 52vh;
    min-height: 300px;
  }

  .caregiver-task-row {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .caregiver-task-status {
    grid-column: 2;
    text-align: left;
  }
}

.reports-shell {
  max-width: 1680px;
}

.report-toolbar {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.report-filter-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.report-filter-form label {
  display: grid;
  gap: 6px;
  color: #344253;
  font-size: 13px;
  font-weight: 700;
}

.report-filter-form input,
.report-filter-form select {
  min-width: 0;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #c8d0d8;
  border-radius: 8px;
  background: white;
  color: var(--ink);
}

.report-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.report-filter-button {
  min-height: 42px;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.report-export {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.report-export-bottom {
  margin-top: 16px;
}

.report-export span {
  color: var(--muted);
  font-size: 13px;
}

.report-summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--muted);
}

.report-summary strong {
  color: var(--ink);
  font-size: 24px;
}

.report-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.report-table-wrap.table-scroll {
  display: block;
  overflow-y: auto;
}

.table-region > .report-table-wrap.table-scroll {
  border: 0;
  border-radius: 0;
}

.report-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  text-align: left;
}

.report-table th,
.report-table td {
  padding: 13px 14px;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

.report-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  border-top: 0;
  background: #f7f9fa;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  white-space: nowrap;
}

.report-sort-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
}

.report-sort-link:hover {
  color: var(--blue);
}

.report-sort-indicator {
  color: var(--blue);
  font-size: 15px;
  line-height: 1;
}

.report-table tbody tr:hover {
  background: #f9fbfb;
}

.report-table td small {
  display: block;
  max-width: 230px;
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.35;
}

.report-status-pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef1f3;
  color: #536271;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.report-status-pill.completed {
  background: #dff3e7;
  color: #176343;
}

.report-status-pill.in_progress {
  background: #fff4d6;
  color: #8b5d00;
}

@media (max-width: 1100px) {
  .report-filter-form {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .report-filter-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .report-filter-form {
    grid-template-columns: 1fr;
  }

  .report-filter-actions {
    grid-column: auto;
  }

  .report-filter-actions .primary-link,
  .report-filter-actions .secondary-link {
    flex: 1 1 0;
    justify-content: center;
  }

  .report-export {
    align-items: stretch;
    flex-direction: column;
  }

  .report-export .primary-link {
    width: 100%;
  }
}
