:root {
  --canvas: #f3f1eb;
  --paper: #fbfaf6;
  --paper-strong: #ffffff;
  --ink: #172522;
  --muted: #687570;
  --line: #dfe3dc;
  --line-strong: #c8d0c8;
  --forest: #163b36;
  --forest-2: #20544c;
  --mint: #d9ebe3;
  --mint-strong: #b9ddcf;
  --amber: #b96f2b;
  --amber-soft: #faead9;
  --rose: #a94b51;
  --rose-soft: #f7e3e3;
  --blue: #456c86;
  --blue-soft: #e2edf3;
  --shadow: 0 18px 50px rgba(31, 45, 40, 0.08);
  --radius: 18px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--canvas);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 73% -10%, rgba(185, 221, 207, 0.34), transparent 31rem),
    var(--canvas);
  color: var(--ink);
  font-family: Inter, Aptos, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

body.app-loading .app-shell,
body.app-loading .mobile-nav {
  visibility: hidden;
}

body.is-locked {
  overflow: hidden;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow-y: auto;
  background:
    radial-gradient(circle at 70% 10%, rgba(185, 221, 207, 0.42), transparent 30rem),
    var(--canvas);
  padding: 24px;
}

.login-card {
  width: min(430px, 100%);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.93);
  padding: clamp(25px, 6vw, 38px);
  box-shadow: 0 28px 80px rgba(22, 59, 54, 0.17);
}

.login-card > img {
  width: 58px;
  height: 58px;
  margin-bottom: 22px;
}

.login-card h1 {
  margin-bottom: 10px;
}

.login-card > p:not(.eyebrow) {
  margin-bottom: 23px;
  color: var(--muted);
}

.login-card form {
  display: grid;
  gap: 9px;
}

.login-card label {
  margin-top: 5px;
  font-size: 12px;
  font-weight: 750;
}

.login-card input {
  min-height: 45px;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fdfdfb;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}

.login-card input:focus {
  border-color: var(--forest-2);
  box-shadow: 0 0 0 3px rgba(32, 84, 76, 0.11);
}

.login-card .button {
  margin-top: 10px;
}

.login-card > small {
  display: block;
  margin-top: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.login-error {
  min-height: 20px;
  margin-bottom: 0;
  color: var(--rose);
  font-size: 12px;
}

button,
textarea,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 246px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 24px 18px;
  background: var(--forest);
  color: #f4f8f5;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 27px;
}

.brand img {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.18));
}

.brand div {
  display: grid;
}

.brand strong {
  font-size: 12px;
  letter-spacing: 0.18em;
}

.brand span {
  color: #bfd4cc;
  font-size: 14px;
}

.nav-list {
  display: grid;
  gap: 5px;
}

.nav-item {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #b9cdc6;
  padding: 0 12px;
  text-align: left;
  cursor: pointer;
}

.nav-item:hover,
.nav-item.is-active {
  background: rgba(255, 255, 255, 0.11);
  color: white;
}

.nav-item > span:first-child {
  font-size: 20px;
  text-align: center;
}

.nav-item b {
  min-width: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  padding: 2px 7px;
  font-size: 12px;
  text-align: center;
}

.sidebar-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
  padding: 19px 8px 4px;
}

.sidebar-status div {
  display: grid;
}

.sidebar-status strong {
  font-size: 13px;
}

.sidebar-status small {
  color: #9db9b0;
}

.status-light {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d4a95c;
  box-shadow: 0 0 0 4px rgba(212, 169, 92, 0.15);
}

.workspace {
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 88px;
  padding: 18px clamp(20px, 3vw, 42px);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(27px, 4vw, 37px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.06;
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
  line-height: 1.25;
}

h3 {
  margin-bottom: 8px;
  font-size: 15px;
}

.eyebrow {
  margin-bottom: 5px;
  color: var(--forest-2);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.connectivity {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.connectivity i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
}

.connectivity.is-offline i {
  background: var(--rose);
}

.avatar {
  width: 42px;
  height: 42px;
  border: 1px solid #b7cbc3;
  border-radius: 50%;
  background: var(--mint);
  color: var(--forest);
  font-size: 13px;
  font-weight: 800;
}

.demo-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 clamp(20px, 3vw, 42px) 20px;
  border: 1px solid #ead7b7;
  border-radius: 12px;
  background: #fff6e6;
  color: #754c20;
  padding: 10px 14px;
  font-size: 13px;
}

main {
  padding: 0 clamp(20px, 3vw, 42px) 48px;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.66);
  padding: 15px;
}

.metric-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.metric-card strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  font-weight: 500;
}

.metric-card.is-alert {
  border-color: #e7c7a5;
  background: var(--amber-soft);
}

.message-workspace {
  display: grid;
  grid-template-columns: minmax(290px, 0.72fr) minmax(450px, 1.28fr);
  min-height: 650px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.queue-panel {
  min-width: 0;
  border-right: 1px solid var(--line);
  background: #f8f7f2;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 21px 20px 14px;
}

.panel-heading h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 500;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper-strong);
  cursor: pointer;
}

.filter-row {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 0 20px 14px;
}

.filter-chip {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.filter-chip.is-active {
  border-color: var(--forest);
  background: var(--forest);
  color: white;
}

.message-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.message-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 11px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 16px 18px;
  text-align: left;
  cursor: pointer;
}

.message-row:hover,
.message-row.is-selected {
  background: var(--paper-strong);
}

.message-row.is-selected {
  box-shadow: inset 3px 0 var(--forest-2);
}

.patient-initials {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--mint);
  color: var(--forest);
  font-weight: 800;
}

.message-row-main {
  min-width: 0;
}

.message-row-heading,
.message-row-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.message-row-heading strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-row-heading time,
.message-row-meta {
  color: var(--muted);
  font-size: 11px;
}

.message-preview {
  display: -webkit-box;
  overflow: hidden;
  margin: 4px 0 7px;
  color: #45534f;
  font-size: 13px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.status-pill.needs_input {
  background: var(--amber-soft);
  color: #87531f;
}

.status-pill.ready_to_send {
  background: var(--mint);
  color: var(--forest-2);
}

.status-pill.sent_pending_sync {
  background: #eee7f8;
  color: #694d8c;
}

.detail-panel {
  min-width: 0;
  background: var(--paper-strong);
}

.detail-content {
  display: grid;
  gap: 0;
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 22px 24px;
}

.detail-header h2 {
  margin-bottom: 3px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 500;
}

.detail-header p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.detail-section {
  border-bottom: 1px solid var(--line);
  padding: 21px 24px;
}

.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.section-label h3 {
  margin-bottom: 0;
}

.section-label span {
  color: var(--muted);
  font-size: 11px;
}

.client-message {
  margin-bottom: 0;
  border-left: 3px solid var(--mint-strong);
  background: #f6f8f4;
  padding: 13px 15px;
  white-space: pre-wrap;
}

.tag-list,
.evidence-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag-list li,
.evidence-list li {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  padding: 7px 9px;
  color: #475650;
  font-size: 12px;
}

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

.question-card {
  display: grid;
  gap: 6px;
}

.question-card label {
  font-size: 13px;
  font-weight: 700;
}

.question-card label span {
  color: var(--rose);
}

textarea,
input[type="text"] {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fdfdfb;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}

textarea:focus,
input[type="text"]:focus {
  border-color: var(--forest-2);
  box-shadow: 0 0 0 3px rgba(32, 84, 76, 0.11);
}

.doctor-input {
  min-height: 80px;
  resize: vertical;
}

.reply-editor {
  min-height: 230px;
  resize: vertical;
  line-height: 1.52;
}

.detail-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  padding: 15px 24px;
  backdrop-filter: blur(12px);
}

.button {
  min-height: 42px;
  border-radius: 11px;
  padding: 0 15px;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.button-primary {
  border: 1px solid var(--forest);
  background: var(--forest);
  color: white;
}

.button-primary:hover:not(:disabled) {
  background: var(--forest-2);
}

.button-secondary {
  border: 1px solid var(--line-strong);
  background: white;
  color: var(--forest);
}

.button-handoff {
  margin-left: auto;
  border: 1px solid var(--forest-2);
  background: var(--mint);
  color: var(--forest);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 620px;
  padding: 35px;
  text-align: center;
}

.empty-state p {
  max-width: 290px;
  color: var(--muted);
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 13px;
  border-radius: 19px;
  background: var(--mint);
  color: var(--forest);
  font-size: 28px;
}

.section-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.section-intro h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 500;
}

.section-intro > p {
  max-width: 520px;
  margin-bottom: 0;
  color: var(--muted);
}

.appointment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.appointment-card,
.followup-item,
.health-card,
.security-card,
.operations-card,
.architecture-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-strong);
  box-shadow: var(--shadow);
}

.security-card {
  margin-top: 16px;
  padding: 22px;
}

.operations-card {
  margin-top: 16px;
  padding: 22px;
}

.operations-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.operations-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.operations-columns h4 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.activity-item,
.activity-empty {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8f8f4;
  padding: 11px 13px;
}

.activity-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
}

.activity-item strong,
.activity-item small {
  overflow-wrap: anywhere;
}

.activity-item small,
.activity-empty {
  color: var(--muted);
}

.activity-item small {
  grid-column: 1 / -1;
}

.security-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.security-summary {
  margin: 8px 0 16px;
  color: var(--muted);
}

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

.device-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8f8f4;
  padding: 11px 13px;
}

.device-item > div {
  flex: 1;
  min-width: 0;
}

.device-item strong,
.device-item small {
  display: block;
}

.device-item small {
  color: var(--muted);
}

.device-item.is-revoked {
  opacity: 0.58;
}

.device-item button {
  min-height: 34px;
  border: 1px solid #e1bfc1;
  border-radius: 9px;
  background: var(--rose-soft);
  color: var(--rose);
  padding: 0 10px;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.appointment-card {
  overflow: hidden;
}

.appointment-card-header {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid var(--line);
  background: #f7f7f2;
  padding: 18px 20px;
}

.appointment-time {
  color: var(--forest-2);
  font-weight: 800;
}

.appointment-card-body {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.appointment-card-body section p,
.appointment-card-body section ul {
  margin-bottom: 0;
  color: #4e5c57;
}

.problem-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 7px 0;
}

.problem-row:last-child {
  border-bottom: 0;
}

.problem-row span:last-child {
  color: var(--forest-2);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.compact-list {
  margin: 0;
  padding-left: 18px;
}

.compact-list li + li {
  margin-top: 6px;
}

.followup-list {
  display: grid;
  gap: 10px;
}

.followup-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px 19px;
}

.followup-marker {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--amber);
}

.followup-item div:nth-child(2) {
  flex: 1;
}

.followup-item p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
}

.health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 12px;
}

.health-card {
  padding: 18px;
}

.health-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.health-card strong {
  display: block;
  margin: 7px 0 4px;
  font-size: 17px;
}

.health-card small {
  color: var(--amber);
}

.architecture-card {
  margin-top: 16px;
  padding: 22px;
}

.architecture-card p:last-child {
  max-width: 820px;
  margin-bottom: 0;
  color: var(--muted);
}

.mobile-nav {
  display: none;
}

.handoff-dialog {
  width: min(460px, calc(100vw - 30px));
  border: 0;
  border-radius: 20px;
  background: white;
  color: var(--ink);
  padding: 0;
  box-shadow: 0 30px 80px rgba(22, 59, 54, 0.28);
}

.handoff-dialog::backdrop {
  background: rgba(12, 30, 27, 0.62);
  backdrop-filter: blur(3px);
}

.handoff-dialog form {
  padding: 25px;
}

.dialog-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 17px;
  border-radius: 15px;
  background: var(--mint);
  color: var(--forest);
  font-size: 24px;
}

.handoff-dialog h2 {
  margin-bottom: 9px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 500;
}

.handoff-dialog > p,
.handoff-dialog form > p:not(.eyebrow) {
  color: var(--muted);
}

.confirmation-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7f8f4;
  padding: 12px;
}

.confirmation-check input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--forest);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  max-width: 360px;
  border-radius: 12px;
  background: var(--forest);
  color: white;
  padding: 11px 15px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .brand {
    justify-content: center;
    padding-inline: 0;
  }

  .brand div,
  .nav-item span:nth-child(2),
  .sidebar-status div {
    display: none;
  }

  .nav-item {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0;
  }

  .nav-item b {
    position: absolute;
    margin: -25px 0 0 26px;
  }

  .sidebar-status {
    justify-content: center;
  }

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

  .message-workspace {
    grid-template-columns: minmax(260px, 0.7fr) minmax(400px, 1.3fr);
  }
}

@media (max-width: 760px) {
  body {
    padding-bottom: calc(72px + var(--safe-bottom));
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .topbar {
    min-height: 78px;
    padding: 14px 17px;
  }

  .topbar .eyebrow,
  .connectivity,
  .install-button {
    display: none;
  }

  h1 {
    font-size: 28px;
  }

  .demo-banner {
    align-items: flex-start;
    flex-direction: column;
    gap: 1px;
    margin: 0 13px 12px;
    padding: 9px 11px;
    font-size: 11px;
  }

  main {
    padding: 0 12px 24px;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .metric-card {
    padding: 12px;
  }

  .metric-card strong {
    font-size: 23px;
  }

  .message-workspace {
    display: block;
    min-height: 0;
    overflow: visible;
    border-radius: 15px;
  }

  .queue-panel {
    border-right: 0;
  }

  .panel-heading {
    padding: 17px 15px 12px;
  }

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

  .filter-row {
    padding: 0 15px 12px;
  }

  .message-row {
    padding: 14px;
  }

  .detail-panel {
    display: none;
    position: fixed;
    inset: 0 0 calc(64px + var(--safe-bottom)) 0;
    z-index: 9;
    overflow-y: auto;
    background: var(--paper-strong);
  }

  .detail-panel.is-mobile-open {
    display: block;
  }

  .detail-header {
    position: sticky;
    top: 0;
    z-index: 3;
    align-items: center;
    background: rgba(255, 255, 255, 0.96);
    padding: 14px 15px;
    backdrop-filter: blur(12px);
  }

  .detail-header h2 {
    font-size: 22px;
  }

  .mobile-back {
    display: grid !important;
  }

  .detail-section {
    padding: 18px 15px;
  }

  .reply-editor {
    min-height: 270px;
  }

  .detail-actions {
    bottom: 0;
    padding: 12px 15px calc(12px + var(--safe-bottom));
  }

  .detail-actions .button {
    flex: 1 1 calc(50% - 5px);
  }

  .detail-actions .button-handoff {
    flex-basis: 100%;
    margin-left: 0;
  }

  .mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    min-height: calc(64px + var(--safe-bottom));
    border-top: 1px solid var(--line);
    background: rgba(251, 250, 246, 0.96);
    padding-bottom: var(--safe-bottom);
    backdrop-filter: blur(14px);
  }

  .mobile-nav button {
    display: grid;
    place-content: center;
    gap: 1px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
  }

  .mobile-nav button span {
    font-size: 20px;
  }

  .mobile-nav button.is-active {
    color: var(--forest);
  }

  .section-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .appointment-grid,
  .health-grid,
  .operations-columns {
    grid-template-columns: 1fr;
  }

  .operations-heading {
    align-items: flex-start;
  }

  .appointment-card-header {
    padding: 15px;
  }

  .appointment-card-body {
    padding: 17px;
  }

  .toast {
    right: 12px;
    bottom: calc(76px + var(--safe-bottom));
    left: 12px;
    max-width: none;
  }
}

@media (min-width: 761px) {
  .mobile-back {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
