.page-content {
  background:
    radial-gradient(circle at top right, rgba(2, 192, 206, 0.08), transparent 26%),
    linear-gradient(180deg, #f5f7fb 0%, #eef2f7 100%);
}

html[data-scroll-restoring="1"] body {
  opacity: 0;
}

.clinical-hero-card {
  overflow: hidden;
  position: relative;
}

.clinical-hero-card::after {
  content: "";
  position: absolute;
  inset: auto -60px -60px auto;
  width: 180px;
  height: 180px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

.clinical-stat-card .avatar-title {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.clinical-empty-state {
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed rgba(108, 117, 125, 0.28);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
}

.clinical-stat-tile,
.clinical-profile-detail-tile,
.notifications-detail-card {
  border: 1px solid rgba(108, 117, 125, 0.18);
  border-radius: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.9);
  min-height: 100%;
}

.clinical-habit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
}

.clinical-habit-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 0.95rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(108, 117, 125, 0.18);
  background: rgba(255, 255, 255, 0.88);
  font-weight: 600;
}

.clinical-habit-chip i {
  font-size: 1.1rem;
}

.clinical-habit-chip.is-success {
  color: #0f5132;
  background: rgba(25, 135, 84, 0.1);
  border-color: rgba(25, 135, 84, 0.18);
}

.clinical-habit-chip.is-warning {
  color: #664d03;
  background: rgba(255, 193, 7, 0.14);
  border-color: rgba(255, 193, 7, 0.18);
}

.clinical-habit-chip.is-danger {
  color: #842029;
  background: rgba(220, 53, 69, 0.1);
  border-color: rgba(220, 53, 69, 0.18);
}

.clinical-habit-chip.is-info {
  color: #055160;
  background: rgba(13, 202, 240, 0.1);
  border-color: rgba(13, 202, 240, 0.18);
}

.clinical-habit-chip.is-secondary {
  color: #495057;
  background: rgba(108, 117, 125, 0.08);
  border-color: rgba(108, 117, 125, 0.16);
}

.patient-identity-strip {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid rgba(108, 117, 125, 0.16);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.05);
}

.patient-identity-strip__main {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  min-width: 0;
  flex: 1;
}

.patient-identity-strip__avatar {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(2, 192, 206, 0.16), rgba(2, 192, 206, 0.3));
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 800;
  flex-shrink: 0;
}

.patient-identity-strip__content {
  min-width: 0;
  flex: 1;
}

.patient-identity-strip__name-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.patient-identity-strip__name {
  font-size: 1.75rem;
  line-height: 1.1;
}

.patient-identity-strip__meta,
.patient-identity-strip__contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.6rem;
}

.patient-identity-strip__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #64748b;
  font-size: 0.92rem;
}

.patient-contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
  color: #475569;
  font-size: 0.82rem;
  font-weight: 600;
}

.patient-contact-chip.is-accent {
  background: rgba(2, 192, 206, 0.12);
  color: #0f766e;
}
.patient-contact-chip.is-invoice {
  background: rgba(16, 185, 129, 0.1);
  color: #065f46;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.patient-contact-chip.is-invoice:hover {
  background: rgba(16, 185, 129, 0.18);
}
.patient-contact-chip__sub {
  font-weight: 400;
  opacity: 0.75;
  font-size: 0.75rem;
}

.patient-identity-strip__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.patient-registration-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(245, 158, 11, 0.28);
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.94), rgba(255, 247, 237, 0.92));
  box-shadow: 0 14px 28px rgba(245, 158, 11, 0.08);
}

.patient-registration-alert__body {
  min-width: 0;
}

.patient-registration-alert__title {
  font-size: 0.96rem;
  font-weight: 800;
  color: #92400e;
  margin-bottom: 0.35rem;
}

.patient-registration-alert__body p {
  color: #9a3412;
}

.patient-registration-alert__action {
  flex-shrink: 0;
}

.patient-summary-chip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}
.patient-summary-chip {
  border: 1px solid rgba(108, 117, 125, 0.16);
  border-radius: 0.85rem;
  padding: 0.7rem 0.8rem;
  background: rgba(255, 255, 255, 0.88);
}

.patient-summary-chip__label,
.patient-summary-card__eyebrow {
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.patient-summary-chip__value,
.patient-summary-card__value {
  margin-top: 0.25rem;
  color: #0f172a;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.1;
}

.patient-summary-chip__hint,
.patient-summary-card__meta {
  margin-top: 0.25rem;
  color: #64748b;
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.patient-signal-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.45rem;
  padding: 1rem 0.85rem;
  border-radius: 1rem;
  border: 1px solid rgba(108, 117, 125, 0.16);
  background: rgba(255, 255, 255, 0.94);
  color: inherit;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.patient-signal-widget:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.patient-signal-widget__ring {
  --signal-color: #64748b;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at center, #fff 56%, transparent 57%),
    conic-gradient(var(--signal-color) var(--signal-value), rgba(148, 163, 184, 0.18) 0);
}

.patient-signal-widget--success .patient-signal-widget__ring {
  --signal-color: #16a34a;
}

.patient-signal-widget--warning .patient-signal-widget__ring {
  --signal-color: #f59e0b;
}

.patient-signal-widget--danger .patient-signal-widget__ring {
  --signal-color: #dc2626;
}

.patient-signal-widget--info .patient-signal-widget__ring,
.patient-signal-widget--primary .patient-signal-widget__ring {
  --signal-color: #02c0ce;
}

.patient-signal-widget__value {
  color: #0f172a;
  font-size: 1.1rem;
  font-weight: 800;
}

.patient-signal-widget__label {
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 700;
}

.patient-signal-widget__hint {
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 600;
}

/* ── Patient details card: subsection dividers ─────────────────────── */
.pd-subsection-divider {
  border-top: 1px solid rgba(108, 117, 125, 0.14);
  padding-top: 0.9rem;
  margin-top: 1rem;
  margin-bottom: 0.6rem;
}
.pd-subsection-divider:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}
.pd-subsection-divider__title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.2rem;
}
.pd-subsection-divider__sub {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-bottom: 0.65rem;
}
.pd-calm-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: #64748b;
}


.patient-flag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.patient-flag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.48rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.14);
  color: #92400e;
}

.patient-flag-pill.is-danger {
  background: rgba(220, 38, 38, 0.12);
  color: #991b1b;
}

.patient-flag-pill.is-warning {
  background: rgba(245, 158, 11, 0.14);
  color: #92400e;
}

.patient-summary-card {
  border: 1px solid rgba(108, 117, 125, 0.16);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.94);
  padding: 1rem;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.05);
}

.patient-summary-card--calm {
  box-shadow: none;
}

.patient-timeline-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.patient-treatment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  border: 1px solid rgba(108, 117, 125, 0.16);
  border-radius: 1rem;
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

.patient-treatment-row__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.patient-treatment-row__identity {
  min-width: 0;
}

.patient-treatment-row__title {
  color: #0f172a;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
}

.patient-treatment-row__subtitle {
  margin-top: 0.35rem;
  color: #64748b;
  font-size: 0.84rem;
}

.patient-treatment-row__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.patient-treatment-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 0.7rem;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 600;
}

.patient-treatment-row__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.patient-treatment-row__meta i {
  color: #02c0ce;
}

.patient-treatment-dot-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  margin-top: 0.9rem;
}

.patient-treatment-dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 999px;
  display: inline-block;
  border: 2px solid transparent;
  background: rgba(148, 163, 184, 0.18);
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.08);
  cursor: pointer;
}

.patient-treatment-dot.is-taken {
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

.patient-treatment-dot.is-omitted,
.patient-treatment-dot.is-red_flag {
  background: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.patient-treatment-dot.is-overdue,
.patient-treatment-dot.is-pending {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14);
}

.patient-treatment-dot.is-followup {
  background: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.patient-treatment-dot.is-future,
.patient-treatment-dot.is-off {
  background: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.08);
}

.patient-treatment-actions-menu form {
  margin: 0;
}

.patient-treatment-actions-menu .dropdown-item {
  width: 100%;
}

.patient-profile-drawer {
  width: min(100vw, 760px);
}

.patient-profile-drawer--wide {
  --bs-offcanvas-width: 60vw;
  width: 60vw;
  max-width: 100vw;
}

.patient-treatment-advanced-drawer {
  --bs-offcanvas-width: 60vw;
  width: 60vw;
  max-width: 100vw;
}

@media (max-width: 991.98px) {
  .patient-signal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .patient-treatment-row__header {
    flex-direction: column;
  }

  .patient-treatment-row__actions {
    width: 100%;
    justify-content: flex-start;
  }

  .patient-profile-drawer--wide {
    --bs-offcanvas-width: 100vw;
    width: 100vw;
  }

  .patient-treatment-advanced-drawer {
    --bs-offcanvas-width: 100vw;
    width: 100vw;
  }
}

@media (max-width: 575.98px) {
  .patient-signal-grid,
  .patient-summary-chip-grid {
    grid-template-columns: 1fr;
  }

  .patient-registration-alert {
    flex-direction: column;
    align-items: stretch;
  }
}

.timeline-stream {
  position: relative;
}

.timeline-stream::before {
  display: none;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 0.88rem;
  bottom: -1.25rem;
  left: 0.9rem;
  width: 2px;
  background: rgba(108, 117, 125, 0.16);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-item {
  position: relative;
  padding-left: 3rem;
}

.timeline-item + .timeline-item {
  margin-top: 1.25rem;
}

.timeline-dot {
  position: absolute;
  left: 0.28rem;
  top: 0.3rem;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #64748b;
  box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.14);
}

.timeline-dot i {
  font-size: 0.68rem;
  line-height: 1;
}

.timeline-dot.is-note {
  background: #0ea5e9;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.16);
}

.timeline-dot.is-patient {
  background: #06b6d4;
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.16);
}

.timeline-dot.is-intake {
  background: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.16);
}

.timeline-dot.is-calendar {
  background: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16);
}

.timeline-dot.is-followup {
  background: #0891b2;
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.16);
}

.timeline-dot.is-treatment {
  background: #14b8a6;
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.16);
}

.timeline-dot.is-invoice {
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.16);
}

.timeline-dot.is-success {
  background: #16a34a;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.16);
}

.timeline-dot.is-warning {
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.timeline-dot.is-danger {
  background: #dc2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.16);
}

.timeline-dot.is-muted {
  background: #64748b;
  box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.16);
}

.clinical-timeline-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.36rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.clinical-timeline-badge i {
  font-size: 0.9rem;
}

.clinical-timeline-badge.is-note {
  color: #075985;
  background: rgba(14, 165, 233, 0.12);
}

.clinical-timeline-badge.is-patient {
  color: #0f766e;
  background: rgba(6, 182, 212, 0.12);
}

.clinical-timeline-badge.is-intake {
  color: #4338ca;
  background: rgba(99, 102, 241, 0.12);
}

.clinical-timeline-badge.is-calendar {
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.12);
}

.clinical-timeline-badge.is-followup {
  color: #0f766e;
  background: rgba(8, 145, 178, 0.12);
}

.clinical-timeline-badge.is-treatment {
  color: #0f766e;
  background: rgba(20, 184, 166, 0.12);
}

.clinical-timeline-badge.is-invoice {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
}

.clinical-timeline-badge.is-success {
  color: #166534;
  background: rgba(22, 163, 74, 0.12);
}

.clinical-timeline-badge.is-warning {
  color: #92400e;
  background: rgba(245, 158, 11, 0.14);
}

.clinical-timeline-badge.is-danger {
  color: #991b1b;
  background: rgba(220, 38, 38, 0.12);
}

.clinical-timeline-badge.is-muted,
.clinical-timeline-badge.is-default {
  color: #475569;
  background: rgba(100, 116, 139, 0.12);
}

.patient-timeline-card {
  background: transparent;
  box-shadow: none;
}

.patient-timeline-card > .card-header,
.patient-timeline-card > .card-body {
  background: transparent;
}

.clinical-timeline-event-card {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.org-select-option {
  cursor: pointer;
  transition: all 0.2s ease;
}

.org-select-option.active,
.org-select-option:hover {
  border-color: rgba(2, 192, 206, 0.48);
  background: rgba(2, 192, 206, 0.06);
}

.organization-switcher-logo-shell {
  width: 2.25rem;
  height: 2.25rem;
  vertical-align: middle;
}

.organization-switcher-logo,
.organization-avatar-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.organization-branding-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px dashed rgba(108, 117, 125, 0.24);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
}

.organization-branding-preview-main {
  width: min(100%, 14rem);
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid rgba(108, 117, 125, 0.16);
  border-radius: 0.85rem;
  padding: 0.75rem;
}

.organization-branding-preview-main img {
  max-width: 100%;
  max-height: 3rem;
  object-fit: contain;
}

.organization-branding-preview-icon {
  width: 4.25rem;
  height: 4.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid rgba(108, 117, 125, 0.16);
  border-radius: 0.85rem;
  padding: 0.5rem;
}

.organization-branding-preview-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wizard-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.wizard-step {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid rgba(108, 117, 125, 0.22);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  background: rgba(255, 255, 255, 0.76);
}

.wizard-step span {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: #02c0ce;
  color: #fff;
}

.wizard-check {
  display: flex;
  gap: 0.85rem;
  border: 1px solid rgba(108, 117, 125, 0.22);
  border-radius: 0.9rem;
  padding: 1rem;
  cursor: pointer;
  min-height: 100%;
}

.wizard-check small {
  display: block;
  color: #6c757d;
  margin-top: 0.25rem;
}

.table td,
.table th {
  vertical-align: middle;
}

.clinical-card-section {
  min-height: 100%;
}

.clinical-key-value dt {
  color: #6c757d;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.clinical-key-value dd {
  margin-bottom: 1rem;
  font-weight: 600;
}

#patient-forms-panel .table-responsive {
  overflow-x: visible;
}

#patient-forms-panel .table {
  width: 100%;
  table-layout: fixed;
}

#patient-forms-panel .table td,
#patient-forms-panel .table th {
  white-space: normal;
}

.calendar-shell {
  min-height: 620px;
}

.calendar-shell--workspace .fc {
  --fc-border-color: rgba(108, 117, 125, 0.18);
  --fc-page-bg-color: transparent;
  --fc-neutral-bg-color: rgba(108, 117, 125, 0.05);
  --fc-list-event-hover-bg-color: rgba(2, 192, 206, 0.08);
}

.calendar-shell--workspace .fc .fc-toolbar-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.calendar-shell--workspace .fc .fc-button {
  border-radius: 0.55rem;
}

.calendar-shell--workspace .fc .fc-event {
  border-radius: 0.55rem;
  padding: 0.15rem 0.3rem;
  font-weight: 600;
}

.calendar-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.calendar-toolbar-meta {
  max-width: min(100%, 52rem);
}

.calendar-legend-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  display: inline-block;
}

.calendar-legend-dot.is-scheduled {
  background: #3b82f6;
}

.calendar-legend-dot.is-confirmed {
  background: #14b8a6;
}

.calendar-legend-dot.is-completed {
  background: #16a34a;
}

.calendar-legend-dot.is-canceled {
  background: #6b7280;
}

.calendar-legend-dot.is-no-show {
  background: #f59e0b;
}

.calendar-legend-dot.is-availability {
  background: #0f766e;
}

.calendar-legend-dot.is-out {
  background: #475569;
}

.calendar-event-summary-card {
  background: rgba(2, 192, 206, 0.06);
  border: 1px solid rgba(2, 192, 206, 0.16);
  border-radius: 1rem;
  padding: 1rem;
}

.calendar-event-popover {
  position: fixed;
  z-index: 1080;
  width: min(340px, calc(100vw - 2rem));
  border: 1px solid rgba(108, 117, 125, 0.18);
  border-radius: 1rem;
  overflow: hidden;
}

.calendar-editor-offcanvas {
  width: min(100vw, 480px);
}

.calendar-editor-summary {
  background: rgba(2, 192, 206, 0.06);
  border: 1px solid rgba(2, 192, 206, 0.16);
  border-radius: 1rem;
  padding: 1rem;
}

.calendar-filter-toolbar {
  padding: 1rem;
  border: 1px solid rgba(108, 117, 125, 0.16);
  border-radius: 1rem;
  background: rgba(248, 250, 252, 0.9);
}

.calendar-filter-toolbar .form-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.calendar-filter-toggle {
  white-space: nowrap;
}

.calendar-editor-history .timeline-item + .timeline-item {
  margin-top: 1rem;
}

.topbar-menu .page-title {
  letter-spacing: -0.02em;
}

.page-title-link {
  color: inherit;
  text-decoration: none;
}

.page-title-link:hover {
  color: var(--ct-primary);
}

button.topbar-link {
  border: 0;
  background: transparent;
}

.topbar-icon-badge {
  position: absolute;
  top: 0.05rem;
  right: -0.15rem;
  min-width: 1rem;
  height: 1rem;
  border-radius: 999px;
  background: #dc3545;
  color: #fff;
  font-size: 0.65rem;
  line-height: 1rem;
  text-align: center;
  padding: 0 0.25rem;
}

.topbar-profile-button {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding-inline: 0.55rem;
}

.topbar-profile-dropdown {
  min-width: 18rem;
}

.topbar-notifications-dropdown {
  min-width: 24rem;
}

.topbar-notifications-scroll {
  max-height: 24rem;
}

.topbar-notification-item-unread {
  background: rgba(255, 193, 7, 0.06);
}

.notifications-inbox-list {
  max-height: 70vh;
  overflow: auto;
}

.notifications-inbox-item {
  display: block;
  padding: 1rem 1rem 1rem 1.15rem;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(108, 117, 125, 0.12);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.notifications-inbox-item:hover {
  background: rgba(2, 192, 206, 0.05);
}

.notifications-inbox-item.is-active {
  background: rgba(2, 192, 206, 0.08);
}

.notifications-inbox-item.is-unread {
  border-left: 3px solid #02c0ce;
}

/*
 * UI fix layer
 * Use these page-scoped composition helpers when the vendor template does not ship
 * an appropriate component for a product-specific screen. Keep them namespaced
 * under a dedicated surface and avoid overriding template globals directly.
 */
.ui-fix-shell {
  position: relative;
}

.ui-fix-card {
  border: 1px solid rgba(108, 117, 125, 0.16);
  border-radius: 1.1rem;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.05);
}

/* ── Patient profile: flat cards, tight layout ──────────────────────── */
[data-ui-fix-surface="patient-profile"] .ui-fix-card,
[data-ui-fix-surface="patient-profile"] .patient-summary-card,
[data-ui-fix-surface="patient-profile"] .patient-identity-strip {
  box-shadow: none !important;
}
[data-ui-fix-surface="patient-profile"] [data-patient-profile-page] {
  --bs-gutter-x: 0.75rem;
  --bs-gutter-y: 0.75rem;
}
[data-ui-fix-surface="patient-profile"] .mb-4 {
  margin-bottom: 0.75rem !important;
}
[data-ui-fix-surface="patient-profile"] .patient-signal-grid {
  margin-bottom: 0.5rem;
}

[data-ui-fix-surface="notification-config"] .card-body {
  position: relative;
}

.notification-overview-stack {
  display: grid;
  gap: 0.9rem;
}

.notification-overview-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(108, 117, 125, 0.14);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.9);
}

.notification-overview-item.is-locked {
  background: rgba(248, 250, 252, 0.92);
}

.notification-overview-icon,
.notification-channel-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex: 0 0 auto;
}

.notification-overview-copy {
  min-width: 0;
}

.notification-side-note {
  padding: 1rem;
  border-radius: 1rem;
  border: 1px dashed rgba(2, 192, 206, 0.24);
  background: rgba(2, 192, 206, 0.06);
}

.notification-default-matrix th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  background: rgba(248, 250, 252, 0.88);
  border-bottom-width: 1px;
}

.notification-default-matrix td,
.notification-default-matrix th {
  padding: 0.9rem 1rem;
}

.notification-default-matrix-label {
  min-width: 18rem;
}

.notification-default-timing {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(108, 117, 125, 0.14);
  border-radius: 1rem;
  background: rgba(248, 250, 252, 0.82);
}

.notification-default-timing-control {
  min-width: 220px;
}

.notification-channel-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 7.25rem;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(108, 117, 125, 0.16);
  background: rgba(255, 255, 255, 0.92);
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
}

.notification-channel-pill input {
  width: 1rem;
  height: 1rem;
  margin: 0;
}

.notification-channel-pill.is-locked {
  opacity: 0.55;
  cursor: not-allowed;
}

.notification-channel-card .card-body {
  padding: 1.25rem;
}

.notification-channel-card.is-plan-locked {
  background: rgba(248, 250, 252, 0.92);
}

.notification-channel-card.is-channel-disabled .notification-channel-body {
  opacity: 0.55;
}

.notification-channel-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(108, 117, 125, 0.14);
  background: rgba(248, 250, 252, 0.9);
}

.notification-channel-body {
  display: grid;
  gap: 1rem;
}

.notification-provider-panel {
  display: none;
}

.notification-provider-panel.is-active {
  display: block;
}

.notification-provider-callout {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  border: 1px dashed rgba(108, 117, 125, 0.2);
  background: rgba(248, 250, 252, 0.92);
}

.notification-provider-callout i {
  font-size: 1.1rem;
  color: #475569;
  margin-top: 0.1rem;
}

.notification-advanced-disclosure {
  padding: 0.15rem 0;
}

.notification-advanced-disclosure summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: #334155;
}

.notification-advanced-disclosure summary::-webkit-details-marker {
  display: none;
}

.notification-advanced-disclosure summary::before {
  content: "\\ea4e";
  font-family: remixicon;
  display: inline-block;
  margin-right: 0.45rem;
  transition: transform 0.2s ease;
}

.notification-advanced-disclosure[open] summary::before {
  transform: rotate(90deg);
}

.notification-advanced-disclosure > *:not(summary) {
  margin-top: 0.9rem;
}

.notification-ops-table thead th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.notification-ops-table td {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.notification-attempt-stack {
  display: grid;
  gap: 0.85rem;
}

.notification-attempt-card {
  border: 1px solid rgba(108, 117, 125, 0.14);
  border-radius: 1rem;
  background: rgba(248, 250, 252, 0.86);
  padding: 0.95rem 1rem;
}

@media (max-width: 991.98px) {
  .calendar-toolbar-meta {
    max-width: 100%;
  }

  .notification-overview-item {
    grid-template-columns: auto 1fr;
  }

  .notification-overview-item .badge {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .notification-default-matrix-label {
    min-width: 14rem;
  }

  .notification-channel-pill {
    min-width: 6.25rem;
    padding-inline: 0.65rem;
  }

  .notification-default-timing {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 767.98px) {
  .notification-channel-toggle-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .notification-channel-pill {
    min-width: auto;
    width: 100%;
    justify-content: flex-start;
  }

  .notification-default-timing-control {
    min-width: 0;
  }
}

.card-radio .form-check-input {
  position: absolute;
  opacity: 0;
}

.card-radio .form-check-label {
  border: 1px solid rgba(108, 117, 125, 0.22);
  border-radius: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.card-radio .form-check-input:checked + .form-check-label {
  border-color: rgba(2, 192, 206, 0.58);
  box-shadow: 0 0 0 0.2rem rgba(2, 192, 206, 0.12);
}

[data-bs-theme="dark"] .page-content {
  background:
    radial-gradient(circle at top right, rgba(2, 192, 206, 0.12), transparent 26%),
    linear-gradient(180deg, #111827 0%, #0f172a 100%);
}

[data-bs-theme="dark"] .clinical-empty-state,
[data-bs-theme="dark"] .wizard-step,
[data-bs-theme="dark"] .wizard-check,
[data-bs-theme="dark"] .clinical-treatment-summary,
[data-bs-theme="dark"] .patient-treatment-row,
[data-bs-theme="dark"] .patient-summary-chip,
[data-bs-theme="dark"] .clinical-indicator-card,
[data-bs-theme="dark"] .survey-creator-shell,
[data-bs-theme="dark"] .organization-branding-preview,
[data-bs-theme="dark"] .clinical-stat-tile,
[data-bs-theme="dark"] .clinical-profile-detail-tile,
[data-bs-theme="dark"] .notifications-detail-card,
[data-bs-theme="dark"] .clinical-habit-chip,
[data-bs-theme="dark"] .ui-fix-card,
[data-bs-theme="dark"] .notification-overview-item,
[data-bs-theme="dark"] .notification-channel-pill,
[data-bs-theme="dark"] .notification-channel-toggle-row,
[data-bs-theme="dark"] .notification-default-timing,
[data-bs-theme="dark"] .notification-provider-callout,
[data-bs-theme="dark"] .notification-attempt-card,
[data-bs-theme="dark"] .notification-side-note,
[data-bs-theme="dark"] .clinical-timeline-event-card {
  background: rgba(15, 23, 42, 0.88);
  border-color: rgba(148, 163, 184, 0.22);
}

[data-bs-theme="dark"] .notification-default-matrix th {
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.95);
}

[data-bs-theme="dark"] .notification-channel-pill,
[data-bs-theme="dark"] .notification-advanced-disclosure summary {
  color: #e2e8f0;
}

[data-bs-theme="dark"] .notification-provider-callout i {
  color: #cbd5e1;
}

[data-bs-theme="dark"] .patient-timeline-card,
[data-bs-theme="dark"] .patient-timeline-card > .card-header,
[data-bs-theme="dark"] .patient-timeline-card > .card-body {
  background: transparent;
}

[data-bs-theme="dark"] .timeline-item::before {
  background: rgba(148, 163, 184, 0.2);
}

[data-bs-theme="dark"] .topbar-breadcrumb-nav .breadcrumb-item.active span {
  color: #e2e8f0;
}

.survey-creator-shell {
  min-height: 720px;
  border: 1px solid rgba(108, 117, 125, 0.16);
  border-radius: 1rem;
  overflow: hidden;
  background: #fff;
}

.survey-creator-root {
  min-height: 720px;
}

[data-ui-surface="survey-designer"] .page-container {
  max-width: none;
}

.survey-designer-workspace-card {
  margin-bottom: 0;
}

.survey-designer-shell {
  min-height: calc(100vh - 18rem);
}

.survey-designer-shell .survey-creator-root {
  min-height: calc(100vh - 18rem);
}

.survey-designer-shell:fullscreen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  border-radius: 0;
  border: 0;
  background: #fff;
}

.survey-designer-shell:fullscreen .survey-creator-root {
  min-height: 100vh;
  height: 100vh;
}

.survey-designer-shell:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  border-radius: 0;
  border: 0;
  background: #fff;
}

.survey-designer-shell:-webkit-full-screen .survey-creator-root {
  min-height: 100vh;
  height: 100vh;
}

.survey-designer-metadata-offcanvas {
  --bs-offcanvas-width: min(36rem, 42vw);
}

.survey-designer-json-shell {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.72);
}

.survey-designer-json-shell summary {
  cursor: pointer;
  font-weight: 600;
  color: #334155;
}

[data-bs-theme="dark"] .survey-designer-json-shell {
  background: rgba(15, 23, 42, 0.78);
  border-color: rgba(148, 163, 184, 0.18);
}

[data-bs-theme="dark"] .survey-designer-json-shell summary {
  color: #e2e8f0;
}

.survey-json-fallback {
  background: #0f172a;
  color: #e2e8f0;
  border: 0;
}

@media (max-width: 991.98px) {
  .survey-designer-shell,
  .survey-designer-shell .survey-creator-root {
    min-height: calc(100vh - 14rem);
  }

  .survey-designer-metadata-offcanvas {
    --bs-offcanvas-width: min(100vw, 42rem);
  }
}

.public-form-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(2, 192, 206, 0.18), transparent 28%),
    linear-gradient(180deg, #eef2f7 0%, #f8fafc 100%);
}

.public-form-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.public-form-card {
  width: min(100%, 980px);
  border-radius: 1.5rem;
  overflow: hidden;
}

.public-form-hero {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.2), transparent 28%),
    linear-gradient(135deg, #02c0ce 0%, #1f6feb 100%);
}

.survey-shell {
  position: relative;
}

.survey-shell .sd-root-modern {
  --sjs-general-backcolor: #ffffff;
}

.clinical-treatment-summary {
  border: 1px solid rgba(108, 117, 125, 0.18);
  border-radius: 1rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.84);
}

.clinical-indicator-card {
  border: 1px solid rgba(108, 117, 125, 0.18);
  border-radius: 0.9rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.9);
  min-height: 100%;
}

.clinical-treatment-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 0.65rem;
}

.clinical-treatment-day {
  border-radius: 0.85rem;
  padding: 0.8rem 0.7rem;
  min-height: 86px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid transparent;
}

.clinical-treatment-day-label {
  font-weight: 700;
  font-size: 0.82rem;
}

.clinical-treatment-day-date {
  font-size: 0.74rem;
  opacity: 0.88;
}

.clinical-treatment-day.is-taken {
  background: rgba(25, 135, 84, 0.14);
  border-color: rgba(25, 135, 84, 0.22);
  color: #0f5132;
}

.clinical-treatment-day.is-omitted,
.clinical-treatment-day.is-red_flag {
  background: rgba(220, 53, 69, 0.14);
  border-color: rgba(220, 53, 69, 0.22);
  color: #842029;
}

.clinical-treatment-day.is-overdue,
.clinical-treatment-day.is-pending {
  background: rgba(255, 193, 7, 0.18);
  border-color: rgba(255, 193, 7, 0.24);
  color: #664d03;
}

.clinical-treatment-day.is-followup {
  background: rgba(13, 110, 253, 0.12);
  border-color: rgba(13, 110, 253, 0.18);
  color: #084298;
}

.clinical-treatment-day.is-future,
.clinical-treatment-day.is-off {
  background: rgba(108, 117, 125, 0.09);
  border-color: rgba(108, 117, 125, 0.14);
  color: #495057;
}

.patient-metric-chart {
  min-height: 260px;
}

.patient-metric-chart-lg {
  min-height: 360px;
}

.metric-tooltip {
  background: rgba(15, 23, 42, 0.96);
  color: #f8fafc;
  border-radius: 0.9rem;
  padding: 0.85rem 1rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.24);
  min-width: 220px;
}

.metric-tooltip,
.metric-tooltip * {
  color: #e2e8f0;
}

.metric-tooltip__title {
  color: #f8fafc;
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.metric-tooltip__row {
  color: #e2e8f0;
  font-size: 0.86rem;
  line-height: 1.45;
}

.metric-tooltip__row strong {
  color: #f8fafc;
  font-weight: 800;
}

.metric-tooltip__meta {
  color: #94a3b8;
  font-size: 0.75rem;
  margin-top: 0.35rem;
}

.chart-source-row {
  background: rgba(255, 255, 255, 0.74);
}

[data-bs-theme="dark"] .metric-tooltip {
  background: rgba(2, 6, 23, 0.96);
}
