/* ============================================================
   Teraply — Design System v2.0
   Identidade visual oficial — aplicar sobre app.css
   ============================================================ */

/* ── Importar fontes ────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;600;700;800;900&family=Sora:wght@400;600;700;800&family=Inter:wght@400;500;600;700;800&family=Manrope:wght@500;600;700;800&display=swap');

/* ── Variáveis Teraply ──────────────────────────────────── */
/* Wordmark: Nunito Sans ExtraBold #043A74 */

/* ── Variáveis Teraply ──────────────────────────────────── */
:root {
  /* Azul Teraply — painel profissional */
  --blue-900:   #1A3A6B;
  --blue-700:   #256D9E;
  --blue-500:   #4FA3D9;
  --blue-200:   #D8EEF9;
  --blue-100:   #EEF8FC;

  /* Verde Cuidado — app paciente/cuidador */
  --green-900:  #1A5C3A;
  --green-700:  #2F8F5B;
  --green-500:  #4FC47A;
  --green-300:  #A8E5BF;
  --green-100:  #EAF8EF;

  /* Neutros terapêuticos */
  --white-warm: #FAFAF7;
  --gray-mist:  #F1F4F2;
  --gray-ui:    #DDE5E1;
  --graphite:   #1A2740;
  --gray-text:  #5F6B73;

  /* Cores funcionais */
  --success:    #2FAD68;
  --warning:    #F2B84B;
  --danger:     #D95757;
  --info:       #4FA3D9;

  /* Aliases para compatibilidade */
  --teal:       var(--green-700);
  --teal-mid:   var(--green-500);
  --teal-light: var(--green-100);
  --dark:       var(--graphite);
  --gray:       var(--gray-text);
  --gray-light: var(--gray-mist);
  --border:     var(--gray-ui);
  --white:      var(--white-warm);
  --coral:      var(--danger);
  --coral-light:#FDEAEA;
  --amber:      var(--warning);
  --amber-light:#FEF6E4;

  /* Tipografia — Sora para títulos, Inter para corpo */
  --font:       'Inter', system-ui, sans-serif;
  --font-title: 'Sora', 'Manrope', system-ui, sans-serif;

  /* Forma — mais arredondada e moderna */
  --radius:     18px;
  --radius-sm:  12px;
  --radius-lg:  24px;
  --shadow:     0 2px 16px rgba(26,39,64,.07);
  --shadow-md:  0 6px 32px rgba(26,39,64,.12);
  --shadow-green: 0 4px 20px rgba(47,143,91,.18);
  --shadow-blue:  0 4px 20px rgba(37,109,158,.18);
  --transition: .18s ease;
}

/* ── Base ────────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--graphite);
  background: var(--gray-mist);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── Tela de splash / loading ────────────────────────────── */
.splash {
  position: fixed; inset: 0;
  background: var(--white-warm);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity .4s ease;
}
.splash-logo { width: 120px; margin-bottom: 16px; }
.splash-name {
  font-family: var(--font-title);
  font-size: 2rem; font-weight: 800;
  color: var(--graphite); letter-spacing: -.5px;
}
.splash-sub { font-size: .85rem; color: var(--gray-text); margin-top: 4px; }
.splash-dots { display: flex; gap: 6px; margin-top: 32px; }
.splash-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green-300);
  animation: dotPulse 1.2s infinite;
}
.splash-dot:nth-child(2) { animation-delay: .2s; background: var(--blue-500); }
.splash-dot:nth-child(3) { animation-delay: .4s; background: var(--green-500); }
@keyframes dotPulse {
  0%,80%,100% { transform: scale(.6); opacity: .4; }
  40% { transform: scale(1); opacity: 1; }
}

/* ── Layout ──────────────────────────────────────────────── */
#app { display: flex; flex-direction: column; min-height: 100vh; }
.page { display: none; flex-direction: column; flex: 1; }
.page.ativo { display: flex; }

/* ── Header ──────────────────────────────────────────────── */
/* Paciente/cuidador: verde */
.header {
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 60%, #3AAD6E 100%);
  color: white;
  padding: 14px 18px 12px;
  display: flex; align-items: center; gap: 10px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 4px 20px rgba(26,92,58,.3);
}
/* Fisio: azul */
.header.header-fisio {
  background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-700) 60%, #3A8FBF 100%);
  box-shadow: 0 4px 20px rgba(26,58,107,.3);
}
.header-logo {
  font-family: var(--font-title);
  font-size: 1.15rem; font-weight: 800;
  letter-spacing: -.3px;
}
.header-sub  { font-size: .72rem; opacity: .82; margin-top: 1px; }
.header-back { font-size: 1.3rem; padding: 4px 8px 4px 0; opacity: .9; }
.header-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.header-btn {
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  border-radius: 10px; padding: 6px 12px;
  font-size: .78rem; color: white;
  font-weight: 500; transition: var(--transition);
  border: 1px solid rgba(255,255,255,.12);
}
.header-btn:hover { background: rgba(255,255,255,.25); }

/* ── Bottom Nav ──────────────────────────────────────────── */
.bottom-nav {
  display: flex; background: var(--white-warm);
  border-top: 1px solid var(--gray-ui);
  position: sticky; bottom: 0; z-index: 100;
  box-shadow: 0 -4px 20px rgba(26,39,64,.08);
}
.nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; padding: 10px 4px 14px;
  gap: 3px; font-size: .66rem; color: var(--gray-text);
  transition: var(--transition); cursor: pointer;
  position: relative;
}
.nav-item.ativo { color: var(--green-700); }
.nav-item.ativo::before {
  content: '';
  position: absolute; top: 0; left: 20%; right: 20%;
  height: 3px; border-radius: 0 0 4px 4px;
  background: var(--green-700);
}
.nav-item.ativo .icon { transform: scale(1.15); }
.nav-item .icon { font-size: 1.3rem; transition: var(--transition); }

/* Nav azul para fisio */
.nav-fisio .nav-item.ativo { color: var(--blue-700); }
.nav-fisio .nav-item.ativo::before { background: var(--blue-700); }

/* ── Conteúdo ────────────────────────────────────────────── */
.content { flex: 1; padding: 16px 18px; overflow-y: auto; padding-bottom: 28px; }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--white-warm);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-green { border-left: 4px solid var(--green-500); box-shadow: 0 2px 16px rgba(47,143,91,.08); }
.card-blue  { border-left: 4px solid var(--blue-500);  box-shadow: 0 2px 16px rgba(37,109,158,.08); }
.card-warn  { border-left: 4px solid var(--warning);   box-shadow: 0 2px 16px rgba(242,184,75,.08); }
.card-danger{ border-left: 4px solid var(--danger);    box-shadow: 0 2px 16px rgba(217,87,87,.08); }
/* alias */
.card-accent { border-left: 4px solid var(--green-500); }
.card-coral  { border-left: 4px solid var(--danger); }
.card-amber  { border-left: 4px solid var(--warning); }

/* ── Stats grid ──────────────────────────────────────────── */
.stats-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 10px; margin-bottom: 16px;
}
.stat-card {
  background: var(--white-warm);
  border-radius: var(--radius);
  padding: 14px 12px; text-align: center;
  box-shadow: var(--shadow);
}
.stat-num   { font-size: 1.9rem; font-weight: 800; color: var(--green-700); line-height: 1.1; font-family: var(--font-title); }
.stat-num.blue { color: var(--blue-700); }
.stat-label { font-size: .7rem; color: var(--gray-text); margin-top: 3px; }

/* ── Botões ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center;
  justify-content: center; gap: 6px;
  padding: 12px 20px; border-radius: var(--radius-sm);
  font-size: .88rem; font-weight: 600;
  font-family: var(--font); transition: var(--transition);
  white-space: nowrap; cursor: pointer; border: none;
}
/* Verde — app paciente */
.btn-primary {
  background: linear-gradient(135deg, var(--green-700) 0%, #3AAD6E 100%);
  color: white;
  box-shadow: var(--shadow-green);
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-primary:active { transform: scale(.98); }

/* Azul — painel fisio */
.btn-blue {
  background: linear-gradient(135deg, var(--blue-700) 0%, #3A8FBF 100%);
  color: white;
  box-shadow: var(--shadow-blue);
}
.btn-blue:hover { filter: brightness(1.08); transform: translateY(-1px); }

.btn-secondary { background: var(--green-100); color: var(--green-700); }
.btn-secondary-blue { background: var(--blue-100); color: var(--blue-700); }
.btn-danger    { background: var(--coral-light); color: var(--danger); }
.btn-warn      { background: var(--amber-light); color: #9A6A00; }
.btn-full      { width: 100%; }
.btn-sm        { padding: 7px 12px; font-size: .78rem; border-radius: 8px; }
.btn-lg        { padding: 16px 28px; font-size: 1rem; border-radius: 14px; }

/* Botão grande do paciente (estilo do mockup) */
.btn-action {
  background: var(--green-700); color: white;
  border-radius: 18px; padding: 18px 24px;
  font-size: 1.05rem; font-weight: 700;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 6px 20px rgba(47,143,91,.35);
  transition: var(--transition); width: 100%;
}
.btn-action:hover { background: var(--green-500); transform: translateY(-1px); }
.btn-action .action-icon { font-size: 1.5rem; }

/* Botão secundário tipo card (registrar dor, etc) */
.btn-card {
  background: var(--white-warm); color: var(--graphite);
  border-radius: 14px; padding: 14px 18px;
  font-size: .9rem; font-weight: 600;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow); transition: var(--transition);
  width: 100%; border: 1.5px solid var(--gray-ui);
  justify-content: space-between;
}
.btn-card:hover { box-shadow: var(--shadow-md); }

/* ── Forms ───────────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-label {
  font-size: .78rem; font-weight: 600;
  color: var(--gray-text); display: block; margin-bottom: 5px;
  text-transform: uppercase; letter-spacing: .04em;
}
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--gray-ui);
  border-radius: var(--radius-sm);
  font-size: .9rem; color: var(--graphite);
  background: var(--white-warm);
  font-family: var(--font);
  transition: var(--transition); -webkit-appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(79,196,122,.15);
}
.form-input.blue:focus, .form-select.blue:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(79,163,217,.15);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Chips */
.chip-group { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: 7px 14px; border-radius: 99px;
  border: 1.5px solid var(--gray-ui);
  font-size: .78rem; font-weight: 500; cursor: pointer;
  transition: var(--transition); color: var(--gray-text);
  background: var(--white-warm);
}
.chip.sel { background: var(--green-700); border-color: var(--green-700); color: white; }
.chip.sel.blue { background: var(--blue-700); border-color: var(--blue-700); }

/* Toggle */
.toggle-row {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--gray-ui);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-label { font-size: .88rem; color: var(--graphite); font-weight: 500; }
.toggle-sub   { font-size: .73rem; color: var(--gray-text); margin-top: 2px; }
.toggle {
  width: 46px; height: 26px; border-radius: 99px;
  background: var(--gray-ui); position: relative;
  cursor: pointer; transition: var(--transition); flex-shrink: 0;
}
.toggle.on { background: var(--green-500); }
.toggle::after {
  content: ''; position: absolute;
  width: 20px; height: 20px; border-radius: 50%;
  background: white; top: 3px; left: 3px;
  transition: var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
}
.toggle.on::after { left: 23px; }

/* ── Login Teraply ───────────────────────────────────────── */
.login-page {
  min-height: 100vh; display: flex;
  flex-direction: column; align-items: center;
  justify-content: center; padding: 24px;
  background: var(--white-warm);
  position: relative; overflow: hidden;
}
/* Blobs decorativos como no mockup */
.login-page::before {
  content: '';
  position: absolute; top: -80px; right: -60px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, var(--blue-200) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none;
}
.login-page::after {
  content: '';
  position: absolute; bottom: -60px; left: -80px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, var(--green-100) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none;
}
.login-brand {
  text-align: center; margin-bottom: 28px; position: relative; z-index: 1;
}
.login-brand-name {
  font-family: var(--font-title);
  font-size: 2rem; font-weight: 800;
  color: var(--graphite); letter-spacing: -.5px;
  margin-top: 10px;
}
.login-brand-sub {
  font-size: .82rem; color: var(--gray-text); margin-top: 4px;
}
.login-card {
  background: white; border-radius: var(--radius-lg);
  padding: 28px 24px; width: 100%; max-width: 360px;
  box-shadow: var(--shadow-md); position: relative; z-index: 1;
}

/* ── Agenda paciente — tela principal ───────────────────── */
.agenda-header-greeting {
  padding: 20px 18px 16px;
  background: var(--white-warm);
}
.greeting-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--blue-100); display: flex;
  align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 10px;
}
.greeting-title {
  font-family: var(--font-title);
  font-size: 1.4rem; font-weight: 800;
  color: var(--graphite); line-height: 1.25;
}
.greeting-sub { font-size: .85rem; color: var(--gray-text); margin-top: 4px; }
.agenda-today-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--green-100); color: var(--green-700);
  border-radius: 10px; padding: 8px 12px;
  font-size: .8rem; font-weight: 500; margin: 12px 0 16px;
}

/* ── Tarefa item ──────────────────────────────────────────── */
.tarefa-item {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--white-warm); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 10px;
  box-shadow: var(--shadow);
  border: 1.5px solid transparent; transition: var(--transition);
  cursor: pointer;
}
.tarefa-item.agora {
  border-color: var(--green-500);
  background: #F4FDF7;
  box-shadow: 0 4px 20px rgba(79,196,122,.15);
}
.tarefa-item.feita { opacity: .55; }
.tarefa-horario {
  font-size: .8rem; font-weight: 700;
  color: var(--blue-700); min-width: 44px;
}
.tarefa-titulo { font-size: .92rem; font-weight: 600; margin-bottom: 2px; color: var(--graphite); }
.tarefa-desc   { font-size: .78rem; color: var(--gray-text); }
.tipo-pill {
  font-size: .66rem; padding: 2px 8px; border-radius: 99px;
  background: var(--green-100); color: var(--green-700);
  font-weight: 500; display: inline-block; margin-top: 4px;
}
.confirmar-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid var(--gray-ui); background: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0; transition: var(--transition);
  cursor: pointer;
}
.confirmar-btn.ok {
  background: var(--green-700); border-color: var(--green-700);
  color: white;
}

/* ── Paciente card ───────────────────────────────────────── */
.pac-card {
  display: flex; gap: 12px; align-items: center;
  background: var(--white-warm); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 10px;
  box-shadow: var(--shadow); cursor: pointer;
  transition: var(--transition);
  border: 1.5px solid transparent;
}
.pac-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(47,143,91,.15);
  transform: translateY(-2px);
}
.avatar {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 700; flex-shrink: 0;
  background: linear-gradient(135deg, var(--green-100), var(--green-300));
  color: var(--green-700);
}
.avatar.blue {
  background: linear-gradient(135deg, var(--blue-100), var(--blue-200));
  color: var(--blue-700);
}
.pac-nome    { font-size: .92rem; font-weight: 600; color: var(--graphite); }
.pac-detalhe { font-size: .75rem; color: var(--gray-text); margin-top: 1px; }

/* Adesão badges */
.adesao-badge {
  font-size: .72rem; font-weight: 700;
  padding: 3px 10px; border-radius: 99px;
}
.adesao-ok      { background: var(--green-100); color: var(--green-700); }
.adesao-alerta  { background: #FDEAEA; color: var(--danger); }
.adesao-parcial { background: var(--amber-light); color: #9A6A00; }

/* ── Audio player ────────────────────────────────────────── */
.audio-player {
  background: var(--green-100); border-radius: var(--radius-sm);
  padding: 12px; margin-top: 10px;
}
.audio-player-title {
  font-size: .76rem; font-weight: 600;
  color: var(--green-700); margin-bottom: 8px;
}
.audio-bar { display: flex; align-items: center; gap: 10px; }
.audio-prog {
  flex: 1; height: 4px;
  background: var(--green-300); border-radius: 99px; overflow: hidden;
}
.audio-prog-fill {
  height: 100%; background: var(--green-700);
  border-radius: 99px; width: 0%; transition: width .1s linear;
}
.play-btn { font-size: 1.6rem; color: var(--green-700); transition: var(--transition); }

/* ── Section title ───────────────────────────────────────── */
.section-title {
  font-size: .9rem; font-weight: 700; color: var(--graphite);
  margin: 18px 0 10px;
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-title);
}
.ver-todos { font-size: .75rem; color: var(--green-700); font-weight: 500; }
.ver-todos.blue { color: var(--blue-700); }

/* ── Drawer / Modal ──────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0;
  background: rgba(31,42,51,.45);
  z-index: 200; display: none;
  align-items: flex-end; justify-content: center;
}
.overlay.aberto { display: flex; }
.drawer {
  background: var(--white-warm); width: 100%; max-width: 480px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 20px 20px 32px; max-height: 92vh; overflow-y: auto;
  animation: slideUp .25s ease;
}
@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.drawer-handle {
  width: 36px; height: 4px; background: var(--gray-ui);
  border-radius: 99px; margin: 0 auto 18px;
}
.drawer-title {
  font-size: 1.05rem; font-weight: 700;
  color: var(--graphite); margin-bottom: 16px;
  font-family: var(--font-title);
}

/* ── Wizard steps ────────────────────────────────────────── */
.step-indicator { display: flex; gap: 6px; margin-bottom: 20px; align-items: center; }
.step {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700;
  border: 2px solid var(--gray-ui); color: var(--gray-text);
  background: white; flex-shrink: 0;
}
.step.ativo { background: var(--green-700); color: white; border-color: var(--green-700); }
.step.feito { background: var(--green-100); color: var(--green-700); border-color: var(--green-500); }
.step-line { flex: 1; height: 2px; background: var(--gray-ui); }

/* ── Modo idoso ──────────────────────────────────────────── */
body.modo-idoso { font-size: 18px !important; }
body.modo-idoso .tarefa-titulo { font-size: 1.15rem; }
body.modo-idoso .tarefa-horario { font-size: 1rem; }
body.modo-idoso .btn, body.modo-idoso .btn-action { padding: 18px 24px; font-size: 1rem; }
body.modo-idoso .confirmar-btn { width: 46px; height: 46px; }
body.modo-idoso .form-input, body.modo-idoso .form-select { padding: 14px 16px; font-size: 1rem; }
body.modo-idoso .nav-item .icon { font-size: 1.7rem; }
body.modo-idoso .greeting-title { font-size: 1.6rem; }

/* ── Alto contraste ──────────────────────────────────────── */
body.alto-contraste {
  --graphite: #000;
  --gray-mist: #e8e8e8;
  --gray-ui: #999;
  --white-warm: #fff;
}
body.alto-contraste .card, body.alto-contraste .tarefa-item,
body.alto-contraste .pac-card { border: 2px solid #555; }

/* ── Recorder ────────────────────────────────────────────── */
.recorder {
  background: #FFF4F4; border-radius: var(--radius-sm);
  padding: 16px; margin-top: 8px;
  border: 1.5px solid #FDDADA;
}
.recorder-status { font-size: .8rem; color: var(--danger); font-weight: 600; text-align: center; margin-bottom: 8px; }
.recorder-timer  { font-size: 1.8rem; font-weight: 800; color: var(--danger); text-align: center; margin-bottom: 10px; font-variant-numeric: tabular-nums; font-family: var(--font-title); }
.rec-btn {
  background: var(--danger); color: white;
  border-radius: 50%; width: 56px; height: 56px;
  font-size: 1.4rem; display: flex; align-items: center;
  justify-content: center; margin: 0 auto; cursor: pointer; border: none;
  box-shadow: 0 4px 14px rgba(217,87,87,.35);
}

/* ── Toast ───────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 84px; left: 50%;
  transform: translateX(-50%);
  background: var(--graphite); color: white;
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-size: .82rem; z-index: 999;
  animation: fadeInUp .2s ease; white-space: nowrap;
  box-shadow: var(--shadow-md);
}
.toast.success { background: var(--green-700); }
.toast.erro    { background: var(--danger); }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── Info rows ───────────────────────────────────────────── */
.info-row {
  display: flex; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--gray-ui);
  font-size: .82rem;
}
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--gray-text); }
.info-val   { font-weight: 600; color: var(--graphite); }

/* ── Feedback item ───────────────────────────────────────── */
.feedback-item {
  background: var(--white-warm); border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 8px;
  box-shadow: var(--shadow); border-left: 3px solid var(--green-500);
}

/* ── Blobs decorativos (telas paciente) ─────────────────── */
.blob-top-right {
  position: absolute; top: -60px; right: -60px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(79,163,217,.15) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none; z-index: 0;
}
.blob-bottom-left {
  position: absolute; bottom: -40px; left: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(47,143,91,.12) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none; z-index: 0;
}
.blob-top-left {
  position: absolute; top: -30px; left: -30px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(47,143,91,.08) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none; z-index: 0;
}

/* ── Greeting card premium (tela agenda) ────────────────── */
.greeting-card {
  background: linear-gradient(135deg, var(--green-700) 0%, #3AAD6E 100%);
  border-radius: var(--radius-lg);
  padding: 20px 20px 18px;
  color: white;
  margin-bottom: 16px;
  box-shadow: var(--shadow-green);
  position: relative;
  overflow: hidden;
}
.greeting-card::before {
  content: '';
  position: absolute; top: -40px; right: -40px;
  width: 160px; height: 160px; border-radius: 50%;
  background: rgba(255,255,255,.08);
  pointer-events: none;
}
.greeting-title {
  font-family: var(--font-title);
  font-size: 1.3rem; font-weight: 800;
  margin-bottom: 4px;
}
.greeting-sub { font-size: .85rem; opacity: .85; }

/* ── Badge de progresso ──────────────────────────────────── */
.progress-ring-wrap {
  display: flex; align-items: center; gap: 14px;
  background: white; border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.progress-pct {
  font-family: var(--font-title);
  font-size: 1.6rem; font-weight: 800;
  color: var(--green-700);
}
.progress-label { font-size: .78rem; color: var(--gray-text); }

/* ── Tela de login premium ───────────────────────────────── */
.login-page {
  background: linear-gradient(160deg, #1A3A6B 0%, #1A2740 40%, #1A3A2A 100%);
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; position: relative; overflow: hidden;
}
.login-page::before {
  content: ''; position: absolute;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(47,143,91,.15) 0%, transparent 70%);
  top: -150px; right: -150px; pointer-events: none;
}
.login-page::after {
  content: ''; position: absolute;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(37,109,158,.12) 0%, transparent 70%);
  bottom: -100px; left: -100px; pointer-events: none;
}
.login-card {
  background: rgba(255,255,255,.97);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  width: 100%; max-width: 380px;
  box-shadow: 0 24px 64px rgba(0,0,0,.25);
  backdrop-filter: blur(20px);
  position: relative; z-index: 1;
}

/* ── Form inputs melhorados ──────────────────────────────── */
.form-input, .form-select {
  border: 1.5px solid var(--gray-ui);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: .92rem;
  font-family: var(--font);
  color: var(--graphite);
  background: var(--white-warm);
  width: 100%;
  transition: var(--transition);
  outline: none;
}
.form-input:focus, .form-select:focus {
  border-color: var(--green-700);
  box-shadow: 0 0 0 3px rgba(47,143,91,.1);
  background: white;
}
.form-input::placeholder { color: var(--gray-ui); }

/* ── Responsivo ──────────────────────────────────────────── */
@media (min-width: 640px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .content { padding: 20px 24px; max-width: 680px; margin: 0 auto; }
  .login-page { padding: 40px; }
}

/* ── Utilitários ─────────────────────────────────────────── */
.text-green  { color: var(--green-700); }
.text-blue   { color: var(--blue-700); }
.text-danger { color: var(--danger); }
.text-gray   { color: var(--gray-text); }
.text-sm     { font-size: .8rem; }
.text-xs     { font-size: .72rem; }
.font-bold   { font-weight: 700; }
.font-title  { font-family: var(--font-title); }
.mt-1 { margin-top: 6px; }  .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 20px; }
.mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 12px; }
.d-flex { display: flex; } .gap-1 { gap: 6px; } .gap-2 { gap: 12px; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }
.relative { position: relative; }
