/* =========================================================
   MediAlert · design system and application shell
   ========================================================= */
:root {
  --font-sans: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --navy-950: #07142b;
  --navy-900: #0b1a34;
  --navy-850: #10213f;
  --navy-800: #152947;
  --navy-700: #1d365b;
  --blue-800: #173da6;
  --blue-700: #1d4ed8;
  --blue-600: #2459df;
  --blue-500: #4b7cf3;
  --blue-300: #9db8ff;
  --blue-100: #dce7ff;
  --blue-50: #eef4ff;
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-muted: #f4f7fb;
  --text: #0d1b34;
  --text-secondary: #34435c;
  --muted: #68758b;
  --subtle: #8b97aa;
  --line: #e6ebf3;
  --line-strong: #d8e0eb;
  --red-700: #b42318;
  --red-600: #d92d20;
  --red-100: #fee4e2;
  --red-50: #fef3f2;
  --yellow-700: #b54708;
  --yellow-600: #f79009;
  --yellow-100: #fef0c7;
  --yellow-50: #fffaeb;
  --green-700: #067647;
  --green-600: #12b76a;
  --green-100: #d1fadf;
  --green-50: #ecfdf3;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 5px 16px rgba(16, 24, 40, 0.035);
  --shadow-md: 0 8px 32px rgba(13, 27, 52, 0.09);
  --shadow-lg: 0 24px 70px rgba(8, 19, 40, 0.2);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --sidebar-width: 264px;
  --topbar-height: 76px;
  --transition: 160ms ease;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  font-feature-settings: "cv05" 1, "cv08" 1, "ss01" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.has-overlay,
body.sidebar-open {
  overflow: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

h1,
h2,
h3,
h4,
p,
dl,
dd,
dt,
ul,
ol {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

::selection {
  color: #fff;
  background: var(--blue-600);
}

:focus-visible {
  outline: 2px solid var(--blue-600);
  outline-offset: 2px;
}

.app-shell {
  min-height: 100vh;
}

.app-main {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  background:
    radial-gradient(900px 380px at 92% -140px, rgba(36, 89, 223, 0.07), transparent 65%),
    radial-gradient(600px 300px at 15% -180px, rgba(157, 184, 255, 0.12), transparent 70%),
    var(--bg);
}

.view {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 28px 32px 48px;
  outline: none;
}

/* ============ Sidebar ============ */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  padding: 22px 15px 15px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(420px 420px at -90px -110px, rgba(60, 115, 243, 0.33), transparent 64%),
    radial-gradient(300px 300px at 100% 105%, rgba(32, 83, 188, 0.2), transparent 70%),
    linear-gradient(180deg, #0c1b36 0%, #09172f 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar::after {
  position: absolute;
  right: 0;
  top: 0;
  width: 1px;
  height: 100%;
  content: "";
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 35%, rgba(255, 255, 255, 0.04));
  pointer-events: none;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px 20px;
}

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

.brand-mark {
  display: grid;
  flex: none;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #326bf3 0%, #1945bc 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(11, 48, 141, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.brand__copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand__copy strong {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.35px;
  line-height: 1.1;
}

.brand__copy small {
  margin-top: 4px;
  color: rgba(208, 221, 244, 0.56);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar__close {
  display: none;
}

.facility-context {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 2px 22px;
  padding: 10px 11px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 11px;
}

.facility-context__icon {
  display: grid;
  flex: none;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #a8c2fa;
  background: rgba(76, 125, 244, 0.17);
  border-radius: 8px;
}

.facility-context__copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.facility-context__copy strong {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.91);
  font-size: 11.5px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.facility-context__copy small {
  margin-top: 2px;
  overflow: hidden;
  color: rgba(204, 220, 248, 0.46);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-tag {
  flex: none;
  padding: 3px 5px;
  color: #bcd2ff;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.09em;
  background: rgba(72, 127, 255, 0.18);
  border: 1px solid rgba(111, 158, 255, 0.22);
  border-radius: 4px;
}

.sidebar-nav {
  flex: 1;
  min-height: 0;
  padding: 0 2px;
  overflow-y: auto;
  scrollbar-width: none;
}

.sidebar-nav::-webkit-scrollbar {
  display: none;
}

.nav-group + .nav-group {
  margin-top: 24px;
}

.nav-group--system {
  margin-top: 24px;
  padding-top: 19px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.nav-group__label {
  display: block;
  padding: 0 10px 8px;
  color: rgba(187, 205, 238, 0.37);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 41px;
  gap: 10px;
  padding: 0 10px;
  color: rgba(225, 234, 250, 0.68);
  font-size: 12.5px;
  font-weight: 550;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.nav-item + .nav-item {
  margin-top: 2px;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-item.is-active {
  color: #fff;
  background: linear-gradient(90deg, rgba(53, 106, 231, 0.3), rgba(53, 106, 231, 0.11));
  border-color: rgba(103, 153, 255, 0.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.nav-item.is-active::before {
  position: absolute;
  left: -3px;
  top: 11px;
  width: 3px;
  height: 19px;
  content: "";
  background: #6f9aff;
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 12px rgba(111, 154, 255, 0.7);
}

.nav-item__icon {
  display: grid;
  flex: none;
  width: 21px;
  place-items: center;
  color: rgba(189, 210, 249, 0.58);
}

.nav-item.is-active .nav-item__icon {
  color: #a9c4ff;
}

.nav-item > span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  margin-left: auto;
  padding: 0 5px;
  color: #dfe8fc;
  font-size: 9.5px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

.nav-badge--blue {
  color: #dce8ff;
  background: rgba(77, 127, 245, 0.28);
}

.nav-badge--alert {
  color: #fff;
  background: var(--red-600);
}

.nav-role-label {
  max-width: 78px;
  margin-left: auto;
  overflow: hidden;
  color: rgba(189, 208, 240, 0.42);
  font-size: 8.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar__bottom {
  padding: 16px 2px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.065);
}

.sidebar-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px 11px;
}

.sidebar-status__dot {
  position: relative;
  flex: none;
  width: 7px;
  height: 7px;
  background: #67d7b3;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(87, 204, 166, 0.1);
}

.sidebar-status.is-offline .sidebar-status__dot {
  background: #f4b740;
  box-shadow: 0 0 0 3px rgba(244, 183, 64, 0.12);
}

.sidebar-status.is-offline strong {
  color: rgba(255, 220, 160, 0.72);
}

.sidebar-status span:last-child {
  display: flex;
  flex-direction: column;
}

.sidebar-status strong {
  color: rgba(218, 231, 250, 0.62);
  font-size: 9.5px;
  font-weight: 600;
}

.sidebar-status small {
  margin-top: 1px;
  color: rgba(185, 204, 234, 0.34);
  font-size: 8.5px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 9px;
  padding: 9px;
  text-align: left;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  transition: background var(--transition), border-color var(--transition);
}

.sidebar-user:hover {
  background: rgba(255, 255, 255, 0.085);
  border-color: rgba(255, 255, 255, 0.13);
}

.avatar {
  display: inline-grid;
  flex: none;
  width: 34px;
  height: 34px;
  place-items: center;
  overflow: hidden;
  color: var(--blue-700);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.01em;
  background: linear-gradient(145deg, #eff5ff, #e1eaff);
  border: 1px solid #d9e5fb;
  border-radius: 50%;
}

.avatar--sidebar {
  width: 35px;
  height: 35px;
  color: #dce8ff;
  background: linear-gradient(145deg, #315fca, #1a3a7b);
  border-color: rgba(255, 255, 255, 0.14);
}

.avatar--soft {
  color: #425371;
  background: #f1f4f9;
  border-color: #e4e9f1;
}

.avatar--sm {
  width: 29px;
  height: 29px;
  font-size: 8.5px;
}

.avatar--lg {
  width: 52px;
  height: 52px;
  font-size: 14px;
  border-radius: 15px;
}

.avatar--lg-soft {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 11px;
}

.avatar--staff {
  color: #2850a8;
  background: linear-gradient(145deg, #f4f8ff, #e8effb);
}

.sidebar-user__copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.sidebar-user__copy strong {
  overflow: hidden;
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user__copy small {
  margin-top: 2px;
  overflow: hidden;
  color: rgba(190, 209, 241, 0.43);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user > svg {
  flex: none;
  color: rgba(201, 218, 243, 0.35);
}

.sidebar-footnote {
  padding: 10px 5px 0;
  color: rgba(180, 201, 233, 0.23);
  font-size: 8px;
  line-height: 1.4;
  text-align: center;
}

.sidebar-scrim {
  display: none;
}

/* ============ Topbar ============ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar-height);
  padding: 0 32px;
  background: rgba(250, 252, 255, 0.84);
  border-bottom: 1px solid rgba(222, 229, 240, 0.8);
  backdrop-filter: blur(18px) saturate(1.3);
}

.topbar__left,
.topbar__right {
  display: flex;
  align-items: center;
}

.topbar__left {
  min-width: 0;
  gap: 12px;
}

.topbar__right {
  gap: 10px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
  color: var(--subtle);
  font-size: 11px;
  font-weight: 500;
}

.breadcrumbs svg {
  flex: none;
  color: #b6c0cf;
}

.breadcrumbs strong {
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-menu {
  display: none !important;
}

.global-search {
  display: flex;
  align-items: center;
  width: 250px;
  height: 39px;
  gap: 8px;
  padding: 0 9px 0 12px;
  color: var(--subtle);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.global-search:focus-within {
  background: #fff;
  border-color: #aac4ff;
  box-shadow: 0 0 0 3px rgba(36, 89, 223, 0.09);
}

.global-search svg {
  flex: none;
}

.global-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  color: var(--text);
  font-size: 11.5px;
  background: transparent;
  border: none;
  outline: none;
}

.global-search input::placeholder {
  color: #98a4b6;
}

.global-search kbd {
  flex: none;
  padding: 2px 5px;
  color: #8c99ab;
  font-family: var(--font-sans);
  font-size: 8.5px;
  font-weight: 600;
  background: #f4f7fb;
  border: 1px solid #e1e7f0;
  border-radius: 4px;
}

.notification-trigger {
  position: relative;
}

.notification-count {
  position: absolute;
  top: 4px;
  right: 3px;
  display: grid;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  place-items: center;
  color: #fff;
  font-size: 8.5px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  background: var(--red-600);
  border: 2px solid #f9fbfe;
  border-radius: 8px;
}

.topbar-clock {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 86px;
  padding: 0 7px 0 10px;
  border-left: 1px solid var(--line);
}

.topbar-clock strong {
  color: var(--text);
  font-size: 12.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.topbar-clock span {
  margin-top: 1px;
  color: var(--subtle);
  font-size: 9px;
  font-weight: 500;
}

.ambulance-mode {
  display: inline-flex;
  align-items: center;
  height: 32px;
  gap: 6px;
  padding: 0 10px;
  color: #30425f;
  font-size: 10.5px;
  font-weight: 600;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.ambulance-mode i {
  width: 6px;
  height: 6px;
  background: var(--blue-500);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--blue-50);
}

/* ============ Global UI ============ */
.icon-button {
  display: inline-grid;
  flex: none;
  width: 39px;
  height: 39px;
  padding: 0;
  place-items: center;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.icon-button:hover {
  color: var(--text);
  background: #fff;
  border-color: var(--line-strong);
}

.icon-button--small {
  width: 31px;
  height: 31px;
  border-radius: 8px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 39px;
  gap: 7px;
  padding: 0 15px;
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 9px;
  transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.button:active {
  transform: translateY(1px);
}

.button--primary {
  color: #fff;
  background: linear-gradient(180deg, #2b61e8 0%, #1e4fd4 100%);
  border-color: #1b49c5;
  box-shadow: 0 4px 12px rgba(30, 79, 212, 0.21), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.button--primary:hover {
  background: linear-gradient(180deg, #346bf0 0%, #2457da 100%);
  box-shadow: 0 6px 16px rgba(30, 79, 212, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.button--secondary {
  color: #33445f;
  background: #fff;
  border-color: var(--line-strong);
  box-shadow: var(--shadow-xs);
}

.button--secondary:hover {
  color: var(--text);
  background: #f9fbfe;
  border-color: #c5d1e3;
}

.button--ghost {
  color: var(--muted);
  background: transparent;
  border-color: transparent;
}

.button--ghost:hover {
  color: var(--text);
  background: #f4f7fb;
}

.button--danger {
  color: #fff;
  background: var(--red-600);
  border-color: #c92318;
}

.button--danger-ghost {
  color: var(--red-700);
  background: var(--red-50);
  border-color: #f6cbc7;
}

.button--small {
  height: 32px;
  padding: 0 11px;
  font-size: 10.5px;
  border-radius: 8px;
}

.button--large {
  height: 45px;
  padding: 0 18px;
  font-size: 12px;
}

.button--topbar {
  height: 39px;
  padding: 0 14px;
  font-size: 11px;
}

.button--full {
  width: 100%;
}

.button:disabled,
.button--disabled {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0;
  color: var(--blue-700);
  font-size: 10.5px;
  font-weight: 650;
  background: transparent;
  border: none;
}

.text-button:hover {
  color: var(--blue-800);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-button:disabled {
  color: var(--subtle);
  cursor: default;
  text-decoration: none;
}

.text-button--muted {
  color: var(--muted);
  font-weight: 550;
}

.text-button--muted:hover {
  color: var(--text);
}

.card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
}

.card-heading--wrap {
  flex-wrap: wrap;
}

.card-heading h2 {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.15px;
  line-height: 1.25;
}

.card-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.4;
}

.card-title-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 21px;
  height: 20px;
  padding: 0 6px;
  color: #53617a;
  font-size: 9.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: #f2f5fa;
  border: 1px solid #e9eef5;
  border-radius: 6px;
}

.count-badge--navy {
  color: #dbe7ff;
  background: var(--navy-800);
  border-color: var(--navy-800);
}

.card-muted {
  color: var(--subtle);
  font-size: 9.5px;
  font-weight: 500;
  white-space: nowrap;
}

.card-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 11px 20px;
  color: var(--blue-700);
  font-size: 10px;
  font-weight: 650;
  border-top: 1px solid var(--line);
}

.card-link:hover {
  color: var(--blue-800);
  background: #fbfcff;
}

.card-footer-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 20px;
  color: var(--subtle);
  font-size: 9px;
  border-top: 1px solid var(--line);
}

.card-footer-note > span,
.card-footer-note a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.card-footer-note a {
  color: var(--blue-700);
  font-weight: 600;
}

.card-footer-note a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.role-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
}

/* ============ Page header ============ */
.page {
  animation: page-in 280ms ease both;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 22px;
}

.page-heading__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.page-heading h1 {
  margin-top: 7px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(26px, 2.2vw, 31px);
  font-weight: 700;
  letter-spacing: -0.85px;
  line-height: 1.12;
}

.page-heading p {
  max-width: 690px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.page-eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 550;
}

.eyebrow-divider {
  width: 3px;
  height: 3px;
  background: #bdc6d4;
  border-radius: 50%;
}

.live-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #435471;
  font-weight: 600;
}

.live-label i {
  position: relative;
  width: 6px;
  height: 6px;
  background: #3f8cff;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(63, 140, 255, 0.1);
}

.live-label i::after {
  position: absolute;
  inset: -4px;
  content: "";
  border: 1px solid rgba(63, 140, 255, 0.28);
  border-radius: 50%;
  animation: status-pulse 2.4s ease-out infinite;
}

@keyframes status-pulse {
  0%,
  35% {
    opacity: 0.9;
    transform: scale(0.7);
  }
  80%,
  100% {
    opacity: 0;
    transform: scale(1.6);
  }
}

.live-label--small {
  padding: 4px 7px;
  color: #4b5e7b;
  font-size: 8.5px;
  font-weight: 600;
  background: #f1f6ff;
  border: 1px solid #e2ecff;
  border-radius: 5px;
}

.live-label--small i {
  width: 5px;
  height: 5px;
}

.shift-pill {
  display: flex;
  align-items: center;
  flex: none;
  gap: 9px;
  padding: 9px 13px 9px 9px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-xs);
}

.shift-pill__icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--blue-700);
  background: var(--blue-50);
  border-radius: 8px;
}

.shift-pill > span:last-child {
  display: flex;
  flex-direction: column;
}

.shift-pill strong {
  font-size: 10.5px;
  font-weight: 650;
}

.shift-pill small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 8.5px;
}

.eyebrow {
  display: block;
  color: var(--subtle);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ============ Badges / triage ============ */
.triage-badge {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 5px;
  height: 23px;
  padding: 0 8px;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 6px;
}

.triage-badge__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.triage-badge--red {
  color: var(--red-700);
  background: var(--red-50);
  border-color: #fbd8d5;
}

.triage-badge--red .triage-badge__dot {
  background: var(--red-600);
}

.triage-badge--yellow {
  color: var(--yellow-700);
  background: var(--yellow-50);
  border-color: #fbe3ad;
}

.triage-badge--yellow .triage-badge__dot {
  background: var(--yellow-600);
}

.triage-badge--green {
  color: var(--green-700);
  background: var(--green-50);
  border-color: #c6f1d8;
}

.triage-badge--green .triage-badge__dot {
  background: var(--green-600);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  color: #52617b;
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  background: #f5f7fa;
  border: 1px solid #e9edf4;
  border-radius: 6px;
}

.status-badge--blue {
  color: #2354b8;
  background: #eff5ff;
  border-color: #dfeaff;
}

.status-badge--neutral {
  color: #53627a;
  background: #f5f7fb;
  border-color: #e8edf4;
}

.status-badge--muted {
  color: #7b8799;
  background: #f6f7f9;
  border-color: #eceef2;
}

.confirmation {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #66758c;
  font-size: 8px;
  font-weight: 600;
  white-space: nowrap;
}

.confirmation--done {
  color: #536b8e;
}

.confirmation--pending {
  color: var(--yellow-700);
}

.mini-flag {
  margin-top: 3px;
  color: var(--yellow-700);
  font-size: 7.5px;
  font-weight: 600;
  white-space: nowrap;
}

.prealert-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #596984;
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
}

.prealert-status__dot {
  width: 6px;
  height: 6px;
  background: #9da9bb;
  border-radius: 50%;
}

.prealert-status--sent .prealert-status__dot {
  background: var(--yellow-600);
}

.prealert-status--received .prealert-status__dot {
  background: var(--blue-600);
}

.prealert-status--notified .prealert-status__dot {
  background: var(--green-600);
}

.prealert-status--arrived .prealert-status__dot {
  background: #98a4b5;
}

.prealert-status--sent {
  color: var(--yellow-700);
}

.prealert-status--received {
  color: var(--blue-700);
}

.prealert-status--notified {
  color: var(--green-700);
}

/* ============ Progress, avatars, misc ============ */
.progress {
  display: block;
  width: 100%;
  height: 5px;
  overflow: hidden;
  background: #edf1f7;
  border-radius: 99px;
}

.progress > span,
.progress > i {
  display: block;
  height: 100%;
  background: var(--blue-600);
  border-radius: inherit;
  transition: width 300ms ease;
}

.progress--blue > span,
.progress--blue > i {
  background: linear-gradient(90deg, #3f76f2, #2459df);
}

.team-avatar {
  display: inline-grid;
  flex: none;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #3b5680;
  font-size: 7.5px;
  font-weight: 750;
  background: #f0f4fa;
  border: 1px solid #e3e9f2;
  border-radius: 50%;
}

.team-names {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.team-names strong {
  overflow: hidden;
  color: #37465d;
  font-size: 9.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-names small {
  overflow: hidden;
  margin-top: 1px;
  color: var(--subtle);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-unassigned {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #8b6b38;
  font-size: 8.5px;
  font-weight: 600;
}

.muted-copy {
  color: var(--muted) !important;
  font-size: 10px !important;
}

.inline-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  color: #5a6a83;
  font-size: 9.5px;
  line-height: 1.45;
  background: #f6f9fd;
  border: 1px solid #e8eef6;
  border-radius: 8px;
}

.inline-notice svg {
  flex: none;
  margin-top: 1px;
  color: #6d82a2;
}

.compact-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 26px 16px;
  color: var(--muted);
  font-size: 10.5px;
  text-align: center;
}

.compact-empty svg {
  color: #a7b3c3;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 44px 26px;
  text-align: center;
}

.empty-state__icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 12px;
  place-items: center;
  color: #7085a5;
  background: #f3f7fd;
  border: 1px solid #e6edf7;
  border-radius: 13px;
}

.empty-state h3 {
  font-size: 13px;
  font-weight: 650;
}

.empty-state p {
  max-width: 320px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.empty-state .button {
  margin-top: 13px;
}

.empty-state--wide {
  grid-column: 1 / -1;
  min-height: 260px;
  justify-content: center;
}

/* ============ Dashboard ============ */
.dashboard-page .page-heading {
  margin-bottom: 18px;
}

.critical-banner {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 70px;
  margin-bottom: 16px;
  padding: 12px 15px;
  background:
    linear-gradient(90deg, rgba(217, 45, 32, 0.045), transparent 58%),
    #fff;
  border: 1px solid #f3d2cf;
  border-left: 3px solid var(--red-600);
  border-radius: 13px;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.critical-banner:hover {
  border-color: #edb8b3;
  box-shadow: 0 6px 18px rgba(180, 35, 24, 0.07);
}

.critical-banner__icon {
  display: grid;
  flex: none;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--red-700);
  background: var(--red-50);
  border: 1px solid #fad6d3;
  border-radius: 10px;
}

.critical-banner__copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.critical-banner__eyebrow {
  margin-bottom: 2px;
  color: var(--red-700);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.critical-banner__copy strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.critical-banner__copy > span:last-child {
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.critical-banner__meta {
  display: flex;
  align-items: center;
  flex: none;
  gap: 15px;
}

.critical-attention {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  color: var(--red-700);
  font-size: 8.5px;
  font-weight: 650;
  background: var(--red-50);
  border-radius: 5px;
}

.critical-banner__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #32425b;
  font-size: 9.5px;
  font-weight: 650;
  white-space: nowrap;
}

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

.stat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 130px;
  padding: 15px 16px 13px;
  overflow: hidden;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.stat-card:hover {
  border-color: #d5dfec;
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.055);
  transform: translateY(-1px);
}

.stat-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  content: "";
  background: transparent;
}

.stat-card--critical::before {
  background: linear-gradient(90deg, var(--red-600), transparent 60%);
}

.stat-card--attention::before {
  background: linear-gradient(90deg, var(--yellow-600), transparent 60%);
}

.stat-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stat-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #355382;
  background: #f2f6fc;
  border: 1px solid #e7eef8;
  border-radius: 9px;
}

.stat-card--critical .stat-icon {
  color: var(--red-700);
  background: var(--red-50);
  border-color: #f9d8d5;
}

.stat-card--attention .stat-icon {
  color: var(--yellow-700);
  background: var(--yellow-50);
  border-color: #f9e5b7;
}

.stat-badge {
  padding: 3px 6px;
  color: #5b6c85;
  font-size: 7.5px;
  font-weight: 650;
  background: #f5f8fc;
  border: 1px solid #e9eef5;
  border-radius: 4px;
}

.stat-card__value {
  margin-top: 9px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
  line-height: 1;
}

.stat-card__value small {
  color: #71809a;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.stat-card__label {
  margin-top: 3px;
  color: #45546c;
  font-size: 10.5px;
  font-weight: 600;
}

.stat-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.3;
}

.stat-card__foot > span:first-child {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 3px;
}

.stat-link {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 1px;
  color: #687c9d;
  font-weight: 600;
}

.stat-alert {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 3px;
  color: var(--red-700);
  font-weight: 600;
}

.capacity-mini {
  width: 47px;
  height: 4px;
  overflow: hidden;
  background: #edf1f7;
  border-radius: 99px;
}

.capacity-mini i {
  display: block;
  height: 100%;
  background: var(--blue-600);
  border-radius: inherit;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.78fr) minmax(315px, 0.82fr);
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

.patients-card {
  overflow: hidden;
}

.card-heading--table {
  align-items: center;
  padding-bottom: 12px;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px 12px;
}

.filter-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 3px;
  background: #f4f7fb;
  border: 1px solid #eef2f8;
  border-radius: 9px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  height: 27px;
  gap: 5px;
  padding: 0 9px;
  color: #657289;
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.filter-chip:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.65);
}

.filter-chip.is-active {
  color: #2d3f5b;
  background: #fff;
  border-color: #e5ebf3;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.07);
}

.filter-chip span {
  color: #9aa5b6;
  font-size: 8.5px;
  font-variant-numeric: tabular-nums;
}

.filter-chip i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.filter-chip--red i {
  background: var(--red-600);
}

.filter-chip--yellow i {
  background: var(--yellow-600);
}

.filter-chip--green i {
  background: var(--green-600);
}

.filter-chip--pending svg {
  color: #8b6b38;
}

.filter-chip--pending.is-active {
  color: var(--yellow-700);
  background: var(--yellow-50);
  border-color: #f7e2af;
  box-shadow: none;
}

.filter-chips--small {
  padding: 2px;
}

.filter-chips--small .filter-chip {
  height: 25px;
  font-size: 9px;
}

.table-search {
  display: flex;
  align-items: center;
  width: 185px;
  height: 32px;
  flex: none;
  gap: 5px;
  padding: 0 9px;
  color: #8491a5;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.table-search:focus-within {
  border-color: #b3c8f8;
  box-shadow: 0 0 0 3px rgba(36, 89, 223, 0.07);
}

.table-search input {
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0;
  color: var(--text);
  font-size: 9.5px;
  background: transparent;
  border: 0;
  outline: 0;
}

.table-search input::placeholder {
  color: #9aa6b7;
}

.patient-table {
  border-top: 1px solid var(--line);
}

.patient-table__head,
.patient-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.45fr) 88px 112px 84px minmax(130px, 1.05fr) 24px;
  align-items: center;
  column-gap: 10px;
}

.patient-table__head {
  min-height: 31px;
  padding: 0 20px;
  color: #8b96a8;
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: #f9fbfd;
  border-bottom: 1px solid var(--line);
}

.patient-table__body {
  max-height: 355px;
  overflow-y: auto;
  scrollbar-color: #d6dfeb transparent;
  scrollbar-width: thin;
}

.patient-table__body::-webkit-scrollbar {
  width: 5px;
}

.patient-table__body::-webkit-scrollbar-thumb {
  background: #d6dfeb;
  border-radius: 99px;
}

.patient-row {
  position: relative;
  min-height: 58px;
  padding: 8px 20px;
  cursor: pointer;
  border-bottom: 1px solid #eff3f8;
  transition: background var(--transition);
}

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

.patient-row:hover {
  background: #fbfcff;
}

.patient-row:focus-visible {
  z-index: 1;
  outline: 2px solid var(--blue-500);
  outline-offset: -2px;
}

.patient-cell {
  display: flex;
  align-items: center;
  min-width: 0;
}

.patient-cell--person {
  gap: 9px;
}

.patient-cell__copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.patient-cell__copy > strong {
  overflow: hidden;
  color: #17263f;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: -0.05px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.patient-cell__copy > span {
  margin-top: 2px;
  overflow: hidden;
  color: #8994a5;
  font-size: 8px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.patient-cell__copy i {
  padding: 0 2px;
  font-style: normal;
  color: #bdc5d1;
}

.patient-arrival-mobile {
  display: none;
}

.patient-cell--priority {
  flex-direction: column;
  align-items: flex-start;
}

.patient-cell--status {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.patient-cell--time {
  flex-direction: column;
  align-items: flex-start;
}

.patient-cell--time strong {
  color: #40506a;
  font-size: 9.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.patient-cell--time span {
  margin-top: 1px;
  color: var(--subtle);
  font-size: 8px;
}

.patient-cell--team {
  gap: 6px;
}

.patient-row__chevron {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #aeb8c6;
  opacity: 0;
  transition: opacity var(--transition), color var(--transition);
}

.patient-row:hover .patient-row__chevron {
  color: var(--blue-600);
  opacity: 1;
}

.table-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 34px 20px;
  color: var(--muted);
  text-align: center;
}

.table-empty svg {
  margin-bottom: 8px;
  color: #a9b5c5;
}

.table-empty strong {
  font-size: 11px;
  font-weight: 650;
}

.table-empty span {
  margin-top: 3px;
  color: var(--subtle);
  font-size: 9px;
}

.dashboard-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.incoming-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 14px 10px;
}

.incoming-item {
  padding: 11px;
  background: #f9fbfe;
  border: 1px solid #eaf0f7;
  border-radius: 10px;
}

.incoming-item--red {
  background: linear-gradient(180deg, #fffafa, #fff 85%);
  border-color: #f5ddda;
}

.incoming-item__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.ambulance-id {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #4a5e7d;
  font-size: 8px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.eta-badge {
  padding: 3px 6px;
  color: #5b6d89;
  font-size: 7.5px;
  font-weight: 650;
  background: #f0f4fa;
  border-radius: 4px;
  white-space: nowrap;
}

.incoming-item--red .eta-badge {
  color: var(--red-700);
  background: var(--red-50);
}

.incoming-item__person {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}

.incoming-item__person > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.incoming-item__person strong {
  color: #1d2d46;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
}

.incoming-item__person span {
  margin-top: 2px;
  overflow: hidden;
  color: #7c889a;
  font-size: 8.5px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-vitals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 7px;
}

.mini-vitals > span {
  display: flex;
  flex-direction: column;
  padding: 5px 7px;
  background: #fff;
  border: 1px solid #ebf0f6;
  border-radius: 5px;
}

.mini-vitals small {
  color: #9aa5b6;
  font-size: 7px;
}

.mini-vitals strong {
  margin-top: 1px;
  color: #3b4e69;
  font-size: 9px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.mini-vitals .is-critical strong {
  color: var(--red-700);
}

.incoming-item__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 8px;
}

.incoming-item__actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.incoming-item__actions .button {
  height: 26px;
  padding: 0 8px;
  font-size: 8.5px;
  border-radius: 6px;
}

.incoming-item__actions .text-button {
  font-size: 8.5px;
}

.staff-load-card .card-heading {
  padding-bottom: 8px;
}

.staff-load-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 2px 20px 13px;
}

.staff-load-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.staff-load-avatar {
  display: grid;
  flex: none;
  width: 27px;
  height: 27px;
  place-items: center;
  color: #3c5d92;
  font-size: 7.5px;
  font-weight: 700;
  background: #f0f5fc;
  border: 1px solid #e3ebf7;
  border-radius: 50%;
}

.staff-load-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.staff-load-copy > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}

.staff-load-copy strong {
  overflow: hidden;
  color: #36465f;
  font-size: 9px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-load-copy span {
  flex: none;
  color: #8793a5;
  font-size: 7.5px;
}

.staff-load-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 20px;
  color: #7f8b9e;
  font-size: 8px;
  border-top: 1px solid var(--line);
}

.staff-load-footer span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.dashboard-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr);
  gap: 16px;
  margin-top: 16px;
}

.activity-list {
  padding: 0 20px 6px;
}

.activity-row {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  gap: 9px;
  padding: 9px 0;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #f0f3f8;
}

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

.activity-row:not(:disabled):hover .activity-row__copy strong {
  color: var(--blue-700);
}

.activity-row__icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #607695;
  background: #f4f8fd;
  border: 1px solid #e8eef7;
  border-radius: 7px;
}

.activity-row__icon.is-critical {
  color: var(--red-700);
  background: var(--red-50);
  border-color: #f9d9d6;
}

.activity-row__copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.activity-row__copy strong {
  overflow: hidden;
  color: #33435b;
  font-size: 9.5px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color var(--transition);
}

.activity-row__copy span {
  overflow: hidden;
  margin-top: 1px;
  color: #8a95a6;
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-row__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  color: #98a3b3;
  font-size: 7.5px;
  white-space: nowrap;
}

.activity-row__meta small {
  max-width: 112px;
  overflow: hidden;
  color: #aeb7c4;
  font-size: 7px;
  text-overflow: ellipsis;
}

.capacity-overview {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 2px 20px 12px;
}

.capacity-ring {
  display: grid;
  flex: none;
  width: 82px;
  height: 82px;
  place-items: center;
  background: conic-gradient(var(--blue-600) 0 var(--capacity-angle), #eef2f7 var(--capacity-angle) 360deg);
  border-radius: 50%;
}

.capacity-ring > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(230, 235, 243, 0.6);
}

.capacity-ring strong {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.capacity-ring span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 7.5px;
}

.capacity-copy {
  min-width: 0;
}

.capacity-copy > strong {
  color: #31425a;
  font-size: 10.5px;
  font-weight: 650;
}

.capacity-copy p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.45;
}

.capacity-critical {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  color: var(--red-700);
  font-size: 8px;
  font-weight: 600;
}

.zone-list {
  padding: 0 20px 12px;
}

.zone-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 0;
  border-top: 1px solid #f2f5f9;
}

.zone-row > span {
  width: 88px;
  overflow: hidden;
  color: #66748a;
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zone-dots {
  display: flex;
  flex: 1;
  gap: 3px;
}

.zone-dots i {
  width: 7px;
  height: 7px;
  background: #e3e9f2;
  border-radius: 2px;
}

.zone-dots i.is-free {
  background: var(--blue-500);
}

.zone-row > strong {
  color: #63718a;
  font-size: 8.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ============ Page-specific shared tables ============ */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  padding: 8px 10px;
  color: #8c98a9;
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-align: left;
  text-transform: uppercase;
  background: #f9fbfd;
  border-bottom: 1px solid var(--line);
}

.data-table td {
  padding: 8px 10px;
  color: #52627a;
  font-size: 9px;
  border-bottom: 1px solid #f0f3f7;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table td strong {
  display: block;
  color: #34465f;
  font-size: 9px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.data-table td span {
  display: block;
  margin-top: 1px;
  color: #97a3b3;
  font-size: 7.5px;
}

.data-table .value-critical {
  color: var(--red-700);
  font-weight: 650;
}

.table-scroll {
  overflow-x: auto;
}
/* ============ Patients directory ============ */
.patient-overview-bar {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 16px;
  padding: 11px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-xs);
}

.overview-counter {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
  padding: 2px 17px;
  border-right: 1px solid #eef2f7;
}

.overview-counter:last-child {
  border-right: 0;
}

.overview-counter > span {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 5px;
  color: #718096;
  font-size: 8.5px;
  font-weight: 600;
}

.overview-counter i {
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
}

.overview-counter strong {
  color: #16263f;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.overview-counter small {
  color: #9aa5b4;
  font-size: 7.5px;
}

.overview-counter--red > span {
  color: var(--red-700);
}

.overview-counter--yellow > span {
  color: var(--yellow-700);
}

.overview-counter--green > span {
  color: var(--green-700);
}

.patients-directory {
  overflow: hidden;
}

.directory-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px 20px 12px;
}

.search-field {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  height: 38px;
  gap: 8px;
  padding: 0 10px;
  color: #8290a4;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
}

.search-field:focus-within {
  border-color: #a9c3fb;
  box-shadow: 0 0 0 3px rgba(36, 89, 223, 0.08);
}

.search-field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  color: var(--text);
  font-size: 10.5px;
  background: transparent;
  border: 0;
  outline: 0;
}

.search-field input::placeholder {
  color: #99a5b6;
}

.search-field kbd {
  padding: 2px 5px;
  color: #96a2b3;
  font-family: var(--font-sans);
  font-size: 8px;
  font-weight: 600;
  background: #f6f8fb;
  border: 1px solid #e8edf4;
  border-radius: 4px;
}

.directory-subtoolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 20px 12px;
}

.select-filter {
  display: flex;
  align-items: center;
  gap: 6px;
}

.select-filter label {
  color: #8491a4;
  font-size: 8.5px;
  font-weight: 550;
}

.select-filter select {
  height: 28px;
  padding: 0 23px 0 8px;
  color: #53627a;
  font-size: 9px;
  font-weight: 550;
  background-color: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.directory-result {
  margin-left: auto;
  color: #929daf;
  font-size: 8.5px;
  font-variant-numeric: tabular-nums;
}

.patient-table--directory .patient-table__head,
.patient-row--large {
  grid-template-columns: minmax(220px, 1.55fr) 90px 130px 78px minmax(175px, 1.15fr) 92px 32px;
}

.patient-table--directory .patient-row {
  min-height: 64px;
}

.patient-table--directory .patient-table__body {
  max-height: none;
  overflow: visible;
}

.patient-table--directory .cell-sub {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.patient-cell--room {
  flex-direction: column;
  align-items: flex-start;
}

.patient-cell--room strong {
  overflow: hidden;
  max-width: 100%;
  color: #52627a;
  font-size: 9px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.patient-cell--room span {
  margin-top: 1px;
  color: #9aa5b5;
  font-size: 7.5px;
}

.patient-cell--actions {
  justify-content: flex-end;
}

.cell-sub {
  display: block;
  margin-top: 2px;
  color: #949faf;
  font-size: 7px;
  white-space: nowrap;
}

/* ============ Patient dossier ============ */
.breadcrumb-line {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  color: #97a2b2;
  font-size: 9px;
}

.breadcrumb-line a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #64758e;
  font-weight: 600;
}

.breadcrumb-line a:hover {
  color: var(--blue-700);
}

.patient-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 19px 21px;
  background:
    radial-gradient(600px 200px at 0 -40%, rgba(64, 116, 236, 0.065), transparent 70%),
    #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.patient-header__identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
}

.patient-avatar-large {
  display: grid;
  flex: none;
  width: 60px;
  height: 60px;
  place-items: center;
  color: #2d58bd;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(150deg, #f3f8ff, #e1ebfe);
  border: 1px solid #d7e4fa;
  border-radius: 17px;
  box-shadow: inset 0 1px 0 #fff;
}

.patient-header__eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 600;
}

.id-chip {
  padding: 2px 5px;
  color: #5c6d86;
  font-size: 7.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  background: #f4f7fb;
  border: 1px solid #e8edf5;
  border-radius: 4px;
}

.neutral-chip {
  padding: 2px 5px;
  color: #8a6a39;
  font-size: 7.5px;
  font-weight: 650;
  background: var(--yellow-50);
  border: 1px solid #f7e4b2;
  border-radius: 4px;
}

.patient-header h1 {
  overflow: hidden;
  color: #101f37;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.7px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.patient-header__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
  color: #718096;
  font-size: 9px;
}

.patient-header__meta i {
  width: 2px;
  height: 2px;
  margin: 0 2px;
  background: #b5c0ce;
  border-radius: 50%;
}

.patient-header__status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex: none;
  gap: 9px;
}

.patient-header__badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.patient-header__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.critical-vitals-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 22px;
  padding: 0 6px;
  color: var(--red-700);
  font-size: 7.5px;
  font-weight: 650;
  background: #fff;
  border: 1px solid #f5cfcb;
  border-radius: 5px;
}

.allergy-banner {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  padding: 8px 13px;
  color: var(--red-700);
  font-size: 9px;
  background: var(--red-50);
  border: 1px solid #f5d3d0;
  border-radius: 8px;
}

.allergy-banner svg {
  flex: none;
}

.allergy-banner strong {
  font-weight: 700;
}

.allergy-banner__note {
  margin-left: auto;
  color: #a25b54;
  font-size: 8px;
}

.patient-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.85fr);
  gap: 16px;
  margin-top: 14px;
  align-items: start;
}

.patient-main,
.patient-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.patient-main .card,
.patient-side .card {
  overflow: hidden;
}

.vitals-card .card-heading,
.notes-card .card-heading,
.full-history-card .card-heading {
  padding-bottom: 12px;
}

.last-updated {
  color: #8c99ac;
  font-size: 8px;
  font-weight: 500;
}

.vitals-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  padding: 0 18px 12px;
}

.vital-tile {
  padding: 10px 11px;
  background: #f9fbfd;
  border: 1px solid #ebf0f7;
  border-radius: 9px;
}

.vital-tile__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  color: #6e7e94;
  font-size: 8.5px;
  font-weight: 550;
}

.vital-tile__top svg {
  color: #8ea1bc;
}

.vital-tile__value {
  margin-top: 5px;
  color: #172842;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
  line-height: 1;
}

.vital-tile__value small {
  margin-left: 3px;
  color: #8996a8;
  font-family: var(--font-sans);
  font-size: 7.5px;
  font-weight: 500;
  letter-spacing: 0;
}

.vital-tile__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  margin-top: 6px;
  color: #99a4b4;
  font-size: 6.5px;
}

.vital-tile__foot .vital-state {
  font-weight: 650;
}

.vital-state--warning {
  background: #fffdf6;
  border-color: #f5e5b9;
}

.vital-state--warning .vital-tile__value,
.vital-state--warning .vital-state {
  color: var(--yellow-700);
}

.vital-state--warning .vital-tile__top svg {
  color: #b48a37;
}

.vital-state--critical {
  background: var(--red-50);
  border-color: #f6d3d0;
}

.vital-state--critical .vital-tile__value,
.vital-state--critical .vital-state {
  color: var(--red-700);
}

.vital-state--critical .vital-tile__top svg {
  color: #c6584e;
}

.vital-tile__foot > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vitals-chart-wrap {
  margin: 0 18px 12px;
  padding: 10px 12px 4px;
  background: linear-gradient(180deg, #fbfdff, #fff);
  border: 1px solid #eef3f9;
  border-radius: 10px;
}

.chart-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px 4px;
  color: #75849a;
  font-size: 7.5px;
  font-weight: 600;
}

.chart-legend > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chart-legend i {
  width: 13px;
  height: 2px;
  background: var(--blue-600);
  border-radius: 9px;
}

.chart-range {
  color: #a1acba;
  font-size: 7px;
  font-weight: 500;
}

.vitals-chart {
  width: 100%;
  height: 128px;
  overflow: visible;
}

.chart-grid {
  stroke: #eef2f8;
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.chart-label {
  fill: #9ca8b8;
  font-family: var(--font-sans);
  font-size: 8px;
}

.chart-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 18px 12px;
  padding: 24px;
  color: #8593a6;
  font-size: 9px;
  background: #f9fbfd;
  border: 1px dashed #dfe7f1;
  border-radius: 9px;
}

.vitals-history {
  margin: 0 18px 14px;
  border: 1px solid #edf1f7;
  border-radius: 9px;
  overflow: hidden;
}

.vitals-history__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: #fafcfe;
  border-bottom: 1px solid #edf1f7;
}

.vitals-history__head h3 {
  color: #4e607a;
  font-size: 8.5px;
  font-weight: 650;
}

.vitals-history__head > span {
  color: #9aa5b4;
  font-size: 7.5px;
}

.vitals-history .data-table th {
  padding: 6px 10px;
  font-size: 7px;
}

.vitals-history .data-table td {
  padding: 6px 10px;
  font-size: 8.5px;
}

.vitals-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 18px 14px;
  padding: 22px;
  color: #8b98aa;
  font-size: 9px;
  background: #f9fbfd;
  border: 1px dashed #e0e8f2;
  border-radius: 9px;
}

/* Notes */
.notes-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 20px 7px;
}

.note-item {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  gap: 9px;
  padding: 9px 0;
  border-top: 1px solid #f0f3f8;
}

.note-item:first-child {
  border-top: 0;
}

.note-item__icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  color: #5d7698;
  background: #f3f8fd;
  border: 1px solid #e6eef7;
  border-radius: 6px;
}

.note-item__copy {
  min-width: 0;
}

.note-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.note-item__head strong {
  color: #3d4e66;
  font-size: 8.5px;
  font-weight: 650;
}

.note-item__head span {
  color: #9ba6b5;
  font-size: 7.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.note-item__copy p {
  margin-top: 3px;
  color: #5c6b81;
  font-size: 9px;
  line-height: 1.5;
}

.note-item__copy small {
  display: block;
  margin-top: 3px;
  color: #9ba6b5;
  font-size: 7.5px;
}

.notes-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px 20px;
  color: #8d99aa;
  font-size: 9px;
}

/* Full history */
.audit-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 6px;
  color: #637b9e;
  font-size: 7px;
  font-weight: 600;
  background: #f1f6fd;
  border: 1px solid #e3ecf8;
  border-radius: 4px;
}

.history-timeline {
  max-height: 338px;
  padding: 0 20px 11px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #d7e1ee transparent;
}

.history-event {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  padding: 8px 0;
  border-top: 1px solid #f1f4f8;
}

.history-event:first-child {
  border-top: 0;
}

.history-event__icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: #6f819c;
  background: #f6f9fd;
  border: 1px solid #e9eff7;
  border-radius: 6px;
}

.history-event__icon--triage {
  color: var(--yellow-700);
  background: var(--yellow-50);
  border-color: #f8e7b7;
}

.history-event__icon--vitals {
  color: #2e5eb8;
  background: #f2f7ff;
  border-color: #e2ecfc;
}

.history-event__copy {
  min-width: 0;
}

.history-event__copy > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.history-event__copy strong {
  color: #3c4d65;
  font-size: 8.5px;
  font-weight: 650;
}

.history-event__copy time {
  flex: none;
  color: #99a4b4;
  font-size: 7px;
  font-variant-numeric: tabular-nums;
}

.history-event__copy p {
  overflow: hidden;
  margin-top: 2px;
  color: #738198;
  font-size: 8px;
  line-height: 1.45;
  text-overflow: ellipsis;
}

.history-event__copy small {
  display: block;
  margin-top: 2px;
  color: #a1acba;
  font-size: 7px;
}

/* Side cards */
.clinical-summary {
  padding: 0 18px 12px;
}

.clinical-summary > p {
  margin-top: 4px;
  color: #53647c;
  font-size: 9px;
  line-height: 1.55;
}

.clinical-note {
  margin-top: 8px;
  padding: 8px 9px;
  background: #f9fbfd;
  border: 1px solid #edf2f8;
  border-radius: 7px;
}

.clinical-note span {
  color: #8a96a7;
  font-size: 7px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.clinical-note p {
  margin-top: 2px;
  color: #68778c;
  font-size: 8.5px;
  line-height: 1.45;
}

.allergy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid #f0f3f8;
}

.allergy-row span {
  color: #8491a3;
  font-size: 8px;
}

.allergy-row strong {
  max-width: 65%;
  color: #63718a;
  font-size: 8.5px;
  font-weight: 600;
  text-align: right;
}

.allergy-row strong.is-allergy {
  padding: 2px 5px;
  color: var(--red-700);
  background: var(--red-50);
  border-radius: 4px;
}

.info-list {
  padding: 0 18px 12px;
}

.info-list > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 11px;
  padding: 7px 0;
  border-top: 1px solid #f0f3f8;
}

.info-list dt {
  display: flex;
  align-items: center;
  flex: none;
  gap: 5px;
  color: #8491a3;
  font-size: 7.5px;
}

.info-list dt svg {
  color: #9eabbb;
}

.info-list dd {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  color: #4c5d74;
  font-size: 8.5px;
  font-weight: 600;
  text-align: right;
}

.info-list dd small {
  margin-top: 1px;
  color: #9ba5b4;
  font-size: 7px;
  font-weight: 400;
}

.triage-card .card-heading {
  align-items: flex-start;
  padding-bottom: 10px;
}

.triage-card .card-heading > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.current-triage {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 18px;
  padding: 10px;
  background: #f9fbfd;
  border: 1px solid #ebf0f7;
  border-radius: 8px;
}

.current-triage--red {
  background: var(--red-50);
  border-color: #f7d6d3;
}

.current-triage--yellow {
  background: var(--yellow-50);
  border-color: #f8e6b9;
}

.current-triage--green {
  background: var(--green-50);
  border-color: #d4f3e0;
}

.current-triage__marker {
  flex: none;
  width: 3px;
  height: 29px;
  background: #9aabbd;
  border-radius: 99px;
}

.current-triage--red .current-triage__marker {
  background: var(--red-600);
}

.current-triage--yellow .current-triage__marker {
  background: var(--yellow-600);
}

.current-triage--green .current-triage__marker {
  background: var(--green-600);
}

.current-triage > div {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.current-triage > div strong {
  color: #314159;
  font-size: 9.5px;
  font-weight: 650;
}

.current-triage > div span {
  margin-top: 1px;
  color: #718096;
  font-size: 7.5px;
}

.triage-helper {
  padding: 7px 18px 10px;
  color: #8a96a7;
  font-size: 7.5px;
}

.triage-history {
  padding: 0 18px 11px;
}

.triage-history__item {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid #f0f3f8;
}

.triage-history__dot {
  width: 7px;
  height: 7px;
  margin-top: 4px;
  border-radius: 50%;
}

.triage-history__dot--red {
  background: var(--red-600);
}

.triage-history__dot--yellow {
  background: var(--yellow-600);
}

.triage-history__dot--green {
  background: var(--green-600);
}

.triage-history__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.triage-history__head strong {
  color: #4b5c73;
  font-size: 7.8px;
  font-weight: 650;
}

.triage-history__head span {
  flex: none;
  color: #a0aab8;
  font-size: 6.8px;
  white-space: nowrap;
}

.triage-history__item p {
  margin-top: 2px;
  color: #7a889c;
  font-size: 7.5px;
  line-height: 1.4;
}

.triage-history__item small {
  display: block;
  margin-top: 2px;
  color: #9ba5b3;
  font-size: 6.8px;
}

.triage-pending-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0 18px 12px;
  padding: 8px;
  color: #8b6631;
  font-size: 8px;
  line-height: 1.45;
  background: var(--yellow-50);
  border: 1px solid #f8e4b1;
  border-radius: 6px;
}

.triage-pending-note svg {
  flex: none;
}

.team-list {
  padding: 0 18px 12px;
}

.team-member {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 8px;
  padding: 7px 0;
  text-align: left;
  background: transparent;
  border: 0;
  border-top: 1px solid #f0f3f8;
}

.team-member:first-child {
  border-top: 0;
}

.team-member:hover > span:nth-child(2) strong {
  color: var(--blue-700);
}

.team-member > span:nth-child(2) {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.team-member strong {
  overflow: hidden;
  color: #3c4c63;
  font-size: 8.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-member small {
  overflow: hidden;
  margin-top: 1px;
  color: #97a3b2;
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-member > svg {
  color: #b2bcc9;
}

.team-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 13px 18px 16px;
  color: #8d99aa;
  font-size: 8.5px;
  text-align: center;
}

.team-empty > svg {
  margin-bottom: 5px;
  color: #aab6c5;
}

.team-empty .button {
  margin-top: 8px;
}

.status-control {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 18px 11px;
}

.status-control label {
  color: #8995a6;
  font-size: 7.5px;
  font-weight: 550;
}

.status-control select {
  width: 100%;
  height: 32px;
  padding: 0 28px 0 9px;
  color: #3e506a;
  font-size: 9px;
  font-weight: 550;
  background-color: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
}

.discharge-block {
  margin: 0 18px;
  padding: 9px;
  background: #f9fbfd;
  border: 1px solid #edf2f8;
  border-radius: 8px;
}

.discharge-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.discharge-block__head > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #728198;
  font-size: 8px;
  font-weight: 600;
}

.discharge-block__head > span svg {
  color: #8d9db4;
}

.discharge-block > strong {
  display: block;
  margin-top: 7px;
  color: #34465e;
  font-size: 10px;
  font-weight: 650;
}

.discharge-block > p {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin-top: 3px;
  color: #b07930;
  font-size: 7px;
  line-height: 1.4;
}

.warning-dot {
  flex: none;
  width: 5px;
  height: 5px;
  margin-top: 3px;
  background: var(--yellow-600);
  border-radius: 50%;
}

.discharge-block > small {
  display: block;
  margin-top: 4px;
  color: #96a1b0;
  font-size: 7px;
  line-height: 1.4;
}

.treatment-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 18px 12px;
  color: #929dac;
  font-size: 7.5px;
}

.treatment-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ============ Triage board ============ */
.triage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 13px;
  margin-bottom: 14px;
  padding: 11px 14px;
}

.triage-toolbar__summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.triage-summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #6f7d91;
  font-size: 8.5px;
  font-weight: 550;
}

.triage-summary strong {
  color: #384960;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.triage-summary i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.triage-summary.red i {
  background: var(--red-600);
}

.triage-summary.yellow i {
  background: var(--yellow-600);
}

.triage-summary.green i {
  background: var(--green-600);
}

.triage-summary.neutral svg {
  color: #a27a36;
}

.triage-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.triage-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  align-items: start;
}

.triage-column {
  min-width: 0;
  overflow: hidden;
  background: #f8fafd;
  border: 1px solid #e7edf5;
  border-radius: 14px;
}

.triage-column--red {
  background: #fdf9f9;
  border-color: #f1e0de;
}

.triage-column--yellow {
  background: #fdfcf8;
  border-color: #f2ead7;
}

.triage-column--green {
  background: #f9fcfa;
  border-color: #e1eee6;
}

.triage-column__head {
  padding: 13px 14px 10px;
  background: rgba(255, 255, 255, 0.55);
  border-bottom: 1px solid #edf1f7;
}

.triage-column--red .triage-column__head {
  background: linear-gradient(180deg, #fff9f8, rgba(255, 255, 255, 0.3));
  border-color: #f3e5e3;
}

.triage-column--yellow .triage-column__head {
  background: linear-gradient(180deg, #fffdf7, rgba(255, 255, 255, 0.3));
  border-color: #f3ecdd;
}

.triage-column--green .triage-column__head {
  background: linear-gradient(180deg, #f8fdfa, rgba(255, 255, 255, 0.3));
  border-color: #e8f1eb;
}

.triage-column__title {
  display: flex;
  align-items: center;
  gap: 7px;
}

.triage-column__badge {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  background: #f7f9fc;
  border: 1px solid #e7ecf4;
  border-radius: 6px;
}

.triage-column__badge span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.triage-column--red .triage-column__badge span {
  background: var(--red-600);
}

.triage-column--yellow .triage-column__badge span {
  background: var(--yellow-600);
}

.triage-column--green .triage-column__badge span {
  background: var(--green-600);
}

.triage-column__title > div {
  flex: 1;
  min-width: 0;
}

.triage-column__title h2 {
  color: #314259;
  font-size: 11px;
  font-weight: 650;
}

.triage-column__title p {
  margin-top: 1px;
  color: #929dac;
  font-size: 7.5px;
}

.triage-column__count {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  color: #58667c;
  font-size: 9px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: #f2f5f9;
  border-radius: 6px;
}

.triage-column__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 7px;
  padding-left: 27px;
  color: #929eae;
  font-size: 7px;
}

.triage-column__meta span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.triage-column__body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 180px;
  padding: 9px;
  transition: background var(--transition), box-shadow var(--transition);
}

.triage-column__body.is-drag-over {
  background: #eff5ff;
  box-shadow: inset 0 0 0 2px #a8c4ff;
  border-radius: 9px;
}

.triage-card {
  position: relative;
  padding: 10px;
  cursor: pointer;
  background: #fff;
  border: 1px solid #e8edf5;
  border-radius: 9px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.035);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition), opacity var(--transition);
}

.triage-card[draggable="true"] {
  cursor: grab;
}

.triage-card:hover {
  border-color: #d8e2ef;
  box-shadow: 0 4px 12px rgba(22, 39, 67, 0.06);
  transform: translateY(-1px);
}

.triage-card.is-dragging {
  opacity: 0.45;
}

.triage-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.triage-card__id {
  color: #95a1b1;
  font-size: 7px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.triage-card__wait {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #7d8a9c;
  font-size: 7px;
  font-variant-numeric: tabular-nums;
}

.triage-card__person {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.triage-card__person > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.triage-card__person h3 {
  overflow: hidden;
  color: #1d2d45;
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.triage-card__person span {
  color: #919cad;
  font-size: 7px;
}

.pending-flag {
  display: grid;
  flex: none;
  width: 20px;
  height: 20px;
  margin-left: auto;
  place-items: center;
  color: #9b7231;
  background: var(--yellow-50);
  border: 1px solid #f7e3b0;
  border-radius: 5px;
}

.triage-card__symptoms {
  display: -webkit-box;
  margin-top: 6px;
  overflow: hidden;
  color: #69788d;
  font-size: 8px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.triage-card__tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 7px;
}

.triage-card__tags .status-badge {
  height: 19px;
  font-size: 7.5px;
}

.vital-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 19px;
  padding: 0 5px;
  color: #60708a;
  font-size: 7px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: #f7f9fc;
  border: 1px solid #ecf0f6;
  border-radius: 4px;
}

.vital-chip.is-critical {
  color: var(--red-700);
  background: var(--red-50);
  border-color: #f8d7d4;
}

.triage-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid #f0f3f8;
}

.triage-card__team {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 3px;
  overflow: hidden;
  color: #7d8b9e;
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-action {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 1px;
  padding: 0;
  color: var(--blue-700);
  font-size: 7.5px;
  font-weight: 650;
  background: transparent;
  border: 0;
  white-space: nowrap;
}

.mini-action:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mini-action--muted {
  color: #a0aab8;
  font-weight: 500;
}

.pending-ribbon {
  display: inline-flex;
  margin-top: 7px;
  padding: 2px 5px;
  color: #8b6b38;
  font-size: 6.5px;
  font-weight: 650;
  background: #fffaf0;
  border: 1px solid #f5e5bd;
  border-radius: 3px;
}

.column-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 29px 10px;
  color: #a0aab8;
  font-size: 8px;
  text-align: center;
}

.triage-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding: 13px 3px 0;
  color: #8895a6;
  font-size: 8px;
}

.triage-footer > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.triage-result {
  color: #a0aab8;
  font-variant-numeric: tabular-nums;
}

/* ============ Ambulance ============ */
.connection-panel {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: var(--shadow-xs);
}

.connection-panel__dot {
  width: 8px;
  height: 8px;
  background: #3f8cff;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(63, 140, 255, 0.1);
}

.connection-panel > span:last-child {
  display: flex;
  flex-direction: column;
}

.connection-panel strong {
  color: #3c4c63;
  font-size: 9.5px;
  font-weight: 650;
}

.connection-panel small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 7.5px;
}

.ambulance-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.ambulance-stats > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-xs);
}

.ambulance-stats span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #728197;
  font-size: 8px;
}

.ambulance-stats span svg {
  color: #849bbd;
}

.ambulance-stats strong {
  color: #1d2e48;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.ambulance-stats strong small {
  font-family: var(--font-sans);
  font-size: 8px;
  font-weight: 500;
}

.ambulance-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.8fr);
  gap: 14px;
  align-items: start;
}

.prealert-form-card {
  overflow: hidden;
}

.connection-chip {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 4px;
  padding: 4px 6px;
  color: #4d6b94;
  font-size: 7px;
  font-weight: 600;
  background: #f2f7fe;
  border: 1px solid #e3edfb;
  border-radius: 4px;
}

.prealert-form {
  padding: 0 20px 20px;
}

.prealert-form .form-section {
  padding: 15px 0;
  border-top: 1px solid #eef2f7;
}

.prealert-form .form-section:first-child {
  border-top: 0;
}

.prealert-form .form-section__head {
  margin-bottom: 11px;
}

.prealert-form .form-section__number {
  width: 21px;
  height: 21px;
  font-size: 7.5px;
}

.prealert-form .form-section__head h3 {
  font-size: 10px;
}

.prealert-form .form-section__head p {
  font-size: 8px;
}

.prealert-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 15px;
  border-top: 1px solid #eef2f7;
}

.submit-disclaimer {
  display: flex;
  align-items: flex-start;
  max-width: 430px;
  gap: 6px;
  color: #8c98a8;
  font-size: 7.5px;
  line-height: 1.45;
}

.submit-disclaimer svg {
  flex: none;
  color: #93a4bb;
}

.ambulance-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.transfers-card .card-heading,
.protocol-card .card-heading {
  padding-bottom: 10px;
}

.transfer-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 0 13px 13px;
}

.transfer-card {
  padding: 12px;
  background: #fbfcfe;
  border: 1px solid #e9eff6;
  border-radius: 10px;
}

.transfer-card--red {
  background: linear-gradient(180deg, #fffafa, #fff 70%);
  border-color: #f4ddda;
}

.transfer-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.transfer-card__ids {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.transfer-id {
  color: #a0aab8;
  font-size: 6.5px;
  font-variant-numeric: tabular-nums;
}

.transfer-card__person {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.transfer-card__person > div {
  min-width: 0;
}

.transfer-card__person h3 {
  overflow: hidden;
  color: #1e2e47;
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transfer-card__person p {
  display: -webkit-box;
  margin-top: 2px;
  overflow: hidden;
  color: #728096;
  font-size: 8px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.transfer-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 7px;
  color: #8793a4;
  font-size: 7px;
}

.transfer-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.transfer-card__meta small {
  color: #a3adbb;
  font-size: inherit;
}

.transfer-card__vitals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin-top: 8px;
}

.transfer-card__vitals > span {
  display: flex;
  flex-direction: column;
  padding: 5px 6px;
  background: #fff;
  border: 1px solid #edf1f7;
  border-radius: 5px;
}

.transfer-card__vitals small {
  color: #9ba6b4;
  font-size: 6.5px;
}

.transfer-card__vitals strong {
  margin-top: 1px;
  color: #42546c;
  font-size: 8.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.transfer-card__vitals .is-critical strong {
  color: var(--red-700);
}

.transfer-progress {
  display: flex;
  align-items: flex-start;
  margin-top: 10px;
}

.transfer-step {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #a0aab8;
  font-size: 5.8px;
  text-align: center;
}

.transfer-step::before {
  position: absolute;
  top: 5px;
  left: -50%;
  width: 100%;
  height: 1px;
  content: "";
  background: #e5eaf2;
}

.transfer-step:first-child::before {
  display: none;
}

.transfer-step i {
  position: relative;
  z-index: 1;
  display: grid;
  width: 11px;
  height: 11px;
  place-items: center;
  background: #fff;
  border: 1px solid #dbe3ee;
  border-radius: 50%;
}

.transfer-step--done {
  color: #5f7593;
}

.transfer-step--done i {
  color: #fff;
  background: var(--blue-600);
  border-color: var(--blue-600);
}

.transfer-step--done::before {
  background: #b9cbec;
}

.transfer-step--current {
  color: var(--blue-700);
  font-weight: 650;
}

.transfer-step--current i {
  background: var(--blue-50);
  border: 2px solid var(--blue-600);
  box-shadow: 0 0 0 3px rgba(36, 89, 223, 0.09);
}

.transfer-step small {
  font-size: 5.8px;
  font-weight: inherit;
  line-height: 1.2;
}

.transfer-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #eef2f7;
}

.transfer-card__foot .button {
  height: 27px;
  padding: 0 8px;
  font-size: 8px;
}

.transfer-waiting {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #9a7a42;
  font-size: 6.8px;
}

.protocol-card {
  padding-bottom: 11px;
}

.protocol-steps {
  padding: 0 18px;
}

.protocol-steps li {
  position: relative;
  display: flex;
  gap: 9px;
  padding-bottom: 11px;
}

.protocol-steps li:last-child {
  padding-bottom: 0;
}

.protocol-steps li::before {
  position: absolute;
  top: 10px;
  left: 3px;
  width: 1px;
  height: calc(100% - 3px);
  content: "";
  background: #e5ebf3;
}

.protocol-steps li:last-child::before {
  display: none;
}

.protocol-step__dot {
  position: relative;
  z-index: 1;
  flex: none;
  width: 7px;
  height: 7px;
  margin-top: 3px;
  background: #fff;
  border: 2px solid #9fb8de;
  border-radius: 50%;
}

.protocol-steps strong {
  color: #475971;
  font-size: 8px;
  font-weight: 650;
}

.protocol-steps p {
  margin-top: 1px;
  color: #8995a6;
  font-size: 7px;
  line-height: 1.4;
}

.protocol-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 7px 14px 0;
  padding: 7px;
  color: #8a96a7;
  font-size: 7px;
  line-height: 1.45;
  background: #f8fafc;
  border: 1px solid #edf1f6;
  border-radius: 5px;
}

.protocol-note svg {
  flex: none;
}

.hospital-ambulance-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.72fr);
  gap: 14px;
  align-items: start;
}

.ambulance-summary-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.summary-tile {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 5px;
  padding: 11px 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-xs);
}

.summary-tile > span {
  display: inline-flex;
  align-items: center;
  width: 100%;
  gap: 4px;
  color: #7d8a9d;
  font-size: 7.5px;
}

.summary-tile > span svg {
  color: #8da4c2;
}

.summary-tile strong {
  color: #1d2e46;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.summary-tile strong small {
  font-family: var(--font-sans);
  font-size: 7.5px;
  font-weight: 500;
}

.summary-tile > small {
  color: #969fae;
  font-size: 7px;
}

.incoming-board {
  overflow: hidden;
}

.transfer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 14px;
}

.arrived-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
}

.arrived-strip > span {
  color: #8c98a9;
  font-size: 7.5px;
  font-weight: 550;
}

.arrived-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 6px;
  color: #5a6c86;
  font-size: 7.5px;
  font-weight: 550;
  background: #f6f9fd;
  border: 1px solid #e8eef6;
  border-radius: 4px;
}

.arrived-chip:hover {
  color: var(--blue-700);
}

.hospital-ambulance-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ============ Staff & resources ============ */
.resource-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.resource-stat {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-xs);
}

.resource-stat__icon {
  display: grid;
  flex: none;
  width: 31px;
  height: 31px;
  place-items: center;
  color: #4a668c;
  background: #f3f7fd;
  border: 1px solid #e8eef7;
  border-radius: 8px;
}

.resource-stat > div {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
}

.resource-stat strong {
  color: #1a2b45;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.resource-stat strong small {
  color: #8793a3;
  font-size: 9px;
  font-weight: 600;
}

.resource-stat span {
  overflow: hidden;
  color: #69778c;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-stat small {
  grid-column: 1 / -1;
  color: #9ba6b5;
  font-size: 6.8px;
}

.resource-stat--attention .resource-stat__icon {
  color: #8e6b34;
  background: #fffbf2;
  border-color: #f6e9cd;
}

.resources-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.8fr);
  gap: 14px;
  align-items: start;
}

.team-overview-card {
  overflow: hidden;
}

.staff-table__head,
.staff-row {
  display: grid;
  grid-template-columns: 34px minmax(170px, 1.55fr) 94px 62px minmax(130px, 1fr) 20px;
  align-items: center;
  column-gap: 10px;
}

.staff-table__head {
  min-height: 28px;
  padding: 0 18px;
  color: #95a0af;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: #f9fbfd;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.staff-row {
  width: 100%;
  min-height: 54px;
  padding: 7px 18px;
  text-align: left;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #f0f3f8;
  transition: background var(--transition);
}

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

.staff-row:hover {
  background: #fbfcff;
}

.staff-row__identity {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.staff-row__identity strong {
  overflow: hidden;
  color: #26364e;
  font-size: 9.5px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-row__identity span {
  overflow: hidden;
  color: #8a96a7;
  font-size: 7.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-row__shift {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #7f8c9f;
  font-size: 7.5px;
  white-space: nowrap;
}

.on-shift-dot {
  width: 5px;
  height: 5px;
  background: var(--blue-500);
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(75, 124, 243, 0.1);
}

.staff-row__patients {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
}

.staff-row__patients strong {
  color: #3b4c64;
  font-size: 10px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.staff-row__patients small {
  color: #9ba5b4;
  font-size: 6.5px;
}

.staff-row__load {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.load-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.load-label small {
  color: #9ba5b4;
  font-size: 6.5px;
}

.load-label strong {
  color: #596a83;
  font-size: 7.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.staff-row__action {
  display: grid;
  place-items: center;
  color: #b7c0cc;
}

.staff-row:hover .staff-row__action {
  color: var(--blue-600);
}

.unassigned-card {
  overflow: hidden;
}

.unassigned-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 14px 10px;
}

.unassigned-item {
  padding: 10px;
  background: #fbfcfe;
  border: 1px solid #eaf0f7;
  border-radius: 8px;
}

.unassigned-item__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.unassigned-item__top > span:last-child {
  color: #9ba5b4;
  font-size: 6.8px;
  font-variant-numeric: tabular-nums;
}

.unassigned-item > strong {
  display: block;
  margin-top: 5px;
  color: #293a53;
  font-size: 9.5px;
  font-weight: 650;
}

.unassigned-item > p {
  display: -webkit-box;
  margin-top: 2px;
  overflow: hidden;
  color: #7c899c;
  font-size: 7.5px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.unassigned-item__suggestion {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 7px;
  padding: 5px 6px;
  color: #556d91;
  font-size: 7px;
  background: #f3f8ff;
  border: 1px solid #e6eefb;
  border-radius: 4px;
}

.unassigned-item__suggestion svg {
  flex: none;
  color: #6381ae;
}

.unassigned-item__suggestion small {
  color: #92a0b3;
  font-size: inherit;
}

.unassigned-item .button {
  margin-top: 8px;
}

.beds-card {
  margin-top: 14px;
  overflow: hidden;
}

.bed-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 11px;
  color: #8d99aa;
  font-size: 7px;
}

.bed-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.bed-legend__dot {
  width: 6px;
  height: 6px;
  border-radius: 2px;
}

.bed-legend__dot--free {
  background: var(--blue-500);
}

.bed-legend__dot--occupied {
  background: #c7d0dd;
}

.bed-legend__dot--reserved {
  background: #8e6b34;
}

.critical-bed-highlight {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 18px 14px;
  padding: 10px 12px;
  background: linear-gradient(90deg, #fff7f6, #fffafa);
  border: 1px solid #f4d9d6;
  border-radius: 9px;
}

.critical-bed-highlight__icon {
  display: grid;
  flex: none;
  width: 33px;
  height: 33px;
  place-items: center;
  color: var(--red-700);
  background: #fff;
  border: 1px solid #f6d8d5;
  border-radius: 8px;
}

.critical-bed-highlight > div {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.critical-bed-highlight strong {
  color: #7f2f29;
  font-size: 9px;
  font-weight: 650;
}

.critical-bed-highlight span {
  margin-top: 1px;
  overflow: hidden;
  color: #a36963;
  font-size: 7.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.critical-bed-highlight .button {
  flex: none;
  height: 28px;
  font-size: 8px;
}

.no-critical-bed {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 18px 14px;
  padding: 9px 11px;
  color: var(--red-700);
  font-size: 8px;
  background: var(--red-50);
  border: 1px solid #f4d5d2;
  border-radius: 8px;
}

.bed-zones {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 18px 14px;
}

.bed-zone {
  padding-top: 10px;
  border-top: 1px solid #eef2f7;
}

.bed-zone:first-child {
  padding-top: 0;
  border-top: 0;
}

.bed-zone__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.bed-zone__head h3 {
  color: #4c5d74;
  font-size: 8.5px;
  font-weight: 650;
}

.bed-zone__head span {
  color: #9ba5b4;
  font-size: 7px;
  font-variant-numeric: tabular-nums;
}

.bed-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.bed-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 8px 9px;
  text-align: left;
  background: #fbfcfe;
  border: 1px solid #e9eff6;
  border-radius: 7px;
  transition: border-color var(--transition), background var(--transition);
}

.bed-card:hover {
  background: #fff;
  border-color: #cbd9eb;
}

.bed-card--free {
  background: #f8fbff;
  border-color: #dfeafb;
}

.bed-card--free:hover {
  border-color: #b8cff4;
}

.bed-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.bed-card__icon {
  color: #879cb8;
}

.bed-card__status {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #8e99a9;
  font-size: 6.5px;
  white-space: nowrap;
}

.bed-card__status i {
  width: 4px;
  height: 4px;
  background: #c7d0dd;
  border-radius: 50%;
}

.bed-card--free .bed-card__status {
  color: #3a63a8;
}

.bed-card--free .bed-card__status i {
  background: var(--blue-500);
}

.bed-card--reserved .bed-card__status {
  color: #8e6b34;
}

.bed-card--reserved .bed-card__status i {
  background: #b08745;
}

.bed-card__label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
  color: #45566e;
  font-size: 8.5px;
  font-weight: 650;
}

.critical-equipment {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  color: #a24d45;
  font-size: 5.8px;
  font-weight: 550;
}

.bed-card__patient {
  overflow: hidden;
  margin-top: 2px;
  color: #8b97a8;
  font-size: 6.8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bed-card--occupied .bed-card__patient {
  color: #596b84;
}

.bed-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 5px;
  color: #a1acba;
  font-size: 6px;
  white-space: nowrap;
}

/* ============ AI assistant ============ */
.ai-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.ai-status-pill > span {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  color: #426aaa;
  background: #f1f6ff;
  border: 1px solid #e3ecfb;
  border-radius: 7px;
}

.ai-status-pill > div {
  display: flex;
  flex-direction: column;
}

.ai-status-pill strong {
  color: #35475f;
  font-size: 9.5px;
  font-weight: 650;
}

.ai-status-pill small {
  margin-top: 1px;
  color: #8f9bac;
  font-size: 7px;
}

.demo-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #536f9a;
  font-weight: 650;
}

.assistant-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.4fr);
  gap: 14px;
  align-items: start;
}

.assistant-request {
  padding-bottom: 14px;
  overflow: hidden;
}

.assistant-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 18px 14px;
}

.ai-badge {
  display: inline-grid;
  width: 21px;
  height: 18px;
  place-items: center;
  color: #35538a;
  font-size: 7px;
  font-weight: 750;
  letter-spacing: 0.03em;
  background: linear-gradient(145deg, #eef5ff, #dfeaff);
  border: 1px solid #d4e2fa;
  border-radius: 4px;
}

.patient-context {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: -4px;
  padding: 7px 8px;
  background: #f9fbfd;
  border: 1px solid #edf2f8;
  border-radius: 6px;
}

.patient-context > span:last-child {
  flex: 1;
  min-width: 100px;
  color: #7d8b9f;
  font-size: 7.5px;
  line-height: 1.4;
}

.toggle-field {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}

.toggle-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.toggle-switch {
  position: relative;
  flex: none;
  width: 29px;
  height: 17px;
  margin-top: 1px;
  background: #dce3ed;
  border-radius: 99px;
  transition: background var(--transition);
}

.toggle-switch::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 13px;
  height: 13px;
  content: "";
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.2);
  transition: transform var(--transition);
}

.toggle-field input:checked + .toggle-switch {
  background: var(--blue-600);
}

.toggle-field input:checked + .toggle-switch::after {
  transform: translateX(12px);
}

.toggle-field input:focus-visible + .toggle-switch {
  outline: 2px solid var(--blue-600);
  outline-offset: 2px;
}

.toggle-field > span:last-child {
  display: flex;
  flex-direction: column;
}

.toggle-field strong {
  color: #4c5e75;
  font-size: 8.5px;
  font-weight: 600;
}

.toggle-field small {
  margin-top: 1px;
  color: #949fae;
  font-size: 7px;
  line-height: 1.35;
}

.assistant-scan-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: -3px;
  color: #9ca6b4;
  font-size: 7px;
}

.assistant-how {
  margin: 0 18px;
  padding-top: 11px;
  border-top: 1px solid #eef2f7;
}

.assistant-how h3 {
  color: #718096;
  font-size: 8px;
  font-weight: 650;
}

.assistant-how ol {
  margin-top: 6px;
}

.assistant-how li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 3px 0;
}

.assistant-how li > span {
  display: grid;
  flex: none;
  width: 14px;
  height: 14px;
  place-items: center;
  color: #6b7f9e;
  font-size: 6.5px;
  font-weight: 650;
  background: #f2f6fc;
  border: 1px solid #e6edf7;
  border-radius: 50%;
}

.assistant-how p {
  color: #8b97a7;
  font-size: 7px;
  line-height: 1.5;
}

.ai-results {
  padding: 18px;
}

.ai-results__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.ai-results__head h2 {
  margin-top: 2px;
  color: #1e2f48;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.2px;
}

.scan-timestamp {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #99a4b3;
  font-size: 7px;
  white-space: nowrap;
}

.ai-recommendation {
  padding: 11px;
  background:
    linear-gradient(180deg, #f4f9ff, #fbfdff);
  border: 1px solid #dceafd;
  border-left: 3px solid var(--blue-600);
  border-radius: 9px;
}

.ai-recommendation__top {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #45658f;
  font-size: 7.5px;
  font-weight: 600;
}

.ai-spark {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: var(--blue-700);
  background: #fff;
  border: 1px solid #dce8fb;
  border-radius: 5px;
}

.ai-confidence {
  margin-left: auto;
  padding: 2px 5px;
  color: #3d6997;
  font-size: 6.5px;
  font-weight: 600;
  background: #edf5ff;
  border-radius: 3px;
}

.ai-recommendation__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 7px;
}

.ai-recommendation__main > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ai-recommendation__main strong {
  color: #1e3555;
  font-size: 11px;
  font-weight: 650;
}

.ai-recommendation__main span {
  margin-top: 1px;
  color: #7f90a6;
  font-size: 7.5px;
}

.ai-recommendation > p {
  display: flex;
  align-items: flex-start;
  gap: 3px;
  margin-top: 7px;
  color: #8494a9;
  font-size: 6.8px;
  line-height: 1.4;
}

.ai-recommendation > p svg {
  flex: none;
  margin-top: 1px;
}

.ai-no-result {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 11px;
  color: var(--red-700);
  background: var(--red-50);
  border: 1px solid #f4d5d2;
  border-radius: 8px;
}

.ai-no-result > div {
  display: flex;
  flex-direction: column;
}

.ai-no-result strong {
  font-size: 8.5px;
  font-weight: 650;
}

.ai-no-result span {
  margin-top: 2px;
  color: #9f5e58;
  font-size: 7.5px;
}

.toilet-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.toilet-card {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 9px 10px 9px 13px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e9eef6;
  border-radius: 8px;
}

.toilet-card__marker {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--green-600);
}

.toilet-card--occupied .toilet-card__marker {
  background: var(--red-500, #f04438);
}

.toilet-card__icon {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  color: #58779c;
  background: #f4f8fd;
  border: 1px solid #e7eef8;
  border-radius: 8px;
}

.toilet-card--free .toilet-card__icon {
  color: var(--green-700);
  background: var(--green-50);
  border-color: #d2f1df;
}

.toilet-card__copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.toilet-card__copy > strong {
  color: #2d3e56;
  font-size: 9px;
  font-weight: 650;
}

.toilet-card__copy > span {
  margin-top: 1px;
  color: #8d99aa;
  font-size: 7px;
}

.toilet-card__tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
  color: #94a0b0;
  font-size: 6.5px;
}

.toilet-card__tags span {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.toilet-card__state {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.availability {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 7px;
  font-weight: 600;
  white-space: nowrap;
}

.availability i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.availability--free {
  color: var(--green-700);
}

.availability--free i {
  background: var(--green-600);
}

.availability--occupied {
  color: var(--red-700);
}

.availability--occupied i {
  background: #f04438;
}

.toilet-card__state .button {
  height: 25px;
  padding: 0 8px;
  font-size: 7.5px;
}

.ai-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin-top: 10px;
  color: #9ca6b4;
  font-size: 6.5px;
  line-height: 1.4;
}

.ai-disclaimer svg {
  flex: none;
}

.is-scanning {
  opacity: 0.45;
  filter: saturate(0.5);
  transition: opacity 200ms ease;
}

#scan-toilets.is-loading svg {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============ Modals and panels ============ */
.modal-layer,
.side-panel-layer {
  position: fixed;
  z-index: 100;
  inset: 0;
}

.modal-backdrop,
.side-panel__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 20, 40, 0.48);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 180ms ease;
}

.modal {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(94vw, 620px);
  max-height: min(90vh, 850px);
  margin: 5vh auto;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 17px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(8px) scale(0.99);
  transition: opacity 180ms ease, transform 180ms ease;
}

.modal--sm {
  width: min(92vw, 440px);
}

.modal--md {
  width: min(94vw, 640px);
}

.modal--lg {
  width: min(96vw, 800px);
}

.modal--xl {
  width: min(96vw, 940px);
}

.modal-layer.is-open .modal-backdrop,
.side-panel-layer.is-open .side-panel__backdrop {
  opacity: 1;
}

.modal-layer.is-open .modal {
  opacity: 1;
  transform: none;
}

.modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex: none;
  gap: 15px;
  padding: 20px 22px 13px;
  border-bottom: 1px solid #eef2f7;
}

.modal__heading h2 {
  color: #15253e;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.35px;
  line-height: 1.2;
}

.modal__heading p {
  margin-top: 3px;
  color: #8491a4;
  font-size: 9px;
}

.modal__close {
  width: 33px;
  height: 33px;
  flex: none;
  background: #f7f9fc;
  border-color: transparent;
}

.modal__body {
  flex: 1;
  min-height: 0;
  padding: 17px 22px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #d7e1ee transparent;
}

.modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: none;
  flex-wrap: wrap;
  gap: 7px;
  padding: 13px 22px;
  background: #fbfcfe;
  border-top: 1px solid #eef2f7;
  border-radius: 0 0 17px 17px;
}

.modal-lead {
  margin-bottom: 12px;
  color: #75839a;
  font-size: 9.5px;
  line-height: 1.55;
}

.modal-section {
  margin-top: 14px;
  padding-top: 11px;
  border-top: 1px solid #eef2f7;
}

.modal-section h4 {
  color: #8491a3;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.modal-copy {
  margin-top: 5px;
  color: #4e6079;
  font-size: 9.5px;
  line-height: 1.55;
}

.modal-copy--muted {
  color: #7c8a9e;
}

.modal-patient-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 11px;
  padding: 9px 10px;
  background: #f9fbfd;
  border: 1px solid #edf2f8;
  border-radius: 8px;
}

.modal-patient-strip > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.modal-patient-strip strong {
  color: #4b5d74;
  font-size: 8.5px;
  font-weight: 600;
}

.modal-patient-strip > div:last-child {
  align-items: flex-end;
}

.confirm-text {
  margin-bottom: 12px;
  color: #65748a;
  font-size: 10px;
  line-height: 1.6;
}

.confirm-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 9px;
  color: #7d8a9e;
  font-size: 8.5px;
  background: #f8fafc;
  border: 1px solid #edf1f7;
  border-radius: 7px;
}

.confirm-details span {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Forms */
.field {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 4px;
}

.field--wide {
  grid-column: 1 / -1;
}

.field__label {
  display: flex;
  align-items: center;
  gap: 3px;
  color: #596a81;
  font-size: 8.5px;
  font-weight: 600;
}

.field__label em {
  color: var(--red-600);
  font-style: normal;
}

.field__label small {
  color: #9ba6b5;
  font-size: 7px;
  font-weight: 400;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  padding: 0 10px;
  color: #263850;
  font-size: 10px;
  background: #fff;
  border: 1px solid #dce4ee;
  border-radius: 7px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.field input,
.field select {
  height: 36px;
}

.field textarea {
  min-height: 66px;
  padding: 8px 10px;
  line-height: 1.5;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #a4afbe;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #97b9f8;
  box-shadow: 0 0 0 3px rgba(36, 89, 223, 0.08);
}

.field input.is-invalid,
.field select.is-invalid,
.field textarea.is-invalid,
.vital-field input.is-invalid {
  border-color: #e58b83;
  background: #fffafa;
}

.field select {
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236c7b90' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  appearance: none;
}

.field__hint {
  color: #9aa5b4;
  font-size: 6.8px;
  line-height: 1.4;
}

.field__error {
  min-height: 0;
  color: var(--red-700);
  font-size: 7px;
  line-height: 1.3;
}

.field__error:empty {
  display: none;
}

.input-unit {
  position: relative;
  display: flex;
  align-items: center;
}

.input-unit input {
  padding-right: 42px;
}

.input-unit > span {
  position: absolute;
  right: 8px;
  color: #a2acba;
  font-size: 6.5px;
  pointer-events: none;
}

.form-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 12px;
  padding: 8px 10px;
  color: #64758d;
  font-size: 8px;
  background: #f5f9ff;
  border: 1px solid #e6eefb;
  border-radius: 7px;
}

.form-note svg {
  flex: none;
  color: #6f86a8;
}

.form-section {
  padding: 12px 0;
  border-top: 1px solid #eef2f7;
}

.form-section:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.form-section--compact {
  padding-bottom: 0;
}

.form-section__head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 9px;
}

.form-section__number {
  display: grid;
  flex: none;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #6a82a7;
  font-size: 7.5px;
  font-weight: 700;
  background: #f2f6fc;
  border: 1px solid #e5edf8;
  border-radius: 6px;
}

.form-section__head h3 {
  color: #33455e;
  font-size: 10px;
  font-weight: 650;
}

.form-section__head p {
  margin-top: 1px;
  color: #939faf;
  font-size: 7.5px;
}

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

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

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

.form-grid--split {
  grid-template-columns: minmax(170px, 0.65fr) minmax(230px, 1.35fr);
  align-items: end;
}

.priority-selector {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}

.priority-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px;
  text-align: left;
  background: #fff;
  border: 1px solid #e3e9f2;
  border-radius: 8px;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.priority-option:hover {
  border-color: #c9d6e8;
}

.priority-option__dot {
  flex: none;
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.priority-option--red .priority-option__dot {
  color: var(--red-600);
}

.priority-option--yellow .priority-option__dot {
  color: var(--yellow-600);
}

.priority-option--green .priority-option__dot {
  color: var(--green-600);
}

.priority-option__copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.priority-option__copy strong {
  color: #41526a;
  font-size: 8.5px;
  font-weight: 650;
}

.priority-option__copy span {
  margin-top: 1px;
  color: #919dad;
  font-size: 6.8px;
  line-height: 1.35;
}

.priority-option__check {
  display: none;
  flex: none;
  width: 16px;
  height: 16px;
  place-items: center;
  color: #fff;
  background: var(--blue-600);
  border-radius: 50%;
}

.priority-option.is-selected {
  background: #f8fbff;
  border-color: #8db4ff;
  box-shadow: 0 0 0 2px rgba(36, 89, 223, 0.06);
}

.priority-option.is-selected .priority-option__check {
  display: grid;
}

.priority-selector--compact .priority-option {
  padding: 8px;
}

.priority-selector--compact .priority-option__copy span {
  display: none;
}

.check-field {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 8px 9px;
  cursor: pointer;
  background: #f9fbfd;
  border: 1px solid #edf2f8;
  border-radius: 7px;
}

.check-field input {
  flex: none;
  width: 14px;
  height: 14px;
  margin: 1px 0 0;
  accent-color: var(--blue-600);
}

.check-field > span {
  display: flex;
  flex-direction: column;
}

.check-field strong {
  color: #53657c;
  font-size: 8.5px;
  font-weight: 600;
}

.check-field small {
  margin-top: 1px;
  color: #929ead;
  font-size: 7px;
  line-height: 1.35;
}

.patient-form .form-section:last-child {
  padding-bottom: 2px;
}

/* Vitals modal */
.vitals-reference {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 11px;
}

.vitals-reference__item {
  padding: 8px;
  background: #f9fbfd;
  border: 1px solid #edf2f8;
  border-radius: 7px;
}

.vitals-reference__label {
  display: block;
  color: #8996a8;
  font-size: 7px;
}

.vitals-reference__item strong {
  display: block;
  margin-top: 2px;
  color: #283a52;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.vitals-reference__item strong small {
  margin-left: 2px;
  color: #939fae;
  font-size: 6.5px;
  font-weight: 500;
}

.vitals-reference__state {
  display: block;
  margin-top: 3px;
  color: #909cab;
  font-size: 6.5px;
}

.vitals-reference__item.vital-state--critical {
  background: var(--red-50);
  border-color: #f4d2cf;
}

.vitals-reference__item.vital-state--critical strong,
.vitals-reference__item.vital-state--critical .vitals-reference__state {
  color: var(--red-700);
}

.vitals-reference__item.vital-state--warning {
  background: var(--yellow-50);
  border-color: #f5e4b6;
}

.vitals-reference__item.vital-state--warning strong,
.vitals-reference__item.vital-state--warning .vitals-reference__state {
  color: var(--yellow-700);
}

.vitals-input-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px 10px;
  margin-bottom: 10px;
}

.vital-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vital-field__label {
  color: #596a81;
  font-size: 8.5px;
  font-weight: 600;
}

.vital-field__label small {
  color: #98a3b2;
  font-size: 6.5px;
  font-weight: 400;
}

.vital-field__input {
  position: relative;
  display: flex;
  align-items: center;
}

.vital-field__input input {
  width: 100%;
  height: 37px;
  padding: 0 41px 0 10px;
  color: #263850;
  font-size: 11px;
  font-weight: 600;
  background: #fff;
  border: 1px solid #dce4ee;
  border-radius: 7px;
  outline: 0;
}

.vital-field__input input:focus {
  border-color: #97b9f8;
  box-shadow: 0 0 0 3px rgba(36, 89, 223, 0.08);
}

.vital-field__input > span {
  position: absolute;
  right: 8px;
  color: #9da8b7;
  font-size: 6.5px;
  pointer-events: none;
}

.vitals-form .field {
  margin-top: 2px;
}

/* Assignment */
.assignment-patient {
  padding: 10px;
  background: #f9fbfd;
  border: 1px solid #edf2f8;
  border-radius: 8px;
}

.assignment-patient > div {
  display: flex;
  align-items: center;
  gap: 5px;
}

.assignment-patient > strong {
  display: block;
  margin-top: 5px;
  color: #2b3b54;
  font-size: 11px;
  font-weight: 650;
}

.assignment-patient p {
  margin-top: 2px;
  color: #7b889b;
  font-size: 8px;
  line-height: 1.45;
}

.recommendation-box {
  margin-top: 9px;
  padding: 10px;
  background: #f7fbff;
  border: 1px solid #e2edfc;
  border-left: 2px solid var(--blue-500);
  border-radius: 8px;
}

.recommendation-box__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  color: #476389;
  font-size: 8px;
}

.recommendation-box__head svg {
  color: #5377ad;
}

.recommendation-box__head strong {
  font-weight: 650;
}

.recommendation-box__head > span:last-child {
  color: #94a1b3;
  font-size: 6.5px;
}

.recommendation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 8px;
}

.recommendation-grid > div {
  display: flex;
  flex-direction: column;
}

.recommendation-grid strong {
  margin-top: 2px;
  color: #324862;
  font-size: 9px;
  font-weight: 650;
}

.recommendation-grid small {
  margin-top: 1px;
  color: #8593a6;
  font-size: 7px;
}

.recommendation-box__note {
  margin-top: 7px;
  color: #95a1b0;
  font-size: 6.8px;
  line-height: 1.4;
}

.assign-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 10px;
}

.assignment-preview {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 31px;
  padding: 7px 8px;
  color: #536a8b;
  font-size: 7.5px;
  background: #f8fafc;
  border: 1px dashed #e2e9f2;
  border-radius: 6px;
}

.assignment-preview span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.assign-form .check-field {
  grid-column: 1 / -1;
}

/* Prealert modal */
.prealert-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 11px;
  background: #f9fbfd;
  border: 1px solid #edf2f8;
  border-radius: 9px;
}

.prealert-head__person {
  display: flex;
  align-items: center;
  gap: 9px;
}

.prealert-head__icon {
  display: grid;
  flex: none;
  width: 37px;
  height: 37px;
  place-items: center;
  color: #3c5c8d;
  background: #eef5ff;
  border: 1px solid #dfeafb;
  border-radius: 9px;
}

.prealert-head__person h3 {
  margin-top: 1px;
  color: #21324b;
  font-size: 13px;
  font-weight: 650;
}

.prealert-head__person p {
  color: #8d99aa;
  font-size: 8px;
}

.prealert-head__status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex: none;
}

.prealert-head__status > span:last-child {
  color: #9ba5b4;
  font-size: 7px;
}

.prealert-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.prealert-facts > div {
  display: flex;
  flex-direction: column;
  padding: 7px;
  background: #fbfcfe;
  border: 1px solid #eef2f7;
  border-radius: 6px;
}

.prealert-facts > div > span:first-child {
  color: #8f9cad;
  font-size: 6.5px;
}

.prealert-facts strong {
  margin-top: 2px;
  color: #4a5c73;
  font-size: 8px;
  font-weight: 600;
}

.prealert-facts .triage-badge {
  align-self: flex-start;
  margin-top: 2px;
  height: 19px;
  font-size: 7.5px;
}

.status-timeline {
  margin-top: 7px;
}

.status-step {
  position: relative;
  display: flex;
  gap: 8px;
  padding-bottom: 9px;
}

.status-step:last-child {
  padding-bottom: 0;
}

.status-step::before {
  position: absolute;
  top: 12px;
  left: 6px;
  width: 1px;
  height: calc(100% - 6px);
  content: "";
  background: #e5ebf3;
}

.status-step:last-child::before {
  display: none;
}

.status-step__dot {
  position: relative;
  z-index: 1;
  display: grid;
  flex: none;
  width: 13px;
  height: 13px;
  margin-top: 1px;
  place-items: center;
  color: #fff;
  background: var(--blue-600);
  border-radius: 50%;
}

.status-step > div {
  display: flex;
  flex-direction: column;
}

.status-step strong {
  color: #4f6078;
  font-size: 8px;
  font-weight: 650;
}

.status-step span {
  margin-top: 1px;
  color: #99a4b4;
  font-size: 7px;
}

/* Staff modal */
.staff-profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px;
  background: #f9fbfd;
  border: 1px solid #edf2f8;
  border-radius: 8px;
}

.staff-profile-head > div:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.staff-profile-head > div:first-child > div {
  display: flex;
  flex-direction: column;
}

.staff-profile-head strong {
  color: #34465e;
  font-size: 9.5px;
  font-weight: 650;
}

.staff-profile-head p {
  margin-top: 1px;
  color: #929eae;
  font-size: 7.5px;
}

.staff-profile-load {
  min-width: 120px;
}

.staff-profile-load > span {
  color: #8f9bac;
  font-size: 7px;
}

.staff-profile-load > strong {
  float: right;
  font-size: 8px;
}

.staff-profile-load .progress {
  margin-top: 4px;
}

.staff-patient-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 6px;
}

.staff-patient {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 6px;
  padding: 6px;
  text-align: left;
  background: #fbfcfe;
  border: 1px solid #edf2f8;
  border-radius: 6px;
}

.staff-patient:hover {
  background: #f7faff;
  border-color: #dce8fa;
}

.staff-patient strong {
  color: #40526a;
  font-size: 8.5px;
  font-weight: 600;
}

.staff-patient small {
  margin-left: auto;
  color: #9ba6b5;
  font-size: 7px;
}

.staff-patient > svg {
  color: #acb7c6;
}

.bed-detail {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px;
  background: #f9fbfd;
  border: 1px solid #edf2f8;
  border-radius: 8px;
}

.bed-detail__icon {
  display: grid;
  flex: none;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #5e7ea6;
  background: #f0f6ff;
  border: 1px solid #e1ebfa;
  border-radius: 10px;
}

.bed-detail h3 {
  margin-top: 4px;
  color: #30425b;
  font-size: 11px;
  font-weight: 650;
}

.bed-detail p {
  margin-top: 2px;
  color: #7e8b9e;
  font-size: 8px;
  line-height: 1.45;
}

.bed-status {
  display: inline-flex;
  padding: 2px 5px;
  color: #5c6d84;
  font-size: 6.5px;
  font-weight: 650;
  background: #f2f5f9;
  border-radius: 4px;
}

.bed-status--free {
  color: #315f9f;
  background: #eef5ff;
}

.bed-status--occupied {
  color: #6d7a8d;
  background: #f2f5f9;
}

.bed-status--reserved {
  color: #8b6b38;
  background: var(--yellow-50);
}

/* ============ Notifications panel ============ */
.side-panel {
  position: absolute;
  inset: 0 0 0 auto;
  display: flex;
  flex-direction: column;
  width: min(var(--panel-width, 460px), 94vw);
  background: #fff;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: -18px 0 60px rgba(6, 16, 34, 0.18);
  transform: translateX(22px);
  opacity: 0;
  transition: transform 220ms ease, opacity 200ms ease;
}

.side-panel-layer.is-open .side-panel {
  transform: none;
  opacity: 1;
}

.side-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 20px 15px;
  border-bottom: 1px solid #eef2f7;
}

.side-panel__header h2 {
  color: #15253e;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.side-panel__header p {
  margin-top: 3px;
  color: #8693a6;
  font-size: 8.5px;
}

.side-panel__header .icon-button {
  width: 33px;
  height: 33px;
  background: #f7f9fc;
  border-color: transparent;
}

.side-panel__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #d7e1ee transparent;
}

.panel-tabs {
  display: flex;
  gap: 3px;
  margin: 13px 18px 0;
  padding: 3px;
  background: #f4f7fb;
  border: 1px solid #eef2f8;
  border-radius: 8px;
}

.panel-tab {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  height: 30px;
  gap: 4px;
  color: #748297;
  font-size: 9px;
  font-weight: 600;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
}

.panel-tab.is-active {
  color: #2c405c;
  background: #fff;
  border-color: #e5ebf3;
  box-shadow: var(--shadow-xs);
}

.tab-count {
  display: inline-grid;
  min-width: 16px;
  height: 15px;
  padding: 0 4px;
  place-items: center;
  color: #5e6f87;
  font-size: 7px;
  font-weight: 700;
  background: #eef2f7;
  border-radius: 4px;
}

.panel-tab.is-active .tab-count {
  color: #fff;
  background: var(--blue-600);
}

.panel-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 19px 7px;
  color: #8d99aa;
  font-size: 7.5px;
}

.panel-muted {
  color: #a2acba;
  font-size: 7px;
}

.notification-list {
  padding: 0 12px 18px;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  width: 100%;
  gap: 9px;
  padding: 9px 8px;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #f0f3f8;
  border-radius: 7px;
}

.notification-item:hover {
  background: #fbfcff;
}

.notification-item.is-unread {
  background: #f8fbff;
}

.notification-item__icon {
  display: grid;
  flex: none;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #647d9f;
  background: #f2f6fc;
  border: 1px solid #e7eef8;
  border-radius: 8px;
}

.notification-item__icon--critical {
  color: var(--red-700);
  background: var(--red-50);
  border-color: #f6d5d2;
}

.notification-item__icon--ambulance {
  color: #3f6199;
  background: #eff5ff;
  border-color: #e1ebfc;
}

.notification-item__icon--assignment {
  color: #637c9f;
}

.notification-item__copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.notification-item__title {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #31435b;
  font-size: 9px;
  font-weight: 650;
}

.unread-dot {
  flex: none;
  width: 5px;
  height: 5px;
  background: var(--blue-600);
  border-radius: 50%;
}

.notification-item__message {
  display: -webkit-box;
  margin-top: 2px;
  overflow: hidden;
  color: #7e8b9e;
  font-size: 8px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.notification-item__meta {
  margin-top: 3px;
  color: #a0aab8;
  font-size: 7px;
}

.notification-item__chevron {
  flex: none;
  margin-top: 7px;
  color: #bdc6d2;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 0 14px 18px;
}

.task-item {
  display: grid;
  grid-template-columns: 19px minmax(0, 1fr);
  gap: 8px;
  padding: 10px;
  background: #fbfcfe;
  border: 1px solid #e9eff6;
  border-left: 2px solid #c4d3e8;
  border-radius: 8px;
}

.task-item--critical {
  border-left-color: var(--red-600);
}

.task-item--high {
  border-left-color: var(--yellow-600);
}

.task-check {
  display: grid;
  width: 17px;
  height: 17px;
  padding: 0;
  place-items: center;
  color: transparent;
  background: #fff;
  border: 1px solid #cbd6e4;
  border-radius: 4px;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.task-check:hover {
  color: #fff;
  background: var(--blue-600);
  border-color: var(--blue-600);
}

.task-item__body {
  min-width: 0;
}

.task-item__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}

.task-item__kind {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #7c8ca2;
  font-size: 6.5px;
  font-weight: 600;
}

.task-item--critical .task-item__kind {
  color: var(--red-700);
}

.task-item__due {
  color: #9ca6b4;
  font-size: 6.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.task-item__body > strong {
  display: block;
  margin-top: 4px;
  color: #34465e;
  font-size: 9px;
  font-weight: 650;
}

.task-item__body > p {
  margin-top: 2px;
  color: #8591a2;
  font-size: 7.5px;
  line-height: 1.4;
}

.task-item__actions {
  margin-top: 4px;
}

/* ============ Role modal ============ */
.role-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 12px;
}

.role-option {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px;
  text-align: left;
  background: #fff;
  border: 1px solid #e4eaf2;
  border-radius: 9px;
  transition: border-color var(--transition), background var(--transition);
}

.role-option:hover {
  border-color: #c8d6e8;
}

.role-option.is-selected {
  background: #f8fbff;
  border-color: #8fb4f7;
  box-shadow: 0 0 0 2px rgba(36, 89, 223, 0.05);
}

.role-option__icon {
  display: grid;
  flex: none;
  width: 31px;
  height: 31px;
  place-items: center;
  color: #5d7696;
  background: #f2f7fd;
  border: 1px solid #e6edf7;
  border-radius: 8px;
}

.role-option.is-selected .role-option__icon {
  color: #315db3;
  background: #edf4ff;
  border-color: #d9e7fd;
}

.role-option__copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.role-option__copy strong {
  color: #3c4e66;
  font-size: 10.5px;
  font-weight: 650;
}

.role-option__copy span {
  margin-top: 3px;
  color: #7d8b9f;
  font-size: 8.5px;
  line-height: 1.45;
}

.role-option__copy small {
  margin-top: 4px;
  color: #a0aab8;
  font-size: 7.5px;
}

.role-option__check {
  display: none;
  flex: none;
  width: 15px;
  height: 15px;
  place-items: center;
  color: #fff;
  background: var(--blue-600);
  border-radius: 50%;
}

.role-option.is-selected .role-option__check {
  display: grid;
}

.permission-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 9px;
  color: #66788f;
  font-size: 7.5px;
  line-height: 1.45;
  background: #f7faff;
  border: 1px solid #e8effa;
  border-radius: 7px;
}

.permission-note svg {
  flex: none;
  color: #6e86a8;
}

.permission-note p {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.permission-note strong {
  font-weight: 650;
}

.demo-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid #f0f3f8;
}

.demo-controls > div {
  display: flex;
  flex-direction: column;
}

.demo-controls strong {
  color: #4e6078;
  font-size: 8.5px;
  font-weight: 650;
}

.demo-controls span {
  margin-top: 1px;
  color: #949faf;
  font-size: 7px;
}

/* ============ Toasts ============ */
.toast-root {
  position: fixed;
  right: 24px;
  bottom: 22px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  width: 100%;
  gap: 8px;
  padding: 11px 10px;
  color: #fff;
  background: #132540;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  box-shadow: 0 12px 38px rgba(7, 17, 34, 0.24);
  pointer-events: auto;
  animation: toast-in 220ms ease both;
}

.toast.is-leaving {
  animation: toast-out 220ms ease both;
}

.toast--success {
  background: #123b34;
  border-color: rgba(79, 196, 153, 0.22);
}

.toast--error {
  background: #4b1d1c;
  border-color: rgba(255, 148, 138, 0.2);
}

.toast__icon {
  display: grid;
  flex: none;
  width: 25px;
  height: 25px;
  place-items: center;
  color: #b9ccf3;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
}

.toast--success .toast__icon {
  color: #a7ebd1;
}

.toast--error .toast__icon {
  color: #ffc2bd;
}

.toast__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}

.toast__body strong {
  font-size: 8.5px;
  font-weight: 650;
}

.toast__body span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 8.5px;
  line-height: 1.45;
}

.toast__close {
  flex: none;
  padding: 2px;
  color: rgba(255, 255, 255, 0.48);
  background: transparent;
  border: 0;
}

.toast__close:hover {
  color: #fff;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(6px) scale(0.99);
  }
}

/* ============ Misc pages ============ */
.not-found-page {
  display: grid;
  min-height: calc(100vh - var(--topbar-height) - 70px);
  place-items: center;
}

.not-found-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 410px;
  padding: 38px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}

.not-found-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 14px;
  place-items: center;
  color: #6c84a8;
  background: #f3f7fd;
  border: 1px solid #e4ecf7;
  border-radius: 15px;
}

.not-found-card h1 {
  margin-top: 5px;
  color: #1a2b44;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.not-found-card p {
  margin: 7px 0 16px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.noscript-message {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  padding: 24px;
  place-items: center;
  color: #fff;
  font-size: 16px;
  background: #0d1b36;
}
/* =========================================================
   Readability pass — primary clinical content stays legible
   ========================================================= */
.brand__copy strong {
  font-size: 20px;
}

.brand__copy small {
  font-size: 9.5px;
}

.nav-group__label {
  font-size: 9.5px;
}

.nav-item {
  height: 42px;
  font-size: 13px;
}

.facility-context__copy strong {
  font-size: 12px;
}

.facility-context__copy small {
  font-size: 9.5px;
}

.sidebar-user__copy strong {
  font-size: 12px;
}

.sidebar-user__copy small {
  font-size: 9px;
}

.breadcrumbs,
.breadcrumbs strong {
  font-size: 12px;
}

.global-search input {
  font-size: 12px;
}

.button {
  font-size: 12px;
}

.button--small {
  font-size: 11px;
}

.button--topbar {
  font-size: 11.5px;
}

.text-button {
  font-size: 11px;
}

.page-heading p {
  font-size: 13px;
}

.page-eyebrow {
  font-size: 10.5px;
}

.shift-pill strong {
  font-size: 11.5px;
}

.shift-pill small {
  font-size: 9.5px;
}

.card-heading h2 {
  font-size: 15.5px;
}

.card-heading p {
  font-size: 11.5px;
}

.card-link {
  font-size: 11px;
}

.card-footer-note {
  font-size: 9.5px;
}

.stat-card__label {
  font-size: 11.5px;
}

.stat-card__value {
  font-size: 30px;
}

.stat-card__foot {
  font-size: 9.5px;
}

.stat-badge {
  font-size: 8px;
}

.filter-chip {
  font-size: 10.5px;
}

.table-search input,
.search-field input {
  font-size: 10.5px;
}

.patient-table__head {
  font-size: 8.5px;
}

.patient-cell__copy > strong {
  font-size: 12px;
}

.patient-cell__copy > span {
  font-size: 9px;
}

.patient-cell--time strong {
  font-size: 10.5px;
}

.patient-cell--time span {
  font-size: 9px;
}

.team-names strong {
  font-size: 10px;
}

.team-names small {
  font-size: 8.5px;
}

.triage-badge {
  font-size: 10px;
}

.status-badge {
  font-size: 9.5px;
}

.cell-sub {
  font-size: 7.5px;
}

.incoming-item__person strong {
  font-size: 12px;
}

.incoming-item__person span {
  font-size: 9px;
}

.mini-vitals small {
  font-size: 7.5px;
}

.mini-vitals strong {
  font-size: 10px;
}

.incoming-item__foot .prealert-status {
  font-size: 9.5px;
}

.staff-load-copy strong {
  font-size: 10px;
}

.staff-load-copy span {
  font-size: 8.5px;
}

.activity-row__copy strong {
  font-size: 10.5px;
}

.activity-row__copy span {
  font-size: 9.5px;
}

.activity-row__meta {
  font-size: 8px;
}

.overview-counter > span {
  font-size: 9.5px;
}

.overview-counter strong {
  font-size: 20px;
}

.overview-counter small {
  font-size: 8px;
}

.directory-result {
  font-size: 9px;
}

.patient-header__meta {
  font-size: 10px;
}

.patient-header__eyebrow {
  font-size: 9.5px;
}

.vital-tile__top {
  font-size: 9.5px;
}

.vital-tile__value {
  font-size: 22px;
}

.vital-tile__foot {
  font-size: 7.5px;
}

.chart-label {
  font-size: 9px;
}

.vitals-history .data-table td {
  font-size: 9px;
}

.notes-timeline .note-item__head strong {
  font-size: 9.5px;
}

.notes-timeline .note-item__copy p {
  font-size: 10px;
}

.note-item__copy small {
  font-size: 8.5px;
}

.info-list dt {
  font-size: 8.5px;
}

.info-list dd {
  font-size: 9.5px;
}

.clinical-summary > p {
  font-size: 9.5px;
}

.current-triage > div strong {
  font-size: 10.5px;
}

.current-triage > div span {
  font-size: 8.5px;
}

.triage-history__head strong {
  font-size: 8.5px;
}

.triage-history__item p {
  font-size: 8.5px;
}

.team-member strong {
  font-size: 9.5px;
}

.team-member small {
  font-size: 8px;
}

.history-event__copy strong {
  font-size: 9px;
}

.history-event__copy p {
  font-size: 8.5px;
}

.triage-summary {
  font-size: 9.5px;
}

.triage-summary strong {
  font-size: 12px;
}

.triage-column__title h2 {
  font-size: 12px;
}

.triage-column__title p {
  font-size: 8.5px;
}

.triage-column__meta {
  font-size: 8px;
}

.triage-card__person h3 {
  font-size: 11px;
}

.triage-card__person span {
  font-size: 8px;
}

.triage-card__symptoms {
  font-size: 9px;
}

.triage-card__tags .status-badge {
  font-size: 8px;
}

.vital-chip {
  font-size: 8px;
}

.triage-card__team {
  font-size: 8px;
}

.mini-action {
  font-size: 8.5px;
}

.transfer-card__person h3 {
  font-size: 12px;
}

.transfer-card__person p {
  font-size: 9px;
}

.transfer-card__meta {
  font-size: 8px;
}

.transfer-card__vitals strong {
  font-size: 9.5px;
}

.transfer-step {
  font-size: 7.5px;
}

.transfer-step small {
  font-size: 7px;
}

.staff-table__head {
  font-size: 8px;
}

.staff-row__identity strong {
  font-size: 10.5px;
}

.staff-row__identity span {
  font-size: 8.5px;
}

.staff-row__shift {
  font-size: 8.5px;
}

.staff-row__patients strong {
  font-size: 11px;
}

.load-label small,
.load-label strong {
  font-size: 8px;
}

.resource-stat span {
  font-size: 9px;
}

.resource-stat small {
  font-size: 7.5px;
}

.unassigned-item > strong {
  font-size: 10.5px;
}

.unassigned-item > p {
  font-size: 8.5px;
}

.bed-card__label {
  font-size: 9px;
}

.bed-card__patient {
  font-size: 7.5px;
}

.bed-card__status {
  font-size: 7px;
}

.ai-results__head h2 {
  font-size: 16px;
}

.toilet-card__copy > strong {
  font-size: 10px;
}

.toilet-card__copy > span {
  font-size: 8px;
}

.availability {
  font-size: 8px;
}

.form-field input,
.field input,
.field select,
.field textarea {
  font-size: 10.5px;
}

.field__label {
  font-size: 9px;
}

.modal-lead {
  font-size: 10.5px;
}

.notification-item__title {
  font-size: 9.5px;
}

.notification-item__message {
  font-size: 8.5px;
}

.task-item__body > strong {
  font-size: 9.5px;
}

.modal__heading p {
  font-size: 10px;
}

.modal-lead {
  font-size: 10.5px;
}

.form-section__head h3 {
  font-size: 11px;
}

.form-section__head p {
  font-size: 8px;
}

.field__label {
  font-size: 9.5px;
}

.field input,
.field select,
.field textarea {
  font-size: 11px;
}

.priority-option__copy strong {
  font-size: 9.5px;
}

.priority-option__copy span {
  font-size: 7.5px;
}

.check-field strong {
  font-size: 9.5px;
}

.check-field small {
  font-size: 7.5px;
}

.permission-note {
  font-size: 8.5px;
}

.demo-controls strong {
  font-size: 9.5px;
}

.demo-controls span {
  font-size: 7.5px;
}

/* =========================================================
   Boot screen
   ========================================================= */
.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  color: #f5f8ff;
  text-align: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(61, 122, 239, 0.24), transparent 30rem),
    #0d1b36;
}

.boot-screen__mark {
  position: relative;
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 4px;
  place-items: center;
  background: #2459df;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(10, 31, 76, 0.35);
  animation: boot-breathe 1.8s ease-in-out infinite;
}

.boot-screen__mark::before,
.boot-screen__mark::after {
  position: absolute;
  width: 24px;
  height: 6px;
  content: '';
  background: #fff;
  border-radius: 2px;
}

.boot-screen__mark::after {
  transform: rotate(90deg);
}

.boot-screen strong {
  font-size: 19px;
  letter-spacing: 0.02em;
}

.boot-screen p {
  margin: 0;
  color: rgba(203, 219, 242, 0.62);
  font-size: 11px;
}

.boot-screen__bar {
  display: block;
  width: 96px;
  height: 3px;
  margin-top: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
}

.boot-screen__bar i {
  display: block;
  width: 40%;
  height: 100%;
  background: #7fa8ff;
  border-radius: inherit;
  animation: boot-progress 1.15s ease-in-out infinite;
}

@keyframes boot-breathe {
  0%,
  100% {
    box-shadow: 0 18px 40px rgba(10, 31, 76, 0.35);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 18px 46px rgba(36, 89, 223, 0.46);
    transform: scale(1.035);
  }
}

@keyframes boot-progress {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(260%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .boot-screen__mark,
  .boot-screen__bar i {
    animation: none;
  }
}

/* =========================================================
   Responsive behaviour
   ========================================================= */
@media (max-width: 1320px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .stat-card--critical .stat-card__foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
  .global-search {
    width: 220px;
  }

  .topbar-clock {
    min-width: 78px;
  }

  .stat-card {
    padding-right: 14px;
    padding-left: 14px;
  }
}

@media (max-width: 1190px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-bottom {
    grid-template-columns: 1fr;
  }

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

  .patient-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .resources-layout,
  .ambulance-layout,
  .hospital-ambulance-layout {
    grid-template-columns: 1fr;
  }

  .ambulance-side,
  .hospital-ambulance-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .assistant-layout {
    grid-template-columns: minmax(270px, 0.8fr) minmax(0, 1.35fr);
  }

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

@media (max-width: 1100px) {
  .patient-table--directory .patient-table__head,
  .patient-row--large {
    grid-template-columns: minmax(170px, 1.45fr) 82px 118px 70px minmax(135px, 1fr) 26px;
  }

  .patient-table--directory .patient-table__head > :nth-child(6),
  .patient-table--directory .patient-cell--room {
    display: none;
  }
}

@media (max-width: 1080px) {
  :root {
    --sidebar-width: 248px;
  }

  .triage-board {
    grid-template-columns: repeat(3, minmax(215px, 1fr));
  }

  .view,
  .topbar {
    padding-right: 24px;
    padding-left: 24px;
  }

  .global-search {
    width: 195px;
  }

  .global-search kbd,
  .topbar-clock {
    display: none;
  }

  .topbar__right {
    gap: 8px;
  }

  .staff-table__head,
  .staff-row {
    grid-template-columns: 32px minmax(155px, 1.4fr) 88px 54px minmax(116px, 1fr) 18px;
  }

  .triage-board {
    grid-template-columns: repeat(3, minmax(225px, 1fr));
    padding-bottom: 8px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #cfd9e7 transparent;
  }

  .triage-column {
    min-width: 225px;
  }

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

@media (max-width: 900px) {
  .sidebar {
    width: 274px;
    transform: translateX(-100%);
    transition: transform 220ms cubic-bezier(0.22, 0.8, 0.3, 1);
    box-shadow: 22px 0 60px rgba(8, 18, 37, 0.28);
  }

  body.sidebar-open .sidebar {
    transform: none;
  }

  .sidebar__close {
    display: grid;
    width: 31px;
    height: 31px;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
  }

  .sidebar-scrim {
    position: fixed;
    z-index: 45;
    inset: 0;
    display: block;
    visibility: hidden;
    background: rgba(6, 15, 32, 0.46);
    opacity: 0;
    transition: opacity 200ms ease, visibility 200ms ease;
  }

  body.sidebar-open .sidebar-scrim {
    visibility: visible;
    opacity: 1;
  }

  .app-main {
    margin-left: 0;
  }

  .mobile-menu {
    display: inline-grid !important;
    width: 36px;
    height: 36px;
    background: transparent;
    border-color: transparent;
  }

  .topbar {
    height: 68px;
  }

  :root {
    --topbar-height: 68px;
  }

  .view {
    padding-top: 22px;
  }

  .triage-board {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .triage-column {
    min-width: 0;
  }

  .triage-column__body {
    min-height: 100px;
  }

  .triage-toolbar__summary {
    gap: 12px;
  }

  .patient-side {
    grid-template-columns: 1fr;
  }

  .dashboard-side {
    grid-template-columns: 1fr;
  }

  .patient-header {
    align-items: flex-start;
  }

  .patient-header__status {
    align-items: flex-start;
    max-width: 46%;
  }

  .patient-header__badges,
  .patient-header__actions {
    justify-content: flex-start;
  }

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

  .ambulance-summary-row,
  .ambulance-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .assistant-layout {
    grid-template-columns: 1fr;
  }

  .assistant-request {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(230px, 0.7fr);
    align-items: start;
  }

  .assistant-request .card-heading {
    grid-column: 1 / -1;
  }

  .assistant-request .assistant-form {
    padding-top: 4px;
  }

  .assistant-request .assistant-how {
    margin: 4px 0 0;
    padding: 12px;
    background: #f9fbfd;
    border: 1px solid #eef2f8;
    border-radius: 8px;
  }

  .ambulance-side,
  .hospital-ambulance-side {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .view {
    padding: 18px 16px 36px;
  }

  .topbar {
    padding: 0 16px;
  }

  .global-search {
    display: none;
  }

  .breadcrumbs > span:first-child,
  .breadcrumbs > svg {
    display: none;
  }

  .breadcrumbs strong {
    font-size: 11px;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
    margin-bottom: 17px;
  }

  .page-heading__actions {
    width: 100%;
    justify-content: flex-start;
  }

  .page-heading h1 {
    margin-top: 5px;
    font-size: 26px;
  }

  .page-heading p {
    margin-top: 5px;
    font-size: 11px;
  }

  .shift-pill {
    padding: 7px 11px 7px 7px;
  }

  .critical-banner {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
  }

  .critical-banner__copy {
    flex-basis: calc(100% - 52px);
  }

  .critical-banner__copy strong,
  .critical-banner__copy > span:last-child {
    white-space: normal;
  }

  .critical-banner__meta {
    width: 100%;
    justify-content: space-between;
    padding: 7px 0 0 51px;
    border-top: 1px solid #f5e1df;
  }

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

  .stat-card {
    min-height: 124px;
    padding: 13px;
  }

  .stat-card__value {
    font-size: 26px;
  }

  .stat-card__label {
    font-size: 10px;
  }

  .stat-card__foot {
    flex-wrap: wrap;
    gap: 4px;
    font-size: 8.5px;
  }

  .stat-card--critical .stat-card__foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .dashboard-layout,
  .dashboard-bottom {
    margin-top: 10px;
  }

  .table-toolbar {
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 10px;
  }

  .table-toolbar .filter-chips {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .table-toolbar .filter-chips::-webkit-scrollbar {
    display: none;
  }

  .table-search {
    width: 100%;
  }

  .patient-table {
    border-top: 0;
    background: #f6f9fd;
  }

  .patient-table__head {
    display: none;
  }

  .patient-table__body {
    max-height: none;
    padding: 2px 0;
    overflow: visible;
  }

  .patient-row,
  .patient-table--directory .patient-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "person priority"
      "status time"
      "team team";
    min-height: 0;
    margin: 8px;
    padding: 11px;
    row-gap: 7px;
    background: #fff;
    border: 1px solid #e9eff6;
    border-radius: 9px;
    box-shadow: var(--shadow-xs);
  }

  .patient-row:last-child {
    border-bottom: 1px solid #e9eff6;
  }

  .patient-cell--person {
    grid-area: person;
  }

  .patient-cell--priority {
    grid-area: priority;
    align-items: flex-end;
  }

  .patient-cell--status {
    grid-area: status;
  }

  .patient-cell--time {
    grid-area: time;
    align-items: flex-end;
  }

  .patient-cell--team {
    grid-area: team;
    padding-top: 6px;
    border-top: 1px solid #f1f4f8;
  }

  .patient-cell--room,
  .patient-cell--actions,
  .patient-row__chevron {
    display: none;
  }

  .patient-cell__copy > strong {
    font-size: 11.5px;
  }

  .patient-table--directory .patient-row {
    grid-template-areas:
      "person priority"
      "status time"
      "room team";
  }

  .patient-table--directory .patient-cell--room {
    display: flex;
    grid-area: room;
    align-items: flex-start;
    padding-top: 6px;
    border-top: 1px solid #f1f4f8;
  }

  .patient-table--directory .patient-cell--team {
    border-top: 1px solid #f1f4f8;
  }

  .directory-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 9px;
    padding: 14px;
  }

  .directory-subtoolbar {
    align-items: flex-start;
    padding: 0 14px 11px;
  }

  .directory-result {
    width: 100%;
    margin-left: 0;
    padding-top: 2px;
  }

  .patient-overview-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 0;
  }

  .overview-counter {
    padding: 7px 10px;
  }

  .overview-counter:nth-child(3n) {
    border-right: 0;
  }

  .overview-counter:nth-child(n + 4) {
    border-top: 1px solid #eef2f7;
    padding-top: 9px;
  }

  .overview-counter strong {
    font-size: 17px;
  }

  .patient-header {
    flex-direction: column;
    gap: 13px;
    padding: 14px;
  }

  .patient-header__identity {
    align-items: flex-start;
    width: 100%;
  }

  .patient-avatar-large {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    font-size: 15px;
  }

  .patient-header h1 {
    max-width: 100%;
    font-size: 21px;
    letter-spacing: -0.45px;
  }

  .patient-header__status {
    align-items: flex-start;
    width: 100%;
    max-width: none;
    gap: 7px;
    padding-top: 11px;
    border-top: 1px solid #f0f3f8;
  }

  .patient-header__actions {
    width: 100%;
  }

  .patient-header__actions .button {
    flex: 1;
  }

  .allergy-banner {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .allergy-banner__note {
    width: 100%;
    margin-left: 23px;
  }

  .patient-side {
    grid-template-columns: 1fr;
  }

  .vitals-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-right: 14px;
    padding-left: 14px;
  }

  .vitals-chart-wrap,
  .vitals-history {
    margin-right: 14px;
    margin-left: 14px;
  }

  .notes-timeline,
  .history-timeline {
    padding-right: 14px;
    padding-left: 14px;
  }

  .vitals-card .card-heading {
    padding-right: 14px;
    padding-left: 14px;
  }

  .last-updated {
    font-size: 7px;
  }

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

  .form-grid--five .field--wide {
    grid-column: 1 / -1;
  }

  .priority-selector {
    gap: 4px;
  }

  .priority-option {
    padding: 8px 6px;
    gap: 5px;
  }

  .priority-option__copy span {
    display: none;
  }

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

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

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

  .assign-form .field,
  .assignment-preview,
  .assign-form .check-field {
    grid-column: 1;
  }

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

  .modal {
    width: calc(100vw - 18px);
    max-height: calc(100dvh - 22px);
    margin: 11px auto;
    border-radius: 14px;
  }

  .modal__header {
    padding: 16px 15px 11px;
  }

  .modal__heading h2 {
    font-size: 16px;
  }

  .modal__body {
    padding: 13px 15px;
  }

  .modal__footer {
    padding: 11px 15px;
    border-radius: 0 0 14px 14px;
  }

  .role-list {
    grid-template-columns: 1fr;
  }

  .role-option__copy span {
    font-size: 7.5px;
  }

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

  .triage-toolbar__actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .triage-toolbar__actions .table-search {
    width: 100%;
    flex: 1 1 100%;
  }

  .triage-toolbar__actions .button {
    flex: 1;
  }

  .triage-summary {
    font-size: 8px;
  }

  .triage-column__body {
    padding: 7px;
  }

  .ambulance-stats {
    gap: 7px;
    margin-bottom: 10px;
  }

  .ambulance-stats > div {
    padding: 9px 10px;
  }

  .ambulance-stats span {
    font-size: 7.5px;
  }

  .ambulance-summary-row {
    gap: 7px;
    margin-bottom: 10px;
  }

  .summary-tile {
    padding: 9px 10px;
  }

  .ambulance-stats strong,
  .summary-tile strong {
    font-size: 16px;
  }

  .assistant-request {
    display: block;
  }

  .assistant-request .assistant-how {
    margin: 0 18px;
    padding: 11px 0 0;
    background: transparent;
    border: 0;
    border-top: 1px solid #eef2f7;
    border-radius: 0;
  }

  .prealert-form {
    padding-right: 14px;
    padding-left: 14px;
  }

  .prealert-submit-row {
    align-items: stretch;
  }

  .prealert-submit-row .button {
    width: 100%;
  }

  .transfer-grid {
    grid-template-columns: 1fr;
    padding-right: 12px;
    padding-left: 12px;
  }

  .transfer-card__vitals {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .staff-table__head {
    display: none;
  }

  .staff-table__body {
    padding: 2px 8px 8px;
    background: #f6f9fd;
  }

  .staff-row {
    grid-template-columns: 33px minmax(0, 1fr) auto;
    grid-template-areas:
      "avatar identity load"
      "avatar shift patients";
    min-height: 0;
    margin-top: 7px;
    padding: 10px;
    row-gap: 6px;
    background: #fff;
    border: 1px solid #e9eff6;
    border-radius: 8px;
    box-shadow: var(--shadow-xs);
  }

  .staff-row > .avatar {
    grid-area: avatar;
    align-self: start;
  }

  .staff-row__identity {
    grid-area: identity;
  }

  .staff-row__shift {
    grid-area: shift;
  }

  .staff-row__patients {
    grid-area: patients;
    justify-content: flex-end;
  }

  .staff-row__load {
    grid-area: load;
    width: 135px;
  }

  .staff-row__action {
    display: none;
  }

  .resource-stats {
    gap: 7px;
    margin-bottom: 10px;
  }

  .resource-stat {
    padding: 9px 10px;
  }

  .resource-stat__icon {
    width: 28px;
    height: 28px;
  }

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

  .bed-zones {
    padding-right: 13px;
    padding-left: 13px;
  }

  .critical-bed-highlight,
  .no-critical-bed {
    margin-right: 13px;
    margin-left: 13px;
  }

  .ai-results {
    padding: 13px;
  }

  .ai-recommendation__main {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .toilet-card {
    grid-template-columns: 29px minmax(0, 1fr);
    row-gap: 7px;
  }

  .toilet-card__state {
    grid-column: 2;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .toast-root {
    right: 14px;
    bottom: 14px;
  }

  .side-panel {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .topbar {
    padding: 0 12px;
  }

  .topbar__right {
    gap: 6px;
  }

  .notification-trigger,
  .mobile-menu {
    width: 34px;
    height: 34px;
  }

  .topbar .button--topbar {
    width: 36px;
    height: 36px;
    padding: 0;
    gap: 0;
    font-size: 0;
  }

  .topbar .button--topbar svg {
    width: 17px;
    height: 17px;
  }

  .ambulance-mode {
    display: none;
  }

  .breadcrumbs {
    max-width: 190px;
  }

  .view {
    padding: 16px 12px 32px;
  }

  .page-heading h1 {
    font-size: 24px;
  }

  .page-eyebrow {
    font-size: 9px;
  }

  .stats-grid {
    gap: 7px;
  }

  .stat-card {
    min-height: 119px;
    padding: 11px;
  }

  .stat-icon {
    width: 30px;
    height: 30px;
  }

  .stat-card__value {
    margin-top: 7px;
    font-size: 24px;
  }

  .stat-card__label {
    font-size: 9px;
  }

  .stat-card__foot {
    font-size: 7px;
  }

  .stat-badge {
    font-size: 6.5px;
  }

  .capacity-mini {
    width: 34px;
  }

  .card-heading {
    padding: 15px 14px 11px;
  }

  .card-heading h2 {
    font-size: 13px;
  }

  .card-heading p {
    font-size: 9.5px;
  }

  .patients-card .card-heading {
    padding-left: 14px;
  }

  .table-toolbar {
    padding-right: 14px;
    padding-left: 14px;
  }

  .incoming-list,
  .staff-load-list {
    padding-right: 11px;
    padding-left: 11px;
  }

  .activity-list {
    padding-right: 14px;
    padding-left: 14px;
  }

  .activity-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .activity-row__meta {
    display: none;
  }

  .capacity-overview,
  .zone-list {
    padding-right: 14px;
    padding-left: 14px;
  }

  .capacity-ring {
    width: 74px;
    height: 74px;
  }

  .capacity-ring > div {
    width: 62px;
    height: 62px;
  }

  .patient-overview-bar {
    margin-bottom: 10px;
  }

  .overview-counter {
    padding: 6px 8px;
  }

  .overview-counter > span {
    font-size: 7.5px;
  }

  .overview-counter strong {
    font-size: 16px;
  }

  .overview-counter small {
    font-size: 6.5px;
  }

  .patient-header__identity {
    gap: 10px;
  }

  .patient-avatar-large {
    width: 43px;
    height: 43px;
    font-size: 13px;
    border-radius: 12px;
  }

  .patient-header h1 {
    font-size: 19px;
  }

  .patient-header__meta {
    font-size: 8px;
  }

  .patient-header__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .patient-header__actions .button {
    width: 100%;
  }

  .patient-detail-grid {
    margin-top: 10px;
  }

  .vitals-grid {
    gap: 5px;
  }

  .vital-tile {
    padding: 8px 9px;
  }

  .vital-tile__value {
    font-size: 18px;
  }

  .vitals-chart {
    height: 108px;
  }

  .note-item {
    grid-template-columns: 23px minmax(0, 1fr);
  }

  .note-item__icon {
    width: 22px;
    height: 22px;
  }

  .history-event {
    grid-template-columns: 23px minmax(0, 1fr);
  }

  .history-event__icon {
    width: 22px;
    height: 22px;
  }

  .form-grid,
  .form-grid--four,
  .form-grid--five,
  .form-grid--split {
    grid-template-columns: 1fr;
  }

  .priority-selector {
    grid-template-columns: 1fr;
  }

  .priority-option__copy span {
    display: block;
  }

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

  .modal__footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .modal__footer .button {
    width: 100%;
  }

  .modal__footer .button--ghost {
    grid-column: auto;
  }

  .triage-toolbar__summary {
    gap: 9px;
  }

  .triage-toolbar__actions {
    flex-wrap: wrap;
  }

  .triage-toolbar__actions .button {
    flex: 1;
    min-width: 110px;
  }

  .triage-column__head {
    padding: 11px 12px 9px;
  }

  .ambulance-stats > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .ambulance-stats span {
    width: 100%;
  }

  .ambulance-summary-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-tile > span {
    font-size: 7px;
  }

  .prealert-form {
    padding: 0 12px 14px;
  }

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

  .transfer-card__person {
    gap: 5px;
  }

  .transfer-step {
    font-size: 7px;
  }

  .transfer-step small {
    font-size: 6.5px;
  }

  .resource-stat {
    align-items: flex-start;
  }

  .resource-stat > div {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
  }

  .resource-stat small {
    width: 100%;
    margin-top: 2px;
  }

  .staff-row__load {
    width: 104px;
  }

  .bed-grid {
    grid-template-columns: 1fr;
  }

  .bed-card {
    padding: 8px 10px;
  }

  .assistant-form {
    padding-right: 14px;
    padding-left: 14px;
  }

  .assistant-how {
    margin-right: 14px;
    margin-left: 14px;
  }

  .toilet-card__copy > strong {
    font-size: 8.5px;
  }

  .notification-count {
    top: 2px;
    right: 1px;
  }

  .role-list {
    max-height: 320px;
    overflow-y: auto;
  }

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

  .demo-controls .button {
    width: 100%;
  }

  .side-panel__header {
    padding: 17px 15px 12px;
  }

  .panel-tabs {
    margin-right: 14px;
    margin-left: 14px;
  }

  .notification-list {
    padding-right: 8px;
    padding-left: 8px;
  }

  .toast {
    padding: 9px;
  }

  .toast-root {
    width: calc(100vw - 20px);
    right: 10px;
    bottom: 10px;
  }
}

@media (max-width: 380px) {
  .stat-card__foot > span:first-child .stat-link span {
    display: none;
  }

  .patient-header__actions {
    grid-template-columns: 1fr;
  }

  .triage-summary {
    font-size: 7.5px;
  }
}

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

/* =========================================================
   Authentication
   ========================================================= */
.auth-screen {
  position: relative;
  z-index: 20;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 10%, rgba(75, 124, 243, 0.32), transparent 34%),
    radial-gradient(circle at 82% 88%, rgba(18, 183, 106, 0.16), transparent 30%),
    linear-gradient(145deg, #07142b 0%, #0b1a34 55%, #10213f 100%);
}

.auth-screen::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0.38;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 40%, #000 15%, transparent 78%);
}

.auth-shell {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(1180px, 100%);
  min-height: min(760px, calc(100vh - 48px));
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  box-shadow: 0 40px 110px rgba(2, 9, 24, 0.55);
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
}

.auth-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(32px, 5vw, 64px);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 90% 12%, rgba(157, 184, 255, 0.34), transparent 32%),
    linear-gradient(150deg, #0d1b36 0%, #12305f 58%, #1d4ed8 140%);
}

.auth-brand::before {
  position: absolute;
  top: -110px;
  right: -90px;
  width: 340px;
  height: 340px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  box-shadow:
    0 0 0 46px rgba(255, 255, 255, 0.035),
    0 0 0 92px rgba(255, 255, 255, 0.025);
}

.auth-brand::after {
  position: absolute;
  right: -10%;
  bottom: -28%;
  width: 70%;
  aspect-ratio: 1;
  content: "";
  border-radius: 50%;
  background: radial-gradient(circle, rgba(157, 184, 255, 0.22), transparent 68%);
}

.auth-brand__logo {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.auth-brand__mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #4b7cf3, #2459df);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 11px;
  box-shadow: 0 10px 28px rgba(3, 12, 30, 0.35);
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
}

.auth-brand__copy {
  position: relative;
  z-index: 1;
  margin: auto 0;
  padding: 52px 0 38px;
}

.auth-brand__copy .eyebrow {
  color: #9db8ff;
  letter-spacing: 0.16em;
}

.auth-brand__copy h1 {
  max-width: 560px;
  margin: 18px 0 22px;
  font-family: var(--font-display);
  font-size: clamp(40px, 4.5vw, 62px);
  font-weight: 650;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.auth-brand__copy p {
  max-width: 430px;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  line-height: 1.7;
}

.auth-features {
  position: relative;
  z-index: 1;
  display: grid;
  margin: 0;
  padding: 0;
  gap: 12px;
  list-style: none;
}

.auth-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12.5px;
}

.auth-features span {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  place-items: center;
  color: #9db8ff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.auth-demo-note {
  position: relative;
  z-index: 1;
  margin: 38px 0 0;
  color: rgba(255, 255, 255, 0.44);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(30px, 4.5vw, 58px);
  background:
    radial-gradient(circle at 100% 0%, rgba(238, 244, 255, 0.9), transparent 38%),
    #fff;
}

.auth-card {
  width: min(420px, 100%);
  margin: 0 auto;
}

.auth-card > .eyebrow {
  color: var(--blue-600);
  letter-spacing: 0.14em;
}

.auth-card h2 {
  margin: 10px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.auth-intro {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.auth-field {
  display: grid;
  margin-bottom: 16px;
  gap: 7px;
}

.auth-field > span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.auth-field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    background var(--transition);
}

.auth-field input::placeholder {
  color: var(--subtle);
}

.auth-field input:focus {
  background: #fff;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(75, 124, 243, 0.14);
}

.auth-error {
  margin: 4px 0 14px;
  padding: 10px 12px;
  color: var(--red-700);
  background: var(--red-50);
  border: 1px solid var(--red-100);
  border-radius: 9px;
  font-size: 12.5px;
  line-height: 1.45;
}

.auth-submit {
  width: 100%;
  height: 48px;
  margin-top: 4px;
  justify-content: center;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 650;
}

.auth-submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.auth-demo {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.auth-demo__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 650;
}

.auth-demo__head small {
  color: var(--subtle);
  font-size: 10.5px;
  font-weight: 500;
}

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

.auth-demo__grid button {
  display: grid;
  padding: 9px 11px;
  text-align: left;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
  gap: 2px;
  transition:
    border-color var(--transition),
    background var(--transition),
    transform var(--transition);
}

.auth-demo__grid button:hover {
  background: var(--blue-50);
  border-color: var(--blue-300);
  transform: translateY(-1px);
}

.auth-demo__grid strong {
  color: var(--text);
  font-size: 11.5px;
  font-weight: 650;
}

.auth-demo__grid span {
  color: var(--muted);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 10.5px;
}

.auth-footer {
  margin: 28px auto 0;
  color: var(--subtle);
  font-size: 10.5px;
  text-align: center;
}

@media (max-width: 900px) {
  .auth-screen {
    padding: 14px;
  }

  .auth-shell {
    min-height: calc(100vh - 28px);
    border-radius: 20px;
    grid-template-columns: 1fr;
  }

  .auth-brand {
    padding: 26px 28px 22px;
  }

  .auth-brand__copy {
    padding: 30px 0 8px;
  }

  .auth-brand__copy h1 {
    max-width: none;
    margin: 12px 0 10px;
    font-size: clamp(31px, 8vw, 44px);
  }

  .auth-brand__copy p {
    font-size: 13px;
  }

  .auth-features,
  .auth-demo-note {
    display: none;
  }

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

@media (max-width: 540px) {
  .auth-screen {
    padding: 0;
  }

  .auth-shell {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .auth-brand {
    padding: 22px 20px 14px;
  }

  .auth-brand__copy {
    padding: 20px 0 0;
  }

  .auth-brand__copy h1 {
    font-size: 30px;
    line-height: 1;
  }

  .auth-brand__copy p {
    display: none;
  }

  .auth-panel {
    justify-content: flex-start;
    padding: 26px 20px 34px;
  }

  .auth-card h2 {
    font-size: 28px;
  }

  .auth-demo__grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Profile and permissions
   ========================================================= */
.profile-summary {
  display: flex;
  align-items: center;
  padding: 16px;
  margin-bottom: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  gap: 14px;
}

.profile-avatar {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--blue-500), var(--blue-700));
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(36, 89, 223, 0.22);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.profile-summary__copy {
  min-width: 0;
  flex: 1;
}

.profile-summary__copy .eyebrow {
  color: var(--blue-600);
  font-size: 9.5px;
  letter-spacing: 0.12em;
}

.profile-summary__copy h3 {
  margin: 3px 0 2px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.035em;
}

.profile-summary__copy p {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  color: var(--blue-700);
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 650;
  gap: 5px;
  white-space: nowrap;
}

.permission-chips {
  display: flex;
  flex-wrap: wrap;
  margin-top: 4px;
  gap: 6px;
}

.permission-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  color: var(--text-secondary);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 10.5px;
  font-weight: 550;
  gap: 5px;
}

.permission-chip svg {
  color: var(--green-600);
}

@media (max-width: 560px) {
  .profile-summary {
    flex-wrap: wrap;
  }

  .profile-badge {
    margin-left: 62px;
  }
}

/* =========================================================
   Accessibility helpers
   ========================================================= */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

[hidden] {
  display: none !important;
}

.no-scroll {
  overflow: hidden !important;
}