.dashboard {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* No overflow here: an overflow on this wrapper makes it the scroll container the
     sticky header is measured against, so the header scrolled away with the page.
     Horizontal clipping lives on body (base.css), which the viewport inherits. */
}

.dashboard-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background-color: var(--c-popup-bg);
  border-bottom: 1px solid var(--c-border);
}

/* The dashboard's header and filter bar stick as one block: the bar must never open
   behind the header, which it did once the page was scrolled and the bar, in the
   flow, had gone under the pinned header. */
.dashboard-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
}

.dashboard-topbar .dashboard-header {
  position: static;
}

.dashboard-header__right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dashboard-search-toggle {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid var(--c-border);
  background: transparent;
  color: var(--c-base-subtitle-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dashboard-search-toggle svg {
  width: 1rem;
  height: 1rem;
}

.dashboard-search-toggle:hover {
  border-color: var(--c-brand);
  color: var(--c-brand);
}

.dashboard-search-toggle--active {
  border-color: var(--c-brand);
  color: var(--c-brand);
}

.dashboard-add-patient-toggle {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid var(--c-border);
  background: transparent;
  color: var(--c-base-subtitle-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 1.25rem;
  line-height: 1;
}

.dashboard-add-patient-toggle:hover {
  border-color: var(--c-brand);
  color: var(--c-brand);
}

/* Toolbar */

.dashboard-toolbar {
  display: grid;
  grid-template-rows: 0fr;
  background-color: var(--c-popup-bg);
  transition: grid-template-rows 0.3s ease, opacity 0.2s ease;
  opacity: 0;
  position: relative;
  z-index: 5;
}

.dashboard-toolbar--open {
  grid-template-rows: 1fr;
  opacity: 1;
}

.dashboard-toolbar__content {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0 2rem;
  min-height: 0;
  overflow: hidden;
  border-bottom: 1px solid transparent;
}

.dashboard-toolbar--open .dashboard-toolbar__content {
  overflow: visible;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom-color: var(--c-border);
}

.dashboard-toolbar__left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  flex: 1;
  min-width: 0;
}

.dashboard-toolbar__filters {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem;
  flex-shrink: 1;
  min-width: 0;
}

.dashboard-toolbar__filters .form-group {
  margin-bottom: 0;
}

.dashboard-toolbar__select {
  min-width: 10rem;
}

.dashboard-toolbar__search {
  flex: 1 1 240px;
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: 500px;
}

.dashboard-toolbar__search .base-searchbar-underline {
  width: 100%;
}

.dashboard-toolbar__search .base-searchbar-underline__input {
  font-size: clamp(1.25rem, 3vw, 2.5rem);
  padding: 0 0.5rem 0 2.75rem;
  line-height: 1;
}

.dashboard-toolbar__search .base-searchbar-underline__icon {
  width: clamp(1.25rem, 2.2vw, 2rem);
  height: clamp(1.25rem, 2.2vw, 2rem);
}

.dashboard-toolbar__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-left: auto;
}

@media (max-width: 720px) {
  .dashboard-toolbar__content {
    padding: 0 1rem;
  }

  .dashboard-toolbar--open .dashboard-toolbar__content {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .dashboard-toolbar__left {
    width: 100%;
    flex: 1 1 100%;
  }

  .dashboard-toolbar__select,
  .dashboard-toolbar__filters {
    width: 100%;
    min-width: 0;
  }

  .dashboard-toolbar__select {
    min-width: 0;
  }

  .dashboard-toolbar__search {
    flex: 1 1 100%;
    max-width: none;
  }

  .dashboard-toolbar__actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
  }

  .dashboard-header {
    padding: 0.75rem 1rem;
  }

  .dashboard-content {
    padding: 1.25rem 1rem 1.5rem;
  }
}

.dashboard-toolbar__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  border: none;
  background-color: var(--c-brand);
  color: var(--c-brand-text);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s ease;
}

.dashboard-toolbar__btn:hover {
  opacity: 0.85;
}

.dashboard-toolbar__btn--secondary {
  background-color: transparent;
  color: var(--c-brand);
  border: 1px solid var(--c-brand);
}

.dashboard-toolbar__btn--secondary:hover {
  background-color: var(--c-brand-highlight);
  opacity: 1;
}

.dashboard-content {
  flex: 1;
  padding: 40px 2rem 2rem;
}

.dashboard-content__top-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.5rem;
}

/* Quick Menu */

.dashboard-quick-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.dashboard-quick-menu__bar {
  display: flex;
  align-items: center;
  background-color: rgba(59, 130, 246, 0.8);
  border-radius: 0.625rem;
  padding: 0;
  cursor: pointer;
}

.dashboard-quick-menu__trigger {
  width: 3rem;
  height: 3rem;
  border-radius: 0.625rem;
  border: none;
  background-color: var(--c-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-brand-text);
  flex-shrink: 0;
  cursor: pointer;
}

.dashboard-quick-menu__icon {
  width: 1.125rem;
  height: 1.125rem;
}

.dashboard-quick-menu__items {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  transition: max-width 0.33s ease-in-out, opacity 0.33s ease-in-out, margin 0.33s ease-in-out;
}

.dashboard-quick-menu__bar:hover .dashboard-quick-menu__items {
  max-width: 30rem;
  opacity: 1;
  margin-left: 0.5rem;
  margin-right: 0.5rem;
}

.dashboard-quick-menu__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.5rem;
  border-radius: 0.4375rem;
  border: none;
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--c-brand-text);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.dashboard-quick-menu__item:hover {
  background-color: rgba(255, 255, 255, 0.3);
  color: var(--c-brand-text);
}

/* Toggle button with icon */

.dashboard-quick-menu__item--toggle {
  gap: 0.375rem;
}

.dashboard-quick-menu__item-icon {
  width: 0.875rem;
  height: 0.875rem;
  stroke: var(--c-error);
  transition: stroke 0.33s ease-in-out;
}

.dashboard--clean .dashboard-quick-menu__item-icon {
  stroke: var(--c-success);
}

.dashboard-quick-menu__item--active {
  background-color: rgba(255, 255, 255, 0.35);
}

/* Force close menu after toggle click */

.dashboard-quick-menu--closing .dashboard-quick-menu__items {
  max-width: 0 !important;
  opacity: 0 !important;
  margin: 0 !important;
}

/* Clean view: collapse header */

.dashboard-header {
  max-height: 5rem;
  transition: max-height 0.33s ease-in-out, padding 0.33s ease-in-out,
              border-color 0.33s ease-in-out, opacity 0.33s ease-in-out;
}

.dashboard--clean .dashboard-header {
  overflow: hidden;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-color: transparent;
  opacity: 0;
}

/* Patients Grid */

.dashboard-patients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem;
}

/* A section under the main grid (patients who finished a plan). It folds down to
   its heading; folded, the heading is a label at the bottom of the view: pushed to
   the end of the content column (the column is a flex column for this) and stuck to
   the bottom while that end is below the view. See folding_section_controller.js.
   Only the dashboard's column: twenty other pages share .dashboard-content, and in a
   flex column anything centred with auto side margins (the plan wizard) stops
   stretching and shrinks to its content. */
.dashboard-content--column {
  display: flex;
  flex-direction: column;
}

.dashboard-content--column > * {
  flex-shrink: 0;
}

.dashboard-section {
  margin-top: 2.5rem;
}

.dashboard-section__heading {
  margin: 0;
  display: flex;
  transition: transform 0.3s ease;
}

.dashboard-section__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: -0.75rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--c-base-subtitle-text);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.3s ease, background-color 0.3s ease, color 0.15s ease, margin-left 0.3s ease;
}

.dashboard-section__toggle:hover {
  color: var(--c-brand);
}

.dashboard-section__count {
  font-weight: 500;
}

.dashboard-section__chevron {
  width: 1rem;
  height: 1rem;
  transition: transform 0.3s ease;
}

/* Closed: the body is a grid row going to nothing (the toolbar's fold) and the
   heading is drawn as a label. Open, the body must not clip the cards' menus. */
.folding-section__body {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.3s ease, opacity 0.25s ease;
}

.folding-section__body > * {
  min-height: 0;
  padding-top: 0.75rem;
  transition: padding-top 0.3s ease;
}

.folding-section--closed .folding-section__body {
  grid-template-rows: 0fr;
  opacity: 0;
}

.folding-section--closed .folding-section__body > * {
  overflow: hidden;
  padding-top: 0;
  pointer-events: none;
}

.folding-section--closed .dashboard-section__chevron {
  transform: rotate(180deg);
}

.folding-section--closed .dashboard-section__toggle {
  margin-left: 0;
  border-color: var(--c-border);
  background-color: var(--c-popup-bg);
}

/* Folded: at the end of the column, stuck to the bottom of the view. Only the label
   itself takes clicks; the rest of the row lets the cards under it through. */
.folding-section--folded {
  margin-top: auto;
  padding-top: 2.5rem;
  pointer-events: none;
}

.folding-section--folded .dashboard-section__toggle {
  pointer-events: auto;
}

.folding-section--folded,
.folding-section--stuck {
  position: sticky;
  bottom: 0.75rem;
  z-index: 4;
}

.folding-section--still,
.folding-section--still * {
  transition: none !important;
}

.dashboard-patient-card--finished .dashboard-patient-card__avatar {
  background-color: var(--c-base-subtitle-text);
}

/* A patient erased under GDPR while on a plan: the card stays, dashed and grey, so the
   clinic sees what happened; nothing on it can be read and only the plan's removal is left */
.dashboard-patient-card--shredded {
  border-style: dashed;
}

.dashboard-patient-card--shredded .dashboard-patient-card__avatar {
  background-color: var(--c-base-subtitle-text);
}

.dashboard-patient-card--shredded .dashboard-patient-card__name {
  color: var(--c-base-subtitle-text);
  font-style: italic;
}

.dashboard-patient-card__badge--shredded {
  color: var(--c-error);
  font-weight: 600;
}

.dashboard-patient-card {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.625rem;
  border: 1px solid var(--c-border);
  background-color: var(--c-popup-bg);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  min-width: 0;
}

.dashboard-patient-card__top {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.dashboard-patient-card:hover {
  border-color: var(--c-brand);
  background-color: var(--c-brand-highlight);
}

.dashboard-patient-card__avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background-color: var(--c-brand);
  color: var(--c-brand-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  flex-shrink: 0;
}

.dashboard-patient-card__info {
  flex: 1;
  min-width: 0;
}

/* The name may take a second line: the birth number behind it is data to read, not to
   cut to "(909513…" — it stays whole and moves down when the row is short. */
.dashboard-patient-card__name {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--c-base-text);
  overflow-wrap: anywhere;
}

/* The birth number behind the name: the plan line's muted tone, never bold */
.dashboard-patient-card__birth-number {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--c-base-subtitle-text);
  margin-left: 0.25rem;
  white-space: nowrap;
}

.dashboard-patient-card__plan-name {
  font-size: 0.6875rem;
  color: var(--c-base-subtitle-text);
  margin-top: 0.0625rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-patient-card__actions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-left: auto;
  flex-shrink: 0;
}

.dashboard-patient-card__icon-btn {
  position: relative;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.375rem;
  border: 1px solid var(--c-border);
  background-color: transparent;
  color: var(--c-base-subtitle-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.dashboard-patient-card__status-dot {
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  border: 1.5px solid var(--c-popup-bg, white);
  pointer-events: none;
}

.dashboard-patient-card__status-dot--red   { background-color: #dc2626; }
.dashboard-patient-card__status-dot--green { background-color: #16a34a; }

.dashboard-patient-card__icon-btn svg {
  width: 0.875rem;
  height: 0.875rem;
}

.dashboard-patient-card__icon-btn:hover {
  border-color: var(--c-brand);
  color: var(--c-brand);
}

.dashboard-patient-card__icon-btn--generated {
  font-family: monospace;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background-color: var(--c-brand-highlight);
  border-color: var(--c-brand);
  color: var(--c-brand);
  width: auto;
  padding: 0 0.375rem;
}

/* As tall as the physician's initials even without them, so the chips sit at the same
   height on every card (a card with no physician used to pull its chips up). */
.dashboard-patient-card__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.375rem;
  flex-wrap: wrap;
  min-height: 1.75rem;
}

/* The chips wrap to a second line when the row is short: a chip that cannot shrink used
   to run under the physician's initials instead. */
.dashboard-patient-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.375rem;
  min-width: 0;
  flex: 1;
}

.dashboard-patient-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.4375rem;
  border-radius: 1rem;
  background-color: var(--c-border);
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--c-base-subtitle-text);
  white-space: nowrap;
}

.dashboard-patient-card__badge svg {
  width: 0.75rem;
  height: 0.75rem;
  flex-shrink: 0;
}

.dashboard-patient-card__badge--reason {
  min-width: 0;
}

.dashboard-patient-card__badge--reason .dashboard-patient-card__badge-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* Card uses overflow:hidden, so flip tooltips upward to avoid clipping. */
.dashboard-patient-card .patient-shelf__tooltip-host[data-tooltip]:hover::after,
.dashboard-patient-card .patient-shelf__tooltip-host[data-tooltip]:focus-visible::after {
  top: auto;
  bottom: calc(100% + 0.5rem);
}

.dashboard-patient-card .patient-shelf__tooltip-host[data-tooltip]:hover::before,
.dashboard-patient-card .patient-shelf__tooltip-host[data-tooltip]:focus-visible::before {
  top: auto;
  bottom: calc(100% + 0.15rem);
  border-top: 0;
  border-left: 0;
  border-bottom: 1px solid var(--c-border);
  border-right: 1px solid var(--c-border);
}

.dashboard-patient-card__physician-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background-color: var(--c-border);
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--c-base-subtitle-text);
  flex-shrink: 0;
}

/* Patient status variants */
.dashboard-patient-card--good {
  background-color: var(--c-severity-good-highlight);
  border-color: var(--c-severity-good);
}
.dashboard-patient-card--good:hover {
  border-color: var(--c-severity-good);
}
.dashboard-patient-card--good .dashboard-patient-card__avatar {
  background-color: var(--c-severity-good);
}

.dashboard-patient-card--bad {
  background-color: var(--c-severity-bad-highlight);
  border-color: var(--c-severity-bad);
}
.dashboard-patient-card--bad:hover {
  border-color: var(--c-severity-bad);
}
.dashboard-patient-card--bad .dashboard-patient-card__avatar {
  background-color: var(--c-severity-bad);
}

.dashboard-patient-card--severe {
  background-color: var(--c-severity-severe-highlight);
  border-color: var(--c-severity-severe);
}
.dashboard-patient-card--severe:hover {
  border-color: var(--c-severity-severe);
}
.dashboard-patient-card--severe .dashboard-patient-card__avatar {
  background-color: var(--c-severity-severe);
}

.dashboard-patient-card--critical {
  background-color: var(--c-severity-critical-highlight);
  border-color: var(--c-severity-critical);
}
.dashboard-patient-card--critical:hover {
  border-color: var(--c-severity-critical);
}
.dashboard-patient-card--critical .dashboard-patient-card__avatar {
  background-color: var(--c-severity-critical);
}

/* Patient card "More" actions menu */
.dashboard-patient-card__menu {
  position: relative;
  order: 1; /* render last in the flex actions row (right-most) */
}
.dashboard-patient-card__menu-dropdown {
  position: absolute;
  top: 100%; /* flush under the button so hover doesn't break across a gap */
  right: 0;
  min-width: 12rem;
  background-color: var(--c-popup-bg, white);
  border: 1px solid var(--c-border);
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 0.25rem;
  z-index: 50;
  display: none;
  flex-direction: column;
}
.dashboard-patient-card__menu-dropdown.is-open,
.dashboard-patient-card__menu:hover .dashboard-patient-card__menu-dropdown {
  display: flex;
}
.dashboard-patient-card__menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.625rem;
  border: none;
  background: transparent;
  border-radius: 0.375rem;
  font: inherit;
  text-align: left;
  color: var(--c-base-text, inherit);
  text-decoration: none;
  cursor: pointer;
}
.dashboard-patient-card__menu-item:hover {
  background-color: var(--c-hover-bg, rgba(0, 0, 0, 0.05));
}
.dashboard-patient-card__menu-item--danger {
  color: #dc2626;
}
.dashboard-patient-card__menu-item--danger:hover {
  background-color: rgba(220, 38, 38, 0.08);
}
.dashboard-patient-card__menu-item svg {
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
}


/* --- Display menu: how the cards are drawn (toolbar, behind the filter icon) --- */
.dashboard-display-menu {
  position: relative;
}

.dashboard-display-menu__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 0.5rem;
  border: 1px solid var(--c-border);
  background-color: transparent;
  color: var(--c-base-subtitle-text);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.dashboard-display-menu__btn svg {
  width: 1rem;
  height: 1rem;
}

.dashboard-display-menu__btn:hover {
  border-color: var(--c-brand);
  color: var(--c-brand);
}

/* The dashboard is in one of the modes once a choice is made; the icon shows it. */
.dashboard--minimized .dashboard-display-menu__btn,
.dashboard--visit-info .dashboard-display-menu__btn {
  border-color: var(--c-brand);
  color: var(--c-brand);
  background-color: var(--c-brand-highlight);
}

.dashboard-display-menu__dropdown {
  position: absolute;
  top: calc(100% + 0.375rem);
  right: 0;
  min-width: 14rem;
  background-color: var(--c-popup-bg);
  border: 1px solid var(--c-border);
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 0.625rem 0.75rem 0.75rem;
  z-index: 50;
  display: none;
  flex-direction: column;
  gap: 0.625rem;
}

.dashboard-display-menu__dropdown.is-open {
  display: flex;
}

.dashboard-display-menu__title {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-base-subtitle-text);
}

.dashboard-display-menu__dropdown .base-radio {
  gap: 0.375rem;
}

.dashboard-display-menu__row {
  padding-top: 0.625rem;
  border-top: 1px solid var(--c-border);
}

/* --- Visit info row on each card: next visit on the left, the patient's answer right --- */
.dashboard-patient-card__visit {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--c-border);
  font-size: 0.75rem;
  color: var(--c-base-text);
}

.dashboard--visit-info .dashboard-patient-card__visit {
  display: flex;
}

.dashboard-patient-card__visit-when {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-patient-card__visit-when--none {
  color: var(--c-base-subtitle-text);
}

.dashboard-patient-card__visit-label {
  color: var(--c-base-subtitle-text);
  margin-right: 0.25rem;
}

.dashboard-patient-card__visit-state {
  flex-shrink: 0;
  padding: 0.125rem 0.5rem;
  border-radius: 1rem;
  font-size: 0.6875rem;
  font-weight: 600;
  border: 1px solid var(--c-border);
  color: var(--c-base-subtitle-text);
}

.dashboard-patient-card__visit-state--confirmed {
  color: var(--c-severity-good);
  border-color: var(--c-severity-good);
  background-color: var(--c-severity-good-highlight);
}

.dashboard-patient-card__visit-state--declined {
  color: var(--c-severity-critical);
  border-color: var(--c-severity-critical);
  background-color: var(--c-severity-critical-highlight);
}

/* --- Minimized cards: the grade colour, the name, the last activity and the reason,
   with the action buttons and the physician's initials kept at a smaller size --- */
.dashboard--minimized .dashboard-patients-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.625rem;
}

.dashboard--minimized .dashboard-patient-card {
  padding: 0.375rem 0.625rem;
  gap: 0.25rem;
}

.dashboard--minimized .dashboard-patient-card__avatar,
.dashboard--minimized .dashboard-patient-card__plan-name,
.dashboard--minimized .dashboard-patient-card__badge--progress {
  display: none;
}

.dashboard--minimized .dashboard-patient-card__top {
  gap: 0.5rem;
}

.dashboard--minimized .dashboard-patient-card__name {
  font-size: 0.8125rem;
}

.dashboard--minimized .dashboard-patient-card__actions {
  gap: 0.25rem;
}

.dashboard--minimized .dashboard-patient-card__icon-btn {
  width: 1.5rem;
  height: 1.5rem;
}

.dashboard--minimized .dashboard-patient-card__icon-btn svg {
  width: 0.75rem;
  height: 0.75rem;
}

/* The login code is text, not an icon: it keeps its own width (the small-button rule
   above is more specific than the card's own --generated rule and squeezed it to 1.5rem,
   clipping the digits). */
.dashboard--minimized .dashboard-patient-card__icon-btn--generated {
  width: auto;
  padding: 0 0.3rem;
  font-size: 0.75rem;
}

.dashboard--minimized .dashboard-patient-card__physician-badge {
  width: 1.5rem;
  height: 1.5rem;
  font-size: 0.5625rem;
}

.dashboard--minimized .dashboard-patient-card__bottom {
  min-height: 1.5rem;
}

.dashboard--minimized .dashboard-patient-card__visit {
  padding-top: 0.375rem;
}
