/*
 * Component styles for Peppi design-system Custom Elements.
 * All values use design tokens defined in tokens.css.
 * Each block targets the Custom Element's host selector and its internal parts.
 */

/* ---------------------------------------------------------------------------
 * peppi-tab-bar
 * --------------------------------------------------------------------------- */

peppi-tab-bar {
  display: block;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 92px;
  background-color: #EDF4FC;
  border-top: 1px solid rgba(214, 230, 247, 0.95);
  box-shadow: 0 -10px 30px rgba(13, 46, 92, 0.06);
}

/* ---------------------------------------------------------------------------
 * peppi-bottom-sheet
 * --------------------------------------------------------------------------- */

peppi-bottom-sheet {
  display: block;
  position: fixed;
  bottom: 92px; /* above tab bar */
  left: 0;
  right: 0;
  z-index: 200;
  background-color: var(--color-surface-raised);
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
  box-shadow: var(--shadow-xl);
}

/* ---------------------------------------------------------------------------
 * peppi-window-banner
 * --------------------------------------------------------------------------- */

peppi-window-banner {
  display: block;
  padding: var(--space-3) var(--space-4);
  background-color: var(--color-surface-tint);
  border-bottom: 1px solid var(--color-border);
}

/* ---------------------------------------------------------------------------
 * peppi-button
 * --------------------------------------------------------------------------- */

peppi-button {
  display: inline-block;
}

/* ---------------------------------------------------------------------------
 * peppi-card
 * --------------------------------------------------------------------------- */

peppi-card {
  display: block;
  background-color: var(--color-surface-raised);
  border-radius: var(--border-radius-card);
  box-shadow: var(--shadow-sm);
  padding: var(--space-4);
}

/* ---------------------------------------------------------------------------
 * peppi-priority-alert-card
 * --------------------------------------------------------------------------- */

peppi-priority-alert-card {
  display: block;
  background-color: var(--color-danger-bg);
  border: 1px solid var(--color-danger);
  border-radius: var(--border-radius-card);
  padding: var(--space-3) var(--space-4);
}

/* ---------------------------------------------------------------------------
 * peppi-shield-gauge
 * --------------------------------------------------------------------------- */

peppi-shield-gauge {
  display: block;
  width: 200px;
  height: 200px;
}

peppi-shield-gauge canvas {
  width: 100%;
  height: 100%;
}

/* ---------------------------------------------------------------------------
 * Form inputs
 * --------------------------------------------------------------------------- */

peppi-input,
peppi-checkbox,
peppi-radio,
peppi-slider,
peppi-toggle {
  display: block;
  margin-bottom: var(--space-3);
}

/* ---------------------------------------------------------------------------
 * peppi-avatar
 * --------------------------------------------------------------------------- */

peppi-avatar {
  display: inline-block;
  border-radius: var(--border-radius-pill);
  overflow: hidden;
  width: 40px;
  height: 40px;
  background-color: var(--color-surface-tint);
}

/* ---------------------------------------------------------------------------
 * peppi-badge
 * --------------------------------------------------------------------------- */

peppi-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  border-radius: var(--border-radius-pill);
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-semibold);
  background-color: var(--color-brand-primary);
  color: var(--color-text-inverse);
}

/* ---------------------------------------------------------------------------
 * peppi-spinner
 * --------------------------------------------------------------------------- */

peppi-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
}

/* ---------------------------------------------------------------------------
 * peppi-toast
 * --------------------------------------------------------------------------- */

peppi-toast {
  display: block;
  position: fixed;
  bottom: 80px; /* above tab bar + clearance */
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  min-width: 240px;
  max-width: calc(100vw - 32px);
  pointer-events: none;
}

/* ---------------------------------------------------------------------------
 * Shared post-onboarding screen polish
 * --------------------------------------------------------------------------- */

.checkin-drawer,
.insights-container,
.profile-container,
.navigate-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-height: calc(100dvh - 92px);
  width: 100%;
}

.checkin-drawer .peppi-screen__title,
.insights-screen__title,
.profile-screen__title,
.navigate-screen__title {
  color: #0D2E5C;
  font-family: var(--font-sans);
  font-size: var(--font-size-28);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0;
}

.checkin-section,
.insights-card,
.profile-section,
.navigate-card {
  background: #FFFFFF;
  border: 1px solid #D6E6F7;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(13, 46, 92, 0.04);
  padding: var(--space-4);
}

.checkin-section__label,
.insights-card__title,
.profile-section__title,
.navigate-section-label {
  color: #0D2E5C;
  font-family: var(--font-sans);
  font-size: var(--font-size-18);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-snug);
  margin: 0 0 var(--space-2);
}

.checkin-section__summary,
.checkin-note-saved,
.profile-caregiver-empty,
.profile-info-row__body,
.profile-pa-tile__detail,
.profile-consent-locked__hint,
.profile-account__org,
.insights-archive__empty {
  color: #3A5070;
  font-size: var(--font-size-13);
  line-height: var(--line-height-relaxed);
}

.checkin-chip-row,
.checkin-mood-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.checkin-chip,
.checkin-btn,
.profile-caregiver-btn,
.profile-save-btn,
.insights-archive-toggle,
.insights-archive__dismiss-btn,
.insights-more-link,
.navigate-action,
.navigate-back {
  align-items: center;
  background: #EDF4FC;
  border: 1px solid #D6E6F7;
  border-radius: 999px;
  color: #0D2E5C;
  cursor: pointer;
  display: inline-flex;
  font-family: var(--font-sans);
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-semibold);
  justify-content: center;
  line-height: 1.1;
  min-height: 40px;
  padding: 10px 14px;
  text-decoration: none;
  transition: background var(--motion-fast) var(--easing-standard),
              border-color var(--motion-fast) var(--easing-standard),
              color var(--motion-fast) var(--easing-standard);
}

.checkin-chip.is-selected,
.checkin-chip.is-active,
.checkin-mood-tile.is-selected,
.checkin-btn--primary,
.profile-save-btn,
.profile-caregiver-btn--submit,
.navigate-action--primary {
  background: #3EC9D6;
  border-color: #3EC9D6;
  color: #0D2E5C;
}

.checkin-btn--primary,
.profile-save-btn,
.navigate-action--primary {
  min-height: 48px;
  width: 100%;
}

.checkin-input,
.checkin-select,
.profile-time-input,
.profile-tz-select,
.profile-caregiver-form__input,
.profile-caregiver-form__select {
  appearance: none;
  background: #FFFFFF;
  border: 1px solid #C7DCF2;
  border-radius: 12px;
  color: #0D2040;
  font-family: var(--font-sans);
  font-size: var(--font-size-15);
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}

.checkin-select,
.profile-tz-select,
.profile-caregiver-form__select {
  background-image:
    linear-gradient(45deg, transparent 50%, #366EB0 50%),
    linear-gradient(135deg, #366EB0 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 18px,
    calc(100% - 12px) 18px;
  background-repeat: no-repeat;
  background-size: 6px 6px, 6px 6px;
  padding-right: 34px;
}

.checkin-label,
.profile-notif-label,
.profile-consent-label,
.profile-caregiver-form__label {
  color: #0D2E5C;
  display: block;
  font-size: var(--font-size-13);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-snug);
}

.checkin-section__kicker {
  color: #7A9EC5;
  font-size: var(--font-size-11);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.09em;
  line-height: 1;
  margin-bottom: var(--space-2);
  text-transform: uppercase;
}

.checkin-quicklogs-label {
  margin: var(--space-1) 0 calc(var(--space-2) * -1);
}

.checkin-textarea {
  background: #F5F9FD;
  border: 1px solid #D6E6F7;
  border-radius: 14px;
  color: #0D2040;
  font-family: var(--font-sans);
  font-size: var(--font-size-15);
  line-height: var(--line-height-relaxed);
  min-height: 112px;
  padding: var(--space-3);
  resize: vertical;
  width: 100%;
}

.checkin-note-actions {
  align-items: center;
  display: flex;
  gap: var(--space-2);
  justify-content: space-between;
  margin-top: var(--space-3);
}

.checkin-note-actions .checkin-btn {
  width: auto;
}

.checkin-past-meal-card {
  align-items: center;
  background: #FFFFFF;
  border: 1px solid #D6E6F7;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(13, 46, 92, 0.04);
  color: #0D2E5C;
  cursor: pointer;
  display: grid;
  gap: var(--space-3);
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 72px;
  padding: var(--space-3);
  text-align: left;
  width: 100%;
}

.checkin-card-icon {
  align-items: center;
  background: #3EC9D6;
  border-radius: 999px;
  color: #0D2E5C;
  display: flex;
  font-size: var(--font-size-24);
  font-weight: var(--font-weight-bold);
  height: 44px;
  justify-content: center;
  line-height: 1;
  width: 44px;
}

.checkin-past-meal-card__title {
  color: #0D2040;
  display: block;
  font-size: var(--font-size-16);
  font-weight: var(--font-weight-bold);
  line-height: 1.15;
}

.checkin-past-meal-card__sub {
  color: #7A9EC5;
  display: block;
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-semibold);
  line-height: 1.35;
  margin-top: 4px;
}

.checkin-past-meal-card__chevron {
  color: #7A9EC5;
  font-size: var(--font-size-24);
  font-weight: var(--font-weight-semibold);
}

.checkin-weight-row,
.checkin-fiber-row,
.profile-notif-row,
.profile-consent-row {
  align-items: center;
  display: flex;
  gap: var(--space-2);
}

.checkin-weight-row .checkin-input {
  flex: 1 1 auto;
  min-width: 0;
}

.checkin-inline-error {
  color: #DC2626;
  font-size: var(--font-size-12);
  line-height: var(--line-height-normal);
  margin-top: var(--space-1);
}

.is-hidden {
  display: none !important;
}

.checkin-slider-row {
  align-items: center;
  display: grid;
  gap: var(--space-2);
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.checkin-slider {
  accent-color: #366EB0;
  width: 100%;
}

.checkin-slider-anchor {
  color: #3A5070;
  font-size: var(--font-size-13);
  font-weight: var(--font-weight-semibold);
}

.checkin-slider-value {
  color: #366EB0;
  margin-left: 4px;
}

.checkin-mood-tile {
  align-items: center;
  background: #FFFFFF;
  border: 1px solid #D6E6F7;
  border-radius: 14px;
  color: #0D2E5C;
  cursor: pointer;
  display: flex;
  flex: 1 1 92px;
  flex-direction: column;
  gap: 4px;
  min-height: 72px;
  padding: 10px 8px;
}

.checkin-mood-emoji {
  font-size: var(--font-size-22);
  line-height: 1;
}

.checkin-mood-label {
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-semibold);
}

.checkin-dose-form,
.profile-caregiver-form {
  background: #F5F9FD;
  border: 1px solid #D6E6F7;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding: var(--space-3);
}

.checkin-dose-form__title {
  color: #0D2E5C;
  font-size: var(--font-size-16);
  font-weight: var(--font-weight-bold);
  margin: 0;
}

.checkin-actions {
  background: var(--color-surface-page);
  bottom: 92px;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0 calc(var(--space-4) * -1) calc(var(--space-6) * -1);
  padding: var(--space-3) var(--space-4) var(--space-4);
  position: sticky;
}

/* ---------------------------------------------------------------------------
 * Navigate
 * --------------------------------------------------------------------------- */

.navigate-container {
  padding: var(--space-4) var(--space-4) var(--space-6);
}

.navigate-header {
  align-items: center;
  display: grid;
  gap: var(--space-2);
  grid-template-columns: 88px 1fr 88px;
}

.navigate-topbar {
  align-items: center;
  display: grid;
  gap: var(--space-2);
  grid-template-columns: 74px minmax(0, 1fr) auto;
}

.navigate-title-block {
  min-width: 0;
  text-align: center;
}

.navigate-screen__title {
  font-size: var(--font-size-22);
  text-align: center;
}

.navigate-subtitle {
  color: #3A5070;
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-normal);
  margin: 4px 0 0;
}

.navigate-status-pill {
  background: #EDF4FC;
  border: 1px solid #D6E6F7;
  border-radius: 999px;
  color: #366EB0;
  font-size: var(--font-size-11);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.06em;
  padding: 8px 10px;
  text-transform: uppercase;
  white-space: nowrap;
}

.navigate-back {
  background: transparent;
  border-color: transparent;
  color: #366EB0;
  justify-content: flex-start;
  min-height: 36px;
  padding: 6px 0;
}

.navigate-guidance-grid {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.navigate-guidance-card {
  background: #FFFFFF;
  border: 1px solid #D6E6F7;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(13, 46, 92, 0.04);
  min-height: 120px;
  padding: var(--space-3);
}

.navigate-guidance-card__tag {
  color: #3EC9D6;
  font-size: var(--font-size-11);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.08em;
  line-height: 1;
}

.navigate-guidance-card__title {
  color: #0D2E5C;
  font-size: var(--font-size-15);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-snug);
  margin: var(--space-2) 0 0;
}

.navigate-guidance-card__body {
  color: #3A5070;
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-normal);
  margin: 6px 0 0;
}

.navigate-hero {
  background: #FFFFFF;
  border: 1px solid #D6E6F7;
  border-radius: 22px;
  overflow: hidden;
}

.navigate-hero__inner {
  align-items: center;
  background: linear-gradient(180deg, #F8FBFF 0%, #EDF4FC 100%);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
}

.navigate-state-label {
  color: #7A9EC5;
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.navigate-gauge {
  height: 184px;
  width: 184px;
}

.navigate-timer {
  background: #FFFFFF;
  border: 1px solid #D6E6F7;
  border-radius: 14px;
  padding: var(--space-3);
  text-align: center;
  width: 100%;
}

.navigate-timer__label {
  color: #7A9EC5;
  font-size: var(--font-size-11);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.navigate-timer__value {
  color: #0D2E5C;
  font-size: var(--font-size-20);
  font-weight: var(--font-weight-bold);
  margin-top: 4px;
}

.navigate-timer__sub {
  color: #7A9EC5;
  font-size: var(--font-size-12);
  line-height: var(--line-height-normal);
  margin-top: 4px;
}

.navigate-stat-grid {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.navigate-stat {
  background: #FFFFFF;
  border: 1px solid #D6E6F7;
  border-radius: 14px;
  min-width: 0;
  padding: 12px 8px;
  text-align: center;
}

.navigate-stat__value {
  color: #0D2E5C;
  font-size: var(--font-size-18);
  font-weight: var(--font-weight-bold);
  line-height: 1;
}

.navigate-stat__unit {
  color: #7A9EC5;
  font-size: var(--font-size-12);
  margin-left: 2px;
}

.navigate-stat__label {
  color: #7A9EC5;
  font-size: var(--font-size-10);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.08em;
  margin-top: 6px;
  text-transform: uppercase;
}

.navigate-banner {
  border-radius: 16px;
  color: #FFFFFF;
  padding: var(--space-4);
}

.navigate-banner--protected {
  background: #0D2E5C;
}

.navigate-banner--fading {
  background: #92400E;
}

.navigate-banner--vulnerable {
  background: #DC2626;
}

.navigate-banner__label {
  color: rgba(255, 255, 255, 0.58);
  font-size: var(--font-size-11);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.navigate-banner__body {
  font-size: var(--font-size-15);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-normal);
  margin-top: var(--space-1);
}

.navigate-rec-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.navigate-rec-title {
  color: #0D2040;
  font-size: var(--font-size-16);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-snug);
}

.navigate-rec-sub {
  color: #7A9EC5;
  font-size: var(--font-size-12);
  margin-top: 2px;
}

.navigate-macro-grid {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: var(--space-3);
}

.navigate-macro {
  background: #F5F9FD;
  border: 1px solid #D6E6F7;
  border-radius: 10px;
  padding: 8px 4px;
  text-align: center;
}

.navigate-macro__value {
  color: #0D2E5C;
  font-size: var(--font-size-15);
  font-weight: var(--font-weight-bold);
}

.navigate-macro__label {
  color: #7A9EC5;
  font-size: 9px;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.navigate-leucine {
  align-items: center;
  background: rgba(62, 201, 214, 0.08);
  border: 1px solid rgba(62, 201, 214, 0.24);
  border-radius: 12px;
  display: flex;
  gap: var(--space-2);
  justify-content: space-between;
  margin-top: var(--space-3);
  padding: var(--space-3);
}

.navigate-leucine__value {
  color: #23BCCC;
  font-size: var(--font-size-15);
  font-weight: var(--font-weight-bold);
}

.navigate-leucine__sub,
.navigate-leucine__status {
  color: #7A9EC5;
  font-size: var(--font-size-11);
}

.navigate-leucine__status {
  color: #23BCCC;
  flex: 0 0 auto;
  font-weight: var(--font-weight-semibold);
}

/* ---------------------------------------------------------------------------
 * Insights
 * --------------------------------------------------------------------------- */

.insights-container {
  padding-bottom: var(--space-5);
}

.insights-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.insights-chart-wrap {
  align-items: center;
  background: #F5F9FD;
  border: 1px solid #E2EEF8;
  border-radius: 14px;
  display: flex;
  justify-content: center;
  min-height: 144px;
  overflow: hidden;
  padding: var(--space-2);
}

.insights-chart-wrap--line {
  min-height: 176px;
}

.insights-chart-wrap--bar {
  min-height: 144px;
}

.insights-canvas {
  height: 100%;
  width: 100%;
}

.insights-tier-legend,
.insights-mpi-direction {
  align-items: center;
  color: #3A5070;
  display: flex;
  flex-wrap: wrap;
  font-size: var(--font-size-12);
  gap: 8px;
  line-height: var(--line-height-normal);
}

.tier-dot {
  border-radius: 999px;
  display: inline-block;
  height: 8px;
  width: 8px;
}

.tier-dot--green { background: #27A760; }
.tier-dot--yellow { background: #EF9F27; }
.tier-dot--red { background: #DC2626; }

.mpi-direction {
  border-radius: 999px;
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-semibold);
  padding: 6px 10px;
}

.mpi-direction--improving {
  background: rgba(39, 167, 96, 0.12);
  color: #1F8F50;
}

.mpi-direction--stable {
  background: #EDF4FC;
  color: #366EB0;
}

.mpi-direction--declining {
  background: rgba(220, 38, 38, 0.1);
  color: #DC2626;
}

.insights-staleness-badge {
  background: #FEF9E7;
  border: 1px solid #FAC775;
  border-radius: 12px;
  color: #8A4B05;
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-semibold);
  padding: 8px 10px;
}

.insights-archive-toggle {
  align-self: flex-start;
  min-height: 36px;
}

.insights-archive-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.insights-archive-list--collapsed {
  display: none;
}

.insights-archive__entry {
  align-items: center;
  background: #F5F9FD;
  border: 1px solid #E2EEF8;
  border-radius: 12px;
  display: flex;
  gap: var(--space-2);
  justify-content: space-between;
  padding: var(--space-3);
}

.insights-archive__entry-type {
  color: #0D2E5C;
  font-size: var(--font-size-13);
  font-weight: var(--font-weight-bold);
  text-transform: capitalize;
}

.insights-archive__entry-date {
  color: #7A9EC5;
  font-size: var(--font-size-12);
  margin-top: 2px;
}

.insights-archive__dismiss-btn {
  min-height: 34px;
  padding: 8px 10px;
}

.insights-more-nav,
.profile-tools-nav {
  display: grid;
  gap: var(--space-2);
}

.insights-more-link,
.profile-tools-link,
.profile-medication-link {
  background: #EDF4FC;
  border: 1px solid #D6E6F7;
  border-radius: 12px;
  color: #366EB0;
  display: block;
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-semibold);
  padding: 12px;
  text-decoration: none;
}

/* ---------------------------------------------------------------------------
 * Profile
 * --------------------------------------------------------------------------- */

.profile-container {
  padding-bottom: var(--space-5);
}

.profile-hero {
  align-items: center;
  background: linear-gradient(180deg, #071C3E 0%, #0D2E5C 100%);
  border-radius: 22px;
  color: #FFFFFF;
  display: grid;
  gap: var(--space-3);
  grid-template-columns: auto minmax(0, 1fr);
  padding: var(--space-4);
}

.profile-hero__avatar {
  align-items: center;
  background: #3EC9D6;
  border-radius: 999px;
  color: #0D2E5C;
  display: flex;
  font-size: var(--font-size-20);
  font-weight: var(--font-weight-bold);
  height: 64px;
  justify-content: center;
  width: 64px;
}

.profile-hero__copy {
  min-width: 0;
}

.profile-hero__title {
  color: #FFFFFF;
  font-size: var(--font-size-22);
  font-weight: var(--font-weight-bold);
  line-height: 1.1;
  margin: 0;
}

.profile-hero__subtitle {
  color: rgba(255, 255, 255, 0.62);
  font-size: var(--font-size-13);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-normal);
  margin: 4px 0 0;
}

.profile-hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.profile-hero__badge {
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--font-size-11);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.05em;
  padding: 7px 10px;
  text-transform: uppercase;
}

.profile-hero__badge--connected {
  background: rgba(62, 201, 214, 0.18);
  border-color: rgba(62, 201, 214, 0.34);
  color: #3EC9D6;
}

.profile-account-row {
  display: grid;
  gap: var(--space-2);
}

.profile-account__patient {
  color: #0D2040;
  display: block;
  font-size: var(--font-size-13);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-normal);
  overflow-wrap: anywhere;
}

.profile-account__org {
  overflow-wrap: anywhere;
}

.profile-menu-card,
.profile-pa-report-card {
  background: #F5F9FD;
  border: 1px solid #E2EEF8;
  border-radius: 14px;
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3);
}

.profile-info-row {
  align-items: center;
  display: grid;
  gap: var(--space-2);
  grid-template-columns: auto minmax(0, 1fr);
  min-width: 0;
}

.profile-info-row__icon {
  background: #D6E6F7;
  border-radius: 999px;
  height: 10px;
  width: 10px;
}

.profile-info-row__title {
  color: #0D2E5C;
  font-size: var(--font-size-13);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-snug);
}

.profile-info-row__body {
  margin-top: 2px;
}

.profile-pa-report-card {
  background: #0D2E5C;
  border-color: #0D2E5C;
  margin-top: var(--space-3);
}

.profile-pa-report-card .profile-info-row__icon {
  background: #3EC9D6;
}

.profile-pa-report-card .profile-info-row__title {
  color: #FFFFFF;
}

.profile-pa-report-card .profile-info-row__body {
  color: rgba(255, 255, 255, 0.58);
}

.profile-pa-report-card__title {
  color: #FFFFFF;
  font-size: var(--font-size-16);
  font-weight: var(--font-weight-bold);
}

.profile-pa-report-card__grid {
  display: grid;
  gap: var(--space-2);
}

.profile-pa-report-card__button {
  background: #3EC9D6;
  border: 0;
  border-radius: 12px;
  color: #0D2E5C;
  cursor: pointer;
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-bold);
  min-height: 44px;
  padding: 10px 14px;
  width: 100%;
}

.profile-pa-tile {
  background: #EDF4FC;
  border: 1px solid #D6E6F7;
  border-radius: 12px;
  color: #0D2E5C;
  display: grid;
  gap: 4px;
  padding: var(--space-3);
}

.profile-pa-tile__label {
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-semibold);
}

.profile-persona-group {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-persona-option {
  align-items: center;
  background: #F5F9FD;
  border: 1px solid #D6E6F7;
  border-radius: 14px;
  cursor: pointer;
  display: grid;
  gap: var(--space-2);
  justify-items: center;
  padding: var(--space-3);
  text-align: center;
}

.profile-persona-option--selected {
  background: rgba(62, 201, 214, 0.12);
  border-color: #3EC9D6;
}

.profile-persona-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.profile-persona-avatar {
  border-radius: 999px;
  height: 64px;
  width: 64px;
}

.profile-persona-label {
  color: #0D2E5C;
  font-size: var(--font-size-13);
  font-weight: var(--font-weight-semibold);
}

.profile-notif-row,
.profile-consent-row,
.profile-consent-locked {
  background: #F5F9FD;
  border: 1px solid #E2EEF8;
  border-radius: 12px;
  justify-content: space-between;
  margin-top: var(--space-2);
  padding: 12px;
}

.profile-notif-checkbox,
.profile-consent-checkbox {
  accent-color: #366EB0;
  flex: 0 0 auto;
  height: 22px;
  width: 22px;
}

.profile-time-input {
  flex: 0 0 124px;
  width: 124px;
}

.profile-tz-select {
  flex: 1 1 auto;
  min-width: 0;
}

.profile-notif-actions {
  margin-top: var(--space-3);
}

.profile-consent-locked {
  align-items: center;
  display: flex;
  gap: var(--space-2);
}

.profile-consent-locked__label {
  color: #0D2E5C;
  font-size: var(--font-size-13);
  font-weight: var(--font-weight-semibold);
}

.profile-caregiver-list {
  display: grid;
  gap: var(--space-2);
  list-style: none;
}

.profile-caregiver-item {
  background: #F5F9FD;
  border: 1px solid #E2EEF8;
  border-radius: 12px;
  display: grid;
  gap: 4px;
  padding: var(--space-3);
}

.profile-caregiver-email {
  color: #0D2E5C;
  font-size: var(--font-size-13);
  font-weight: var(--font-weight-semibold);
  overflow-wrap: anywhere;
}

.profile-caregiver-rel {
  color: #7A9EC5;
  font-size: var(--font-size-12);
}

.profile-caregiver-form__actions {
  display: flex;
  gap: var(--space-2);
}

.profile-caregiver-form__error {
  color: #DC2626;
  font-size: var(--font-size-12);
}

@media (max-width: 360px) {
  .checkin-section,
  .insights-card,
  .profile-section,
  .navigate-card {
    padding: var(--space-3);
  }

  .profile-persona-group {
    grid-template-columns: 1fr;
  }

  .navigate-header {
    grid-template-columns: 72px 1fr 72px;
  }

  .navigate-topbar {
    grid-template-columns: 1fr auto;
  }

  .navigate-topbar .navigate-back {
    display: none;
  }

  .navigate-title-block {
    text-align: left;
  }

  .navigate-screen__title {
    text-align: left;
  }

  .navigate-guidance-grid {
    grid-template-columns: 1fr;
  }

  .navigate-macro-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
