@charset "UTF-8";

:root {
  --sc-brand: #3f6ad8;
  --sc-brand-dark: #3255ad;
  --sc-accent: #16aaff;
  --sc-surface: #ffffff;
  --sc-shell: #f5f7fb;
  --sc-ink: #263446;
  --sc-text: #263446;
  --sc-heading: #1f2b3a;
  --sc-muted: #6c757d;
  --sc-border: rgba(38, 52, 70, 0.1);
  --sc-header-bg: #ffffff;
  --sc-header-text: #263446;
  --sc-header-muted: #6c757d;
  --sc-header-border: rgba(38, 52, 70, 0.1);
  --sc-header-avatar-bg: rgba(63, 106, 216, 0.12);
  --sc-header-avatar-text: #3255ad;

  /* One layering scale for everything that floats. Add new layers here, never
     as a literal z-index in a component rule. (PBI 37 / RPI-F1) */
  --z-header: 10;
  --z-sidebar-scrim: 1030;
  --z-sidebar: 1040;
  --z-sheet-scrim: 1045;
  --z-dropdown: 1050;
  --z-modal-backdrop: 1060;
  --z-modal: 1070;
  --z-toast: 1080;
}

html,
body {
  min-height: 100%;
}

body {
  background: linear-gradient(180deg, rgba(63, 106, 216, 0.06), transparent 22rem), var(--sc-shell);
  color: var(--sc-ink);
}

body.register-plain {
  background: #fff;
}

a {
  text-decoration: none;
}

.app-brand-image,
.auth-brand-image {
  display: block;
  height: 2.5rem;
  width: auto;
}

.auth-page {
  background: #ffffff;
  min-height: 100vh;
}

.auth-page .auth-shell {
  align-items: flex-start;
  padding: 2rem 0 3rem;
}

.auth-shell__content {
  max-width: 82rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.auth-page-shell {
  margin: 0 auto;
  max-width: 100%;
  padding: 0;
}

.auth-page-shell--login {
  max-width: 100%;
}

.auth-page-shell--register {
  max-width: 100%;
}

.auth-brand {
  align-items: center;
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 0 auto 1.75rem;
  text-align: left;
}

.auth-brand--stacked {
  flex-direction: column;
  text-align: center;
}

.auth-brand--logo-only {
  margin-bottom: 1rem;
}

.auth-brand__mark {
  display: block;
  height: 5rem;
  width: auto;
}

.auth-brand__mark--xl {
  height: 7rem;
}

.auth-brand__copy {
  line-height: 1.05;
}

.auth-brand__wordmark {
  color: #17366f;
  font-size: clamp(1.4rem, 1.4rem + 1vw, 2.5rem);
  font-weight: 800;
  letter-spacing: 0;
}

.auth-brand__tag {
  color: rgba(31, 43, 58, 0.85);
  font-size: 0.92rem;
  font-weight: 700;
}

.public-auth-brand {
  margin-bottom: 2rem;
  gap: 0.8rem;
}

.public-auth-brand .auth-brand__copy {
  align-items: center;
  text-align: center;
}

.public-auth-brand__logo {
  display: block;
  height: 76px;
  max-width: 260px;
  width: auto;
  object-fit: contain;
  /* The logo is a JPEG with an off-white box; multiply drops it onto the page. */
  mix-blend-mode: multiply;
}

.auth-page-title {
  color: #17366f;
  font-size: clamp(2rem, 1.6rem + 1.4vw, 3.3rem);
  font-weight: 800;
  margin: 0 0 1rem;
  text-align: center;
}

.auth-register-heading {
  margin: 0 auto 1.25rem;
  max-width: 56rem;
  text-align: center;
}

.auth-stepper {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 auto;
  max-width: 46rem;
}

.auth-stepper__segment {
  background: rgba(21, 94, 95, 0.12);
  border-radius: 999px;
  color: #1d5d65;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.45rem 0.75rem;
  text-align: center;
}

.auth-stepper__segment.is-complete,
.auth-stepper__segment.is-current {
  background: linear-gradient(90deg, rgba(48, 130, 136, 0.95), rgba(102, 169, 172, 0.95));
  color: #fff;
}

.auth-panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(38, 52, 70, 0.12);
  border-radius: 1.25rem;
  box-shadow: 0 1rem 2.4rem rgba(38, 52, 70, 0.12);
  margin: 0 auto;
  overflow: hidden;
}

.auth-panel--narrow {
  max-width: 100%;
}

.auth-panel--register {
  max-width: 100%;
}

.auth-panel__body {
  padding: 2rem;
}

.auth-panel__footer {
  border-top: 1px solid rgba(38, 52, 70, 0.08);
  padding: 0 2rem 2rem;
}

.public-auth-layout {
  margin-top: 0.25rem;
  align-items: stretch;
}

.public-auth-hero {
  position: relative;
  height: 100%;
  min-height: 100%;
  padding: 2.75rem;
  border: 1px solid rgba(79, 130, 247, 0.12);
  border-radius: 32px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.22), transparent 28rem),
    linear-gradient(135deg, #3f6ad8, #0b3a52);
  color: #fff;
  box-shadow: 0 22px 55px rgba(43, 84, 184, 0.18);
  overflow: hidden;
}

.public-auth-hero::before,
.public-auth-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.public-auth-hero::before {
  width: 170px;
  height: 170px;
  top: -55px;
  right: -35px;
}

.public-auth-hero::after {
  width: 250px;
  height: 250px;
  bottom: -120px;
  left: -80px;
}

.public-auth-hero--compact {
  min-height: 100%;
}

.public-auth-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 1rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(8, 24, 62, 0.32);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.public-auth-hero h1:not(.auth-panel__title) {
  max-width: 16ch;
  margin-bottom: 1rem;
  color: #fff;
  font-size: clamp(2.2rem, 1.7rem + 2vw, 3.9rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.03;
}

.public-auth-hero p {
  max-width: 34rem;
  margin-bottom: 1.75rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.03rem;
  line-height: 1.85;
}

.public-auth-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.public-auth-highlights div {
  padding: 1rem 1.05rem;
  border-radius: 20px;
  background: rgba(8, 24, 62, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.public-auth-highlights span {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.public-auth-highlights small {
  color: rgba(255, 255, 255, 0.92);
}

.public-auth-card {
  /* The card sits inside the white-text hero: set its own ink and a solid
     surface so labels (e.g. "Remember me") are readable and the hero's
     decorative circles do not show through the form. */
  background: #ffffff;
  border-radius: 32px;
  box-shadow: 0 22px 55px rgba(16, 24, 40, 0.1);
  color: var(--sc-ink);
}

.public-auth-card .auth-panel__subtitle {
  color: #52617c;
}

.public-auth-card .form-label,
.public-auth-card .auth-section__title,
.public-auth-card .auth-footer-note,
.public-auth-card .auth-footer-note a,
.public-auth-card .auth-panel__body .text-muted,
.public-auth-card .auth-panel__body .small {
  color: #20324e;
}

.public-auth-card p,
.public-auth-card small {
  color: #52617c;
}

.public-auth-card .auth-panel__body,
.public-auth-card .auth-panel__footer {
  padding-left: 2rem;
  padding-right: 2rem;
}

.auth-panel__title {
  color: #17366f;
  font-size: 1.55rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  text-align: center;
}

.auth-panel__subtitle {
  color: var(--sc-muted);
  margin-bottom: 1.25rem;
  text-align: center;
}

.auth-form .form-label {
  color: #20324e;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.auth-section + .auth-section {
  margin-top: 1.3rem;
}

.auth-section__title {
  align-items: center;
  color: #20324e;
  display: flex;
  font-size: 1rem;
  font-weight: 800;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
  text-transform: uppercase;
}

.auth-section__title i {
  color: #3d8487;
  font-size: 1.1rem;
}

.auth-submit-btn {
    background: linear-gradient(180deg, var(--sc-brand), var(--sc-brand-dark));
    border: 0;
    border-radius: 0.65rem;
    box-shadow: 0 0.65rem 1.2rem rgba(63, 106, 216, 0.22);
    color: #fff;
    font-weight: 700;
    padding: 0.9rem 1rem;
}

    .auth-submit-btn:hover {
        background: var(--sc-brand-dark);
        color: #fff;
    }

.auth-footer-note {
  color: #223548;
  margin-top: 1rem;
  text-align: center;
}

.auth-footer-note--compact {
  margin-top: 0.9rem;
}

.auth-inline-link {
  color: #223548;
}

.auth-inline-link:hover {
  color: var(--sc-brand-dark);
}

.auth-page .form-control,
.auth-page .form-select {
  border-color: rgba(63, 106, 216, 0.18);
  border-radius: 0.75rem;
  min-height: 52px;
}

.auth-page .input-group-text {
  border-color: rgba(63, 106, 216, 0.18);
  background: #f4f7ff;
  color: var(--sc-brand);
}

.auth-page .input-group-merge .form-control {
  border-left: 0;
}

.auth-page .form-check-input:checked {
  background-color: var(--sc-brand);
  border-color: var(--sc-brand);
}

.auth-page .alert {
  border-radius: 0.85rem;
}

.sc-app-shell .app-header {
  background: var(--sc-header-bg);
  
}

.sc-app-shell .app-header.header-shadow {
  box-shadow: 0 0.55rem 1.4rem rgba(38, 52, 70, 0.08);
}

.sc-app-shell .app-header .nav-link,
.sc-app-shell .app-header .dropdown-item,
.sc-app-shell .app-header .header-user-info,
.sc-app-shell .app-header .widget-heading,
.sc-app-shell .app-header .widget-subheading,
.sc-app-shell .app-header .text-muted,
.sc-app-shell .app-header .nav-link-icon,
.sc-app-shell .app-header .search-wrapper,
.sc-app-shell .app-header .search-wrapper .search-input,
.sc-app-shell .app-header .search-wrapper .search-input::placeholder,
.sc-app-shell .app-header .search-wrapper .search-icon,
.sc-app-shell .app-header .btn,
.sc-app-shell .app-header .btn i {
  color: var(--sc-header-text) !important;
}

.sc-app-shell .app-header .nav-link,
.sc-app-shell .app-header .widget-heading {
  font-weight: 700;
}

.sc-app-shell .app-header .widget-subheading,
.sc-app-shell .app-header .text-muted {
  opacity: 0.92;
}

.sc-app-shell .app-header .dropdown-divider,
.sc-app-shell .app-header .physician-header__name,
.sc-app-shell .app-header .physician-header__specialty {
  border-color: var(--sc-header-border);
  color: var(--sc-header-text);
}

.sc-app-shell .app-header .dropdown-menu .dropdown-item {
  color: var(--sc-ink) !important;
}

.sc-app-shell .app-header .dropdown-menu {
  background: #ffffff;
  border: 1px solid var(--sc-header-border);
  box-shadow: 0 1rem 2.5rem rgba(38, 52, 70, 0.18);
  color: var(--sc-ink);
  padding: 0.35rem 0;
  min-width: 16rem;
  z-index: var(--z-dropdown);
}

.sc-app-shell .app-header .dropdown-menu .dropdown-header {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  color: var(--sc-ink);
  font-weight: 700;
  padding: 0.9rem 1rem 0.8rem;
}

.sc-app-shell .app-header .dropdown-menu .dropdown-divider {
  border-top-color: var(--sc-header-border);
  margin: 0.4rem 0;
}

.sc-app-shell .app-header .dropdown-menu .dropdown-item:hover,
.sc-app-shell .app-header .dropdown-menu .dropdown-item:focus {
  background-color: rgba(63, 106, 216, 0.08);
  color: var(--sc-ink);
}

.sc-app-shell .app-header .physician-access__menu-label {
  align-self: flex-start;
  background: rgba(63, 106, 216, 0.1);
  border-radius: 999px;
  color: var(--sc-brand-dark);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  padding: 0.3rem 0.55rem;
  text-transform: uppercase;
}

.sc-app-shell .app-header .physician-access__menu .dropdown-item {
  align-items: center;
  display: flex;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
}

.sc-app-shell .app-header .physician-access__menu .dropdown-item i {
  width: 1rem;
  text-align: center;
}

.sc-app-shell .app-header .physician-header__specialty,
.sc-app-shell .app-header .text-muted {
  color: var(--sc-header-muted) !important;
}

.sc-app-shell .app-header .shell-secondary-label--admin,
.sc-app-shell .app-header .physician-header__specialty--admin {
  align-items: center;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: var(--sc-header-text) !important;
  display: inline-flex;
  font-weight: 700;
  line-height: 1;
  padding: 0.2rem 0.55rem;
  width: fit-content;
}

.sc-app-shell .app-header .nav-link.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--sc-header-text);
}

.sc-app-shell .physician-header__avatar {
  background: var(--sc-header-avatar-bg);
  color: var(--sc-header-avatar-text);
}

.sc-app-shell .app-sidebar {
  /* The tint is translucent by design; composite it over solid white so page
     content never shows through the sidebar when it overlays the page on
     phones. (RPI-F3) */
  background-color: #ffffff;
  background-image: linear-gradient(var(--sc-sidebar-bg, rgba(63, 106, 216, 0.1)), var(--sc-sidebar-bg, rgba(63, 106, 216, 0.1)));
}

/* The menu button sits on the (physician-configurable) top bar color; the
   theme draws it in the brand color, which vanishes on a brand-colored bar. */
.sc-app-shell .app-header .hamburger-inner,
.sc-app-shell .app-header .hamburger-inner::before,
.sc-app-shell .app-header .hamburger-inner::after,
.sc-app-shell .app-header .hamburger.is-active .hamburger-inner,
.sc-app-shell .app-header .hamburger.is-active .hamburger-inner::before,
.sc-app-shell .app-header .hamburger.is-active .hamburger-inner::after {
  background-color: var(--sc-header-text);
}

.sc-app-shell .app-header .mobile-toggle-header-nav {
  background: transparent;
  border: 1px solid var(--sc-header-border);
}

.sc-app-shell .app-sidebar .app-header__logo {
  background: transparent;
}

.sc-app-shell .app-sidebar .scrollbar-sidebar,
.sc-app-shell .app-sidebar .app-sidebar__inner,
.sc-app-shell .app-sidebar .vertical-nav-menu {
  background: transparent;
}

.vertical-nav-menu a.menu-link-with-badge {
  align-items: center;
  display: flex;
}

.vertical-nav-menu .menu-link-with-badge > span:first-of-type {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-pending-badge {
  align-items: center;
  background: #d92550;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 700;
  height: 1.35rem;
  justify-content: center;
  line-height: 1;
  margin-left: auto;
  min-width: 1.35rem;
  padding: 0 0.3rem;
}

.app-header__content {
  min-width: 0;
}

.sc-app-shell {
  overflow-x: clip;
}

.sc-app-shell .app-main__inner {
  max-width: 100%;
  min-width: 0;
}

.sc-app-shell .card,
.sc-app-shell .main-card,
.sc-app-shell .page-card {
  max-width: 100%;
}

.app-header-left {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  gap: 1rem;
  min-width: 0;
}

.app-header-right {
  flex: 0 0 auto;
}

.physician-header {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 0.75rem;
  min-width: 0;
  white-space: nowrap;
}

.physician-header__avatar {
  align-items: center;
  background: rgba(63, 106, 216, 0.12);
  border-radius: 999px;
  color: var(--sc-brand-dark);
  display: inline-flex;
  flex: 0 0 auto;
  font-weight: 700;
  height: 2.25rem;
  justify-content: center;
  width: 2.25rem;
}

.physician-header__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 0;
}

.physician-header__name {
  color: var(--sc-ink);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
}

.physician-header__specialty {
  color: var(--sc-muted);
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-menu {
  flex-wrap: wrap;
  min-width: 0;
}

.patient-search {
  flex: 0 0 18rem;
  margin-right: 0.25rem;
  max-width: 18rem;
  min-width: 0;
}

.patient-search__group {
  flex-wrap: nowrap;
}

.patient-search__group .input-group-text {
  border-right: 0;
}

.patient-search__input {
  min-width: 0;
}

.patient-search__button {
  flex: 0 0 auto;
}

.theme-preview-panel {
  border: 1px solid var(--sc-border);
  border-radius: 0.9rem;
  overflow: hidden;
}

.theme-preview-panel__header {
  align-items: center;
  background: rgba(63, 106, 216, 0.04);
  border-bottom: 1px solid var(--sc-border);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
}

.theme-preview-panel__header small {
  color: var(--sc-muted);
}

.theme-preview-panel__body {
  background: #fff;
  display: grid;
  gap: 0.85rem;
  padding: 1.1rem;
}

.theme-preview-panel__swatch {
  align-items: center;
  border-radius: 0.75rem;
  color: #fff;
  display: flex;
  font-weight: 700;
  justify-content: space-between;
  min-height: 3.5rem;
  padding: 0.85rem 1rem;
}

.theme-preview-panel__swatch--header {
  background: var(--preview-topbar, #3f6ad8);
  border: 1px solid var(--preview-border, rgba(255, 255, 255, 0.18));
  color: var(--preview-text, #fff);
}

.theme-preview-panel__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (max-width: 991.98px) {
  .sc-app-shell .app-main__inner {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .sc-app-shell .app-header__content {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .patient-search {
    flex-basis: 14rem;
    max-width: 14rem;
  }
}

@media (max-width: 767.98px) {
  .sc-app-shell .app-main__inner {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .sc-app-shell .app-header__content {
    align-items: flex-start;
  }

  .app-header-left {
    align-items: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .physician-header {
    order: 1;
  }

  .patient-search {
    flex: 1 1 100%;
    max-width: none;
    order: 2;
  }

  .header-menu {
    order: 3;
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .header-menu .nav-link {
    white-space: nowrap;
  }
}

@media (max-width: 575.98px) {
  .page-hero,
  .section-hero,
  .patient-page-hero,
  .patient-detail-hero {
    align-items: stretch;
    padding: 1rem;
  }

  .page-hero__actions,
  .section-hero__actions,
  .section-hero__action,
  .patient-page-hero__actions,
  .patient-detail-hero__actions {
    width: 100%;
  }

  .page-hero__actions .btn,
  .section-hero__actions .btn,
  .section-hero__action .btn,
  .patient-page-hero__actions .btn,
  .patient-detail-hero__actions .btn {
    flex: 1 1 100%;
  }

  .patient-detail-list > div {
    grid-template-columns: 1fr;
  }

  .sc-app-shell .card-header,
  .sc-app-shell .card-body,
  .sc-app-shell .card-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 2rem 0;
}

.auth-shell__inner {
  position: relative;
  z-index: 1;
}

.auth-card,
.main-card,
.page-card {
  border: 1px solid var(--sc-border);
  border-radius: 0.9rem;
  box-shadow: 0 0.9rem 2rem rgba(38, 52, 70, 0.08);
}

.page-card .table-responsive {
  border: 1px solid var(--sc-border);
  border-radius: 0.75rem;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  background: var(--sc-surface);
  -webkit-overflow-scrolling: touch;
}

.page-card .table {
  margin-bottom: 0;
}

.page-card .table > :not(caption) > * > * {
  color: var(--sc-text);
}

.page-card .table tbody td,
.page-card .table thead th {
  color: var(--sc-text);
}

.page-card .table thead th {
  color: var(--sc-heading);
}

.page-card .text-muted {
  color: #5f6c7b !important;
}

.page-card .form-label {
  color: var(--sc-heading);
  font-weight: 600;
}

.page-card .badge {
  letter-spacing: 0.01em;
}

.patient-action-btn {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-width: 2.25rem;
  padding: 0.35rem 0.5rem;
}

.patient-action-icon {
  color: var(--sc-brand);
  display: inline-flex;
  font-size: 1rem;
  line-height: 1;
}

.patient-action-btn:hover .patient-action-icon,
.patient-action-btn:focus .patient-action-icon {
  color: #fff;
}

.patient-page-hero,
.patient-detail-hero {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 1.5rem;
}

.patient-page-hero__copy,
.patient-detail-hero__copy {
  min-width: 0;
}

.patient-page-hero__actions,
.patient-detail-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.patient-page-hero h4,
.patient-detail-hero h4 {
  color: var(--sc-heading);
  font-weight: 800;
}

.patient-stat-card .card-body {
  padding: 1.25rem 1.35rem;
}

.patient-stat-card__label {
  color: var(--sc-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.patient-stat-card__value {
  color: var(--sc-heading);
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.patient-table-card .card-header {
  background: rgba(63, 106, 216, 0.03);
}

.patient-notes-cell {
  min-width: 14rem;
}

.patient-detail-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.patient-detail-card {
  border: 1px solid var(--sc-border);
  border-radius: 0.8rem;
  background: #fff;
  padding: 1rem 1.05rem;
}

.patient-detail-card--wide {
  grid-column: 1 / -1;
}

.patient-detail-card__title,
.patient-form-section__title {
  color: #20324e;
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
  text-transform: uppercase;
}

.patient-detail-list {
  display: grid;
  gap: 0.85rem;
  margin: 0;
}

.patient-detail-list > div {
  border-bottom: 1px solid rgba(38, 52, 70, 0.08);
  padding-bottom: 0.65rem;
}

.patient-detail-list > div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.patient-detail-list dt {
  color: var(--sc-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.2rem;
  text-transform: uppercase;
}

.patient-detail-list dd {
  color: var(--sc-ink);
  font-weight: 600;
  margin: 0;
}

.patient-summary-stack {
  display: grid;
  gap: 1rem;
}

.patient-summary-item {
  border-bottom: 1px solid rgba(38, 52, 70, 0.08);
  padding-bottom: 0.85rem;
}

.patient-summary-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.patient-detail-hero {
  padding: 1rem 1.25rem;
}

.patient-detail-hero__copy h4 {
  margin-bottom: 0.25rem;
}

.patient-detail-hero__copy p {
  max-width: 60rem;
}

.patient-detail-grid {
  gap: 0.75rem;
}

.patient-detail-card {
  padding: 0.9rem 1rem;
}

.patient-detail-card__title {
  margin-bottom: 0.75rem;
}

.patient-detail-list {
  gap: 0.55rem;
}

.patient-detail-list > div {
  align-items: start;
  display: grid;
  gap: 0.15rem 0.85rem;
  grid-template-columns: minmax(8.5rem, 36%) minmax(0, 1fr);
}

.patient-detail-list dt {
  margin: 0;
}

.patient-detail-list dd {
  word-break: break-word;
}

.patient-summary-stack {
  gap: 0.75rem;
}

.patient-summary-item {
  padding-bottom: 0.75rem;
}

.patient-appointment-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.patient-appointment-item {
  border-bottom: 1px solid var(--sc-border);
  padding-bottom: 0.85rem;
}

.patient-appointment-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.patient-appointment-meta {
  color: var(--sc-ink);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
}

.patient-appointment-meta > div {
  min-width: 0;
}

.page-hero,
.section-hero {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 1.5rem;
}

.page-hero__copy,
.section-hero__copy {
  min-width: 0;
}

.page-hero__actions,
.section-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.page-hero h4,
.section-hero h4 {
  color: var(--sc-heading);
  font-weight: 800;
}

.theme-stat-card .card-body {
  padding: 1.2rem 1.3rem;
}

.theme-stat-card__label {
  color: var(--sc-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.theme-stat-card__value {
  color: var(--sc-heading);
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.surface-card {
  background: rgba(255, 255, 255, 0.96);
}

.surface-card .card-header {
  background: rgba(63, 106, 216, 0.03);
}

.subscription-panel-header {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.subscription-panel-title {
  color: var(--sc-heading);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
}

.subscription-panel-subtitle {
  color: #5f6c7b;
  font-size: 0.92rem;
  line-height: 1.45;
  max-width: 38rem;
}

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

.detail-card {
  border: 1px solid var(--sc-border);
  border-radius: 0.8rem;
  background: #fff;
  padding: 1rem 1.05rem;
}

.detail-card--wide {
  grid-column: 1 / -1;
}

.detail-card__title {
  color: #20324e;
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
  text-transform: uppercase;
}

.detail-list {
  display: grid;
  gap: 0.85rem;
  margin: 0;
}

.detail-list > div {
  border-bottom: 1px solid rgba(38, 52, 70, 0.08);
  padding-bottom: 0.65rem;
}

.detail-list > div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.detail-list dt {
  color: var(--sc-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.2rem;
  text-transform: uppercase;
}

.detail-list dd {
  color: var(--sc-ink);
  font-weight: 600;
  margin: 0;
}

@media (max-width: 991.98px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991.98px) {
  .patient-detail-grid {
    grid-template-columns: 1fr;
  }
}

.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--sc-text);
  --bs-table-striped-bg: rgba(63, 106, 216, 0.035);
  --bs-table-hover-bg: rgba(63, 106, 216, 0.065);
  --bs-table-border-color: var(--sc-border);
}

.table > :not(caption) > * > * {
  vertical-align: middle;
}

.table thead th {
  background: #f7f9fc;
  color: var(--sc-heading);
  font-weight: 600;
  white-space: nowrap;
}

.table tbody tr:last-child > * {
  border-bottom-width: 0;
}

.auth-card .form-label {
  color: #566a7f;
  font-weight: 600;
}

.input-group-merge .input-group-text {
  background: #fff;
  border-right: 0;
}

.input-group-merge .form-control {
  border-left: 0;
}

.input-group-merge .btn {
  border-left: 0;
}

.metric-value {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--sc-ink);
}

.metric-label {
  color: var(--sc-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.app-footer {
  border-top: 1px solid var(--sc-border);
  color: var(--sc-muted);
}

.quick-action {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--sc-border);
  border-radius: 0.75rem;
  background: #fff;
  color: var(--sc-ink);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.quick-action:hover {
  transform: translateY(-1px);
  border-color: rgba(63, 106, 216, 0.28);
  box-shadow: 0 0.75rem 1.5rem rgba(38, 52, 70, 0.08);
}

.quick-action i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.6rem;
  background: rgba(63, 106, 216, 0.1);
  color: var(--sc-brand);
  font-size: 1.2rem;
}

.home-hero-media {
  max-width: 300px;
}

.home-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.progress-compact {
  height: 0.5rem;
}

.progress-width-72 {
  width: 72%;
}

.progress-width-89 {
  width: 89%;
}

.home-summary-list .list-group-item {
  border-color: rgba(38, 52, 70, 0.08);
}

.appointment-calendar-weekdays,
.appointment-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.75rem;
}

.appointment-calendar-weekdays > div {
  padding: 0 0.25rem;
}

.calendar-day {
  min-height: 8.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
  border: 1px solid var(--sc-border);
  border-radius: 0.75rem;
  background: #fff;
  color: var(--sc-ink);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.calendar-day:hover {
  transform: translateY(-1px);
  border-color: rgba(63, 106, 216, 0.28);
  box-shadow: 0 0.75rem 1.5rem rgba(38, 52, 70, 0.08);
}

.calendar-day.is-outside-month {
  opacity: 0.7;
}

.calendar-day.is-selected {
  border-color: rgba(63, 106, 216, 0.6);
  box-shadow: 0 0.75rem 1.5rem rgba(63, 106, 216, 0.1);
  background: rgba(63, 106, 216, 0.1);
}

.calendar-day.is-today .calendar-day-count {
  color: var(--sc-brand);
}

.calendar-day-count {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.appointment-calendar-grid--compact {
  gap: 0.5rem;
}

.appointment-calendar-grid--compact .calendar-day {
  min-height: 5.25rem;
  padding: 0.6rem 0.75rem;
}

.appointment-calendar-grid--compact .calendar-day-count {
  font-size: 1.15rem;
}

.board-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
}

.board-tile {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--sc-border);
  border-radius: 0.75rem;
  background: #fff;
  color: var(--sc-ink);
  text-decoration: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

a.board-tile:hover {
  border-color: rgba(63, 106, 216, 0.4);
  box-shadow: 0 0.5rem 1rem rgba(38, 52, 70, 0.08);
}

.board-tile.is-active {
  border-color: rgba(63, 106, 216, 0.6);
  background: rgba(63, 106, 216, 0.1);
}

.board-tile--static {
  background: rgba(38, 52, 70, 0.03);
}

.board-tile__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #6c7a89;
}

.board-tile__value {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.15;
}

.board-row--current > td:first-child {
  box-shadow: inset 4px 0 0 #03c3ec;
}

.board-row--next > td:first-child {
  box-shadow: inset 4px 0 0 var(--sc-brand);
}

.board-row--overdue {
  background: rgba(255, 62, 29, 0.06);
}

.board-row--overdue > td:first-child {
  box-shadow: inset 4px 0 0 #ff3e1d;
}

.board-row--gap {
  background: rgba(40, 199, 111, 0.06);
}

.board-row--gap > td:first-child {
  box-shadow: inset 4px 0 0 #28c76f;
}

/* Phones and tablets: one card per appointment instead of a wide table. */
@media (max-width: 767.98px) {
  .board-table table,
  .board-table tbody,
  .board-table tr,
  .board-table td {
    display: block;
    width: 100%;
  }

  .board-table thead {
    display: none;
  }

  .board-table tr {
    margin-bottom: 0.75rem;
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--sc-border);
    border-radius: 0.75rem;
    background: #fff;
  }

  .board-table tr.board-row--gap {
    background: rgba(40, 199, 111, 0.06);
  }

  .board-table td {
    display: grid;
    grid-template-columns: 6.5rem 1fr;
    column-gap: 1rem;
    padding: 0.4rem 0;
    border: 0;
    text-align: right;
  }

  .board-table td::before {
    content: attr(data-label);
    grid-column: 1;
    grid-row: 1 / span 6;
    align-self: start;
    font-weight: 600;
    color: #6c7a89;
    text-align: left;
  }

  .board-table td > * {
    grid-column: 2;
    justify-self: end;
  }

  .board-table td[colspan="7"]::before {
    content: none;
  }

  .board-table td.board-actions,
  .board-table td.text-end.board-no-print {
    display: flex;
    justify-content: flex-end;
  }

  .board-table td.board-actions::before {
    content: none;
  }
}

/* Day sheet: only the date, the summary and the list. */
@media print {
  .app-header,
  .app-sidebar,
  .sidebar-mobile-overlay,
  .board-no-print,
  .board-actions,
  .board-table thead th:last-child,
  .modal,
  .modal-backdrop,
  [class*="toast"] {
    display: none !important;
  }

  .app-main,
  .app-main__outer,
  .app-main__inner {
    padding-left: 0 !important;
    padding-top: 0 !important;
    margin: 0 !important;
  }

  .board-hero,
  .board-summary,
  .surface-card,
  .page-card {
    box-shadow: none !important;
  }

  .board-table {
    overflow: visible !important;
  }

  .board-row--gap {
    background: none;
  }
}

@media (max-width: 1199.98px) {
  .board-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .board-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.chart-surface {
  min-height: 320px;
}

.modal-surface {
  border: 1px solid var(--sc-border);
  border-radius: 0.9rem;
}

.modal-header-copy {
  min-width: 0;
}

.visit-context-list {
  display: grid;
  gap: 0.8rem;
}

.visit-context-item {
  display: grid;
  gap: 0.1rem;
}

.visit-context-label {
  color: var(--sc-muted);
  font-size: 0.8rem;
}

.visit-context-value-row {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.visit-context-value {
  color: var(--sc-heading);
  font-weight: 700;
}

.visit-context-meta {
  color: var(--sc-muted);
  font-size: 0.9rem;
}

.modal-content {
  overflow: hidden;
}

.modal-body {
  background: var(--sc-surface);
}

.modal .table-responsive {
  border-radius: 0.65rem;
}

.modal .table thead th {
  background: #f2f5fb;
}

.physician-access .widget-content-wrapper {
  align-items: center;
}

.physician-access .widget-content-left:last-child {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.profile-editor-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-editor-section {
  border: 1px solid rgba(38, 52, 70, 0.08);
  border-radius: 0.85rem;
  background: #fff;
  padding: 1rem;
}

.profile-editor-section--wide {
  grid-column: 1 / -1;
}

.profile-editor-section--services {
  padding-bottom: 0.85rem;
}

.profile-editor-section__title {
  align-items: center;
  color: #20324e;
  display: flex;
  font-size: 0.95rem;
  font-weight: 800;
  gap: 0.55rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.profile-editor-section__title i {
  color: var(--sc-brand);
  font-size: 1.1rem;
}

.profile-media-stack {
  display: grid;
  gap: 1rem;
}

.profile-media-item {
  border: 1px solid rgba(38, 52, 70, 0.08);
  border-radius: 0.85rem;
  background: #fff;
  padding: 1rem;
}

.profile-media-item .form-label {
  color: #20324e;
  font-weight: 700;
}

.profile-logo-preview {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(38, 52, 70, 0.08);
  border-radius: 0.9rem;
  box-shadow: 0 0.75rem 1.5rem rgba(38, 52, 70, 0.08);
  display: inline-flex;
  height: 4rem;
  justify-content: center;
  object-fit: cover;
  width: 4rem;
}

.profile-logo-fallback {
  align-items: center;
  background: rgba(63, 106, 216, 0.08);
  border: 1px dashed rgba(63, 106, 216, 0.25);
  border-radius: 0.9rem;
  color: var(--sc-brand-dark);
  display: inline-flex;
  font-size: 1.4rem;
  height: 4rem;
  justify-content: center;
  width: 4rem;
}

.service-tag-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}

.service-tag-item {
  min-width: 0;
}

.service-tag-pill {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  width: 100%;
  min-height: 3.35rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(63, 106, 216, 0.18);
  border-radius: 0.8rem;
  background: #fff;
  color: var(--sc-ink);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background-color 0.18s ease;
}

.service-tag-pill span {
  font-size: 0.95rem;
  font-weight: 600;
}

.service-tag-pill small {
  color: var(--sc-muted);
  display: -webkit-box;
  font-size: 0.72rem;
  line-height: 1.2;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.btn-check:checked + .service-tag-pill {
  border-color: var(--sc-brand);
  background: rgba(63, 106, 216, 0.08);
  box-shadow: 0 0.65rem 1.25rem rgba(63, 106, 216, 0.12);
  transform: translateY(-1px);
}

.btn-check:focus + .service-tag-pill {
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(63, 106, 216, 0.18);
}

.profile-photo-preview {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(38, 52, 70, 0.08);
  border-radius: 0.9rem;
  box-shadow: 0 0.75rem 1.5rem rgba(38, 52, 70, 0.08);
  display: inline-flex;
  height: 4rem;
  justify-content: center;
  object-fit: cover;
  width: 4rem;
}

.profile-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(63, 106, 216, 0.08), rgba(22, 170, 255, 0.06) 48%, transparent 78%),
    #fff;
}

.profile-avatar {
  align-items: center;
  background: linear-gradient(135deg, var(--sc-brand), var(--sc-accent));
  border-radius: 1rem;
  box-shadow: 0 0.75rem 1.5rem rgba(63, 106, 216, 0.2);
  color: #fff;
  display: inline-flex;
  font-size: 1.35rem;
  font-weight: 800;
  height: 4rem;
  justify-content: center;
  width: 4rem;
}

.profile-text {
  white-space: pre-line;
  color: var(--sc-ink);
}

.usage-alert-card {
  background: #fff8e6;
  border: 1px solid rgba(255, 193, 7, 0.38);
  border-radius: 1rem;
  padding: 1rem 1.1rem;
}

.usage-alert-card + .usage-alert-card {
  margin-top: 1rem;
}

.usage-alert-card__badge {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  margin-bottom: 0.65rem;
  padding: 0.35rem 0.6rem;
  text-transform: uppercase;
  width: fit-content;
}

.usage-alert-card__title {
  color: #1f2b3a;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 0.35rem;
  word-break: break-word;
}

.usage-alert-card__description {
  color: var(--sc-muted);
  font-size: 0.92rem;
  line-height: 1.45;
  word-break: break-word;
}

.usage-alert-card .bg-label-warning {
  background: rgba(255, 193, 7, 0.16) !important;
  color: #8a6500 !important;
}

.usage-alert-card .bg-label-danger {
  background: rgba(220, 53, 69, 0.12) !important;
  color: #8f1d2b !important;
}

.validation-summary-valid {
  display: none;
}

@media (max-width: 991.98px) {
  .profile-editor-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .auth-shell {
    padding: 1rem 0;
  }

  .appointment-calendar-weekdays,
  .appointment-calendar-grid {
    gap: 0.5rem;
  }

  .calendar-day {
    min-height: 7.5rem;
    padding: 0.875rem;
  }
}

body.public-site-body {
  background: #f6f8fc;
}

.public-site-frame {
  min-height: 100vh;
}

.public-topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  backdrop-filter: blur(18px);
  background: rgba(246, 248, 252, 0.82);
  border-bottom: 1px solid rgba(38, 52, 70, 0.08);
}

.public-topbar__bar {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.public-brand {
  align-items: center;
  color: var(--sc-ink);
  display: inline-flex;
  gap: 0.85rem;
}

.public-brand__mark img {
  display: block;
  height: 2.75rem;
  object-fit: contain;
  width: auto;
}

.public-brand__copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.public-brand__name {
  font-size: 1.05rem;
  font-weight: 800;
}

.public-brand__tag {
  color: var(--sc-muted);
  font-size: 0.78rem;
}

.public-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}

.public-nav a,
.public-footer__links a {
  color: var(--sc-ink);
  font-weight: 600;
}

.public-topbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.public-hero {
  padding: 3.5rem 0 2.5rem;
}

.public-hero__title {
  color: #17366f;
  letter-spacing: -0.03em;
}

.public-hero__lead {
  font-size: 1.06rem;
  max-width: 42rem;
}

.public-hero__support {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.public-support-pill {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(63, 106, 216, 0.12);
  border-radius: 999px;
  box-shadow: 0 0.75rem 1.5rem rgba(38, 52, 70, 0.06);
  display: flex;
  flex-direction: column;
  min-width: 11rem;
  padding: 0.7rem 1rem;
}

.public-support-pill span {
  color: var(--sc-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.public-support-pill strong {
  color: var(--sc-heading);
  font-size: 0.98rem;
}

.public-hero__media {
  position: relative;
  background: linear-gradient(160deg, rgba(63, 106, 216, 0.12), rgba(22, 170, 255, 0.05));
  border: 1px solid rgba(38, 52, 70, 0.08);
  border-radius: 1.5rem;
  overflow: hidden;
  min-height: 28rem;
  box-shadow: 0 1.25rem 3rem rgba(38, 52, 70, 0.1);
}

.public-hero__media img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.public-hero__card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 1rem;
  bottom: 1.25rem;
  max-width: 16rem;
  padding: 1rem;
  position: absolute;
  right: 1.25rem;
}

.public-alert {
  margin-top: 1rem;
}

.public-stats {
  padding: 1rem 0 0.5rem;
}

.public-stat-card,
.public-feature-card,
.public-department-card,
.public-service-feature,
.public-service-tile,
.public-physician-card,
.public-contact-card,
.public-appointment-card,
.public-cta-card,
.public-empty-state {
  border: 1px solid rgba(38, 52, 70, 0.08);
  border-radius: 1rem;
  box-shadow: 0 0.9rem 1.8rem rgba(38, 52, 70, 0.06);
}

.public-stat-card {
  background: #fff;
}

.public-stat-card__label {
  color: var(--sc-muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.public-stat-card__value {
  color: var(--sc-heading);
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.1;
  margin: 0.25rem 0;
}

.public-about,
.public-sections,
.public-cta {
  padding: 2rem 0;
}

.public-section-heading {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.public-mini-card {
  background: #fff;
  border: 1px solid rgba(38, 52, 70, 0.08);
  border-radius: 0.85rem;
  height: 100%;
  padding: 0.95rem 1rem;
}

.public-mini-card strong,
.public-mini-card span {
  display: block;
}

.public-mini-card strong {
  color: var(--sc-heading);
  font-size: 0.95rem;
}

.public-mini-card span {
  color: var(--sc-muted);
  font-size: 0.82rem;
  margin-top: 0.2rem;
}

.public-mini-card--service {
  min-height: 100%;
}

.public-emergency-icon,
.public-service-icon {
  color: var(--sc-brand);
  font-size: 2rem;
}

.public-callout {
  align-items: center;
  background: rgba(63, 106, 216, 0.04);
  border-radius: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
}

.public-icon-badge {
  align-items: center;
  background: rgba(63, 106, 216, 0.1);
  border-radius: 0.9rem;
  color: var(--sc-brand);
  display: inline-flex;
  height: 3rem;
  justify-content: center;
  width: 3rem;
}

.public-service-feature,
.public-service-tile {
  background: #fff;
}

.public-service-tile {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
}

.public-physician-card {
  background: #fff;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.public-physician-card:hover,
.public-physician-card.is-selected {
  border-color: rgba(63, 106, 216, 0.3);
  box-shadow: 0 1.15rem 2.2rem rgba(38, 52, 70, 0.08);
  transform: translateY(-1px);
}

.public-physician-card__media {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, rgba(63, 106, 216, 0.08), rgba(22, 170, 255, 0.04));
  border-radius: 0.9rem;
  overflow: hidden;
}

.public-physician-card__media img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.public-physician-avatar {
  align-items: center;
  background: linear-gradient(135deg, var(--sc-brand), var(--sc-accent));
  color: #fff;
  display: inline-flex;
  font-size: 2rem;
  font-weight: 800;
  height: 100%;
  justify-content: center;
  width: 100%;
}

.public-card-meta {
  color: var(--sc-muted);
  display: grid;
  gap: 0.4rem;
  font-size: 0.86rem;
}

.public-physician-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.public-contact-list {
  display: grid;
  gap: 1rem;
}

.public-appointment-card .form-label {
  font-weight: 700;
}

.public-cta-card {
  background:
    linear-gradient(135deg, rgba(63, 106, 216, 0.08), rgba(22, 170, 255, 0.05)),
    #fff;
}

.public-footer {
  border-top: 1px solid rgba(38, 52, 70, 0.08);
  background: rgba(255, 255, 255, 0.7);
}

.public-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 991.98px) {
  .public-topbar__bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-nav {
    justify-content: flex-start;
  }

  .public-hero__media {
    min-height: 22rem;
  }
}

@media (max-width: 575.98px) {
  .public-brand__tag {
    display: none;
  }

  .public-hero {
    padding-top: 2rem;
  }

  .public-hero__card {
    right: 0.75rem;
    bottom: 0.75rem;
    max-width: 14rem;
  }

  .public-callout {
    align-items: flex-start;
  }
}

/* Medic Care-inspired public site */
body.public-site-body {
  background: #fff;
  color: #575757;
}

.public-site-shell {
  overflow-x: hidden;
}

.public-navbar {
  box-shadow: 0 0.35rem 1.1rem rgba(15, 23, 42, 0.04);
}

.public-brand {
  align-items: center;
  display: inline-flex;
  gap: 0.85rem;
  text-decoration: none;
}

.public-brand__mark img {
  display: block;
  height: 2.8rem;
  width: auto;
}

.public-brand__copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.public-brand__name {
  color: #171717;
  font-size: 1.15rem;
  font-weight: 800;
}

.public-brand__tag {
  color: #7b7b7b;
  font-size: 0.78rem;
}

.public-navlinks .nav-link {
  color: #444;
  font-weight: 600;
  padding-left: 1rem;
  padding-right: 1rem;
}

.section-spacing {
  padding: 5rem 0;
}

.section-soft {
  background: #f8f9fa;
}

.section-kicker {
  color: var(--sc-brand);
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.section-title {
  color: #171717;
  font-size: clamp(2rem, 1.3rem + 1.4vw, 3.15rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.section-text {
  color: #6a6a6a;
  font-size: 1.02rem;
  line-height: 1.85;
}

.section-head {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.public-hero__title {
  color: #171717;
  font-size: clamp(2.4rem, 1.8rem + 2.5vw, 4.4rem);
  font-weight: 800;
  line-height: 1.08;
  margin-bottom: 1rem;
  max-width: 11ch;
}

.public-hero__text {
  color: #6a6a6a;
  font-size: 1.06rem;
  line-height: 1.95;
  margin-bottom: 1.75rem;
  max-width: 42rem;
}

.public-hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.public-hero__badges span {
  background: #f1f8ff;
  border-radius: 999px;
  color: #29436b;
  font-weight: 700;
  padding: 0.6rem 1rem;
}

.public-hero__media {
  position: relative;
}

.public-hero__media img {
  border-radius: 1.5rem;
  box-shadow: 0 1.4rem 3rem rgba(0, 0, 0, 0.12);
  display: block;
  width: 100%;
}

.public-hero__panel {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 1rem;
  bottom: 1.5rem;
  box-shadow: 0 0.75rem 1.8rem rgba(0, 0, 0, 0.12);
  max-width: 15rem;
  padding: 1rem 1.1rem;
  position: absolute;
  right: 1.5rem;
}

.public-stat {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 0.7rem 1.6rem rgba(0, 0, 0, 0.05);
  padding: 1.5rem 1.2rem;
  text-align: center;
}

.public-stat__value {
  color: #171717;
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1;
}

.public-stat__label {
  color: #171717;
  font-weight: 700;
  margin-top: 0.65rem;
}

.public-stat__caption {
  color: #7b7b7b;
  font-size: 0.82rem;
  margin-top: 0.35rem;
}

.public-image-frame img {
  border-radius: 1rem;
  box-shadow: 0 1.25rem 2.6rem rgba(0, 0, 0, 0.12);
  display: block;
  width: 100%;
}

.public-about-list {
  display: grid;
  gap: 1rem;
}

.public-about-list > div {
  border-left: 3px solid var(--sc-brand);
  padding-left: 1rem;
}

.public-about-list strong {
  color: #171717;
  display: block;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.public-about-list span {
  color: #6a6a6a;
}

.public-service-card {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 0.7rem 1.6rem rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
}

.public-service-card__icon {
  align-items: center;
  background: rgba(63, 106, 216, 0.08);
  border-radius: 1rem;
  color: var(--sc-brand);
  display: inline-flex;
  height: 3.35rem;
  justify-content: center;
  width: 3.35rem;
}

.public-link {
  color: var(--sc-brand);
  font-weight: 700;
}

.public-timeline {
  display: grid;
  gap: 1rem;
}

.public-timeline__item {
  align-items: flex-start;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 0.7rem 1.6rem rgba(0, 0, 0, 0.05);
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
}

.public-timeline__date {
  align-items: center;
  background: var(--sc-brand);
  border-radius: 0.85rem;
  color: #fff;
  display: inline-flex;
  flex: 0 0 3rem;
  font-size: 1.1rem;
  font-weight: 800;
  height: 3rem;
  justify-content: center;
}

.public-timeline__body {
  flex: 1 1 auto;
}

.public-testimonial {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 0.7rem 1.6rem rgba(0, 0, 0, 0.05);
  height: 100%;
  padding: 1.5rem;
}

.public-testimonial p {
  color: #6a6a6a;
  font-size: 1rem;
  line-height: 1.85;
}

.public-testimonial__meta {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  margin-top: 1rem;
  padding-top: 1rem;
}

.public-testimonial__meta strong,
.public-testimonial__meta span {
  display: block;
}

.public-testimonial__meta span {
  color: #7b7b7b;
  font-size: 0.85rem;
}

.public-physician-card {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 0.7rem 1.6rem rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.public-physician-card.is-selected {
  outline: 2px solid rgba(63, 106, 216, 0.2);
}

.public-physician-card__image {
  background: #f3f5f9;
  aspect-ratio: 4 / 3;
}

.public-physician-card__image img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.public-physician-card__avatar {
  align-items: center;
  background: linear-gradient(135deg, var(--sc-brand), var(--sc-accent));
  color: #fff;
  display: flex;
  font-size: 2.25rem;
  font-weight: 800;
  height: 100%;
  justify-content: center;
}

.public-physician-card__meta {
  color: #7b7b7b;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.public-contact-card,
.public-booking-card {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 0.7rem 1.6rem rgba(0, 0, 0, 0.05);
  height: 100%;
  padding: 1.75rem;
}

.public-contact-list {
  display: grid;
  gap: 1rem;
}

.public-contact-list small {
  color: #7b7b7b;
  display: block;
  margin-bottom: 0.2rem;
}

.public-empty {
  border-radius: 1rem;
  padding: 1.5rem;
}

.public-footer {
  background: #f8f9fa;
}

.public-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.public-footer__links a {
  color: #444;
  font-weight: 600;
}

@media (max-width: 991.98px) {
  .section-spacing {
    padding: 4rem 0;
  }

  .public-hero__panel {
    right: 1rem;
    bottom: 1rem;
  }
}

@media (max-width: 575.98px) {
  .section-spacing {
    padding: 3.25rem 0;
  }

  .public-hero__title {
    max-width: none;
  }

  .public-hero__panel {
    position: static;
    margin-top: -2rem;
    margin-left: auto;
    margin-right: auto;
    max-width: none;
    width: calc(100% - 2rem);
  }

  .public-timeline__item {
    flex-direction: column;
  }
}

/* Dr.care-inspired public landing page */
body.public-site-body {
  background: #ffffff;
  color: #6a6a6a;
  font-family: "Work Sans", "Segoe UI", Arial, sans-serif;
}

.ftco_navbar {
  box-shadow: none;
  background: #f8f9fa !important;
}

.ftco_navbar .navbar-brand {
  color: #000;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.ftco_navbar .navbar-brand span {
  color: #2f89fc;
}

.ftco_navbar .topper .text {
  color: #8d8d8d;
  font-size: 14px;
}

.ftco_navbar .topper .icon {
  border-radius: 50%;
  color: #2f89fc;
  height: 36px;
  width: 36px;
}

.ftco-navbar-light {
  background: #111111 !important;
  padding: 0.5rem 0;
}

.ftco-navbar-light .nav-link {
  color: rgba(255, 255, 255, 0.92) !important;
  font-weight: 600;
  padding: 1.15rem 1rem;
}

.home-slider {
  position: relative;
  min-height: 600px;
}

.slider-item {
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
  min-height: 600px;
  position: relative;
}

.slider-item .overlay,
.ftco-intro .overlay {
  background: rgba(47, 137, 252, 0.82);
  bottom: 0;
  content: "";
  left: 0;
  opacity: 0.85;
  position: absolute;
  right: 0;
  top: 0;
}

.slider-text {
  min-height: 600px;
  position: relative;
  z-index: 1;
}

.slider-text h1 {
  color: #000;
  font-size: clamp(2.5rem, 1.7rem + 2.8vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
}

.slider-text h1 span {
  display: block;
  color: #fff;
}

.slider-text .subheading {
  color: rgba(0, 0, 0, 0.85);
  font-size: 1.1rem;
  font-weight: 400;
  text-transform: uppercase;
}

.hero-floating-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 1rem;
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.12);
  padding: 1.5rem;
}

.hero-floating-card small {
  color: #2f89fc;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.hero-floating-card__metrics {
  display: grid;
  gap: 1rem;
}

.hero-floating-card__metrics strong {
  color: #171717;
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
}

.hero-floating-card__metrics span {
  color: #8d8d8d;
  font-size: 0.85rem;
}

.section-padding,
.ftco-services,
.ftco-section,
.contact-section {
  padding: 5rem 0;
}

.ftco-no-pb {
  padding-bottom: 0;
}

.ftc-no-pb {
  padding-bottom: 0;
}

.services .media,
.services-2,
.testimony-wrap,
.pricing-entry,
.staff,
.dbox,
.appointment-form,
.ftco-footer-widget,
.ftco-section .tab-content {
  background: #fff;
}

.services .icon,
.services-2 .icon,
.testimony-wrap .user-img,
.pricing-entry .price,
.staff .img,
.ftco-departments .nav-link.active {
  background: #2f89fc;
}

.services .icon {
  align-items: center;
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  height: 80px;
  justify-content: center;
  width: 80px;
}

.services .heading,
.services-2 h3,
.heading-section h2,
.ftco-intro h2,
.pricing-entry h3,
.staff h3,
.ftco-footer h2,
.ftco-footer .open-hours,
.contact-info h2,
.appointment-form .form-control {
  color: #000;
}

.services p,
.services-2 p,
.heading-section p,
.testimony-wrap p,
.pricing-entry li,
.dbox,
.ftco-footer p,
.ftco-footer a,
.ftco-footer .text,
.contact-info p {
  color: #6a6a6a;
}

.ftco-section .subheading,
.heading-section .subheading {
  color: #2f89fc;
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.ftco-section h2,
.ftco-intro h2 {
  font-size: clamp(2rem, 1.2rem + 1.5vw, 3.1rem);
  font-weight: 800;
  line-height: 1.1;
}

.services-2 {
  margin-bottom: 1.5rem;
}

.services-2 .icon {
  align-items: center;
  border: 2px solid #2f89fc;
  border-radius: 50%;
  color: #2f89fc;
  display: inline-flex;
  flex: 0 0 60px;
  height: 60px;
  justify-content: center;
  width: 60px;
}

.services-2 .text {
  width: calc(100% - 60px);
}

.ftco-intro {
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  padding: 4rem 0;
  position: relative;
}

.ftco-intro h2,
.ftco-intro p {
  color: #fff;
  position: relative;
  z-index: 1;
}

.ftco-departments .nav-link {
  background: #fff;
  border-radius: 0;
  color: #000;
  font-size: 18px;
  font-weight: 600;
  margin: 0 2px 5px;
  padding: 1.1rem 1.3rem;
  position: relative;
}

.ftco-departments .nav-link.active {
  background: #2f89fc;
  color: #fff;
}

.ftco-departments .tab-content {
  border-radius: 0;
}

.departments .img {
  background-size: cover;
  background-position: center center;
  min-height: 280px;
}

.departments h3 {
  color: #000;
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 1rem;
}

.departments ul {
  list-style: none;
  padding-left: 0;
}

.departments ul li {
  color: #6a6a6a;
  margin-bottom: 0.65rem;
}

.staff {
  margin-bottom: 2rem;
}

.staff .img-wrap {
  min-height: 330px;
}

.staff .img {
  background-size: cover;
  background-position: top center;
  min-height: 330px;
}

.staff .text .position {
  color: #2f89fc;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
}

.ftco-social {
  list-style: none;
  padding-left: 0;
}

.ftco-social li {
  display: inline-block;
  margin: 0 5px;
}

.ftco-social li a {
  align-items: center;
  background: rgba(47, 137, 252, 0.08);
  border-radius: 50%;
  color: #2f89fc;
  display: inline-flex;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.pricing-entry {
  border-top: 4px solid #2f89fc;
  border-radius: 0.5rem;
  box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.06);
  margin-bottom: 1.5rem;
  padding: 1.75rem 1.25rem 2rem;
}

.pricing-entry.active {
  transform: translateY(-4px);
  box-shadow: 0 1.2rem 2.4rem rgba(47, 137, 252, 0.15);
}

.pricing-entry .price {
  align-items: center;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 0.95rem;
  font-weight: 800;
  justify-content: center;
  min-height: 2.5rem;
  min-width: 7rem;
  padding: 0.25rem 1rem;
}

.pricing-entry ul {
  list-style: none;
  padding-left: 0;
  margin: 1.25rem 0 1.5rem;
}

.pricing-entry ul li {
  margin-bottom: 0.7rem;
}

.testimony-section {
  padding: 5rem 0;
}

.testimony-wrap {
  border-radius: 1rem;
  box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.05);
  height: 100%;
}

.testimony-wrap .user-img {
  background-position: top center;
  background-size: cover;
  border-radius: 50%;
  height: 80px;
  margin-bottom: 1rem;
  width: 80px;
}

.testimony-wrap .name {
  color: #000;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.contact-info .dbox {
  border-left: 3px solid #2f89fc;
  height: 100%;
  padding: 1rem 1rem 1rem 1.25rem;
}

.appointment-form {
  border-radius: 0;
  box-shadow: none;
}

.appointment-form .form-control {
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 0;
  box-shadow: none;
  height: 58px;
  padding-left: 0;
  padding-right: 0;
}

.appointment-form textarea.form-control {
  height: auto;
  min-height: 140px;
}

.ftco-footer {
  background: #111111;
  color: rgba(255, 255, 255, 0.78);
}

.ftco-footer .ftco-heading-2,
.ftco-footer .open-hours {
  color: #fff;
}

.ftco-footer .footer-small-nav a {
  color: rgba(255, 255, 255, 0.82);
}

.ftco-footer .block-23 ul li {
  list-style: none;
  margin-bottom: 0.65rem;
}

.ftco-footer .submit {
  background: #2f89fc;
  color: #fff;
}

.ftco-footer .submit:hover {
  background: #1f73de;
}

.public-site-body .alert {
  border-radius: 0;
}

@media (max-width: 991.98px) {
  .auth-shell__content {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .public-auth-highlights {
    grid-template-columns: 1fr;
  }

  .ftco-navbar-light .navbar-nav .nav-link {
    padding: 0.75rem 0;
  }

  .slider-item,
  .slider-text {
    min-height: 520px;
  }

  .section-padding,
  .ftco-services,
  .ftco-section,
  .contact-section,
  .testimony-section {
    padding: 4rem 0;
  }
}

@media (max-width: 767.98px) {
  .auth-page-shell--register .public-auth-hero-column {
    display: none;
  }

  .auth-page-shell--register .public-auth-form-column {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .public-auth-brand__logo {
    height: 62px;
    max-width: 220px;
  }

  .public-auth-hero,
  .public-auth-card {
    border-radius: 24px;
  }

  .public-auth-hero {
    padding: 1.75rem;
  }

  .public-auth-card .auth-panel__body,
  .public-auth-card .auth-panel__footer {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .auth-page-shell--register .public-auth-card {
    width: 100%;
  }

  .auth-page-shell--register .public-auth-card .auth-panel__body,
  .auth-page-shell--register .public-auth-card .auth-panel__footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .auth-panel__body {
    padding: 1.4rem;
  }

  .auth-panel__footer {
    padding: 0 1.25rem 1.25rem;
  }

  .ftco_navbar .navbar-brand {
    font-size: 28px;
  }

  .slider-text {
    min-height: auto;
    padding: 5rem 0;
  }

  .slider-item {
    min-height: auto;
  }

  .slider-text h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 575.98px) {
  .public-auth-brand__logo {
    height: 54px;
    max-width: 180px;
  }

  .section-padding,
  .ftco-services,
  .ftco-section,
  .contact-section,
  .testimony-section {
    padding: 3.25rem 0;
  }

  .ftco-navbar-light .btn {
    width: 100%;
  }
}
/* Keep Bootstrap modal overlays full-screen. Some legacy theme rules
   restyle .modal and .modal-backdrop like centered popovers, which breaks
   the transparent shadow alignment. Stacking comes only from the --z-* scale
   in :root, through Bootstrap's own variables, so no z-index !important. */
.modal {
  --bs-modal-zindex: var(--z-modal);
  left: 0 !important;
  min-width: 0 !important;
  top: 0 !important;
  transform: none !important;
  width: 100% !important;
}

.modal-backdrop {
  --bs-backdrop-zindex: var(--z-modal-backdrop);
  left: 0 !important;
  min-width: 0 !important;
  top: 0 !important;
  transform: none !important;
  width: 100% !important;
  height: 100% !important;
}

.sc-toast-stack {
  position: fixed;
  right: 1.25rem;
  top: 1.25rem;
  width: min(24rem, calc(100vw - 2.5rem));
  z-index: var(--z-toast);
  display: grid;
  gap: 0.75rem;
}

.sc-toast {
  align-items: flex-start;
  border: 1px solid transparent;
  border-radius: 1rem;
  box-shadow: 0 1rem 2rem rgba(38, 52, 70, 0.16);
  display: flex;
  gap: 0.85rem;
  padding: 1rem 1rem 1rem 0.95rem;
  transform: translateY(0);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.sc-toast--success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.98), rgba(34, 197, 94, 0.96));
  color: #ffffff;
}

.sc-toast--danger {
  background: linear-gradient(135deg, rgba(220, 53, 69, 0.98), rgba(239, 68, 68, 0.96));
  color: #ffffff;
}

.sc-toast__icon {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1.1rem;
  height: 1.75rem;
  justify-content: center;
  width: 1.75rem;
}

.sc-toast__content {
  flex: 1 1 auto;
  min-width: 0;
}

.sc-toast__title {
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.15rem;
}

.sc-toast__message {
  font-size: 0.92rem;
  line-height: 1.5;
  word-break: break-word;
}

.sc-toast__close {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1.15rem;
  justify-content: center;
  line-height: 1;
  opacity: 0.9;
  padding: 0;
  width: 1.75rem;
}

.sc-toast__close:hover,
.sc-toast__close:focus {
  opacity: 1;
}

.sc-toast--hide {
  opacity: 0;
  transform: translateY(-0.5rem);
}

@media print {
  .printable-attribution {
    color: #6b7280;
    font-size: 9pt;
    text-align: center;
    bottom: 6mm;
    left: 0;
    position: fixed;
    right: 0;
  }
}

.admin-response-alert {
    animation: admin-response-pulse 1.8s ease-in-out infinite;
    background: linear-gradient(135deg, #fff200 0%, #ffb703 48%, #ff6b00 100%);
    border: 2px solid #ff8a00;
    border-radius: 14px;
    box-shadow: 0 16px 34px rgba(255, 138, 0, 0.28);
    color: #3d2500;
    padding: 1rem 1.25rem;
}

.admin-response-alert strong {
    color: #1f1500;
    font-weight: 900;
}

.admin-response-alert .btn {
    background: #1f1500;
    border-color: #1f1500;
    box-shadow: 0 8px 18px rgba(31, 21, 0, 0.22);
    color: #ffffff;
    font-weight: 800;
}

.admin-response-alert .btn:hover,
.admin-response-alert .btn:focus {
    background: #000000;
    border-color: #000000;
    color: #ffffff;
}

@keyframes admin-response-pulse {
    0%,
    100% {
        box-shadow: 0 16px 34px rgba(255, 138, 0, 0.28);
    }

    50% {
        box-shadow: 0 18px 42px rgba(255, 107, 0, 0.46);
    }
}

@media (prefers-reduced-motion: reduce) {
    .admin-response-alert {
        animation: none;
    }
}

.support-message-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.support-thread-list {
    display: grid;
    gap: 0.75rem;
}

.support-workspace {
    align-items: stretch;
}

.support-conversation-header {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.support-conversation-header__action {
    flex: 0 0 auto;
    font-weight: 700;
    white-space: nowrap;
}

.support-detail-card .card-body {
    min-height: 28rem;
}

.support-thread-card {
    background: #ffffff;
    border: 1px solid rgba(67, 89, 113, 0.16);
    border-radius: 12px;
    color: inherit;
    display: grid;
    gap: 0.35rem;
    padding: 0.9rem 1rem;
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.support-thread-card:hover,
.support-thread-card:focus {
    border-color: rgba(63, 106, 216, 0.45);
    box-shadow: 0 10px 24px rgba(67, 89, 113, 0.14);
    color: inherit;
    transform: translateY(-1px);
}

.support-thread-card--active {
    border-color: rgba(63, 106, 216, 0.58);
    box-shadow: inset 4px 0 0 var(--sc-brand, #3f6ad8);
}

.support-thread-card--unread {
    background: linear-gradient(135deg, rgba(255, 242, 0, 0.28), rgba(255, 183, 3, 0.2));
    border-color: rgba(255, 138, 0, 0.6);
}

.support-thread-card__title {
    font-weight: 800;
}

.support-thread-card__meta {
    color: #697a8d;
    font-size: 0.86rem;
}

.support-message {
    border: 1px solid rgba(67, 89, 113, 0.16);
    border-radius: 8px;
    padding: 1rem;
    background: #fff;
}

.support-message--admin {
    border-color: rgba(105, 108, 255, 0.28);
    background: rgba(105, 108, 255, 0.06);
}

.support-message--physician {
    border-color: rgba(3, 195, 236, 0.24);
    background: rgba(3, 195, 236, 0.06);
}

.support-message__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.support-message__body {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.support-message-attachment {
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(67, 89, 113, 0.14);
    border-radius: 12px;
    color: inherit;
    display: inline-flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 0.85rem;
    max-width: min(100%, 22rem);
    padding: 0.65rem;
    text-decoration: none;
}

.support-message-attachment:hover,
.support-message-attachment:focus {
    border-color: rgba(63, 106, 216, 0.42);
    color: inherit;
    text-decoration: none;
}

.support-message-attachment img {
    border-radius: 10px;
    display: block;
    height: auto;
    max-height: 16rem;
    max-width: 100%;
    object-fit: contain;
}

.support-message-attachment span {
    color: #697a8d;
    font-size: 0.85rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.support-empty-state {
    align-items: center;
    background: linear-gradient(135deg, rgba(63, 106, 216, 0.08), rgba(3, 195, 236, 0.08));
    border: 1px dashed rgba(63, 106, 216, 0.28);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 22rem;
    padding: 2rem;
    text-align: center;
}

.support-empty-state__icon {
    align-items: center;
    background: rgba(63, 106, 216, 0.12);
    border-radius: 999px;
    color: var(--sc-brand, #3f6ad8);
    display: inline-flex;
    font-size: 2rem;
    height: 4rem;
    justify-content: center;
    margin-bottom: 1rem;
    width: 4rem;
}

.faq-support-hero {
    align-items: stretch;
    background: linear-gradient(135deg, #ffffff 0%, #f6f9ff 58%, #edf4ff 100%);
    border-color: rgba(63, 106, 216, 0.14);
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem);
    overflow: hidden;
    padding: 1.5rem;
}

.faq-support-hero__content {
    min-width: 0;
}

.faq-eyebrow {
    color: var(--sc-brand-dark, #3255ad);
    display: inline-flex;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    margin-bottom: 0.6rem;
    text-transform: uppercase;
}

.faq-support-hero h4 {
    color: var(--sc-heading);
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: 0;
    margin-bottom: 0.35rem;
}

.faq-support-hero p {
    color: #5f6c7b;
    max-width: 48rem;
}

.faq-support-search {
    align-items: center;
    background: #ffffff;
    border: 1px solid rgba(67, 89, 113, 0.14);
    border-radius: 14px;
    box-shadow: 0 16px 32px rgba(38, 52, 70, 0.08);
    display: grid;
    gap: 0.75rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    margin-top: 1.25rem;
    max-width: 58rem;
    padding: 0.45rem 0.55rem 0.45rem 0.95rem;
}

.faq-support-search__icon {
    color: var(--sc-brand, #3f6ad8);
    display: inline-flex;
}

.faq-support-search input {
    border: 0;
    color: var(--sc-ink);
    min-height: 2.55rem;
    min-width: 0;
    outline: 0;
}

.faq-support-search button {
    background: #f4f6fb;
    border: 1px solid rgba(67, 89, 113, 0.12);
    border-radius: 10px;
    color: #425466;
    font-weight: 800;
    min-height: 2.4rem;
    padding: 0 0.9rem;
}

.faq-support-search button:hover,
.faq-support-search button:focus {
    background: rgba(63, 106, 216, 0.08);
    color: var(--sc-brand-dark, #3255ad);
}

.faq-support-hero__status {
    font-size: 0.9rem;
    margin: 0.85rem 0 0;
}

.faq-support-hero__panel {
    align-content: center;
    background: linear-gradient(135deg, var(--sc-brand, #3f6ad8), var(--sc-brand-dark, #3255ad));
    border-radius: 16px;
    box-shadow: 0 18px 36px rgba(63, 106, 216, 0.2);
    color: #ffffff;
    display: grid;
    gap: 0.7rem;
    padding: 1.25rem;
}

.faq-support-hero__panel span {
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    opacity: 0.82;
    text-transform: uppercase;
}

.faq-support-hero__panel strong {
    font-size: 1.05rem;
    line-height: 1.45;
}

.faq-support-hero__panel .btn {
    justify-self: flex-start;
    font-weight: 800;
}

.faq-insight-row {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.faq-insight-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(67, 89, 113, 0.12);
    border-radius: 14px;
    box-shadow: 0 12px 24px rgba(38, 52, 70, 0.06);
    display: grid;
    gap: 0.25rem;
    padding: 1rem 1.1rem;
}

.faq-insight-card span {
    color: var(--sc-brand, #3f6ad8);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.faq-insight-card strong {
    color: var(--sc-heading);
    font-size: 1rem;
}

.faq-insight-card small {
    color: #5f6c7b;
    line-height: 1.45;
}

.faq-insight-card--accent {
    background: #263446;
    border-color: #263446;
}

.faq-insight-card--accent span,
.faq-insight-card--accent strong,
.faq-insight-card--accent small {
    color: #ffffff;
}

.faq-support-layout {
    align-items: start;
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(14rem, 17rem) minmax(0, 1fr);
}

.faq-topic-panel {
    background: rgba(255, 255, 255, 0.96);
    padding: 1rem;
    position: sticky;
    top: 5.5rem;
}

.faq-topic-panel__header h5 {
    color: var(--sc-heading);
    font-weight: 900;
    margin-bottom: 0.85rem;
}

.faq-topic-list {
    display: grid;
    gap: 0.35rem;
}

.faq-topic-list a {
    align-items: center;
    border-radius: 10px;
    color: #425466;
    display: grid;
    gap: 0.65rem;
    grid-template-columns: 1.35rem minmax(0, 1fr);
    padding: 0.65rem 0.7rem;
}

.faq-topic-list a:hover,
.faq-topic-list a:focus {
    background: rgba(63, 106, 216, 0.08);
    color: var(--sc-brand-dark, #3255ad);
}

.faq-topic-list i {
    color: var(--sc-brand, #3f6ad8);
    font-size: 1.1rem;
    text-align: center;
}

.faq-topic-list span {
/*    font-weight: 800;
*/    overflow-wrap: anywhere;
}

.faq-workflow-stack {
    display: grid;
    gap: 1.1rem;
    min-width: 0;
}

.faq-workflow-card {
    background: rgba(255, 255, 255, 0.98);
    overflow: hidden;
    scroll-margin-top: 6rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-workflow-card--match {
    border-color: rgba(63, 106, 216, 0.42);
    box-shadow: 0 18px 36px rgba(63, 106, 216, 0.12);
}

.faq-workflow-card__header {
    align-items: flex-start;
    background: #ffffff;
    border-bottom: 1px solid rgba(67, 89, 113, 0.1);
    display: grid;
    gap: 0.95rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 1.2rem 1.25rem;
}

.faq-workflow-card__icon {
    align-items: center;
    background: rgba(63, 106, 216, 0.1);
    border-radius: 14px;
    color: var(--sc-brand, #3f6ad8);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.45rem;
    height: 3rem;
    justify-content: center;
    width: 3rem;
}

.faq-workflow-card__label {
    color: var(--sc-brand-dark, #3255ad);
    display: block;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
}

.faq-workflow-card__header h5 {
    color: var(--sc-heading);
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.faq-workflow-card__header p {
    color: #5f6c7b;
    margin-bottom: 0;
}

.faq-match-badge {
    align-items: center;
    background: rgba(63, 106, 216, 0.1);
    border: 1px solid rgba(63, 106, 216, 0.2);
    border-radius: 999px;
    color: var(--sc-brand-dark, #3255ad);
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 900;
    justify-content: center;
    letter-spacing: 0.06em;
    padding: 0.35rem 0.65rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.faq-search-highlight {
    background: #fff2a8;
    border-radius: 0.25rem;
    box-shadow: 0 0 0 0.12rem rgba(255, 214, 64, 0.28);
    color: #2f2500;
    font-weight: 900;
    padding: 0.03rem 0.12rem;
}

.faq-workflow-card__body {
    padding: 1rem 1.25rem 1.25rem;
}

.faq-accordion__item {
    background: #ffffff;
    border: 1px solid rgba(67, 89, 113, 0.12);
    border-radius: 12px;
    overflow: hidden;
}

.faq-accordion__item + .faq-accordion__item {
    margin-top: 0.75rem;
}

    .faq-accordion__item .accordion-button {
        background: #f4f4f4;
        color: var(--sc-heading);
        font-weight: 500;
        line-height: 1.35;
        padding: 1rem 1.1rem;
    }

.faq-accordion__item .accordion-button:not(.collapsed) {
    background: rgba(63, 106, 216, 0.08);
    color: var(--sc-brand-dark, #3255ad);
}

.faq-accordion__item .accordion-body {
    background: #fbfcff;
}

.faq-step-list {
    color: var(--sc-ink);
    counter-reset: faq-step;
    display: grid;
    gap: 0.65rem;
    list-style: none;
    margin-bottom: 1rem;
    padding-left: 0;
}

.faq-step-list li {
    align-items: start;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: 1.65rem minmax(0, 1fr);
    line-height: 1.55;
}

.faq-step-list li::before {
    align-items: center;
    background: rgba(63, 106, 216, 0.1);
    border-radius: 999px;
    color: var(--sc-brand-dark, #3255ad);
    content: counter(faq-step);
    counter-increment: faq-step;
    display: inline-flex;
    font-size: 0.76rem;
    font-weight: 900;
    height: 1.65rem;
    justify-content: center;
    margin-top: 0.05rem;
    width: 1.65rem;
}

.faq-link-row {
    border-top: 1px solid rgba(67, 89, 113, 0.12);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 1rem;
}

.faq-link-row .btn {
    font-weight: 800;
}

.faq-empty-state {
    margin-top: 0;
}

@media (max-width: 1199.98px) {
    .faq-support-hero,
    .faq-support-layout {
        grid-template-columns: 1fr;
    }

    .faq-topic-panel {
        position: static;
    }

    .faq-topic-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .faq-insight-row,
    .faq-topic-list {
        grid-template-columns: 1fr;
    }

    .faq-support-search {
        align-items: stretch;
        grid-template-columns: auto minmax(0, 1fr);
    }

    .faq-support-search button {
        grid-column: 1 / -1;
        width: 100%;
    }

    .faq-workflow-card__header {
        grid-template-columns: 1fr;
    }

    .faq-match-badge {
        justify-self: flex-start;
    }
}

@media (max-width: 575.98px) {
    .faq-support-hero {
        padding: 1rem;
    }

    .faq-support-hero h4 {
        font-size: 1.45rem;
    }

    .faq-workflow-card__body,
    .faq-workflow-card__header {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ==========================================================================
   Responsive foundation (PBI 37, Slice 0)
   ========================================================================== */

.sc-app-shell .app-header {
  z-index: var(--z-header);
}

/* RPI-F2: phone drawer. The theme switches to an off-canvas sidebar below 768px. */
body.sc-nav-open {
  overflow: hidden;
}

@media (max-width: 767.98px) {
  .sc-app-shell .app-sidebar {
    height: 100vh;
    height: 100dvh;
    z-index: var(--z-sidebar);
  }

  .sc-app-shell.sidebar-mobile-open .app-sidebar {
    box-shadow: 0 0 2rem rgba(10, 20, 40, 0.3);
  }

  .sc-app-shell .app-sidebar .scrollbar-sidebar {
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .sidebar-mobile-overlay {
    background: #1f2b3a;
    inset: 0;
    opacity: 0.55;
    z-index: var(--z-sidebar-scrim);
  }
}

/* Sign-in: on a phone show the form first; the marketing panel is desktop-only. */
@media (max-width: 767.98px) {
  .auth-page .auth-shell {
    padding: 1rem 0 2rem;
  }

  .auth-page .auth-shell__content {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .auth-page--login .auth-brand__mark--xl {
    height: 4.5rem;
  }

  .auth-page--login .public-auth-brand {
    margin-bottom: 1rem;
  }

  .auth-page--login .public-auth-hero {
    border-radius: 1.5rem;
    padding: 1rem;
  }

  .auth-page--login .public-auth-layout > .col-lg-7 {
    display: none;
  }

  .auth-page--login .public-auth-card {
    border-radius: 1.25rem;
  }

  .auth-page--login .public-auth-card .auth-panel__body {
    padding: 1.25rem;
  }
}

/* RPI-F4: pointer-aware sizing. Touch devices get 48px targets; mouse users keep today's density. */
@media (pointer: coarse) {
  .sc-app-shell .btn:not(.btn-sm):not(.btn-icon-only),
  .auth-page .btn,
  .sc-app-shell .form-control,
  .sc-app-shell .form-select,
  .sc-app-shell .dropdown-item,
  .sc-app-shell .page-link {
    min-height: 48px;
  }

  .sc-app-shell .btn-sm,
  .sc-app-shell .btn-icon-only,
  .sc-app-shell .mobile-toggle-nav,
  .sc-app-shell .mobile-toggle-header-nav {
    min-height: 44px;
    min-width: 44px;
  }

  .sc-app-shell .dropdown-item,
  .sc-app-shell .vertical-nav-menu a {
    align-items: center;
    display: flex;
  }
}

/* iOS Safari zooms the page when a focused field is under 16px. */
@media (max-width: 767.98px) {
  .sc-app-shell .form-control,
  .sc-app-shell .form-select,
  .auth-page .form-control,
  .auth-page .form-select {
    font-size: 16px;
  }
}

/* RPI-F4 primitives. Usage is documented in PBI 37 implementation-notes. */

/* Stack columns of a flex/grid row on phones. */
@media (max-width: 767.98px) {
  .sc-stack-sm {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .sc-stack-sm > * {
    width: 100%;
  }
}

/* Sticky bottom action bar for forms (phones); inline from md up. */
@media (max-width: 767.98px) {
  .sc-sticky-actions {
    background: var(--sc-surface);
    border-top: 1px solid var(--sc-border);
    bottom: 0;
    box-shadow: 0 -0.5rem 1rem rgba(38, 52, 70, 0.08);
    display: flex;
    gap: 0.75rem;
    margin: 1rem -0.75rem 0;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
    position: sticky;
    z-index: 5;
  }

  .sc-sticky-actions > .btn {
    align-items: center;
    display: flex;
    flex: 1 1 0;
    justify-content: center;
    min-height: 44px;
  }
}

/* Table that becomes labelled cards below md. Cells need data-label="...".
   Generalizes the appointment board's card pattern. */
@media (max-width: 767.98px) {
  .sc-card-table table,
  .sc-card-table tbody,
  .sc-card-table tr,
  .sc-card-table td {
    display: block;
    width: 100%;
  }

  .sc-card-table thead {
    display: none;
  }

  .sc-card-table tr {
    background: var(--sc-surface);
    border: 1px solid var(--sc-border);
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.4rem 0.9rem;
  }

  .sc-card-table td {
    border: 0;
    column-gap: 1rem;
    display: grid;
    grid-template-columns: 6.5rem 1fr;
    padding: 0.4rem 0;
    text-align: right;
  }

  .sc-card-table td::before {
    align-self: start;
    color: var(--sc-muted);
    content: attr(data-label);
    font-weight: 600;
    text-align: left;
  }

  .sc-card-table td > * {
    grid-column: 2;
    justify-self: end;
  }
}

/* Modal presented as a bottom sheet on phones: add .sc-sheet to the .modal. */
@media (max-width: 767.98px) {
  .modal.sc-sheet .modal-dialog {
    align-items: flex-end;
    display: flex;
    margin: 0;
    max-width: none;
    min-height: 100%;
  }

  .modal.sc-sheet .modal-content {
    border-radius: 1.25rem 1.25rem 0 0;
    max-height: 85vh;
    max-height: 85dvh;
    overflow-y: auto;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    width: 100%;
  }
}

/* ==========================================================================
   Slice 1: shell, header, toasts, auth (PBI 37)
   ========================================================================== */

.app-header__mobile-title {
  display: none;
}

/* RPI-A1: phone header = menu button, clinic name, "more" button. The "more"
   panel carries search and the account menu, in the top bar colors (the theme
   draws it as a white pill, which made the white header text invisible). */
@media (max-width: 767.98px) {
  .sc-app-shell .app-header {
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }

  .sc-app-shell .app-header__mobile-title {
    color: var(--sc-header-text);
    display: block;
    flex: 1 1 auto;
    font-weight: 700;
    min-width: 0;
    order: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sc-app-shell .app-header .app-header__mobile-menu {
    padding: 0 0.75rem 0 1rem;
  }

  .sc-app-shell .app-header .app-header__menu {
    order: 3;
    padding: 0 1rem 0 0.5rem;
  }

  .sc-app-shell .app-header .app-header__content {
    align-items: stretch;
    background: var(--sc-header-bg);
    border-radius: 0 0 1rem 1rem;
    box-shadow: 0 1rem 1.5rem rgba(20, 30, 50, 0.22);
    flex-direction: column;
    gap: 0.75rem;
    height: auto;
    left: 0;
    max-height: calc(100vh - 60px);
    max-height: calc(100dvh - 60px);
    overflow: visible;
    padding: 0.75rem 1rem 1rem;
    top: 0;
    width: 100%;
  }

  .sc-app-shell .app-header .app-header__content.header-mobile-open {
    top: 60px;
  }

  .sc-app-shell .app-header .app-header__content .physician-header {
    display: none;
  }

  .sc-app-shell .app-header .app-header__content .app-header-left,
  .sc-app-shell .app-header .app-header__content .app-header-right {
    margin-left: 0;
    width: 100%;
  }

  .sc-app-shell .app-header .app-header__content .app-header-right {
    justify-content: flex-start;
  }

  .sc-app-shell .app-header .avatar-initial {
    box-shadow: 0 0 0 2px var(--sc-header-border);
  }

  .sc-app-shell .patient-search__button {
    background: rgba(255, 255, 255, 0.16);
    border-color: var(--sc-header-border);
  }
}

/* RPI-A3: toasts under the header on phones, readable and dismissable. */
@media (max-width: 575.98px) {
  .sc-toast-stack {
    left: max(0.75rem, env(safe-area-inset-left, 0px));
    right: max(0.75rem, env(safe-area-inset-right, 0px));
    top: calc(60px + 0.5rem);
    width: auto;
  }

  .sc-toast {
    padding: 0.85rem;
  }

  .sc-toast__close {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
  }
}

/* RPI-B2: password rule checklist. */
.sc-password-rules {
  color: var(--sc-muted);
  font-size: 0.85rem;
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.sc-password-rules li {
  padding-left: 1.4rem;
  position: relative;
}

.sc-password-rules li::before {
  content: "\25CB";
  left: 0;
  position: absolute;
}

.sc-password-rules li.is-met {
  color: #1b6b3a;
}

.sc-password-rules li.is-met::before {
  content: "\2713";
}

/* ==========================================================================
   Slice 2: appointments (PBI 37)
   ========================================================================== */

/* Reusable bottom sheet for a Bootstrap dropdown: put data-sc-sheet on the
   .dropdown wrapper and data-sheet-title on the .dropdown-menu. */
.sc-sheet-scrim {
  background: #1f2b3a;
  inset: 0;
  opacity: 0.5;
  position: fixed;
  z-index: var(--z-sheet-scrim);
}

@media (max-width: 767.98px) {
  [data-sc-sheet] .dropdown-menu.show {
    border: 0;
    border-radius: 1.25rem 1.25rem 0 0;
    bottom: 0 !important;
    box-shadow: 0 -1rem 2rem rgba(20, 30, 50, 0.25);
    left: 0 !important;
    margin: 0 !important;
    max-height: 80vh;
    max-height: 80dvh;
    overflow-y: auto;
    padding: 0.5rem 0 calc(0.75rem + env(safe-area-inset-bottom, 0px));
    position: fixed !important;
    right: 0 !important;
    top: auto !important;
    transform: none !important;
    width: auto !important;
    z-index: var(--z-dropdown);
  }

  [data-sc-sheet] .dropdown-menu.show::before {
    background: var(--sc-border);
    border-radius: 999px;
    content: "";
    display: block;
    height: 4px;
    margin: 0.35rem auto 0.5rem;
    width: 2.5rem;
  }

  [data-sc-sheet] .dropdown-menu .dropdown-item {
    align-items: center;
    display: flex;
    min-height: 48px;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .modal.sc-sheet .modal-footer {
    flex-wrap: nowrap;
    gap: 0.5rem;
  }

  .modal.sc-sheet .modal-footer > .btn {
    flex: 1 1 0;
    margin: 0;
    min-height: 44px;
  }
}

/* Day board: compact appointment cards on phones (RPI-C1). */
@media (max-width: 575.98px) {
  .board-hero .page-hero__actions {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .board-hero .page-hero__actions > .btn {
    flex: none;
    grid-column: span 2;
    width: 100%;
  }

  .board-hero .page-hero__actions > .btn:nth-child(4) {
    grid-column: span 6;
  }

  .board-hero .page-hero__actions > .btn:nth-child(5),
  .board-hero .page-hero__actions > .btn:nth-child(6) {
    grid-column: span 3;
  }
}

@media (max-width: 767.98px) {
  .board-table tr.board-row {
    column-gap: 0.75rem;
    display: grid;
    grid-template-areas:
      "time status"
      "patient patient"
      "visit visit"
      "location payment"
      "actions actions";
    grid-template-columns: 1fr auto;
    padding: 0.75rem 0.9rem;
    row-gap: 0.35rem;
  }

  .board-table tr.board-row > td {
    display: block;
    padding: 0;
    text-align: left;
    width: auto;
  }

  .board-table tr.board-row > td::before {
    content: none;
  }

  .board-table tr.board-row > td > * {
    justify-self: auto;
  }

  .board-table tr.board-row > td:nth-child(1) { grid-area: time; padding-left: 0.6rem; }
  .board-table tr.board-row > td:nth-child(2) { grid-area: patient; font-size: 1.05rem; }
  .board-table tr.board-row > td:nth-child(3) { grid-area: visit; }
  .board-table tr.board-row > td:nth-child(4) { color: var(--sc-muted); font-size: 0.9rem; grid-area: location; }
  .board-table tr.board-row > td:nth-child(5) { grid-area: status; text-align: right; }
  .board-table tr.board-row > td:nth-child(6) { grid-area: payment; text-align: right; }
  .board-table tr.board-row > td.board-actions { grid-area: actions; margin-top: 0.4rem; }

  .board-table tr.board-row td.board-actions > div {
    display: flex !important;
    gap: 0.5rem;
    width: 100%;
  }

  .board-table tr.board-row td.board-actions .btn {
    min-height: 48px;
  }

  .board-table tr.board-row td.board-actions > div > form,
  .board-table tr.board-row td.board-actions > div > a.btn {
    flex: 1 1 auto;
  }

  .board-table tr.board-row td.board-actions > div > form .btn,
  .board-table tr.board-row td.board-actions > div > a.btn {
    width: 100%;
  }

  .board-table tr.board-row td.board-actions .dropdown {
    flex: 0 0 auto;
  }
}

/* Status and label chips. The markup uses Sneat-style `bg-label-*` classes that
   no stylesheet defined, so every chip rendered unstyled. Tinted background with
   dark text, all pairs at least 5:1 on white and on --sc-shell. (RPI-F3) */
.bg-label-primary { background-color: rgba(63, 106, 216, 0.14); color: #2d4fa6; }
.bg-label-secondary { background-color: rgba(108, 117, 125, 0.16); color: #495057; }
.bg-label-success { background-color: rgba(40, 167, 69, 0.16); color: #146c2e; }
.bg-label-info { background-color: rgba(22, 170, 255, 0.16); color: #0b5f8a; }
.bg-label-warning { background-color: rgba(255, 171, 0, 0.2); color: #7a5000; }
.bg-label-danger { background-color: rgba(217, 37, 80, 0.14); color: #a31535; }
.bg-label-dark { background-color: rgba(38, 52, 70, 0.14); color: #263446; }
.bg-label-light { background-color: #f1f3f7; color: #495057; }

.badge.bg-label-primary,
.badge.bg-label-secondary,
.badge.bg-label-success,
.badge.bg-label-info,
.badge.bg-label-warning,
.badge.bg-label-danger,
.badge.bg-label-dark,
.badge.bg-label-light {
  font-weight: 600;
}

/* Solid badges (`badge bg-*`) have no text color in the theme; pick one that
   passes 4.5:1 on each background. */
.badge.bg-primary,
.badge.bg-danger,
.badge.bg-dark,
.badge.bg-secondary {
  color: #ffffff;
}

.badge.bg-info {
  color: #06283d;
}

.badge.bg-warning {
  color: #3d2a00;
}

.badge.bg-success {
  color: #052e16;
}

/* Center labels in full-width phone buttons (an <a class="btn"> stretched by a
   flex or grid parent otherwise keeps its text at the top). */
@media (max-width: 767.98px) {
  .board-hero .page-hero__actions > .btn,
  .page-hero__actions > .btn,
  .sc-stack-sm > .btn {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 44px;
  }
}

/* Outline buttons whose theme color (yellow, light green, light blue) fails 4.5:1
   on white. Border keeps the hue; hover/active states keep the filled style. */
.sc-app-shell .btn-outline-warning:not(:hover):not(:active):not(.active):not(:disabled) { color: #7a5000; }
.sc-app-shell .btn-outline-success:not(:hover):not(:active):not(.active):not(:disabled) { color: #146c2e; }
.sc-app-shell .btn-outline-info:not(:hover):not(:active):not(.active):not(:disabled) { color: #0b5f8a; }

/* ==========================================================================
   Slice 3: encounters and dictation (PBI 37)
   ========================================================================== */

@media (max-width: 767.98px) {
  /* Queue cards: the action cell is a full-width button row, no label column. */
  .sc-card-table td.encounter-actions {
    grid-template-columns: 1fr;
  }

  .sc-card-table td.encounter-actions::before {
    display: none;
  }

  .sc-card-table td.encounter-actions > div {
    display: flex !important;
    gap: 0.5rem;
    grid-column: 1;
    justify-self: stretch;
    width: 100%;
  }

  .sc-card-table td.encounter-actions .btn {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 44px;
    width: 100%;
  }

  .sc-card-table td.encounter-actions > div > a.btn,
  .sc-card-table td.encounter-actions > div > form {
    flex: 1 1 0;
  }

  /* The queue cells hold bare text, keep it from running off the card. */
  .sc-card-table.text-nowrap td {
    white-space: normal;
  }

  /* Encounter note: room for thumbs and the fixed bar. */
  .encounter-doc-form .card-header p {
    display: none;
  }

  .encounter-doc-form textarea.form-control {
    min-height: 7rem;
  }

  .speech-to-text-trigger {
    min-height: 44px;
    min-width: 44px;
  }

  /* Vitals: one stacked row per reading. */
  .sc-vitals table,
  .sc-vitals tbody,
  .sc-vitals tr,
  .sc-vitals td {
    display: block;
    width: 100%;
  }

  .sc-vitals thead {
    display: none;
  }

  .sc-vitals tr {
    border-bottom: 1px solid var(--sc-border);
    padding: 0.5rem 0;
  }

  .sc-vitals td {
    border: 0;
    padding: 0.15rem 0;
  }

  .encounter-phone-bar {
    margin-bottom: 0;
  }
}

/* Recording bar: the stop control stays under the thumb while dictating on a phone. */
.sc-speech-bar {
  align-items: center;
  background: var(--sc-surface);
  border-top: 3px solid #d92550;
  bottom: 0;
  box-shadow: 0 -0.5rem 1.25rem rgba(38, 52, 70, 0.18);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  left: 0;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  position: fixed;
  right: 0;
  z-index: var(--z-dropdown);
}

.sc-speech-bar[hidden] {
  display: none;
}

.sc-speech-bar__time {
  align-items: center;
  color: var(--sc-heading);
  display: flex;
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  gap: 0.6rem;
}

.sc-speech-bar__dot {
  animation: sc-speech-pulse 1.2s ease-in-out infinite;
  background: #d92550;
  border-radius: 50%;
  display: inline-block;
  height: 0.8rem;
  width: 0.8rem;
}

.sc-speech-bar .sc-speech-bar__stop {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  font-size: 1.1rem;
  font-weight: 700;
  justify-content: center;
  min-height: 64px;
}

@keyframes sc-speech-pulse {
  50% {
    opacity: 0.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sc-speech-bar__dot {
    animation: none;
  }
}

/* Solid success buttons: white on the theme green is about 2.2:1. */
.sc-app-shell .btn-success,
.modal .btn-success {
  background-color: #1e8449;
  border-color: #1e8449;
  color: #ffffff;
}

.sc-app-shell .btn-success:hover,
.sc-app-shell .btn-success:focus,
.modal .btn-success:hover,
.modal .btn-success:focus {
  background-color: #17693a;
  border-color: #17693a;
  color: #ffffff;
}

.sc-app-shell .btn-success:disabled,
.modal .btn-success:disabled {
  background-color: #1e8449;
  border-color: #1e8449;
  opacity: 0.55;
}

/* ==========================================================================
   Slice 4: patients, billing, print views, dashboard (PBI 37)
   ========================================================================== */

@media (max-width: 767.98px) {
  /* A full-width message row ("No patients...") inside a card table. */
  .sc-card-table td[colspan] {
    display: block;
    text-align: center;
  }

  .sc-card-table td[colspan]::before {
    display: none;
  }

  /* Action cells that hold a button group: one full-width row. */
  .sc-card-table td.patient-actions {
    grid-template-columns: 1fr;
  }

  .sc-card-table td.patient-actions::before {
    display: none;
  }

  .sc-card-table td.patient-actions > .btn-group {
    display: flex;
    gap: 0.5rem;
    grid-column: 1;
    justify-self: stretch;
    width: 100%;
  }

  .sc-card-table td.patient-actions .btn {
    align-items: center;
    border-radius: 0.375rem !important;
    display: flex;
    flex: 1 1 0;
    justify-content: center;
    min-height: 44px;
  }

  /* Patient names and emails can be long; let them wrap inside the card. */
  .patient-cards td,
  .patient-cards td * {
    overflow-wrap: anywhere;
  }

  .patient-cards.text-nowrap td {
    white-space: normal;
  }

  .dashboard-cards.text-nowrap td {
    white-space: normal;
  }
}

/* Printable invoice / prescription on a phone: the on-screen sheet is
   190 mm wide for paper. Screen only, so printed output is unchanged. */
@media screen and (max-width: 767.98px) {
  .print-toolbar {
    align-items: stretch;
    flex-direction: column;
    padding: 0.75rem 0.75rem 0;
  }

  .print-toolbar h1 {
    font-size: 1.25rem;
  }

  .print-toolbar > div:last-child {
    flex-wrap: wrap;
  }

  .print-toolbar > div:last-child > .btn,
  .print-toolbar > div:last-child > form {
    flex: 1 1 100%;
  }

  .print-toolbar .btn {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 44px;
  }

  main.sheet {
    margin: 0;
    min-height: 0;
    padding: 1rem;
    width: auto;
  }

  main.sheet .header-grid,
  main.sheet .summary-grid,
  main.sheet .main-grid,
  main.sheet .clinical-grid,
  main.sheet .physician-banner {
    grid-template-columns: 1fr;
  }

  main.sheet table {
    display: block;
    overflow-x: auto;
  }

  main.sheet {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 575.98px) {
  .patient-page-hero__actions > form,
  .patient-detail-hero__actions > form {
    flex: 1 1 100%;
  }

  .patient-page-hero__actions > form .btn {
    width: 100%;
  }

  .patient-stat-card .card-body {
    padding: 0.85rem;
  }
}

.patient-action-icon {
  font-style: normal;
}

@media (max-width: 767.98px) {
  /* Dashboard schedule cards: actions are direct children of the cell. */
  .dashboard-cards td.encounter-actions {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: 1fr;
  }

  .dashboard-cards td.encounter-actions::before {
    display: none;
  }

  .dashboard-cards td.encounter-actions > * {
    grid-column: 1;
    justify-self: stretch;
    margin: 0 !important;
    width: 100%;
  }

  .dashboard-cards td.encounter-actions .btn {
    align-items: center;
    display: flex;
    justify-content: center;
    margin: 0 !important;
    min-height: 44px;
    width: 100%;
  }
}

@media screen and (max-width: 767.98px) {
  main.sheet .title-row {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  main.sheet .badge-line {
    flex-wrap: wrap;
  }

  main.sheet .badge-line > * {
    white-space: nowrap;
  }
}

/* ==========================================================================
   Slice 5: accessibility and resilience (PBI 37)
   ========================================================================== */

.sc-skip-link {
  background: var(--sc-brand-dark);
  border-radius: 0 0 0.5rem 0.5rem;
  color: #ffffff;
  left: 1rem;
  padding: 0.6rem 1rem;
  position: fixed;
  top: -4rem;
  transition: top 0.15s ease;
  z-index: var(--z-toast);
}

.sc-skip-link:focus {
  color: #ffffff;
  top: 0;
}

#main-content:focus {
  outline: none;
}

.sc-app-shell a:focus-visible,
.sc-app-shell button:focus-visible,
.sc-app-shell .btn:focus-visible,
.sc-app-shell .form-control:focus-visible,
.sc-app-shell .form-select:focus-visible,
.auth-page a:focus-visible,
.auth-page .btn:focus-visible {
  outline: 3px solid var(--sc-accent);
  outline-offset: 2px;
}

.sc-offline-banner {
  background: #7a5000;
  bottom: 0;
  color: #ffffff;
  font-size: 0.95rem;
  left: 0;
  padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
  position: fixed;
  right: 0;
  text-align: center;
  z-index: var(--z-toast);
}

.sc-offline-banner[hidden] {
  display: none;
}

.sc-offline-banner--flash {
  animation: sc-offline-flash 0.6s ease 2;
}

@keyframes sc-offline-flash {
  50% {
    background: #b03a00;
  }
}

/* Keep the bottom action bars clear of the offline banner. */
.sc-is-offline .sc-sticky-actions {
  bottom: 2.6rem;
}

.sc-idle-warning {
  background: var(--sc-surface);
  border: 1px solid var(--sc-border);
  border-radius: 0.75rem;
  bottom: 1rem;
  box-shadow: 0 1rem 2rem rgba(20, 30, 50, 0.25);
  color: var(--sc-ink);
  left: 1rem;
  padding: 1rem;
  position: fixed;
  right: 1rem;
  z-index: var(--z-toast);
}

.sc-idle-warning[hidden] {
  display: none;
}

@media (min-width: 576px) {
  .sc-idle-warning {
    left: auto;
    max-width: 22rem;
  }
}

.sc-privacy-blur .app-main,
.sc-privacy-blur .app-header {
  filter: blur(14px);
}

.sc-error-action {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 44px;
}

/* ==========================================================================
   PBI 40 - sign-in and registration on tablets and phones
   Desktop (>= 992px) is untouched. Below that:
   - tablets: the marketing panel is hidden so the form is first, centered at a readable width;
   - phones: the stacked padding (page margin + blue frame + card) is cut so inputs use about
     83% of the screen instead of about 63%.
   ========================================================================== */
@media (max-width: 991.98px) {
  .auth-page-shell--login .public-auth-layout > .col-lg-7,
  .auth-page-shell--register .public-auth-hero-column {
    display: none;
  }

  .auth-page-shell--login .public-auth-layout > .col-lg-5,
  .auth-page-shell--register .public-auth-form-column {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .auth-page-shell--login .public-auth-card {
    max-width: 30rem;
  }

  .auth-page-shell--register .public-auth-card {
    max-width: 44rem;
  }

  .auth-page-shell .public-auth-hero {
    padding: 1.5rem;
  }

  .auth-page-shell .public-auth-card {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 575.98px) {
  .auth-shell {
    padding: 0.75rem 0 1.25rem;
  }

  .auth-page .auth-shell {
    padding: 0.75rem 0 1.25rem;
  }

  .auth-shell__inner {
    padding-left: 0;
    padding-right: 0;
  }

  .auth-shell__content,
  .auth-page .auth-shell__content {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .auth-page-shell .auth-brand {
    margin-bottom: 0.75rem;
  }

  .auth-page-shell .public-auth-brand__logo,
  .auth-page--login .auth-brand__mark--xl {
    height: 44px;
    max-width: 160px;
  }

  .auth-page-shell .public-auth-hero {
    --bs-gutter-x: 0;
    padding: 0.375rem;
    border-radius: 1.25rem;
  }

  .auth-page-shell .public-auth-card {
    border-radius: 1rem;
  }

  .auth-page-shell .public-auth-card .auth-panel__body {
    padding: 1rem;
  }

  .auth-page-shell .public-auth-card .auth-panel__footer {
    padding: 0 1rem 1rem;
  }

  .auth-page-shell .auth-panel__title {
    font-size: 1.35rem;
  }

  .auth-page-shell .auth-panel__subtitle {
    margin-bottom: 1rem;
  }

  .auth-page-shell .auth-section + .auth-section {
    margin-top: 1rem;
  }

  .auth-page-shell .auth-section__title {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
  }

  .auth-page-shell .auth-section .row {
    --bs-gutter-y: 0.75rem;
  }

  /* Sign-in: "Remember me" and "Forgot password?" stay on one line when they fit and wrap cleanly when they do not. */
  .auth-page-shell .auth-form .d-flex.justify-content-between {
    flex-wrap: wrap;
    gap: 0.5rem 1rem !important;
    margin-bottom: 1rem !important;
  }

  .auth-page-shell .auth-form .form-check-label {
    white-space: nowrap;
  }

  .auth-page-shell .auth-footer-note {
    margin-top: 0.75rem;
  }
}

@media (max-width: 359.98px) {
  .auth-page-shell .public-auth-card .auth-panel__body {
    padding: 0.875rem;
  }

  .auth-page-shell .public-auth-card .auth-panel__footer {
    padding: 0 0.875rem 0.875rem;
  }
}

/* The verification widget is a fixed ~300px wide; if it is wider than the card it scrolls inside its own box. */
.auth-page-shell .captcha-widget {
  max-width: 100%;
  overflow-x: auto;
}

.auth-page-shell .auth-captcha .captcha-widget {
  margin-top: 1rem;
}

/* PBI 40 - accessibility and touch sizing on the auth pages */
.auth-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-page-shell .auth-footer-note a {
  /* The theme sets "a { text-decoration: none !important }", so this needs !important to underline. */
  text-decoration: underline !important;
  text-underline-offset: 2px;
}

#main-content:focus {
  outline: none;
}

@media (pointer: coarse) {
  .auth-page-shell .form-control,
  .auth-page-shell .form-select,
  .auth-page-shell .btn {
    min-height: 48px;
  }

  .auth-page-shell .form-password-toggle .btn {
    min-width: 48px;
  }

  .auth-page-shell .auth-form .form-check {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 48px;
    padding-left: 0;
  }

  .auth-page-shell .auth-form .form-check-input {
    float: none;
    flex: 0 0 auto;
    width: 1.5rem;
    height: 1.5rem;
    margin: 0;
  }

  .auth-page-shell .auth-inline-link,
  .auth-page-shell .auth-footer-note a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

/* Patient reports (PBI 42): the patient's free-text note keeps its line breaks and never overflows the card. */
.report-note {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* The theme's card heading colour (#6779a8) is 4.3:1 on white, just under the WCAG AA 4.5:1 for text this size. */
.report-panel-title {
    color: #3f4f6d;
}

/* ==========================================================================
   PBI 41 - signed-in app shell: content must never be wider than the screen
   The flex child .app-main__outer defaulted to min-width:auto, so one wide block (dashboard cards,
   tables, forms) made it wider than the viewport and the overflow was clipped by .app-container with
   no way to scroll: dashboard content was cut off on 1366 px laptops and tablets.
   ========================================================================== */
.app-main .app-main__outer,
.app-main .app-main__inner {
  min-width: 0;
}

/* Header links (Dashboard, Patients, Home) stay on one line. Between tablet and small laptop widths there is
   no room for the labels next to the search box, so they collapse to icons; the label stays in the markup
   for screen readers. */
.sc-app-shell .header-menu {
  flex-wrap: nowrap;
}

.sc-app-shell .header-menu .nav-link {
  white-space: nowrap;
}

@media (min-width: 768px) and (max-width: 1099.98px) {
  .sc-app-shell .header-menu__label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .sc-app-shell .header-menu .nav-link {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/* Touch screens: header buttons and menu links meet the 44 px target size. */
@media (pointer: coarse) {
  .sc-app-shell .app-header .hamburger.mobile-toggle-nav,
  .sc-app-shell .app-header .mobile-toggle-header-nav {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .sc-app-shell .app-sidebar .vertical-nav-menu li a {
    min-height: 44px;
    height: auto;
    line-height: 44px;
  }

  .sc-app-shell .header-menu .nav-link,
  .sc-app-shell .app-footer a.nav-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* Text contrast in the signed-in app (WCAG AA, 4.5:1). Each colour below is the nearest darker shade of the
   theme colour it replaces, so the look is unchanged apart from slightly stronger secondary text.
   Secondary text goes through the Bootstrap variable, so contexts that set their own colour (an active list
   item, a coloured card) keep working. */
.sc-app-shell {
  --bs-secondary-color: #545a60;
}

.sc-app-shell .list-group-item.active,
.sc-app-shell .bg-primary {
  --bs-secondary-color: rgba(255, 255, 255, 0.9);
}

.btn-outline-secondary {
  --bs-btn-color: #545a60;
  --bs-btn-disabled-color: #545a60;
}

.sc-app-shell .card-header,
.sc-app-shell .card-header h5,
.sc-app-shell .card-header .fw-semibold,
.sc-app-shell .support-conversation-header h5 {
  color: #3d4f7c;
}

.sc-app-shell .board-tile__label,
.sc-app-shell .support-thread-card__meta,
.sc-app-shell .usage-alert-card__description {
  color: #566270;
}

.sc-app-shell code {
  color: #b4236a;
}

.sc-app-shell .list-group-item.active .badge.bg-label-info {
  background: #fff;
  color: #0b5f8a;
}

.sc-app-shell .app-header .widget-heading,
.sc-app-shell .app-header .widget-subheading {
  color: var(--sc-header-text) !important;
  opacity: 1;
}

.sc-app-shell .app-header .nav-link.active {
  background: #2f55bb;
  color: #fff;
}

.page-card .list-group-item.active .text-muted {
  color: #fff !important;
}

.sc-app-shell .theme-preview-panel__header small {
  color: #545a60;
}
