/* ==========================================================================
   HELTHIO — Hospital App · Layout & Components
   Structure only. Every colour, font, size and radius comes from theme.css.
   ========================================================================== */

/* ---------- Device frame ------------------------------------------------- */
.stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6) var(--space-4);
  background: var(--color-stage);
}

/* Phone preview: same bezel, notch and backdrop as the GP app. app.js
   scales it down (--device-scale) when the window is shorter than the frame. */
.device {
  position: relative;
  flex-shrink: 0;
  width: var(--device-width);
  height: var(--device-height);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: var(--device-bezel) solid var(--color-device-frame);
  border-radius: var(--radius-device);
  background: var(--color-surface);
  box-shadow: var(--shadow-device);
  zoom: var(--device-scale, 1);
}

.statusbar {
  flex: 0 0 var(--statusbar-height);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 var(--space-4) var(--space-1);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  background: var(--color-surface);
}
.statusbar__notch {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 50;
  width: var(--notch-width);
  height: var(--notch-height);
  transform: translateX(-50%);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: var(--color-device-frame);
}
.statusbar--primary {
  color: var(--color-text-inverse);
  background: var(--color-primary);
}
/* Status bar that sits on top of a full-screen gradient (welcome screen) */
.statusbar--clear {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  height: var(--statusbar-height);
  color: var(--color-text-inverse);
  background: transparent;
}

.screen {
  position: relative;
  flex: 1 1 auto;
  overflow-y: auto;
  scrollbar-width: none;
  background: var(--color-bg);
}
.screen::-webkit-scrollbar { display: none; }

/* GP app shows no home indicator; kept in the markup, hidden here */
.home-indicator {
  display: none !important;
  flex: 0 0 var(--home-indicator-height);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
}
.home-indicator::after {
  content: "";
  width: var(--home-bar-width);
  height: var(--home-bar-height);
  border-radius: var(--radius-pill);
  background: var(--color-border-strong);
}

/* Real phones: fill the screen, drop the frame */
@media (max-width: 480px) {
  .stage { padding: 0; align-items: stretch; }
  .device {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    zoom: 1;
  }
  .statusbar, .home-indicator { display: none; }
}

/* ---------- App bar ------------------------------------------------------ */
/* Inner-page header, GP layout: [menu] Title … [actions] [bell] [back] */
.appbar {
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: var(--appbar-height);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  border-bottom: var(--border-width) solid var(--color-border);
}
.appbar__title {
  flex: 1;
  min-width: 0;
}
.appbar__title h1 {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-snug);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.appbar__title p {
  font-size: var(--font-size-xxs);
  color: var(--color-text-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.appbar > .icon-btn {
  flex: 0 0 var(--appbar-btn-size);
  width: var(--appbar-btn-size);
  height: var(--appbar-btn-size);
  border-radius: var(--radius-md);
  background: var(--color-bg);
}
.appbar > .icon-btn:hover { background: var(--color-border); }
.appbar > .icon-btn .icon { width: var(--icon-size); height: var(--icon-size); }
.appbar .btn--sm { min-height: var(--appbar-btn-size); }
.appbar--primary {
  color: var(--color-text-inverse);
  background: var(--color-primary);
  border-bottom: 0;
}
.appbar--primary h1,
.appbar--primary .icon-btn { color: var(--color-text-inverse); }
.appbar--primary .appbar__title p { color: var(--color-on-primary-muted); }

.icon-btn {
  position: relative;
  flex: 0 0 var(--touch-target);
  width: var(--touch-target);
  height: var(--touch-target);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
}
.icon-btn:hover { background: var(--color-muted-soft); }
.icon-btn--inverse { color: var(--color-text-inverse); }
.icon-btn--inverse:hover { background: var(--color-on-primary-fill); }
.appbar--primary .icon-btn:hover { background: var(--color-on-primary-fill); }
.icon-btn .dot {
  position: absolute;
  top: var(--dot-offset);
  right: var(--dot-offset);
  width: var(--dot-size);
  height: var(--dot-size);
  border-radius: var(--radius-pill);
  background: var(--color-emergency);
}
/* Red count bubble on a header button (bell) */
.icon-btn__count {
  position: absolute;
  top: calc(-1 * var(--space-1));
  right: calc(-1 * var(--space-1));
  min-width: var(--badge-count-sm);
  height: var(--badge-count-sm);
  padding: 0 var(--space-1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-caps);
  font-weight: var(--font-weight-bold);
  line-height: 1;
  color: var(--color-text-inverse);
  background: var(--color-emergency);
  pointer-events: none;
}

.icon {
  width: var(--icon-size);
  height: var(--icon-size);
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: var(--icon-stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--sm { width: var(--icon-size-sm); height: var(--icon-size-sm); }
.icon--lg { width: var(--icon-size-lg); height: var(--icon-size-lg); }
.icon--xl { width: var(--icon-size-xl); height: var(--icon-size-xl); }

/* ---------- Content ------------------------------------------------------ */
.content {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-3);
}
.content--flush { padding: 0; gap: 0; }
.content--center {
  min-height: 100%;
  justify-content: center;
  padding: var(--space-6);
}
.with-bottom-nav { padding-bottom: calc(var(--bottomnav-height) + var(--space-4)); }
.with-action-bar { padding-bottom: calc(var(--touch-target) + var(--space-10)); }

.stack { display: flex; flex-direction: column; gap: var(--space-3); }
.stack--sm { gap: var(--space-2); }
.stack--lg { gap: var(--space-5); }
.row { display: flex; align-items: center; gap: var(--space-2); }
.row--between { justify-content: space-between; }
.row--top { align-items: flex-start; }
.row--wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
.text-center { text-align: center; }
.muted { color: var(--color-text-muted); }
.subtle { color: var(--color-text-subtle); }
.strong { font-weight: var(--font-weight-bold); }
.medium { font-weight: var(--font-weight-medium); }
.text-sm { font-size: var(--font-size-sm); }
.text-xs { font-size: var(--font-size-xs); }
.text-lg { font-size: var(--font-size-lg); }
.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.text-emergency { color: var(--color-emergency); }
.text-urgent { color: var(--color-urgent); }
.nowrap { white-space: nowrap; }
.divider {
  height: var(--border-width);
  margin: 0;
  border: 0;
  background: var(--color-border);
}
.is-hidden { display: none !important; }
.is-role-hidden { display: none !important; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.text-left { text-align: left; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
}
.section-head h2 { font-size: var(--font-size-md); }
.section-head a { font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold); }

/* ---------- Cards -------------------------------------------------------- */
.card {
  display: block;
  padding: var(--card-pad);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  color: var(--color-text);
}
/* .card sets display:block after .stack/.row set flex, which dropped the
   gap between a card's children (progress bar touching the buttons below
   it on cme.html, and the same on every other "card stack"). */
.card.stack { display: flex; }
.card.row { display: flex; }
a.card:hover { border-color: var(--color-primary); }
.card--soft { background: var(--color-surface-soft); border-color: transparent; box-shadow: none; }
.card--primary {
  color: var(--color-text-inverse);
  background: var(--gradient-primary);
  border-color: transparent;
  box-shadow: var(--shadow-hero);
}
.card--primary h2, .card--primary h3 { color: var(--color-text-inverse); }
.card--primary .muted { color: var(--color-on-primary-muted); }
.card--emergency { border-left: var(--accent-border-width) solid var(--color-emergency); }
.card--urgent { border-left: var(--accent-border-width) solid var(--color-urgent); }
.card--normal { border-left: var(--accent-border-width) solid var(--color-normal); }
.card h3 { font-size: var(--font-size-md); }

/* Gradient header block (case manager, medical tourism) */
.hero {
  position: relative;
  overflow: hidden;
  padding: var(--space-3) var(--space-3) var(--space-5);
  color: var(--color-text-inverse);
  background: var(--gradient-sheen), var(--gradient-primary);
}
.hero h1, .hero h2 { color: var(--color-text-inverse); }
.hero .muted { color: var(--color-on-primary-muted); }
.hero .icon-btn--inverse {
  flex: 0 0 var(--header-btn-size);
  width: var(--header-btn-size);
  height: var(--header-btn-size);
  background: var(--color-on-primary-fill-strong);
}

/* ---------- Summary stats ------------------------------------------------ */
.stat {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
}
.stat__value {
  display: block;
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
}
.stat__label {
  font-size: var(--font-size-xxs);
  color: var(--color-text-muted);
}
.hero .stat {
  background: var(--color-on-primary-fill);
  border-color: var(--color-on-primary-border);
}
.hero .stat__label { color: var(--color-on-primary-muted); }

/* ---------- Dashboard tiles --------------------------------------------- */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}
/* Compact row tile (icon + label), the patient app density */
.tile {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-3);
  min-height: 0;
  padding: var(--space-3);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  color: var(--color-text);
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}
.tile:hover { border-color: var(--color-primary); transform: translateY(calc(-1 * var(--border-width))); }
.tile__icon {
  flex: 0 0 var(--tile-icon-size);
  width: var(--tile-icon-size);
  height: var(--tile-icon-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-primary);
  background: var(--color-primary-soft);
}
.tile__icon--blue { color: var(--color-secondary); background: var(--color-secondary-soft); }
.tile__label {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
}
.tile__label { flex: 1; min-width: 0; }
.tile__count {
  position: absolute;
  top: calc(-1 * var(--space-1));
  right: calc(-1 * var(--space-1));
}

/* ---------- Lists -------------------------------------------------------- */
.list {
  display: flex;
  flex-direction: column;
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  overflow: hidden;
}
.list-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--touch-target);
  padding: var(--space-3) var(--space-4);
  color: var(--color-text);
  border-bottom: var(--border-width) solid var(--color-border);
}
.list-item:last-child { border-bottom: 0; }
a.list-item:hover { background: var(--color-muted-soft); }
.list-item__body { flex: 1; min-width: 0; }
.list-item__title { font-weight: var(--font-weight-bold); }
.list-item__meta { font-size: var(--font-size-xs); color: var(--color-text-muted); }
.list-item .chev { color: var(--color-text-subtle); }
.list-item.is-unread { background: var(--color-primary-soft); }
.list-item.is-unread .list-item__title { font-weight: var(--font-weight-bold); }

.notification-list {
  gap: var(--space-3);
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}
.notification-list .list-item,
.notification-list .list-item:last-child {
  min-height: 0;
  padding: var(--card-pad);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
.notification-list .list-item.is-unread {
  background: var(--color-primary-soft);
}

.kv { display: flex; flex-direction: column; }
.kv__row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-2) 0;
  border-bottom: var(--border-width) solid var(--color-border);
}
.kv__row:last-child { border-bottom: 0; }
.kv__row dt { color: var(--color-text-muted); }
.kv__row dd { margin: 0; text-align: right; font-weight: var(--font-weight-semibold); }
.kv__row--total dt, .kv__row--total dd { color: var(--color-text); font-weight: var(--font-weight-bold); }

.bullets {
  margin: 0;
  padding-left: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.avatar {
  flex: 0 0 var(--avatar-size);
  width: var(--avatar-size);
  height: var(--avatar-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary-dark);
  background: var(--color-primary-soft);
}
.avatar--blue { color: var(--color-secondary); background: var(--color-secondary-soft); }

/* ---------- Badges & chips ---------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-half) var(--space-2);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xxs);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-snug);
  white-space: nowrap;
  color: var(--color-text-muted);
  background: var(--color-muted-soft);
}
/* Status badges: coloured text with a dot, no pill — the patient app style.
   A plain .badge stays a neutral pill (tags such as PMJAY or a department). */
.badge--emergency { color: var(--color-emergency); }
.badge--urgent { color: var(--color-urgent); }
.badge--normal, .badge--success { color: var(--color-normal-dark); }
.badge--info { color: var(--color-secondary); }
.badge--emergency, .badge--urgent, .badge--normal, .badge--success, .badge--info {
  padding: 0;
  border-radius: 0;
  background: none;
  font-size: var(--font-size-xs);
  font-weight: 800;
}
.badge--emergency:not(:has(svg))::before, .badge--urgent:not(:has(svg))::before, .badge--normal:not(:has(svg))::before,
.badge--success:not(:has(svg))::before, .badge--info:not(:has(svg))::before {
  content: "";
  flex: 0 0 auto;
  width: var(--status-dot);
  height: var(--status-dot);
  border-radius: var(--radius-pill);
  background: currentColor;
}
.badge--solid { color: var(--color-text-inverse); background: var(--gradient-button); }
.badge--count {
  min-width: var(--badge-count-min);
  justify-content: center;
  color: var(--color-text-inverse);
  background: var(--color-emergency);
}

.chips {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: var(--space-half);
}
.chips::-webkit-scrollbar { display: none; }
.chips--wrap { flex-wrap: wrap; overflow: visible; }
.chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: var(--control-height-sm);
  padding: var(--space-1) var(--space-3);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
  cursor: pointer;
}
.chip.is-active,
.chip.is-selected {
  color: var(--color-primary-contrast);
  background: var(--gradient-button);
  border-color: transparent;
}

/* ---------- Tabs --------------------------------------------------------- */
.tabs {
  display: flex;
  gap: var(--space-1);
  padding: var(--space-1);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
}
.tab {
  flex: 1;
  min-height: var(--tab-height);
  padding: var(--space-1) var(--space-2);
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
  cursor: pointer;
}
/* Selected = brand blue everywhere, as in the patient app */
.tab.is-active {
  color: var(--color-primary-contrast);
  background: var(--gradient-button);
  box-shadow: var(--shadow-primary);
}
.tab-panel { display: none; }
.tab-panel.is-active { display: flex; flex-direction: column; gap: var(--space-3); }

/* ---------- Buttons ------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--touch-target);
  padding: var(--space-2) var(--space-4);
  border: var(--border-width) solid transparent;
  border-radius: var(--radius-md);
  font-size: var(--font-size-button);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  text-align: center;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}
.btn:active { transform: scale(0.99); }
.btn--primary { color: var(--color-primary-contrast); background: var(--gradient-button); box-shadow: var(--shadow-primary); }
.btn--primary:hover { background: var(--gradient-button-hover); }
.btn--secondary { color: var(--color-secondary-contrast); background: var(--color-secondary); }
.btn--outline { color: var(--color-primary-dark); background: var(--color-surface); border-color: var(--color-primary); }
.btn--ghost { color: var(--color-text); background: var(--color-surface); border-color: var(--color-border); }
.btn--ghost:hover { border-color: var(--color-border-strong); }
.btn--danger { color: var(--color-emergency); background: var(--color-surface); border-color: var(--color-emergency); }
.btn--block { width: 100%; }
.btn--block.btn--primary { min-height: var(--btn-height); font-size: var(--font-size-button-lg); }
.btn--sm { min-height: var(--control-height-sm); padding: var(--space-1) var(--space-3); font-size: var(--font-size-xs); box-shadow: none; }
.btn[disabled], .btn.is-disabled { opacity: 0.45; pointer-events: none; }

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}
.action-bar {
  position: sticky;
  bottom: 0;
  z-index: 4;
  display: flex;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-top: var(--border-width) solid var(--color-border);
  background: var(--color-surface);
}
.action-bar .btn { flex: 1; }

/* ---------- Forms -------------------------------------------------------- */
.form { display: flex; flex-direction: column; gap: var(--space-4); }
.field { display: flex; flex-direction: column; gap: var(--space-1); }
.field__label {
  margin-bottom: var(--space-half);
  font-size: var(--font-size-field-label);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
}
.field__hint { font-size: var(--font-size-xs); line-height: var(--line-height-base); color: var(--color-text-muted); }
.input,
.select,
.textarea {
  width: 100%;
  min-height: var(--field-height);
  padding: var(--field-pad-y) var(--field-pad-x);
  border: var(--field-border-width) solid var(--color-field-border);
  border-radius: var(--radius-field);
  background-color: var(--color-field-bg);
  font-size: var(--font-size-field);
  color: var(--color-text);
  transition: border-color var(--transition-fast), background var(--transition-fast);
}
.input::placeholder, .textarea::placeholder { color: var(--color-field-placeholder); }
/* Custom chevron (CSS-only, follows the theme colours) */
.select {
  padding-right: calc(var(--field-pad-x) + var(--space-5));
  -webkit-appearance: none;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--color-text-subtle) 50%),
    linear-gradient(135deg, var(--color-text-subtle) 50%, transparent 50%);
  background-position:
    right calc(var(--field-pad-x) + var(--space-1)) center,
    right var(--field-pad-x) center;
  background-size: var(--space-1) var(--space-1);
  background-repeat: no-repeat;
  cursor: pointer;
}

/* Phone number: separate country-code dropdown + number (GP login style) */
.phone-field {
  display: flex;
  gap: var(--space-2);
}
.phone-field__code {
  flex: 0 0 var(--country-code-width);
  width: var(--country-code-width);
  font-weight: var(--font-weight-semibold);
}
.phone-field .input { flex: 1; min-width: 0; }
.textarea { min-height: var(--textarea-min-height); resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--color-primary); background-color: var(--color-surface); outline: none; box-shadow: none; }

.search {
  position: relative;
  display: flex;
  align-items: center;
}
.search .icon {
  position: absolute;
  left: var(--space-3);
  color: var(--color-text-subtle);
}
.search .input { padding-left: calc(var(--space-3) + var(--icon-size) + var(--space-2)); }

.upload {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: var(--border-width) dashed var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text-muted);
  text-align: left;
  cursor: pointer;
}
.upload:hover { border-color: var(--color-primary); color: var(--color-primary); }
.upload.is-done { border-style: solid; border-color: var(--color-primary); color: var(--color-primary-dark); background: var(--color-primary-soft); }

.check {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--touch-target);
  padding: var(--space-2) var(--space-3);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  cursor: pointer;
}
.check input { width: var(--checkbox-size); height: var(--checkbox-size); accent-color: var(--color-primary); }
.check:has(input:checked) { border-color: var(--color-primary); background: var(--color-primary-soft); }

.choice {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border: var(--border-width-strong) solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  cursor: pointer;
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:checked) { border-color: var(--color-primary); background: var(--color-primary-soft); }

.switch {
  position: relative;
  flex: 0 0 auto;
  width: var(--switch-width);
  height: var(--switch-height);
}
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch__track {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-pill);
  background: var(--color-border-strong);
  transition: background var(--transition-fast);
}
.switch__track::after {
  content: "";
  position: absolute;
  top: var(--switch-inset);
  left: var(--switch-inset);
  width: var(--switch-knob);
  height: var(--switch-knob);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}
.switch input:checked + .switch__track { background: var(--color-primary); }
.switch input:checked + .switch__track::after { transform: translateX(calc(var(--switch-width) - var(--switch-knob) - 2 * var(--switch-inset))); }
.switch--danger input:checked + .switch__track { background: var(--color-emergency); }

.otp {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-2);
}
.otp input {
  height: var(--otp-height);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  text-align: center;
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
}
.otp input:focus { border-color: var(--color-primary); outline: none; box-shadow: var(--focus-ring); }

.otp-page {
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-8) var(--space-6) var(--space-10);
  text-align: center;
}
.otp-page__step {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-step);
  color: var(--color-primary-dark);
}
.otp-page__intro { max-width: 300px; }
.otp-page__intro h2 {
  margin-bottom: var(--space-2);
  font-size: var(--font-size-2xl);
  color: var(--color-primary);
}
.otp-page__intro p {
  font-size: var(--font-size-body);
  line-height: var(--line-height-base);
  color: var(--color-text-muted);
}
.otp-page__contact {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  background: var(--color-primary-soft);
}
.otp-page__contact a { font-weight: var(--font-weight-bold); }
.otp-page__form { width: 100%; max-width: 326px; gap: var(--space-5); }
.otp-page__submit { min-height: var(--btn-height); border-radius: var(--radius-btn-pill); }
.otp-page__resend {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}
.otp-page__resend .btn--link {
  min-height: 0;
  padding: 0;
  border: 0;
  font-size: inherit;
  font-weight: var(--font-weight-bold);
}

/* Time slots (colour-coded) */
.slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
.slot {
  min-height: var(--slot-height);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
}
.slot--busy { color: var(--color-text-subtle); background: var(--color-muted-soft); text-decoration: line-through; pointer-events: none; }
.slot--emergency { border-color: var(--color-emergency); color: var(--color-emergency); }
.slot.is-selected { color: var(--color-primary-contrast); background: var(--gradient-button); border-color: transparent; }

.legend { display: flex; flex-wrap: wrap; gap: var(--space-3); font-size: var(--font-size-xs); color: var(--color-text-muted); }
.legend__dot { display: inline-block; width: var(--legend-dot); height: var(--legend-dot); margin-right: var(--space-1); border-radius: var(--radius-pill); vertical-align: middle; background: var(--color-primary); }
.legend__dot--busy { background: var(--color-border-strong); }
.legend__dot--emergency { background: var(--color-emergency); }
.legend__dot--blue { background: var(--color-secondary); }
.legend__dot--urgent { background: var(--color-urgent); }

/* ---------- Calendar ----------------------------------------------------- */
.week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--space-1);
}
.day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-half);
  padding: var(--space-2) 0;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  cursor: pointer;
}
.day strong { font-size: var(--font-size-md); color: var(--color-text); }
.day.is-active { background: var(--gradient-button); color: var(--color-on-primary-muted); }
.day.is-active strong { color: var(--color-text-inverse); }
.day__dot { width: var(--day-dot); height: var(--day-dot); border-radius: var(--radius-pill); background: var(--color-primary); }
.day.is-active .day__dot { background: var(--color-text-inverse); }

.month {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--space-1);
  text-align: center;
  font-size: var(--font-size-sm);
}
.month__head { font-size: var(--font-size-xs); color: var(--color-text-subtle); padding: var(--space-1) 0; }
.month__cell { padding: var(--space-2) 0; border-radius: var(--radius-sm); }
.month__cell--muted { color: var(--color-text-subtle); }
.month__cell--has { font-weight: var(--font-weight-bold); color: var(--color-primary-dark); background: var(--color-primary-soft); }
.month__cell--today { color: var(--color-text-inverse); background: var(--gradient-button); }

.agenda-item {
  display: grid;
  grid-template-columns: var(--agenda-time-width) 1fr;
  gap: var(--space-3);
}
.agenda-item__time { font-size: var(--font-size-sm); font-weight: var(--font-weight-bold); color: var(--color-text-muted); padding-top: var(--space-3); }

/* ---------- Timeline ----------------------------------------------------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline__item {
  position: relative;
  display: flex;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
}
.timeline__item::before {
  content: "";
  position: absolute;
  top: var(--timeline-marker);
  bottom: 0;
  left: calc((var(--timeline-marker) - var(--border-width-strong)) / 2);
  width: var(--border-width-strong);
  background: var(--color-border);
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item:last-child::before { display: none; }
.timeline__marker {
  position: relative;
  z-index: 1;
  flex: 0 0 var(--timeline-marker);
  width: var(--timeline-marker);
  height: var(--timeline-marker);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: var(--border-width-strong) solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-text-inverse);
}
.timeline__marker .icon { width: var(--timeline-icon); height: var(--timeline-icon); stroke-width: 3; }
.timeline__item.is-done .timeline__marker { border-color: var(--color-primary); background: var(--color-primary); }
.timeline__item.is-done::before { background: var(--color-primary); }
.timeline__item.is-current .timeline__marker { border-color: var(--color-primary); box-shadow: var(--focus-ring); }
.timeline__body { flex: 1; min-width: 0; padding-top: var(--border-width); }
.timeline__title { font-weight: var(--font-weight-medium); }
.timeline__item.is-pending .timeline__title { color: var(--color-text-subtle); }
.timeline__meta { font-size: var(--font-size-xs); color: var(--color-text-muted); }

/* Horizontal stage strip */
.stages {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  scrollbar-width: none;
}
.stages::-webkit-scrollbar { display: none; }

/* ---------- Charts (CSS only) ------------------------------------------ */
.bars { display: flex; flex-direction: column; gap: var(--space-3); }
.bar__label { display: flex; justify-content: space-between; font-size: var(--font-size-sm); margin-bottom: var(--space-1); }
.bar__track { height: var(--bar-height); border-radius: var(--radius-pill); background: var(--color-muted-soft); overflow: hidden; }
.bar__fill { height: 100%; width: var(--value, 0%); border-radius: var(--radius-pill); background: var(--gradient-button); }
.bar__fill--blue { background: var(--color-secondary); }
.bar__fill--navy { background: var(--color-navy); }
.bar__fill--urgent { background: var(--color-urgent); }
.bar__fill--emergency { background: var(--color-emergency); }

.columns {
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
  height: var(--chart-height);
  padding-top: var(--space-2);
}
.column { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: var(--space-1); height: 100%; }
.column__bar { width: 100%; height: var(--value, 0%); border-radius: var(--radius-xs) var(--radius-xs) 0 0; background: var(--color-primary); }
.column__bar--blue { background: var(--color-secondary); }
.column__label { font-size: var(--font-size-xxs); color: var(--color-text-subtle); }

.split { display: flex; height: var(--split-height); border-radius: var(--radius-pill); overflow: hidden; }
.split__part { width: var(--value, 0%); background: var(--color-primary); }
.split__part--blue { background: var(--color-secondary); }
.split__part--urgent { background: var(--color-urgent); }
.split__part--emergency { background: var(--color-emergency); }
.split__part--muted { background: var(--color-border-strong); }

/* ---------- Bottom nav --------------------------------------------------- */
.bottom-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  height: var(--bottomnav-height);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: var(--border-width) solid var(--color-border);
  background: var(--color-surface);
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  font-size: var(--font-size-caps);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-subtle);
}
.bottom-nav .icon { width: var(--icon-size-lg); height: var(--icon-size-lg); stroke-width: 1.8; }
.bottom-nav a.is-active { font-weight: var(--font-weight-bold); color: var(--color-primary-dark); }
.bottom-nav a.is-active .icon { stroke-width: 2.2; }
@media (max-width: 480px) {
  .bottom-nav { position: fixed; bottom: 0; }
}

/* ---------- Banners, results, chat ------------------------------------ */
/* Notice: tinted box with a coloured left stripe. The icon takes the tone
   colour; the text stays dark so it reads as body copy. */
.banner {
  --banner-c: var(--color-primary-dark);
  --banner-bg: var(--color-primary-soft);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--field-pad-y) var(--field-pad-x);
  border-left: var(--accent-border-width) solid var(--banner-c);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  font-size: var(--font-size-field-label);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background: var(--banner-bg);
}
.banner > .icon { width: var(--icon-size-sm); height: var(--icon-size-sm); margin-top: var(--space-half); color: var(--banner-c); }
.banner strong { color: var(--banner-c); }
.banner--success { --banner-c: var(--color-step-label); --banner-bg: var(--color-primary-soft); }
.banner--warning { --banner-c: var(--color-status-action); --banner-bg: var(--color-status-action-soft); }
.banner--danger { --banner-c: var(--color-emergency); --banner-bg: var(--color-emergency-soft); }

.result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  text-align: center;
}
.result__icon {
  width: var(--result-icon-size);
  height: var(--result-icon-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  color: var(--color-primary);
  background: var(--color-primary-soft);
}
.result__icon--wait { color: var(--color-urgent); background: var(--color-urgent-soft); }

.brand-logo { width: var(--logo-width); height: auto; }
.brand-logo--sm { width: var(--logo-width-sm); }
.brand-monogram { width: var(--monogram-size); height: auto; }

.chat { display: flex; flex-direction: column; gap: var(--space-2); }
.bubble {
  max-width: 80%;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
}
.bubble--me {
  align-self: flex-end;
  color: var(--color-text-inverse);
  background: var(--gradient-button);
  border-color: transparent;
}
.bubble__meta { display: block; margin-top: var(--space-half); font-size: var(--font-size-xxs); opacity: 0.75; }

.file {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
}
.file__icon {
  width: var(--file-icon-size);
  height: var(--file-icon-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--color-secondary);
  background: var(--color-secondary-soft);
}

/* ---------- Bottom sheet & toast --------------------------------------- */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: none;
  background: var(--color-overlay);
}
.overlay.is-open { display: block; }
.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 21;
  max-height: 86%;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4) var(--space-6);
  overflow-y: auto;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
  transform: translateY(105%);
  transition: transform var(--transition-base);
}
.sheet.is-open { transform: translateY(0); }
.sheet__grip {
  align-self: center;
  width: var(--sheet-grip-width);
  height: var(--home-bar-height);
  border-radius: var(--radius-pill);
  background: var(--color-border-strong);
}
@media (max-width: 480px) {
  .overlay, .sheet { position: fixed; }
}

.toast {
  position: absolute;
  left: var(--space-4);
  right: var(--space-4);
  bottom: calc(var(--bottomnav-height) + var(--home-indicator-height) + var(--space-3));
  z-index: 45;   /* above pop-up sheets and the drawer (40) so a message is never hidden behind them */
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-inverse);
  background: var(--color-navy);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(var(--space-2));
  pointer-events: none;
  transition: opacity var(--transition-base), transform var(--transition-base);
}
.toast.is-visible { opacity: 1; transform: translateY(0); }
@media (max-width: 480px) {
  .toast { position: fixed; }
}

/* ---------- Small utilities used by pages ------------------------------ */
.py-2 { padding-top: var(--space-2); padding-bottom: var(--space-2); }
.input--compact { max-width: 40%; text-align: right; }
a.stat { display: block; color: inherit; }
.day.is-selected { background: var(--color-primary); color: var(--color-on-primary-muted); }
.day.is-selected strong { color: var(--color-text-inverse); }
.action-bar .input { flex: 1; }
.kv { margin: 0; }
.list-item.row--top { align-items: flex-start; }
.btn--link { padding-left: var(--space-2); padding-right: var(--space-2); color: var(--color-primary); background: transparent; }
.btn--link:hover { background: var(--color-primary-soft); }

/* ---------- Registration stepper --------------------------------------- */
.stepper {
  padding: 0 var(--space-4) var(--space-3);
  background: var(--color-surface);
  border-bottom: var(--border-width) solid var(--color-border);
}
.progress {
  display: block;
  height: var(--progress-height);
  border-radius: var(--radius-pill);
  background: var(--color-muted-soft);
  overflow: hidden;
}
.progress__fill {
  display: block;
  height: 100%;
  width: var(--value, 0%);
  border-radius: var(--radius-pill);
  background: var(--gradient-button);
}
.input--bare {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
}
.input--bare:focus { box-shadow: none; }
.doc-row .file__icon { flex: 0 0 var(--file-icon-size); }
.doc-row.is-done .file__icon { color: var(--color-primary-contrast); background: var(--color-primary); }
/* Keep a sheet's final action button visible on long forms */
.sheet > .btn--block:last-child {
  position: sticky;
  bottom: 0;
  flex-shrink: 0;
  box-shadow: 0 var(--space-6) 0 var(--color-surface), 0 calc(-1 * var(--space-3)) var(--space-4) var(--color-surface);
}
/* A tab panel stays hidden until active, even when it is also a .form */
.tab-panel:not(.is-active) { display: none !important; }
a.choice { color: var(--color-text); }
a.choice:hover { border-color: var(--color-primary); }

/* ==========================================================================
   Onboarding + dashboard — same patterns as the Helthio patient app
   ========================================================================== */

/* ---------- Sign-in header (login / register) — GP "Welcome Back" ----- */
.auth-hero {
  position: relative;
  overflow: hidden;
  padding: var(--space-4) var(--space-5) var(--space-6);
  border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
  color: var(--color-text-inverse);
  background: var(--gradient-sheen), var(--gradient-primary);
}
.auth-hero__mark {
  position: absolute;
  right: calc(-1 * var(--space-6));
  bottom: calc(-1 * var(--space-8));
  height: var(--drawer-watermark);
  opacity: 0.07;
  pointer-events: none;
}
.auth-hero__bar { position: relative; display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-5); }
.auth-hero__bar img { width: var(--header-logo-width); height: auto; }
.auth-hero .icon-btn {
  flex: 0 0 var(--appbar-btn-size);
  width: var(--appbar-btn-size);
  height: var(--appbar-btn-size);
  color: var(--color-text-inverse);
  background: var(--color-on-primary-fill-strong);
}
.auth-hero .icon-btn:hover { background: var(--color-on-primary-border); }
.auth-hero h1 {
  position: relative;
  font-size: var(--font-size-page-title);
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.02em;
  color: var(--color-text-inverse);
}
.auth-hero p { position: relative; margin-top: var(--space-1); font-size: var(--font-size-sm); color: var(--color-on-primary-muted); }
.screen--auth { background: var(--color-surface); }
.screen--auth .content { padding-top: var(--space-5); }

/* ---------- Welcome (index.html) — brand screen, same as patient welcome-1 */
.screen--welcome { background: var(--color-primary-deep); }
.welcome {
  position: relative;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: var(--statusbar-height);
  color: var(--color-text-inverse);
  background: var(--gradient-sheen), var(--gradient-screen);
}
.welcome__watermark {
  position: absolute;
  right: calc(-1 * var(--space-10));
  bottom: calc(-1 * var(--space-10));
  width: calc(2 * var(--monogram-watermark));
  opacity: 0.06;
  pointer-events: none;
}
.welcome__body {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-6) var(--space-7);
  text-align: center;
}
.welcome__tagline { margin: 0 0 72px; font-size: 16px; font-weight: 500; letter-spacing: 1.5px; color: var(--color-text-inverse); }
.welcome__logo { display: block; width: var(--welcome-logo-width); height: auto; }
.welcome__for { margin-top: 22px; padding: 6px 14px; border: 1px solid var(--color-on-primary-border); border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; color: var(--color-on-primary-muted); background: var(--color-on-primary-fill); }
.welcome__actions {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 0 var(--space-7) 42px;
}
.btn--white {
  width: 272px;
  min-height: var(--btn-height);
  border-radius: 25px;
  font-size: 16px;
  font-weight: var(--font-weight-bold);
  color: var(--color-primary-dark);
  background: var(--color-surface);
  box-shadow: var(--shadow-hero);
}
.btn--white:hover { background: var(--color-primary-soft); }

/* ---------- Welcome slides (pages/welcome-2..4) — same as patient onboarding */
.screen--ob { display: flex; flex-direction: column; background: var(--color-surface); }
.ob { flex: 1; display: flex; flex-direction: column; min-height: 100%; }
.ob-top { display: flex; align-items: center; justify-content: space-between; min-height: 36px; padding: 14px 28px 0; }
.ob-left { display: flex; align-items: center; gap: 12px; }
.ob-back { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border: 1px solid #E3EAF4; border-radius: 50%; color: var(--color-text); background: var(--color-surface); }
.ob-logo { display: block; width: 100px; }
.ob-skip { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 26px; padding: 0 12px; border-radius: 13px; font-size: 13px; font-weight: 700; color: #fff; background: var(--color-primary-dark); }
.ob-skip::before { content: ""; position: absolute; inset: -10px -8px; } /* bigger tap area */

/* Photo with brand shapes behind it (teal arch + blue bar), fading into the page */
.ob-hero { position: relative; flex: 1; min-height: 250px; margin: 22px 28px 0; }
.ob-hero::before, .ob-hero::after { content: ""; position: absolute; z-index: 0; -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent); mask-image: linear-gradient(to bottom, #000 55%, transparent); }
.ob-hero::before { left: -10px; top: 34px; width: 44%; height: 58%; border-radius: 999px 999px 0 0; background: var(--color-primary); }
.ob-hero::after { right: -10px; top: 0; width: 20%; height: 42%; border-radius: 20px; background: var(--color-secondary); }
.ob-hero__img {
  position: absolute;
  z-index: 1;
  inset: 18px 12px 0;
  width: calc(100% - 24px);
  height: calc(100% - 18px);
  object-fit: cover;
  object-position: var(--ob-pos, center);
  border-radius: 28px;
  -webkit-mask-image: linear-gradient(to bottom, #000 58%, transparent 98%);
  mask-image: linear-gradient(to bottom, #000 58%, transparent 98%);
}
/* Small app card floating on the photo — shows what the app does */
.ob-chip { position: absolute; z-index: 2; right: 0; top: 46%; display: flex; align-items: center; gap: 10px; padding: 9px 14px 9px 9px; border: 1px solid rgba(255, 255, 255, 0.7); border-radius: 16px; background: rgba(255, 255, 255, 0.94); box-shadow: 0 14px 30px -12px rgba(32, 42, 55, 0.35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.ob-chip__ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; color: var(--st-c); background: var(--st-bg); }
.ob-chip strong { display: block; font-size: 13px; line-height: 1.2; color: var(--color-text); }
.ob-chip small { display: block; margin-top: 2px; font-size: 11.5px; color: var(--color-text-muted); }

.ob-content { position: relative; z-index: 2; margin-top: -26px; padding-bottom: 42px; }
.ob-dots { display: flex; justify-content: center; align-items: center; gap: 3px; margin-bottom: 16px; }
.ob-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--color-border-strong); }
.ob-dot.is-active { width: 22px; border-radius: 3px; background: var(--color-primary); }
/* Fixed width so the text starts at the same x on every slide */
.ob-copy { position: relative; left: 20px; width: 288px; max-width: calc(100% - 64px); margin: 0 auto; }
.ob-copy--center { left: 0; text-align: center; }
.ob-copy h1 { margin: 0 0 14px; font-family: var(--font-primary); font-size: 26px; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; color: var(--color-primary-dark); }
.ob-copy p { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.35; color: var(--color-text); }
.ob-copy--center p { color: var(--color-text-muted); }
.ob-actions { display: flex; flex-direction: column; gap: 10px; width: 272px; margin: 40px auto 0; }
.ob-btn { display: flex; align-items: center; justify-content: center; min-height: 50px; border-radius: 25px; font-size: 16px; font-weight: 700; }
.ob-btn--primary { color: #fff; background: var(--gradient-button); box-shadow: var(--shadow-primary); }
.ob-btn--primary:active { background: var(--color-primary-dark); }
.ob-btn--outline { color: var(--color-primary-dark); background: var(--color-surface); border: 2px solid var(--color-primary); }

/* ---------- Dashboard — GP layout ------------------------------------- */
.dash {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding-bottom: calc(var(--bottomnav-height) + var(--space-4));
  background: var(--color-bg);
}

/* White top bar: [menu] logo [bell] [settings] */
.dash-top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-1) var(--space-4) var(--space-2);
  background: var(--color-surface);
  box-shadow: var(--shadow-bar);
}
.dash-top__logo { display: block; width: var(--header-logo-width); height: auto; }
.dash-top__actions { display: flex; gap: var(--space-2); }
.header-btn {
  position: relative;
  flex: 0 0 var(--header-btn-size);
  width: var(--header-btn-size);
  height: var(--header-btn-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
}
.header-btn:hover { background: var(--color-border); }

.dash-body { display: flex; flex-direction: column; padding: 0 var(--space-3); }

/* Greeting card — green gradient, sheen, monogram watermark */
.dash-hero {
  position: relative;
  overflow: hidden;
  margin-top: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-hero);
  color: var(--color-text-inverse);
  background: var(--gradient-sheen), var(--gradient-primary);
  box-shadow: var(--shadow-hero);
}
.dash-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: var(--shadow-hero-inset);
  pointer-events: none;
}
.dash-hero__mark {
  position: absolute;
  left: calc(-1 * var(--space-8));
  bottom: calc(-1 * var(--space-10));
  height: var(--monogram-watermark);
  width: auto;
  opacity: 0.07;
  pointer-events: none;
}
.dash-hero__top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.dash-hero__date {
  font-size: var(--font-size-xxs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--color-on-primary-faint);
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  border: var(--border-width) solid var(--color-on-primary-border);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xxs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-inverse);
  background: var(--color-on-primary-fill);
  white-space: nowrap;
}
.status-pill__dot {
  width: var(--status-dot);
  height: var(--status-dot);
  border-radius: var(--radius-pill);
  background: var(--color-progress-on-primary);
  box-shadow: 0 0 0 3px var(--color-status-dot-ring);
}
.dash-hero h1 {
  position: relative;
  margin-top: var(--space-2);
  font-size: var(--font-size-2xl);
  line-height: 1.2;
  color: var(--color-text-inverse);
}
.dash-hero__sub { position: relative; margin-top: var(--space-1); font-size: var(--font-size-xs); color: var(--color-on-primary-muted); }
.dash-hero__stats { position: relative; display: flex; gap: var(--space-2); margin-top: var(--space-3); }
.hero-chip {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2);
  border: var(--border-width) solid var(--color-on-primary-fill);
  border-radius: var(--radius-md);
  color: var(--color-text-inverse);
  background: var(--color-on-primary-fill);
}
.hero-chip--alert { background: var(--color-on-primary-fill-strong); border-color: var(--color-on-primary-border); }
.hero-chip strong { font-family: var(--font-display); font-size: var(--font-size-body); line-height: 1; }
.hero-chip span { font-size: var(--font-size-caps); line-height: var(--line-height-tight); color: var(--color-on-primary-muted); }
.hero-chip__dot { flex: 0 0 var(--space-1); width: var(--space-1); height: var(--space-1); border-radius: var(--radius-pill); background: var(--color-status-action-soft); }

/* Section label: "CORE", "PRACTICE" … */
.dash-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin: var(--space-4) 0 calc(var(--space-1) + var(--space-half));
  font-size: var(--font-size-caps);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-caps);
  text-transform: uppercase;
  color: var(--color-text-subtle);
}
.dash-label .badge { letter-spacing: 0; text-transform: none; }

.searchbar {
  display: flex;
  align-items: center;
  height: var(--search-height);
  margin-top: var(--space-3);
  padding: 0 var(--space-1) 0 var(--space-3);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
.searchbar:focus-within { border-color: var(--color-primary); }
.searchbar__location {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding-right: var(--space-2);
  border-right: var(--border-width) solid var(--color-border);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  white-space: nowrap;
}
.searchbar__location .icon { color: var(--color-primary); }
.searchbar input { flex: 1; min-width: 0; padding: 0 var(--space-2); border: 0; font-size: var(--font-size-sm); background: transparent; outline: none; }
/* The bar itself shows focus (border); no second ring around the text field inside it */
.searchbar input:focus, .searchbar input:focus-visible { outline: none; box-shadow: none; }
.searchbar input::placeholder { color: var(--color-text-subtle); }
.searchbar input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.searchbar .icon-btn { flex: 0 0 var(--appbar-btn-size); width: var(--appbar-btn-size); height: var(--appbar-btn-size); color: var(--color-text-muted); }

.emergency-strip {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
  padding: var(--space-3);
  border: var(--border-width) solid var(--color-emergency-border);
  border-radius: var(--radius-lg);
  color: var(--color-emergency);
  background: var(--color-emergency-soft);
}
.emergency-strip__icon {
  flex: 0 0 var(--live-icon-size);
  width: var(--live-icon-size);
  height: var(--live-icon-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-text-inverse);
  background: var(--color-emergency);
}
.emergency-strip strong { display: block; font-size: var(--font-size-body); font-weight: var(--font-weight-bold); }
.emergency-strip .grow span {
  display: block;
  overflow: hidden;
  font-size: var(--font-size-xxs);
  color: var(--color-emergency-text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); margin-top: var(--space-3); }
.dash-stat {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
.dash-stat strong { display: block; font-family: var(--font-display); font-size: var(--font-size-xl); font-weight: var(--font-weight-bold); line-height: var(--line-height-tight); }
.dash-stat span { font-size: var(--font-size-xxs); color: var(--color-text-muted); }

.promo { margin-top: var(--space-3); }
.promo__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--radius-lg); }
.promo__track::-webkit-scrollbar { display: none; }
.promo__card {
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--card-pad);
  scroll-snap-align: start;
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text);
  background: var(--color-primary-soft);
}
.promo__card--blue { background: var(--color-surface-soft); }
.promo__body { flex: 1; min-width: 0; }
.promo__tag {
  display: inline-block;
  margin-bottom: var(--space-1);
  padding: var(--space-half) var(--space-2);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-caps);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-caps);
  text-transform: uppercase;
  color: var(--color-primary-dark);
  background: var(--color-surface);
}
.promo__card--blue .promo__tag { color: var(--color-secondary); }
.promo__card strong { display: block; font-size: var(--font-size-body); font-weight: var(--font-weight-bold); }
.promo__card p { margin: var(--space-half) 0 var(--space-2); font-size: var(--font-size-xs); color: var(--color-text-muted); }
.promo__cta { display: inline-flex; align-items: center; gap: var(--space-1); font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); color: var(--color-primary-dark); }
.promo__card--blue .promo__cta { color: var(--color-secondary); }
.promo__icon {
  flex: 0 0 var(--promo-icon-size);
  width: var(--promo-icon-size);
  height: var(--promo-icon-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-primary-dark);
  background: var(--color-surface);
}
.promo__card--blue .promo__icon { color: var(--color-secondary); }
.promo__dots { display: flex; justify-content: center; gap: var(--space-1); margin-top: var(--space-2); }
.promo__dot {
  width: var(--dot);
  height: var(--dot);
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-border-strong);
  cursor: pointer;
  transition: width var(--transition-base);
}
.promo__dot.is-active { width: var(--dot-active); background: var(--gradient-button); }

/* ---------- Side drawer (hamburger menu) — built by app.js ----------- */
.drawer {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  visibility: hidden;
  pointer-events: none;
}
.drawer.is-open { visibility: visible; pointer-events: auto; }
.drawer__panel {
  width: var(--drawer-width);
  max-width: var(--drawer-max-width);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  box-shadow: var(--shadow-drawer);
  transform: translateX(-100%);
  transition: transform var(--transition-base);
}
.drawer.is-open .drawer__panel { transform: translateX(0); }
.drawer__scrim {
  flex: 1;
  border: 0;
  background: var(--color-overlay);
  opacity: 0;
  cursor: pointer;
  transition: opacity var(--transition-base);
}
.drawer.is-open .drawer__scrim { opacity: 1; }
@media (max-width: 480px) {
  .drawer { position: fixed; }
}

.drawer__head {
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
  padding: var(--space-4) var(--space-4) var(--space-5);
  color: var(--color-text-inverse);
  background: var(--gradient-sheen), var(--gradient-drawer);
}
.drawer__mark {
  position: absolute;
  right: calc(-1 * var(--space-8));
  bottom: calc(-1 * var(--space-8));
  height: var(--drawer-watermark);
  opacity: 0.07;
  pointer-events: none;
}
.drawer__brand { position: relative; display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: var(--space-4); }
.drawer__brand img { width: var(--header-logo-width); height: auto; }
.drawer__close {
  flex: 0 0 var(--drawer-close);
  width: var(--drawer-close);
  height: var(--drawer-close);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-pill);
  color: var(--color-text-inverse);
  background: var(--color-on-primary-fill-strong);
  cursor: pointer;
}
.drawer__user { position: relative; display: flex; align-items: center; gap: var(--space-3); }
.drawer__avatar {
  flex: 0 0 var(--drawer-avatar);
  width: var(--drawer-avatar);
  height: var(--drawer-avatar);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2);
  border: var(--border-width-strong) solid var(--color-on-primary-border);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary-dark);
  background: var(--color-surface);
}
.drawer__avatar img { width: 100%; height: 100%; object-fit: contain; }
.drawer__user > div { min-width: 0; }
.drawer__name { display: flex; align-items: center; gap: var(--space-1); font-size: var(--font-size-body); font-weight: var(--font-weight-bold); }
.drawer__name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer__role, .drawer__place { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer__role { font-size: var(--font-size-xxs); color: var(--color-on-primary-muted); }
.drawer__place { font-size: var(--font-size-caps); color: var(--color-on-primary-faint); }
.drawer__profile {
  position: relative;
  display: block;
  width: 100%;
  margin-top: calc(var(--space-3) + var(--space-half));
  padding: var(--space-2);
  border-radius: var(--radius-md);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-align: center;
  color: var(--color-text-inverse);
  background: var(--color-on-primary-fill-strong);
}
.drawer__profile:hover { background: var(--color-on-primary-border); }

.drawer__nav { flex: 1; overflow-y: auto; padding: var(--space-2) calc(var(--space-2) + var(--space-half)); scrollbar-width: thin; }
.drawer__group { margin-bottom: calc(var(--space-1) + var(--space-half)); }
.drawer__label {
  padding: var(--space-2) var(--space-3) var(--space-1);
  font-size: var(--font-size-caps);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-caps);
  text-transform: uppercase;
  color: var(--color-text-subtle);
}
.drawer__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: calc(var(--space-2) + var(--space-half)) calc(var(--space-2) + var(--space-half)) calc(var(--space-2) + var(--space-half)) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  transition: background var(--transition-fast);
}
.drawer__item:hover { background: var(--color-bg); }
.drawer__item-icon {
  flex: 0 0 var(--drawer-icon-box);
  width: var(--drawer-icon-box);
  height: var(--drawer-icon-box);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  background: var(--color-bg);
}
.drawer__item-icon .icon { width: var(--drawer-icon); height: var(--drawer-icon); stroke-width: 1.9; }
.drawer__item-label { flex: 1; min-width: 0; }
.drawer__item .chev { width: var(--icon-size-xs); height: var(--icon-size-xs); color: var(--color-border-strong); }
.drawer__item.is-active { font-weight: var(--font-weight-bold); color: var(--color-primary-dark); background: var(--color-primary-tint); }
.drawer__item.is-active .drawer__item-icon { color: var(--color-primary-dark); background: var(--color-primary-tint-strong); }
.drawer__item.is-active .drawer__item-icon .icon { stroke-width: 2.3; }
.drawer__count {
  min-width: var(--badge-count-md);
  height: var(--badge-count-md);
  padding: 0 var(--space-1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-caps);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-inverse);
  background: var(--color-emergency);
}

.drawer__foot { flex-shrink: 0; padding: var(--space-2) calc(var(--space-2) + var(--space-half)); border-top: var(--border-width) solid var(--color-border); }
.drawer__foot-row { display: flex; gap: var(--space-2); }
.drawer__foot-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: var(--space-2);
  border-radius: var(--radius-md);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
  background: var(--color-bg);
}
.drawer__foot-btn .icon { width: var(--icon-size-xs); height: var(--icon-size-xs); }
.drawer__signout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
  padding: calc(var(--space-2) + var(--space-half));
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-emergency);
  background: var(--color-emergency-soft);
}
.drawer__signout .icon { width: var(--icon-size-sm); height: var(--icon-size-sm); }
.drawer__version { margin-top: var(--space-2); font-size: var(--font-size-caps); text-align: center; color: var(--color-text-subtle); }

/* Status variables for quick actions + live cards */
.st-info { --st-c: var(--color-secondary); --st-bg: var(--color-secondary-soft); }
.st-done { --st-c: var(--color-primary-dark); --st-bg: var(--color-primary-soft); }
.st-action { --st-c: var(--color-status-action); --st-bg: var(--color-status-action-soft); }
.st-intl { --st-c: var(--color-status-intl); --st-bg: var(--color-status-intl-soft); }
.st-critical { --st-c: var(--color-emergency); --st-bg: var(--color-emergency-soft); }
.badge--st { color: var(--st-c); background: var(--st-bg); }

/* Quick-action tile — same box as the GP dashboard tile */
.qa-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); align-items: stretch; }
.qa-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: calc(var(--space-3) + var(--space-half));
  height: 100%;
  padding: var(--card-pad);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  color: var(--color-text);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.qa-card:hover { box-shadow: var(--shadow-md); }
.qa-card:active { transform: scale(0.97); }
.qa-ico {
  position: relative;
  width: var(--tile-icon-size);
  height: var(--tile-icon-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--st-c);
  background: var(--st-bg);
}
.qa-ico .icon { width: var(--icon-size); height: var(--icon-size); }
.qa-card strong { display: block; font-size: var(--font-size-body); font-weight: var(--font-weight-bold); line-height: var(--line-height-snug); }
.qa-sub {
  display: block;
  margin-top: var(--space-1);
  overflow: hidden;
  font-size: var(--font-size-xxs);
  line-height: var(--line-height-snug);
  color: var(--color-text-subtle);
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Count sits on the icon's corner, as in the GP app */
.qa-ico .badge--count,
.qa-card > .badge--count {
  position: absolute;
  top: calc(-1 * var(--space-1));
  right: calc(-1 * var(--space-1));
  min-width: var(--badge-count-sm);
  height: var(--badge-count-sm);
  padding: 0 var(--space-1);
  font-size: var(--font-size-caps);
}
.qa-card > .badge--count { top: var(--space-3); right: var(--space-3); }

/* "More" page (more.html): outlined icon box, larger title, wrapping sub */
.qa-grid--more { gap: var(--space-3); }
.qa-grid--more .qa-card { border-radius: var(--radius-xl); }
.qa-grid--more .qa-ico {
  border: var(--border-width) solid var(--color-border);
  color: var(--color-secondary);
  background: var(--color-surface);
}
.qa-grid--more .qa-card strong { font-size: var(--font-size-md); }
.qa-grid--more .qa-sub { font-size: var(--font-size-xs); color: var(--color-text-muted); white-space: normal; }

/* "What do you need?" — icon shortcuts card on the dashboard */
.st-neutral { --st-c: var(--color-text); --st-bg: var(--color-muted-soft); }
.need-card {
  margin-top: var(--space-3);
  padding: var(--space-4) var(--space-3);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
.need-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  padding: 0 var(--space-1);
}
.need-card__head h2 { font-family: var(--font-ui); font-size: var(--font-size-lg); font-weight: var(--font-weight-bold); letter-spacing: 0; }
.need-card__head a { font-size: var(--font-size-sm); font-weight: var(--font-weight-bold); color: var(--color-secondary); }
.need-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4) var(--space-1); }
.need-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-snug);
  text-align: center;
  color: var(--color-text);
}
.need-item__icon {
  position: relative;
  width: var(--need-icon-size);
  height: var(--need-icon-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  color: var(--st-c);
  background: var(--st-bg);
  transition: transform var(--transition-fast);
}
.need-item__icon .icon { width: var(--icon-size-lg); height: var(--icon-size-lg); }
.need-item:active .need-item__icon { transform: scale(0.95); }
.need-item__icon .badge--count {
  position: absolute;
  top: calc(-1 * var(--space-1));
  right: calc(-1 * var(--space-1));
  min-width: var(--badge-count-sm);
  height: var(--badge-count-sm);
  padding: 0 var(--space-1);
  font-size: var(--font-size-caps);
}

/* "Needs your attention" cards */
.live-card {
  display: block;
  margin-bottom: var(--space-2);
  padding: var(--card-pad);
  border: var(--border-width) solid var(--color-border);
  border-left: var(--accent-border-width) solid var(--st-c);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  color: var(--color-text);
}
.live-card__top { display: flex; align-items: flex-start; gap: var(--space-3); margin-bottom: var(--space-3); }
.live-card__icon {
  flex: 0 0 var(--live-icon-size);
  width: var(--live-icon-size);
  height: var(--live-icon-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--st-c);
  background: var(--st-bg);
}
.live-card h3 { font-size: var(--font-size-body); }
.live-card p { margin-top: var(--space-half); font-size: var(--font-size-xs); line-height: var(--line-height-snug); color: var(--color-text-muted); }
.live-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-2);
  border-top: var(--border-width) solid var(--color-border);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  color: var(--st-c);
}
.show-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  min-height: var(--touch-target);
  margin-bottom: var(--space-2);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary-dark);
  cursor: pointer;
}

/* Active admission / next appointment — gradient card */
.journey-hero {
  position: relative;
  overflow: hidden;
  padding: var(--space-4);
  border-radius: var(--radius-hero);
  color: var(--color-text-inverse);
  background: var(--gradient-sheen), var(--gradient-primary);
  box-shadow: var(--shadow-hero);
}
.journey-hero h3 { color: var(--color-text-inverse); }
.journey-hero .muted { color: var(--color-on-primary-muted); }
.journey-hero__head { display: flex; align-items: flex-start; gap: var(--space-3); margin-bottom: var(--space-3); }
.journey-hero__icon {
  flex: 0 0 var(--hero-icon-size);
  width: var(--hero-icon-size);
  height: var(--hero-icon-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--color-on-primary-fill-strong);
}
.journey-hero .progress { margin: var(--space-2) 0 var(--space-3); background: var(--color-on-primary-fill-strong); }
.journey-hero .progress__fill { background: var(--color-progress-on-primary); }
.journey-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  padding: var(--space-3);
  border: var(--border-width) solid var(--color-on-primary-fill);
  border-radius: var(--radius-md);
  background: var(--color-on-primary-fill);
}
.journey-meta span { display: block; font-size: var(--font-size-caps); letter-spacing: var(--letter-spacing-caps); text-transform: uppercase; color: var(--color-on-primary-muted); }
.journey-meta strong { font-size: var(--font-size-sm); }
.journey-actions { display: flex; gap: var(--space-2); }
.journey-actions .btn { flex: 1; min-height: var(--control-height-sm); font-size: var(--font-size-sm); }
.btn--on-primary { color: var(--color-primary-dark); background: var(--color-surface); }
.btn--translucent { color: var(--color-text-inverse); background: var(--color-on-primary-fill-strong); }

/* Five-item bottom bar, same as the patient app */
.bottom-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); }

/* ==========================================================================
   Step wizard (registration) — same layout as the patient app onboarding:
   back button + centred logo, "STEP X OF N" + step name, segmented bar,
   large page title, fields, sticky full-width action.
   Opt in with <main class="screen onb">.
   ========================================================================== */
.screen.onb {
  font-family: var(--font-ui);
  background: var(--color-surface);
}

.onb-header {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: var(--space-3) var(--space-5) var(--space-4);
  background: var(--color-surface);
  border-bottom: var(--border-width) solid var(--color-field-border);
}
.onb-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--onb-logo-gap);
}
.onb-bar .icon-btn {
  flex: 0 0 var(--round-btn-size);
  width: var(--round-btn-size);
  height: var(--round-btn-size);
  border: var(--field-border-width) solid var(--color-field-border);
  border-radius: var(--radius-pill);
}
.onb-bar .icon-btn:hover { background: var(--color-bg); }
.onb-logo {
  display: block;
  width: var(--onb-logo-width);
  height: auto;
  margin: 0 auto;
}
/* Same width as the back button so the logo sits on the true centre */
.onb-spacer { flex: 0 0 var(--round-btn-size); }

.onb-step-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}
.onb-step-count {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-black);
  letter-spacing: var(--letter-spacing-step);
  text-transform: uppercase;
  color: var(--color-step-label);
}
.onb-step-name {
  font-size: var(--font-size-field-label);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
}

.steps-bar { display: flex; gap: var(--steps-bar-gap); }
.steps-bar span {
  flex: 1;
  height: var(--steps-bar-height);
  border-radius: var(--radius-pill);
  background: var(--color-field-border);
  transition: background var(--transition-base);
}
.steps-bar span.done { background: var(--color-step-done); }
.steps-bar span.active { background: var(--gradient-button); }

/* Page title block */
.onb .content { padding: var(--space-3) var(--space-5) var(--space-5); }
.onb .with-action-bar { padding-bottom: calc(var(--btn-height) + var(--space-10)); }
.onb-intro { margin-bottom: var(--space-2); }
.onb-intro h1 {
  margin-bottom: var(--space-1);
  font-size: var(--font-size-page-title);
  letter-spacing: -0.02em;
}
.onb-intro p { font-size: var(--font-size-form-sm); color: var(--color-text-muted); }

/* Reference type scale inside the wizard */
.onb .text-sm { font-size: var(--font-size-form-sm); }
.onb .text-xs { font-size: var(--font-size-form-xs); }
.onb .field__hint { font-size: var(--font-size-form-xs); }
.onb .check .strong, .onb .choice .strong { font-size: var(--font-size-form-row); }

/* Form controls inside the wizard */
.onb .input:focus, .onb .select:focus, .onb .textarea:focus { border-color: var(--color-form-accent); }
.onb .chip {
  min-height: var(--chip-height);
  padding: var(--space-2) var(--space-4);
  border: var(--field-border-width) solid var(--color-field-border);
  border-radius: var(--radius-chip);
  font-size: var(--font-size-field-label);
  font-weight: var(--font-weight-semibold);
}
.onb .chip.is-selected,
.onb .chip.is-active {
  color: var(--color-text-inverse);
  background: var(--gradient-button);
  border-color: transparent;
}
.onb .check {
  min-height: var(--field-height);
  padding: var(--field-pad-y) var(--field-pad-x);
  border: var(--field-border-width) solid var(--color-field-border);
  border-radius: var(--radius-field);
}
/* Rows holding a switch stay neutral; plain checkbox/radio rows highlight */
.onb .check:has(.switch input:checked) { border-color: var(--color-field-border); background: var(--color-surface); }
.onb .check:has(> input:checked) {
  border-color: var(--color-form-accent);
  background: var(--color-form-accent-soft);
}
.onb .check input { accent-color: var(--color-form-accent); }
.onb .choice:has(input:checked) { border-color: var(--color-form-accent); background: var(--color-form-accent-soft); }
.onb .card { border: var(--field-border-width) solid var(--color-field-border); border-radius: var(--radius-xl); box-shadow: none; }
.onb .card--soft { border-color: transparent; background: var(--color-bg); }
.onb .upload { border-radius: var(--radius-field); border-width: var(--field-border-width); }

/* Sticky main action */
.onb .action-bar {
  padding: var(--space-3) var(--space-5);
  background: var(--color-action-bar-bg);
  backdrop-filter: blur(12px);
  border-top: var(--border-width) solid var(--color-field-border);
}
.onb .action-bar .btn,
.onb .btn--primary {
  min-height: var(--btn-height);
  border-radius: var(--radius-btn-pill);
  font-size: var(--font-size-button-lg);
  font-weight: var(--font-weight-bold);
}
.onb .btn--primary { background: var(--gradient-button); }
.onb .btn--primary:hover { background: var(--gradient-button-hover); }
.onb .btn--outline { color: var(--color-form-accent); border-color: var(--color-field-border); border-width: var(--field-border-width); border-radius: var(--radius-btn-pill); }
.onb .file__icon { color: var(--color-primary-dark); background: var(--color-primary-soft); border-radius: var(--radius-md); }

/* ---- Status pill as a switch (Available / Busy) ------------------------ */
button.status-pill { font-family: inherit; cursor: pointer; }
.status-pill.is-off .status-pill__dot { background: var(--color-border-strong); box-shadow: none; }

/* ---- Document preview sheet ------------------------------------------- */
.doc-preview {
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-soft);
  padding: var(--space-3);
  max-height: 52vh;
  overflow: auto;
}
.doc-preview img { display: block; width: 100%; height: auto; border-radius: var(--radius-sm, 8px); }

/* ---- Locked preview (premium modules) ---------------------------------- */
.locked { position: relative; }
.locked > .locked__content { filter: blur(3px); opacity: 0.55; pointer-events: none; user-select: none; }
.locked > .locked__cta {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  text-align: center;
  padding: var(--space-3);
}

/* ==========================================================================
   Employee module — Reception & Billing (pages rc-*, bl-*, emp-*)
   One title, one main action; secondary actions sit in the "More" sheet.
   ========================================================================== */
/* Common top bar: hospital name · search patient · bell · employee profile */
.emp-top {
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: var(--appbar-height);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  border-bottom: var(--border-width) solid var(--color-border);
}
.emp-top__name {
  flex: 0 0 auto;
  max-width: var(--emp-name-width);
  font-family: var(--font-heading);
  font-size: var(--font-size-xxs);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-caps);
  text-transform: uppercase;
  color: var(--color-primary-dark);
}
.emp-top__search {
  flex: 1;
  min-width: 0;
  height: var(--appbar-btn-size);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-3);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-bg);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-subtle);
  white-space: nowrap;
  overflow: hidden;
}
.emp-top__search:hover { border-color: var(--color-primary); }
.emp-top > .icon-btn {
  flex: 0 0 var(--appbar-btn-size);
  width: var(--appbar-btn-size);
  height: var(--appbar-btn-size);
  background: var(--color-bg);
}
.emp-top__me .avatar {
  flex-basis: var(--appbar-btn-size);
  width: var(--appbar-btn-size);
  height: var(--appbar-btn-size);
  font-size: var(--font-size-xxs);
}

/* Page title row: [back] Title [More] */
.emp-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-3) 0;
}
.emp-title h1 { flex: 1; min-width: 0; font-size: var(--font-size-xl); line-height: var(--line-height-tight); }
.icon-btn--box {
  flex: 0 0 var(--appbar-btn-size);
  width: var(--appbar-btn-size);
  height: var(--appbar-btn-size);
  border: var(--border-width) solid var(--color-border);
  background: var(--color-surface);
}
.icon-btn--box .icon { width: var(--icon-size); height: var(--icon-size); }

/* Compact patient header, kept at the top once a patient is selected */
.pt-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--card-pad);
  border-radius: var(--radius-lg);
  background: var(--color-surface-soft);
}
.pt-head strong { display: block; font-size: var(--font-size-md); text-transform: uppercase; }
.pt-head__meta { display: block; font-size: var(--font-size-xs); color: var(--color-text-muted); }

/* Dashboard: two main cards, smaller cards below */
.main-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.main-card {
  min-height: var(--emp-main-card-height);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-xl);
  color: var(--color-text-inverse);
  background: var(--gradient-sheen), var(--gradient-primary);
  box-shadow: var(--shadow-hero);
}
.main-card--blue { background: var(--gradient-sheen), var(--color-secondary); }
.main-card strong { display: block; font-family: var(--font-heading); font-size: var(--font-size-2xl); line-height: var(--line-height-tight); }
.main-card span { font-size: var(--font-size-xs); color: var(--color-on-primary-muted); }
/* Compact main cards: icon + title + one line, so the stats below stay on the first screen */
.main-card { min-height: 0; gap: var(--space-2); padding: var(--space-3) var(--space-4); }
.main-card strong { font-size: var(--font-size-lg); }
.main-card > .icon { padding: var(--space-2); }
.main-card span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.act-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.act-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.act.is-active { border-color: var(--color-primary); background: var(--color-primary-soft); }
.act {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--touch-target);
  padding: var(--space-3);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text);
}
.act:hover { border-color: var(--color-primary); }
.act .icon { color: var(--color-primary); }
.act .badge { margin-left: auto; }
.act--col { flex-direction: column; justify-content: center; text-align: center; font-size: var(--font-size-xs); }
.act.is-locked { color: var(--color-text-subtle); background: var(--color-muted-soft); box-shadow: none; }
.act.is-locked .icon { color: var(--color-text-subtle); }

/* Links styled as tabs (Reception | Billing switch for a combined role) */
.tabs a.tab { display: inline-flex; align-items: center; justify-content: center; }
.tabs--scroll { overflow-x: auto; scrollbar-width: none; }
.tabs--scroll::-webkit-scrollbar { display: none; }
.tabs--scroll .tab { flex: 1 0 auto; padding-left: var(--space-3); padding-right: var(--space-3); white-space: nowrap; }

/* "More" sheet: one row per secondary action */
.menu { display: flex; flex-direction: column; }
.menu-item {
  width: 100%;
  min-height: var(--touch-target);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-1);
  border: 0;
  border-bottom: var(--border-width) solid var(--color-border);
  background: transparent;
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-semibold);
  text-align: left;
  color: var(--color-text);
  cursor: pointer;
}
.menu-item:last-child { border-bottom: 0; }
.menu-item .icon { color: var(--color-primary); }
.menu-item--danger, .menu-item--danger .icon { color: var(--color-emergency); }
.menu-item.is-disabled { color: var(--color-text-subtle); pointer-events: none; }
.menu-item.is-disabled .icon { color: var(--color-text-subtle); }
.menu-item .badge { margin-left: auto; }

/* Every standalone icon sits on a soft tile of its own colour (teal icon →
   soft teal, red → soft red, locked → grey), as in the patient app */
.act > .icon:not(.chev), .menu-item > .icon:not(.chev), .upload > .icon, .list-item > .icon:not(.chev) {
  flex: 0 0 auto;
  box-sizing: content-box;
  width: var(--icon-size);
  height: var(--icon-size);
  padding: var(--space-2);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, currentColor 12%, var(--color-surface));
}
.upload > .icon, .list-item > .icon:not(.chev) { color: var(--color-primary); }
.list-item.is-unread > .icon:not(.chev) { background: var(--color-surface); }
.main-card > .icon {
  align-self: flex-start;
  box-sizing: content-box;
  width: var(--icon-size-lg);
  height: var(--icon-size-lg);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--color-on-primary-fill-strong);
}

/* Slot states: available (default) · booked · full · blocked · doctor unavailable */
.slot small { display: block; font-size: var(--font-size-caps); font-weight: var(--font-weight-regular); color: var(--color-text-subtle); }
.slot.is-selected small { color: var(--color-on-primary-muted); }
.slot--booked { border-color: var(--color-secondary); color: var(--color-secondary); background: var(--color-secondary-soft); }
.slot--full { color: var(--color-urgent); background: var(--color-urgent-soft); border-color: transparent; }
.slot--blocked, .slot--off { color: var(--color-text-subtle); background: var(--color-muted-soft); border-style: dashed; pointer-events: none; }
.slot--off { text-decoration: line-through; }
.slots--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.legend__dot--muted { background: var(--color-muted-soft); border: var(--border-width) dashed var(--color-border-strong); }

/* Report tables */
.tbl-wrap { overflow-x: auto; border: var(--border-width) solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); }
.tbl { width: 100%; min-width: var(--table-min-width); border-collapse: collapse; font-size: var(--font-size-xs); }
.tbl--fit { min-width: 0; }
.tbl th, .tbl td { padding: var(--space-2) var(--space-3); text-align: right; white-space: nowrap; border-bottom: var(--border-width) solid var(--color-border); }
.tbl th { font-size: var(--font-size-xxs); font-weight: var(--font-weight-bold); color: var(--color-text-muted); background: var(--color-bg); }
.tbl th:first-child, .tbl td:first-child { text-align: left; font-weight: var(--font-weight-bold); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tfoot td { font-weight: var(--font-weight-bold); background: var(--color-bg); }
.column__value { font-size: var(--font-size-xxs); font-weight: var(--font-weight-bold); color: var(--color-text-muted); }

/* Old → new value in audit history */
.audit-old { color: var(--color-text-subtle); text-decoration: line-through; }

/* Search box drawn as a link (Billing dashboard → patient / bill search) */
a.search .input { display: flex; align-items: center; color: var(--color-field-placeholder); }
/* Card buttons keep their natural height inside a stacked card */
.card.stack > .btn { align-self: stretch; }

/* ==========================================================================
   Patient-app parity (13 Oct 2026)
   Every Helthio app shares one look: the same font sizes, header, section
   labels, cards, tabs, chips, buttons and bottom menu as the patient app.
   Only the primary colour differs (hospital = teal). Kept at the end so it
   wins over the older rules above without rewriting them.
   ========================================================================== */
body { letter-spacing: 0.012em; }
h1, h2, h3, h4 { letter-spacing: 0.004em; }

/* Header: frosted white, centred 17px title, round white buttons */
.appbar:not(.appbar--primary) {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
          backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: rgba(191, 206, 221, 0.45);
}
.appbar__title { text-align: center; }
.appbar__title h1 { font-size: 17px; font-weight: 700; letter-spacing: 0.01em; }
.appbar__title p { font-size: var(--font-size-xs); }
.appbar:not(.appbar--primary) > .icon-btn,
.emp-top > .icon-btn,
.icon-btn--box,
.header-btn {
  border: 1px solid #E3EAF2;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  box-shadow: 0 1px 2px rgba(32, 42, 55, 0.04);
}
.emp-top {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: rgba(191, 206, 221, 0.45);
}
.emp-top__search { font-size: var(--font-size-sm); }
.emp-title { padding: var(--space-4) var(--space-4) 0; }
.emp-title h1 { font-weight: 700; }

/* Section labels: 12px spaced capitals in muted navy */
.dash-label {
  margin: 18px 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}
.section-head h2 { font-size: 15.5px; font-weight: 800; }

/* Cards: hairline border, one soft shadow, 20px corners */
.card, .tile, .list, .act, .stat, .qa-card, .notification-list .list-item, .notification-list .list-item:last-child {
  border-color: #E3EAF4;
  box-shadow: var(--shadow-sm);
}
.card, .qa-card, .tile, .list, .notification-list .list-item { border-radius: var(--radius-xl); }
.stat { border-radius: var(--radius-lg); }
.content { gap: var(--space-3); padding-left: var(--space-4); padding-right: var(--space-4); }
.dash-body { padding: 0 var(--space-4); }

/* Quick tiles (More, dashboards): patient "More services" tile */
.qa-grid, .qa-grid--more { gap: 10px; }
.qa-card { gap: 10px; padding: 14px; }
.qa-ico, .qa-grid--more .qa-ico {
  border: 0;
  border-radius: 14px;
  background: color-mix(in srgb, currentColor 12%, var(--color-surface));
}
.qa-card strong, .qa-grid--more .qa-card strong { font-size: 14px; font-weight: 700; }
.qa-sub, .qa-grid--more .qa-sub { margin-top: 2px; font-size: 11.5px; color: var(--color-text-muted); white-space: normal; }

/* Segmented tabs: soft track, the picked tab lifts in the primary gradient */
.tabs { padding: 4px; border: 0; border-radius: 14px; background: #EAEFF6; }
.tab { min-height: 35px; padding: 9px 4px; border-radius: 11px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.tab.is-active { box-shadow: 0 4px 10px rgba(15, 127, 115, 0.25); }

/* Chips: pill, 12.5px bold; selected = solid primary */
.chip { min-height: var(--chip-height); padding: 8px 13px; font-size: 12.5px; font-weight: 700; }
.chip.is-active, .chip.is-selected { background: var(--color-primary); border-color: var(--color-primary); }

/* Buttons: pill shape, firmer type */
.btn { border-radius: var(--radius-btn-pill); letter-spacing: 0.01em; }
.btn--sm { border-radius: 20px; font-size: 12.5px; }
.btn--block.btn--primary, .action-bar .btn { min-height: var(--btn-height); font-size: 15px; }

/* Forms: bold labels */
.field__label { font-weight: var(--font-weight-bold); }

/* Status text */
.badge { letter-spacing: 0.02em; }
.badge--emergency, .badge--urgent, .badge--normal, .badge--success, .badge--info { font-size: 11.5px; }

/* Bottom menu: 24px icons, 10px bold labels, a small pill over the current tab */
.bottom-nav {
  background: rgba(255, 255, 255, 0.94);
  border-top-color: rgba(191, 206, 221, 0.4);
  box-shadow: 0 -6px 20px rgba(32, 42, 55, 0.05);
}
.bottom-nav a { position: relative; gap: 5px; font-size: 10px; font-weight: 700; letter-spacing: 0.01em; color: var(--color-text-muted); }
.bottom-nav .icon { width: 24px; height: 24px; }
.bottom-nav a.is-active { color: var(--color-primary); }
.bottom-nav a.is-active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 22px;
  height: 3px;
  margin-left: -11px;
  border-radius: 0 0 3px 3px;
  background: var(--color-primary);
}

/* Meaningful icon colours — the patient app's service palette. Each module
   keeps one colour everywhere it appears (Home tiles, More cards, list rows). */
.tn-sky    { --st-c: #1C7FB6; --st-bg: #E1F2FC; }
.tn-cyan   { --st-c: #0E7490; --st-bg: #E0F2F7; }
.tn-indigo { --st-c: #4A4FC4; --st-bg: #ECEDFB; }
.tn-green  { --st-c: #2C8A4C; --st-bg: #E4F4E9; }
.tn-coral  { --st-c: #CC5B45; --st-bg: #FCEDE9; }
.tn-rose   { --st-c: #C2417A; --st-bg: #FCE8F1; }
.tn-slate  { --st-c: #3D5A80; --st-bg: #E6ECF4; }
.qa-card .qa-ico { color: var(--st-c, var(--color-primary)); background: var(--st-bg, var(--color-primary-soft)); }

/* Lower-priority links: one compact list instead of more cards
   (patient app "Also here") */
.mo-list {
  display: flex;
  flex-direction: column;
  padding: 2px 14px;
  border: 1px solid #E3EAF4;
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
.mo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid #EEF2F7;
  color: var(--color-text);
}
.mo-row:first-child { border-top: 0; }
.mo-row__ico {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--st-c, var(--color-primary));
  background: var(--st-bg, var(--color-primary-soft));
}
.mo-row__ico .icon { width: 17px; height: 17px; }
.mo-row strong { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; }
.mo-row > .chev { width: 16px; height: 16px; color: var(--color-text-subtle); }

/* Home header — the patient app home: one full-width coloured block with the
   white logo, round see-through buttons, date, greeting and summary chips;
   the search bar overlaps its rounded bottom edge. */
.dash-head {
  position: relative;
  overflow: hidden;
  padding: 0 var(--space-4) 46px;
  border-radius: 0 0 30px 30px;
  color: var(--color-text-inverse);
  background:
    radial-gradient(90% 70% at 100% 100%, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0) 60%),
    linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-dark) 62%, var(--color-primary-deep) 100%); /* starts at the status-bar teal: no seam */
}
.dash-head .dash-top {
  position: relative;
  padding: 14px 0 18px;
  background: transparent;
  box-shadow: none;
}
.dash-head .dash-top { justify-content: flex-start; gap: 12px; }
.dash-head .dash-top__logo { width: auto; height: 30px; margin-right: auto; }
.dash-head .header-btn {
  flex-basis: 44px;
  width: 44px;
  height: 44px;
  color: var(--color-text-inverse);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}
.dash-head .header-btn:hover { background: rgba(255, 255, 255, 0.22); }
.dash-head .dash-hero {
  margin: 0;
  padding: 0 2px;
  overflow: visible;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.dash-head .dash-hero::after { display: none; }
.dash-head .dash-hero__mark {
  left: auto;
  right: -60px;
  bottom: -110px;
  height: 210px;
}
.dash-head .dash-hero__date { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; color: rgba(255, 255, 255, 0.62); }
.dash-head .dash-hero h1 { margin: 5px 0 4px; font-size: 23px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; }
.dash-head .dash-hero__sub { margin: 0; font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, 0.8); }
.dash-head .dash-hero__stats { margin-top: 14px; }
.dash-head .hero-chip { border-radius: 14px; }
.dash-head + .dash-body > .searchbar:first-child {
  position: relative;
  z-index: 3;
  height: 52px;
  margin-top: -26px;
  padding: 0 6px 0 16px;
  border: 1.5px solid #E3EAF4;
  border-radius: 28px;
  box-shadow: 0 8px 24px rgba(32, 42, 55, 0.10);
}
.dash-head + .dash-body > .searchbar:first-child input { font-size: 14px; }
.dash-head + .dash-body > .emergency-strip { margin-top: var(--space-4); }

/* "Needs your attention" — the patient app's "Important now": one white
   card, compact rows (coloured icon, small coloured status, bold title, one
   detail line) and a small outline action button in the row's colour. */
.dash-label--title {
  margin-top: 22px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.004em;
  text-transform: none;
  color: var(--color-text);
}
.dash-label--title .badge--count {
  min-width: 0;
  padding: 0;
  background: none;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-emergency);
}
.now-list {
  margin-bottom: var(--space-3);
  padding: 2px 14px;
  border: 1px solid #E3EAF4;
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
.now-list .live-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  grid-template-areas: "ico kick act" "ico body act";
  column-gap: 12px;
  align-items: center;
  margin: 0;
  padding: 14px 0;
  border: 0;
  border-top: 1px solid #EEF2F7;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.now-list > .live-card:first-child { border-top: 0; }
.now-list #more-updates .live-card:first-child { border-top: 1px solid #EEF2F7; }
.now-list .live-card:hover { transform: none; box-shadow: none; }
.now-list .live-card__top { display: contents; }
.now-list .live-card__icon {
  grid-area: ico;
  align-self: start;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--st-c);
  background: var(--st-bg);
}
.now-list .live-card .badge--st {
  grid-area: kick;
  justify-self: start;
  padding: 0;
  background: none;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--st-c);
}
.now-list .live-card .grow { grid-area: body; }
.now-list .live-card h3 { font-size: 14px; font-weight: 700; line-height: 1.3; }
.now-list .live-card p {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
  font-size: 12px;
}
.now-list .live-card__foot {
  grid-area: act;
  padding: 6px 10px;
  border: 1.5px solid color-mix(in srgb, var(--st-c) 35%, var(--color-surface));
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  font-size: 11.5px;
  white-space: nowrap;
}
.now-list .live-card__foot .icon { display: none; }
.now-list + .show-more { margin-top: calc(-1 * var(--space-1)); }

/* ==========================================================================
   Premium layer 2 — shared building blocks in the patient app's style
   (detail rows, patient header, number tiles, totals, notes, timelines).
   ========================================================================== */

/* Detail rows: small muted label, bold dark value, hairline dividers */
.kv__row { align-items: baseline; padding: 11px 0; border-bottom-color: #EEF2F7; }
.kv__row dt { font-size: 13px; font-weight: 500; color: var(--color-text-muted); }
.kv__row dd { font-size: 13.5px; font-weight: 700; color: var(--color-text); }
.kv__row--total { margin-top: 2px; padding-top: 13px; border-top: 1.5px solid #E3EAF4; }
.kv__row--total dt { font-size: 14px; font-weight: 800; color: var(--color-text); }
.kv__row--total dd { font-size: 16px; font-weight: 800; color: var(--color-text); }
.card > .kv:only-child, .card > dl.kv { margin: -4px 0; }

/* Patient header (Reception / Billing): white card with a soft wash at the top */
.pt-head {
  padding: 14px 16px;
  border: 1px solid #E3EAF4;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, var(--color-primary-soft) 0, var(--color-surface) 90px);
  box-shadow: var(--shadow-sm);
}
.pt-head strong { margin-bottom: 3px; font-size: 16px; font-weight: 800; letter-spacing: 0.004em; text-transform: none; }
.pt-head__meta { font-size: 12.5px; line-height: 1.55; }

/* Number tiles: big bold number, small label */
.stat { padding: 12px 14px; background: var(--color-surface); }
.stat__value { font-family: var(--font-ui); font-size: 22px; font-weight: 800; letter-spacing: -0.01em; color: var(--color-text); }
.stat__value small, .stat__value span { font-size: 13px; font-weight: 700; color: var(--color-text-subtle); }
.stat__label { margin-top: 2px; font-size: 11.5px; font-weight: 600; color: var(--color-text-muted); }

/* Card titles and text */
.card h3 { font-size: 15px; font-weight: 800; letter-spacing: 0.004em; }
.card .muted, .card .text-sm.muted { color: var(--color-text-muted); }
.bullets { gap: 6px; font-size: 13.5px; color: var(--color-text); }
.bullets li::marker { color: var(--color-primary); }

/* Notes / banners: soft tinted box, rounded, no hard stripe */
.banner {
  padding: 12px 14px;
  border-left: 0;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.5;
}
.banner > .icon { width: 16px; height: 16px; margin-top: 1px; }

/* Timelines: firmer titles, quiet meta */
.timeline__title { font-size: 14px; font-weight: 700; }
.timeline__meta { font-size: 12px; }

/* Section headings above cards */
.section-head { margin-top: 4px; }
.section-head h2 { font-size: 16px; font-weight: 800; }

/* File rows: tinted file icon, bold name */
.file__icon { border-radius: 12px; }

/* Sub-title under a header title: quieter, like the patient app */
.appbar__title p { margin-top: 1px; font-size: 11.5px; font-weight: 500; color: var(--color-text-subtle); }

/* Secondary buttons: white with a hairline border and dark text (patient
   "View details"); the primary colour is kept for the one main action */
.btn--outline { color: var(--color-text); border-color: #E3EAF4; background: var(--color-surface); box-shadow: 0 1px 2px rgba(32, 42, 55, 0.04); }
.btn--outline:hover { border-color: var(--color-primary); color: var(--color-primary-dark); }
/* Second main card (IPD / IPD Bill): a deep cyan that sits with teal */
.main-card--blue { background: var(--gradient-sheen), linear-gradient(150deg, #1A8FB0 0%, #0E7490 55%, #0B5468 100%); }

/* Meaningful colours for employee quick actions and "More" menu rows,
   taken from where the action leads, so the same action has the same colour
   on every screen (patient app service palette). */
:is(.act, .menu-item)[href*="deposit"]                              { --st-c: #3D5A80; --st-bg: #E6ECF4; }
:is(.act, .menu-item)[href*="interim"]                              { --st-c: #0E7490; --st-bg: #E0F2F7; }
:is(.act, .menu-item)[href*="discount"]                             { --st-c: #C2417A; --st-bg: #FCE8F1; }
:is(.act, .menu-item)[href*="refund"]                               { --st-c: #CC5B45; --st-bg: #FCEDE9; }
:is(.act, .menu-item):is([href*="action=final"], [href*="bl-final"]) { --st-c: #2C8A4C; --st-bg: #E4F4E9; }
:is(.act, .menu-item):is([href*="followup"], [href*="reschedule"])  { --st-c: #4A4FC4; --st-bg: #ECEDFB; }
:is(.act, .menu-item):is([href*="schedule.html"], [href*="flow=video"]) { --st-c: #1C7FB6; --st-bg: #E1F2FC; }
:is(.act, .menu-item)[href*="flow=second"]                          { --st-c: #6A4FB6; --st-bg: #F0ECFA; }
:is(.act, .menu-item):is([href*="report"], [href*="history"])       { --st-c: var(--color-secondary); --st-bg: var(--color-info-soft); }
:is(.act, .menu-item):is([href*="pending"], [href*="affected"], [href*="approvals"]) { --st-c: var(--color-urgent); --st-bg: var(--color-urgent-soft); }
:is(.act, .menu-item):is([href*="ipd"], [href*="admission"], [href*="beds"], [href*="room-transfer"]) { --st-c: #0E7490; --st-bg: #E0F2F7; }
:is(.act, .menu-item):is([href*="bl-patient"], [href*="bl-opd-bill"]) { --st-c: #3D5A80; --st-bg: #E6ECF4; }
/* Utility rows (Print, Share, History, Edit …) are buttons: quiet slate */
button.menu-item { --st-c: #3D5A80; --st-bg: #E6ECF4; }

.act:not(.is-locked) > .icon:not(.chev),
.menu-item:not(.menu-item--danger):not(.is-disabled) > .icon:not(.chev) {
  color: var(--st-c, var(--color-primary));
  background: var(--st-bg, color-mix(in srgb, currentColor 12%, var(--color-surface)));
}

/* "Needs your attention" — the patient app's "Your care" cards: one sideways
   row, two cards in view, each with a soft wash of its own colour at the top,
   kind + icon, a coloured "when", bold name, one detail and an action. */
.care-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  margin: 0 calc(-1 * var(--space-4)) var(--space-3);
  padding: 2px var(--space-4) 8px;
  scroll-padding: 0 var(--space-4);
}
.care-row::-webkit-scrollbar { display: none; }
.care-row.is-dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.care {
  flex: 0 0 46%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
  padding: 13px;
  border: 1px solid #E3EAF4;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, var(--st-bg, var(--color-primary-soft)) 0, var(--color-surface) 64px);
  box-shadow: var(--shadow-sm);
  color: var(--color-text);
}
.care-k { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700; color: var(--color-text-muted); line-height: 1.25; }
.care-k i {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--st-bg, #D6E0F0);
  border-radius: 10px;
  background: var(--color-surface);
  color: var(--st-c, var(--color-primary));
}
.care-k i .icon { width: 16px; height: 16px; }
.care-when { margin-top: 10px; font-size: 12.5px; font-weight: 800; color: var(--st-c, var(--color-primary)); }
.care b { margin-top: 2px; font-size: 14px; font-weight: 700; line-height: 1.3; }
.care-d {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 2px 0 10px;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--color-text-muted);
}
.care-btn {
  margin-top: auto;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid #E3EAF4;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
  color: var(--color-text);
}
.care-btn--main { border: 0; color: var(--color-primary-contrast); background: var(--gradient-button); box-shadow: var(--shadow-primary); }

/* "Coming up" — the patient app's row of small date cards: what is scheduled,
   kept apart from "Needs your attention" (what needs action now). */
.dash-label__link { font-size: 12.5px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--color-primary-dark); }
.next-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  margin: 0 calc(-1 * var(--space-4)) var(--space-3);
  padding: 0 var(--space-4) 6px;
  scroll-padding: 0 var(--space-4);
}
.next-row::-webkit-scrollbar { display: none; }
.next-row.is-dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.next {
  flex: 0 0 132px;
  scroll-snap-align: start;
  padding: 12px;
  border: 1px solid #E3EAF4;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--st-bg, var(--color-surface)) 0, var(--color-surface) 70px);
  box-shadow: var(--shadow-sm);
  color: var(--color-text);
}
.next i {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  margin-bottom: 9px;
  border: 1.5px solid var(--st-bg, #D6E0F0);
  border-radius: 10px;
  background: var(--color-surface);
  color: var(--st-c, var(--color-primary));
}
.next i .icon { width: 16px; height: 16px; }
.next b { display: block; font-size: 13px; font-weight: 700; line-height: 1.25; }
.next span { display: block; margin-top: 3px; overflow: hidden; font-size: 11.5px; color: var(--color-text-muted); white-space: nowrap; text-overflow: ellipsis; }
.next em { display: block; margin-top: 8px; font-size: 12px; font-style: normal; font-weight: 800; color: var(--st-c, var(--color-primary)); }
.next small { display: block; margin-top: 1px; font-size: 11.5px; font-weight: 700; color: var(--color-text); }

/* The main button on an attention card takes the card's own colour, so an
   emergency card stays red from top to bottom (no teal next to red) */
.care-btn--main {
  background: linear-gradient(to bottom right, color-mix(in srgb, var(--st-c, var(--color-primary)) 84%, #fff), var(--st-c, var(--color-primary)) 52%, color-mix(in srgb, var(--st-c, var(--color-primary)) 82%, #000));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--st-c, var(--color-primary)) 28%, transparent);
}

/* Module tiles (Medical Tourism, Case Manager, Engagement Hub): the patient
   app's "More services" tile: icon on top, name below, room to breathe.
   Long names wrap on 2 lines at most instead of being squeezed beside the icon. */
.tile-grid { gap: 10px; }
.tile {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  min-height: 104px;
  padding: 14px;
  border-radius: var(--radius-xl);
}
.tile:hover { transform: none; }
.tile__icon { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 14px; }
.tile__label { flex: 0 0 auto; font-size: 14px; font-weight: 700; line-height: 1.3; }
.tile__count { top: 12px; right: 12px; }

/* Number tiles inside a coloured header: more air, labels on one line */
.hero .grid-3 { gap: 10px; }
.hero .stat { padding: 12px; border-radius: 16px; }
.hero .stat__label { display: block; margin-top: 4px; font-size: 11.5px; line-height: 1.3; }
.hero h2 { font-size: 19px; line-height: 1.25; }
.hero + .content > .row:first-child { gap: 12px; margin-bottom: 2px; }

/* Module tiles: one meaningful colour per kind of task (same palette as Home / More) */
.tile { --st-c: var(--color-primary); --st-bg: var(--color-primary-soft); }
.tile[href^="intl-referrals"], .tile[href^="admission-tracker"]            { --st-c: #0F7F73; --st-bg: #E2F5F2; }
.tile[href="intl-referrals.html#board"], .tile[href^="cme"]                 { --st-c: #4A4FC4; --st-bg: #ECEDFB; }
.tile[href^="cost-estimator"], .tile[href^="billing"], .tile[href^="intl-billing"] { --st-c: #3D5A80; --st-bg: #E6ECF4; }
.tile[href^="verification-calls"], .tile[href^="intl-messages"]             { --st-c: #1C7FB6; --st-bg: #E1F2FC; }
.tile[href^="intl-insurance"]                                               { --st-c: #6A4FB6; --st-bg: #F0ECFA; }
.tile[href^="travel-visa"], .tile[href^="logistics"]                        { --st-c: var(--color-urgent); --st-bg: var(--color-urgent-soft); }
.tile[href^="translator"], .tile[href^="campaigns"]                         { --st-c: #C2417A; --st-bg: #FCE8F1; }
.tile[href^="document-library"], .tile[href^="patient-record"], .tile[href^="discharge"] { --st-c: #0E7490; --st-bg: #E0F2F7; }
.tile[href^="tourism-analytics"], .tile[href^="insights"]                   { --st-c: var(--color-secondary); --st-bg: var(--color-info-soft); }
.tile[href^="announcement"], .tile[href^="advertise"]                       { --st-c: #CC5B45; --st-bg: #FCEDE9; }
.tile[href^="pharma"]                                                       { --st-c: #2C8A4C; --st-bg: #E4F4E9; }
.tile[href^="help"]                                                         { --st-c: #1C7FB6; --st-bg: #E1F2FC; }
.tile .tile__icon, .tile .tile__icon--blue { color: var(--st-c); background: var(--st-bg); }

/* Compact module tiles (patient doc: compact cards, medium density, minimal
   scrolling): icon on top, tighter padding, no fixed height */
.tile-grid { gap: 8px; }
.tile { gap: 8px; min-height: 0; padding: 11px 12px; border-radius: 18px; }
.tile__icon { width: 34px; height: 34px; border-radius: 11px; }
.tile__icon .icon { width: 17px; height: 17px; }
.tile__label { font-size: 13px; line-height: 1.28; }
.tile__count { top: 9px; right: 9px; }
.hero .stat { padding: 10px 12px; }

/* ==========================================================================
   Notifications — the patient app's Updates screen: white cards, a coloured
   icon tile, bold title, muted detail, time top-right, a primary-colour dot
   for unread (no tinted row), small pill actions (first = filled), and the
   emergency item tinted red. Applies to notifications.html and the employee
   notifications.
   ========================================================================== */
.notification-list { gap: 9px; }
.notification-list .list-item,
.notification-list .list-item:last-child {
  position: relative;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid #E3EAF4;
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
.notification-list .list-item.is-unread { border-color: #D6E0F0; background: #FBFCFF; }
.notification-list .list-item.is-unread::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
}
.notification-list .list-item > .chev { display: none; }

/* Icon tile (both markups: span.file__icon and a bare svg) */
.notification-list .list-item > .file__icon,
.notification-list .list-item > .icon:not(.chev) {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  color: var(--st-c, var(--color-primary));
  background: var(--st-bg, var(--color-primary-soft));
}
.notification-list .list-item.is-unread > .icon:not(.chev) { background: var(--st-bg, var(--color-primary-soft)); }
.notification-list .list-item > .file__icon .icon { width: 18px; height: 18px; }

/* Text */
.notification-list .list-item__body > .row:first-child { padding-right: 16px; }
.notification-list .list-item__title { font-size: 14.5px; font-weight: 800; line-height: 1.35; }
.notification-list .list-item__meta { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.5; color: var(--color-text-muted); }
.notification-list .list-item__body br { display: none; }
.notification-list .list-item .text-xs.subtle { font-size: 11.5px; font-weight: 600; color: var(--color-text-subtle); }

/* Status tag: small bordered tag like the patient "IMPORTANT" */
.notification-list .badge--emergency, .notification-list .badge--urgent {
  padding: 1px 6px;
  border: 1px solid color-mix(in srgb, currentColor 30%, var(--color-surface));
  border-radius: 6px;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.notification-list .badge--emergency::before, .notification-list .badge--urgent::before { display: none; }

/* Actions: small pills, the first one filled in the primary colour */
.notification-list .row--wrap { gap: 8px; margin-top: 6px; }
.notification-list .row--wrap .btn--sm {
  min-height: 32px;
  padding: 0 14px;
  border: 1.5px solid #D6E0F0;
  border-radius: 16px;
  background: var(--color-surface);
  font-size: 12.5px;
  color: var(--color-primary-dark);
  box-shadow: none;
}
.notification-list .row--wrap .btn--sm:not(.btn--link):first-of-type {
  border: 0;
  color: var(--color-primary-contrast);
  background: var(--gradient-button);
}
.notification-list .row--wrap .btn--link { border: 0; padding: 0 4px; background: none; color: var(--color-text-muted); }

/* Emergency item: tinted red card, red main action (patient "SOS" card) */
.notification-list .list-item:has(.badge--emergency) { border: 1.5px solid var(--color-emergency-border); background: #FFF7F7; }
.notification-list .list-item:has(.badge--emergency)::after { background: var(--color-emergency); }
.notification-list .list-item:has(.badge--emergency) { --st-c: var(--color-emergency); --st-bg: var(--color-emergency-soft); }
.notification-list .list-item:has(.badge--emergency) .row--wrap .btn--sm:not(.btn--link):first-of-type { background: var(--color-emergency); }

/* Meaningful icon colours per kind of update */
.notification-list [data-cat="referral"]    { --st-c: #0F7F73; --st-bg: #E2F5F2; }
.notification-list [data-cat="appointment"] { --st-c: var(--color-secondary); --st-bg: var(--color-info-soft); }
.notification-list [data-cat="compliance"]  { --st-c: #2C8A4C; --st-bg: #E4F4E9; }
.notification-list [data-cat="updates"]     { --st-c: #0E7490; --st-bg: #E0F2F7; }
.notification-list [data-cat="tourism"]     { --st-c: var(--color-urgent); --st-bg: var(--color-urgent-soft); }
.notification-list [data-cat="referral"]:has(.badge--urgent) { --st-c: var(--color-urgent); --st-bg: var(--color-urgent-soft); }
.notification-list a[href^="emp-approvals"]  { --st-c: var(--color-emergency); --st-bg: var(--color-emergency-soft); }
.notification-list a[href^="rc-followup"]    { --st-c: #4A4FC4; --st-bg: #ECEDFB; }
.notification-list a[href^="rc-affected"]    { --st-c: var(--color-urgent); --st-bg: var(--color-urgent-soft); }
.notification-list a[href^="rc-opd-record"]  { --st-c: #1C7FB6; --st-bg: #E1F2FC; }
.notification-list a[href^="rc-admission"], .notification-list a[href^="rc-ipd"] { --st-c: #0E7490; --st-bg: #E0F2F7; }
.notification-list a[href^="bl-pending"]     { --st-c: var(--color-urgent); --st-bg: var(--color-urgent-soft); }
.notification-list a[href^="bl-final"]       { --st-c: #2C8A4C; --st-bg: #E4F4E9; }
.notification-list a[href^="bl-ipd-bill"]    { --st-c: #C2417A; --st-bg: #FCE8F1; }
.notification-list a[href^="bl-refund"]      { --st-c: #CC5B45; --st-bg: #FCEDE9; }

/* Employee notification groups: small capital section labels (patient "IMPORTANT") */
.notification-list { margin-top: 0; }
.stack:has(> .notification-list) > .section-head h2 {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.stack[data-emp-show="supervisor"]:has(> .notification-list) > .section-head h2 { color: var(--color-emergency); }

/* ==========================================================================
   Colour layer — plain white screens get a calm, meaningful colour theme
   (patient app style): a soft teal glow at the top of every inner screen,
   cards washed in their status colour, initials avatars, coloured stripes.
   ========================================================================== */

/* 1. Soft teal glow at the top of inner screens (scrolls with the content) */
.screen:not(.onb):not(.screen--auth):not(.screen--welcome):not(.screen--ob) {
  background:
    radial-gradient(130% 260px at 50% 0, color-mix(in srgb, var(--color-primary) 13%, transparent) 0, transparent 100%) no-repeat local,
    var(--color-bg);
}

/* 2. Status colour of a card, read from its own status badge */
.card:has(> .row:first-child .badge--emergency), .card:has(> .who + .badge--emergency), .card--emergency { --st-c: var(--color-emergency); --st-bg: var(--color-emergency-soft); }
.card:has(> .row:first-child .badge--urgent), .card--urgent { --st-c: var(--color-urgent); --st-bg: var(--color-urgent-soft); }
.card:has(> .row:first-child .badge--info) { --st-c: var(--color-secondary); --st-bg: var(--color-info-soft); }
.card:has(> .row:first-child :is(.badge--normal, .badge--success)), .card--normal { --st-c: var(--color-normal-dark); --st-bg: var(--color-normal-soft); }

/* 3. Those cards get a soft wash of their colour at the top */
.card:is(.card--emergency, .card--urgent, .card--normal, .card--person),
.card:has(> .row:first-child :is(.badge--emergency, .badge--urgent, .badge--info, .badge--normal, .badge--success)) {
  background: linear-gradient(180deg, color-mix(in srgb, var(--st-bg, var(--color-primary-soft)) 75%, var(--color-surface)) 0, var(--color-surface) 62px);
}

/* 4. Priority stripes come back (lost under the hairline card border) */
.card.card--emergency { border-left: 4px solid var(--color-emergency); }
.card.card--urgent { border-left: 4px solid var(--color-urgent); }
.card.card--normal { border-left: 4px solid var(--color-primary); }

/* 5. Initials avatar before a person's name (added by app.js) */
.who { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.avatar--card {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--st-c, var(--color-primary-dark));
  background: var(--color-surface);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--st-c, var(--color-primary)) 28%, var(--color-surface));
}
.card--person > p.muted { padding-left: 48px; font-size: 12.5px; line-height: 1.5; }
.card--person > .row:first-child h3 { font-size: 15px; }

/* 6. Agenda (Appointment Calendar): coloured time and a line joining the slots */
.agenda-item__time { font-weight: 800; color: var(--color-primary-dark); }
.agenda-item:has(.card--emergency) .agenda-item__time { color: var(--color-emergency); }

/* 7. Tag colours by meaning */
.badge.tag-video { color: #1C7FB6; background: #E1F2FC; }
.badge.tag-visit { color: var(--color-primary-dark); background: var(--color-primary-soft); }
.badge.tag-count { color: var(--color-primary-dark); background: var(--color-primary-soft); }
/* Optional fields carried over from the hospital's previous system
   (title, blood group, Aadhaar, TPA, MLC …). Collapsed by default so the
   screen keeps one task and one primary button; staff open it when needed. */
.more-fields {
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}
.more-fields > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-3) var(--card-pad);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
}
.more-fields > summary::-webkit-details-marker { display: none; }
.more-fields > summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--color-text-subtle);
  border-bottom: 2px solid var(--color-text-subtle);
  transform: rotate(45deg);
  transition: transform var(--transition-fast);
}
.more-fields[open] > summary::after { transform: rotate(-135deg); }
.more-fields > summary .text-xs { font-weight: var(--font-weight-semibold); color: var(--color-text-muted); }
.more-fields__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: 0 var(--card-pad) var(--card-pad);
}

/* Autocomplete dropdown: [data-ac] wraps a search input and an .ac__list of
   .ac__opt options. Nothing is listed until the user types; matches open in
   a dropdown under the field (patients, services …), so long lists never
   fill the page. */
.ac { position: relative; }
.ac__list {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  display: none;
  max-height: 320px;
  overflow-y: auto;
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-md, 0 8px 24px rgba(15, 23, 42, 0.14));
}
.ac.is-open .ac__list { display: block; }
.ac__opt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 0;
  border-bottom: var(--border-width) solid var(--color-border);
  background: none;
  text-align: left;
  color: var(--color-text);
  text-decoration: none;
  cursor: pointer;
}
.ac__opt.is-filtered, .ac__opt.is-overflow { display: none; }
.ac__opt:hover, .ac__opt.is-active { background: var(--color-primary-soft); }
.ac__opt.is-disabled { cursor: not-allowed; opacity: 0.7; }
.list-item.is-disabled { cursor: not-allowed; opacity: 0.7; }
.ac__opt.is-disabled:hover { background: none; }
.ac__row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.ac__name { font-size: var(--font-size-sm); font-weight: var(--font-weight-bold); }
.ac__meta { font-size: var(--font-size-xs); color: var(--color-text-muted); }
.ac__note { font-size: var(--font-size-xs); font-weight: var(--font-weight-semibold); color: var(--color-emergency); }
.ac__price { font-size: var(--font-size-sm); font-weight: var(--font-weight-bold); white-space: nowrap; }
.ac__none, .ac__more { display: none; margin: 0; padding: var(--space-2) var(--space-3); font-size: var(--font-size-xs); color: var(--color-text-muted); }
.ac.is-empty .ac__none, .ac.has-more .ac__more { display: block; }
.ac__picked { display: none; }
.ac.is-picked .ac__picked { display: block; }

/* Itemised IPD / interim bill: one collapsible group per charge head
   (Room, Consultant Visit, Lab …) with its subtotal, lines show
   date · qty × rate · doctor — mirrors the hospital's printed bill. */
.bill-group > summary strong { margin-left: auto; font-size: var(--font-size-sm); }
.bill-group .more-fields__body { gap: 0; padding-top: 0; }
.bill-line {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  border-top: var(--border-width) solid var(--color-border);
  font-size: var(--font-size-sm);
}
.bill-line .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bill-line__name { font-weight: var(--font-weight-semibold); }
.bill-line__meta { font-size: var(--font-size-xs); color: var(--color-text-muted); }
.bill-line strong { white-space: nowrap; }

/* A service just added to a bill flashes so staff see where it landed */
@keyframes line-added { from { background: var(--color-primary-soft); } to { background: transparent; } }
.list-item.is-new, .bill-line.is-new { animation: line-added 2.4s ease-out; }
.list-item [data-line-remove] { flex: none; margin-left: var(--space-1); }

/* Staff access: employee login picker, Team & Roles module checkboxes and
   the screen shown when a staff user opens a module they do not have */
.staff-pick { gap: var(--space-2); }
/* Employee login: role cards, fields with a leading icon, Password / OTP switch */
.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-grid .role-group { grid-column: 1 / -1; margin: 6px 2px -2px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--color-text-muted); }
.role-grid .role-group:first-child { margin-top: 0; }
.role-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px;
  border: 1.5px solid #E1E8F1;
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.role-card input { position: absolute; opacity: 0; pointer-events: none; }
.role-card__ico {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 6px;
  border-radius: 11px;
  color: var(--st-c);
  background: var(--st-bg);
}
.role-card__name { font-size: 13.5px; font-weight: 800; color: var(--color-text); }
.role-card__sub { font-size: 11.5px; color: var(--color-text-muted); }
.role-card::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 18px;
  height: 18px;
  border: 1.5px solid #D6E0EC;
  border-radius: 50%;
  background: var(--color-surface);
}
.role-card:has(input:checked) { border-color: var(--color-primary); background: linear-gradient(180deg, var(--color-primary-soft), var(--color-surface) 70%); box-shadow: 0 6px 16px rgba(15, 127, 115, 0.14); }
.role-card:has(input:checked)::after {
  border-color: var(--color-primary);
  background: var(--color-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.role-card:has(input:focus-visible) { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.input-ico { position: relative; display: block; }
.input-ico > .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--color-text-subtle); pointer-events: none; }
.input-ico > .input { padding-left: 44px; }
.input-ico:has(.input-ico__btn) > .input { padding-right: 48px; }
.input-ico:has(.input-ico__send) > .input { padding-right: 104px; }
.input-ico__btn, .input-ico__send { position: absolute; top: 50%; transform: translateY(-50%); border: 0; font: inherit; cursor: pointer; }
.input-ico__btn { right: 8px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: none; color: var(--color-text-subtle); }
.input-ico__btn.is-on { color: var(--color-primary-dark); background: var(--color-primary-soft); }
.input-ico__send { right: 7px; padding: 8px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--color-primary-dark); background: var(--color-primary-soft); }
.emp-login .tab-panel.is-active { gap: 4px; }
.emp-login__forgot { align-self: flex-end; }
/* Demo role sign-in: who is signing in, with a way back to the list */
.emp-as { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1.5px solid var(--color-primary); border-radius: var(--radius-xl); background: var(--color-primary-soft); }
.emp-as__ico { display: grid; place-items: center; flex: 0 0 44px; height: 44px; border-radius: 12px; color: var(--st-c); background: var(--color-surface); }
.emp-as strong { display: block; font-size: 15px; font-weight: 800; color: var(--color-text); }
.emp-as .grow > span { display: block; font-size: 12.5px; color: var(--color-text-muted); }
.emp-as .grow > .emp-as__sub { font-size: 11.5px; color: var(--color-text-subtle); }
.emp-as__change { align-self: flex-start; font-size: 12.5px; font-weight: 800; color: var(--color-primary-dark); }
.emp-login__note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-lg);
  background: var(--color-primary-soft);
  font-size: 12px;
  line-height: 1.45;
  color: var(--color-text-muted);
}
.emp-login__note .icon { flex: 0 0 auto; color: var(--color-primary-dark); }
.staff-mods { display: flex; flex-direction: column; gap: var(--space-1); }
.staff-mods__area { margin: var(--space-1) 0 0; font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); color: var(--color-text-muted); }
.staff-mods__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.check--compact { min-height: 40px; padding: var(--space-1) var(--space-2); gap: var(--space-2); font-size: var(--font-size-sm); }
button.list-item { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; border: 0; border-bottom: var(--border-width) solid #EEF2F7; background: var(--color-surface); }
button.list-item:last-child { border-bottom: 0; }
.no-access {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-4);
  min-height: 100%;
  padding: var(--space-6, 32px) var(--space-4);
  text-align: center;
}

/* Calendar: days are tappable (week strip, week rows, month grid) */
.week .day, .month__cell:not(.month__cell--muted), .list-item.is-tappable { cursor: pointer; }
.week .day.is-today { box-shadow: inset 0 0 0 1.5px var(--color-primary); }
.week .day.is-today strong { color: var(--color-primary-dark); }
.week .day.is-selected { background: var(--gradient-button); box-shadow: var(--shadow-primary); }
.week .day.is-selected span { color: var(--color-on-primary-muted); }
.week .day.is-selected strong { color: var(--color-text-inverse); }
.week .day.is-selected .day__dot { background: var(--color-text-inverse); }
.list-item.is-tappable:hover { background: var(--color-primary-soft); }
.list-item.is-tappable > .chev { flex: 0 0 auto; margin-left: auto; color: var(--color-text-subtle); }
.month__cell.is-selected:not(.month__cell--today) { box-shadow: inset 0 0 0 1.5px var(--color-primary); color: var(--color-primary-dark); font-weight: 800; }
.month__cell--today.is-selected { box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 3.5px var(--color-primary); }
.cal-day { gap: var(--space-3); }
.cal-back {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-primary-dark);
  cursor: pointer;
}
.cal-empty {
  padding: 18px;
  border: 1px dashed #D6E0F0;
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  text-align: center;
  font-size: 13px;
  color: var(--color-text-muted);
}
.card.card--cancelled { opacity: 0.6; }
.card.card--cancelled .strong { text-decoration: line-through; }

/* Tab track: white surface so it stands out on the tinted screen */
.tabs { background: var(--color-surface); border: 1px solid #E1E8F1; box-shadow: 0 2px 8px rgba(16, 42, 67, 0.06); }
.tab:not(.is-active):hover { background: var(--color-primary-soft); }

/* Login + OTP: hero trust chips, tab icons, hint line, "or" divider, Employee login card */
.auth-hero__chips { position: relative; display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--space-3); }
.auth-hero__chips span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1px solid var(--color-on-primary-border);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-text-inverse);
  background: var(--color-on-primary-fill-strong);
}
.auth-body { gap: var(--space-4); }
.auth-body .tab { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.auth-body .btn .icon { margin-left: 4px; }
.auth-hint { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 12px; color: var(--color-text-muted); }
.auth-hint .icon { flex: 0 0 auto; color: var(--color-primary-dark); }
.auth-or { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-subtle); }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: #E1E8F1; }
.auth-alt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #E1E8F1;
  border-radius: var(--radius-xl);
  color: var(--color-text);
  background: var(--color-surface);
  box-shadow: none;
  text-decoration: none;
}
.auth-alt:hover { border-color: var(--color-primary); }
.auth-alt__ico { display: grid; place-items: center; flex: 0 0 40px; height: 40px; border-radius: 12px; color: var(--st-c); background: var(--st-bg); }
.auth-alt strong { display: block; font-size: 14px; font-weight: 800; }
.auth-alt .grow > span { display: block; margin-top: 1px; font-size: 12px; line-height: 1.35; color: var(--color-text-muted); }
.auth-alt > .icon { color: var(--color-text-subtle); }
.auth-legal { margin-top: auto; font-size: 11.5px; line-height: 1.5; text-align: center; color: var(--color-text-subtle); }
.auth-legal a { font-weight: 700; color: var(--color-text-muted); }

/* OTP: icon badge, filled boxes, countdown, safety note */
.otp-page__badge {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 24px;
  color: var(--color-text-inverse);
  background: var(--gradient-button);
  box-shadow: 0 10px 24px rgba(15, 127, 115, 0.28), 0 0 0 8px var(--color-primary-soft);
}
.otp-page__intro h2 { margin-bottom: 4px; color: var(--color-text); }
.otp-page__intro p { margin: 0; }
.otp input { border-radius: 14px; border-width: 1.5px; transition: border-color 0.15s, background 0.15s; }
.otp input.is-filled { border-color: var(--color-primary); background: var(--color-primary-soft); color: var(--color-primary-dark); }
.otp-page__resend b { color: var(--color-text); font-variant-numeric: tabular-nums; }
.otp-page__note { width: 100%; max-width: 326px; text-align: left; }
.otp-page__badge .icon { width: 32px; height: 32px; }
.otp input:not(.is-filled) { border-color: #D3DEEB; }

/* Register: "what you get" list */
.auth-perks { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 14px; border: 1px solid #E1E8F1; border-radius: var(--radius-xl); background: var(--color-surface); list-style: none; }
.auth-perks li { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--color-text); }
.auth-perks li > span { display: grid; place-items: center; flex: 0 0 32px; height: 32px; border-radius: 10px; color: var(--st-c); background: var(--st-bg); }

/* ==========================================================================
   UI audit fixes (Oct 2026)
   ========================================================================== */
/* Short screens: the bottom action bar sits at the bottom, not under the content */
.screen:has(> .action-bar) { display: flex; flex-direction: column; }
.screen:has(> .action-bar) > .content { flex: 1 0 auto; }
.screen:has(> .action-bar) > .action-bar { margin-top: auto; }

/* Readable teal text: links, amounts and text buttons use the darker teal (4.9:1 on white) */
.text-primary, .btn--link, a.medium, p a:not(.btn), dd a:not(.btn), .dash-label__link { color: var(--color-primary-dark); }
/* Orange "urgent" text darker for contrast; the soft fill stays */
.text-urgent, .badge--urgent { color: #C2620F; }

/* Country flag chip (emoji flags show as letters on Windows) */
.flag-chip {
  display: inline-grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  color: var(--color-status-intl);
  background: var(--color-status-intl-soft);
}

/* Charts: third series in brand purple instead of near-black navy */
.bar__fill--navy { background: var(--color-status-intl); }

/* Premium preview: stronger blur and a frosted panel behind the text */
.locked > .locked__content { filter: blur(5px); opacity: 0.4; }
.locked > .locked__cta { background: radial-gradient(closest-side, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.6) 70%, rgba(255, 255, 255, 0)); }

/* Wide report tables: soft fade on the right shows the table scrolls sideways */
.tbl-wrap:not(.is-end) { -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); }
/* Links on soft tinted pills/banners, and full-slot text, in the darker shade */
.otp-page__contact a, .banner a:not(.btn) { color: var(--color-primary-dark); }
.slot--full { color: #B4580B; }

/* ==========================================================================
   Settings (settings.html): account card, connected apps, grouped rows
   ========================================================================== */
.set-page [hidden] { display: none !important; }
.set-page .set-group { display: flex; flex-direction: column; gap: 8px; }
.set-page .dash-label { margin: 6px 2px 0; }
.set-txt { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 1px; }
.set-txt strong { font-size: 14px; font-weight: 700; color: var(--color-text); }
.set-txt small { font-size: 12px; line-height: 1.35; color: var(--color-text-muted); }
.set-list .mo-row { min-height: 58px; }
.set-list label.mo-row { cursor: pointer; }
.set-val { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--color-text-muted); }
.set-val--lock { padding: 4px 9px; border-radius: 999px; color: var(--color-primary-dark); background: var(--color-primary-soft); }
.set-val--lock .icon { width: 12px; height: 12px; }
.set-select { position: relative; flex: 0 0 auto; max-width: 48%; }
.set-select select {
  appearance: none;
  -webkit-appearance: none;
  max-width: 100%;
  padding: 7px 28px 7px 12px;
  border: 1px solid #DCE5EF;
  border-radius: 999px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-text);
  background: var(--color-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235C6675' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 10px center / 12px no-repeat;
  text-overflow: ellipsis;
  cursor: pointer;
}
.set-select select:focus { outline: none; border-color: var(--color-primary); }
.mo-row.is-off { opacity: 0.45; }
.mo-row.is-locked { cursor: default; }
.set-note { margin: 0 4px; font-size: 12px; color: var(--color-text-muted); }
.set-note--inline { margin: 0; font-family: inherit; font-size: 11.5px; font-weight: 600; letter-spacing: 0; text-transform: none; }

.set-account {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #E3EAF4;
  border-radius: var(--radius-xl);
  color: var(--color-text);
  background: linear-gradient(135deg, var(--color-primary-soft), var(--color-surface) 65%);
  box-shadow: var(--shadow-sm);
}
.set-account__logo {
  display: grid;
  place-items: center;
  flex: 0 0 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--color-surface);
  box-shadow: 0 4px 12px rgba(15, 127, 115, 0.15);
}
.set-account__logo img { width: 30px; height: 30px; }
.set-account__logo--text { font-size: 17px; font-weight: 800; color: var(--color-text-inverse); background: var(--gradient-button); }
.set-account .set-txt strong { font-size: 15.5px; font-weight: 800; }
.set-account__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.set-account > .chev { color: var(--color-text-subtle); }
.set-search { margin: 0; }
.set-search input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; outline: none; }

.set-apps { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.set-app {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 12px;
  border: 1px solid #E3EAF4;
  border-radius: var(--radius-xl);
  font: inherit;
  text-align: left;
  color: var(--color-text);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.set-app:hover { border-color: var(--st-c); }
/* Lone card on its own row: icon beside the text, status on the right */
.set-app--wide { grid-column: 1 / -1; display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; align-items: center; }
.set-app--wide .set-app__ico { grid-row: span 2; margin: 0; }
.set-app--wide .set-app__status { top: 50%; transform: translateY(-50%); }
.set-app__ico { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 6px; border-radius: 11px; color: var(--st-c); background: var(--st-bg); }
.set-app__ico .icon { width: 17px; height: 17px; }
.set-app strong { font-size: 13px; font-weight: 800; line-height: 1.25; }
.set-app small { font-size: 11.5px; line-height: 1.35; color: var(--color-text-muted); }
.set-app__status { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--color-success, #2C8A4C); }
.set-app__status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.set-app__status.is-off { color: var(--color-text-muted); }

.set-exit { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.set-exit .btn { gap: 6px; }
.set-exit__logout { color: var(--color-emergency) !important; border-color: #F3D2D2 !important; }
.set-version { margin: 0 0 8px; text-align: center; font-size: 11.5px; color: var(--color-text-subtle); }
.set-empty { padding: 18px; border: 1px dashed #D6E0F0; border-radius: var(--radius-xl); text-align: center; font-size: 13px; color: var(--color-text-muted); }
.sheet .set-list { margin: 4px 0; }
/* Settings rows that open a sheet (devices, terms, privacy) look like link rows */
.set-btnrow { width: 100%; margin: 0; border: 0; border-top: 1px solid #EEF2F7; background: none; font: inherit; text-align: left; cursor: pointer; }
.mo-row.set-btnrow:first-child { border-top: 0; }
.set-page .set-account + .mo-list { margin-top: 0; }
.hm-sheet .set-list .mo-row { min-height: 0; }
/* Settings → Text size: Large (per person, applied on every page by app.js) */
html.is-text-lg {
  --font-size-caps: 11px; --font-size-xxs: 12px; --font-size-xs: 12.5px; --font-size-sm: 14px; --font-size-body: 15.5px; --font-size-md: 16.5px; --font-size-lg: 18.5px; --font-size-xl: 21px;
  --font-size-field-label: 14px; --font-size-field: 16.5px; --font-size-form-sm: 14px; --font-size-form-xs: 12.5px;
}
html.is-text-lg .set-txt strong, html.is-text-lg .mo-row strong { font-size: 15.5px; }
html.is-text-lg .set-txt small { font-size: 13.5px; }
html.is-text-lg .set-select select { font-size: 14.5px; }

/* Home pill when referrals are paused in Settings */
.status-pill.is-paused .status-pill__dot { background: var(--color-urgent); box-shadow: none; }

/* Login + Register (easy version): label row with "Use email instead", inline error, account switch */
.auth-form { gap: var(--space-3); }
.auth-way__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.auth-way__top .field__label { margin: 0; }
.auth-switch { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 2px; border: 0; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--color-primary-dark); background: none; cursor: pointer; }
.auth-switch:hover { text-decoration: underline; }
.auth-way .input { min-height: 52px; font-size: 16px; }
.input.is-invalid { border-color: var(--color-emergency) !important; background: var(--color-emergency-soft); }
.auth-error { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--color-emergency); }
.auth-error[hidden], .auth-way[hidden], .auth-pw[hidden] { display: none; }
.auth-hint--center { justify-content: center; margin: 0; }
.auth-switch-acc { margin: 0; font-size: 13px; text-align: center; color: var(--color-text-muted); }
.auth-switch-acc a { font-weight: 800; color: var(--color-primary-dark); }
.auth-switch-acc a:hover { text-decoration: underline; }
/* "Sign in with OTP instead" / "with password instead" */
.auth-method { display: inline-flex; align-items: center; justify-content: center; gap: 6px; align-self: center; min-height: 32px; margin-top: -4px; padding: 0 6px; border: 0; font: inherit; font-size: 13px; font-weight: 700; color: var(--color-primary-dark); background: none; cursor: pointer; }
.auth-method:hover { text-decoration: underline; }

/* ---------- Employee profile ------------------------------------------------ */
.emp-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-hero);
  color: var(--color-text-inverse);
  background: var(--gradient-primary);
}
.emp-hero > * { position: relative; z-index: 1; }
.emp-hero__top { display: flex; align-items: center; gap: var(--space-3); }
.emp-hero__avatar {
  position: relative;
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary-deep, var(--color-primary));
  background: var(--color-surface);
  box-shadow: 0 0 0 4px var(--color-on-primary-border);
}
.emp-hero__dot { position: absolute; right: 2px; bottom: 2px; width: 14px; height: 14px; border-radius: 50%; background: #2ECC71; border: 2px solid var(--color-surface); }
.emp-hero h2 { color: var(--color-text-inverse); font-size: var(--font-size-lg); }
.emp-hero__role { font-weight: var(--font-weight-semibold); }
.emp-hero__meta, .emp-hero__month { font-size: var(--font-size-xs); color: var(--color-on-primary-muted); }
.emp-hero__month { margin-top: calc(-1 * var(--space-2)); text-align: right; }
.emp-hero__duty {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-sm);
  background: var(--color-on-primary-fill);
  border: var(--border-width) solid var(--color-on-primary-border);
}
.emp-hero__duty > span:nth-child(2) { flex: 1; }
.emp-hero__duty a { color: var(--color-text-inverse); font-weight: var(--font-weight-semibold); text-decoration: underline; text-underline-offset: 3px; }
.emp-hero__pulse { width: 9px; height: 9px; border-radius: 50%; background: #2ECC71; box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); }
@keyframes emp-pulse { 70% { box-shadow: 0 0 0 8px rgba(46, 204, 113, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); } }
@media (prefers-reduced-motion: reduce) { .emp-hero__pulse { animation: none; } }
.emp-hero__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
.emp-hero__stats > div { padding: var(--space-2); border-radius: var(--radius-md); text-align: center; background: var(--color-on-primary-fill); border: var(--border-width) solid var(--color-on-primary-border); }
.emp-hero__stats strong { display: block; font-family: var(--font-display); font-size: var(--font-size-lg); line-height: var(--line-height-tight); }
.emp-hero__stats small { font-size: var(--font-size-xs); color: var(--color-on-primary-muted); }
.emp-hero__stats span { font-size: var(--font-size-xxs); color: var(--color-on-primary-muted); }
.emp-space { display: flex; align-items: center; gap: var(--space-3); }
.emp-space__name { display: block; font-size: var(--font-size-md); }
.emp-mods .chip { cursor: default; background: var(--color-primary-tint); border-color: transparent; color: var(--color-primary-dark, var(--color-primary)); }
.emp-limits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.emp-limits > div { padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: var(--color-surface-soft); }
.emp-limits span { display: block; font-size: var(--font-size-xxs); color: var(--color-text-muted); }
.menu-ico { color: var(--st-c, var(--color-primary)); background: var(--st-bg, var(--color-primary-tint)); flex: 0 0 36px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--radius-md); }
.menu-ico .icon { width: 18px; height: 18px; }
.menu-item__label { display: block; }
.menu-item__meta { display: block; font-size: var(--font-size-xs); font-weight: var(--font-weight-regular, 400); color: var(--color-text-muted); }
.card.menu { padding-top: var(--space-1); padding-bottom: var(--space-1); }
.btn--danger-ghost { color: var(--color-emergency); background: transparent; border: var(--border-width) solid var(--color-border); }
.card.menu > .menu-item:has(+ .is-role-hidden:last-child) { border-bottom: 0; }

/* ---------- Staff desk home screens (.is-emp-home, set by app.js) ---------- */
.emp-title.home-hero {
  align-items: center;
  margin: var(--space-3) var(--space-4) 0;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  color: var(--color-text-inverse);
  background: var(--gradient-primary);
}
.home-hero__text { flex: 1; min-width: 0; }
.home-hero h1 { color: var(--color-text-inverse); font-size: var(--font-size-lg); }
.home-hero__hi { font-size: var(--font-size-xs); color: var(--color-on-primary-muted); }
.home-hero__meta { margin-top: 2px; font-size: var(--font-size-xs); color: var(--color-on-primary-muted); }
.home-hero__meta .strong, .home-hero__meta strong { color: var(--color-text-inverse); }
.home-hero__date { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; font-size: var(--font-size-xxs); color: var(--color-on-primary-muted); }
.home-hero__date strong { font-size: var(--font-size-md); line-height: 1.1; color: var(--color-text-inverse); }

/* Count cards: plain white, one accent colour; a small chevron marks the ones that open a list */
.is-emp-home .stat { position: relative; border: var(--border-width) solid var(--color-border); background: var(--color-surface); box-shadow: none; }
.is-emp-home .stat__value { color: var(--color-text); }
.is-emp-home a.stat:hover { border-color: var(--color-primary); }
.is-emp-home a.stat::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 12px;
  width: 14px;
  height: 14px;
  background: center / 14px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18l6-6-6-6'/%3E%3C/svg%3E");
}

/* Buttons read as buttons: teal outline for the main action, grey outline for the rest */
.is-emp-home .content .btn--outline { color: var(--color-primary-dark); background: var(--color-surface); border: var(--border-width) solid var(--color-primary); font-weight: var(--font-weight-semibold); }
.is-emp-home .content .btn--outline:hover { background: var(--color-primary-soft); }
.is-emp-home .content .btn--ghost { color: var(--color-text); background: var(--color-surface); border: var(--border-width) solid var(--color-border-strong, #CBD5E1); font-weight: var(--font-weight-semibold); }
.is-emp-home .content .btn--ghost:hover { border-color: var(--color-primary); color: var(--color-primary-dark); }
.home-hero .icon-btn--box { align-self: flex-start; color: var(--color-text-inverse); background: var(--color-on-primary-fill-strong); border-color: transparent; }

/* Admin dashboard: departments as quiet grouped rows */
.dept-group + .dept-group { margin-top: var(--space-4); }
.dept-group + p.subtle { margin-top: var(--space-3); }
.need-grid + p.subtle { margin-top: var(--space-4); padding-top: var(--space-3); border-top: var(--border-width) solid var(--color-border); }
.need-card > p.subtle, .dept-group__title { padding-left: var(--space-1); padding-right: var(--space-1); }
.dept-group__title { margin-bottom: var(--space-2); font-size: var(--font-size-xxs); font-weight: var(--font-weight-bold); letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-subtle); }
.dept-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.dept-row { display: flex; align-items: center; gap: var(--space-2); min-height: 44px; padding: var(--space-2); border: var(--border-width) solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-text); font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold); }
.dept-row:hover { border-color: var(--color-primary); }
.dept-row__icon { flex: 0 0 28px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: var(--radius-sm); color: var(--st-c, var(--color-primary-dark)); background: var(--st-bg, var(--color-primary-soft)); }
.dept-row__icon .icon { width: 16px; height: 16px; }
.dept-row__name { flex: 1; min-width: 0; line-height: 1.2; }
.dept-row__count { flex: 0 0 auto; min-width: 22px; padding: 1px 7px; border-radius: var(--radius-pill); font-size: var(--font-size-xxs); font-weight: var(--font-weight-bold); text-align: center; color: var(--color-text-muted); background: var(--color-surface-soft, #F1F5F9); }

/* Dashboard: urgent cards side by side in one swipe row; one card fills the width */
.alert-rail { display: flex; gap: var(--space-3); margin: var(--space-4) calc(-1 * var(--space-4)) 0; padding: 0 var(--space-4); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.alert-rail::-webkit-scrollbar { display: none; }
.alert-rail > .emergency-strip { flex: 0 0 88%; min-width: 0; margin-top: 0; scroll-snap-align: start; }
.alert-rail > .emergency-strip:only-child { flex-basis: 100%; }
.alert-rail:empty { display: none; }
.alert-rail { scroll-padding-inline: var(--space-4); overflow-anchor: none; }
.alert-rail .emergency-strip strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.alert-rail .emergency-strip .grow { min-width: 0; }
.alert-rail > .emergency-strip { flex-basis: 91%; }
.alert-rail .emergency-strip strong { font-size: var(--font-size-sm); }

/* Urgent row as an auto-sliding banner: one full card at a time */
.alert-rail > .emergency-strip { flex-basis: 100%; }
.alert-dots { display: flex; justify-content: center; gap: 6px; margin-top: var(--space-2); }
.alert-dots button { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 6px; background: var(--color-emergency-border); cursor: pointer; transition: width .2s; }
.alert-dots button.is-active { width: 18px; background: var(--color-emergency); }
.alert-rail { gap: 0; margin: var(--space-4) 0 0; padding: 0; scroll-padding-inline: 0; }
.alert-rail > .emergency-strip { flex: 0 0 100%; }
.alert-rail.is-auto { overflow: hidden; scroll-snap-type: none; }
.alert-rail.is-auto > .emergency-strip { transition: transform .45s ease; }
/* The urgent banner takes the search bar's place: it overlaps the bottom of the teal header */
.dash-head + .dash-body > .alert-rail:first-child { position: relative; z-index: 3; margin-top: -30px; border-radius: var(--radius-lg); box-shadow: 0 8px 24px rgba(32, 42, 55, 0.10); }
.dash-head + .dash-body > .alert-rail:first-child + .alert-dots + .searchbar { margin-top: var(--space-3); }

/* 7. One rule for every list card: a left stripe in its status colour, read from the
      card's own status badge (red emergency, orange urgent, teal done, blue info...).
      Entry cards with no status get the brand teal so all lists look the same. */
.card:has(> .row:first-child .badge--st.st-critical) { --st-c: var(--color-emergency); --st-bg: var(--color-emergency-soft); }
.card:has(> .row:first-child .badge--st.st-action) { --st-c: var(--color-status-action); --st-bg: var(--color-status-action-soft); }
.card:has(> .row:first-child .badge--st.st-intl) { --st-c: var(--color-status-intl); --st-bg: var(--color-status-intl-soft); }
.card:has(> .row:first-child .badge--st.st-info) { --st-c: var(--color-secondary); --st-bg: var(--color-secondary-soft); }
.card:has(> .row:first-child .badge--st.st-done) { --st-c: var(--color-primary-dark); --st-bg: var(--color-primary-soft); }
.card:has(> .row:first-child .badge--st.st-neutral) { --st-c: #9AA6B8; --st-bg: var(--color-muted-soft); }
:is(a.card, article.card, .card:has(> .row:first-child :is(.badge--emergency, .badge--urgent, .badge--info, .badge--normal, .badge--success, .badge--st))):not(.card--soft):not(.card--primary):not(.menu) {
  border-left: 4px solid var(--st-c, var(--color-primary));
}
.care[class*="st-"] { border-left: 4px solid var(--st-c); }

/* Hero numbers: white on teal (the global stat colour is dark text) */
.hero .stat__value { color: var(--color-text-inverse); }
.hero .stat__label { color: var(--color-text-inverse); opacity: 0.92; }

/* Global Care dashboard: queue tabs sit centred on the hero's bottom edge,
   half on teal and half on the page (same idea as the patient app home search) */
.hero--tabs { --hero-tabs-h: calc(var(--tab-height) + 2 * var(--space-1) + 2 * var(--border-width)); padding-bottom: calc(var(--hero-tabs-h) / 2 + var(--space-4)); }
.hero-tabs__title { margin-top: var(--space-4); font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-on-primary-muted); }
.hero-tabs { position: relative; z-index: 3; margin: calc(var(--tab-height) / -2 - var(--space-1) - var(--border-width)) var(--space-3) 0; }
.hero-tabs .tabs { border-radius: var(--radius-pill); background: var(--color-surface); box-shadow: 0 1px 2px rgba(32, 42, 55, 0.06), 0 8px 20px rgba(32, 42, 55, 0.10); }
.hero-tabs .tab { border-radius: var(--radius-pill); }

/* International Patient Profile: Global Care case stage strip */
.gc-steps { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 0; padding: 0; list-style: none; }
.gc-steps li { font-size: var(--font-size-xxs); font-weight: var(--font-weight-bold); color: var(--color-text-subtle); padding: 3px 8px; border-radius: var(--radius-pill); background: var(--color-bg); }
.gc-steps li.is-done { color: var(--color-normal-dark); }
.gc-steps li.is-now { color: var(--color-text-inverse); background: var(--color-primary); }

/* Global Care home: desk tile count of cases waiting at that desk */
.gc-desk { position: relative; }
.gc-desk__count { position: absolute; top: 6px; right: 8px; min-width: 20px; padding: 1px 6px; border-radius: var(--radius-pill); background: var(--color-primary-soft); color: var(--color-primary); font-size: var(--font-size-xxs); font-weight: var(--font-weight-bold); }
.gc-desk.is-active .gc-desk__count { background: var(--color-primary); color: var(--color-text-inverse); }

/* A word in a stat tile (e.g. Status: Completed) - smaller than a number so it fits the tile */
.stat__value--word { font-size: 15px; line-height: 30px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ==========================================================================
   Simplified hospital (client spec "Helthio - Hospital"): admin home, employee
   home, 22 modules with one worklist pattern, employees, module ON/OFF.
   Rendered by scripts/hms.js. Same teal theme, Manrope and card language.
   ========================================================================== */
.hm-group { margin: 18px 2px 8px; font-size: var(--font-size-xxs); font-weight: var(--font-weight-bold); letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-subtle); }
.need-card .hm-group:first-of-type { margin-top: 4px; }
.hm-sub { font-size: var(--font-size-xs); line-height: 1.45; color: var(--color-text-muted); }
.hm-eyebrow { font-size: var(--font-size-xxs); font-weight: var(--font-weight-bold); letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-primary-dark); }
.hm-eyebrow--gap { margin-top: 6px; }
.hm-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--color-border); border-radius: 18px; background: var(--color-surface); box-shadow: var(--shadow-sm); }

/* Module tile: OFF state + live count */
.hm-tile.is-off { opacity: 0.55; }
.hm-tile.is-off .need-item__icon { filter: grayscale(1); }
.hm-off { position: absolute; top: -6px; right: -10px; padding: 1px 6px; border-radius: var(--radius-pill); font-size: var(--font-size-caps); font-weight: var(--font-weight-bold); letter-spacing: 0.04em; color: #fff; background: var(--color-text-muted); }
.hm-off--inline { position: static; }
.hm-modcard .need-grid { row-gap: 18px; }
.hm-modcard .need-item > span:last-child { text-align: center; line-height: 1.25; }

/* Home: header avatar, branch, 4 counters, quick actions */
.hm-me { flex: 0 0 38px; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-size: var(--font-size-sm); font-weight: var(--font-weight-bold); color: var(--color-primary-dark); background: #fff; }
.hm-branch { padding: 1px 4px; border: 0; border-radius: 6px; font: inherit; font-weight: 700; color: #fff; background: rgba(255, 255, 255, 0.16); }
.hm-branch option { color: var(--color-text); }
.hm-branch-switch { margin-left: 4px; padding: 1px 8px; border: 1px solid rgba(255, 255, 255, 0.55); border-radius: 999px; font: inherit; font-size: 0.78em; font-weight: 600; color: #fff; background: transparent; cursor: pointer; }
.hm-branch-switch:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* QA: 40 px touch area without changing the chip size */
.hm-branch-switch { position: relative; }
.hm-branch-switch::after { content: ""; position: absolute; inset: -11px -6px; }
.hm-radio { display: flex; gap: 10px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--color-border, #e5e7eb); }
.hm-radio:last-child { border-bottom: 0; }
.hm-hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hm-hero-stats .hero-chip { flex-direction: column; align-items: flex-start; gap: 3px; padding: 9px 8px; position: relative; }
.hm-hero-stats .hero-chip strong { font-size: var(--font-size-lg); }
.hm-hero-stats .hero-chip span { font-size: var(--font-size-caps); }
.hm-hero-stats .hero-chip__dot { position: absolute; top: 9px; right: 9px; }
.hm-quick { position: relative; z-index: 3; margin-top: -26px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hm-quick a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border: 1px solid var(--color-border); border-radius: 16px; font-size: var(--font-size-xs); font-weight: 700; color: var(--color-text); background: #fff; box-shadow: var(--shadow-md); }
.hm-quick a .icon { color: var(--color-primary-dark); }
.hm-quick b { position: absolute; top: 6px; right: 6px; padding: 1px 6px; border-radius: var(--radius-pill); font-size: var(--font-size-caps); color: #fff; background: var(--color-urgent); }
.dash-head + .dash-body > .hm-search--home:first-child { position: relative; z-index: 3; margin-top: -26px; box-shadow: var(--shadow-md); }

/* Bottom-nav alert count */
.bottom-nav a { position: relative; }
.hm-nav-count { position: absolute; top: 6px; left: calc(50% + 4px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; font-size: var(--font-size-caps); font-weight: var(--font-weight-bold); line-height: 17px; text-align: center; color: #fff !important; background: var(--color-emergency); }

/* Module header: title, search, then counters overlapping */
.hm-mhead { position: relative; padding: 8px 14px 34px; color: #fff; background: var(--gradient-primary); border-radius: 0 0 24px 24px; }
.hm-mhead__bar { display: flex; align-items: center; gap: 10px; }
.hm-mhead__bar .icon-btn { color: #fff; background: rgba(255, 255, 255, 0.14); border-radius: 12px; }
.hm-mhead__ico { flex: 0 0 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; color: var(--st-c); background: var(--st-bg); }
.hm-mhead h1 { font-size: var(--font-size-lg); font-weight: var(--font-weight-bold); line-height: 1.2; color: #fff; }
.hm-mhead p { font-size: var(--font-size-xs); color: rgba(255, 255, 255, 0.78); }
.hm-new { display: inline-flex; align-items: center; gap: 4px; padding: 7px 11px; border: 0; border-radius: var(--radius-pill); font: inherit; font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); color: var(--color-primary-dark); background: #fff; cursor: pointer; }
.hm-search { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 0 12px; height: 42px; border-radius: 14px; color: var(--color-text-muted); background: #fff; }
.hm-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; font: inherit; font-size: var(--font-size-body); color: var(--color-text); background: transparent; }
.hm-search:focus-within { box-shadow: 0 0 0 2px var(--color-primary-tint-strong); }
.hm-search--light, .hm-search--home { border: 1px solid var(--color-border); }
.hm-counters { position: relative; z-index: 6; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: -24px 12px 0; }
.hm-counter { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 9px 8px; border: 1px solid var(--color-border); border-radius: 14px; font: inherit; text-align: left; background: #fff; box-shadow: var(--shadow-md); cursor: pointer; }
.hm-counter strong { font-size: var(--font-size-lg); font-weight: var(--font-weight-bold); line-height: 1.1; color: var(--color-text); }
.hm-counter span { font-size: var(--font-size-caps); font-weight: 600; line-height: 1.2; color: var(--color-text-muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hm-counter.is-active { border-color: var(--color-primary); box-shadow: 0 0 0 1px var(--color-primary), var(--shadow-md); }
.hm-counter.is-active strong { color: var(--color-primary-dark); }
.hm-mbody { display: flex; flex-direction: column; gap: 12px; padding: 14px 12px 20px; }
.hm-tabs { background: #fff; }
.hm-tabs .tab b { margin-left: 2px; padding: 0 5px; border-radius: var(--radius-pill); font-size: var(--font-size-caps); color: var(--color-primary-dark); background: var(--color-primary-soft); }
.hm-tabs .tab.is-active b { color: #fff; background: var(--color-primary-dark); }
.hm-offbar { margin: 10px 12px 0; }
.hm-panel { display: flex; flex-direction: column; gap: 10px; }

/* Worklist row */
.hm-list { display: flex; flex-direction: column; gap: 8px; }
.hm-row { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 12px 12px 15px; border: 1px solid var(--color-border); border-radius: 16px; font: inherit; text-align: left; color: var(--color-text); background: #fff; box-shadow: var(--shadow-sm); cursor: pointer; overflow: hidden; }
.hm-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--color-primary); }
.hm-row.is-urgent::before { background: var(--color-urgent); }
.hm-row.is-critical::before { background: var(--color-emergency); }
.hm-row.is-done, .hm-row.is-moved { background: #FAFCFD; }
.hm-row.is-done::before, .hm-row.is-moved::before { background: var(--color-border-strong); }
.hm-row.is-new { box-shadow: 0 0 0 2px var(--color-primary-tint-strong), var(--shadow-sm); }
.hm-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hm-row__top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.hm-row__top strong { font-size: var(--font-size-body); font-weight: var(--font-weight-bold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-row__when { flex: 0 0 auto; font-size: var(--font-size-xxs); font-weight: 700; color: var(--color-text-muted); }
.hm-row__mod { font-size: var(--font-size-caps); font-weight: var(--font-weight-bold); letter-spacing: 0.03em; text-transform: uppercase; color: var(--color-primary-dark); }
.hm-row__meta { font-size: var(--font-size-xs); font-weight: 600; color: var(--color-text-subtle); }
.hm-row__text { font-size: var(--font-size-sm); line-height: 1.4; color: var(--color-text-muted); }
.hm-row__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; }
.hm-row__foot .badge { white-space: normal; }
.hm-row__foot .badge .icon { width: 12px; height: 12px; }
.hm-row__amt { margin-left: auto; font-size: var(--font-size-sm); font-weight: var(--font-weight-bold); }
.hm-row__chev { flex: 0 0 auto; color: var(--color-text-subtle); }
.hm-val { font-size: var(--font-size-sm); font-weight: 700; color: var(--color-text); }
.hm-val.is-off { color: var(--color-text-subtle); }
.hm-avatar { flex: 0 0 38px; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-size: var(--font-size-sm); font-weight: var(--font-weight-bold); color: var(--color-primary-dark); background: var(--color-primary-soft); }
.hm-avatar--lg { flex-basis: 56px; width: 56px; height: 56px; font-size: var(--font-size-lg); }
.hm-count { margin: 2px 2px -2px; }
.hm-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 12px; border: 1px dashed var(--color-border-strong); border-radius: 16px; text-align: center; font-size: var(--font-size-sm); color: var(--color-text-muted); background: #fff; }
.hm-empty .icon { width: 28px; height: 28px; color: var(--color-primary); }
.hm-linkcard { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--color-border); border-radius: 16px; background: #fff; box-shadow: var(--shadow-sm); color: var(--color-text); }
.hm-linkcard > .icon:first-child { color: var(--color-primary-dark); }
.hm-linkcard strong { display: block; font-size: var(--font-size-body); }
.hm-linkcard span span { font-size: var(--font-size-xs); color: var(--color-text-muted); }
.hm-more { border: 1px solid var(--color-border); border-radius: 16px; background: #fff; }
.hm-more summary { padding: 12px 14px; font-size: var(--font-size-sm); font-weight: 700; color: var(--color-text-muted); cursor: pointer; }
.hm-more div { display: flex; flex-direction: column; padding: 0 6px 8px; }
.hm-more a { display: flex; align-items: center; justify-content: space-between; padding: 10px 8px; border-top: 1px solid var(--color-border); font-size: var(--font-size-sm); font-weight: 600; color: var(--color-text); }

/* Bottom sheet for an item */
.hm-sheet-wrap { position: absolute; inset: 0; z-index: 40; }
.hm-scrim { position: absolute; inset: 0; border: 0; background: var(--color-overlay); opacity: 0; transition: opacity 0.2s; }
.hm-sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 86%; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 10px 16px 24px; border-radius: 24px 24px 0 0; background: #fff; transform: translateY(100%); transition: transform 0.24s ease; }
.hm-sheet-wrap.is-open .hm-scrim { opacity: 1; }
.hm-sheet-wrap.is-open .hm-sheet { transform: none; }
.hm-sheet__head { display: flex; align-items: flex-start; gap: 10px; }
.hm-sheet__head h2 { margin: 2px 0; font-size: var(--font-size-xl); font-weight: var(--font-weight-bold); }
.hm-detail { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 14px; background: var(--color-bg); font-size: var(--font-size-body); line-height: 1.45; }
.hm-big { font-size: var(--font-size-lg); font-weight: var(--font-weight-bold); }
.hm-actions { display: flex; flex-direction: column; gap: 8px; }
.hm-linked { display: flex; flex-direction: column; border: 1px solid var(--color-border); border-radius: 14px; overflow: hidden; }
.hm-linked a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; font-size: var(--font-size-sm); font-weight: 700; color: var(--color-text); }
.hm-linked a + a { border-top: 1px solid var(--color-border); }
.hm-linked small { display: block; font-size: var(--font-size-xs); font-weight: 500; color: var(--color-text-muted); }
.hm-linked b { flex: 0 0 auto; max-width: 45%; font-size: var(--font-size-xxs); text-align: right; color: var(--color-primary-dark); }
.hm-full { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px; font-size: var(--font-size-sm); font-weight: 700; color: var(--color-primary-dark); }
.hm-picklist { display: flex; flex-direction: column; gap: 6px; }
.hm-picklist button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 12px; font: inherit; text-align: left; background: #fff; cursor: pointer; }
.hm-picklist button span { font-size: var(--font-size-xs); color: var(--color-text-muted); }
.hm-kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: var(--font-size-sm); }
.hm-kv span { color: var(--color-text-muted); }

/* Reports */
.hm-period { flex-wrap: wrap; }
.hm-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hm-stat { padding: 12px; border: 1px solid var(--color-border); border-radius: 14px; background: #fff; }
.hm-stat strong { display: block; font-size: var(--font-size-lg); font-weight: var(--font-weight-bold); }
.hm-stat span { font-size: var(--font-size-xs); color: var(--color-text-muted); }
.hm-bars { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--color-border); border-radius: 16px; background: #fff; }
.hm-bar { display: grid; grid-template-columns: 96px 1fr auto; align-items: center; gap: 8px; font-size: var(--font-size-xs); }
.hm-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-text-muted); }
.hm-bar i { height: 8px; border-radius: 4px; background: var(--color-bg); overflow: hidden; }
.hm-bar b { display: block; height: 100%; border-radius: 4px; background: var(--color-primary); }
.hm-bar strong { font-size: var(--font-size-xs); }
.hm-audit { display: flex; flex-direction: column; border: 1px solid var(--color-border); border-radius: 16px; background: #fff; }
.hm-audit > div { padding: 10px 14px; font-size: var(--font-size-sm); }
.hm-audit > div + div { border-top: 1px solid var(--color-border); }
.hm-audit__at { font-size: var(--font-size-xxs); font-weight: 700; color: var(--color-text-subtle); }

/* Switch rows: module ON/OFF, employee switches, privileges */
.hm-switches, .hm-privs { display: flex; flex-direction: column; gap: 0; }
.hm-switches.hm-card { padding: 4px 14px; }
.hm-switch { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.hm-switch + .hm-switch { border-top: 1px solid var(--color-border); }
.hm-switch b { display: block; font-size: var(--font-size-body); }
.hm-switch small { display: block; font-size: var(--font-size-xs); line-height: 1.35; color: var(--color-text-muted); }
.hm-switch.is-hoff b { color: var(--color-text-muted); }
.hm-switch.is-hoff small { color: var(--color-urgent); font-weight: 700; }
.hm-switch__ico { flex: 0 0 32px; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: var(--st-c); background: var(--st-bg); }
.hm-status { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hm-emp { gap: 12px; }
.hm-emp section { scroll-margin-top: 70px; }
.hm-modlist { padding: 4px 14px; gap: 0; }
.hm-modlist a { display: flex; align-items: center; gap: 10px; padding: 11px 0; color: var(--color-text); }
.hm-modlist a + a { border-top: 1px solid var(--color-border); }
.hm-modlist b { display: block; font-size: var(--font-size-body); }
.hm-modlist small { display: block; font-size: var(--font-size-xs); line-height: 1.35; color: var(--color-text-muted); }
.hm-modlist > a > .icon:last-child { color: var(--color-text-subtle); }
.hm-profile { flex-direction: row; align-items: center; gap: 14px; }
.hm-profile h2 { font-size: var(--font-size-lg); font-weight: var(--font-weight-bold); }

/* Login + registration (REG-01 … REG-04, LOGIN-01) */
.welcome__actions--two { display: flex; flex-direction: column; gap: 10px; }
.welcome__actions--two .btn { width: 100%; }
.btn--ghost-white { border: 1.5px solid rgba(255, 255, 255, 0.7); color: #fff; background: transparent; }
.hm-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--color-bg); }
.hm-seg button { padding: 9px; border: 0; border-radius: 10px; font: inherit; font-size: var(--font-size-sm); font-weight: 700; color: var(--color-text-muted); background: transparent; cursor: pointer; }
.hm-seg button.is-active { color: var(--color-primary-dark); background: #fff; box-shadow: var(--shadow-sm); }
.hm-otp-row { display: flex; gap: 8px; }
.hm-otp-row .input { flex: 1; min-width: 0; }
.hm-demo { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px dashed var(--color-border-strong); border-radius: 16px; }
.hm-demo .chips { flex-wrap: wrap; }
.hm-verified { display: inline-flex; align-items: center; gap: 4px; font-size: var(--font-size-xs); font-weight: 700; color: var(--color-primary-dark); }
.hm-doc { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--color-border); border-radius: 14px; background: #fff; }
.hm-doc b { display: block; font-size: var(--font-size-body); }
.hm-doc small { font-size: var(--font-size-xs); color: var(--color-text-muted); }
.hm-doc.is-done { border-color: var(--color-primary); background: var(--color-primary-tint); }
.hm-doc.is-missing { border-color: var(--color-emergency); }
.hm-steps { display: flex; flex-direction: column; padding: 4px 14px; border: 1px solid var(--color-border); border-radius: 16px; background: #fff; }
.hm-steps > div { display: flex; align-items: center; gap: 10px; padding: 10px 0; font-size: var(--font-size-sm); }
.hm-steps > div + div { border-top: 1px solid var(--color-border); }
.hm-steps i { flex: 0 0 22px; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-style: normal; font-size: var(--font-size-xxs); font-weight: var(--font-weight-bold); color: #fff; background: var(--color-border-strong); }
.hm-steps .is-done i { background: var(--color-primary); }
.hm-steps .is-now i { background: var(--color-urgent); }

/* ---- Simplified hospital v2: clearer module page, per-module rights ---- */
.bottom-nav.hm-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hm-mhead { padding: 6px 14px 30px; border-radius: 0 0 22px 22px; }
.hm-mhead .hm-search { height: 40px; margin-top: 10px; }
.hm-mhead__bar .icon-btn { flex: 0 0 38px; width: 38px; height: 38px; }
.hm-counters--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hm-counter.is-alert strong { color: var(--color-urgent); }
.hm-counter:disabled { cursor: default; opacity: 1; }
.hm-counter:disabled strong { font-size: var(--font-size-body); line-height: 1.3; }
div.hm-counter { cursor: default; }
.hm-flow { display: flex; align-items: flex-start; gap: 6px; margin: 0 2px; font-size: var(--font-size-xs); line-height: 1.4; color: var(--color-text-muted); }
.hm-flow .icon { flex: 0 0 auto; margin-top: 1px; color: var(--color-primary-dark); }
.hm-filterbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 14px; font-size: var(--font-size-sm); font-weight: var(--font-weight-bold); color: var(--color-primary-dark); background: var(--color-primary-soft); }
.hm-filterbar button { display: inline-flex; align-items: center; gap: 4px; border: 0; font: inherit; font-size: var(--font-size-xs); font-weight: 700; color: var(--color-primary-dark); background: transparent; cursor: pointer; }
.hm-donebox { border: 1px solid var(--color-border); border-radius: 16px; background: #fff; }
.hm-donebox summary { display: flex; align-items: center; gap: 6px; padding: 11px 14px; font-size: var(--font-size-sm); font-weight: 700; color: var(--color-primary-dark); cursor: pointer; }
.hm-donebox .hm-list { padding: 0 8px 8px; }
.hm-row .hm-avatar { margin-left: -2px; }
.hm-intro { padding: 10px 12px; border-radius: 12px; font-size: var(--font-size-sm); line-height: 1.45; color: var(--color-text); background: var(--color-primary-tint); }

/* Item sheet */
.hm-enc { font-weight: var(--font-weight-bold); color: var(--color-primary-dark); }
.hm-stage { font-size: var(--font-size-xxs); font-weight: var(--font-weight-bold); letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-primary-dark); }
.hm-next { margin: -2px 0 2px; font-size: var(--font-size-xs); text-align: center; color: var(--color-text-muted); }
.hm-rule { display: flex; gap: 6px; align-items: flex-start; padding: 9px 11px; border-radius: 12px; font-size: var(--font-size-xs); line-height: 1.4; color: var(--color-text-muted); background: var(--color-bg); }
.hm-rule .icon { flex: 0 0 auto; margin-top: 1px; color: var(--color-primary-dark); }
.hm-ask { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--color-border); border-radius: 14px; }
.hm-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hm-choice button { padding: 14px 10px; border: 1px solid var(--color-border); border-radius: 14px; font: inherit; font-size: var(--font-size-body); font-weight: 700; color: var(--color-text); background: #fff; cursor: pointer; }
.hm-choice button:hover { border-color: var(--color-primary); color: var(--color-primary-dark); }
.hm-backlink { align-self: center; font-size: var(--font-size-sm); }

/* Home quick actions: red count for alerts; employee search under the quick row */
.hm-quick b.is-red { background: var(--color-emergency); }
.hm-search--gap { margin-top: 12px; }

/* Employees module rows */
.hm-erow { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 16px; background: #fff; box-shadow: var(--shadow-sm); }
.hm-erow__who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; color: var(--color-text); }
.hm-erow__who b { display: block; font-size: var(--font-size-body); }
.hm-erow__who small { display: block; font-size: var(--font-size-xs); color: var(--color-text-muted); }
.hm-erow__who .badge { margin-top: 3px; }
.hm-erow__go { display: inline-flex; align-items: center; gap: 2px; font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); color: var(--color-primary-dark); }
.hm-inline { display: flex; gap: 6px; margin-top: 6px; }
.hm-inline .select { flex: 1; min-width: 0; height: 36px; padding-top: 0; padding-bottom: 0; font-size: var(--font-size-sm); }
.hm-mchips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.hm-mchip { padding: 2px 7px; border-radius: var(--radius-pill); font-size: var(--font-size-caps); font-weight: 700; color: var(--color-primary-dark); background: var(--color-primary-soft); }
.hm-mchip.is-off { color: var(--color-text-subtle); background: var(--color-muted-soft); text-decoration: line-through; }
.hm-privline { display: block; margin-top: 4px; font-size: var(--font-size-xs); font-weight: 700; color: var(--color-text-muted); }
.hm-privline.is-ap { color: var(--color-status-intl); }
.hm-statusw { display: inline-flex; align-items: center; gap: 8px; font-size: var(--font-size-xs); font-weight: 700; color: var(--color-text-muted); }
.hm-joiner { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--color-urgent); border-radius: 16px; background: var(--color-urgent-soft); }
.hm-joiner b { display: block; font-size: var(--font-size-body); }
.hm-joiner small { font-size: var(--font-size-xs); color: var(--color-text-muted); }

/* Employee editor: section nav, rule box, module row with rights */
.hm-secnav { position: sticky; top: 0; z-index: 4; display: flex; gap: 6px; padding: 8px 12px; overflow-x: auto; background: var(--color-surface); border-bottom: 1px solid var(--color-border); scrollbar-width: none; }
.hm-secnav a { flex: 0 0 auto; padding: 6px 12px; border-radius: var(--radius-pill); font-size: var(--font-size-xs); font-weight: 700; color: var(--color-primary-dark); background: var(--color-primary-soft); }
.hm-emp section { scroll-margin-top: 56px; }
.hm-rulebox { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 10px; border-radius: 12px; font-size: var(--font-size-xxs); line-height: 1.3; background: var(--color-bg); }
.hm-rulebox span { padding: 5px 7px; border-radius: 8px; color: var(--color-text); background: #fff; }
.hm-rulebox span.is-yes { font-weight: var(--font-weight-bold); color: #fff; background: var(--color-primary); }
.hm-rulebox i { font-style: normal; font-weight: var(--font-weight-bold); color: var(--color-text-muted); }
.hm-mrow { border-top: 1px solid var(--color-border); }
.hm-group + .hm-mrow { border-top: 0; }
.hm-mrow .hm-switch { padding: 9px 0; }
.hm-mrow small.is-warn { color: var(--color-urgent); font-weight: 700; }
.hm-rights { display: flex; gap: 6px; padding: 0 0 10px 42px; }
.hm-right { padding: 5px 10px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-pill); font: inherit; font-size: var(--font-size-xs); font-weight: 700; color: var(--color-text-muted); background: #fff; cursor: pointer; }
.hm-right.is-on { border-color: var(--color-primary); color: #fff; background: var(--color-primary); }
.hm-right.is-fixed { cursor: default; opacity: 0.75; }
[data-summary] { padding: 8px 10px; border-radius: 10px; background: var(--color-primary-tint); color: var(--color-text); }
.hm-myacc { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: var(--font-size-sm); border-top: 1px solid var(--color-border); }
.hm-myacc span { color: var(--color-text-muted); text-align: right; }
.hm-accg { padding: 9px 0; border-top: 1px solid var(--color-border); }
.hm-acc-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.hm-acc-chip { padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: var(--color-primary, #0f766e); background: var(--color-primary-soft, #e6f4f1); }
.hm-acc-mods { margin: 6px 0 0; font-size: var(--font-size-sm); color: var(--color-text-muted); }
.hm-acc-mods summary { cursor: pointer; font-weight: 600; color: var(--color-text); }
.hm-acc-mods p { margin: 6px 0 0; line-height: 1.5; }
.hm-chiprow { display: flex; flex-wrap: wrap; gap: 6px; }
.appbar + .hm-secnav { top: var(--appbar-height); }
.hm-emp section { scroll-margin-top: calc(var(--appbar-height) + 52px); }
.hm-backlink { border: 0; background: none; padding: 4px; cursor: pointer; }
.hm-sheet .hm-kv { padding: 10px 12px; border-radius: 12px; background: var(--color-bg); }
.hm-ptop { gap: 12px; }
.hm-ptop__row { display: flex; align-items: center; gap: 12px; }
.hm-ptop h2 { font-size: var(--font-size-lg); font-weight: var(--font-weight-bold); }
.hm-uhid { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 8px; font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); color: var(--color-primary-dark); background: var(--color-primary-soft); }
.hm-ptop .hm-kv { padding: 10px 12px; border-radius: 12px; background: var(--color-bg); }
.hm-pacts { display: flex; flex-wrap: wrap; gap: 8px; }
.hm-pacts .btn { flex: 1 1 0; min-width: 0; white-space: nowrap; justify-content: center; gap: 6px; }
/* the main action (New OPD visit) gets its own full-width row; the rest share the row below */
.hm-pacts .btn--primary { flex-basis: 100%; }
.hm-timeline { gap: 0; padding: 4px 14px; }
.hm-timeline > div { padding: 10px 0 10px 14px; border-left: 2px solid var(--color-primary-soft); position: relative; font-size: var(--font-size-sm); }
.hm-timeline > div::before { content: ""; position: absolute; left: -6px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--color-primary); }
.hm-timeline__at { font-size: var(--font-size-xxs); font-weight: var(--font-weight-bold); color: var(--color-text-subtle); }

/* ---- Module screen v3: premium worklist (header · KPI card · chips · rows) ---- */
.hm-mhead { position: relative; padding: 8px 16px 44px; color: #fff; border-radius: 0 0 28px 28px;
  background: radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 55%), linear-gradient(160deg, #19B3A2 0%, #0F8B7E 55%, #0A5F56 100%);
  box-shadow: 0 14px 30px -18px rgba(10, 78, 71, 0.75); }
.hm-mhead__bar { display: flex; align-items: center; gap: 8px; }
.hm-hbtn { flex: 0 0 38px; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 12px; color: #fff; background: rgba(255, 255, 255, 0.12); cursor: pointer; backdrop-filter: blur(4px); }
.hm-hbtn .icon { width: 19px; height: 19px; }
.hm-mhead__title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.hm-mhead__ico { flex: 0 0 34px; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; color: var(--color-primary-dark); background: #fff; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12); }
.hm-mhead__ico .icon { width: 18px; height: 18px; }
.hm-mhead__title > div { min-width: 0; }
.hm-mhead h1 { font-size: var(--font-size-lg); font-weight: var(--font-weight-bold); letter-spacing: -0.01em; line-height: 1.2; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-mhead p { margin-top: 1px; font-size: var(--font-size-xxs); font-weight: 600; color: rgba(255, 255, 255, 0.72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-searchrow { display: flex; gap: 8px; margin-top: 14px; }
.hm-searchrow .hm-search { flex: 1; margin-top: 0; height: 44px; border: 0; border-radius: 14px; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.35); }
.hm-new { flex: 0 0 auto; height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border: 0; border-radius: 14px; font: inherit; font-size: var(--font-size-sm); font-weight: var(--font-weight-bold); color: var(--color-primary-dark); background: #E9FBF7; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.35); cursor: pointer; }
.hm-new .icon { width: 16px; height: 16px; stroke-width: 2.6; }

/* KPI card overlapping the header */
.hm-kpis { position: relative; z-index: 6; display: flex; margin: -28px 16px 0; padding: 6px; border: 1px solid var(--color-border); border-radius: 18px; background: #fff; box-shadow: 0 12px 28px -14px rgba(32, 42, 55, 0.28); }
.hm-kpi { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 9px 10px 8px; border: 0; border-radius: 13px; font: inherit; text-align: left; background: transparent; cursor: pointer; }
.hm-kpi + .hm-kpi::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 1px; background: var(--color-border); }
.hm-kpi strong { font-size: var(--font-size-xl); font-weight: var(--font-weight-bold); line-height: 1.1; letter-spacing: -0.02em; color: var(--color-text); }
.hm-kpi span:last-child { font-size: var(--font-size-xxs); font-weight: 700; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.hm-kpi__dot { position: absolute; top: 12px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--color-primary); }
.hm-kpi--urgent .hm-kpi__dot { background: var(--color-urgent); }
.hm-kpi--urgent strong { color: var(--color-urgent); }
.hm-kpi--done .hm-kpi__dot { background: #2C8A4C; }
.hm-kpi--money .hm-kpi__dot { background: var(--color-secondary); }
.hm-kpi--money strong { font-size: var(--font-size-md); line-height: 1.5; }
.hm-kpi:disabled { cursor: default; }
.hm-kpi.is-active { background: var(--color-primary-soft); }
.hm-kpi.is-active::before, .hm-kpi.is-active + .hm-kpi::before { display: none; }

/* Body + tab chips */
.hm-mbody { display: flex; flex-direction: column; gap: 14px; padding: 16px 16px 24px; }
.hm-chips { display: flex; gap: 8px; margin: 0 -16px; padding: 2px 16px 4px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
.hm-chips::-webkit-scrollbar { display: none; }
.hm-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border: 1px solid var(--color-border); border-radius: var(--radius-pill); font: inherit; font-size: var(--font-size-sm); font-weight: 700; color: var(--color-text-muted); background: #fff; cursor: pointer; transition: background 0.15s, color 0.15s; }
.hm-chip b { min-width: 20px; height: 20px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; font-size: var(--font-size-xxs); color: var(--color-primary-dark); background: var(--color-primary-soft); }
.hm-chip.is-active { border-color: transparent; color: #fff; background: linear-gradient(135deg, #17A999, #0F7F73); box-shadow: 0 8px 18px -10px rgba(15, 127, 115, 0.9); }
.hm-chip.is-active b { color: var(--color-primary-dark); background: #fff; }
.hm-listhead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 2px 2px -4px; }
.hm-listhead h2 { font-size: var(--font-size-md); font-weight: var(--font-weight-bold); letter-spacing: -0.01em; }
.hm-listhead span { font-size: var(--font-size-xs); font-weight: 600; color: var(--color-text-subtle); }

/* Worklist row */
.hm-list { gap: 10px; }
.hm-row { align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid #EDF2F7; border-radius: 18px; background: #fff; box-shadow: 0 1px 2px rgba(32, 42, 55, 0.04), 0 8px 20px -14px rgba(32, 42, 55, 0.18); transition: transform 0.12s, box-shadow 0.12s; }
.hm-row::before { display: none; }
.hm-row:active { transform: scale(0.99); }
.hm-row--crit { border-color: #F6D3D4; background: linear-gradient(180deg, #FFF8F8, #fff 60%); }
.hm-row--done { background: #FBFCFD; box-shadow: none; }
.hm-row--done .hm-row__top strong { color: var(--color-text-muted); }
.hm-row.is-new { box-shadow: 0 0 0 2px rgba(23, 169, 153, 0.22), 0 8px 20px -14px rgba(32, 42, 55, 0.18); }
.hm-lead { flex: 0 0 44px; width: 44px; height: 44px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 14px; font-size: var(--font-size-body); font-weight: var(--font-weight-bold); color: var(--color-primary-dark); background: var(--color-primary-soft); }
.hm-lead--urg { color: #B4651A; background: #FDF0E2; }
.hm-lead--crit { color: var(--color-emergency); background: #FDE8E8; }
.hm-lead--done { color: #2C8A4C; background: #E7F5EC; }
.hm-lead--token { font-size: var(--font-size-lg); line-height: 1; letter-spacing: -0.02em; }
.hm-lead--token small { margin-bottom: 2px; font-size: var(--font-size-caps); font-weight: var(--font-weight-bold); letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.75; }
.hm-lead.tn-sky, .hm-lead.tn-cyan, .hm-lead.tn-indigo, .hm-lead.tn-rose, .hm-lead.tn-coral, .hm-lead.tn-green, .hm-lead.tn-slate, .hm-lead.st-done, .hm-lead.st-info, .hm-lead.st-intl, .hm-lead.st-critical, .hm-lead.st-action, .hm-lead.st-neutral { color: var(--st-c); background: var(--st-bg); }
.hm-row__body { gap: 3px; padding-top: 1px; }
.hm-row__top strong { font-size: var(--font-size-body); letter-spacing: -0.005em; }
.hm-row__when { padding: 2px 8px; border-radius: var(--radius-pill); font-size: var(--font-size-caps); font-weight: 700; color: var(--color-text-muted); background: var(--color-bg); }
.hm-row--crit .hm-row__when { color: var(--color-emergency); background: #FDE8E8; }
.hm-row--urg .hm-row__when { color: #B4651A; background: #FDF0E2; }
.hm-row__meta { font-size: var(--font-size-xs); font-weight: 600; color: var(--color-text-subtle); }
.hm-row__text { font-size: var(--font-size-sm); line-height: 1.45; color: #4A5565; }
.hm-row__mod { font-size: var(--font-size-caps); letter-spacing: 0.06em; }
.hm-row__foot { gap: 6px; margin-top: 6px; }
.hm-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: var(--radius-pill); font-size: var(--font-size-caps); font-weight: var(--font-weight-bold); letter-spacing: 0.02em; }
.hm-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.hm-pill--crit { color: var(--color-emergency); background: #FDE8E8; }
.hm-pill--urg { color: #B4651A; background: #FDF0E2; }
.hm-pill--done { color: #2C8A4C; background: #E7F5EC; }
.hm-row__st { display: inline-flex; align-items: center; gap: 4px; font-size: var(--font-size-xxs); font-weight: 700; color: var(--color-secondary); }
.hm-row__st .icon { width: 13px; height: 13px; }
.hm-row__amt { font-size: var(--font-size-body); }

/* Done box, filter bar */
.hm-donebox { border: 1px dashed var(--color-border-strong); background: transparent; border-radius: 16px; }
.hm-donebox summary { list-style: none; gap: 8px; padding: 12px 14px; color: var(--color-text-muted); }
.hm-donebox summary::-webkit-details-marker { display: none; }
.hm-donebox summary b { margin-left: auto; min-width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; font-size: var(--font-size-xxs); color: #2C8A4C; background: #E7F5EC; }
.hm-donebox__ico { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: #2C8A4C; background: #E7F5EC; }
.hm-donebox[open] summary { border-bottom: 1px dashed var(--color-border); margin-bottom: 8px; }
.hm-filterbar { padding: 10px 14px; border-radius: 14px; }

/* How it works */
.hm-how { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 4px 0; list-style: none; }
.hm-how li { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 0; font-size: var(--font-size-body); font-weight: 600; }
.hm-how li + li::before { content: ""; position: absolute; left: 13px; top: -9px; height: 18px; width: 2px; background: var(--color-primary-soft); }
.hm-how i { flex: 0 0 28px; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-style: normal; font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); color: #fff; background: var(--color-primary); }
.hm-empty { border-radius: 18px; }
.hm-kpi__lbl { display: inline-flex; align-items: center; gap: 5px; font-size: var(--font-size-xxs); font-weight: 700; color: var(--color-text-muted); white-space: nowrap; }
.hm-kpi .hm-kpi__dot { position: static; flex: 0 0 6px; width: 6px; height: 6px; }
.hm-kpi--money strong { font-size: var(--font-size-body); line-height: 1.6; }

/* ---- Item panel v2: clear sections, breathing room ---- */
.hm-sheet { gap: 0; padding: 8px 18px 22px; background: #F6F9FC; }
.hm-sheet [data-sheet-body] { display: flex; flex-direction: column; gap: 12px; }
.hm-sh-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px; }
.hm-sh-crumb { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: var(--radius-pill); font-size: var(--font-size-xs); font-weight: 700; color: var(--color-primary-dark); background: var(--color-primary-soft); }
.hm-sh-crumb i { font-style: normal; opacity: 0.55; }
.hm-sh-crumb .icon { width: 14px; height: 14px; }
.hm-sh-x { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--color-border); border-radius: 50%; color: var(--color-text-muted); background: #fff; cursor: pointer; }
.hm-sh-x .icon { width: 16px; height: 16px; }
.hm-sh-who { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid #EDF2F7; border-radius: 18px; background: #fff; box-shadow: 0 8px 20px -16px rgba(32, 42, 55, 0.3); }
.hm-sh-who .hm-lead { flex-basis: 52px; width: 52px; height: 52px; border-radius: 16px; font-size: var(--font-size-md); }
.hm-sh-who .hm-lead--token { font-size: var(--font-size-xl); }
.hm-sh-who h2 { font-size: var(--font-size-lg); font-weight: var(--font-weight-bold); letter-spacing: -0.01em; line-height: 1.2; }
.hm-sh-who .hm-sub { margin-top: 2px; }
.hm-sh-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hm-tag { padding: 3px 9px; border-radius: var(--radius-pill); font-size: var(--font-size-xxs); font-weight: 700; color: var(--color-text-muted); background: var(--color-bg); border: 1px solid var(--color-border); }
.hm-tag--id { color: var(--color-primary-dark); background: var(--color-primary-soft); border-color: transparent; }
.hm-sh-alert { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; font-size: var(--font-size-sm); font-weight: 700; color: #8A4B08; background: #FDF3DC; }
.hm-sh-alert .icon { color: #B27400; }
.hm-sh-card { padding: 12px 14px; border: 1px solid #EDF2F7; border-radius: 18px; background: #fff; }
.hm-sh-label { margin-bottom: 6px; font-size: var(--font-size-caps); font-weight: var(--font-weight-bold); letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-subtle); }
.hm-sh-kv { display: grid; grid-template-columns: 82px 1fr; margin: 0; }
.hm-sh-kv dt, .hm-sh-kv dd { margin: 0; padding: 9px 0; font-size: var(--font-size-sm); border-top: 1px solid #F0F3F7; }
.hm-sh-kv dt:first-of-type, .hm-sh-kv dt:first-of-type + dd { border-top: 0; }
.hm-sh-kv dt { font-weight: 600; color: var(--color-text-muted); }
.hm-sh-kv dd { font-weight: 600; color: var(--color-text); line-height: 1.4; }
.hm-sh-kv .hm-big { font-size: var(--font-size-md); }
.hm-steps-mini { display: inline-flex; gap: 3px; margin-right: 8px; vertical-align: middle; }
.hm-steps-mini i { width: 14px; height: 5px; border-radius: 3px; background: var(--color-border); }
.hm-steps-mini i.is-done { background: var(--color-primary-soft); }
.hm-steps-mini i.is-now { background: var(--color-primary); }
.hm-sh-form { display: flex; flex-direction: column; gap: 10px; }
.hm-sh-form .hm-sh-label { margin-bottom: 0; }
.hm-sh-act { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 18px; background: #fff; border: 1px solid #EDF2F7; }
.hm-flowto { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: var(--font-size-xs); font-weight: 700; color: var(--color-text-muted); }
.hm-flowto span { padding: 4px 10px; border-radius: var(--radius-pill); background: var(--color-bg); }
.hm-flowto span.is-next { color: var(--color-primary-dark); background: var(--color-primary-soft); }
.hm-flowto .icon { width: 14px; height: 14px; color: var(--color-text-subtle); }
.hm-sh-main { min-height: 52px; font-size: var(--font-size-md); }
.hm-sh-state { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 16px; font-size: var(--font-size-sm); line-height: 1.45; color: var(--color-text); background: #fff; border: 1px solid var(--color-border); }
.hm-sh-state b { display: block; font-size: var(--font-size-body); margin-bottom: 2px; }
.hm-sh-state .icon { flex: 0 0 auto; color: var(--color-text-muted); }
.hm-sh-state--done { background: #E7F5EC; border-color: transparent; }
.hm-sh-state--done .icon { color: #2C8A4C; }
.hm-sh-state--wait { background: #FDF3DC; border-color: transparent; }
.hm-sh-state--wait .icon { color: #B27400; }
.hm-sh-note { display: flex; gap: 8px; align-items: flex-start; padding: 0 4px; font-size: var(--font-size-xs); line-height: 1.45; color: var(--color-text-muted); }
.hm-sh-note .icon { flex: 0 0 auto; margin-top: 1px; color: var(--color-primary); }
.hm-sh-record { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border: 1px solid var(--color-border); border-radius: 16px; font-size: var(--font-size-sm); font-weight: 700; color: var(--color-text); background: #fff; }
.hm-sh-record span { flex: 1; }
.hm-sh-record .icon:first-child { color: var(--color-primary-dark); }
.hm-sh-record .icon:last-child { color: var(--color-text-subtle); }
.hm-sheet .hm-ask { background: #fff; }
.hm-mhead { padding-top: 18px; }
.hm-searchrow { margin-top: 16px; }

/* ---- Owners, journey, result screen ---- */
.hm-chip { height: auto; min-height: 40px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; padding: 6px 14px; border-radius: 14px; }
.hm-chip__t { display: inline-flex; align-items: center; gap: 7px; }
.hm-chip small { font-size: var(--font-size-caps); font-weight: 600; color: var(--color-text-subtle); white-space: nowrap; }
.hm-chip.is-active small { color: rgba(255, 255, 255, 0.8); }
.hm-listhead h2 small { display: block; margin-top: 1px; font-size: var(--font-size-xxs); font-weight: 600; letter-spacing: 0; color: var(--color-primary-dark); }
.hm-listhead { align-items: flex-end; }
.hm-journey { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.hm-journey li { position: relative; display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.hm-journey li + li::before { content: ""; position: absolute; left: 13px; top: -8px; height: 16px; width: 2px; background: var(--color-border); }
.hm-journey li.is-done + li::before, .hm-journey li.is-done::before { background: var(--color-primary-soft); }
.hm-journey i { flex: 0 0 28px; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-style: normal; font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); color: var(--color-text-subtle); background: #fff; border: 2px solid var(--color-border); }
.hm-journey li.is-done i { color: var(--color-primary-dark); background: var(--color-primary-soft); border-color: transparent; }
.hm-journey li.is-now i { color: #fff; background: var(--color-primary); border-color: transparent; box-shadow: 0 0 0 4px rgba(23, 169, 153, 0.18); }
.hm-journey span { flex: 1; min-width: 0; }
.hm-journey b { display: block; font-size: var(--font-size-sm); font-weight: 700; }
.hm-journey small { display: block; font-size: var(--font-size-xxs); color: var(--color-text-muted); }
.hm-journey li:not(.is-done):not(.is-now) b { color: var(--color-text-muted); }
.hm-journey em { padding: 3px 8px; border-radius: var(--radius-pill); font-style: normal; font-size: var(--font-size-caps); font-weight: var(--font-weight-bold); color: var(--color-primary-dark); background: var(--color-primary-soft); }
.hm-res { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0 4px; text-align: center; }
.hm-res__ico { width: 64px; height: 64px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 8px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #1FC2AE, #0F7F73); box-shadow: 0 0 0 8px rgba(23, 169, 153, 0.14); }
.hm-res__ico .icon { width: 30px; height: 30px; stroke-width: 2.6; }
.hm-res h2 { font-size: var(--font-size-xl); font-weight: var(--font-weight-bold); }
.hm-next-list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.hm-next-list li { display: flex; align-items: center; gap: 12px; }
.hm-next-list i { flex: 0 0 32px; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: var(--color-primary-dark); background: var(--color-primary-soft); }
.hm-next-list b { display: block; font-size: var(--font-size-body); }
.hm-next-list small { display: block; font-size: var(--font-size-xs); color: var(--color-text-muted); }

/* ---- Lab result entry and view ---- */
.hm-res-in { display: flex; flex-direction: column; }
.hm-res-row { display: grid; grid-template-columns: 1fr 92px 54px; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid #F0F3F7; }
.hm-res-row:first-child { border-top: 0; }
.hm-res-row b { display: block; font-size: var(--font-size-sm); }
.hm-res-row small { display: block; font-size: var(--font-size-xxs); color: var(--color-text-muted); }
.hm-res-row .input, .hm-res-row .select { height: 38px; padding: 0 10px; font-size: var(--font-size-body); font-weight: 700; text-align: center; }
.hm-res-row em { font-style: normal; font-size: var(--font-size-caps); color: var(--color-text-subtle); }
.hm-res-row i { grid-column: 2 / 4; justify-self: start; font-style: normal; }
.hm-res-row i:empty { display: none; }
.hm-flag { display: inline-block; padding: 1px 7px; border-radius: var(--radius-pill); font-size: var(--font-size-caps); font-weight: var(--font-weight-bold); letter-spacing: 0.03em; }
.hm-flag--H { color: #B4651A; background: #FDF0E2; }
.hm-flag--L { color: #1C7FB6; background: #E1F2FC; }
.hm-flag--C { color: #fff; background: var(--color-emergency); }
.hm-res-tbl { width: 100%; border-collapse: collapse; font-size: var(--font-size-sm); }
.hm-res-tbl th { padding: 6px 4px; font-size: var(--font-size-caps); font-weight: var(--font-weight-bold); letter-spacing: 0.05em; text-align: left; text-transform: uppercase; color: var(--color-text-subtle); border-bottom: 1px solid var(--color-border); }
.hm-res-tbl td { padding: 9px 4px; border-bottom: 1px solid #F0F3F7; vertical-align: middle; }
.hm-res-tbl tr:last-child td { border-bottom: 0; }
.hm-res-tbl td:last-child { font-size: var(--font-size-xs); color: var(--color-text-muted); }
.hm-res-tbl tr.is-C td:first-child, .hm-res-tbl tr.is-C b { color: var(--color-emergency); }
.hm-sh-alert--crit { margin-top: 10px; color: #8E1F24; background: #FDE8E8; }
.hm-sh-alert--crit .icon { color: var(--color-emergency); }
.hm-search input, .hm-search input:focus, .hm-search input:focus-visible { border: 0; outline: none; box-shadow: none; background: transparent; -webkit-appearance: none; appearance: none; }
.hm-search:focus-within { box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.35); }

/* ---- Client video: dashboards (patient-app style), status words, editor steps ---- */
.hm-dhead { padding-bottom: 54px; }
.hm-dhead .dash-hero h1 { font-size: var(--font-size-2xl); }
.hm-dbody { gap: 0; }
.hm-sec-title { margin: 22px 2px 10px; font-size: var(--font-size-md); font-weight: var(--font-weight-bold); letter-spacing: -0.01em; color: var(--color-text); }
.hm-sec-title--first { position: relative; z-index: 3; margin-top: -38px; color: #fff; font-size: var(--font-size-sm); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.9; }
.hm-sec-row { display: flex; align-items: baseline; justify-content: space-between; }
.hm-sec-row a { font-size: var(--font-size-sm); font-weight: 700; color: var(--color-primary-dark); }
.hm-stats4 { position: relative; z-index: 3; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hm-stat4 { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px; border: 1px solid #EDF2F7; border-radius: 18px; color: var(--color-text); background: #fff; box-shadow: 0 10px 24px -16px rgba(32, 42, 55, 0.35); }
.hm-stat4 strong { margin-top: 8px; font-size: var(--font-size-2xl); font-weight: var(--font-weight-bold); letter-spacing: -0.02em; line-height: 1.1; }
.hm-stat4 > span:last-child { font-size: var(--font-size-xs); font-weight: 600; color: var(--color-text-muted); }
.hm-stat4__ico { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; color: var(--st-c); background: var(--st-bg); }
.hm-stat4.is-alert { border-color: #F6D3D4; background: linear-gradient(180deg, #FFF6F6, #fff 70%); }
.hm-stat4.is-alert strong { color: var(--color-emergency); }
.hm-stat4.is-alert::after { content: ""; position: absolute; top: 16px; right: 16px; width: 8px; height: 8px; border-radius: 50%; background: var(--color-emergency); box-shadow: 0 0 0 4px rgba(193, 39, 45, 0.15); }
.hm-emstrip { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 16px; color: #fff; background: linear-gradient(135deg, #D9363C, #A8202A); box-shadow: 0 10px 22px -12px rgba(193, 39, 45, 0.8); }
.hm-emstrip__ico { flex: 0 0 34px; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; background: rgba(255, 255, 255, 0.18); }
.hm-emstrip b { display: block; font-size: var(--font-size-sm); }
.hm-emstrip span span { display: block; font-size: var(--font-size-xs); opacity: 0.9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-mbody > .hm-emstrip { margin-top: 0; }
.hm-setup { margin-top: 16px; padding: 16px; border-radius: 20px; background: linear-gradient(160deg, #E9FBF7, #fff 70%); border: 1px solid #CDEFE8; }
.hm-setup__head { display: flex; align-items: flex-start; justify-content: space-between; }
.hm-setup__head h2 { font-size: var(--font-size-md); font-weight: var(--font-weight-bold); }
.hm-setup__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.hm-setup__item { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 14px; color: var(--color-text); background: #fff; border: 1px solid #EDF2F7; }
.hm-setup__item .hm-stat4__ico { width: 30px; height: 30px; margin-bottom: 6px; }
.hm-setup__item b { font-size: var(--font-size-sm); }
.hm-setup__item small { font-size: var(--font-size-xxs); color: var(--color-text-muted); }
.hm-modsec { margin-top: 18px; padding: 16px 12px 8px; border: 1px solid #EDF2F7; border-radius: 22px; background: #fff; box-shadow: var(--shadow-sm); }
.hm-modsec__head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 4px; }
.hm-modsec__head h2 { font-size: var(--font-size-md); font-weight: var(--font-weight-bold); }
.hm-modsec__head a { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: var(--radius-pill); font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); color: var(--color-primary-dark); background: var(--color-primary-soft); }
.hm-modsec .hm-sub { padding: 0 4px; }
.hm-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 4px; margin-top: 8px; }
.hm-gtile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 2px 12px; border-radius: 16px; font-size: var(--font-size-xs); font-weight: 700; line-height: 1.25; text-align: center; color: var(--color-text); }
.hm-gtile:active { background: var(--color-bg); }
.hm-gtile__ico { position: relative; width: 50px; height: 50px; display: inline-flex; align-items: center; justify-content: center; border-radius: 16px; color: var(--st-c); background: var(--st-bg); }
.hm-gtile__n { position: absolute; top: -5px; right: -7px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; font-size: var(--font-size-caps); font-weight: var(--font-weight-bold); line-height: 19px; color: #fff; background: var(--color-primary-dark); border: 2px solid #fff; }
.hm-gtile.is-off { opacity: 0.5; }
.hm-gtile.is-off .hm-gtile__ico { filter: grayscale(1); }
.hm-foot-note { display: flex; gap: 8px; align-items: flex-start; margin: 14px 4px 6px; font-size: var(--font-size-xs); line-height: 1.45; color: var(--color-text-muted); }
.hm-foot-note .icon { flex: 0 0 auto; color: var(--color-primary); }
.hm-work { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hm-work__tile { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px; border: 1px solid #EDF2F7; border-radius: 18px; color: var(--color-text); background: #fff; box-shadow: 0 1px 2px rgba(32, 42, 55, 0.04), 0 8px 20px -14px rgba(32, 42, 55, 0.2); }
.hm-work__tile .hm-stat4__ico { margin-bottom: 8px; }
.hm-work__tile b { font-size: var(--font-size-body); }
.hm-work__tile small { font-size: var(--font-size-xxs); color: var(--color-text-muted); }
.hm-work__n { position: absolute; top: 14px; right: 14px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; font-size: var(--font-size-xxs); font-weight: var(--font-weight-bold); line-height: 22px; text-align: center; color: var(--st-c); background: var(--st-bg); }
.hm-dbody > .hm-search--gap { margin-top: 14px; }
.hm-dbody .hm-list { gap: 10px; }
/* Status words */
.hm-pill--new { color: #1C7FB6; background: #E1F2FC; }
.hm-pill--prog { color: #6B4FC4; background: #EEEAF8; }
/* Module header bell dot */
.hm-hbtn { position: relative; }
.hm-hbtn__dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: #FF6B6B; box-shadow: 0 0 0 2px #0F8B7E; }
/* Add employee: steps + role + advanced */
.hm-steps3 { display: flex; align-items: center; gap: 6px; padding: 10px 14px; overflow-x: auto; font-size: var(--font-size-xs); font-weight: 700; color: var(--color-text-subtle); background: #fff; border-bottom: 1px solid var(--color-border); white-space: nowrap; scrollbar-width: none; }
.hm-steps3 span { padding: 5px 10px; border-radius: var(--radius-pill); background: var(--color-bg); }
.hm-steps3 span.is-on { color: var(--color-primary-dark); background: var(--color-primary-soft); }
.hm-steps3 i { font-style: normal; }
.hm-role-select { font-weight: 700; }
.hm-acc-head { display: flex; align-items: center; justify-content: space-between; }
.hm-acc-n { padding: 3px 10px; border-radius: var(--radius-pill); font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); color: var(--color-primary-dark); background: var(--color-primary-soft); }
.hm-adv { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1px dashed var(--color-border-strong); border-radius: 14px; font: inherit; text-align: left; color: var(--color-text); background: var(--color-bg); cursor: pointer; }
.hm-adv span { flex: 1; font-size: var(--font-size-sm); font-weight: 700; }
.hm-adv small { display: block; font-size: var(--font-size-xxs); font-weight: 500; color: var(--color-text-muted); }
.hm-adv > .icon:last-child { transition: transform 0.15s; }
.hm-adv.is-open > .icon:last-child { transform: rotate(90deg); }
.hm-emp .hm-group { margin-top: 14px; }

/* ---- Home: hospital header + patient-app search ---- */
.dash-head + .dash-body > .hm-gsearch:first-child { position: relative; z-index: 4; }
.hm-gs-results { position: relative; z-index: 5; margin-top: 8px; padding: 6px; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-md); }
.hm-gs-results a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius-md); color: var(--color-text); }
.hm-gs-results a:hover { background: var(--color-bg); }
.hm-gs-results b { display: block; font-size: var(--font-size-sm); font-weight: var(--font-weight-bold); }
.hm-gs-results small { display: block; font-size: var(--font-size-xs); color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.hm-gs-results .grow { min-width: 0; }
.hm-gs-h { margin: 6px 8px 2px; font-size: var(--font-size-caps); font-weight: var(--font-weight-bold); letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-subtle); }
.hm-gs-av { flex: 0 0 34px; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); color: var(--st-c, var(--color-primary-dark)); background: var(--st-bg, var(--color-primary-soft)); }
.hm-gs-none { padding: 12px; font-size: var(--font-size-sm); text-align: center; color: var(--color-text-muted); }
.dash-body > .hm-emstrip { margin-top: 14px; }
.hm-hero-stats .hero-chip { padding: 8px; }
/* My Work: compact tiles, icon beside the text */
.hm-work { gap: 8px; }
.hm-work__tile { display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--radius-md); }
.hm-work__tile .hm-stat4__ico { grid-row: 1 / 3; width: 36px; height: 36px; margin: 0; }
.hm-work__tile b { font-size: var(--font-size-sm); line-height: 1.25; padding-right: 22px; }
.hm-work__tile small { font-size: var(--font-size-xxs); }
.hm-work__n { top: 50%; right: 10px; transform: translateY(-50%); min-width: 20px; height: 20px; line-height: 20px; font-size: var(--font-size-caps); }
.hm-modcard .need-grid { row-gap: var(--space-4); }
.hm-modcard .dept-group__title { margin-top: 14px; }
.hm-modcard .need-card__head + .dept-group__title { margin-top: 0; }

/* Hidden form parts on the new screens stay hidden (fields use display:flex) */
[data-hms] [hidden] { display: none !important; }
/* Login: who is signing in */
.hm-who { display: flex; align-items: center; gap: 10px; margin-top: -4px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-primary-tint); }
.hm-who b { display: block; font-size: var(--font-size-sm); font-weight: var(--font-weight-bold); }
.hm-who small { display: block; font-size: var(--font-size-xs); color: var(--color-text-muted); }
/* Settings: section tiles like a phone settings screen */
.hm-setgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 4px; padding: 14px 8px 10px; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm); }
.hm-setgrid__item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 2px 6px; border: 0; border-radius: var(--radius-md); font: inherit; font-size: var(--font-size-xxs); font-weight: var(--font-weight-bold); line-height: 1.25; text-align: center; color: var(--color-text); background: transparent; cursor: pointer; }
.hm-setgrid__ico { width: var(--need-icon-size, 46px); height: var(--need-icon-size, 46px); display: inline-flex; align-items: center; justify-content: center; border-radius: 15px; color: var(--color-primary-dark); background: var(--color-primary-soft); }
.hm-setgrid__item.is-active .hm-setgrid__ico { color: #fff; background: var(--color-primary); box-shadow: var(--shadow-primary); }
.hm-setgrid__item.is-active { color: var(--color-primary-dark); }
.hm-mhead + .hm-mbody { padding-top: 0; }
.hm-mhead + .hm-mbody > .hm-setgrid { margin-top: -26px; position: relative; z-index: 6; }
/* Set up your hospital: compact 2 × 2, icon beside the text */
.hm-setup { margin-top: 14px; padding: 12px; border-radius: var(--radius-lg); }
.hm-setup__head { align-items: center; }
.hm-setup__head h2 { font-size: var(--font-size-md); font-weight: var(--font-weight-bold); }
.hm-setup__head .btn--sm { min-height: 32px; padding: 0 14px; }
.hm-setup__grid { gap: 8px; margin-top: 10px; }
.hm-setup__item { display: grid; grid-template-columns: 32px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 9px 10px; border-radius: var(--radius-md); }
.hm-setup__item .hm-stat4__ico { grid-row: 1 / 3; width: 32px; height: 32px; margin: 0; border-radius: 10px; }
.hm-setup__item b { font-size: var(--font-size-sm); line-height: 1.2; }
.hm-setup__item small { font-size: var(--font-size-xxs); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Module menu: sub-modules as a vertical list; each opens its own screen */
.hm-menu-title { display: flex; flex-direction: column; gap: 2px; margin: 4px 2px 0; font-size: var(--font-size-md); font-weight: var(--font-weight-bold); }
.hm-menu-title span { font-size: var(--font-size-xs); font-weight: var(--font-weight-medium); color: var(--color-text-muted); }
.hm-submenu { display: flex; flex-direction: column; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm); overflow: hidden; }
.hm-subrow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--color-text); }
.hm-subrow + .hm-subrow { border-top: 1px solid var(--color-border); }
.hm-subrow:active { background: var(--color-bg); }
.hm-subrow__ico { flex: 0 0 40px; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 13px; color: var(--st-c); background: var(--st-bg); }
.hm-subrow__ico i { font-style: normal; font-size: var(--font-size-md); font-weight: var(--font-weight-bold); }
.hm-subrow .grow { min-width: 0; }
.hm-subrow b { display: block; font-size: var(--font-size-body); font-weight: var(--font-weight-bold); }
.hm-subrow small { display: block; margin-top: 1px; font-size: var(--font-size-xs); color: var(--color-text-muted); }
.hm-subrow__n { flex: 0 0 auto; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); line-height: 24px; text-align: center; color: var(--color-primary-dark); background: var(--color-primary-soft); }
.hm-subrow__urg { flex: 0 0 auto; padding: 2px 8px; border-radius: var(--radius-pill); font-size: var(--font-size-caps); font-weight: var(--font-weight-bold); color: #B4651A; background: #FDF0E2; }
.hm-subrow__chev { flex: 0 0 auto; color: var(--color-text-subtle); }
.hm-mbody--sub { padding-top: 16px; }
.hm-kpi:disabled { cursor: default; }
.hm-mhead--flat { padding-bottom: 18px; }
.hm-mhead--flat + .hm-mbody { padding-top: 16px; }
/* Module + sub-screen headers: lower, with even spacing everywhere */
.hm-mhead { padding: 28px 16px 46px; }
.hm-mhead--flat { padding-bottom: 22px; }
.hm-mhead__bar { gap: 10px; }
.hm-mhead h1 { font-size: var(--font-size-lg); }
.hm-mhead p { margin-top: 2px; }
.hm-searchrow { margin-top: 18px; }
.hm-kpis { margin: -30px 16px 0; }
.hm-mbody { gap: 16px; padding: 18px 16px 24px; }
.hm-mhead--flat + .hm-mbody { padding-top: 20px; }
.hm-mbody > .hm-emstrip { margin: 0; }
.hm-menu-title { margin: 2px 2px -4px; }
.hm-listhead { margin: 0 2px -4px; }
.hm-listhead h2 { font-size: var(--font-size-md); }
.hm-mbody--sub .hm-list { gap: 12px; }
.hm-mbody--sub .hm-row { padding: 14px; }
.hm-mbody--sub .hm-donebox { margin-top: 2px; }
/* Sub-screen info card */
.hm-subinfo { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm); }
.hm-subinfo__step { flex: 0 0 48px; width: 48px; height: 48px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 14px; font-size: var(--font-size-lg); font-weight: var(--font-weight-bold); line-height: 1; color: var(--color-primary-dark); background: var(--color-primary-soft); }
.hm-subinfo__step small { font-size: 9px; font-weight: var(--font-weight-bold); letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.75; }
.hm-subinfo__step--ico { flex-basis: 44px; width: 44px; height: 44px; }
.hm-subinfo .grow { min-width: 0; }
.hm-subinfo b { display: block; font-size: var(--font-size-md); font-weight: var(--font-weight-bold); }
.hm-subinfo b em { margin-left: 4px; padding: 2px 8px; border-radius: var(--radius-pill); font-style: normal; font-size: var(--font-size-caps); color: #B4651A; background: #FDF0E2; vertical-align: 2px; }
.hm-subinfo small { display: block; margin-top: 2px; font-size: var(--font-size-xs); color: var(--color-text-muted); }
/* Home (admin + employee): more breathing room */
.hm-home { padding-bottom: 50px; }
.hm-home .dash-top { padding: 22px 0 22px; }
.hm-home .dash-hero h1 { margin: 8px 0 6px; font-size: var(--font-size-2xl); line-height: 1.2; }
.hm-home .dash-hero__sub { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; line-height: 1.5; }
.hm-home .dash-hero__stats { margin-top: 18px; gap: 8px; }
.hm-home .hero-chip { padding: 10px 9px; }
.hm-home + .dash-body { padding-bottom: 28px; }
.hm-home + .dash-body > .hm-gsearch:first-child { margin-top: -26px; }
.hm-home + .dash-body > .hm-emstrip { margin-top: 20px; }
.hm-home + .dash-body > .hm-setup { margin-top: 20px; padding: 16px; }
.hm-home + .dash-body .hm-setup__grid { gap: 10px; margin-top: 14px; }
.hm-home + .dash-body .hm-setup__item { padding: 11px 12px; }
.hm-home + .dash-body > .need-card { margin-top: 20px; padding: 18px 14px; }
.hm-home + .dash-body > .dash-label { margin-top: 24px; margin-bottom: 12px; }
.hm-home + .dash-body > .hm-work { gap: 10px; }
.hm-home + .dash-body > .hm-list { gap: 12px; }
.hm-home + .dash-body .hm-foot-note { margin-top: 18px; }
/* Save bar sits directly on the bottom nav (screens with both) */
.with-bottom-nav > .action-bar { bottom: calc(-1 * var(--space-4)); padding-bottom: calc(var(--space-3) + var(--space-4)); margin-bottom: calc(-1 * var(--space-4)); box-shadow: 0 -8px 20px -14px rgba(32, 42, 55, 0.25); }
.bottom-nav.hm-nav { background: #fff; }
.with-bottom-nav > .action-bar { padding-bottom: var(--space-3); bottom: calc(-1 * var(--space-4)); }
.with-bottom-nav > .action-bar::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: var(--space-4); background: #fff; }
.hm-subrow--out b { color: var(--color-emergency); }
.hm-subrow--out .hm-subrow__ico { color: var(--color-emergency); background: var(--color-emergency-soft); }
/* REG-01 Welcome: patient-app splash, hospital teal */
.sp-h { display: flex; flex-direction: column; background: #fff; }
.statusbar--clear + .sp-h { margin-top: calc(-1 * var(--statusbar-height, 44px)); }
.sp-h__hero { position: relative; flex: 1 0 300px; max-height: 470px; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: radial-gradient(120% 80% at 85% 10%, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 55%), linear-gradient(165deg, var(--color-primary-bright) 0%, var(--color-primary) 38%, var(--color-primary-dark) 78%, var(--color-primary-deep) 100%);
  -webkit-mask-image: linear-gradient(#000 70%, transparent 100%); mask-image: linear-gradient(#000 70%, transparent 100%); }
.sp-h__mark { position: absolute; right: -70px; bottom: -40px; height: 300px; opacity: 0.12; }
.sp-h__brand { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 10px; }
.sp-h__logo { height: 64px; width: auto; }
.sp-h__for { padding: 5px 16px; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: var(--radius-pill); font-size: var(--font-size-sm); font-weight: var(--font-weight-bold); letter-spacing: 0.14em; text-transform: uppercase; color: #fff; background: rgba(255, 255, 255, 0.12); }
.sp-h__body { position: relative; z-index: 1; margin-top: -30px; padding: 0 24px 22px; }
.sp-h__eyebrow { font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-primary-dark); }
.sp-h__body h1 { margin-top: 10px; font-size: 27px; font-weight: var(--font-weight-bold); line-height: 1.3; letter-spacing: -0.02em; color: var(--color-text); text-wrap: balance; }
.sp-h__sub { margin-top: 12px; font-size: var(--font-size-body); line-height: 1.7; color: var(--color-text-muted); max-width: 340px; }
.sp-h__go { display: flex; flex-direction: column; gap: 12px; margin-top: 26px; }
.sp-h__go .btn { min-height: 52px; font-size: var(--font-size-md); }
.sp-h__more { margin-top: 22px; font-size: var(--font-size-sm); line-height: 1.6; text-align: center; color: var(--color-text-muted); }
.sp-h__more a { font-weight: var(--font-weight-bold); color: var(--color-primary-dark); }
.sp-h__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--color-border); font-size: var(--font-size-xs); color: var(--color-text-subtle); }
.sp-h__foot span { display: inline-flex; align-items: center; gap: 6px; }
.sp-h__foot .icon { width: 14px; height: 14px; color: var(--color-primary-dark); }
.sp-h__foot a { font-weight: var(--font-weight-bold); color: var(--color-text-muted); }
.screen.sp-h { background: #fff; }
.sp-h__hero { -webkit-mask-image: linear-gradient(#000 62%, transparent 100%); mask-image: linear-gradient(#000 62%, transparent 100%); }
.sp-h__body h1 { text-wrap: pretty; }
.sp-h__go .btn--outline { color: var(--color-primary-dark); border-color: var(--color-primary); }
.screen--welcome.sp-h { background: #fff; }

/* ==========================================================================
   D36 structure (3 Nov 2026): 7 category tiles, module shortcuts, approvals,
   onboarding wizard. Same tokens and card language as the patient app.
   ========================================================================== */
.hm-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hm-cat { display: grid; grid-template-columns: 40px 1fr; column-gap: 10px; align-items: center; min-height: 64px; padding: 10px 12px; border: 1px solid #EDF2F7; border-radius: var(--radius-md); color: var(--color-text); background: #fff; box-shadow: 0 1px 2px rgba(32, 42, 55, 0.04), 0 8px 20px -14px rgba(32, 42, 55, 0.2); }
.hm-cat__ico { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; color: var(--st-c); background: var(--st-bg); }
.hm-cat__ico .icon { width: 20px; height: 20px; }
.hm-cat__n { position: absolute; top: -6px; right: -8px; min-width: 18px; height: 18px; padding: 0 5px; border: 2px solid #fff; border-radius: 9px; font-size: var(--font-size-caps); font-weight: var(--font-weight-bold); line-height: 14px; text-align: center; color: var(--color-text-inverse); background: var(--color-emergency); }
.hm-cat__t { min-width: 0; }
.hm-cat__t b { display: block; font-size: var(--font-size-sm); line-height: 1.25; }
.hm-cat__t small { font-size: var(--font-size-xxs); color: var(--color-text-muted); }
.hm-cat:active { background: var(--color-bg); }

.hm-kpis--4 .hm-kpi { padding: 9px 8px 8px; text-decoration: none; }
.hm-kpis--4 .hm-kpi span:last-child { white-space: normal; line-height: 1.2; }
a.hm-kpi { color: inherit; }

.hm-shortcuts { display: flex; gap: 8px; overflow-x: auto; margin: 14px 0 4px; padding-bottom: 2px; scrollbar-width: none; }
.hm-shortcuts::-webkit-scrollbar { display: none; }
.hm-shortcut { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px 8px 8px; border: 1px solid var(--color-border); border-radius: 999px; font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); color: var(--color-text); background: #fff; }
.hm-shortcut__ico { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; color: var(--color-primary-dark); background: var(--color-primary-soft); }
.hm-pendline { display: flex; align-items: center; gap: 8px; margin: 8px 2px 0; font-size: var(--font-size-xs); color: var(--color-text-muted); }
.hm-pendline .icon { flex: 0 0 auto; color: var(--color-urgent); }

.hm-apr h3 { margin: 2px 0; font-size: var(--font-size-md); }
.hm-apr__act { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.hm-list > .hm-card.hm-apr { margin: 0; }

.hm-progress { height: 6px; margin: 4px 0 14px; border-radius: 3px; background: var(--color-border); overflow: hidden; }
.hm-progress i { display: block; height: 100%; border-radius: 3px; background: var(--color-primary); }
.hm-steps12 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 14px 0 6px; }
.hm-steps12 a, .hm-steps12 span { display: flex; align-items: center; justify-content: center; height: 32px; border: 1px solid var(--color-border); border-radius: 10px; font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); color: var(--color-text-muted); background: #fff; }
.hm-steps12 span { opacity: 0.5; }
.hm-steps12 .is-done { color: var(--color-primary-dark); border-color: var(--color-primary-soft); background: var(--color-primary-soft); }
.hm-steps12 .is-now { color: #fff; border-color: var(--color-primary); background: var(--color-primary); }
.hm-onb-go { margin: 14px 0 10px; }
.hm-subrow.is-locked { opacity: 0.55; }
.appbar__title p a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.hm-kpis--4 .hm-kpi strong { font-size: var(--font-size-lg); }
.hm-kpis--4 .hm-kpi span:last-child { overflow: visible; font-size: 10px; letter-spacing: -0.01em; padding-right: 2px; }

/* Day 1 audit (F01 / D1 / D14 / D29 / D30 details) — patient-app tokens only */
.hm-twobtn { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.hm-twobtn > :only-child { grid-column: 1 / -1; }
.hm-check { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0; font-size: var(--font-size-sm); }
.hm-check input { margin-top: 3px; accent-color: var(--color-primary); }
.hm-choice--sub button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; }
.hm-choice--sub small { font-size: var(--font-size-xxs); font-weight: 500; color: var(--color-text-muted); }
.hm-pin { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; padding: 8px 8px 8px 10px; border: 1px solid var(--color-primary-soft); border-radius: var(--radius-md); background: var(--color-primary-soft); }
.hm-pin a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; color: var(--color-text); }
.hm-pin b { display: block; font-size: var(--font-size-sm); }
.hm-pin small { font-size: var(--font-size-xxs); color: var(--color-text-muted); }
.hm-pin .hm-avatar { width: 32px; height: 32px; font-size: var(--font-size-xs); }
.hm-favs { margin-bottom: 10px; }
.hm-favs .hm-shortcuts { margin-top: 4px; }
.hm-modrow { display: flex; align-items: center; }
.hm-modrow + .hm-modrow { border-top: 1px solid var(--color-border); }
.hm-modrow > a { flex: 1; min-width: 0; }
.hm-modlist .hm-modrow > a + a, .hm-modlist .hm-modrow > a { border-top: 0; }
.hm-fav { flex: 0 0 auto; width: 34px; height: 34px; border: 0; border-radius: 50%; font-size: 18px; line-height: 1; color: var(--color-border-strong, #C9D3DD); background: transparent; cursor: pointer; }
.hm-fav.is-on { color: #E8A317; }
.hm-modlist a.is-off, .hm-linked a.is-off { opacity: 0.6; }
.hm-gs-page { margin-top: 12px; }
.hm-desk-title { display: flex; flex-direction: column; margin: 4px 2px 8px; font-size: var(--font-size-md); font-weight: var(--font-weight-bold); }
.hm-desk-title span { font-size: var(--font-size-xs); font-weight: 600; color: var(--color-text-muted); }
.hm-qa { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.hm-qa__b { display: flex; align-items: center; justify-content: center; min-height: 42px; padding: 8px; border: 1px solid var(--color-border); border-radius: var(--radius-md); font: inherit; font-size: var(--font-size-sm); font-weight: var(--font-weight-bold); color: var(--color-primary-dark); background: #fff; cursor: pointer; text-align: center; }
.hm-qa__b.is-main { color: #fff; border-color: var(--color-primary); background: var(--color-primary); }
.hm-resp { margin: 0 0 10px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: #fff; font-size: var(--font-size-sm); }
.hm-resp summary { font-weight: var(--font-weight-bold); cursor: pointer; color: var(--color-text); }
.hm-resp ol { margin: 8px 0 4px; padding-left: 20px; }
.hm-resp li { margin: 3px 0; }
.hm-hand { display: flex; gap: 6px; align-items: flex-start; margin: 6px 0 0; font-size: var(--font-size-xs); color: var(--color-text-muted); }
.hm-hand .icon { flex: 0 0 auto; color: var(--color-primary); }
.hm-dq { padding: 4px 12px; }
.hm-dq__row { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.hm-dq__row + .hm-dq__row { border-top: 1px solid var(--color-border); }
.hm-dq__row b { display: block; font-size: var(--font-size-sm); }
.hm-dq__row small { font-size: var(--font-size-xxs); color: var(--color-text-muted); }
.hm-emp-prof .hm-profile { margin-bottom: 8px; }
.hm-emp-line { display: flex; align-items: center; gap: 6px; font-size: var(--font-size-xxs); color: var(--color-text-muted); margin-top: 2px; }
.hm-rights-open { display: block; margin: -4px 0 8px 46px; padding: 0; border: 0; font: inherit; font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); color: var(--color-primary-dark); background: none; cursor: pointer; }
.hm-deskset { margin-top: 6px; }
.hm-desks { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.hm-desks .hm-check { margin: 6px 0; }
.hm-drawer .hm-switch + .hm-switch { border-top: 1px solid var(--color-border); }
.hm-ctiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.hm-ctile { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid #EDF2F7; border-radius: var(--radius-md); color: var(--color-text); background: #fff; box-shadow: 0 1px 2px rgba(32, 42, 55, 0.04); }
.hm-ctile b { font-size: var(--font-size-sm); line-height: 1.25; }
.hm-ctile strong { font-size: var(--font-size-lg); color: var(--color-primary-dark); }
.hm-ctile small { font-size: var(--font-size-xxs); color: var(--color-text-muted); }
a.hm-ctile:active { background: var(--color-bg); }
.hm-jcard h3 { margin: 2px 0 8px; font-size: var(--font-size-md); }
.hm-jcard .hm-linked { margin-bottom: 8px; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.hm-jrules { margin: 0 0 10px; padding-left: 18px; font-size: var(--font-size-xs); color: var(--color-text-muted); }
.hm-jcard .hm-qa { grid-template-columns: repeat(3, 1fr); margin: 0; }
.hm-matrix { overflow-x: auto; }
.hm-matrix table { width: 100%; border-collapse: collapse; font-size: var(--font-size-xxs); }
.hm-matrix th, .hm-matrix td { padding: 6px 4px; border-bottom: 1px solid var(--color-border); text-align: left; vertical-align: top; }
.hm-matrix thead th { color: var(--color-text-muted); font-weight: 700; }
.hm-docrow { display: flex; align-items: center; gap: 6px; padding: 10px 0; flex-wrap: wrap; }
.hm-docrow + .hm-docrow { border-top: 1px solid var(--color-border); }
.hm-docrow b { display: block; font-size: var(--font-size-sm); }
.hm-docrow small { font-size: var(--font-size-xxs); color: var(--color-text-muted); }
.hm-docrow.is-done .icon { color: var(--color-primary); }
.hm-docrow .chip { padding: 4px 10px; font-size: var(--font-size-xxs); }
.action-bar .btn--outline + .btn--block { flex: 1; }
/* Two-column form rows: input boxes stay level even when one label wraps */
.grid-2 { align-items: end; }
.grid-2 .select, .grid-2 .input { text-overflow: ellipsis; }
/* Create Bill: itemised lines */
.hm-bill__row { display: flex; align-items: center; gap: 8px; padding: 8px 0; font-size: var(--font-size-sm); }
.hm-bill__row + .hm-bill__row, .hm-bill .hm-inline + .hm-bill__row { border-top: 1px solid var(--color-border); }
.hm-bill__row .icon-btn { width: 28px; height: 28px; }
.hm-bill .hm-inline { margin: 6px 0; }
.hm-bill__total b { font-size: var(--font-size-md); color: var(--color-primary-dark); }

/* ==========================================================================
   UI polish (client allows add-on design; flow unchanged) — patient-app tokens
   ========================================================================== */
/* Desk header card with icon quick actions */
.hm-deskcard { margin: 2px 0 10px; padding: 12px; border: 1px solid #EDF2F7; border-radius: var(--radius-lg); background: #fff; box-shadow: 0 1px 2px rgba(32, 42, 55, 0.04), 0 10px 24px -18px rgba(32, 42, 55, 0.25); }
.hm-deskcard__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.hm-deskcard__head b { display: block; font-size: var(--font-size-md); line-height: 1.2; }
.hm-deskcard__head small { font-size: var(--font-size-xxs); font-weight: 600; color: var(--color-text-muted); }
.hm-deskcard__ico { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 11px; color: var(--st-c); background: var(--st-bg); }
.hm-qa--ico { grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0; }
.hm-qa--ico .hm-qa__b { flex-direction: column; gap: 6px; min-height: 0; padding: 8px 2px 6px; border: 0; border-radius: var(--radius-md); font-size: 11px; line-height: 1.2; color: var(--color-text); background: transparent; }
.hm-qa--ico .hm-qa__ico { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 14px; color: var(--color-primary-dark); background: var(--color-primary-soft); transition: transform .15s ease; }
.hm-qa--ico .hm-qa__b.is-main { color: var(--color-text); background: transparent; }
.hm-qa--ico .hm-qa__b.is-main .hm-qa__ico { color: #fff; background: linear-gradient(135deg, var(--color-primary-bright), var(--color-primary-dark)); box-shadow: 0 6px 14px -6px rgba(15, 127, 115, 0.6); }
.hm-qa--ico .hm-qa__b:active .hm-qa__ico { transform: scale(0.94); }
/* Collapsible info panels: icon + rotating chevron instead of the browser triangle */
.hm-resp summary { display: flex; align-items: center; gap: 8px; list-style: none; }
.hm-resp summary::-webkit-details-marker { display: none; }
.hm-resp summary > .icon:first-child { color: var(--color-primary); }
.hm-resp summary:not(:has(.hm-resp__chev))::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-right: 2px solid var(--color-text-muted); border-bottom: 2px solid var(--color-text-muted); transform: rotate(-45deg); transition: transform .2s ease; }
.hm-resp[open] summary:not(:has(.hm-resp__chev))::after { transform: rotate(45deg); }
.hm-resp__chev { color: var(--color-text-muted); transition: transform .2s ease; }
.hm-resp[open] .hm-resp__chev { transform: rotate(90deg); }
/* Create Bill: amount due + payment segmented control */
.hm-due { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 12px; padding: 14px 16px; border-radius: var(--radius-lg); color: #fff; background: linear-gradient(135deg, var(--color-primary), var(--color-primary-deep)); box-shadow: 0 12px 26px -16px rgba(10, 78, 71, 0.8); }
.hm-due span { font-size: var(--font-size-xxs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.hm-due strong { font-size: 28px; line-height: 1.15; letter-spacing: -0.02em; }
.hm-due small { font-size: var(--font-size-xs); opacity: .85; }
.hm-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 4px; border-radius: var(--radius-md); background: var(--color-bg); }
.hm-seg__b { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; border: 0; border-radius: 10px; font: inherit; font-size: var(--font-size-sm); font-weight: var(--font-weight-bold); color: var(--color-text-muted); background: transparent; cursor: pointer; }
.hm-seg__b.is-on { color: var(--color-primary-dark); background: #fff; box-shadow: 0 1px 3px rgba(32, 42, 55, 0.12); }
/* Command dashboard tiles with icons */
.hm-ctile--ico { position: relative; padding-top: 12px; }
.hm-ctile__ico { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin-bottom: 6px; border-radius: 10px; color: var(--st-c); background: var(--st-bg); }
.hm-ctile--ico strong { color: var(--color-text); }
.hm-cmd-scope { display: flex; align-items: center; gap: 6px; margin: -2px 2px 10px; font-size: var(--font-size-xs); color: var(--color-text-muted); }
.hm-cmd-scope .icon { color: var(--color-primary); }
/* Onboarding progress summary */
.hm-onbsum { display: flex; align-items: center; gap: 14px; margin: 14px 0 0; padding: 14px; border: 1px solid #EDF2F7; border-radius: var(--radius-lg); background: #fff; box-shadow: 0 1px 2px rgba(32, 42, 55, 0.04); }
.hm-onbsum b { display: block; font-size: var(--font-size-md); }
.hm-onbsum small { font-size: var(--font-size-xs); color: var(--color-text-muted); }
.hm-ring { --p: 0; flex: 0 0 auto; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: conic-gradient(var(--color-primary) calc(var(--p) * 1%), var(--color-primary-soft) 0); }
.hm-ring span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); color: var(--color-primary-dark); background: #fff; }
/* Employee editor: step bar not clipped, "More roles" */
.hm-steps3 { position: relative; z-index: 2; flex-shrink: 0; padding-top: 10px; padding-bottom: 10px; }
.hm-morer { margin-top: 8px; }
.hm-morer summary { font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); color: var(--color-primary-dark); cursor: pointer; }
.hm-morer .hm-chiprow { margin-top: 8px; }
.chip .icon--sm { width: 14px; height: 14px; margin-right: 2px; vertical-align: -2px; }
.hm-due > small { color: rgba(255, 255, 255, 0.88); }
.hm-due > span { color: rgba(255, 255, 255, 0.9); }

/* ==========================================================================
   Task popup (all modules) — compact premium layout, no visible scrollbar
   ========================================================================== */
.hm-sheet { scrollbar-width: none; -ms-overflow-style: none; }
.hm-sheet [data-sheet-body] { gap: 10px; }
.hm-sheet::-webkit-scrollbar { display: none; width: 0; height: 0; }
/* header: soft teal card */
.hm-sh-who--v2 { gap: 12px; padding: 12px; border: 0; border-radius: 16px; background: linear-gradient(135deg, var(--color-primary-soft), #F4FBFF); box-shadow: none; }
.hm-sh-who--v2 .hm-lead { flex-basis: 44px; width: 44px; height: 44px; border-radius: 14px; font-size: var(--font-size-sm); background: #fff; }
.hm-sh-who--v2 .hm-lead--token { font-size: var(--font-size-lg); }
.hm-sh-who--v2 h2 { font-size: var(--font-size-md); }
.hm-sh-who--v2 .hm-sub { font-size: var(--font-size-xxs); }
.hm-sh-who--v2 .hm-sh-tags { margin-top: 6px; gap: 4px; }
.hm-sh-who--v2 .hm-tag { padding: 2px 8px; font-size: 10px; background: #fff; }
.hm-sh-alert { margin-top: -4px; }
/* step strip */
.hm-strip { display: flex; align-items: center; gap: 4px; padding: 8px 10px; border-radius: 12px; background: var(--color-bg); overflow: hidden; }
.hm-strip__s { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.hm-strip__s i { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; font-style: normal; font-size: 10px; font-weight: 700; color: var(--color-text-muted); background: #fff; border: 1px solid var(--color-border); }
.hm-strip__s i .icon { width: 12px; height: 12px; }
.hm-strip__s.is-done i { color: #fff; border-color: var(--color-primary); background: var(--color-primary); }
.hm-strip__s.is-now i { color: #fff; border-color: var(--color-primary-dark); background: var(--color-primary-dark); box-shadow: 0 0 0 3px var(--color-primary-tint-strong); }
.hm-strip__s b { font-size: 11px; color: var(--color-primary-dark); white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.hm-strip__line { flex: 1 1 8px; min-width: 6px; height: 2px; border-radius: 1px; background: var(--color-border); }
/* task tiles */
.hm-sh-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.hm-sh-tile { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 8px 10px; border: 1px solid #EDF2F7; border-radius: 12px; background: #fff; }
.hm-sh-tile.is-wide { grid-column: 1 / -1; }
.hm-sh-tile__l { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--color-text-muted); }
.hm-sh-tile__l .icon { width: 12px; height: 12px; color: var(--color-primary); }
.hm-sh-tile__v { font-size: var(--font-size-sm); font-weight: 600; line-height: 1.3; color: var(--color-text); overflow-wrap: anywhere; }
.hm-sh-tile__v .hm-row__st { font-size: var(--font-size-xs); }
/* form card: tighter */
.hm-sh-form { gap: 10px; padding: 12px; }
.hm-sh-form .field { gap: 6px; }
.hm-chipset { display: flex; flex-wrap: wrap; gap: 6px; }
.hm-chipset__b { padding: 7px 12px; border: 1px solid var(--color-border); border-radius: 999px; font: inherit; font-size: var(--font-size-xs); font-weight: 700; color: var(--color-text); background: #fff; cursor: pointer; }
.hm-chipset__b.is-on { color: #fff; border-color: var(--color-primary); background: var(--color-primary); }
.hm-docpick { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.hm-docpick__b { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 7px 8px; border: 1px solid var(--color-border); border-radius: 12px; font: inherit; text-align: left; color: var(--color-text); background: #fff; cursor: pointer; }
.hm-docpick__b b { display: block; font-size: 11px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-docpick__b small { display: block; font-size: 10px; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-docpick__b .grow { min-width: 0; }
.hm-docpick__av { position: relative; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 9px; font-size: 10px; font-weight: 700; color: var(--color-primary-dark); background: var(--color-primary-soft); }
.hm-docpick__av i { position: absolute; right: -2px; bottom: -2px; width: 9px; height: 9px; border: 2px solid #fff; border-radius: 50%; background: #2C8A4C; }
.hm-docpick__av i.is-off { background: #A7B1BC; }
.hm-docpick__b.is-on { border-color: var(--color-primary); background: var(--color-primary-soft); box-shadow: 0 0 0 1px var(--color-primary) inset; }
.hm-docpick__b.is-off { opacity: .6; }
/* secondary actions row + sticky primary */
.hm-sh-more { display: flex; flex-wrap: wrap; gap: 6px; }
.hm-sh-more > .btn { flex: 1 1 calc(50% - 3px); width: auto; min-height: 40px; padding: 8px 10px; font-size: var(--font-size-xs); }
.hm-sh-more > .hm-ask { flex: 1 1 100%; }
.hm-sh-act--sticky { position: sticky; bottom: 0; z-index: 3; gap: 8px; margin: 4px -18px 0; padding: 10px 18px 16px; border: 0; border-top: 1px solid var(--color-border); border-radius: 0; background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(6px); }
.hm-sh-act--sticky .hm-flowto { margin: 0; padding: 0; border: 0; background: none; font-size: var(--font-size-xxs); }
.hm-sh-act--sticky .hm-sh-main { min-height: 48px; }
/* note + record link */
.hm-sh-note { padding: 8px 10px; border-radius: 12px; background: var(--color-bg); }
.hm-sh-record { padding: 10px 12px; border-radius: 12px; }
.hm-sh-who--v2 { padding: 10px 12px; }
.hm-sh-who--v2 .hm-sh-tags { margin-top: 4px; }
/* popup with a pinned button bar: the bar is the bottom edge, nothing slides under it */
.hm-sheet:has(.hm-sh-act--sticky) { padding-bottom: 0; }
/* Sub-screen summary ("2 waiting · Done by …"): plain info line, not a card */
.hm-subinfo { gap: 10px; margin: 2px 0 2px; padding: 4px 2px 10px; border: 0; border-bottom: 1px dashed var(--color-border); border-radius: 0; background: transparent; box-shadow: none; cursor: default; }
.hm-subinfo__step { flex-basis: 34px; width: 34px; height: 34px; border-radius: 50%; font-size: var(--font-size-sm); }
.hm-subinfo__step small { font-size: 7px; }
.hm-subinfo__step--ico { flex-basis: 30px; width: 30px; height: 30px; border-radius: 50%; }
.hm-subinfo__step--ico .icon { width: 14px; height: 14px; }
.hm-subinfo b { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: var(--font-size-sm); color: var(--color-text); }
.hm-subinfo b em { margin-left: 2px; vertical-align: 0; }
.hm-subinfo small { margin-top: 0; font-size: var(--font-size-xxs); }
.hm-subinfo__step:not(.hm-subinfo__step--ico) { flex: 0 0 auto; width: auto; height: 26px; flex-direction: row; gap: 3px; padding: 0 9px; border-radius: 999px; font-size: var(--font-size-xs); }
.hm-subinfo__step:not(.hm-subinfo__step--ico) small { font-size: 9px; opacity: .8; }
/* Scalable pickers: chips stay on one row (side-scroll); doctor = selected row + searchable short list */
.hm-chipset { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -2px; padding: 0 2px 2px; }
.hm-chipset::-webkit-scrollbar { display: none; }
.hm-chipset__b { flex: 0 0 auto; white-space: nowrap; }
.hm-dsel .field__label small { font-weight: 600; color: var(--color-text-muted); }
.hm-dsel__cur { display: flex; align-items: center; gap: 8px; }
.hm-dsel__cur [data-cur] { flex: 1; min-width: 0; }
.hm-dsel__cur .hm-docpick__b { width: 100%; cursor: default; }
.hm-dsel__chg { flex: 0 0 auto; height: 40px; padding: 0 14px; border: 1px solid var(--color-border); border-radius: 12px; font: inherit; font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); color: var(--color-primary-dark); background: #fff; cursor: pointer; }
.hm-dsel__panel { margin-top: 8px; padding: 8px; border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-bg); }
.hm-dsel__panel .hm-search { margin-bottom: 6px; }
.hm-dsel__list { display: flex; flex-direction: column; gap: 4px; max-height: 196px; overflow-y: auto; scrollbar-width: none; }
.hm-dsel__list::-webkit-scrollbar { display: none; }
.hm-dsel__list .hm-docpick__b { width: 100%; }
.hm-dsel__list .hm-docpick__b[hidden] { display: none; }
/* Visit-type popup: roomier option cards with icons */
.hm-choice--sub { gap: 10px; margin: 6px 0 10px; }
.hm-choice--sub button { gap: 4px; padding: 14px 12px; border-radius: 16px; border-color: #E6EDF3; box-shadow: 0 1px 2px rgba(32, 42, 55, 0.04); transition: border-color .15s ease, box-shadow .15s ease; }
.hm-choice--sub button:hover, .hm-choice--sub button:focus-visible { border-color: var(--color-primary); box-shadow: 0 6px 16px -10px rgba(15, 127, 115, 0.45); }
.hm-choice--sub b { font-size: var(--font-size-sm); line-height: 1.25; }
.hm-choice--sub small { line-height: 1.35; }
.hm-choice__ico { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin-bottom: 6px; border-radius: 11px; color: var(--color-primary-dark); background: var(--color-primary-soft); }
.hm-sheet .hm-sheet__head + .hm-choice--sub { margin-top: 10px; }
.hm-sheet [data-sheet-body]:has(.hm-choice--sub) { padding-bottom: 8px; }

/* =====================================================================
   Phase 2 · Flow 11 Access & Governance (gv-) and Flow 18 Onboarding (ob-)
   Patient-app design system: teal gradient header, Manrope, 18–20 px cards,
   soft shadows, tone icon tiles. Add-ons only; flows unchanged.
   ===================================================================== */
.gv-head { padding-bottom: 20px; }
.gv-head:has(+ .gv-stats) { padding-bottom: 40px; }
.gv-head .hm-hbtn.is-blank { visibility: hidden; }
.gv-stats { position: relative; z-index: 6; display: grid; grid-template-columns: repeat(4, 1fr); margin: -30px 14px 0; padding: 6px; border: 1px solid var(--color-border); border-radius: 18px; background: #fff; box-shadow: 0 14px 30px -16px rgba(32, 42, 55, 0.32); }
.gv-stat { display: flex; flex-direction: column; gap: 2px; padding: 9px 8px 8px; border-radius: 13px; color: var(--color-text); }
.gv-stat + .gv-stat { border-left: 1px solid #EEF2F6; border-radius: 0 13px 13px 0; }
.gv-stat strong { font-size: var(--font-size-xl); font-weight: var(--font-weight-bold); line-height: 1.1; letter-spacing: -0.02em; }
.gv-stat span { font-size: 10.5px; font-weight: 700; line-height: 1.2; color: var(--color-text-muted); }
.gv-stat.is-warn strong { color: var(--color-urgent); }
.gv-stat.is-alert strong { color: var(--color-emergency); }
.gv-stat:active { background: var(--color-primary-tint); }
.gv-body { display: flex; flex-direction: column; gap: 12px; padding: 16px 14px 24px; }
.gv-body--flat { padding-top: 16px; }
.gv-sec { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 2px -2px; }
.gv-sec h2 { font-size: 13px; font-weight: 800; letter-spacing: 0.02em; color: var(--color-text); }
.gv-sec a, .gv-sec__btn { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; font: inherit; font-size: 12px; font-weight: 700; color: var(--color-primary-dark); background: none; cursor: pointer; }
.gv-sec__hint { font-size: 11px; font-weight: 600; color: var(--color-text-subtle); }
.gv-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--color-border); border-radius: 18px; background: #fff; box-shadow: var(--shadow-sm); }
.gv-muted { font-size: 12px; color: var(--color-text-muted); display: flex; align-items: center; gap: 6px; }
.gv-count { margin: 2px 2px -4px; font-size: 11.5px; font-weight: 700; color: var(--color-text-subtle); }
.gv-note { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; font-size: 12px; line-height: 1.45; color: #36506B; background: #EAF4FB; }
.gv-note .icon { flex: 0 0 auto; margin-top: 1px; color: var(--color-secondary); }
.gv-note--warn { color: #7A4B0F; background: var(--color-status-action-soft); }
.gv-note--warn .icon { color: var(--color-status-action); }
.gv-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.01em; white-space: nowrap; color: var(--color-text-muted); background: var(--color-muted-soft); }
.gv-pill--ok { color: var(--color-primary-dark); background: var(--color-primary-soft); }
.gv-pill--warn { color: var(--color-status-action); background: var(--color-status-action-soft); }
.gv-pill--crit { color: var(--color-emergency); background: var(--color-emergency-soft); }
.gv-pill--info { color: var(--color-secondary); background: var(--color-info-soft); }
.gv-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: 16px; font: inherit; text-align: left; color: var(--color-text); background: #fff; box-shadow: var(--shadow-sm); cursor: pointer; }
.gv-row b { display: block; font-size: 13.5px; font-weight: 700; line-height: 1.25; }
.gv-row small { display: block; margin-top: 2px; font-size: 11.5px; line-height: 1.35; color: var(--color-text-muted); }
.gv-row .gv-pill { margin-left: 4px; }
/* QA: rows with several status badges put the badges on their own line so the title is never squeezed */
.gv-row--tags { flex-wrap: wrap; row-gap: 8px; }
.gv-row--tags > .grow { flex: 1 1 0; min-width: 0; }
.gv-row__tags { flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 6px; padding-left: 48px; }
.gv-row__tags .gv-pill { margin-left: 0; }
.gv-row__ico { flex: 0 0 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--st-c, var(--color-primary-dark)); background: var(--st-bg, var(--color-primary-soft)); }
.gv-row__chev { color: var(--color-text-subtle); }
.gv-row:active, .gv-act:active, .gv-quick__b:active { transform: scale(0.985); }
.gv-link { align-self: flex-start; padding: 0; border: 0; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--color-primary-dark); background: none; cursor: pointer; }
.gv-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.gv-kv { display: grid; grid-template-columns: minmax(0, auto) minmax(72px, 1fr); gap: 7px 14px; font-size: 12.5px; }
.gv-kv dt { color: var(--color-text-muted); font-weight: 600; }
.gv-kv dd { margin: 0; font-weight: 700; color: var(--color-text); text-align: right; overflow-wrap: anywhere; word-break: normal; }
.gv-kv--2 { grid-template-columns: auto 1fr auto 1fr; }
.gv-kv--2 dd { text-align: left; }
.gv-av { flex: 0 0 40px; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 14px; font-size: 13px; font-weight: 800; color: var(--color-primary-dark); background: linear-gradient(140deg, #DDF4F0, #C8ECE6); }
.gv-av--lg { flex-basis: 64px; width: 64px; height: 64px; border-radius: 20px; font-size: 20px; }
.gv-av.has-photo { color: #fff; background: linear-gradient(140deg, var(--color-primary), var(--color-primary-deep)); box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--color-primary-soft); }
/* Hub: quick actions, directory, pins, timeline */
.gv-quick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 12px 8px; border: 1px solid var(--color-border); border-radius: 18px; background: #fff; box-shadow: var(--shadow-sm); }
.gv-quick__b { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--color-text); text-align: center; }
.gv-quick__ico { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 14px; color: var(--st-c); background: var(--st-bg); }
.gv-alertcard { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 18px; color: #fff; background: linear-gradient(135deg, #E0842A, #C1272D); box-shadow: 0 12px 24px -14px rgba(193, 39, 45, 0.7); }
.gv-alertcard b { display: block; font-size: 13.5px; }
.gv-alertcard small { display: block; margin-top: 2px; font-size: 11.5px; opacity: 0.85; }
.gv-alertcard__ico { flex: 0 0 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: rgba(255, 255, 255, 0.18); }
.gv-cat { border: 1px solid var(--color-border); border-radius: 18px; background: #fff; box-shadow: var(--shadow-sm); overflow: hidden; }
.gv-cat + .gv-cat { margin-top: 10px; }
.gv-cat summary { display: flex; align-items: center; gap: 12px; padding: 13px 14px; cursor: pointer; list-style: none; }
.gv-cat summary::-webkit-details-marker { display: none; }
.gv-cat summary b { display: block; font-size: 14px; }
.gv-cat summary small { font-size: 11.5px; color: var(--color-text-muted); }
.gv-cat__ico { flex: 0 0 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--st-c); background: var(--st-bg); }
.gv-cat__chev { color: var(--color-text-subtle); transition: transform 0.2s; }
.gv-cat[open] .gv-cat__chev { transform: rotate(90deg); }
.gv-cat .gv-entry { border-top: 1px solid #EEF2F6; }
.gv-cat .gv-row { border: 0; border-radius: 0; box-shadow: none; padding: 11px 6px 11px 14px; }
.gv-cat.is-pinned { padding: 12px 0 0; }
.gv-cat__t { display: flex; align-items: center; gap: 6px; padding: 0 14px 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #B27400; }
.gv-entry { display: flex; align-items: center; }
.gv-entry .gv-row { flex: 1; min-width: 0; }
.gv-pin { flex: 0 0 40px; height: 40px; margin-right: 6px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 12px; color: #C3CCD8; background: transparent; cursor: pointer; }
.gv-pin.is-on { color: #E0A21A; }
.gv-pin.is-on svg { fill: currentColor; }
.gv-timeline { gap: 0; }
.gv-tl { position: relative; display: flex; gap: 12px; padding: 0 0 12px; }
.gv-tl:last-child { padding-bottom: 0; }
.gv-tl > i { position: relative; flex: 0 0 10px; height: 10px; margin-top: 4px; border-radius: 50%; background: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-soft); }
.gv-tl:not(:last-child) > i::after { content: ""; position: absolute; left: 4px; top: 14px; width: 2px; height: calc(100% + 2px); background: #E3EBF3; }
.gv-tl b { display: block; font-size: 12.5px; }
.gv-tl small { display: block; font-size: 11.5px; color: var(--color-text-muted); }
/* Cards: invitations, templates, doctors, sessions, rules, policy */
.gv-inv__top { display: flex; align-items: center; gap: 12px; }
.gv-card.gv-inv__top { flex-direction: row; }
.gv-inv__top b { display: block; font-size: 14px; }
.gv-inv__top small { display: block; font-size: 11.5px; color: var(--color-text-muted); }
.gv-tpl__top, .gv-rule__top { display: flex; align-items: center; gap: 12px; }
.gv-tpl__top b, .gv-rule__top b { display: block; font-size: 14px; }
.gv-tpl__top small, .gv-rule__top small { display: block; font-size: 11.5px; color: var(--color-text-muted); }
.gv-tpl.is-archived { opacity: 0.6; }
.gv-rchips { display: flex; flex-wrap: wrap; gap: 4px; }
.gv-rchip { display: inline-flex; align-items: center; padding: 4px 8px; border: 1px solid #E3EAF2; border-radius: 8px; font: inherit; font-size: 10.5px; font-weight: 700; font-style: normal; color: #A0AAB8; background: #F7F9FB; }
.gv-rchip.is-on { border-color: transparent; color: var(--color-primary-dark); background: var(--color-primary-soft); }
.gv-rchip.is-lock { text-decoration: line-through; }
.gv-rchips--tap .gv-rchip { padding: 7px 10px; cursor: pointer; }
.gv-rchip.is-fixed { cursor: default; }
.gv-mx { gap: 0; padding: 4px 14px; }
.gv-mx__row { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; }
.gv-mx__row + .gv-mx__row { border-top: 1px solid #EEF2F6; }
.gv-mx__head { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.gv-x { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; color: var(--color-text-muted); background: var(--color-muted-soft); cursor: pointer; }
.gv-pick { display: flex; flex-direction: column; gap: 8px; max-height: 56vh; overflow-y: auto; }
.gv-seg { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: #E6EEF6; }
.gv-seg__b { flex: 1; padding: 9px 8px; border: 0; border-radius: 11px; font: inherit; font-size: 12.5px; font-weight: 700; text-align: center; color: var(--color-text-muted); background: transparent; cursor: pointer; }
.gv-seg__b.is-on { color: var(--color-primary-dark); background: #fff; box-shadow: 0 2px 6px rgba(32, 42, 55, 0.1); }
.gv-seg__b:disabled { opacity: 0.45; }
.gv-cap { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
.gv-cap + .gv-cap { padding-top: 12px; border-top: 1px solid #EEF2F6; }
.gv-cap b { display: block; font-size: 13.5px; }
.gv-cap small { display: block; font-size: 11.5px; color: var(--color-text-muted); }
.gv-has { display: inline-block; margin-top: 4px; font-size: 10.5px; font-weight: 800; font-style: normal; color: var(--color-primary-dark); }
.gv-locks { gap: 8px; }
.gv-lock, .gv-task { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 1.4; color: var(--color-text); }
.gv-lock .icon { color: var(--color-emergency); margin-top: 1px; }
.gv-task .icon { color: var(--color-primary-dark); margin-top: 1px; flex: 0 0 auto; }
.gv-task .gv-link { margin-left: auto; }
.gv-ul { margin: 0; padding-left: 18px; font-size: 12.5px; line-height: 1.6; color: var(--color-text); }
.gv-ul--off { color: var(--color-text-muted); }
.gv-rule.is-off { opacity: 0.6; }
.gv-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; }
.gv-flow span { padding: 5px 10px; border-radius: 10px; background: #F1F5F9; }
.gv-flow span.is-a { color: #fff; background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)); }
.gv-flow em { font-style: normal; font-size: 11px; color: var(--color-text-muted); }
.gv-result { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; padding: 12px 14px; border-radius: 14px; font-size: 12.5px; border: 1px solid; }
.gv-result b { font-size: 13.5px; }
.gv-result small { color: inherit; opacity: 0.75; }
.gv-result--ok { color: var(--color-primary-deep); border-color: #BFE7DF; background: var(--color-primary-soft); }
.gv-result--crit { color: var(--color-emergency); border-color: var(--color-emergency-border); background: var(--color-emergency-soft); }
.gv-result--warn { color: #7A4B0F; border-color: #F1D9A6; background: var(--color-status-action-soft); }
.gv-result--info { color: var(--color-secondary); border-color: #CFD8EE; background: var(--color-info-soft); }
.gv-amt { font-size: 13.5px; font-weight: 800; color: var(--color-text); white-space: nowrap; }
.gv-money { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 8px; }
.gv-money div { display: flex; flex-direction: column; gap: 2px; }
.gv-money small { font-size: 10.5px; font-weight: 700; color: var(--color-text-muted); }
.gv-money b { font-size: 14px; }
.gv-money b.is-big { font-size: 20px; color: var(--color-primary-dark); }
.gv-pol { flex-direction: row; align-items: center; gap: 12px; }
.gv-pol b { display: block; font-size: 13.5px; }
.gv-pol small { display: block; font-size: 11.5px; color: var(--color-text-muted); line-height: 1.4; }
.gv-alist { gap: 0; padding: 4px 6px; }
.gv-aitem { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 11px 8px; border: 0; border-radius: 12px; font: inherit; text-align: left; color: var(--color-text); background: none; cursor: pointer; }
.gv-aitem + .gv-aitem { border-top: 1px solid #EEF2F6; border-radius: 0; }
.gv-aitem b { display: block; font-size: 13px; }
.gv-aitem small { display: block; font-size: 11.5px; color: var(--color-text-muted); }
.gv-aitem__dot { flex: 0 0 10px; height: 10px; margin-top: 4px; border-radius: 50%; background: var(--st-c, var(--color-primary)); }
.gv-aitem.is-flag { background: var(--color-emergency-soft); }
.gv-aitem.is-flag .icon { color: var(--color-emergency); }
.gv-sess { flex-direction: row; align-items: center; gap: 12px; }
.gv-sess b { display: block; font-size: 13.5px; }
.gv-sess small { display: block; margin: 2px 0 6px; font-size: 11.5px; color: var(--color-text-muted); }
.gv-sess.is-risk { border-color: var(--color-emergency-border); }
.gv-depts { display: flex; flex-direction: column; gap: 8px; }
.gv-dept { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: 16px; font: inherit; text-align: left; color: var(--color-text); background: #fff; cursor: pointer; }
.gv-dept b { display: block; font-size: 13.5px; }
.gv-dept small { display: block; font-size: 11.5px; color: var(--color-text-muted); }
.gv-bar { display: block; height: 6px; margin-top: 7px; border-radius: 6px; background: #EEF2F6; overflow: hidden; }
.gv-bar em { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--color-primary-bright), var(--color-primary-dark)); }
.gv-preview-banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; font-size: 12.5px; line-height: 1.45; color: #2F3E9E; background: linear-gradient(135deg, #ECEDFB, #E1F2FC); border: 1px dashed #AEB6EA; }
.gv-pv { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: 16px; background: #fff; }
.gv-pv > b { font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-text-muted); }
.gv-pv--hidden { flex-direction: row; justify-content: space-between; align-items: center; opacity: 0.55; background: #F6F8FA; }
.gv-pv--hidden span { font-size: 11px; font-weight: 700; color: var(--color-text-subtle); }
.gv-pv__mod { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 700; }
.gv-pv__mod small { font-size: 11px; font-weight: 600; color: var(--color-text-muted); }
/* Diffs, compare, impact */
.gv-diff { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.gv-diff__row { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 14px; background: #fff; }
.gv-diff__row b { font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-text-muted); }
.gv-diff__row .is-old { font-size: 13px; color: #8E4044; text-decoration: line-through; text-decoration-color: rgba(142, 64, 68, 0.4); }
.gv-diff__row .is-new { font-size: 13px; font-weight: 700; color: var(--color-primary-deep); }
.gv-chg { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; font-weight: 700; }
.gv-chg--plus { color: var(--color-primary-deep); background: var(--color-primary-soft); }
.gv-chg--minus { color: #8E4044; background: var(--color-emergency-soft); }
.gv-chg.is-risky { color: #7A4B0F; background: var(--color-status-action-soft); }
.gv-impact { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 4px 0 12px; }
.gv-impact div { display: flex; flex-direction: column; gap: 2px; padding: 10px 8px; border-radius: 14px; text-align: center; background: #F3F7FB; }
.gv-impact strong { font-size: 20px; line-height: 1.1; color: var(--color-text); }
.gv-impact span { font-size: 10.5px; font-weight: 700; color: var(--color-text-muted); }
.gv-impact .is-alert { background: var(--color-emergency-soft); }
.gv-impact .is-alert strong { color: var(--color-emergency); }
.gv-mods { gap: 0; padding: 4px 14px; }
.gv-mod { display: flex; align-items: center; gap: 12px; padding: 11px 0; }
.gv-mod + .gv-mod { border-top: 1px solid #EEF2F6; }
.gv-mod b { display: block; font-size: 13.5px; }
.gv-mod small { display: block; font-size: 11.5px; color: var(--color-text-muted); }
.gv-modsw { min-width: 82px; padding: 7px 10px; border: 1px solid; border-radius: 999px; font: inherit; font-size: 11.5px; font-weight: 800; cursor: pointer; }
.gv-modsw.is-on { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)); }
.gv-modsw.is-off { color: var(--color-text-muted); border-color: var(--color-border-strong); background: #fff; }
.gv-modsw.is-ro { color: var(--color-status-action); border-color: #F1D9A6; background: var(--color-status-action-soft); }
/* Approvals */
.gv-apr__top { display: flex; align-items: center; gap: 10px; }
.gv-apr__top h3 { margin: 0; font-size: 14.5px; }
.gv-apr.is-esc { border-color: var(--color-emergency-border); box-shadow: 0 0 0 3px rgba(193, 39, 45, 0.06); }
.gv-apr__more { display: flex; gap: 16px; padding-top: 8px; border-top: 1px dashed #E3EAF2; }
.gv-apr__more .gv-link { min-height: 36px; padding: 0 2px; }
.gv-ruleline, .gv-info { display: flex; gap: 6px; align-items: flex-start; font-size: 11.5px; font-weight: 600; color: var(--color-secondary); }
.gv-info { color: var(--color-status-action); }
/* Employee page */
.gv-prof__top { display: flex; align-items: center; gap: 14px; }
.gv-prof__top h2 { font-size: 18px; line-height: 1.2; }
.gv-prof__top p { margin-top: 2px; font-size: 12px; color: var(--color-text-muted); }
.gv-prof__pills { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.gv-mchips { display: flex; flex-wrap: wrap; gap: 6px; }
.gv-mchip { padding: 5px 10px; border-radius: 10px; font-size: 11.5px; font-weight: 700; color: var(--color-text); background: #F1F5F9; }
.gv-mchip.is-off { color: var(--color-text-subtle); text-decoration: line-through; }
.gv-pendline { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; font-size: 12px; font-weight: 700; color: var(--color-status-action); background: var(--color-status-action-soft); }
.gv-acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gv-act { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px 10px; border: 1px solid var(--color-border); border-radius: 16px; font: inherit; font-size: 11px; font-weight: 700; line-height: 1.2; text-align: center; color: var(--color-text); background: #fff; box-shadow: var(--shadow-sm); cursor: pointer; }
.gv-act:disabled { opacity: 0.4; cursor: not-allowed; }
.gv-act__ico { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--st-c); background: var(--st-bg); }
.gv-done { display: flex; gap: 12px; padding: 14px; border-radius: 18px; color: #fff; background: var(--gradient-primary); box-shadow: var(--shadow-primary); }
.gv-done__ico { flex: 0 0 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--color-primary-dark); background: #fff; }
.gv-done b { display: block; font-size: 14.5px; }
.gv-done small { display: block; margin-top: 3px; font-size: 11.5px; line-height: 1.4; opacity: 0.9; }
.gv-done__btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.gv-done__btns a { padding: 6px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: #fff; background: rgba(255, 255, 255, 0.18); }
.gv-sens { padding: 10px 0; border-top: 1px solid #EEF2F6; }
.gv-sens__opts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 8px 0 2px; }
.gv-limit { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--color-text-muted); }
.gv-limit .input { width: 110px; height: 38px; }
.gv-idrow { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px dashed #CFDBE8; border-radius: 14px; background: #FAFCFE; }
.gv-idrow b { display: block; font-size: 13px; }
.gv-idrow small { display: block; font-size: 11px; color: var(--color-text-muted); }
.gv-tplbtns { display: flex; gap: 6px; flex-wrap: wrap; }
.gv-acc { border: 1px solid var(--color-border); border-radius: 14px; background: #fff; }
.gv-acc + .gv-acc { margin-top: 8px; }
.gv-acc > summary { display: flex; align-items: center; gap: 8px; padding: 11px 12px; list-style: none; cursor: pointer; font-size: 12.5px; }
.gv-acc > summary::-webkit-details-marker { display: none; }
.gv-acc__n { font-size: 11px; font-weight: 800; color: var(--color-primary-dark); }
.gv-acc__safe { padding: 5px 9px; border: 1px solid #BFE7DF; border-radius: 999px; font: inherit; font-size: 10.5px; font-weight: 800; color: var(--color-primary-dark); background: var(--color-primary-soft); cursor: pointer; }
.gv-acc .hm-mrow { margin: 0 8px 8px; }
.gv-map { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.gv-map th { padding: 6px 4px; font-size: 10.5px; text-align: left; color: var(--color-text-muted); }
.gv-map td { padding: 8px 4px; border-top: 1px solid #EEF2F6; font-weight: 700; }
.gv-checkline { align-items: flex-start; font-size: 12.5px; line-height: 1.45; }
.hm-emp-meta { display: block; margin-top: 3px; font-size: 11px; color: var(--color-text-subtle); }
.hm-hosp { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 14px; background: #F7FBFD; }
.hm-hosp small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-text-subtle); }
.hm-hosp b { display: block; font-size: 13px; }
.hm-hosp__ico { flex: 0 0 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; color: var(--color-primary-dark); background: var(--color-primary-soft); }
.hm-demo__pw { margin-top: 6px; font-size: 11.5px; color: var(--color-text-muted); }

/* ---------- Flow 18 onboarding ---------- */
.of-head { padding-bottom: 16px; }
.of-prog { height: 6px; margin: 14px 2px 0; border-radius: 6px; background: rgba(255, 255, 255, 0.2); overflow: hidden; }
.of-prog i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #8FF0DE, #fff); transition: width 0.4s; }
.of-stages { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-top: 12px; }
.of-stages a { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 9.5px; font-weight: 700; color: rgba(255, 255, 255, 0.72); text-align: center; }
.of-stages i { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-style: normal; font-size: 11px; font-weight: 800; color: #fff; background: rgba(255, 255, 255, 0.16); border: 1.5px solid rgba(255, 255, 255, 0.28); }
.of-stages a.is-done i { color: var(--color-primary-dark); background: #DFF7F2; border-color: transparent; }
.of-stages a.is-now { color: #fff; }
.of-stages a.is-now i { color: var(--color-primary-dark); background: #fff; border-color: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.22); }
.of-stages a.is-locked { pointer-events: none; opacity: 0.6; }
.of-body { gap: 12px; }
.of-role { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--color-text-muted); }
.of-role .gv-pill { margin-left: auto; }
.of-saved { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--color-text-subtle); }
.of-hero { position: relative; padding: 22px 18px 18px; border-radius: 22px; color: #fff; background: var(--gradient-screen); box-shadow: var(--shadow-hero); overflow: hidden; }
.of-hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,0.22), rgba(255,255,255,0) 70%); }
.gv-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; padding: 12px; border-radius: 14px; background: #F6F9FC; }
.gv-facts div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gv-facts small { font-size: 10.5px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--color-text-subtle); }
.gv-facts b { font-size: 12.5px; line-height: 1.3; color: var(--color-text); overflow-wrap: anywhere; }
.gv-apr .hm-apr__act { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 8px; }
.gv-apr .hm-apr__act .btn { min-width: 0; padding-left: 8px; padding-right: 8px; }
.of-hero h2 { font-size: 20px; line-height: 1.25; }
.of-hero p { margin-top: 6px; font-size: 12.5px; opacity: 0.88; }
.of-stagechips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.of-stagechips span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 5px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(255, 255, 255, 0.16); }
.of-stagechips i { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-style: normal; font-size: 10px; color: var(--color-primary-dark); background: #fff; }
.of-otp { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; }
.of-otp .input { letter-spacing: 0.3em; font-weight: 800; text-align: center; }
.of-list { display: flex; flex-direction: column; gap: 8px; }
.of-li { display: flex; align-items: center; gap: 10px; padding: 9px 0; color: var(--color-text); }
.of-li + .of-li { border-top: 1px solid #EEF2F6; }
.of-li b { display: block; font-size: 13px; }
.of-li small { display: block; font-size: 11.5px; color: var(--color-text-muted); }
.of-li.is-bad b { color: #8E4044; }
.of-inline { display: flex; gap: 8px; }
.of-inline .input { flex: 1; }
.of-doc { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 11px 0; }
.of-doc + .of-doc { border-top: 1px solid #EEF2F6; }
.of-doc .grow { flex: 1 1 60%; }
.of-doc b { display: block; font-size: 13px; }
.of-doc small { display: block; font-size: 11.5px; color: var(--color-text-muted); }
.of-doc.is-done b { color: var(--color-primary-deep); }
.of-docprev { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; height: 220px; border-radius: 16px; color: var(--color-text-subtle); background: repeating-linear-gradient(45deg, #F4F7FA, #F4F7FA 10px, #EEF2F6 10px, #EEF2F6 20px); }
.of-vstatus { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; border: 1px solid; }
.of-vstatus > span { flex: 0 0 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #fff; }
.of-vstatus b { display: block; font-size: 15px; }
.of-vstatus small { display: block; margin-top: 2px; font-size: 12px; opacity: 0.85; }
.of-vstatus--ok { color: var(--color-primary-deep); border-color: #BFE7DF; background: var(--color-primary-soft); }
.of-vstatus--warn { color: #7A4B0F; border-color: #F1D9A6; background: var(--color-status-action-soft); }
.of-vstatus--crit { color: var(--color-emergency); border-color: var(--color-emergency-border); background: var(--color-emergency-soft); }
.of-vstatus--info, .of-vstatus--mute { color: var(--color-secondary); border-color: #CFD8EE; background: var(--color-info-soft); }
.of-steps { display: flex; gap: 4px; }
.of-steps span { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; text-align: center; color: var(--color-text-subtle); }
.of-steps i { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-style: normal; font-size: 11px; color: var(--color-text-subtle); background: #EEF2F6; }
.of-steps .is-done { color: var(--color-primary-dark); }
.of-steps .is-done i { color: #fff; background: var(--color-primary); }
.of-steps .is-now { color: var(--color-text); }
.of-steps .is-now i { color: #fff; background: var(--color-secondary); box-shadow: 0 0 0 4px var(--color-info-soft); }
.of-steps--v { flex-direction: column; gap: 10px; }
.of-steps--v span { flex-direction: row; gap: 10px; font-size: 13px; text-align: left; }
.of-q { padding: 10px 12px; border-left: 3px solid var(--color-status-action); border-radius: 8px; font-size: 13px; font-weight: 700; background: var(--color-status-action-soft); }
.of-reviewer { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1.5px dashed #AEB6EA; border-radius: 18px; background: #F5F6FE; }
.of-reviewer p { font-size: 13px; color: #2F3E9E; }
.of-reviewer small { font-size: 11px; color: var(--color-text-muted); }
.of-dr { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; }
.of-dr .grow { flex: 1 1 60%; }
.of-dr b { display: block; font-size: 13.5px; }
.of-dr small { display: block; margin: 2px 0 6px; font-size: 11.5px; color: var(--color-text-muted); }
.of-dr.is-off { opacity: 0.55; }
.of-dr__b { display: flex; gap: 6px; width: 100%; }
.of-tar { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
.of-tar .grow { flex: 1 1 50%; }
.of-tar b { display: block; font-size: 13.5px; }
.of-tar small { display: block; font-size: 11px; color: var(--color-text-muted); }
.of-tar strong { font-size: 15px; color: var(--color-primary-dark); }
.of-mx { padding: 8px; overflow-x: auto; }
.of-mx table { width: 100%; border-collapse: collapse; font-size: 12px; }
.of-mx th { padding: 6px 4px; font-size: 10px; font-weight: 800; text-align: center; color: var(--color-text-muted); white-space: nowrap; }
.of-mx tbody th { text-align: left; font-size: 12px; color: var(--color-text); white-space: normal; }
.of-mx td { padding: 4px; border-top: 1px solid #EEF2F6; text-align: center; }
.of-tg { width: 28px; height: 28px; border: 1.5px solid var(--color-border-strong); border-radius: 9px; font: inherit; font-size: 13px; font-weight: 800; color: #fff; background: #fff; cursor: pointer; }
.of-tg.is-on { border-color: transparent; background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)); }
.of-tg.is-lock { opacity: 0.45; cursor: not-allowed; }
.of-plan { position: relative; gap: 10px; }
.of-plan.is-best { border-color: #9EDDD2; }
.of-plan.is-on { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-tint-strong), var(--shadow-md); }
.of-plan__tag { position: absolute; top: -10px; right: 14px; padding: 3px 10px; border-radius: 999px; font-size: 10px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #E0A21A, #E0842A); }
.of-plan__top { display: flex; align-items: flex-start; gap: 10px; }
.of-plan__top b { display: block; font-size: 15px; }
.of-plan__top small { display: block; font-size: 11.5px; color: var(--color-text-muted); }
.of-plan__p { font-size: 18px; font-weight: 800; color: var(--color-primary-dark); white-space: nowrap; }
.of-plan__p small { display: inline; font-size: 11px; font-weight: 700; color: var(--color-text-muted); }
.of-dash { padding: 18px; border-radius: 22px; color: #fff; background: var(--gradient-screen); box-shadow: var(--shadow-hero); }
.of-dash p { font-size: 11.5px; font-weight: 700; opacity: 0.85; text-transform: uppercase; letter-spacing: 0.06em; }
.of-dash h2 { margin-top: 4px; font-size: 19px; }
.of-dash__k { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.of-dash__k div { display: flex; flex-direction: column; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, 0.14); }
.of-dash__k strong { font-size: 20px; }
.of-dash__k span { font-size: 10.5px; font-weight: 700; opacity: 0.85; }
.of-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.of-tile { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--color-border); border-radius: 16px; background: #fff; }
.of-tile i { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: var(--color-primary-dark); background: var(--color-primary-soft); }
.of-tile b { font-size: 12.5px; line-height: 1.25; }
.of-tile small { font-size: 11px; color: var(--color-text-muted); }
.of-done { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 18px; border-radius: 22px; text-align: center; color: #fff; background: var(--gradient-screen); box-shadow: var(--shadow-hero); }
.of-done > span { width: 64px; height: 64px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--color-primary-dark); background: #fff; box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.18); }
.of-done h2 { font-size: 20px; }
.of-done p { font-size: 12.5px; opacity: 0.88; }
.of-stage { margin-top: 10px; border: 1px solid var(--color-border); border-radius: 18px; background: #fff; overflow: hidden; }
.of-stage > summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; list-style: none; cursor: pointer; }
.of-stage > summary::-webkit-details-marker { display: none; }
.of-stage > summary b { display: block; font-size: 14px; }
.of-stage > summary small { font-size: 11.5px; color: var(--color-text-muted); }
.of-stage[open] .gv-cat__chev { transform: rotate(90deg); }
.of-stage .hm-submenu { margin: 0; border: 0; border-top: 1px solid #EEF2F6; border-radius: 0; box-shadow: none; }
.of-stage__n { flex: 0 0 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 12px; font-weight: 800; color: var(--color-primary-dark); background: var(--color-primary-soft); }
.of-stage__n.is-done { color: #fff; background: var(--color-primary); }

.gv-idrow { flex-wrap: wrap; }
.gv-idrow .grow { flex: 1 1 55%; min-width: 0; }
.gv-idrow .chip { flex: 0 0 auto; }

.action-bar .btn.of-back { flex: 0 0 52px; padding-left: 0; padding-right: 0; }

/* Phase 2 audit add-ons */
.emp-step.is-off { display: none; }
.emp-steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; padding: 10px 6px; border: 1px solid var(--color-border); border-radius: 18px; background: #fff; box-shadow: var(--shadow-sm); }
.emp-steps button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; border: 0; font: inherit; font-size: 9.5px; font-weight: 700; line-height: 1.15; text-align: center; color: var(--color-text-subtle); background: none; cursor: pointer; }
.emp-steps i { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-style: normal; font-size: 11px; font-weight: 800; color: var(--color-text-subtle); background: #EEF2F6; }
.emp-steps .is-done { color: var(--color-primary-dark); }
.emp-steps .is-done i { color: #fff; background: var(--color-primary); }
.emp-steps .is-now { color: var(--color-text); }
.emp-steps .is-now i { color: #fff; background: var(--color-secondary); box-shadow: 0 0 0 4px var(--color-info-soft); }
.emp-brs { display: flex; flex-direction: column; gap: 6px; }
.emp-br { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--color-border); border-radius: 14px; background: #FAFCFE; }
.emp-br b { font-size: 13px; }
.emp-br small { margin-left: 4px; font-size: 10.5px; font-weight: 800; color: var(--color-primary-dark); }
.hm-login-err { padding: 10px 12px; border-radius: 12px; font-size: 12.5px; font-weight: 700; color: var(--color-emergency); background: var(--color-emergency-soft); }
.hm-otp2 { letter-spacing: 0.35em; font-weight: 800; text-align: center; }
.hm-brlist { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.hm-brcard { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--color-border); border-radius: 16px; font: inherit; text-align: left; color: var(--color-text); background: #fff; cursor: pointer; }
.hm-brcard b { display: block; font-size: 13.5px; }
.hm-brcard small { display: block; font-size: 11.5px; color: var(--color-text-muted); }
.hm-brcard .hm-brcard__st { color: var(--color-primary-dark); }
.gv-offline { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 8px; padding: 8px 14px; font-size: 12px; font-weight: 700; color: #7A4B0F; background: var(--color-status-action-soft); }
.of-payedit { margin: -4px 0 6px; font-size: 11.5px; }

/* Compact step action bar: small square Back, slimmer buttons, one-line labels */
.action-bar--compact { align-items: center; gap: 8px; padding: 10px 14px; }
.action-bar--compact .btn { min-height: 44px; height: 44px; padding: 0 14px; font-size: 14px; white-space: nowrap; border-radius: 14px; }
.action-bar--compact .btn.btn--icon-only { flex: 0 0 44px; width: 44px; padding: 0; }
.action-bar--compact .btn--outline:not(.btn--icon-only) { flex: 0 0 auto; }
.action-bar--compact .btn--primary { flex: 1 1 auto; gap: 4px; }
/* "All changes saved" banner: light text on the teal gradient (overrides form small-text colour) */
.gv-done, .gv-done b, .hm-emp .gv-done b { color: #fff; }
.gv-done small, .hm-emp .gv-done small, .form .gv-done small { color: rgba(255, 255, 255, 0.92); font-weight: 600; }
.gv-done__btns a { color: #fff; background: rgba(255, 255, 255, 0.2); }

/* =====================================================================
   Phase 3 · D2 / Flow 02 consultation workspace (cw-) and D11 / Flow 10 referral case (rf-)
   ===================================================================== */
.cw-head { padding-bottom: 18px; }
.cw-body { gap: 12px; }
.cw-banner { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--color-border); border-radius: 18px; background: #fff; box-shadow: var(--shadow-sm); }
.cw-banner b { display: block; font-size: 16px; line-height: 1.2; }
.cw-banner small { display: block; margin-top: 2px; font-size: 11.5px; color: var(--color-text-muted); }
.cw-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.cw-allergy { display: flex; align-items: center; gap: 8px; margin-top: -4px; padding: 9px 12px; border-radius: 12px; font-size: 12.5px; color: var(--color-emergency); background: var(--color-emergency-soft); border: 1px solid var(--color-emergency-border); }
.cw-allergy--none { color: var(--color-text-muted); background: #F4F7FA; border-color: var(--color-border); }
.cw-steps { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: none; }
.cw-steps::-webkit-scrollbar { display: none; }
.cw-steps a { flex: 0 0 auto; padding: 7px 12px; border: 1px solid var(--color-border); border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--color-text-muted); background: #fff; }
.cw-steps a.is-on { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)); box-shadow: var(--shadow-primary); }
.cw-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; padding: 10px 4px 0; border-top: 1px dashed #DCE5EE; }
.cw-foot a { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--color-primary-dark); }
.cw-bar .btn { font-size: 13px; }
.cw-bar .btn--outline { flex: 0 1 auto; padding: 0 11px; }
.cw-vitals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.cw-vital { display: flex; flex-direction: column; gap: 2px; padding: 8px; border-radius: 12px; background: #F4F8FB; }
.cw-vital small { font-size: 10px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-text-subtle); }
.cw-vital b { font-size: 14px; color: var(--color-text); }
.cw-vital.is-ab { background: var(--color-emergency-soft); box-shadow: inset 0 0 0 1px var(--color-emergency-border); }
.cw-vital.is-ab b { color: var(--color-emergency); }
.cw-add > summary { list-style: none; cursor: pointer; }
.cw-add > summary::-webkit-details-marker { display: none; }
.cw-add > summary b { display: flex; align-items: center; gap: 6px; color: var(--color-primary-dark); }
.cw-add > summary b::before { content: "+"; display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 7px; color: #fff; background: var(--color-primary); }
.cw-dx, .cw-rx, .cw-xc, .cw-ord, .cw-doc { display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.cw-dx + .cw-dx, .cw-rx + .cw-rx, .cw-xc + .cw-xc, .cw-ord + .cw-ord, .cw-doc + .cw-doc { border-top: 1px solid #EEF2F6; }
.cw-dx small, .cw-rx small, .cw-xc small, .cw-ord small, .cw-doc small { display: block; font-size: 11.5px; color: var(--color-text-muted); }
.cw-rx b, .cw-xc b, .cw-ord b, .cw-doc b { display: block; font-size: 13.5px; }
.cw-ord.is-off { opacity: 0.55; }
.cw-mar { color: var(--color-secondary) !important; font-weight: 700; }
.cw-op { margin-top: 6px; padding: 8px 10px; border-radius: 10px; font-size: 12.5px; background: var(--color-primary-soft); }
.cw-alerts { display: flex; flex-direction: column; gap: 6px; }
.cw-alert { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; color: #7A2F33; background: var(--color-emergency-soft); border: 1px solid var(--color-emergency-border); }
.cw-tag { display: inline-block; margin-top: 3px; padding: 2px 7px; border-radius: 7px; font-size: 10px; font-weight: 800; font-style: normal; color: var(--color-primary-dark); background: var(--color-primary-soft); }
.cw-tag--warn { color: var(--color-status-action); background: var(--color-status-action-soft); }
.cw-thumb { flex: 0 0 40px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--color-text-subtle); background: repeating-linear-gradient(45deg, #F4F7FA, #F4F7FA 6px, #EBF0F5 6px, #EBF0F5 12px); }
.cw-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cw-tile { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--color-border); border-radius: 16px; background: #fff; box-shadow: var(--shadow-sm); color: var(--color-text); }
.cw-tile b { font-size: 13px; }
.cw-tile small { font-size: 11px; color: var(--color-text-muted); }
.cw-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cw-res.is-crit { border-color: var(--color-emergency-border); box-shadow: 0 0 0 3px rgba(193, 39, 45, 0.07); }
.cw-res.is-out { background: #FFFCF4; }
.cw-res__top { display: flex; align-items: center; gap: 10px; }
.cw-res__top b { display: block; font-size: 13.5px; }
.cw-res__top small { display: block; font-size: 11.5px; color: var(--color-text-muted); }
.cw-warnbox { display: flex; gap: 8px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-size: 13px; color: #7A2F33; background: linear-gradient(135deg, #FDECEC, #FFF5F5); border: 1px solid var(--color-emergency-border); }
.cw-printable { border-style: dashed; }
.cw-rxhead { display: flex; flex-direction: column; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 2px solid var(--color-primary); }
.cw-rxhead b { font-size: 15px; color: var(--color-primary-dark); }
.cw-rxhead small { font-size: 11.5px; color: var(--color-text-muted); }
.cw-rxlist { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.7; }
.cw-links { display: flex; flex-wrap: wrap; gap: 14px; }
.cw-act3 { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 8px; }
.cw-stepper { display: flex; gap: 4px; margin: 2px 0 10px; }
.cw-stepper span { flex: 1; display: flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; color: var(--color-text-subtle); }
.cw-stepper i { flex: 0 0 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-style: normal; font-size: 10px; background: #EEF2F6; }
.cw-stepper .is-done { color: var(--color-primary-dark); }
.cw-stepper .is-done i { color: #fff; background: var(--color-primary); }
.cw-stepper .is-now { color: var(--color-text); }
.cw-stepper .is-now i { color: #fff; background: var(--color-secondary); }
.cw-filter { display: flex; gap: 8px; align-items: center; }
.cw-filter .gv-seg { flex: 0 0 auto; }
.cw-filter .select { flex: 1; min-width: 0; height: 40px; }
.cw-qhead { display: grid; grid-template-columns: repeat(3, 1fr) 1.4fr; gap: 6px; align-items: center; padding: 10px; border: 1px solid var(--color-border); border-radius: 18px; background: #fff; box-shadow: var(--shadow-sm); }
.cw-qhead div, .cw-qhead a { display: flex; flex-direction: column; align-items: center; color: var(--color-text); border-radius: 12px; padding: 2px 0; }
.cw-qhead a.is-on { background: var(--color-primary-50, #E6F6F3); }
button.cw-tile { text-align: left; font: inherit; cursor: pointer; }
.cw-qhead strong { font-size: 20px; line-height: 1.1; }
.cw-qhead span { font-size: 10.5px; font-weight: 700; color: var(--color-text-muted); }
.cw-qhead .btn { height: 42px; padding: 0 10px; font-size: 13px; }
.cw-qrow { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--color-border); border-radius: 16px; background: #fff; color: var(--color-text); box-shadow: var(--shadow-sm); }
.cw-qrow + .cw-qrow { margin-top: 8px; }
.cw-qrow b { display: block; font-size: 14px; }
.cw-qrow small { display: block; font-size: 11.5px; color: var(--color-text-muted); }
.cw-qrow.is-emerg { border-color: var(--color-emergency-border); background: linear-gradient(90deg, #FFF6F6, #fff 40%); }
.cw-flags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.cw-wait { align-self: center; font-size: 11px; color: var(--color-text-subtle); }
.cw-beds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.cw-bed { display: flex; flex-direction: column; gap: 2px; padding: 8px 6px; border: 1.5px solid; border-radius: 12px; font: inherit; text-align: center; cursor: pointer; background: #fff; }
.cw-bed b { font-size: 12.5px; }
.cw-bed small { font-size: 10px; font-weight: 700; }
.cw-bed.is-available { border-color: #9EDDD2; color: var(--color-primary-deep); }
.cw-bed.is-occupied { border-color: #E3EAF2; color: var(--color-text-subtle); background: #F4F7FA; }
.cw-bed.is-cleaning { border-color: #F1D9A6; color: var(--color-status-action); background: var(--color-status-action-soft); }
.cw-bed.is-reserved { border-color: #CFD8EE; color: var(--color-secondary); background: var(--color-info-soft); }
.cw-bed.is-pick, .cw-bed.is-mine { box-shadow: 0 0 0 3px var(--color-primary-tint-strong); border-color: var(--color-primary); }
.cw-bed:disabled { cursor: not-allowed; }
.cw-admsteps { grid-template-columns: repeat(4, 1fr); }
.gv-tl.is-pending > i { background: #C9D3DE; box-shadow: 0 0 0 3px #EEF2F6; }
/* referral */
.rf-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 12px; border-radius: 12px; font-size: 12px; color: #fff; background: rgba(255, 255, 255, 0.14); }
.rf-bar b { font-size: 13px; }
.rf-bar .gv-pill { margin-left: auto; }
.rf-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 8px; }
.rf-tile { display: flex; flex-direction: column; gap: 2px; padding: 12px 10px; border: 1px solid var(--color-border); border-radius: 16px; background: #fff; box-shadow: var(--shadow-sm); color: var(--color-text); }
.rf-tile strong { font-size: 20px; line-height: 1.1; color: var(--color-primary-dark); }
.rf-tile span { font-size: 11px; font-weight: 700; color: var(--color-text-muted); }
.rf-tile.is-on { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-tint-strong); }
.rf-table { padding: 6px; overflow-x: auto; }
.rf-table table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.rf-table th { padding: 6px; font-size: 10px; text-align: left; color: var(--color-text-muted); white-space: nowrap; }
.rf-table td { padding: 8px 6px; border-top: 1px solid #EEF2F6; vertical-align: top; }
.rf-table tr[data-open] { cursor: pointer; }
.rf-doc { flex-direction: row; align-items: center; gap: 10px; cursor: pointer; }
.rf-doc b { display: block; font-size: 13.5px; }
.rf-doc small { display: block; font-size: 11.5px; color: var(--color-text-muted); }
.rf-jr { color: var(--color-text); }
.rf-prog { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.rf-prog i { height: 6px; border-radius: 6px; background: #E6EDF4; }
.rf-prog i.is-on { background: linear-gradient(90deg, var(--color-primary-bright), var(--color-primary-dark)); }

.cw-bar--many { flex-wrap: wrap; row-gap: 8px; }
.cw-bar--many .btn--outline { flex: 1 1 0; min-width: 0; height: 38px; min-height: 38px; padding: 0 6px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-bar--many .btn--primary { order: 9; flex: 1 0 100%; }

.rf-docpick { flex: 1; display: flex; align-items: center; gap: 10px; padding: 0; border: 0; font: inherit; text-align: left; color: var(--color-text); background: none; cursor: pointer; }
.rf-radio { flex: 0 0 20px; height: 20px; border: 2px solid var(--color-border-strong); border-radius: 50%; }
.rf-doc.is-on { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-tint-strong); }
.rf-doc.is-on .rf-radio { border: 6px solid var(--color-primary); }

/* Phase 3 audit · doc row actions (F02 01 Open Bill / View Visit, F02 07 Open Patient, F02 24 Open Request / Assign Staff / Contact Ward) */
.hm-row__acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hm-ract { display: inline-flex; align-items: center; min-height: 28px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--color-border); background: #fff; color: var(--color-primary-dark); font-size: 12px; font-weight: 600; line-height: 1.2; cursor: pointer; }
.hm-ract:hover { background: var(--color-primary-tint); }
.hm-ract:first-child { background: var(--color-primary); border-color: transparent; color: var(--color-primary-contrast); }

/* Phase 4 · records, certificates, consent, diet */
.mr-page { position: relative; margin: 10px 0; padding: 22px 18px; min-height: 180px; border: 1px solid var(--color-border); border-radius: 12px; background: #fff; display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
.mr-page b { color: var(--color-primary-dark); }
.mr-page i { margin-top: auto; font-style: normal; font-size: 12px; color: var(--color-text-muted, #64748b); }
.mr-page.is-wm::after, .mr-cert.is-wm::after { content: attr(data-wm); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 800; letter-spacing: 4px; color: rgba(220, 38, 38, .13); transform: rotate(-24deg); pointer-events: none; }
.mr-cert { position: relative; overflow: hidden; }
.mr-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.mr-thumb { width: 52px; height: 68px; border-radius: 8px; border: 1px solid var(--color-border); background: linear-gradient(180deg, #fff 0, #f1f5f9 100%); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--color-primary-dark); }
.mr-src { display: flex; align-items: center; gap: 4px; margin: -4px 0 8px; font-size: 11px; color: var(--color-primary-dark); }
.mr-sign { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--color-border); font-size: 12px; }
.mr-qr { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 8px; background: var(--color-primary-tint); color: var(--color-primary-dark); }
.mr-tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.mr-tbl th, .mr-tbl td { padding: 6px 4px; border-bottom: 1px solid var(--color-border); text-align: left; vertical-align: top; }
.mr-pad { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.mr-pad .input { flex: 1; font-family: "Segoe Script", "Brush Script MT", cursive; }
.mr-readable h3 { margin: 4px 0 8px; font-size: 18px; }
.gv-card.is-ro { opacity: .85; }
.gv-card.is-ro .input, .gv-card.is-ro .select { pointer-events: none; background: #f8fafc; }
.mr-lang { margin: 6px 0 10px; font-size: 18px; color: var(--color-primary-dark); }

/* Phase 5 · F27 / D8 live bed map (state colours follow the bed state machine) */
.wd-legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.wd-leg { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--color-border); background: #fff; }
.wd-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.wd-bed { position: relative; display: flex; flex-direction: column; gap: 1px; padding: 9px 8px; min-height: 64px; border-radius: 14px; border: 1.5px solid var(--color-border); background: #fff; color: var(--color-text); text-decoration: none; box-shadow: var(--shadow-sm); cursor: pointer; }
.wd-bed b { font-size: 14px; }
.wd-bed small { font-size: 11px; font-weight: 600; }
.wd-bed i { font-style: normal; font-size: 11px; color: var(--color-text-muted, #64748b); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wd-bed em { position: absolute; top: 6px; right: 6px; font-style: normal; font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 6px; background: #fde68a; color: #92400e; }
.wd-bed input { position: absolute; opacity: 0; pointer-events: none; }
.wd-bed:has(input:checked) { outline: 3px solid var(--color-primary); outline-offset: 1px; }
.wd-bed.is-off { opacity: .55; cursor: not-allowed; }
.is-available { border-color: #34d399; } .wd-bed.is-available small, .wd-leg.is-available { color: #047857; }
.wd-leg.is-available, .wd-bed.is-available { background: #ecfdf5; }
.wd-bed.is-occupied, .wd-leg.is-occupied { background: #eff6ff; border-color: #93c5fd; color: #1e3a8a; }
.wd-bed.is-reserved, .wd-leg.is-reserved { background: #fffbeb; border-color: #fcd34d; color: #92400e; }
.wd-bed.is-cleaning-pending, .wd-leg.is-cleaning-pending, .wd-bed.is-cleaning, .wd-leg.is-cleaning { background: #fff7ed; border-color: #fdba74; color: #9a3412; }
.wd-bed.is-inspection, .wd-leg.is-inspection { background: #f5f3ff; border-color: #c4b5fd; color: #5b21b6; }
.wd-bed.is-blocked, .wd-leg.is-blocked { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
/* Patient context bar used inside the page body (Phase 5 bed / IPD screens) */
.gv-body > .rf-bar { margin: 0 0 12px; color: var(--color-text); background: #fff; border: 1px solid var(--color-border); box-shadow: var(--shadow-sm); }
.gv-body > .rf-bar span { color: var(--color-text-muted, #64748b); }

/* Admin Home · onboarding reminder until go-live */
.hm-onbcard { display: flex; align-items: center; gap: 12px; margin: 12px 0 14px; padding: 12px 14px; border-radius: 16px; background: #fffbeb; border: 1px solid #fcd34d; color: var(--color-text); text-decoration: none; box-shadow: var(--shadow-sm); }
.hm-onbcard b { display: block; font-size: 14px; color: #92400e; }
.hm-onbcard small { display: block; font-size: 12px; color: var(--color-text-muted, #64748b); margin-top: 2px; }
.hm-onbcard .hm-ring { flex: 0 0 auto; width: 46px; height: 46px; }
.hm-onbcard .btn { flex: 0 0 auto; white-space: nowrap; }
.hm-onbcard .hm-ring span { width: 36px; height: 36px; }
/* While a pop-up sheet is open, messages show at the top so they never cover the sheet's buttons */
.device:has(.hm-sheet-wrap.is-open) .toast { top: calc(var(--statusbar-height, 44px) + 12px); bottom: auto; transform: translateY(calc(-1 * var(--space-2))); }
.device:has(.hm-sheet-wrap.is-open) .toast.is-visible { transform: translateY(0); }

/* ===== Login & 3-step registration · clearer structure (same flow) ===== */
/* Labelled stepper: every step name is visible, current step highlighted */
.reg-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 2px; padding: 0; list-style: none; counter-reset: none; }
.reg-steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--color-text-muted, #64748b); text-align: center; }
.reg-steps li::before { content: ""; position: absolute; top: 12px; left: calc(-50% + 16px); right: calc(50% + 16px); height: 2px; background: var(--color-border); }
.reg-steps li:first-child::before { display: none; }
.reg-steps li.is-done::before, .reg-steps li.is-now::before { background: var(--color-primary); }
.reg-steps i { position: relative; z-index: 1; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-style: normal; font-size: 12px; font-weight: 700; color: var(--color-text-muted, #64748b); background: #fff; border: 2px solid var(--color-border); }
.reg-steps li.is-done i { color: #fff; background: var(--color-primary); border-color: var(--color-primary); }
.reg-steps li.is-now i { color: #fff; background: var(--color-primary-dark); border-color: var(--color-primary-dark); box-shadow: 0 0 0 4px var(--color-primary-soft); }
.reg-steps li.is-now span { color: var(--color-primary-dark); }
/* Section cards */
.onb .form { gap: 14px; }
.reg-card { display: flex; flex-direction: column; gap: 12px; padding: 14px; border: 1px solid var(--color-border); border-radius: 18px; background: #fff; box-shadow: var(--shadow-sm); }
.reg-card__head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--color-border); }
.reg-card__head b { display: block; font-size: 15px; color: var(--color-text); }
.reg-card__head small { display: block; font-size: 12px; color: var(--color-text-muted, #64748b); margin-top: 1px; }
.reg-card__ico { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; color: var(--color-primary-dark); background: var(--color-primary-soft); }
.reg-card .field { margin: 0; }
.reg-card .grid-2 { gap: 10px; }
.reg-star { color: #dc2626; }
/* Mobile + country code + Send OTP on one aligned line */
.reg-otp-row { align-items: stretch; }
.reg-otp-row .input, .reg-otp-row .btn { height: 48px; }
.reg-otp-row .btn { flex: 0 0 auto; padding: 0 16px; border-radius: 14px; white-space: nowrap; }
.reg-cc { display: grid; place-items: center; flex: 0 0 auto; padding: 0 12px; border: 1px solid var(--color-border); border-radius: 14px; font-weight: 600; color: var(--color-text); background: var(--color-bg); }
.reg-code { letter-spacing: 6px; text-align: center; font-weight: 700; }
/* Documents */
.reg-docs { display: flex; flex-direction: column; gap: 8px; }
.reg-doc__ico { display: grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px; border-radius: 10px; color: var(--color-text-muted, #64748b); background: var(--color-bg); }
.hm-doc.is-done .reg-doc__ico { color: #047857; background: #ecfdf5; }
.reg-req, .reg-opt { margin-left: 6px; padding: 1px 6px; border-radius: 6px; font-style: normal; font-size: 10px; font-weight: 700; vertical-align: 1px; }
.reg-req { color: #b91c1c; background: #fef2f2; }
.reg-opt { color: var(--color-text-muted, #64748b); background: var(--color-bg); }
.hm-doc .btn { display: inline-flex; align-items: center; gap: 4px; }
.reg-switches .hm-switch:first-child { padding-top: 0; }
.reg-note { margin: 0; }
/* Bottom bar: say what comes next */
.reg-action { flex-direction: column; gap: 6px; }
.reg-next { margin: 0; font-size: 12px; font-weight: 600; text-align: center; color: var(--color-text-muted, #64748b); }
/* Login: form as one card, method switch labelled and evenly split */
.auth-form { padding: 16px; border: 1px solid var(--color-border); border-radius: 20px; background: #fff; box-shadow: var(--shadow-sm); }
.auth-form .hm-seg { grid-template-columns: 1fr 1fr; }
.auth-method { margin: 0; }
.auth-form .hm-hosp { margin: 0; }
.hm-doc b { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.reg-req, .reg-opt { margin-left: 0; }
.reg-card .hm-steps { padding: 0; border: 0; box-shadow: none; background: none; }
.reg-stack { display: flex; flex-direction: column; gap: 12px; }
.auth-method { display: flex; flex-direction: column; align-items: stretch; text-align: left; }
.auth-method .hm-seg { width: 100%; }
.auth-method { width: 100%; align-self: stretch; }
.auth-form .auth-method { padding: 0; }

.reg-card { padding: 12px; gap: 10px; }
.reg-card__head { padding-bottom: 8px; }
.reg-action { gap: 0; }
/* Setup reminder · compact */
.hm-onbcard { gap: 10px; margin: 10px 0 12px; padding: 8px 10px; border-radius: 14px; }
.hm-onbcard .hm-ring { width: 38px; height: 38px; }
.hm-onbcard .hm-ring span { width: 30px; height: 30px; font-size: 10px; }
.hm-onbcard b { font-size: 13px; line-height: 1.25; }
.hm-onbcard small { font-size: 11px; line-height: 1.3; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-onbcard .grow { min-width: 0; }
.hm-onbcard .btn { padding: 6px 12px; min-height: 0; height: 32px; font-size: 12px; }
/* Admin Home · swipeable alert slot (emergency strip + setup reminder) */
.hm-slider { margin: 10px 0 12px; }
.hm-slider__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 16px; }
.hm-slider__track::-webkit-scrollbar { display: none; }
.hm-slider__item { flex: 0 0 100%; scroll-snap-align: start; display: flex; }
.hm-slider__item > * { flex: 1; margin: 0 !important; min-width: 0; }
.hm-slider__dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.hm-slider__dot { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 999px; background: var(--color-border); cursor: pointer; transition: width .2s, background .2s; }
.hm-slider__dot.is-on { width: 18px; background: var(--color-primary); }
.hm-onbcard b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-slider__item { min-width: 0; width: 100%; }
.hm-slider__item > * { width: 100%; max-width: 100%; box-sizing: border-box; overflow: hidden; }
.hm-slider__item .grow { min-width: 0; overflow: hidden; }
.hm-slider .hm-emstrip .grow > b, .hm-slider .hm-emstrip .grow > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-slider .hm-emstrip, .hm-slider .hm-onbcard { min-height: 60px; }
/* Pop-up headers: breathing room between label, title and subtitle (all sheets) */
.hm-sheet__head .hm-eyebrow { margin: 0 0 4px; }
.hm-sheet__head h2 { margin: 0 0 4px; line-height: 1.25; }
.hm-sheet__head .hm-sub { margin: 0; line-height: 1.45; }
/* Second-step OTP pop-up */
.hm-otpbox { display: flex; flex-direction: column; gap: 14px; padding: 16px; }
.hm-otpbox__to { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--color-bg); }
.hm-otpbox__to small { display: block; font-size: 12px; color: var(--color-text-muted, #64748b); }
.hm-otpbox__to b { display: block; font-size: 15px; margin-top: 2px; letter-spacing: .02em; }
.hm-otpbox__ico { display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; color: var(--color-primary-dark); background: var(--color-primary-soft); }
.hm-otpbox__field { display: flex; flex-direction: column; gap: 6px; }
.hm-otpbox .hm-otp2 { height: 52px; font-size: 20px; }
.hm-otp2::placeholder { letter-spacing: normal; font-size: 15px; font-weight: 500; }
.hm-otpbox__meta { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--color-text-muted, #64748b); }
.hm-otpbox__trust { margin: 0; padding-top: 12px; border-top: 1px solid var(--color-border); }
.hm-sheet .hm-twobtn { gap: 10px; margin-top: 10px; }
.hm-sheet__head { padding-top: 8px; margin-bottom: 4px; }
.hm-sheet__head .hm-eyebrow { margin-bottom: 6px; }
.hm-sheet__head h2 { margin-bottom: 6px; }
/* Sideways rows: grab cursor, no text selection or link ghost while dragging */
html.is-hdragging, html.is-hdragging * { cursor: grabbing !important; user-select: none !important; }
html.is-hdragging a, html.is-hdragging img { -webkit-user-drag: none; }
.is-dragging { scroll-snap-type: none !important; scroll-behavior: auto !important; }
/* Bed / room code badge in list rows: one line, same width on every row so names line up */
.gv-row__ico--code { flex: 0 0 58px; width: 58px; height: 40px; padding: 0 4px; font-size: 12px; font-weight: 700; line-height: 1; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* One-time result after an action (e.g. nurse assigned): green card + the changed row highlighted */
.ipd-flash { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.ipd-flash b { display: block; }
.of-li.is-flash { background: #ecfdf5; border-radius: 12px; box-shadow: inset 3px 0 0 #10b981; animation: ipdFlash 1.6s ease-out 1; }
@keyframes ipdFlash { from { background: #a7f3d0; } to { background: #ecfdf5; } }
.gv-result.ipd-flash { flex-direction: row; align-items: center; margin-top: 0; } .ipd-flash > svg { flex: 0 0 auto; width: 22px; height: 22px; padding: 4px; border-radius: 50%; color: #fff; background: #10b981; }
/* A single summary tile: one compact line ("05 Patients"), not a half-empty box */
.rf-tiles:has(> :only-child) { display: flex; }
.rf-tiles > .rf-tile:only-child { flex: 1; flex-direction: row; align-items: baseline; gap: 8px; padding: 10px 14px; }
.rf-tiles > .rf-tile:only-child strong { font-size: 18px; }

/* Patient suggestions under a UHID field */
.pp-wrap { position: relative; }
.pp-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% - 2px); max-height: 264px; overflow-y: auto; padding: 4px; border: 1px solid var(--color-border); border-radius: 14px; background: #fff; box-shadow: 0 10px 28px rgba(15, 23, 42, .14); }
.pp-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: none; font: inherit; text-align: left; cursor: pointer; }
.pp-item:hover, .pp-item.is-on { background: var(--color-primary-soft); }
.pp-item b { display: block; font-size: 14px; color: var(--color-text); }
.pp-item small { display: block; font-size: 12px; color: var(--color-text-muted, #64748b); }
.pp-av { display: grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; font-size: 12px; font-weight: 700; color: var(--color-primary-dark); background: var(--color-primary-soft); }
.pp-empty { margin: 0; padding: 10px; font-size: 12px; color: var(--color-text-muted, #64748b); }
.pp-who { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; font-weight: 600; color: #047857; }

/* OTP · 6 separate boxes (hms.js otpBoxes) — reuses the .otp box style */
.hm-otp6 { width: 100%; gap: 8px; }
.hm-otp6 input { height: 52px; min-width: 0; padding: 0; font-size: 22px; color: var(--color-text); caret-color: var(--color-primary); }
.hm-otp6 input.is-filled { border-color: var(--color-primary); background: var(--color-primary-soft); }
.hm-otp6.is-off input { background: var(--color-bg); color: var(--color-text-muted); }
.hm-otp6-src { display: none !important; }
/* rows that had the code box next to a button: boxes on their own line, button below */
.hm-otp-row:has(.hm-otp6), .of-otp:has(.hm-otp6) { display: flex; flex-wrap: wrap; gap: 8px; }
.hm-otp-row:has(.hm-otp6) .hm-otp6, .of-otp:has(.hm-otp6) .hm-otp6 { flex: 1 1 100%; }
.hm-otp-row:has(.hm-otp6) .btn, .of-otp:has(.hm-otp6) .btn { flex: 1 1 0; }

/* long record IDs (e.g. VAC-2026-018) stay on one line in table first columns */
.mr-tbl td:first-child { white-space: nowrap; }

/* My Profile */
.hm-profile-page { display: flex; flex-direction: column; gap: 12px; }
.hm-profile-page > .hm-card { margin: 0; }
.hm-phero { border-radius: 20px; padding: 18px 16px 14px; color: #fff; background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%); box-shadow: 0 10px 24px rgba(15, 118, 110, .22); }
.hm-phero__top { display: flex; gap: 14px; align-items: center; }
.hm-phero__av { flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; font-weight: 700; color: #0f766e; background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .25); }
.hm-phero__id { min-width: 0; }
.hm-phero__id h2 { margin: 0; font-size: 19px; line-height: 1.25; color: #fff; }
.hm-phero__id p { margin: 2px 0 8px; font-size: 13px; opacity: .9; }
.hm-phero__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.hm-phero__tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: rgba(255, 255, 255, .18); }
.hm-phero__tag i { width: 7px; height: 7px; border-radius: 50%; background: #bbf7d0; }
.hm-phero__tag.is-suspended i, .hm-phero__tag.is-inactive i { background: #fecaca; }
.hm-phero__stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .25); text-align: center; }
.hm-phero__stats div + div { border-left: 1px solid rgba(255, 255, 255, .25); }
.hm-phero__stats b { display: block; font-size: 17px; }
.hm-phero__stats small { display: block; font-size: 11.5px; color: rgba(255, 255, 255, .88) !important; }
.hm-pcard__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.hm-pcard__head h3 { margin: 0; font-size: 15px; }
.hm-pkv { display: flex; align-items: center; gap: 10px; padding: 8px 0; min-height: 0; line-height: 1.35; border-top: 1px solid var(--color-border); font-size: var(--font-size-sm); }
.hm-pcard__head + .hm-pkv { border-top: 0; }
.hm-pkv .icon { color: var(--color-text-muted); flex: none; }
.hm-pkv__k { color: var(--color-text-muted); flex: none; width: 84px; }
.hm-pkv__v { flex: 1; min-width: 0; text-align: right; font-weight: 600; overflow-wrap: anywhere; }
.hm-ptiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 6px; }
.hm-ptile { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 14px; background: var(--color-primary-soft, #e6f4f1); color: var(--color-text); text-decoration: none; }
.hm-ptile .icon { color: var(--color-primary, #0f766e); margin-bottom: 4px; }
.hm-ptile b { font-size: 13.5px; }
.hm-ptile small { font-size: 11.5px; color: var(--color-text-muted); }
.hm-accg__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.hm-accg__count { font-size: 12.5px; font-weight: 700; }
.hm-mtags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hm-mtag { padding: 5px 10px; border-radius: 10px; font-size: 12px; font-weight: 500; border: 1px solid var(--color-border); background: var(--color-surface, #fff); color: var(--color-text); }
.hm-mtags:not(.is-open) .hm-mtag.is-more { display: none; }
.hm-mtag--toggle { cursor: pointer; font-weight: 700; color: var(--color-primary, #0f766e); border-style: dashed; min-height: 30px; }
.hm-pcard .hm-pkv p, .hm-pkv span { margin: 0; }

/* report tiles: number stays big, unit words sit small under it, long text values shrink */
.rf-tile { min-width: 0; }
.rf-tile strong { overflow-wrap: anywhere; }
.rf-tile__unit { font-size: 11px; font-weight: 600; color: var(--color-text-muted); line-height: 1.2; }
.rf-tile--text strong { font-size: 14px; line-height: 1.25; }
.rf-tile span { overflow-wrap: break-word; hyphens: auto; }
.rf-tile { padding-left: 8px; padding-right: 8px; }
.rf-tile__sub { font-size: 10.5px; font-weight: 600; color: var(--color-primary-dark); opacity: .8; }
.rf-tiles:has(.rf-tile--text) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Notifications page (bell): FYI feed · unread rows keep the primary bar and a dot, read rows go quiet */
.hm-hbtn .icon-btn__count { top: -4px; right: -4px; box-shadow: 0 0 0 2px #0F8B7E; }
.hm-nf-chips { margin-bottom: 4px; }
.hm-nrow { align-items: flex-start; }
.hm-nrow .hm-lead { flex-basis: 40px; width: 40px; height: 40px; }
.hm-nrow:not(.is-unread) { background: #FAFCFD; box-shadow: none; }
.hm-nrow:not(.is-unread)::before { background: var(--color-border-strong); }
.hm-nrow:not(.is-unread) .hm-row__top strong { font-weight: 600; color: var(--color-text-muted); }
.hm-nrow .hm-row__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-ndot { flex: 0 0 9px; width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--color-primary); }

/* Notifications · GP app Notification Centre look (teal brand): text chips, unread summary with module dot counts,
   one white card per notification (tinted tile, dot + module label, time, 15/800 title, muted text, action pill) */
.nf-bar .appbar__title { text-align: left; }
.nf-bar .appbar__title h1 { font-size: 18px; font-weight: 800; letter-spacing: .005em; }
.nf-bar .nf-readall { border: 1.5px solid #D3E6E2; background: #fff; color: var(--color-text); cursor: pointer; }
.nf-bar .nf-readall .icon { width: 18px; height: 18px; }
.nf-page { padding-top: 12px; }
.nf-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; }
.nf-chips::-webkit-scrollbar { display: none; }
.nf-chip { flex: none; height: 32px; padding: 0 14px; border: 1.5px solid #D3E6E2; border-radius: 999px; background: #fff; color: var(--color-text); font-family: inherit; font-size: 12.5px; font-weight: 700; line-height: 1; white-space: nowrap; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.nf-chip.is-on { background: var(--color-primary); border-color: var(--color-primary); color: #fff; box-shadow: 0 4px 10px rgba(23, 169, 153, .24); }
.nf-sum { display: flex; align-items: center; gap: 10px; margin: 12px 2px 0; min-height: 20px; }
.nf-sum__n { flex: none; font-size: 12.5px; font-weight: 700; color: var(--color-text); }
.nf-sum__n.is-quiet { color: var(--color-text-muted); }
.nf-sum__dots { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nf-sum__f { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nf-clear { flex: none; padding: 0; border: 0; background: none; font-family: inherit; font-size: 12.5px; font-weight: 700; color: var(--color-primary-dark); cursor: pointer; }
.nf-st { display: inline-flex; align-items: center; gap: 5px; min-width: 0; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; line-height: 1.2; color: var(--tc, var(--color-primary-dark)); white-space: nowrap; font-variant-numeric: tabular-nums; }
.nf-st::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.nf-day { display: flex; align-items: center; gap: 8px; margin: 20px 2px 10px; font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--color-text-subtle); }
.nf-day::before { content: ""; flex: none; width: 14px; height: 2px; border-radius: 2px; background: var(--color-primary); opacity: .55; }
.nf-list { display: flex; flex-direction: column; gap: 10px; }
.nf-card { position: relative; display: flex; gap: 12px; padding: 13px 14px; border: 1px solid #E3EAF0; border-radius: 20px; background: #fff; box-shadow: var(--shadow-sm); color: inherit; text-decoration: none; transition: transform .12s ease; }
.nf-card:active { transform: scale(.99); }
.nf-card.is-unread { background: #FBFEFD; border-color: #D3E6E2; }
.nf-card.is-sos { background: #FFF7F7; border-color: #F2C9CB; }
.nf-card__dot { position: absolute; top: 15px; right: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--color-primary); }
.nf-card.is-sos .nf-card__dot { background: var(--color-emergency); }
.nf-card__tile { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--tb); color: var(--tc); }
.nf-card__tile .icon { width: 18px; height: 18px; }
.nf-card__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nf-card__top { display: flex; align-items: center; gap: 8px; padding-right: 16px; }
.nf-card__top .nf-st span, .nf-card__top .nf-st { overflow: hidden; text-overflow: ellipsis; }
.nf-card__time { margin-left: auto; flex: none; font-size: 11.5px; font-weight: 600; color: var(--color-text-subtle); white-space: nowrap; }
.nf-card__title { margin-top: 6px; font-size: 15px; font-weight: 800; line-height: 1.35; color: var(--color-text); }
.nf-card__text { margin-top: 2px; font-size: 12.5px; line-height: 1.5; color: var(--color-text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.nf-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.nf-tag { padding: 1px 6px; border: 1px solid #D3E6E2; border-radius: 6px; background: #fff; font-size: 11px; font-weight: 800; color: var(--color-primary-dark); }
.nf-card__act { display: flex; margin-top: 10px; }
.nf-act { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px 0 9px; border: 1.5px solid #D3E6E2; border-radius: 999px; background: #fff; font-size: 12.5px; font-weight: 700; color: var(--color-primary-dark); white-space: nowrap; }
.nf-act .icon { width: 13px; height: 13px; }
.nf-card.is-unread .nf-act { border-color: transparent; background: var(--gradient-button); color: #fff; box-shadow: 0 6px 14px rgba(23, 169, 153, .26); }
.nf-card.is-sos .nf-act { background: var(--color-emergency); box-shadow: none; }
.nf-none { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 16px; padding: 32px 24px; border: 1px solid #E3EAF0; border-radius: 20px; background: #fff; box-shadow: var(--shadow-sm); text-align: center; }
.nf-none__tile { width: 52px; height: 52px; margin-bottom: 8px; border: 1.5px solid #D3E6E2; border-radius: 14px; display: grid; place-items: center; background: #fff; color: var(--color-text-muted); }
.nf-none__tile .icon { width: 22px; height: 22px; }
.nf-none b { font-size: 15px; font-weight: 800; color: var(--color-text); }
.nf-none small { max-width: 260px; font-size: 12.5px; line-height: 1.5; color: var(--color-text-muted); }
.nf-go { margin-top: 12px; padding: 6px 14px; border: 1.5px solid #D3E6E2; border-radius: 999px; background: #fff; font-family: inherit; font-size: 12.5px; font-weight: 700; color: var(--color-primary-dark); cursor: pointer; }
/* Search page */
.sx-page { display: flex; flex-direction: column; gap: 4px; }
.sx-box { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 8px 0 16px; border: 1.5px solid #dbe3ec; border-radius: 16px; background: #fff; box-shadow: 0 4px 14px rgba(15, 23, 42, .06); }
.sx-box:focus-within { border-color: #dbe3ec; box-shadow: 0 4px 14px rgba(15, 23, 42, .06); }
.sx-box input:focus, .sx-box input:focus-visible { outline: none; box-shadow: none; }
.sx-box > .icon { color: #0f766e; flex: none; }
.sx-box input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: 500 15px inherit; color: #0f172a; }
.sx-box input::-webkit-search-cancel-button { display: none; }
.sx-x { flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; display: grid; place-items: center; background: #f1f5f9; color: #475569; cursor: pointer; }
.sx-scopes { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 8px -16px 4px; padding: 0 16px 2px; }
.sx-scopes::-webkit-scrollbar { display: none; }
.sx-scope { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px; border: 1px solid #e3e9f0; border-radius: 999px; background: #fff; font: 600 12.5px inherit; color: #475569; cursor: pointer; }
.sx-scope.is-on { border-color: #0f766e; background: #0f766e; color: #fff; }
.sx-sec { margin-top: 14px; }
.sx-sec__h { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 8px; }
.sx-sec__h span { font-size: 13px; font-weight: 700; color: #0f172a; }
.sx-sec__h button, .sx-sec__h a { border: 0; background: none; padding: 0; font: 600 12.5px inherit; color: #0f766e; cursor: pointer; text-decoration: none; }
.sx-recent { display: flex; flex-wrap: wrap; gap: 8px; }
.sx-rchip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid #e3e9f0; border-radius: 10px; background: #fff; font: 500 13px inherit; color: #334155; cursor: pointer; }
.sx-rchip .icon { color: #94a3b8; }
.sx-card { overflow: hidden; border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
.sx-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; color: inherit; text-decoration: none; }
.sx-row + .sx-row { border-top: 1px solid #eef2f6; }
.sx-row > .icon { color: #cbd5e1; flex: none; }
.sx-av { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #0f766e; background: #e6f4f1; }
.sx-row__m { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sx-row__m b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-row__m small { font-size: 12px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 12px 8px; border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
.sx-mod { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 2px; color: #334155; text-decoration: none; text-align: center; }
.sx-mod__ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; }
.sx-mod small { font-size: 11px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sx-tip { display: flex; gap: 8px; align-items: flex-start; margin: 14px 4px 0; font-size: 12px; color: #64748b; }
.sx-tip .icon { flex: none; color: #94a3b8; }
.sx-count { margin: 10px 4px 2px; font-size: 12.5px; font-weight: 600; color: #64748b; }
.sx-none { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 44px 20px; text-align: center; }
.sx-none > span { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 6px; background: #f1f5f9; color: #94a3b8; }
.sx-none b { font-size: 15px; }
.sx-none small { font-size: 12.5px; color: #64748b; max-width: 260px; margin-bottom: 8px; }
.sx-n { font-style: normal; margin-left: 4px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #475569; background: #e2e8f0; }
.sx-row .badge--count { flex: none; }
.dash-body > .hm-linkcard[data-myhr] { margin-top: 12px; }

/* ---- OPD desk (hms-opd.js): client field order inside our cards and sheets ---- */
.op-card { display: flex; flex-direction: column; gap: 10px; }
.op-card .field { margin: 0; }
.op-card .grid-2 { gap: 10px; }
.op-gap { margin-top: 8px; }
.op-must { margin: 2px 0 0; font-size: var(--font-size-xs); color: var(--color-text-muted); text-align: center; }
.op-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.op-namerow { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 8px; }
.op-namerow--btn { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.op-namerow--btn .btn { white-space: nowrap; }
.op-age { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto; align-items: center; gap: 6px; }
.op-age b { font-size: var(--font-size-xs); color: var(--color-text-muted); }
.op-mob { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; }
.op-mob b { padding: 0 10px; font-size: var(--font-size-sm); color: var(--color-text-muted); }
.op-similar { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px dashed var(--color-status-action); border-radius: 14px; background: var(--color-status-action-soft); }
.op-similar .hm-sh-label { margin: 0; color: var(--color-status-action); }
.op-similar button { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--color-border); border-radius: 12px; font: inherit; text-align: left; background: #fff; cursor: pointer; }
.op-similar button b { display: block; font-size: var(--font-size-sm); }
.op-similar button small { font-size: var(--font-size-xs); color: var(--color-text-muted); }
.op-similar button em { font-style: normal; font-size: var(--font-size-xs); font-weight: 700; color: var(--color-primary-dark); }
.op-picks button { text-align: left; }
.op-hist { display: flex; flex-direction: column; gap: 6px; }
.op-hist div { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 10px; background: var(--color-bg); }
.op-hist b { font-size: var(--font-size-sm); }
.op-hist small { font-size: var(--font-size-xs); color: var(--color-text-muted); }
.op-kv { grid-template-columns: 108px 1fr; }
.op-photo { display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.op-file { display: block; margin-top: 4px; font-size: var(--font-size-xs); color: var(--color-text-muted); }
.op-net { font-weight: 800; color: var(--color-primary-dark); }
.op-paycard { border-style: dashed; background: var(--color-bg); }
.op-danger { background: var(--color-emergency); border-color: var(--color-emergency); }
.op-due strong { letter-spacing: 0.04em; }
.op-verify .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
/* services table → one card per service; ticked rows open the line fields */
.op-svcs { display: flex; flex-direction: column; gap: 8px; }
.op-svc { border: 1px solid var(--color-border); border-radius: 14px; background: #fff; }
.op-svc.is-on { border-color: var(--color-primary); background: var(--color-primary-tint, #F3FAF8); }
.op-svc__top { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; }
.op-svc__top input { width: 18px; height: 18px; accent-color: var(--color-primary); }
.op-svc__top b { display: block; font-size: var(--font-size-sm); line-height: 1.3; }
.op-svc__top small { font-size: var(--font-size-xs); color: var(--color-text-muted); }
.op-svc__top em { font-style: normal; font-weight: 800; font-size: var(--font-size-sm); color: var(--color-primary-dark); }
.op-svc__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 12px 12px; }
.op-svc__grid .field { margin: 0; }
.op-span2 { grid-column: span 2; }
.op-qty { display: flex; align-items: center; justify-content: space-between; gap: 6px; height: var(--btn-height, 44px); padding: 0 4px; border: 1px solid var(--color-field-border); border-radius: 12px; background: var(--color-field-bg); }
.op-qty b { font-size: var(--font-size-sm); }
/* lists: one card per row, the client's columns as two lines + actions */
.op-top { display: flex; align-items: center; gap: 10px; margin: 4px 0 8px; font-size: var(--font-size-sm); color: var(--color-text-muted); }
.op-top b { color: var(--color-text); }
.op-pend { display: flex; align-items: center; gap: 8px; width: 100%; margin-bottom: 8px; padding: 10px 12px; border: 1px solid var(--color-status-action); border-radius: 14px; font: inherit; font-size: var(--font-size-sm); text-align: left; color: var(--color-text); background: var(--color-status-action-soft); cursor: pointer; }
.op-pend span { flex: 1; }
.op-row { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--color-border); border-radius: 18px; background: #fff; }
.op-row__main { display: flex; align-items: flex-start; gap: 10px; }
.op-row__main .grow { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.op-row__main .grow b { font-size: var(--font-size-body); }
.op-row__main .grow small { font-size: var(--font-size-xs); color: var(--color-text-muted); overflow-wrap: anywhere; }
.op-row__side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.op-amt { font-size: var(--font-size-sm); white-space: nowrap; }
.op-row__acts { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 8px; border-top: 1px solid #F0F3F7; }
.op-act { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border: 1px solid var(--color-border); border-radius: 999px; font: inherit; font-size: var(--font-size-xs); font-weight: 700; color: var(--color-text); background: #fff; cursor: pointer; }
.op-act .icon { width: 14px; height: 14px; }
.op-act--danger { color: var(--color-emergency); border-color: var(--color-emergency-border, var(--color-emergency)); }
.op-filter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 6px; }
.op-filter .field { margin: 0; }
.op-filter .input, .op-filter .select { padding-left: 8px; padding-right: 8px; font-size: var(--font-size-xs); }
.gv-pill--mute { color: var(--color-text-muted); background: var(--color-bg); }
/* print views: case paper, bill, stickers */
.op-paper__h { display: flex; flex-direction: column; margin: 0 0 6px; text-align: center; }
.op-paper__h small { font-size: var(--font-size-xs); color: var(--color-text-muted); }
.op-paper__notes { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.op-paper__notes span { min-height: 54px; padding: 6px 8px; border: 1px dashed var(--color-border); border-radius: 10px; font-size: var(--font-size-xs); color: var(--color-text-muted); }
.op-stickers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.op-sticker { display: flex; flex-direction: column; gap: 2px; padding: 10px; border: 1px dashed var(--color-text-muted); border-radius: 10px; font-size: var(--font-size-xs); }
.op-sticker b { font-size: var(--font-size-sm); }
/* OPD / IPD Dashboard (Reception · client home screen): OPD ↔ IPD switch, filters, tinted rows, total */
.dd-seg { grid-template-columns: 1fr 1fr; margin-bottom: 10px; }
.dd-qa { margin-bottom: 10px; }
.dd-filter { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.dd-q { margin: 6px 0 4px; }
.dd-row { border-left-width: 4px; }
.dd-row--paid { border-left-color: var(--color-primary); }
.dd-row--partial, .dd-row--nobill { border-left-color: var(--color-status-action); }
.dd-row--due { border-left-color: var(--color-emergency); }
.dd-link { padding: 0; border: 0; font: inherit; font-weight: 700; color: var(--color-primary-dark); text-align: left; background: none; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.dd-total { display: grid; grid-template-columns: auto; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: center; gap: 8px; margin-top: 8px; padding: 12px; border-radius: 18px; background: var(--color-primary-soft); }
.dd-total__l { font-weight: 800; font-size: var(--font-size-sm); }
.dd-total span:not(.dd-total__l) { display: flex; flex-direction: column; min-width: 0; text-align: right; }
.dd-total small { font-size: var(--font-size-xs); color: var(--color-text-muted); }
.dd-total b { font-size: var(--font-size-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* doc-exact module homes: the rest of the sub-modules open with "Scroll for more submodules" */
.hm-scrollmore { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 44px; margin: 10px 0 4px; border: 1px dashed var(--color-border-strong, #cbd5e1); border-radius: 14px; background: #fff; font: 600 13px inherit; color: var(--color-primary, #0f766e); cursor: pointer; }
.hm-scrollmore .icon { transform: rotate(90deg); }
.hm-moremod { margin-top: 6px; }
.hm-moremod > .hm-menu-title { margin: 18px 4px 10px; }
.hm-scrollless .icon { transform: rotate(-90deg); }

/* All Modules · category sections with a tile grid (reference layout, our tones / icons) */
.hm-mgrid-page { padding-top: 4px; }
.hm-mgrid-sec { padding: 14px 0 16px; border-bottom: 1px solid var(--color-border); }
.hm-mgrid-sec:last-child { border-bottom: 0; }
.hm-mgrid-h { margin: 0 2px 12px; font-size: 15px; font-weight: 700; color: var(--color-text); }
.hm-mgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 6px; }
.hm-mtile { display: flex; flex-direction: column; align-items: center; gap: 7px; color: var(--color-text); text-decoration: none; text-align: center; }
.hm-mtile__ic { position: relative; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; box-shadow: 0 1px 2px rgba(16, 24, 40, .05); }
.hm-mtile__ic .icon { width: 24px; height: 24px; }
.hm-mtile__n { position: absolute; top: -6px; right: -8px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; font: 700 10.5px/20px inherit; font-style: normal; color: #fff; background: #ef4444; box-shadow: 0 0 0 2px #fff; }
.hm-mtile__off { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); padding: 1px 6px; border-radius: 999px; font: 700 9.5px/1.5 inherit; font-style: normal; color: #64748b; background: #e2e8f0; box-shadow: 0 0 0 2px #fff; }
.hm-mtile.is-off .hm-mtile__ic { opacity: .5; filter: grayscale(.6); }
.hm-mtile__l { font-size: 11.5px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hm-mtile__ic { color: var(--st-c, var(--color-primary)); background: var(--st-bg, var(--color-primary-soft, #e6f4f1)); }
/* All Modules · GP-app dashboard style: one clean white card, outlined minimal tiles, small count badge */
.hm-mgrid-card { padding: 16px 12px 14px; border: 1px solid var(--color-border); border-radius: 20px; background: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.hm-mgrid-card .hm-mgrid-sec { padding: 0; border: 0; }
.hm-mgrid-card .hm-mgrid-sec + .hm-mgrid-sec { margin-top: 16px; padding-top: 14px; border-top: 1px solid #eef2f6; }
.hm-mgrid-card .hm-mgrid-h { margin: 0 4px 12px; font-size: 14px; font-weight: 700; }
.hm-mgrid-card .hm-mgrid { gap: 14px 2px; }
.hm-mgrid-card .hm-mtile__ic { width: 50px; height: 50px; border-radius: 14px; background: #fff; border: 1.5px solid #e3e9f0; box-shadow: none; color: var(--st-c, var(--color-primary)); transition: transform .15s ease; }
.hm-mgrid-card .hm-mtile__ic .icon { width: 23px; height: 23px; stroke-width: 1.8; }
.hm-mgrid-card .hm-mtile:active .hm-mtile__ic { transform: scale(.94); }
.hm-mgrid-card .hm-mtile__l { font-size: 11.5px; font-weight: 700; line-height: 1.2; padding: 0 2px; }
.hm-mgrid-card .hm-mtile__n { top: -5px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px; display: grid; place-items: center; font-size: 9.5px; font-weight: 800; line-height: 1; box-shadow: 0 0 0 2px #fff; }
.hm-mgrid-card .hm-mtile.is-off .hm-mtile__ic { opacity: .45; filter: grayscale(1); }
.hm-mgrid-page { background: transparent; }
.hm-mgrid-card .hm-mtile__ic { background: var(--st-bg, #fff); border-color: var(--st-bg, #e3e9f0); }

/* ---- Nursing operations + admission-to-discharge (hms-nurse-ops-ui.js · 14 Nov nursing doc, ref 3–4) ---- */
.nops { display: flex; flex-direction: column; gap: 12px; padding-bottom: 16px; }
.nops .hm-search { margin-top: 0; }
.nops-pt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 16px; background: #fff; box-shadow: var(--shadow-sm); }
.nops-pt__av { flex: 0 0 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; font-size: 13px; font-weight: 800; color: var(--color-primary-dark); background: var(--color-primary-soft); }
.nops-pt b, .nops-head b { display: block; font-size: 13.5px; line-height: 1.25; }
.nops-pt small, .nops-head small { display: block; margin-top: 2px; font-size: 11.5px; line-height: 1.35; color: var(--color-text-muted); }
.nops-head { display: flex; align-items: center; gap: 10px; }
.nops-empty { align-items: center; text-align: center; color: var(--color-text-muted); }
.nops-empty .icon { color: var(--color-primary); }
.nops-empty b { font-size: 13.5px; color: var(--color-text); }
.nops-empty small { font-size: 11.5px; }
.nops-note { margin: 0; font-size: 11.5px; line-height: 1.4; color: var(--color-text-muted); }
.nops-red { color: var(--color-emergency); }
.nops-banner { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; }
.nops-info { color: var(--color-secondary); background: var(--color-info-soft); }
.nops-btnbar { display: flex; gap: 8px; align-items: center; }
.nops-btnbar .btn--block { flex: 1; }
.nops-btnbar--col { flex-direction: column; align-items: stretch; }
.nops-ta { min-height: 76px; padding-top: 10px; resize: vertical; }
.nops-chk { align-items: flex-start; }
.nops-chk b { display: block; font-size: 13px; }
.nops-chk small { display: block; font-size: 11px; color: var(--color-text-muted); }
.nops-checks { gap: 8px; }
/* bell */
.nops-bell { gap: 10px; padding: 12px; }
.nops-bell.is-crit { border-color: #F3C9C0; background: #FFFBFA; }
.nops-bell__top { display: flex; align-items: center; gap: 10px; width: 100%; padding: 0; border: 0; font: inherit; text-align: left; color: inherit; background: none; cursor: pointer; }
.nops-bell__top b { display: block; font-size: 13.5px; }
.nops-bell__top small { display: block; margin-top: 2px; font-size: 11.5px; color: var(--color-text-muted); }
.nops-bell__act { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.nops-who { flex: 1; font-size: 11.5px; font-weight: 600; color: var(--color-text-muted); }
.nops .gv-kv dt { display: inline-flex; align-items: center; gap: 6px; }
.nops-res { display: grid; gap: 8px; }
.nops-res__b { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border: 1px solid var(--st-bg); border-radius: 14px; font: inherit; font-size: 14px; font-weight: 700; color: var(--st-c); background: var(--st-bg); cursor: pointer; }
.nops-res__b.is-main { color: #fff; background: var(--st-c); }
/* escalation */
.nops-alert { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid #F3C9C0; border-radius: 18px; color: var(--color-emergency); background: var(--color-emergency-soft); }
.nops-alert b { display: block; font-size: 15px; }
.nops-alert small { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--color-text); }
.nops-call.is-done { border-color: #BFE7DF; background: #F6FCFA; }
.nops-call.is-done > .icon { color: var(--color-primary); }
.nops-call:disabled { cursor: default; }
.nops-tl .gv-tl { align-items: flex-start; }
/* handover */
.nops-sums { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nops-sum { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 16px; color: var(--st-c); background: var(--st-bg); }
.nops-sum strong { font-size: 22px; line-height: 1.1; }
.nops-sum span { font-size: 11.5px; font-weight: 700; color: var(--color-text); }
.nops-sbar { gap: 8px; }
.nops-sbar > summary { display: flex; align-items: center; gap: 6px; list-style: none; cursor: pointer; }
.nops-sbar > summary::-webkit-details-marker { display: none; }
.nops-sbar > summary b { flex: 1; font-size: 13.5px; }
.nops-sbar__kv { display: grid; grid-template-columns: 22px 1fr; gap: 6px 8px; margin: 0; font-size: 12px; }
.nops-sbar__kv dt { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; font-weight: 800; color: var(--color-primary-dark); background: var(--color-primary-soft); }
.nops-sbar__kv dd { margin: 0; align-self: center; line-height: 1.4; }
.nops-item { display: flex; align-items: center; gap: 6px; padding-top: 8px; border-top: 1px solid #EEF2F6; font-size: 12px; font-weight: 600; }
.nops-item .select, .nops-item .input { min-height: 34px; height: 34px; padding: 0 8px; font-size: 12px; line-height: 32px; }
.nops-item .select { padding-right: 24px; }
.nops-item .select { flex: 0 0 104px; width: 104px; }
.nops-due { flex: 0 0 64px; width: 64px; }
.nops-item small { color: var(--color-text-muted); }
.nops-sbarv { display: flex; flex-direction: column; gap: 6px; padding: 10px 0 0; border-top: 1px solid #EEF2F6; }
.nops-sbarv > b { font-size: 13px; }
/* roster */
.nops-week { flex-direction: row; align-items: center; padding: 8px; text-align: center; }
.nops-week b { display: block; font-size: 14px; }
.nops-week small { font-size: 11.5px; color: var(--color-text-muted); }
.nops-next .icon { transform: rotate(180deg); }
.nops-days { gap: 0; padding: 4px 14px; }
.nops-day { display: flex; align-items: center; gap: 8px; padding: 11px 0; border-top: 1px solid #EEF2F6; }
.nops-day:first-child { border-top: 0; }
.nops-day b { display: block; font-size: 13px; }
.nops-day small { display: block; font-size: 11px; color: var(--color-text-muted); }
.nops-day.is-today b { color: var(--color-primary-dark); }
.nops-day.is-past { opacity: 0.6; }
.nops-shift { min-width: 76px; padding: 5px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 800; text-align: center; color: var(--st-c); background: var(--st-bg); }
.nops-shift.is-off { color: var(--color-text-muted); background: var(--color-bg); }
/* admission / care plan / coordination */
.nops-arow { gap: 10px; padding: 12px; }
.nops-grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.nops-grid4 .input { padding: 0 8px; }
.nops-cprow { flex-wrap: wrap; cursor: default; }
.nops-cprow[data-a] { cursor: pointer; }
.nops-cprow .select { flex: 0 0 122px; width: 122px; min-height: 36px; height: 36px; padding: 0 26px 0 10px; font-size: 12px; line-height: 34px; }
.nops-cprow .gv-seg { margin-top: 8px; }
.nops-cprow .gv-seg__b { padding: 7px 4px; font-size: 11px; }
.nops-co { gap: 10px; padding: 12px; }
.nops-co .btn { align-self: flex-end; }
/* discharge completion */
.nops-dc { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 20px 14px; border: 1px solid #BFE7DF; border-radius: 18px; text-align: center; background: var(--color-primary-soft); }
.nops-dc__ico { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 6px; border-radius: 50%; color: #fff; background: var(--color-primary); }
.nops-dc b { font-size: 17px; }
.nops-dc small { font-size: 12px; font-weight: 600; color: var(--color-text-muted); }

/* =====================================================================
   Nursing module (14 Nov Nursing View doc) · nurse.html core + clinical care screens (nv-)
   Patient-app system: white cards, tinted icon tiles, small red count badges, chips, bottom sheets.
   ===================================================================== */
.nv-body { gap: 10px; }
.nv-stack, .nv-plist { display: flex; flex-direction: column; gap: 8px; }
.nv-list { gap: 0; padding: 4px 0; }
.nv-list > .gv-row, .nv-list > .nv-li, .nv-list > .nv-ord, .nv-list > .nv-check { border: 0; border-radius: 0; box-shadow: none; }
.nv-list > * + * { border-top: 1px solid #EEF2F6 !important; }
.nv-row .grow { min-width: 0; }
.nv-badge { flex: 0 0 auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; font-size: 10.5px; font-weight: 800; line-height: 20px; text-align: center; color: #fff; background: var(--color-emergency); }
.nv-unit { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--color-border); border-radius: 16px; background: #fff; box-shadow: var(--shadow-sm); }
.nv-unit small { display: block; font-size: 10.5px; font-weight: 700; color: var(--color-text-subtle); text-transform: uppercase; letter-spacing: .05em; }
.nv-unit select { width: 100%; padding: 0; border: 0; font: inherit; font-size: 15px; font-weight: 800; color: var(--color-text); background: transparent; -webkit-appearance: none; appearance: none; outline: none; }
.nv-unit__chev { transform: rotate(90deg); color: var(--color-text-subtle); }
.nv-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nv-tile { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px; border: 1px solid #EDF2F7; border-radius: 18px; color: var(--color-text); text-decoration: none; background: #fff; box-shadow: var(--shadow-sm); }
.nv-tile__ico { width: 34px; height: 34px; margin-bottom: 8px; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; color: var(--st-c); background: var(--st-bg); }
.nv-tile strong { font-size: 24px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.nv-tile > span:not(.nv-tile__ico):not(.nv-badge) { font-size: 12px; font-weight: 700; color: var(--color-text-muted); }
.nv-tile .nv-badge { position: absolute; top: 12px; right: 12px; }
.nv-tile:active, .nv-act:active { transform: scale(.985); }
.nv-hint { display: flex; align-items: center; gap: 6px; margin: 0 2px; font-size: 12.5px; font-weight: 700; color: var(--color-primary-dark); }
.nv-search { margin-top: 0; }
.nv-prow { align-items: flex-start; }
.nv-prow__bed { flex: 0 0 auto; min-width: 48px; padding: 8px 6px; border-radius: 12px; font-size: 11.5px; font-weight: 800; text-align: center; color: #1C7FB6; background: #E1F2FC; }
.nv-prow__bed.is-pri { color: var(--color-emergency); background: var(--color-emergency-soft); }
.nv-dot { display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; vertical-align: middle; background: var(--color-emergency); box-shadow: 0 0 0 3px var(--color-emergency-soft); }
.nv-next { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 11.5px; font-weight: 700; color: var(--color-text-muted); }
.nv-next.is-due { color: var(--color-status-action); }
.nv-pt { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 16px; background: #fff; box-shadow: var(--shadow-sm); }
.nv-pt b { display: block; font-size: 14px; font-weight: 800; }
.nv-pt small { display: block; font-size: 11.5px; color: var(--color-text-muted); }
.nv-pt .grow { min-width: 0; }
.nv-pt__bed { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 8px; border-radius: 12px; color: #1C7FB6; background: #E1F2FC; }
.nv-pt__bed b { font-size: 11px; }
.nv-allergy { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; max-width: 40%; padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; color: var(--color-emergency); background: var(--color-emergency-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nv-saved { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 16px; color: var(--color-primary-dark); background: var(--color-primary-soft); border: 1px solid rgba(23, 169, 153, .25); }
.nv-saved b { display: block; font-size: 13.5px; }
.nv-saved small { display: block; font-size: 12px; color: var(--color-text); }
.nv-saved em { font-style: normal; font-size: 11.5px; font-weight: 700; }
.nv-saved { flex-wrap: wrap; }
.nv-saved__go { flex: 1 0 100%; justify-content: center; min-height: 38px; }
/* form error: soft red card at the top of the form + red field with a short hint (stays until fixed) */
.nv-err { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 16px; color: var(--color-emergency); background: var(--color-emergency-soft); border: 1px solid rgba(193, 39, 45, .25); }
.nv-err__ico { flex: 0 0 auto; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: #fff; }
.nv-err b { display: block; font-size: 13px; line-height: 1.35; font-weight: 700; }
.nv-bad.gv-card, .nv-bad.nops-arow, .nv-bad.nops-cprow, .nv-bad.nops-item { border-color: var(--color-emergency); box-shadow: 0 0 0 1.5px var(--color-emergency) inset; }
.nv-bad .input, .nv-bad .select, .input.nv-bad, .select.nv-bad, .nv-bad textarea { border-color: var(--color-emergency) !important; background: var(--color-emergency-soft); }
.nv-bad.nv-check, .nv-bad.nops-chk, .nv-bad.check { border-radius: 12px; background: var(--color-emergency-soft); }
.nv-bad.nv-vf { border-color: var(--color-emergency); }
.nv-bad .gv-seg { box-shadow: 0 0 0 1.5px var(--color-emergency); }
.nv-fhint, .nv-bad .nv-fhint { display: flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 11.5px; font-weight: 700; color: var(--color-emergency); }
.nv-fhint .icon { flex: 0 0 auto; width: 13px; height: 13px; }
.nv-draftline { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--color-primary-dark) !important; }
[data-draftline][hidden] { display: none !important; }
.nv-empty { align-items: center; gap: 4px; text-align: center; color: var(--color-primary-dark); }
.nv-empty b { font-size: 13.5px; color: var(--color-text); }
.nv-empty small { font-size: 12px; color: var(--color-text-muted); }
.nv-id { flex-direction: row; align-items: center; gap: 12px; }
.nv-id b { display: block; font-size: 16px; font-weight: 800; }
.nv-id small { display: block; font-size: 12px; color: var(--color-text-muted); }
.nv-id__av { flex: 0 0 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; font-weight: 800; color: var(--color-primary-dark); background: var(--color-primary-soft); }
.nv-facts { gap: 0; padding: 4px 14px; }
.nv-fact { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.nv-fact + .nv-fact { border-top: 1px solid #EEF2F6; }
.nv-fact small { display: block; font-size: 11px; font-weight: 700; color: var(--color-text-subtle); }
.nv-fact b { display: block; font-size: 13.5px; font-weight: 700; }
.nv-li, .nv-ord, .nv-check { display: flex; align-items: center; gap: 10px; padding: 11px 14px; }
.nv-li b, .nv-ord b, .nv-check b { display: block; font-size: 13.5px; font-weight: 700; }
.nv-li small, .nv-ord small, .nv-check small { display: block; margin-top: 2px; font-size: 11.5px; color: var(--color-text-muted); }
.nv-li .grow, .nv-ord .grow { min-width: 0; }
.nv-ord input, .nv-check input { flex: 0 0 20px; width: 20px; height: 20px; accent-color: var(--color-primary); }
.nv-mini { flex: 0 0 auto; padding: 6px 10px; border: 1px solid var(--color-border); border-radius: 10px; font: inherit; font-size: 11.5px; font-weight: 700; color: var(--color-primary-dark); background: #fff; cursor: pointer; }
.nv-instr { gap: 8px; font-size: 12.5px; }
.nv-instr p b { display: block; font-size: 13px; }
.nv-instr span { display: block; color: var(--color-text-muted); }
.nv-meta { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--color-text-muted); }
.nv-red { color: var(--color-emergency) !important; }
.nv-green { color: var(--color-primary-dark) !important; }
.nv-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.nv-vgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nv-vf { display: flex; flex-direction: column; gap: 4px; }
.nv-vf__l { font-size: 12px; font-weight: 700; color: var(--color-text); }
.nv-vf__l small { font-weight: 600; color: var(--color-text-subtle); }
.nv-vf__flag { min-height: 13px; font-style: normal; font-size: 11px; font-weight: 800; color: var(--color-emergency); }
.nv-vf.is-abn .input { border-color: var(--color-emergency); background: var(--color-emergency-soft); color: var(--color-emergency); font-weight: 700; }
.nv-dose { gap: 8px; }
.nv-dose.is-late { border-color: var(--color-emergency-border); }
.nv-dose.is-done { background: #FAFCFD; }
.nv-dose__top { display: flex; align-items: center; gap: 10px; }
.nv-dose__top b { display: block; font-size: 13.5px; font-weight: 800; }
.nv-dose__top small { display: block; font-size: 11.5px; color: var(--color-text-muted); }
.nv-dose__top .grow { min-width: 0; }
.nv-dose__acts { display: flex; gap: 6px; }
.nv-act { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 36px; padding: 6px 8px; border: 1px solid var(--color-border); border-radius: 11px; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--color-text); text-decoration: none; background: #fff; cursor: pointer; }
.nv-act.is-ok { color: var(--color-primary-dark); border-color: rgba(23, 169, 153, .35); background: var(--color-primary-soft); }
.nv-act.is-bad { color: var(--color-emergency); border-color: var(--color-emergency-border); }
.nv-act.is-more { flex: 0 0 40px; }
.nv-check { cursor: pointer; }
.nv-kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.nv-kv span { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 12px; background: #F4F8FB; }
.nv-kv small { font-size: 10.5px; font-weight: 700; color: var(--color-text-subtle); }
.nv-kv b { font-size: 13.5px; font-weight: 800; }
.nv-iolist { display: flex; flex-direction: column; gap: 6px; }
.nv-iolist p { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; }
.nv-ntext { font-size: 12.5px; line-height: 1.5; color: var(--color-text); }
.nv-addm { display: flex; gap: 6px; padding: 8px 10px; border-radius: 12px; font-size: 12px; color: #36506B; background: #EAF4FB; }
.nv-addm b { display: block; font-size: 11.5px; }
.nv-sub { margin-top: -4px; }
.nv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.nv-tl { gap: 0; padding: 6px 12px; }
.nv-tl__i { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; }
.nv-tl__i + .nv-tl__i { border-top: 1px solid #EEF2F6; }
.nv-tl__i b { display: block; font-size: 13px; font-weight: 800; }
.nv-tl__i small { display: block; margin-top: 2px; font-size: 11.5px; line-height: 1.4; color: var(--color-text-muted); }
.nv-tl__i.is-hot b { color: var(--color-emergency); }
.nv-tl__i .grow { min-width: 0; }
.nv-tl__t { flex: 0 0 40px; padding-top: 9px; font-size: 11.5px; font-weight: 800; color: var(--color-text-subtle); }
.nv-tlbar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.nv-tlbar .btn { gap: 6px; }
.nv-print pre { margin: 0; white-space: pre-wrap; font: inherit; font-size: 12px; line-height: 1.55; }
@media print { .nv-head, .bottom-nav, .nv-tlbar, .gv-seg, .nv-tlhead { display: none !important; } }
/* rule 2 Assign nurse on the list row · rule 29 movement strip on the Care Hub */
.nv-prow-w { position: relative; }
.nv-prow-w .nv-prow { padding-bottom: 44px; }
.nv-assign { position: absolute; right: 14px; bottom: 10px; display: inline-flex; align-items: center; gap: 4px; }
.nops-snap small { display: block; font-size: 11px; font-weight: 700; color: var(--color-text-subtle); }
.nops-snap b { display: block; font-size: 13px; }
.nv-move { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 14px; font-size: 12.5px; font-weight: 700; text-decoration: none; color: #8A5A00; background: #FFF6E5; border: 1px solid #F6DFB0; }
/* Nursing dashboard · unit switch (segmented) + compact tiles */
.nv-seg { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: #fff; border: 1px solid var(--color-border); box-shadow: var(--shadow-sm); }
.nv-seg__b { flex: 1; height: 38px; border: 0; border-radius: 10px; background: transparent; font: 700 13px inherit; color: var(--color-text-muted); cursor: pointer; transition: background .15s, color .15s; }
.nv-seg__b.is-on { background: var(--color-primary, #0f766e); color: #fff; box-shadow: 0 4px 10px rgba(15, 118, 110, .25); }
.nv-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.nv-tile { align-items: center; text-align: center; gap: 1px; padding: 10px 4px 9px; border-radius: 14px; }
.nv-tile__ico { width: 28px; height: 28px; margin-bottom: 4px; border-radius: 9px; }
.nv-tile__ico .icon { width: 15px; height: 15px; }
.nv-tile strong { font-size: 18px; }
.nv-tile > span:not(.nv-tile__ico):not(.nv-badge) { font-size: 10.5px; line-height: 1.2; }
.nv-tile .nv-badge { top: 6px; right: 6px; transform: scale(.85); transform-origin: top right; }

/* ---- Module home dashboard redesign (24 Nov) · GP-app dashboard style: KPI strip, compact emergency, Quick actions card, pending chips, Sub-modules card ---- */
.hm-kpis--4 { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 6px 4px; }
.hm-kpis--4 .hm-kpi { align-items: flex-start; gap: 3px; padding: 8px 9px 7px; border-radius: 12px; }
.hm-kpis--4 .hm-kpi:active { background: var(--color-bg); }
.hm-kpis--4 .hm-kpi strong { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.hm-kpis--4 .hm-kpi .hm-kpi__lbl { display: flex; align-items: flex-start; gap: 4px; max-width: 100%; font-size: 10.5px; font-weight: 700; line-height: 1.25; white-space: normal; overflow: hidden; }
.hm-kpis--4 .hm-kpi .hm-kpi__dot { display: inline-block; width: 6px; height: 6px; margin: 0 4px 1px 0; vertical-align: middle; }
.hm-kpis--4 .hm-kpi__lbl { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hm-mbody > .hm-emstrip { gap: 10px; padding: 10px 12px; border-radius: 14px; box-shadow: 0 8px 18px -12px rgba(193, 39, 45, 0.7); }
.hm-mbody > .hm-emstrip .hm-emstrip__ico { flex-basis: 30px; width: 30px; height: 30px; border-radius: 10px; }
/* white dashboard cards */
.hm-dcard { display: flex; flex-direction: column; padding: 14px 12px 12px; border: 1px solid var(--color-border); border-radius: 20px; background: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.hm-qahead { margin: 0 4px 14px; font-size: 15px; font-weight: 800; line-height: 1.3; color: var(--color-text); }
/* Quick actions: 4-column tinted tile grid (doc's first 4 items) */
.hm-qagrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 2px; margin: 0; padding: 0; overflow: visible; }
.hm-qagrid .hm-shortcut { flex: none; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 0; border: 0; border-radius: 0; background: none; font-size: 11.5px; font-weight: 700; line-height: 1.2; text-align: center; color: var(--color-text); }
.hm-qagrid .hm-shortcut__ico { position: relative; width: 50px; height: 50px; border-radius: 14px; color: var(--st-c, var(--color-primary-dark)); background: var(--st-bg, var(--color-primary-soft)); transition: transform .15s ease; }
.hm-qagrid .hm-shortcut__ico .icon { width: 23px; height: 23px; stroke-width: 1.8; }
.hm-qagrid .hm-shortcut:active .hm-shortcut__ico { transform: scale(.94); }
.hm-qagrid .hm-shortcut > span:last-child { padding: 0 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hm-qagrid .hm-shortcut__ico[data-n]::after { content: attr(data-n); position: absolute; top: -5px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px; display: grid; place-items: center; box-sizing: border-box; border-radius: 99px; font-size: 9.5px; font-weight: 800; line-height: 1; color: #fff; background: var(--color-emergency, #ef4444); box-shadow: 0 0 0 2px #fff; }
/* Pending work chips (each opens its sub-module) */
.hm-pendrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 -2px; }
.hm-dcard--qa .hm-qagrid + .hm-pendrow { margin-top: 14px; padding-top: 12px; border-top: 1px solid #EEF2F6; }
.hm-pendrow__l { display: inline-flex; align-items: center; gap: 5px; margin: 0 4px 0 2px; font-size: 11.5px; font-weight: 800; color: var(--color-text-muted); }
.hm-pendrow__l .icon { width: 14px; height: 14px; color: var(--color-urgent); }
.hm-pendchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 5px 4px 10px; border: 1px solid #F6DFC6; border-radius: 99px; font-size: 11.5px; color: var(--color-text); background: #FFF8F0; text-decoration: none; }
.hm-pendchip b { font-weight: 700; }
.hm-pendchip em { min-width: 22px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; box-sizing: border-box; border-radius: 99px; font-style: normal; font-size: 10.5px; font-weight: 800; color: #fff; background: var(--color-urgent); }
.hm-pendchip.is-zero { border-color: var(--color-border); background: #fff; }
.hm-pendchip.is-zero em { color: var(--color-text-muted); background: var(--color-bg); }
.hm-pendchip:active { transform: scale(.97); }
/* Sub-modules card: section header + flat rows inside one card */
.hm-dcard--sub { padding: 14px 0 6px; }
.hm-dcard--sub > .hm-menu-title, .hm-dcard--sub .hm-moremod > .hm-menu-title { flex-direction: column; gap: 2px; margin: 0 16px 8px; font-size: 15px; font-weight: 800; line-height: 1.3; }
.hm-dcard--sub .hm-menu-title span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; font-weight: 500; line-height: 1.35; color: var(--color-text-muted); }
.hm-dcard--sub .hm-submenu { border: 0; border-radius: 0; background: none; box-shadow: none; }
.hm-dcard--sub .hm-subrow { gap: 12px; padding: 11px 16px; }
.hm-dcard--sub .hm-subrow + .hm-subrow { border-top: 1px solid #EEF2F6; }
.hm-dcard--sub .hm-subrow__ico { flex-basis: 40px; border-radius: 12px; }
.hm-dcard--sub .hm-subrow b { font-size: 14px; line-height: 1.3; }
.hm-dcard--sub .hm-subrow small { font-size: 11.5px; }
.hm-dcard--sub .hm-subrow__urg { padding: 3px 8px; font-size: 10.5px; color: #B4651A; background: #FDF0E2; }
.hm-dcard--sub .hm-subrow__n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; font-size: 11px; line-height: 22px; }
/* "Other tools" / "More in this module": a divider sub-heading inside the same card */
.hm-dcard--sub .hm-submenu + .hm-menu-title, .hm-dcard--sub .hm-scrollmore + .hm-menu-title, .hm-dcard--sub .hm-moremod > .hm-menu-title { margin: 6px 0 4px; padding: 12px 16px 4px; border-top: 6px solid var(--color-bg); font-size: 13px; font-weight: 800; color: var(--color-text-muted); }
.hm-dcard--sub .hm-moremod { margin: 0; }
.hm-dcard--sub .hm-scrollmore { box-sizing: border-box; width: calc(100% - 24px); min-height: 40px; margin: 6px 12px 8px; border: 1px solid #DCEEEA; border-radius: 12px; font-family: inherit; font-size: 12.5px; font-weight: 700; line-height: 1; color: var(--color-primary-dark, #0f766e); background: var(--color-primary-soft, #e6f4f1); }
.hm-dcard--sub .hm-submenu + .hm-submenu { margin-top: 6px; border-top: 6px solid var(--color-bg); }

/* ---- Module dashboard kit (25 Nov) · one design for every module home (module.html) and the Nursing dashboard (nurse.html N1) ----
   compact teal header + slim search row · stat tiles · emergency strip · Quick actions card · Needs action rows · Sub-modules card.
   16 px gutters · 12–14 px radius family · one shadow · one section-header style · tn-* tones · white cards. */
:root { --mk-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 16px -10px rgba(16, 24, 40, .14); --mk-line: #EEF2F6; --mk-border: #E8EEF4; }
/* header */
.hm-mhead.mk-head { padding: 18px 16px 16px; border-radius: 0 0 24px 24px; }
.mk-head .hm-mhead__ico { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 11px; }
.mk-head .hm-searchrow { margin-top: 14px; gap: 8px; }
.mk-head .hm-searchrow .hm-search { height: 40px; border-radius: 12px; box-shadow: 0 4px 12px -8px rgba(0, 0, 0, .35); }
.mk-head .hm-new { height: 40px; padding: 0 13px; border-radius: 12px; box-shadow: 0 4px 12px -8px rgba(0, 0, 0, .35); }
/* body + section headers */
.hm-mbody.mk-body, .gv-body.mk-body { display: flex; flex-direction: column; gap: 12px; padding: 16px 16px 24px; }
.mk-head + .mk-body { padding-top: 16px; }
.mk-sec, .mk-sec.hm-menu-title { white-space: nowrap; display: flex; flex-direction: row; align-items: baseline; justify-content: space-between; gap: 10px; min-width: 0; margin: 6px 2px -4px; font-size: 14px; font-weight: 800; line-height: 1.3; letter-spacing: 0; color: var(--color-text); }
.mk-sec h2, .mk-sec .hm-qahead { margin: 0; font-size: 14px; font-weight: 800; line-height: 1.3; letter-spacing: 0; color: var(--color-text); }
.mk-sec > span { flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11.5px; font-weight: 600; color: var(--color-text-subtle); }
.mk-sec > a { flex: 0 0 auto; font-size: 12px; font-weight: 700; color: var(--color-primary-dark); text-decoration: none; }
/* stat tiles (KPI row · Nursing tiles · employee counters): 4 per row, wrap, nothing dropped */
.hm-kpis.mk-stats, .nv-tiles.mk-stats, .hm-counters.mk-stats { position: static; z-index: auto; display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); grid-auto-flow: row; gap: 8px; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.mk-stats > .mk-stat { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 1px; padding: 10px 4px 9px; border: 1px solid var(--mk-border); border-radius: 14px; font: inherit; text-align: center; text-decoration: none; color: var(--color-text); background: #fff; box-shadow: var(--mk-shadow); cursor: pointer; }
.mk-stats > .mk-stat::before { display: none; }
.mk-stats > .mk-stat:active { transform: scale(.985); background: #fff; }
.mk-stats > .mk-stat:disabled, .mk-stats > div.mk-stat { cursor: default; }
.mk-stats > .mk-stat:disabled:active, .mk-stats > div.mk-stat:active { transform: none; }
.mk-stats > .mk-stat.is-active { border-color: var(--color-primary); background: var(--color-primary-soft); }
.mk-stat .mk-stat__ico { width: 28px; height: 28px; margin: 0 0 4px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; color: var(--st-c); background: var(--st-bg); }
.mk-stat .mk-stat__ico .icon { width: 15px; height: 15px; }
.mk-stat strong { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; color: var(--color-text); }
.mk-stat.hm-kpi--money strong { font-size: 14px; line-height: 1.5; }
.mk-stat.hm-kpi--urgent strong, .mk-stat.is-alert strong { color: var(--color-text); }
.mk-stats > .mk-stat .mk-stat__l { max-width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; font-size: 10.5px; font-weight: 700; line-height: 1.2; color: var(--color-text-muted); }
.mk-badge, .mk-row em.mk-badge { flex: 0 0 auto; min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; box-sizing: border-box; border-radius: 10px; font-style: normal; font-size: 10.5px; font-weight: 800; line-height: 1; color: #fff; background: var(--color-emergency); }
.mk-stats > .mk-stat .mk-badge { display: inline-grid; overflow: visible; font-size: 10.5px; font-weight: 800; color: #fff; position: absolute; top: 6px; right: 6px; transform: scale(.85); transform-origin: top right; }
/* emergency strip: one compact style */
.mk-body > .hm-emstrip { margin: 0; gap: 10px; padding: 10px 12px; border-radius: 14px; box-shadow: 0 8px 18px -12px rgba(193, 39, 45, .7); }
.mk-body > .hm-emstrip .hm-emstrip__ico { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 10px; }
/* white cards */
.mk-card, .hm-dcard.mk-card, .gv-card.mk-card { border: 1px solid var(--mk-border); border-radius: 14px; background: #fff; box-shadow: var(--mk-shadow); }
/* Quick actions: outline icon tiles, label under, small red count badge */
.hm-dcard--qa.mk-qa { padding: 14px 8px 12px; }
.mk-qa .hm-qagrid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 4px; }
.mk-qa .hm-qagrid .hm-shortcut { gap: 7px; font-size: 11.5px; }
.mk-qa .hm-qagrid .hm-shortcut__ico { width: 46px; height: 46px; border-radius: 13px; color: var(--st-c, var(--color-primary-dark)); background: #fff; border: 1.5px solid var(--st-bg, var(--color-primary-soft)); border-color: color-mix(in srgb, var(--st-c, #0f766e) 30%, #fff); }
.mk-qa .hm-qagrid .hm-shortcut__ico .icon { width: 21px; height: 21px; stroke-width: 1.9; }
.mk-qa .hm-qagrid .hm-shortcut__ico[data-n]::after { top: -6px; right: -7px; min-width: 18px; height: 18px; font-size: 9.5px; }
/* Needs action / Due now: white rounded rows */
.mk-due { display: flex; flex-direction: column; gap: 8px; }
.mk-row, .gv-row.mk-row, .hm-pendchip.mk-row { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; box-sizing: border-box; padding: 11px 14px; border: 1px solid var(--mk-border); border-radius: 14px; font-size: inherit; text-align: left; text-decoration: none; color: var(--color-text); background: #fff; box-shadow: var(--mk-shadow); }
.mk-row:active { transform: scale(.985); }
.mk-row .grow { min-width: 0; }
.mk-row b { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13.5px; font-weight: 700; line-height: 1.3; }
.mk-row small { display: block; margin-top: 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11.5px; line-height: 1.35; color: var(--color-text-muted); }
.mk-row__ico, .mk-row .gv-row__ico { flex: 0 0 36px; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; color: var(--st-c, var(--color-primary-dark)); background: var(--st-bg, var(--color-primary-soft)); }
.mk-row__chev, .mk-row .gv-row__chev { flex: 0 0 auto; color: var(--color-text-subtle); }
.mk-row .gv-pill { flex: 0 0 auto; margin: 0; }
.hm-pendchip.mk-row.is-zero { border-color: var(--mk-border); background: #fff; }
.hm-pendchip.mk-row.is-zero .mk-badge { color: var(--color-text-muted); background: var(--color-bg); }
/* Sub-modules / Ward work: one card, flat rows (tinted icon tile, name, owner line, urgent pill + count, chevron) */
.hm-dcard--sub.mk-card, .nv-list.mk-card { gap: 0; padding: 4px 0; overflow: hidden; }
.hm-dcard--sub.mk-card .hm-submenu { border: 0; border-radius: 0; background: none; box-shadow: none; }
.hm-dcard--sub.mk-card .hm-subrow, .mk-list > .gv-row { gap: 12px; padding: 11px 14px; }
.hm-dcard--sub.mk-card .hm-subrow + .hm-subrow, .mk-list > .gv-row + .gv-row { border-top: 1px solid var(--mk-line) !important; }
.hm-dcard--sub.mk-card .hm-subrow__ico, .mk-list > .gv-row .gv-row__ico { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 11px; }
.hm-dcard--sub.mk-card .hm-subrow b, .mk-list > .gv-row b { font-size: 13.5px; font-weight: 700; line-height: 1.3; }
.hm-dcard--sub.mk-card .hm-subrow small, .mk-list > .gv-row small { margin-top: 2px; font-size: 11.5px; line-height: 1.35; color: var(--color-text-muted); }
.hm-dcard--sub.mk-card .hm-subrow__urg { padding: 3px 8px; border-radius: 99px; font-size: 10.5px; font-weight: 800; color: var(--color-emergency); background: var(--color-emergency-soft); }
.hm-dcard--sub.mk-card .hm-subrow__n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; font-size: 10.5px; font-weight: 800; line-height: 20px; }
.hm-dcard--sub.mk-card .hm-submenu + .hm-menu-title, .hm-dcard--sub.mk-card .hm-scrollmore + .hm-menu-title, .hm-dcard--sub.mk-card .hm-moremod > .hm-menu-title { margin: 4px 0 0; padding: 12px 14px 4px; border-top: 6px solid var(--color-bg); font-size: 12px; font-weight: 800; letter-spacing: .02em; color: var(--color-text-muted); }
.hm-dcard--sub.mk-card .hm-scrollmore { width: calc(100% - 28px); min-height: 38px; margin: 6px 14px 10px; border-radius: 12px; }
/* Nursing unit switch sits in the same gutters */
.mk-body > .nv-seg { border-radius: 14px; border-color: var(--mk-border); box-shadow: var(--mk-shadow); }
/* Module header · minimal sizes, airy spacing (25 Nov) */
.hm-mhead.mk-head { padding: 22px 16px 18px; border-radius: 0 0 24px 24px; }
.mk-head .hm-mhead__ico { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 10px; }
.mk-head .hm-mhead__ico .icon { width: 16px; height: 16px; }
.mk-head h1 { font-size: 16px; line-height: 1.25; letter-spacing: 0; }
.mk-head h1 + p, .mk-head .hm-mhead__sub { margin-top: 2px; font-size: 11px; font-weight: 500; opacity: .85; }
.mk-head .icon-btn, .mk-head .hm-hbtn { width: 34px; height: 34px; border-radius: 10px; }
.mk-head .icon-btn .icon, .mk-head .hm-hbtn .icon { width: 17px; height: 17px; }
.mk-head .hm-searchrow { margin-top: 16px; gap: 8px; }
.mk-head .hm-searchrow .hm-search { height: 38px; padding: 0 12px; border-radius: 11px; font-size: 13px; }
.mk-head .hm-searchrow .hm-search input { font-size: 13px; }
.mk-head .hm-new { height: 38px; padding: 0 12px; border-radius: 11px; font-size: 12.5px; }
.mk-head + .mk-body { padding-top: 18px; }
.mk-body { gap: 14px; }
/* stat tiles · light and airy: small icon + number on one line, label under */
.mk-stats { gap: 10px; }
.mk-stats > .mk-stat { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 6px; row-gap: 3px; align-items: center; justify-items: start; text-align: left; padding: 10px 10px 9px; border-radius: 12px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.mk-stat .mk-stat__ico { width: 22px; height: 22px; margin: 0; border-radius: 7px; grid-row: 1; grid-column: 1; }
.mk-stat .mk-stat__ico .icon { width: 12px; height: 12px; }
.mk-stat strong { grid-row: 1; grid-column: 2; font-size: 15px; line-height: 1.1; }
.mk-stats > .mk-stat .mk-stat__l { grid-row: 2; grid-column: 1 / -1; -webkit-line-clamp: 1; font-size: 10px; font-weight: 600; line-height: 1.25; }
.mk-stats > .mk-stat .mk-badge { top: 7px; right: 7px; transform: scale(.75); }
/* emergency strip · slimmer */
.mk-body > .hm-emstrip { gap: 10px; padding: 8px 12px; border-radius: 12px; box-shadow: 0 6px 14px -10px rgba(193, 39, 45, .6); }
.mk-body > .hm-emstrip .hm-emstrip__ico { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 8px; }
.mk-body > .hm-emstrip .hm-emstrip__ico .icon { width: 14px; height: 14px; }
.mk-body > .hm-emstrip b, .mk-body > .hm-emstrip strong { font-size: 12.5px; }
.mk-body > .hm-emstrip small, .mk-body > .hm-emstrip span:not(.hm-emstrip__ico) { font-size: 11px; }
.mk-stats > .mk-stat { padding: 10px 9px; align-content: start; }
.mk-stats > .mk-stat .mk-stat__l { -webkit-line-clamp: 2; white-space: normal; text-overflow: clip; min-height: 2.5em; color: var(--color-text-muted); }
/* 25 Nov · Option A: counters inside the teal header (white, 4 columns, thin dividers, no icon boxes) */
.mk-head .mk-stats { margin-top: 16px; gap: 0; }
.mk-head .mk-stats > .mk-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 2px 10px; border: 0; border-left: 1px solid rgba(255, 255, 255, .22); border-radius: 0; background: transparent; box-shadow: none; color: #fff; text-align: left; }
.mk-head .mk-stats > .mk-stat:first-child { border-left: 0; padding-left: 2px; }
.mk-head .mk-stats > .mk-stat:active { background: transparent; transform: none; opacity: .8; }
.mk-head .mk-stat .mk-stat__ico { display: none; }
.mk-head .mk-stat strong { font-size: 18px; font-weight: 800; color: #fff; }
.mk-head .mk-stats > .mk-stat .mk-stat__l { -webkit-line-clamp: 2; min-height: 0; font-size: 10.5px; font-weight: 600; line-height: 1.25; color: rgba(255, 255, 255, .82); }
.mk-head .mk-stats > .mk-stat .mk-badge { top: -2px; right: 4px; box-shadow: 0 0 0 2px rgba(15, 118, 110, .9); }
.mk-head .mk-stats > .mk-stat.is-active { background: rgba(255, 255, 255, .12); border-radius: 10px; }
.mk-head .mk-stats + .hm-searchrow { margin-top: 16px; }
/* 25 Nov · compact Needs action: one card, slim rows, no second line */
.mk-due { display: flex; flex-direction: column; gap: 0; overflow: hidden; border: 1px solid var(--color-border); border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.mk-due > .mk-row { min-height: 0; margin: 0; padding: 9px 12px; gap: 10px; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.mk-due > .mk-row + .mk-row { border-top: 1px solid #eef2f6; }
.mk-due > .mk-row .mk-row__ico { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 8px; }
.mk-due > .mk-row .mk-row__ico .icon { width: 13px; height: 13px; }
.mk-due > .mk-row b { font-size: 13px; }
.mk-due > .mk-row small { display: none; }
.mk-due > .mk-row .gv-pill { font-size: 10.5px; padding: 1px 7px; }

/* ---- 25 Nov · chosen module home design (every module.html home + Nursing N1) ----
   Option A hero without greeting (rings, glass buttons, white module tile, highlight counter + frosted counters, floating search),
   Option A quick tiles without heading, compact Needs action alert card, Option B sub-module icon grid, ONE More / Less.
   :not(#_) lifts these rules over the older kit layers above without !important. */
.tn-teal  { --st-c: #0F766E; --st-bg: #E2F4F1; }
.tn-amber { --st-c: #B7791F; --st-bg: #FDF3E1; }
/* hero */
.hm-mhead.mk-hero:not(#_) { position: relative; overflow: hidden; padding: 20px 18px 24px; border-radius: 0 0 30px 30px; box-shadow: none;
  background: radial-gradient(120% 80% at 100% 0%, rgba(94, 234, 212, .35) 0%, rgba(94, 234, 212, 0) 55%), radial-gradient(90% 70% at 0% 100%, rgba(8, 64, 60, .55) 0%, rgba(8, 64, 60, 0) 60%), linear-gradient(160deg, #0E6F68 0%, #0F8379 48%, #12A091 100%); }
.mk-hero::before, .mk-hero::after { content: ""; position: absolute; z-index: 0; border-radius: 50%; pointer-events: none; }
.mk-hero::before { width: 260px; height: 260px; right: -90px; top: 46px; border: 1px solid rgba(255, 255, 255, .12); }
.mk-hero::after { width: 180px; height: 180px; right: -40px; top: 86px; border: 1px solid rgba(255, 255, 255, .09); }
.mk-hero:not(#_) > * { position: relative; z-index: 1; }
.hm-mhead.mk-hero.mk-hero--float:not(#_) { padding-bottom: 54px; }
.mk-hero:not(#_) .hm-mhead__bar { gap: 10px; }
.mk-hero:not(#_) .hm-hbtn { flex: 0 0 40px; width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 14px; color: #fff; background: rgba(255, 255, 255, .14); backdrop-filter: blur(8px); }
.mk-hero:not(#_) .hm-hbtn .icon { width: 19px; height: 19px; }
.mk-hero:not(#_) .hm-mhead__title { gap: 12px; }
.mk-hero:not(#_) .hm-mhead__ico { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 14px; color: var(--color-primary-dark, #0F766E); background: #fff; box-shadow: 0 6px 16px rgba(4, 47, 44, .25); }
.mk-hero:not(#_) .hm-mhead__ico .icon { width: 20px; height: 20px; }
.mk-hero:not(#_) h1 { font-size: 17px; font-weight: 800; line-height: 22px; letter-spacing: -.01em; }
.mk-hero:not(#_) h1 + p { margin-top: 1px; font-size: 12px; font-weight: 600; line-height: 17px; opacity: 1; color: rgba(255, 255, 255, .78); }
/* hero counters: first = highlight number, the others frosted cards (--n per row, max 3) */
.mk-hero:not(#_) .mk-stats { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 8px; margin: 22px 0 0; padding: 0; border: 0; background: none; box-shadow: none; }
.mk-hero:not(#_) .mk-stats > .mk-stat { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 3px; min-width: 0; min-height: 0; padding: 11px 12px 12px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 16px; font: inherit; text-align: left; color: #fff; background: rgba(255, 255, 255, .13); box-shadow: none; backdrop-filter: blur(10px); }
.mk-hero:not(#_) .mk-stats > .mk-stat:active { transform: scale(.98); opacity: 1; background: rgba(255, 255, 255, .2); }
.mk-hero:not(#_) .mk-stats > .mk-stat.is-active { background: rgba(255, 255, 255, .26); border-color: rgba(255, 255, 255, .5); }
.mk-hero:not(#_) .mk-stat .mk-stat__ico { display: none; }
.mk-hero:not(#_) .mk-stat strong { max-width: 100%; font-size: 22px; font-weight: 800; line-height: 28px; letter-spacing: -.02em; color: #fff; }
.mk-hero:not(#_) .mk-stats > .mk-stat .mk-stat__l { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 0; overflow: hidden; white-space: normal; font-size: 11.5px; font-weight: 600; line-height: 15px; color: rgba(255, 255, 255, .86); }
.mk-hero:not(#_) .mk-stats > .mk-stat .mk-badge { position: absolute; top: 9px; right: 9px; min-width: 19px; height: 19px; transform: none; border: 2px solid #0F857A; box-shadow: none; background: #FF5A5F; }
.mk-hero:not(#_) .mk-stats > .mk-stat--hl { grid-column: 1 / -1; flex-direction: row; align-items: flex-end; gap: 12px; padding: 0 0 4px; border: 0; background: none; backdrop-filter: none; }
.mk-hero:not(#_) .mk-stats > .mk-stat--hl:active { background: none; }
.mk-hero:not(#_) .mk-stat--hl strong { flex: 0 0 auto; font-size: 56px; line-height: 54px; letter-spacing: -.04em; }
.mk-hero:not(#_) .mk-stats > .mk-stat--hl .mk-stat__l { padding-bottom: 5px; font-size: 14px; font-weight: 700; line-height: 19px; color: rgba(255, 255, 255, .94); }
.mk-hero:not(#_) .mk-stats > .mk-stat--hl .mk-badge { position: static; align-self: center; margin: 0 0 0 auto; }
.mk-hero:not(#_) .mk-stats > .mk-stat.hm-kpi--money strong { font-size: 18px; }
.mk-hero:not(#_) .mk-stats > .mk-stat--hl.hm-kpi--money strong { font-size: 40px; }
/* floating search + primary action over the hero's bottom edge */
.hm-searchrow.mk-float:not(#_) { position: relative; z-index: 3; display: flex; align-items: center; gap: 8px; height: 58px; box-sizing: border-box; margin: -32px 16px 0; padding: 6px 6px 6px 14px; border-radius: 20px; background: #fff; box-shadow: 0 2px 4px rgba(16, 42, 48, .04), 0 16px 36px rgba(12, 70, 66, .16); }
.mk-float:not(#_) .hm-search { flex: 1; min-width: 0; height: 46px; margin: 0; padding: 0 2px; gap: 10px; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: 14px; }
.mk-float:not(#_) .hm-search input { font-size: 14px; }
.mk-float:not(#_) .hm-new { flex: 0 0 auto; height: 46px; padding: 0 15px 0 12px; border: 0; border-radius: 15px; font-size: 13.5px; font-weight: 800; white-space: nowrap; color: #fff; background: linear-gradient(135deg, #0F766E, #14A493); box-shadow: 0 6px 14px rgba(15, 118, 110, .3); }
.mk-float:not(#_) .hm-new .icon { width: 17px; height: 17px; }
.mk-float + .mk-body:not(#_) { padding-top: 22px; }
.mk-body:not(#_) { gap: 16px; }
/* quick actions: large white tiles, coloured icon, count badge on the icon */
.hm-dcard--qa.mk-qa:not(#_) { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.mk-qa:not(#_) .hm-qagrid { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; overflow: visible; }
.mk-qa:not(#_) .hm-qagrid > .hm-shortcut { flex: 0 0 calc((100% - 24px) / 4); box-sizing: border-box; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 15px 3px 12px; border: 1px solid rgba(230, 236, 238, .8); border-radius: 20px; font-size: 11.5px; font-weight: 700; line-height: 15px; text-align: center; color: var(--color-text); background: #fff; box-shadow: 0 1px 2px rgba(16, 42, 48, .05), 0 2px 8px rgba(16, 42, 48, .04); }
.mk-qa:not(#_) .hm-qagrid > .hm-shortcut:active { transform: scale(.97); }
.mk-qa:not(#_) .hm-shortcut__ico { width: 46px; height: 46px; border: 0; border-radius: 16px; color: var(--st-c); background: var(--st-bg); }
.mk-qa:not(#_) .hm-shortcut__ico .icon { width: 21px; height: 21px; stroke-width: 1.9; }
.mk-qa:not(#_) .hm-shortcut__ico[data-n]::after { top: -6px; right: -8px; min-width: 19px; height: 19px; border: 2px solid #fff; font-size: 9.5px; }
.mk-qa:not(#_) .hm-qagrid > .hm-shortcut > span:last-child { min-height: 30px; }
.mk-qa:not(#_) .hm-qagrid.is-few > .hm-shortcut { flex: 1 1 0; }
.mk-qa:not(#_) .hm-qagrid.is-wide > .hm-shortcut { flex: 1 1 0; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 12px 14px; font-size: 13px; line-height: 17px; text-align: left; }
.mk-qa:not(#_) .hm-qagrid.is-wide > .hm-shortcut > span:last-child { min-height: 0; }
.mk-qa:not(#_) .hm-qagrid.is-wide .hm-shortcut__ico { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 14px; }
/* compact Needs action: one alert card, small header line, slim rows */
.mk-due.mk-alert:not(#_) { display: flex; flex-direction: column; gap: 0; overflow: hidden; border: 1px solid #F7DCD7; border-radius: 20px; background: #fff; box-shadow: 0 2px 4px rgba(16, 42, 48, .04), 0 10px 28px rgba(16, 42, 48, .08); }
.mk-alert.is-calm:not(#_) { border-color: var(--mk-border); }
.mk-alert__head { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 14px; background: linear-gradient(120deg, #FFF3EF 0%, #FFF8F6 60%, #FFFFFF 100%); }
.mk-alert.is-calm .mk-alert__head { background: linear-gradient(120deg, #EAF7F4 0%, #F4FBF9 60%, #FFFFFF 100%); }
.mk-alert__ring { flex: 0 0 28px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--color-emergency); background: #fff; box-shadow: 0 0 0 4px rgba(210, 63, 79, .08); }
.mk-alert.is-calm .mk-alert__ring { color: var(--color-primary-dark); box-shadow: 0 0 0 4px rgba(15, 118, 110, .08); }
.mk-alert__ring .icon { width: 15px; height: 15px; }
.mk-alert__head b { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13.5px; font-weight: 800; color: var(--color-text); }
.mk-alert__head a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 1px; font-size: 12px; font-weight: 700; color: var(--color-primary-dark); text-decoration: none; }
.mk-alert__head a .icon { width: 14px; height: 14px; }
.mk-alert:not(#_) > .mk-row { min-height: 0; margin: 0; padding: 10px 12px 10px 14px; gap: 10px; border: 0; border-top: 1px solid #EEF2F4; border-radius: 0; box-shadow: none; background: transparent; }
.mk-alert:not(#_) > .mk-row .mk-row__ico, .mk-alert:not(#_) > .mk-row .gv-row__ico { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 10px; }
.mk-alert:not(#_) > .mk-row .icon { width: 15px; height: 15px; }
.mk-alert:not(#_) > .mk-row b { font-size: 13px; font-weight: 700; }
.mk-alert:not(#_) > .mk-row small { display: none; }
.mk-alert:not(#_) > .mk-row .gv-pill { margin: 0; padding: 2px 8px; font-size: 10.5px; }
.mk-alert:not(#_) > .mk-row em.mk-badge { min-width: 22px; height: 22px; border-radius: 11px; color: var(--color-primary-dark); background: var(--color-primary-soft); }
.mk-alert:not(#_) > .mk-row.is-zero em.mk-badge { color: var(--color-text-muted); background: var(--color-bg); }
/* sub-modules: icon grid, 4 per row */
.hm-dcard--sub.mk-card:not(#_), .mk-subcard.mk-card:not(#_) { padding: 18px 8px 14px; border-radius: 20px; border-color: rgba(230, 236, 238, .8); box-shadow: 0 1px 2px rgba(16, 42, 48, .05), 0 2px 8px rgba(16, 42, 48, .04); }
.hm-dcard--sub.mk-card.mk-acct:not(#_) { padding: 4px 0; }
.mk-grid:not(#_) { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 4px; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.mk-grid > .mk-tile:not(#_) { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0; min-width: 0; padding: 0 2px; border: 0 !important; border-radius: 0; text-align: center; text-decoration: none; color: var(--color-text); background: none; }
.mk-grid > .mk-tile:not(#_):active { background: none; transform: scale(.96); }
.mk-tile:not(#_) .mk-tile__ico { position: relative; flex: 0 0 auto; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 18px; color: var(--st-c); background: var(--st-bg); }
.mk-tile:not(#_) .mk-tile__ico .icon { width: 23px; height: 23px; }
.mk-tile:not(#_) .mk-tile__ico i { font-style: normal; font-size: 18px; font-weight: 800; }
.mk-tile__n { position: absolute; top: -5px; right: -7px; min-width: 21px; height: 21px; padding: 0 5px; box-sizing: border-box; display: grid; place-items: center; border: 2px solid #fff; border-radius: 11px; font-style: normal; font-size: 10.5px; font-weight: 800; line-height: 1; color: #fff; background: var(--color-primary-dark, #0F766E); }
.mk-tile__n.is-urg { background: var(--color-emergency, #D23F4F); }
.mk-tile:not(#_) b { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; max-width: 100%; margin-top: 8px; overflow: hidden; font-size: 12px; font-weight: 700; line-height: 15px; color: var(--color-text); }
.mk-tile:not(#_) small { display: block; max-width: 100%; margin-top: 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 10.5px; font-weight: 600; line-height: 14px; color: var(--color-text-subtle); }
.mk-tile__urg { margin-top: 4px; padding: 1px 7px; border-radius: 8px; font-size: 10px; font-weight: 800; line-height: 15px; white-space: nowrap; color: var(--color-emergency); background: var(--color-emergency-soft); }
/* ONE More / Less: remaining doc sub-modules + Other tools */
.mk-more { margin-top: 18px; }
.mk-more__t { margin: 18px 6px 14px; padding-top: 14px; border-top: 1px solid var(--mk-line); font-size: 12px; font-weight: 800; letter-spacing: .01em; color: var(--color-text-muted); }
.mk-more > .mk-more__t:first-child { margin-top: 0; }
.mk-morebtn { display: flex; align-items: center; justify-content: center; gap: 6px; height: 34px; margin: 18px auto 2px; padding: 0 12px 0 16px; border: 1px solid #D7ECE7; border-radius: 17px; font: inherit; font-size: 12.5px; font-weight: 800; color: var(--color-primary-dark); background: var(--color-primary-soft); cursor: pointer; }
.mk-morebtn em { min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; display: inline-grid; place-items: center; border-radius: 10px; font-style: normal; font-size: 10.5px; font-weight: 800; color: #fff; background: var(--color-primary-dark); }
.mk-morebtn .icon { width: 15px; height: 15px; transform: rotate(90deg); transition: transform .2s ease; }
.mk-morebtn.is-open .icon { transform: rotate(-90deg); }
.mk-morebtn.is-open em { display: none; }
/* Nursing N1: unit switch floats under the hero; Ward work grid card */
.mk-hero--float + .mk-body > .nv-seg:first-child:not(#_) { position: relative; z-index: 3; margin-top: -48px; padding: 5px; border: 0; border-radius: 18px; background: #fff; box-shadow: 0 2px 4px rgba(16, 42, 48, .04), 0 16px 36px rgba(12, 70, 66, .16); }
.mk-hero--float + .mk-body > .nv-seg:first-child .nv-seg__b { height: 40px; border-radius: 13px; }
.mk-subcard.nv-list:not(#_) { display: block; }
.mk-hero:not(#_) .mk-stats > .mk-stat:not(.mk-stat--hl) strong.is-long { font-size: 16px; letter-spacing: -.01em; }
.mk-tile:not(#_) b.is-long { font-size: 10px; letter-spacing: -.03em; }
.hm-dcard--sub.mk-card:not(#_), .mk-subcard.mk-card:not(#_) { padding-left: 6px; padding-right: 6px; }
.mk-grid:not(#_) { column-gap: 2px; }
/* 25 Nov fixes · icons / badges never clipped, no "n urgent" line, slimmer floating search */
.mk-grid:not(#_), .hm-submenu.mk-grid:not(#_) { overflow: visible; padding-top: 8px; }
.mk-card:not(#_) .hm-submenu, .mk-subcard:not(#_), .hm-dcard--sub.mk-card:not(#_) { overflow: visible; }
.mk-tile__urg { display: none; }
.hm-searchrow.mk-float:not(#_) { height: 50px; padding: 5px 5px 5px 14px; border-radius: 16px; }
.mk-float:not(#_) .hm-search { height: 40px; font-size: 13.5px; }
.mk-float:not(#_) .hm-search input { font-size: 13.5px; }
.mk-float:not(#_) .hm-new { height: 40px; padding: 0 13px 0 10px; border-radius: 12px; font-size: 13px; }
.mk-float:not(#_) .hm-new .icon { width: 15px; height: 15px; }
/* header subtitle: full name, smaller instead of cut off */
.mk-hero:not(#_) .hm-mhead__title p { white-space: normal; overflow: visible; text-overflow: clip; font-size: 11.5px; line-height: 1.3; }
.mk-alert:not(#_) > .mk-row b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* 25 Nov · counters as Option C strip: one white card inside the hero, equal columns, thin dividers, pending numbers amber */
.mk-hero:not(#_) .mk-stats { display: flex; flex-wrap: wrap; gap: 0; margin: 18px 0 0; padding: 12px 4px; border-radius: 16px; background: #fff; box-shadow: 0 8px 22px -14px rgba(4, 47, 44, .55); }
.mk-hero:not(#_) .mk-stats > .mk-stat, .mk-hero:not(#_) .mk-stats > .mk-stat--hl { flex: 1 0 22%; min-width: 0; grid-column: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 2px 10px; border: 0; border-left: 1px solid #e8edf2; border-radius: 0; background: none; backdrop-filter: none; box-shadow: none; color: var(--color-text); text-align: left; }
.mk-hero:not(#_) .mk-stats > .mk-stat:first-child { border-left: 0; }
.mk-hero:not(#_) .mk-stats > .mk-stat strong, .mk-hero:not(#_) .mk-stats > .mk-stat--hl strong { font-size: 19px; font-weight: 800; line-height: 1.1; letter-spacing: -.01em; color: var(--color-text); }
.mk-hero:not(#_) .mk-stats > .mk-stat strong.is-amber { color: #c27c0e; }
.mk-hero:not(#_) .mk-stats > .mk-stat .mk-stat__l, .mk-hero:not(#_) .mk-stats > .mk-stat--hl .mk-stat__l { font-size: 10.5px; font-weight: 500; line-height: 1.25; color: var(--color-text-muted); }
.mk-hero:not(#_) .mk-stats > .mk-stat .mk-badge { top: -4px; right: 4px; box-shadow: 0 0 0 2px #fff; }
.mk-hero:not(#_) .mk-stats > .mk-stat:active { background: #f6f9fa; transform: none; }
/* sub-module grid · slightly smaller icons, no owner line */
.mk-tile:not(#_) .mk-tile__ico { width: 46px; height: 46px; border-radius: 15px; }
.mk-tile:not(#_) .mk-tile__ico .icon { width: 20px; height: 20px; }
.mk-tile:not(#_) small { display: none; }
.mk-tile:not(#_) b { margin-top: 7px; font-size: 11.5px; line-height: 14px; }
.mk-grid:not(#_) { row-gap: 16px; }
/* 25 Nov · counter strip transparent on the teal hero (white text, light dividers, pending in soft amber) */
.mk-hero:not(#_) .mk-stats { padding: 4px 0; background: transparent; box-shadow: none; border-radius: 0; }
.mk-hero:not(#_) .mk-stats > .mk-stat, .mk-hero:not(#_) .mk-stats > .mk-stat--hl { border-left-color: rgba(255, 255, 255, .22); color: #fff; }
.mk-hero:not(#_) .mk-stats > .mk-stat:first-child { padding-left: 2px; }
.mk-hero:not(#_) .mk-stats > .mk-stat strong, .mk-hero:not(#_) .mk-stats > .mk-stat--hl strong { color: #fff; }
.mk-hero:not(#_) .mk-stats > .mk-stat strong.is-amber { color: #fcd34d; }
.mk-hero:not(#_) .mk-stats > .mk-stat .mk-stat__l, .mk-hero:not(#_) .mk-stats > .mk-stat--hl .mk-stat__l { color: rgba(255, 255, 255, .82); }
.mk-hero:not(#_) .mk-stats > .mk-stat .mk-badge { box-shadow: 0 0 0 2px rgba(15, 118, 110, .95); }
.mk-hero:not(#_) .mk-stats > .mk-stat:active { background: rgba(255, 255, 255, .08); }
/* 25 Nov · counters like the reference: one frosted glass bar, centred number + label, thin dividers, amber dot for "needs action" */
.mk-hero:not(#_) .mk-stats { padding: 12px 0; border: 1px solid rgba(255, 255, 255, .22); border-radius: 18px; background: rgba(255, 255, 255, .1); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.mk-hero:not(#_) .mk-stats > .mk-stat, .mk-hero:not(#_) .mk-stats > .mk-stat--hl { align-items: center; text-align: center; gap: 4px; padding: 0 6px; border-left-color: rgba(255, 255, 255, .2); }
.mk-hero:not(#_) .mk-stats > .mk-stat:first-child { padding-left: 6px; }
.mk-hero:not(#_) .mk-stats > .mk-stat strong, .mk-hero:not(#_) .mk-stats > .mk-stat--hl strong { position: relative; font-size: 20px; color: #fff; }
.mk-hero:not(#_) .mk-stats > .mk-stat strong.is-amber { color: #fff; }
.mk-hero:not(#_) .mk-stats > .mk-stat strong.is-amber::after { content: ""; position: absolute; top: 50%; right: -11px; width: 7px; height: 7px; margin-top: -4px; border-radius: 50%; background: #fbbf24; box-shadow: 0 0 0 3px rgba(251, 191, 36, .25); }
.mk-hero:not(#_) .mk-stats > .mk-stat .mk-stat__l, .mk-hero:not(#_) .mk-stats > .mk-stat--hl .mk-stat__l { font-size: 11px; font-weight: 600; color: rgba(255, 255, 255, .88); text-align: center; }
.mk-hero:not(#_) .mk-stats > .mk-stat strong { display: inline-block; width: auto; max-width: none; overflow: visible; }
.mk-hero:not(#_) .mk-stats > .mk-stat strong.is-amber::after { right: -12px; }
/* 25 Nov · quick action tiles: less padding, one-line labels, equal height */
.mk-qa:not(#_) .hm-qagrid > .hm-shortcut { gap: 7px; padding: 11px 4px 10px; border-radius: 16px; }
.mk-qa:not(#_) .hm-shortcut__ico { width: 40px; height: 40px; border-radius: 13px; }
.mk-qa:not(#_) .hm-shortcut__ico .icon { width: 18px; height: 18px; }
.mk-qa:not(#_) .hm-qagrid > .hm-shortcut > span:last-child { min-height: 0; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11.5px; line-height: 15px; }
.mk-qa:not(#_) .hm-qagrid { gap: 6px; }
.mk-qa:not(#_) .hm-qagrid > .hm-shortcut { flex-basis: calc((100% - 18px) / 4); padding-left: 1px; padding-right: 1px; }
.mk-qa:not(#_) .hm-qagrid > .hm-shortcut > span:last-child { font-size: 10.5px; letter-spacing: -.15px; text-overflow: clip; }
.mk-qa:not(#_) .hm-qagrid > .hm-shortcut > span:last-child { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; overflow: hidden; font-size: 10.5px; line-height: 13px; letter-spacing: 0; }
.mk-qa:not(#_) .hm-qagrid > .hm-shortcut { padding-top: 10px; padding-bottom: 9px; gap: 6px; }
/* 25 Nov · quick actions without white cards: icon + label straight on the page */
.mk-qa:not(#_) .hm-qagrid > .hm-shortcut { padding: 2px 0 0; border: 0; background: transparent; box-shadow: none; }
.mk-qa:not(#_) .hm-qagrid > .hm-shortcut:active { background: transparent; }
.mk-qa:not(#_) .hm-shortcut__ico { width: 48px; height: 48px; border-radius: 16px; box-shadow: 0 4px 12px -6px rgba(16, 42, 48, .25); }
.mk-qa:not(#_) .hm-shortcut__ico .icon { width: 20px; height: 20px; }
.mk-qa:not(#_) .hm-qagrid > .hm-shortcut > span:last-child { font-size: 11px; font-weight: 700; line-height: 13px; }
.mk-qa:not(#_) .hm-qagrid.is-wide > .hm-shortcut { padding: 8px 10px; border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgba(16, 42, 48, .05); }
/* 25 Nov · quick actions as ONE white action bar (matches the counter bar): 4 equal columns, thin dividers, small tinted icon + label */
.mk-qa:not(#_) .hm-qagrid { gap: 0; padding: 12px 0 11px; border: 1px solid rgba(230, 236, 238, .9); border-radius: 18px; background: #fff; box-shadow: 0 1px 2px rgba(16, 42, 48, .05), 0 8px 22px -16px rgba(16, 42, 48, .35); }
.mk-qa:not(#_) .hm-qagrid > .hm-shortcut { flex: 1 1 0; gap: 7px; padding: 0 4px; border: 0; border-left: 1px solid #edf1f4; border-radius: 0; background: transparent; box-shadow: none; }
.mk-qa:not(#_) .hm-qagrid > .hm-shortcut:first-child { border-left: 0; }
.mk-qa:not(#_) .hm-shortcut__ico { width: 38px; height: 38px; border-radius: 12px; box-shadow: none; }
.mk-qa:not(#_) .hm-shortcut__ico .icon { width: 18px; height: 18px; }
.mk-qa:not(#_) .hm-qagrid > .hm-shortcut > span:last-child { font-size: 10.5px; font-weight: 700; line-height: 13px; color: var(--color-text); }
.mk-qa:not(#_) .hm-qagrid.is-wide > .hm-shortcut { flex-direction: row; justify-content: center; gap: 10px; padding: 2px 10px; border-radius: 0; background: transparent; box-shadow: none; }
/* 25 Nov · More / Less as a full-width footer of the sub-modules card (no empty space left and right) */
.mk-morebtn:not(#_) { width: calc(100% + 12px); height: 42px; margin: 16px -6px -14px; padding: 0 16px; border: 0; border-top: 1px solid #edf1f4; border-radius: 0 0 20px 20px; background: #f8fbfb; font-size: 12.5px; font-weight: 700; color: var(--color-primary-dark, #0f766e); }
.mk-morebtn:not(#_):active { background: #eef6f5; }
/* 25 Nov · Home dashboards: hero counters as ONE frosted glass bar (same as the module homes) */
.dash-hero__stats:not(#_) { gap: 0; padding: 12px 0; border: 1px solid rgba(255, 255, 255, .22); border-radius: 18px; background: rgba(255, 255, 255, .1); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dash-hero__stats:not(#_) > .hero-chip { position: relative; flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; padding: 0 6px; border: 0; border-left: 1px solid rgba(255, 255, 255, .2); border-radius: 0; background: transparent; box-shadow: none; text-align: center; }
.dash-hero__stats:not(#_) > .hero-chip:first-child { border-left: 0; }
.dash-hero__stats:not(#_) > .hero-chip strong { font-size: 20px; font-weight: 800; line-height: 1.1; color: #fff; }
.dash-hero__stats:not(#_) > .hero-chip > span:not(.hero-chip__dot) { font-size: 11px; font-weight: 600; line-height: 1.25; color: rgba(255, 255, 255, .88); text-align: center; }
.dash-hero__stats:not(#_) > .hero-chip .hero-chip__dot { position: absolute; top: 7px; left: calc(50% + 16px); width: 7px; height: 7px; margin: 0; border-radius: 50%; background: #fbbf24; box-shadow: 0 0 0 3px rgba(251, 191, 36, .25); }
.dash-hero__stats:not(#_) > .hero-chip:active { background: rgba(255, 255, 255, .08); }

/* Side drawer (☰) · GP app pattern: dim overlay, white panel from the left, teal profile header, grouped rows, footer */
.hm-drw-wrap { position: absolute; inset: 0; z-index: 45; }
.hm-drw-lock .screen { overflow: hidden; }
.hm-drw__scrim { position: absolute; inset: 0; width: 100%; border: 0; padding: 0; background: rgba(32, 42, 55, 0.45); opacity: 0; transition: opacity 0.24s ease; cursor: pointer; }
.hm-drw { position: absolute; top: 0; bottom: 0; left: 0; display: flex; flex-direction: column; width: 82%; max-width: 320px; background: #fff; box-shadow: 0 0 40px rgba(32, 42, 55, 0.28); transform: translateX(-102%); transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1); font-family: inherit; }
.hm-drw-wrap.is-open .hm-drw__scrim { opacity: 1; }
.hm-drw-wrap.is-open .hm-drw { transform: none; }
.hm-drw__head { flex: 0 0 auto; padding: calc(var(--statusbar-height, 44px) + 8px) 16px 18px; border-radius: 0 0 24px 0; color: #fff; background: radial-gradient(90% 70% at 100% 100%, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0) 60%), linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-dark) 62%, var(--color-primary-deep) 100%); }
.hm-drw__bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.hm-drw__bar img { height: 26px; width: auto; }
.hm-drw__x { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 50%; color: #fff; background: rgba(255, 255, 255, 0.14); cursor: pointer; }
.hm-drw__x:focus-visible, .hm-drw__prof:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.hm-drw__who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.hm-drw__av { flex: 0 0 48px; display: grid; place-items: center; width: 48px; height: 48px; border: 2px solid rgba(255, 255, 255, 0.3); border-radius: 50%; font-size: 16px; font-weight: 800; color: #fff; background: rgba(255, 255, 255, 0.16); }
.hm-drw__who .grow { min-width: 0; }
.hm-drw__who b { display: block; overflow: hidden; font-size: 15px; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; }
.hm-drw__who small { display: block; margin-top: 2px; font-size: 12px; line-height: 1.35; color: rgba(255, 255, 255, 0.78); }
.hm-drw__who small + small { color: rgba(255, 255, 255, 0.64); font-size: 11.5px; }
.hm-drw__prof { display: block; margin-top: 14px; padding: 8px; border: 1px solid rgba(255, 255, 255, 0.24); border-radius: 999px; font-size: 12.5px; font-weight: 700; text-align: center; color: #fff; background: rgba(255, 255, 255, 0.14); }
.hm-drw__body { flex: 1 1 auto; overflow-y: auto; padding: 4px 10px 8px; scrollbar-width: none; }
.hm-drw__body::-webkit-scrollbar { display: none; }
.hm-drw__h { margin: 0; padding: 12px 10px 6px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-subtle); }
.hm-drw__row { display: flex; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 14px; font-size: 13.5px; font-weight: 700; color: var(--color-text); }
.hm-drw__row:hover { background: var(--color-bg); }
.hm-drw__row.is-cur { color: var(--color-primary-dark); background: color-mix(in srgb, var(--color-primary) 8%, transparent); font-weight: 800; }
.hm-drw__row .grow { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hm-drw__ico { flex: 0 0 32px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: var(--st-c, var(--color-primary-dark)); background: var(--st-bg, var(--color-bg)); }
.hm-drw__n { flex: 0 0 auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; font-size: 10.5px; font-weight: 800; line-height: 18px; text-align: center; color: #fff; background: var(--color-emergency); }
.hm-drw__chev { color: var(--color-text-subtle); opacity: 0.6; }
.hm-drw__more { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 4px; padding: 6px 10px 6px 54px; font-size: 12.5px; font-weight: 700; color: var(--color-primary-dark); }
.hm-drw__foot { flex: 0 0 auto; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 14px; border-top: 1px solid var(--color-border); }
.hm-drw__btns { display: flex; gap: 8px; }
.hm-drw__btns .btn { flex: 1 1 0; gap: 6px; }
.hm-drw__foot .btn--danger-ghost { gap: 6px; }
.hm-drw__ver { margin: 0; font-size: 11.5px; text-align: center; color: var(--color-text-subtle); }
/* 25 Nov · Home: tighter gap between the emergency slider and Hospital Departments */
.hm-slider:not(#_) { margin-bottom: 0; }
.hm-slider:not(#_) + .hm-modcard, .hm-slider:not(#_) + .need-card { margin-top: 12px; }

/* ---- 26 Nov · Home (approved mockup p40): greeting hero, glass counter bar, floating search, then
   Emergency (slim) → What do you need? → Departments → Needs your attention → Today. Compact, 8-pt spacing.
   :not(#_) lifts these over the older home layers above without !important. */
.tn-violet { --st-c: #7A4CC2; --st-bg: #F1EAFB; }
.hm-h2.dash-head:not(#_) { padding-bottom: 44px; border-radius: 0 0 28px 28px;
  background: radial-gradient(120% 80% at 100% 0%, rgba(94, 234, 212, .32) 0%, rgba(94, 234, 212, 0) 55%), radial-gradient(90% 70% at 0% 100%, rgba(8, 64, 60, .5) 0%, rgba(8, 64, 60, 0) 60%), linear-gradient(160deg, #0E6F68 0%, #0F8379 48%, #12A091 100%); }
.hm-h2:not(#_)::before, .hm-h2:not(#_)::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.hm-h2:not(#_)::before { width: 260px; height: 260px; right: -96px; top: 56px; border: 1px solid rgba(255, 255, 255, .12); }
.hm-h2:not(#_)::after { width: 176px; height: 176px; right: -44px; top: 98px; border: 1px solid rgba(255, 255, 255, .09); }
.hm-h2:not(#_) .dash-top { padding: 14px 0 12px; }
.hm-h2:not(#_) .header-btn { flex-basis: 40px; width: 40px; height: 40px; border-radius: 14px; }
.hm-h2:not(#_) .hm-h2-av { border: 0; border-radius: 50%; font-size: 13.5px; font-weight: 800; letter-spacing: .02em; color: #0B5852; background: linear-gradient(145deg, #fff, #CFF3EC); box-shadow: 0 0 0 2px rgba(255, 255, 255, .35), 0 6px 14px rgba(4, 47, 44, .25); }
.hm-h2:not(#_) .dash-hero { position: relative; z-index: 1; }
.hm-h2:not(#_) .dash-hero__mark { right: -36px; bottom: -86px; height: 170px; opacity: .06; }
.hm-h2:not(#_) .dash-hero__date { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: none; font-variant-caps: all-small-caps; color: rgba(255, 255, 255, .74); }
.hm-h2:not(#_) .dash-hero h1 { margin: 2px 0 0; font-size: 24px; font-weight: 800; line-height: 30px; letter-spacing: -.02em; }
.hm-h2-where { display: flex; align-items: center; gap: 8px; min-width: 0; margin-top: 6px; }
.hm-h2-place { display: inline-flex; align-items: center; gap: 2px; min-width: 0; overflow: hidden; padding: 0; border: 0; font: inherit; font-size: 13.5px; font-weight: 600; white-space: nowrap; color: rgba(255, 255, 255, .9); background: none; }
.hm-h2-place b { flex: 0 0 auto; font-weight: 800; color: #fff; }
.hm-h2-place .hm-h2-br { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.hm-h2-place .icon { flex: 0 0 16px; width: 16px; height: 16px; margin-left: 2px; opacity: .85; }
button.hm-h2-place { cursor: pointer; }
.hm-h2-where .status-pill { flex: 0 0 auto; gap: 4px; height: 24px; padding: 0 9px 0 7px; font-size: 11.5px; font-weight: 800; border-color: rgba(255, 255, 255, .24); background: rgba(255, 255, 255, .16); }
.hm-h2-where .status-pill .icon { width: 13px; height: 13px; stroke-width: 3; color: #7CF5D9; }
.hm-h2-where .status-pill__dot { width: 7px; height: 7px; background: #7CF5D9; box-shadow: 0 0 0 3px rgba(124, 245, 217, .22); }
.hm-h2-where .status-pill.is-off .status-pill__dot { background: rgba(255, 255, 255, .55); box-shadow: none; }
.hm-h2:not(#_) .dash-hero__stats { margin-top: 16px; padding: 11px 0; }
.hm-h2:not(#_) .dash-hero__stats > .hero-chip strong { font-size: 20px; }
/* floating search */
.hm-h2 + .hm-h2-body:not(#_) { gap: 0; padding: 0 16px 24px; }
.hm-h2 + .hm-h2-body > .hm-gsearch:first-child:not(#_) { height: 52px; margin-top: -26px; padding: 0 6px 0 14px; border: 0; border-radius: 18px; box-shadow: 0 2px 4px rgba(16, 42, 48, .04), 0 14px 32px rgba(12, 70, 66, .15); }
.hm-h2 + .hm-h2-body > .hm-gsearch .searchbar__location { gap: 5px; padding-right: 10px; border-right: 1px solid #E9EEF0; font-size: 12.5px; font-weight: 800; color: var(--color-text); }
.hm-h2 + .hm-h2-body > .hm-gsearch input:not(#_) { padding: 0 6px 0 10px; font-size: 13px; }
.hm-h2 + .hm-h2-body > .hm-gsearch .icon-btn { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 13px; color: var(--color-text-muted); }
/* emergency: one slim line, only when active */
.hm-h2-body > .hm-emstrip.hm-h2-em:not(#_) { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; min-height: 44px; padding: 0 10px 0 7px; border: 1px solid #F6CDD2; border-radius: 14px; color: #3D5157; background: linear-gradient(100deg, #FFF0F1 0%, #FFF7F7 100%); box-shadow: none; }
.hm-h2-em .hm-emstrip__ico:not(#_) { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 10px; color: #fff; background: #D23F4F; box-shadow: 0 0 0 4px rgba(210, 63, 79, .12); }
.hm-h2-em .hm-emstrip__ico .icon { width: 15px; height: 15px; fill: #fff; }
.hm-h2-em > .grow:not(#_) { display: block; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12.5px; font-weight: 600; opacity: 1; }
.hm-h2-em > .grow b:not(#_) { display: inline; font-size: 12.5px; font-weight: 800; color: #D23F4F; }
.hm-h2-em > .grow em { font-style: normal; font-weight: 800; color: var(--color-text); }
.hm-h2-em > .icon:last-child { flex: 0 0 16px; color: #D23F4F; }
/* sections + cards */
.hm-h2-sec { margin-top: 20px; }
.hm-h2-body > .hm-gsearch + .hm-h2-sec, .hm-h2-body > .hm-gs-results + .hm-h2-sec { margin-top: 16px; }
.hm-h2-sh { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 2px 8px; }
.hm-h2-sh h2 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 15px; font-weight: 800; line-height: 22px; letter-spacing: -.01em; color: var(--color-text); }
.hm-h2-n { min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; box-sizing: border-box; border-radius: 10px; font-size: 11px; font-weight: 800; color: #D23F4F; background: #FDECEE; }
.hm-h2-sh > a { display: inline-flex; align-items: center; gap: 1px; font-size: 12.5px; font-weight: 700; color: var(--color-primary-dark); text-decoration: none; white-space: nowrap; }
.hm-h2-sh > a .icon { width: 15px; height: 15px; }
.hm-h2-card { overflow: hidden; border: 1px solid rgba(225, 232, 234, .8); border-radius: 18px; background: #fff; box-shadow: 0 1px 2px rgba(16, 42, 48, .04), 0 4px 14px rgba(16, 42, 48, .05); }
.hm-h2-ico { flex: 0 0 32px; width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 10px; color: var(--st-c, var(--color-primary-dark)); background: var(--st-bg, var(--color-primary-soft)); }
.hm-h2-ico .icon { width: 17px; height: 17px; }
.hm-h2-empty { display: flex; align-items: center; gap: 8px; margin: 0; padding: 12px 14px; font-size: 12.5px; font-weight: 600; color: var(--color-text-muted); }
.hm-h2-empty .icon { color: var(--color-primary); }
/* What do you need? · 4 × 2 tiles */
.hm-h2-need { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 2px; padding: 14px 4px 10px; overflow: visible; }
.hm-h2-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; color: var(--color-text); text-decoration: none; }
.hm-h2-tile__ico { position: relative; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 15px; color: var(--st-c); background: var(--st-bg); transition: transform .15s ease; }
.hm-h2-tile__ico > .icon { width: 21px; height: 21px; stroke-width: 1.8; }
.hm-h2-tile:active .hm-h2-tile__ico { transform: scale(.94); }
.hm-h2-badge { position: absolute; top: -5px; right: -7px; min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center; box-sizing: border-box; border-radius: 9px; font-size: 10px; font-weight: 800; line-height: 1; color: #fff; background: #D23F4F; box-shadow: 0 0 0 2px #fff; }
.hm-h2-tile__l { max-width: 100%; min-height: 28px; padding: 0 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 11px; font-weight: 700; line-height: 14px; text-align: center; }
/* Departments · one slim 2-column list */
.hm-h2-dcard .hm-favs:not(#_) { margin: 0; padding: 10px 12px 2px; }
.hm-h2-dcard .hm-favs .hm-gs-h { margin: 0 0 2px 2px; }
.hm-h2-dcard .hm-favs .hm-shortcuts { margin: 4px 0 6px; }
.hm-h2-dcard .hm-favs .hm-shortcut { padding: 5px 10px 5px 5px; font-size: 12px; }
.hm-h2-dcard .hm-favs .hm-shortcut__ico { width: 22px; height: 22px; }
.hm-h2-depts { display: grid; grid-template-columns: 1fr 1fr; }
.hm-h2-depts > .hm-cat.hm-h2-dp:not(#_) { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 0; padding: 10px 12px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.hm-h2-depts > .hm-h2-dp:nth-child(even)::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 1px; background: #EDF1F3; }
.hm-h2-depts > .hm-h2-dp:nth-child(n+3)::after { content: ""; position: absolute; top: 0; left: 12px; right: 12px; height: 1px; background: #EDF1F3; }
.hm-h2-depts > .hm-h2-dp:not(#_):active { background: var(--color-bg); }
.hm-h2-dp__nm { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; font-weight: 700; color: var(--color-text); }
.hm-h2-dp__ct { flex: 0 0 auto; min-width: 24px; height: 20px; padding: 0 7px; display: inline-grid; place-items: center; box-sizing: border-box; border-radius: 10px; font-size: 11px; font-weight: 800; color: var(--st-c); background: var(--st-bg); }
/* Needs your attention · slim rows */
.hm-h2-arow { position: relative; display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 12px; color: var(--color-text); text-decoration: none; }
.hm-h2-arow + .hm-h2-arow::before { content: ""; position: absolute; top: 0; left: 54px; right: 12px; height: 1px; background: #EDF1F3; }
.hm-h2-arow .grow { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; font-weight: 600; color: #3D5157; }
.hm-h2-arow .grow b { font-weight: 800; color: var(--color-text); }
.hm-h2-go { flex: 0 0 auto; height: 28px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 14px; font-size: 12px; font-weight: 800; color: var(--color-primary-dark); background: #E6F6F3; }
.hm-h2-go.is-pri { color: #fff; background: linear-gradient(135deg, #0F766E, #14A493); box-shadow: 0 4px 10px rgba(15, 118, 110, .25); }
.hm-h2-arow:active { background: var(--color-bg); }
/* Today · shift line + timeline rows */
.hm-h2-today { padding: 4px 12px; }
.hm-h2-shift { display: flex; align-items: center; gap: 10px; margin: 6px 0; padding: 8px 10px; border: 1px solid #D5EEE8; border-radius: 12px; color: var(--color-text); text-decoration: none; background: linear-gradient(110deg, #E9F7F4 0%, #F4FBF9 100%); }
.hm-h2-shift .hm-h2-ico { color: var(--color-primary-dark); background: #fff; box-shadow: 0 2px 6px rgba(15, 118, 110, .12); }
.hm-h2-shift .grow, .hm-h2-tl .grow { min-width: 0; }
.hm-h2-shift b, .hm-h2-tl b { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; font-weight: 800; line-height: 18px; }
.hm-h2-shift small, .hm-h2-tl small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11.5px; font-weight: 600; line-height: 16px; color: var(--color-text-muted); }
.hm-h2-live { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 11px; font-weight: 800; color: #1F7A45; background: #E1F5E8; }
.hm-h2-live i { width: 6px; height: 6px; border-radius: 50%; background: #2EAF62; box-shadow: 0 0 0 3px rgba(46, 175, 98, .18); }
.hm-h2-tl { position: relative; display: grid; grid-template-columns: 42px 12px minmax(0, 1fr) auto; column-gap: 10px; align-items: center; padding: 8px 0; color: var(--color-text); text-decoration: none; }
.hm-h2-tl__tm { font-size: 13px; font-weight: 800; color: var(--color-text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hm-h2-tl__rail { position: relative; align-self: stretch; display: grid; place-items: center; }
.hm-h2-tl__rail::before { content: ""; position: absolute; left: 50%; top: -8px; bottom: -8px; width: 2px; margin-left: -1px; background: #E9EEF0; }
.hm-h2-tl:first-child .hm-h2-tl__rail::before, .hm-h2-shift + .hm-h2-tl .hm-h2-tl__rail::before { top: 50%; }
.hm-h2-tl:last-child .hm-h2-tl__rail::before { bottom: 50%; }
.hm-h2-tl:first-child:last-child .hm-h2-tl__rail::before, .hm-h2-shift + .hm-h2-tl:last-child .hm-h2-tl__rail::before { display: none; }
.hm-h2-tl__rail i { position: relative; width: 11px; height: 11px; box-sizing: border-box; border: 3px solid var(--st-c); border-radius: 50%; background: #fff; }
.hm-h2-tag { flex: 0 0 auto; height: 22px; padding: 0 8px; display: inline-flex; align-items: center; gap: 4px; border-radius: 11px; font-size: 11px; font-weight: 800; white-space: nowrap; color: var(--st-c); background: var(--st-bg); }
.hm-h2-tag .icon { width: 12px; height: 12px; stroke-width: 2.2; }
/* links other modules add to the employee Home (Report an incident · My reports): slim rows */
.hm-h2-body > .hm-linkcard:not(#_) { gap: 10px; margin-top: 8px; padding: 9px 12px; border-radius: 14px; box-shadow: none; }
.hm-h2-body > .hm-h2-sec + .hm-linkcard:not(#_) { margin-top: 16px; }
.hm-h2-body > .hm-linkcard strong { font-size: 13px; }
.hm-h2-body > .hm-linkcard span span { font-size: 11.5px; }
.hm-h2-body > .hm-linkcard > .icon:first-child { width: 18px; height: 18px; }
/* every counter on one glass bar (5 for consultants), labels max 2 lines */
.hm-h2:not(#_) .dash-hero__stats { display: flex; }
.hm-h2:not(#_) .dash-hero__stats > .hero-chip { min-width: 0; padding: 0 4px; }
.hm-h2:not(#_) .dash-hero__stats > .hero-chip > span:not(.hero-chip__dot) { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 10.5px; line-height: 13px; }
.hm-h2-tile__l.is-long { font-size: 10px; letter-spacing: -.2px; }
/* 26 Nov · Departments a little bigger */
.hm-h2-depts > .hm-cat.hm-h2-dp:not(#_) { gap: 12px; padding: 14px 14px; }
.hm-h2-depts > .hm-h2-dp:not(#_) .hm-cat__ico, .hm-h2-depts > .hm-h2-dp:not(#_) > span:first-child { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 12px; }
.hm-h2-depts > .hm-h2-dp:not(#_) .icon { width: 18px; height: 18px; }
.hm-h2-dp__nm:not(#_) { font-size: 14px; }
.hm-h2-dp__ct:not(#_) { min-width: 26px; height: 22px; font-size: 11.5px; }
.hm-h2-depts > .hm-h2-dp:nth-child(even)::before { top: 12px; bottom: 12px; }
/* 26 Nov · Home hero: airier, cleaner rhythm */
.hm-h2.dash-head:not(#_) { padding-bottom: 52px; }
.hm-h2:not(#_) .dash-top { padding: 16px 0 18px; }
.hm-h2:not(#_) .dash-hero__date { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: rgba(255, 255, 255, .72); }
.hm-h2:not(#_) .dash-hero h1 { margin: 6px 0 0; font-size: 22px; line-height: 28px; }
.hm-h2-where:not(#_) { margin-top: 10px; gap: 10px; }
.hm-h2-place:not(#_) { font-size: 13px; color: rgba(255, 255, 255, .85); }
.hm-h2-where .status-pill:not(#_) { height: 22px; font-size: 11px; }
.hm-h2:not(#_) .dash-hero__stats { margin-top: 20px; padding: 13px 0; border-radius: 16px; }
.hm-h2:not(#_) .dash-hero__stats > .hero-chip strong { font-size: 19px; }
.hm-h2:not(#_) .dash-hero__stats > .hero-chip > span:not(.hero-chip__dot) { margin-top: 2px; font-size: 10.5px; }
.hm-h2 + .hm-h2-body > .hm-gsearch:first-child:not(#_) { height: 50px; margin-top: -25px; border-radius: 16px; }
.hm-h2-body > .hm-emstrip.hm-h2-em:not(#_) { margin-top: 16px; }
.cw-newcase { margin-bottom: 12px; gap: 6px; }
.hm-h2-dp__nm:not(#_) { font-size: 13.5px; text-overflow: clip; }
.hm-h2-depts > .hm-cat.hm-h2-dp:not(#_) { gap: 10px; padding-left: 12px; padding-right: 12px; }
/* 26 Nov · no decorative circle lines in the hero headers (Home and module pages) */
.hm-h2:not(#_)::before, .hm-h2:not(#_)::after, .mk-hero:not(#_)::before, .mk-hero:not(#_)::after { display: none; }
.hm-h2:not(#_) .dash-hero__mark { display: none; }
