/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue-dark:   #0a3d6b;
  --blue-main:   #1565c0;
  --blue-mid:    #1976d2;
  --blue-light:  #e3f2fd;
  --blue-accent: #42a5f5;
  --white:       #ffffff;
  --gray-50:     #f8fafc;
  --gray-100:    #f1f5f9;
  --gray-200:    #e2e8f0;
  --gray-400:    #94a3b8;
  --gray-600:    #475569;
  --gray-800:    #1e293b;
  --red:         #e53935;
  --green:       #2e7d32;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.08);
  --shadow-md:   0 4px 12px rgba(0,0,0,.12);
  --shadow-lg:   0 8px 24px rgba(0,0,0,.14);
  --radius:      10px;
  --radius-sm:   6px;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  min-height: 100vh;
}

/* ── Header ── */
header {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-main) 100%);
  color: var(--white);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  color: var(--white);
}

.header-brand .logo-icon {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.header-brand h1 { font-size: 1.2rem; font-weight: 700; letter-spacing: .3px; }
.header-brand span { font-size: .75rem; opacity: .8; display: block; }

.header-nav a {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-size: .875rem;
  padding: .4rem .8rem;
  border-radius: var(--radius-sm);
  transition: background .2s;
}
.header-nav a:hover { background: rgba(255,255,255,.15); color: var(--white); }

/* ── Container ── */
.container { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem; }

/* ── Page Title ── */
.page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.page-title h2 { font-size: 1.5rem; color: var(--blue-dark); font-weight: 700; }
.page-title p { color: var(--gray-600); font-size: .9rem; margin-top: .25rem; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .2s;
  text-decoration: none;
}
.btn-primary {
  background: var(--blue-mid);
  color: var(--white);
  box-shadow: 0 2px 6px rgba(21,101,192,.3);
}
.btn-primary:hover { background: var(--blue-dark); box-shadow: 0 4px 12px rgba(21,101,192,.4); }
.btn-outline {
  background: var(--white);
  color: var(--blue-mid);
  border: 1.5px solid var(--blue-mid);
}
.btn-outline:hover { background: var(--blue-light); }
.btn-danger { background: var(--red); color: var(--white); }
.btn-danger:hover { background: #c62828; }
.btn-ghost { background: transparent; color: var(--gray-600); border: 1.5px solid var(--gray-200); }
.btn-ghost:hover { background: var(--gray-100); }
.btn-sm { padding: .35rem .85rem; font-size: .8rem; }
.btn-icon { padding: .5rem; border-radius: 50%; }

/* ── Search Bar ── */
.search-bar {
  display: flex;
  gap: .75rem;
  align-items: center;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: .5rem .75rem .5rem 1rem;
  box-shadow: var(--shadow-sm);
  flex: 1;
  max-width: 420px;
}
.search-bar input {
  border: none;
  outline: none;
  font-size: .9rem;
  width: 100%;
  background: transparent;
  color: var(--gray-800);
}
.search-bar .search-icon { color: var(--gray-400); font-size: 1rem; }

/* ── Cards ── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}
.card-header {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-main));
  color: var(--white);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.card-header h3 { font-size: 1rem; font-weight: 600; }
.card-body { padding: 1.5rem; }

/* ── Patient List ── */
.patient-list { display: flex; flex-direction: column; gap: .75rem; }

.patient-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  transition: all .2s;
  box-shadow: var(--shadow-sm);
}
.patient-item:hover {
  border-color: var(--blue-accent);
  box-shadow: 0 4px 14px rgba(21,101,192,.12);
  transform: translateY(-1px);
}

.patient-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-main), var(--blue-accent));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.patient-info { flex: 1; min-width: 0; }
.patient-info .name { font-weight: 600; font-size: .975rem; color: var(--gray-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.patient-info .meta { font-size: .8rem; color: var(--gray-600); margin-top: .2rem; }

.patient-badge {
  font-size: .75rem;
  padding: .25rem .65rem;
  border-radius: 20px;
  background: var(--blue-light);
  color: var(--blue-main);
  font-weight: 600;
  white-space: nowrap;
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--gray-400);
}
.empty-state .icon { font-size: 3.5rem; margin-bottom: 1rem; opacity: .5; }
.empty-state p { font-size: 1rem; margin-bottom: 1.5rem; }

/* ── Forms ── */
.form-section {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.form-section-header {
  background: var(--blue-light);
  border-bottom: 1px solid var(--gray-200);
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--blue-dark);
  font-weight: 600;
  font-size: .9rem;
}
.form-body { padding: 1.5rem; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group.full { grid-column: 1 / -1; }

label { font-size: .8rem; font-weight: 600; color: var(--gray-600); text-transform: uppercase; letter-spacing: .5px; }
input, select, textarea {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: .6rem .9rem;
  font-size: .9rem;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color .2s, box-shadow .2s;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue-mid);
  box-shadow: 0 0 0 3px rgba(21,101,192,.1);
}
textarea { resize: vertical; min-height: 80px; }
.form-actions { display: flex; gap: .75rem; margin-top: 1.5rem; }

/* ── Profile Header ── */
.profile-header {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-mid) 100%);
  color: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  box-shadow: var(--shadow-md);
  flex-wrap: wrap;
}
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  border: 3px solid rgba(255,255,255,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  flex-shrink: 0;
}
.profile-info { flex: 1; }
.profile-info h2 { font-size: 1.4rem; font-weight: 700; }
.profile-info .sub { font-size: .85rem; opacity: .85; margin-top: .3rem; }
.profile-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.profile-actions .btn { background: rgba(255,255,255,.15); color: var(--white); border: 1.5px solid rgba(255,255,255,.3); }
.profile-actions .btn:hover { background: rgba(255,255,255,.25); }
.profile-actions .btn-danger-soft { background: rgba(229,57,53,.2); border-color: rgba(229,57,53,.5); }
.profile-actions .btn-danger-soft:hover { background: rgba(229,57,53,.35); }

/* ── Info Grid ── */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.info-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
}
.info-item .info-label { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--gray-400); margin-bottom: .3rem; }
.info-item .info-value { font-size: .925rem; color: var(--gray-800); font-weight: 500; }

/* ── Consultations ── */
.consultation-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}
.consultation-card-header {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  padding: .75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}
.consultation-date { font-weight: 700; color: var(--blue-dark); font-size: .9rem; }
.consultation-body { padding: 1.25rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; }
.consultation-field label { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--gray-400); display: block; margin-bottom: .25rem; }
.consultation-field p { font-size: .875rem; color: var(--gray-800); line-height: 1.5; }
.consultation-field.full { grid-column: 1 / -1; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10,61,107,.45);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(16px) scale(.98);
  transition: transform .25s;
}
.modal-overlay.active .modal { transform: translateY(0) scale(1); }
.modal-header {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-main));
  color: var(--white);
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 { font-size: 1rem; font-weight: 600; }
.modal-close { background: none; border: none; color: var(--white); font-size: 1.4rem; cursor: pointer; opacity: .8; line-height: 1; }
.modal-close:hover { opacity: 1; }
.modal-body { padding: 1.5rem; }

/* ── Alert / Toast ── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--green);
  color: var(--white);
  padding: .85rem 1.4rem;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 500;
  opacity: 0;
  transform: translateY(10px);
  transition: all .3s;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: var(--red); }

/* ── Tabs ── */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--gray-200); margin-bottom: 1.5rem; }
.tab-btn {
  padding: .65rem 1.25rem;
  background: none;
  border: none;
  font-size: .875rem;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all .2s;
}
.tab-btn.active { color: var(--blue-main); border-bottom-color: var(--blue-main); }
.tab-btn:hover:not(.active) { color: var(--gray-800); background: var(--gray-100); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Misc ── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--blue-mid);
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 1.25rem;
}
.back-link:hover { color: var(--blue-dark); }

.stats-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.stat-box {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  flex: 1;
  min-width: 130px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.stat-box .stat-num { font-size: 1.75rem; font-weight: 800; color: var(--blue-main); }
.stat-box .stat-label { font-size: .78rem; color: var(--gray-600); margin-top: .2rem; }

.divider { height: 1px; background: var(--gray-200); margin: 1.5rem 0; }

@media (max-width: 640px) {
  .page-title { flex-direction: column; align-items: flex-start; }
  .profile-header { flex-direction: column; text-align: center; }
  .profile-actions { justify-content: center; }
  header { padding: 0 1rem; }
  .header-brand h1 { font-size: 1rem; }
}

/* ── Header nav active ── */
.header-nav a.active { background: rgba(255,255,255,.2); color: var(--white); }

/* ── FASE 1: Vitals Row ── */
.vitals-row {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding: .6rem 1.25rem;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}
.vital-chip {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .75rem;
  font-weight: 600;
  padding: .25rem .65rem;
  border-radius: 20px;
  background: var(--blue-light);
  color: var(--blue-dark);
  border: 1px solid rgba(21,101,192,.15);
}
.vital-chip.bmi-chip { font-weight: 700; }

/* IMC badges — formulário e chips */
.bmi-badge {
  display: inline-block;
  padding: .3rem .85rem;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 700;
}
.bmi-low    { background: #e3f2fd; color: #1565c0; border-color: #90caf9; }
.bmi-normal { background: #e8f5e9; color: #2e7d32; border-color: #a5d6a7; }
.bmi-over   { background: #fff8e1; color: #f57f17; border-color: #ffe082; }
.bmi-ob1    { background: #fff3e0; color: #e65100; border-color: #ffcc80; }
.bmi-ob2    { background: #fce4ec; color: #b71c1c; border-color: #ef9a9a; }
.bmi-ob3    { background: #f3e5f5; color: #4a148c; border-color: #ce93d8; }

/* ── FASE 1: Métricas — Vitals Summary Bar ── */
.vitals-summary-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 1.5rem;
}
.vsb-item {
  flex: 1;
  min-width: 110px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.vsb-item.bmi-normal { border-color: #a5d6a7; background: #f1f8f2; }
.vsb-item.bmi-over   { border-color: #ffe082; background: #fffde7; }
.vsb-item.bmi-ob1    { border-color: #ffcc80; background: #fff8f0; }
.vsb-item.bmi-ob2, .vsb-item.bmi-ob3 { border-color: #ef9a9a; background: #fff5f5; }
.vsb-val   { font-size: 1.35rem; font-weight: 800; color: var(--blue-dark); line-height: 1.2; }
.vsb-val small { font-size: .7rem; font-weight: 500; color: var(--gray-600); }
.vsb-label { font-size: .72rem; color: var(--gray-600); margin-top: .25rem; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }

/* ── FASE 2/3: Info boxes ── */
.fase-info-box {
  background: var(--blue-light);
  border: 1px solid rgba(21,101,192,.2);
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  font-size: .8rem;
  color: var(--blue-dark);
  line-height: 1.55;
}
.fase-info-box code {
  background: rgba(21,101,192,.1);
  padding: .1rem .35rem;
  border-radius: 3px;
  font-family: monospace;
  font-size: .85em;
}
.fase-warning {
  background: #fff8e1;
  border-color: #ffe082;
  color: #664d03;
}
.fase-warning code { background: rgba(102,77,3,.1); }

/* ── Avatar com hover de câmera ── */
.avatar-wrapper {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  cursor: pointer;
  border-radius: 50%;
}
.avatar-wrapper .profile-avatar {
  width: 72px;
  height: 72px;
  transition: filter .2s;
}
.avatar-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  opacity: 0;
  transition: opacity .2s, background .2s;
}
.avatar-wrapper:hover .profile-avatar { filter: brightness(.65); }
.avatar-wrapper:hover .avatar-overlay { opacity: 1; background: rgba(0,0,0,.15); }

/* ── Upload zone ── */
.photo-upload-zone {
  display: block;
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.photo-upload-zone:hover { border-color: var(--blue-accent); background: var(--blue-light); }
.photo-upload-zone input[type="file"] { display: none; }
.photo-upload-content { padding: 2rem; text-align: center; color: var(--gray-600); }

/* ── Crop ── */
.crop-container {
  display: flex;
  justify-content: center;
  margin-bottom: .75rem;
}
#crop-canvas {
  border-radius: 50%;
  cursor: grab;
  display: block;
  box-shadow: 0 0 0 4px var(--blue-light), 0 4px 16px rgba(0,0,0,.15);
  max-width: 100%;
}
#crop-canvas:active { cursor: grabbing; }
.crop-controls {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .25rem .5rem;
}
.crop-controls input[type="range"] {
  -webkit-appearance: none;
  height: 4px;
  border-radius: 2px;
  background: var(--gray-200);
  outline: none;
  cursor: pointer;
  border: none;
  box-shadow: none;
  padding: 0;
}
.crop-controls input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--blue-mid);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.crop-controls input[type="range"]:focus { border: none; box-shadow: none; }

/* ── Calendário ── */
.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: .75rem 1.25rem;
  box-shadow: var(--shadow-sm);
}
.calendar-nav h3 { font-size: 1.1rem; font-weight: 700; color: var(--blue-dark); }

.calendar-wrapper {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
/* weekday headers */
.cal-weekday {
  background: var(--blue-dark);
  color: rgba(255,255,255,.9);
  text-align: center;
  padding: .6rem .25rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
}
/* os dias preenchem a 2ª linha em diante dentro da mesma grid */
#calendar-days {
  display: contents;
}
.cal-day {
  min-height: 100px;
  padding: .5rem .4rem;
  border-right: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  cursor: pointer;
  transition: background .15s;
  vertical-align: top;
}
.cal-day:hover { background: var(--blue-light); }
.cal-day.empty { background: var(--gray-50); cursor: default; }
.cal-day.today .cal-day-num {
  background: var(--blue-main);
  color: var(--white);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cal-day.selected { background: #e8f4fd; }
.cal-day-num { font-size: .85rem; font-weight: 700; color: var(--gray-800); margin-bottom: .3rem; }
.cal-day.empty .cal-day-num { color: var(--gray-400); }

.cal-events-list { display: flex; flex-direction: column; gap: 2px; }
.cal-event {
  background: var(--blue-mid);
  color: var(--white);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: .7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: background .15s;
}
.cal-event:hover { background: var(--blue-dark); }
.cal-event-time { opacity: .8; margin-right: 3px; font-size: .65rem; }
.cal-more { font-size: .68rem; color: var(--gray-600); padding: 1px 4px; }

/* ── Painel do dia ── */
.day-panel {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}
.day-panel-header {
  background: var(--blue-light);
  border-bottom: 1px solid var(--gray-200);
  padding: .75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  color: var(--blue-dark);
  font-size: .9rem;
}
.day-event-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .85rem 1.25rem;
  border-bottom: 1px solid var(--gray-200);
}
.day-event-item:last-child { border-bottom: none; }
.day-event-time {
  font-size: .8rem;
  font-weight: 700;
  color: var(--blue-main);
  min-width: 95px;
  padding-top: .1rem;
}
.day-event-info { flex: 1; }
.day-event-title { font-weight: 600; font-size: .9rem; color: var(--gray-800); }
.day-event-patient { font-size: .8rem; color: var(--gray-600); margin-top: .2rem; }
.day-event-desc { font-size: .8rem; color: var(--gray-600); margin-top: .2rem; white-space: pre-wrap; }

/* ── Setup Screen ── */
.setup-steps {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: .25rem;
}
.setup-step { display: flex; flex-direction: column; align-items: center; gap: .25rem; }
.setup-step .step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-600);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .875rem;
}
.setup-step.active .step-num { background: var(--blue-main); color: var(--white); }
.setup-step.done   .step-num { background: var(--green);     color: var(--white); }
.setup-step .step-label { font-size: .75rem; color: var(--gray-600); font-weight: 600; }
.setup-step-line { flex: 1; height: 2px; background: var(--gray-200); min-width: 40px; margin-bottom: 16px; }
.setup-step-line.active { background: var(--blue-main); }

.setup-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  max-width: 700px;
}
.setup-card-header {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-main));
  color: var(--white);
  padding: 1rem 1.5rem;
  font-weight: 700;
  font-size: 1rem;
}
.setup-card-body { padding: 1.5rem; }

.how-to {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  font-size: .875rem;
  color: var(--gray-600);
  line-height: 1.7;
}
.how-to strong { color: var(--gray-800); }
.how-to ol { padding-left: 1.25rem; margin-top: .5rem; }
.how-to code {
  background: var(--gray-200);
  padding: .1rem .4rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: .85em;
  color: var(--blue-dark);
}

@media (max-width: 640px) {
  .cal-day { min-height: 60px; padding: .3rem .25rem; }
  .cal-event { display: none; }
  .cal-more { display: none; }
  .day-event-time { min-width: 70px; }
}
