/* ═══════════════════════════════════════════════════════════════════════
   Mali — Design System (base.css)
   Extraído do protótipo ../index.html (referência visual oficial).
   Nomes de classe idênticos aos do protótipo para facilitar o port.
   Fonte Nunito: cada página inclui o <link> do Google Fonts (ver login.php).
   Viewport alvo: 390×844, mobile-first.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --teal:        #1A7A8C;
  --teal-dark:   #0D4F5C;
  --teal-light:  #D4EEF3;
  --green:       #2E7D4F;
  --green-mid:   #4CAF72;
  --green-light: #E8F5EE;
  --gold:        #F5A623;
  --gold-light:  #FFF3D6;
  --purple:      #7C5CBF;
  --red:         #E55353;
  --bg:          #F0FAF5;
  --card:        #FFFFFF;
  --text:        #1A2B22;
  --text-muted:  #6B8C7A;
  --border:      #E0EDE6;
  --radius:      18px;
  --shadow:      0 4px 20px rgba(0,0,0,0.10);
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.08);
  --font:        'Nunito', 'Segoe UI', system-ui, sans-serif;
}

/* ─── Reset & base ──────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

button { font-family: var(--font); }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

h1 { font-size: 22px; font-weight: 900; line-height: 1.2; }
h2 { font-size: 20px; font-weight: 900; line-height: 1.2; }
h3 { font-size: 16px; font-weight: 800; line-height: 1.25; }
p  { line-height: 1.55; }
small, .caption { font-size: 12px; color: var(--text-muted); }

/* ─── Estrutura de tela (porta o .screen do protótipo) ──────────────────
   <div class="app">
     <header class="app-header header-teal">…</header>
     <main class="scroll-area">…</main>
     <nav class="bottom-nav">…</nav>
   </div>                                                                 */

.app {
  display: flex; flex-direction: column;
  height: 100vh; height: 100dvh;
  background: var(--bg);
  position: relative; overflow: hidden;
}

@media (min-width: 480px) {
  /* desktop: coluna central no formato do protótipo */
  .app { max-width: 430px; margin: 0 auto; box-shadow: var(--shadow); }
}

/* ─── Painel da dentista no computador ────────────────────────────────
   As telas da dentista são ferramenta de trabalho (desktop), não app de
   telefone: com .app-desk usam a largura da tela em vez da coluna de 430px,
   e as listas de cards viram grade. Criança/pais seguem no formato celular. */
@media (min-width: 820px) {
  .app-desk { max-width: 960px; }
  .app-desk .app-header { padding-left: 32px; padding-right: 32px; }
  .app-desk .dentista-body,
  .app-desk .cont-body,
  .app-desk .rel-body { padding-left: 32px; padding-right: 32px; }

  /* Formulário de cadastro fica legível (não estica na largura toda) */
  .app-desk .cad-body { max-width: 620px; margin-inline: auto; }

  /* Listas de cards preenchem a largura em grade responsiva */
  .app-desk #lista-pacientes,
  .app-desk #lista-inativos,
  .app-desk #agenda-hoje,
  .app-desk #lista-proximas,
  .app-desk #conq-lista,
  .app-desk #item-lista,
  .app-desk #ag-grade {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 10px;
    align-items: start;
  }
}

.scroll-area {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.scroll-area::-webkit-scrollbar { display: none; }

/* paddings de conteúdo por tela (nomes do protótipo) */
.home-scroll      { padding: 16px;      display: flex; flex-direction: column; gap: 16px; }
.missao-body      { padding: 24px 20px; display: flex; flex-direction: column; gap: 18px; }
.conquistas-body  { padding: 20px;      display: flex; flex-direction: column; gap: 14px; }
.pais-body        { padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.dentista-body    { padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.map-scroll       { padding: 0 20px 24px; display: flex; flex-direction: column; gap: 16px; }

/* ─── Headers em gradiente (um por perfil/tela) ─────────────────────── */

.app-header {
  flex-shrink: 0;
  padding: max(24px, env(safe-area-inset-top)) 20px 24px;
  border-radius: 0 0 28px 28px;
  color: #fff;
}
.app-header h2 { color: #fff; font-size: 20px; font-weight: 900; }
.app-header p  { color: rgba(255,255,255,0.75); font-size: 13px; margin-top: 2px; }

.header-teal   { background: linear-gradient(135deg, var(--teal-dark), var(--teal)); }   /* criança */
.header-purple { background: linear-gradient(135deg, var(--purple), #9C7BDF); }          /* conquistas */
.header-slate  { background: linear-gradient(135deg, #37474F, #546E7A); }                /* pais */
.header-indigo { background: linear-gradient(135deg, #1A237E, #283593); }                /* dentista */

.back-btn {
  color: rgba(255,255,255,0.85); font-size: 22px; cursor: pointer;
  background: rgba(255,255,255,0.15); border: none;
  width: 36px; height: 36px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.back-btn:active { background: rgba(255,255,255,0.25); }

/* Perfil no header da criança */
.profile-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.avatar-ring {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #F08C00);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.4);
}
.profile-info { flex: 1; }
.profile-info .greeting { color: rgba(255,255,255,0.7); font-size: 12px; font-weight: 600; }
.profile-info .name { color: #fff; font-size: 18px; font-weight: 800; }
.coins-badge {
  display: flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,0.18); border-radius: 20px;
  padding: 6px 14px; color: #fff; font-weight: 800; font-size: 14px;
  backdrop-filter: blur(8px);
}

/* ─── Barra de XP (RN-030/031) ──────────────────────────────────────── */

.xp-bar-wrap { margin-top: 16px; }
.xp-label {
  display: flex; justify-content: space-between;
  color: rgba(255,255,255,0.8); font-size: 11px; font-weight: 700; margin-bottom: 6px;
}
.xp-bar { height: 10px; background: rgba(255,255,255,0.2); border-radius: 10px; overflow: hidden; }
.xp-fill {
  height: 100%; background: linear-gradient(90deg, var(--gold), #fff176);
  border-radius: 10px; transition: width 1s ease;
  box-shadow: 0 0 8px rgba(245,166,35,0.6);
}

/* ─── Navegação inferior ────────────────────────────────────────────── */

.bottom-nav {
  height: 72px; flex-shrink: 0;
  background: var(--card);
  display: flex; align-items: center; justify-content: space-around;
  border-top: 1px solid #E8F0EC;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer; padding: 6px 12px; border-radius: 12px;
  transition: all 0.2s; flex: 1;
  background: none; border: none; text-decoration: none;
}
.nav-item .nav-icon  { font-size: 22px; line-height: 1; }
.nav-item .nav-label { font-size: 10px; font-weight: 700; color: var(--text-muted); }
.nav-item.active { background: var(--teal-light); }
.nav-item.active .nav-icon  { filter: drop-shadow(0 0 4px var(--teal)); }
.nav-item.active .nav-label { color: var(--teal); }

/* RN-106: contador de não lidas sobre um item do nav (usado em várias telas) */
.nav-item { position: relative; }
.nav-badge {
  position: absolute; top: 2px; right: 16px;
  min-width: 16px; height: 16px; border-radius: 8px; padding: 0 4px;
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 800; line-height: 16px; text-align: center;
}

/* ─── Botões ────────────────────────────────────────────────────────── */

/* CTA principal (dourado, tela cheia) */
.btn-primary {
  width: 100%; padding: 18px; border: none; border-radius: 20px; cursor: pointer;
  font-size: 18px; font-weight: 800;
  background: linear-gradient(135deg, var(--gold), #F08C00);
  color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.2);
  box-shadow: 0 6px 24px rgba(245,166,35,0.5);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary:active { transform: scale(0.97); box-shadow: 0 2px 12px rgba(245,166,35,0.4); }

/* secundário translúcido (para fundos escuros/gradientes) */
.btn-secondary {
  width: 100%; padding: 14px; border: 2px solid rgba(255,255,255,0.4); border-radius: 16px;
  cursor: pointer; font-size: 15px; font-weight: 700;
  background: rgba(255,255,255,0.12); color: #fff; backdrop-filter: blur(8px);
  transition: all 0.15s;
}
.btn-secondary:active { background: rgba(255,255,255,0.22); }

/* concluir missão (RN-021: conclusão única e irreversível) */
.complete-btn {
  width: 100%; padding: 18px; border: none; border-radius: 20px; cursor: pointer;
  font-size: 17px; font-weight: 800;
  background: linear-gradient(135deg, var(--green), var(--green-mid));
  color: #fff; box-shadow: 0 6px 24px rgba(46,125,79,0.4);
  transition: transform 0.15s;
}
.complete-btn:active { transform: scale(0.97); }
.complete-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* botões utilitários (painéis pais/dentista, formulários) */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 13px 20px; border: none; border-radius: 14px;
  font-size: 15px; font-weight: 800;
  cursor: pointer; text-decoration: none;
  transition: filter 0.2s, transform 0.1s;
}
.btn:active   { transform: scale(0.97); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn:hover    { filter: brightness(1.1); }

.btn-teal    { background: var(--teal);  color: #fff; }
.btn-green   { background: var(--green); color: #fff; }
.btn-danger  { background: var(--red);   color: #fff; }
.btn-outline { background: transparent;  color: var(--teal); border: 2px solid var(--teal); }
.btn-ghost   { background: var(--teal-light); color: var(--teal-dark); }
.btn-full    { width: 100%; }
.btn-sm      { padding: 8px 14px; font-size: 13px; border-radius: 10px; }

/* ─── Títulos de seção ──────────────────────────────────────────────── */

.section-title {
  font-size: 16px; font-weight: 800; color: var(--text);
  display: flex; justify-content: space-between; align-items: center;
}
.section-title span { color: var(--teal); font-size: 13px; cursor: pointer; }

/* ─── Cards genéricos ───────────────────────────────────────────────── */

.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 20px;
}

/* ─── Missões (RN-020/021/022) ──────────────────────────────────────── */

.mission-list { display: flex; flex-direction: column; gap: 10px; }
.mission-card {
  background: var(--card); border-radius: var(--radius);
  padding: 14px 16px; display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow-sm); cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  border: 2px solid transparent;
}
.mission-card:active { transform: scale(0.98); }
.mission-card.done { border-color: var(--green-mid); }
.mission-icon { font-size: 32px; }
.mission-info { flex: 1; }
.mission-info h4 { font-size: 14px; font-weight: 800; color: var(--text); }
.mission-info p  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.mission-xp {
  font-size: 12px; font-weight: 800; color: var(--gold);
  background: var(--gold-light); padding: 4px 10px; border-radius: 12px;
}
.mission-check {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--green-mid); display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px;
}
.mission-check.empty { background: #E0EDE6; }

/* passos da missão (tela de detalhe) */
.step-card {
  background: var(--card); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow-sm);
  display: flex; gap: 14px; align-items: flex-start;
}
.step-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--teal); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; flex-shrink: 0;
}
.step-text h4 { font-size: 14px; font-weight: 800; color: var(--text); }
.step-text p  { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

.reward-card {
  background: var(--gold-light); border: 2px solid var(--gold);
  border-radius: var(--radius); padding: 16px 20px;
  display: flex; align-items: center; gap: 14px;
}
.reward-card .reward-icon { font-size: 36px; }
.reward-card h4 { font-size: 14px; font-weight: 800; color: #7B4F00; }
.reward-card p  { font-size: 12px; color: #A0681A; margin-top: 2px; }

/* ─── Mascote (RN-040/044/045) ──────────────────────────────────────── */

.mascot-card {
  background: linear-gradient(135deg, #1A7A4C, #2E7D4F);
  border-radius: var(--radius); padding: 16px 20px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow);
  cursor: pointer; transition: transform 0.2s;
}
.mascot-card:active { transform: scale(0.98); }
.mascot-emoji { font-size: 56px; }
.mascot-info { flex: 1; }
.mascot-info h3 { color: #fff; font-size: 15px; font-weight: 800; }
.mascot-info p  { color: rgba(255,255,255,0.8); font-size: 12px; margin-top: 2px; }
.mascot-hp { margin-top: 8px; }
.mascot-hp-bar  { height: 8px; background: rgba(255,255,255,0.2); border-radius: 8px; overflow: hidden; margin-top: 4px; }
.mascot-hp-fill { height: 100%; background: #76FF91; border-radius: 8px; }

/* ─── Banner de evento ──────────────────────────────────────────────── */

.event-banner {
  background: linear-gradient(135deg, var(--purple), #9C7BDF);
  border-radius: var(--radius); padding: 16px 20px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow); cursor: pointer;
}
.event-banner .event-icon { font-size: 40px; }
.event-banner .event-info h3 { color: #fff; font-size: 14px; font-weight: 800; }
.event-banner .event-info p  { color: rgba(255,255,255,0.8); font-size: 12px; margin-top: 2px; }
.event-tag {
  background: rgba(255,255,255,0.2); color: #fff; font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: 8px; display: inline-block; margin-top: 6px;
}

/* ─── Mapa (regiões — RN-010: jornadas) ─────────────────────────────── */

.map-title { text-align: center; padding: 8px 20px 20px; flex-shrink: 0; }
.map-title h2 { color: #fff; font-size: 22px; font-weight: 900; }
.map-title p  { color: rgba(255,255,255,0.75); font-size: 13px; margin-top: 2px; }

.bg-map { background: linear-gradient(180deg, #1A5C3A 0%, #2E7D4F 40%, #4CAF72 100%); }

.map-region {
  border-radius: 20px; padding: 18px 20px;
  display: flex; align-items: center; gap: 16px;
  cursor: pointer; transition: transform 0.2s;
  position: relative; overflow: hidden;
}
.map-region:active { transform: scale(0.97); }
.map-region.unlocked { box-shadow: 0 6px 24px rgba(0,0,0,0.2); }
.map-region.locked   { opacity: 0.55; filter: grayscale(0.4); }

.region-icon { font-size: 48px; flex-shrink: 0; }
.region-info { flex: 1; }
.region-info h3 { font-size: 16px; font-weight: 800; }
.region-info p  { font-size: 12px; margin-top: 2px; opacity: 0.8; }
.region-progress { margin-top: 8px; }
.region-bar  { height: 6px; background: rgba(0,0,0,0.15); border-radius: 6px; overflow: hidden; margin-top: 4px; }
.region-fill { height: 100%; border-radius: 6px; background: rgba(255,255,255,0.7); }
.region-badge {
  padding: 4px 10px; border-radius: 10px; font-size: 10px; font-weight: 800;
  background: rgba(255,255,255,0.25); color: #fff;
}
.region-lock { font-size: 24px; opacity: 0.6; }

.r-clareira { background: linear-gradient(135deg, #4CAF72, #81C784); color: #1A3D2A; }
.r-clareira .region-info h3, .r-clareira .region-info p { color: #1A3D2A; }
.r-bosque   { background: linear-gradient(135deg, #2E7D4F, #43A065); color: #fff; }
.r-lago     { background: linear-gradient(135deg, #1565C0, #1E88E5); color: #fff; }
.r-montanha { background: linear-gradient(135deg, #4E342E, #6D4C41); color: #fff; }
.r-arvore   { background: linear-gradient(135deg, #F57F17, #F9A825); color: #fff; }

/* ─── Conquistas (RN-060) ───────────────────────────────────────────── */

.stats-row { display: flex; gap: 10px; }
.stat-box {
  flex: 1; background: var(--card); border-radius: var(--radius);
  padding: 16px 12px; text-align: center; box-shadow: var(--shadow-sm);
}
.stat-box .stat-val   { font-size: 28px; font-weight: 900; color: var(--teal); }
.stat-box .stat-label { font-size: 11px; color: var(--text-muted); font-weight: 700; margin-top: 2px; }

.badge-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.badge-card {
  background: var(--card); border-radius: var(--radius);
  padding: 16px 14px; text-align: center; box-shadow: var(--shadow-sm);
  border: 2px solid transparent; transition: border-color 0.2s;
}
.badge-card.earned { border-color: var(--gold); }
.badge-card.locked { opacity: 0.5; filter: grayscale(0.5); }   /* RN-051: só desbloqueados em destaque */
.badge-emoji { font-size: 40px; }
.badge-name  { font-size: 12px; font-weight: 800; color: var(--text); margin-top: 6px; }
.badge-desc  { font-size: 10px; color: var(--text-muted); margin-top: 3px; }
.badge-earned-tag {
  display: inline-block; margin-top: 6px; font-size: 9px; font-weight: 800;
  background: var(--gold-light); color: var(--gold); padding: 2px 8px; border-radius: 8px;
}

/* ─── Painel dos pais ───────────────────────────────────────────────── */

.pais-tabs { display: flex; gap: 8px; margin-top: 16px; }
.pais-tab {
  flex: 1; padding: 8px 0; border-radius: 12px; border: none; cursor: pointer;
  font-size: 13px; font-weight: 700;
  background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.75);
  transition: all 0.2s;
}
.pais-tab.active { background: #fff; color: #37474F; }

.agenda-card {
  background: var(--card); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow-sm);
  display: flex; gap: 14px; align-items: center;
  cursor: pointer; transition: transform 0.15s;
}
.agenda-card:active { transform: scale(0.98); }
.agenda-date-box {
  width: 52px; text-align: center; flex-shrink: 0;
  background: var(--teal-light); border-radius: 14px; padding: 8px 4px;
}
.agenda-date-box .month { font-size: 10px; font-weight: 800; color: var(--teal); text-transform: uppercase; }
.agenda-date-box .day   { font-size: 24px; font-weight: 900; color: var(--teal-dark); line-height: 1; }
.agenda-info { flex: 1; }
.agenda-info h4 { font-size: 14px; font-weight: 800; color: var(--text); }
.agenda-info p  { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.agenda-tag { font-size: 10px; font-weight: 800; padding: 3px 10px; border-radius: 10px; }
.agenda-tag.confirmed { background: var(--green-light); color: var(--green); }
.agenda-tag.pending   { background: var(--gold-light);  color: #B07800; }

.progress-card {
  background: var(--card); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-sm);
}
.progress-card h4 { font-size: 14px; font-weight: 800; color: var(--text); margin-bottom: 14px; }
.progress-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.progress-row .pr-label { font-size: 12px; color: var(--text-muted); width: 90px; font-weight: 600; }
.progress-bar  { flex: 1; height: 8px; background: #E8F0EC; border-radius: 8px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 8px; }
.progress-row .pr-val { font-size: 12px; font-weight: 800; color: var(--text); width: 32px; text-align: right; }

.notif-card {
  background: var(--card); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow-sm);
  display: flex; gap: 12px; align-items: flex-start;
}
.notif-dot  { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.notif-text h4 { font-size: 13px; font-weight: 800; color: var(--text); }
.notif-text p  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.notif-time { font-size: 10px; color: #AAB9B0; margin-top: 4px; }

/* ─── Painel da dentista ────────────────────────────────────────────── */

.dentista-stats { display: flex; gap: 10px; margin-top: 16px; }
.dentista-stat {
  flex: 1; background: rgba(255,255,255,0.12); border-radius: 14px;
  padding: 10px 8px; text-align: center; backdrop-filter: blur(8px);
}
.dentista-stat .ds-val   { font-size: 24px; font-weight: 900; color: #fff; }
.dentista-stat .ds-label { font-size: 10px; color: rgba(255,255,255,0.7); font-weight: 600; }

.patient-card {
  background: var(--card); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 14px;
  cursor: pointer; transition: transform 0.15s;
}
.patient-card:active { transform: scale(0.98); }
.patient-avatar {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
}
.patient-info { flex: 1; }
.patient-info h4 { font-size: 14px; font-weight: 800; color: var(--text); }
.patient-info p  { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.adherence-badge { font-size: 13px; font-weight: 800; padding: 5px 12px; border-radius: 12px; }
.adh-high { background: var(--green-light); color: var(--green); }
.adh-mid  { background: var(--gold-light);  color: #B07800; }
.adh-low  { background: #FFEBEE;            color: var(--red); }

/* ─── Modal / overlay ───────────────────────────────────────────────── */

.overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(10,30,20,0.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.overlay.show { opacity: 1; pointer-events: all; }
.modal {
  background: var(--card); border-radius: 28px;
  padding: 32px 28px; text-align: center; width: 300px;
  transform: scale(0.85); transition: transform 0.3s;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.overlay.show .modal { transform: scale(1); }
.modal-icon { font-size: 72px; animation: bounce 0.6s 0.2s; }
@keyframes bounce {
  0%   { transform: scale(0); }
  60%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.modal h2 { font-size: 22px; font-weight: 900; color: var(--text); margin-top: 12px; }
.modal p  { font-size: 14px; color: var(--text-muted); margin-top: 8px; }
.modal-xp {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--gold-light); color: var(--gold);
  font-size: 20px; font-weight: 900; padding: 8px 20px; border-radius: 16px;
  margin-top: 16px;
}
.modal-close {
  margin-top: 20px; width: 100%; padding: 14px; border: none; border-radius: 16px;
  background: var(--green); color: #fff;
  font-size: 15px; font-weight: 800; cursor: pointer;
  transition: transform 0.15s;
}
.modal-close:active { transform: scale(0.97); }

/* ─── Toast ─────────────────────────────────────────────────────────── */

.toast {
  position: fixed; top: max(20px, env(safe-area-inset-top));
  left: 20px; right: 20px; z-index: 1100;
  max-width: 390px; margin: 0 auto;
  background: var(--teal-dark); color: #fff;
  padding: 12px 18px; border-radius: 16px;
  font-size: 13px; font-weight: 700;
  box-shadow: var(--shadow);
  transform: translateY(-80px); opacity: 0;
  transition: all 0.3s; display: flex; gap: 10px; align-items: center;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast-icon { font-size: 20px; }

/* ─── Formulários (login, cadastros da dentista) ────────────────────── */

.field       { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--teal-dark); margin-bottom: 6px; }
.field input,
.field select,
.field textarea {
  width: 100%; padding: 13px 16px;
  border: 2px solid var(--border); border-radius: 12px;
  font-family: var(--font); font-size: 15px; font-weight: 600;
  outline: none; transition: border-color 0.2s;
  background: #fff; color: var(--text);
}
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--teal); }

/* ─── Alertas (mesmas cores do .msg-erro do login) ──────────────────── */

.alert {
  padding: 12px 14px; border-radius: 12px;
  font-size: 13px; font-weight: 700; margin-bottom: 16px;
}
.alert-erro    { background: #FEF2F2; color: #C0392B; border: 1px solid #FCA5A5; }
.alert-sucesso { background: var(--green-light); color: var(--green); border: 1px solid #86EFAC; }
.alert-aviso   { background: var(--gold-light);  color: #B07800;      border: 1px solid #FCD34D; }

/* ─── Tags de status ────────────────────────────────────────────────── */

.tag { display: inline-block; padding: 3px 10px; border-radius: 10px; font-size: 10px; font-weight: 800; }
.tag-verde    { background: var(--green-light); color: var(--green); }
.tag-amarelo  { background: var(--gold-light);  color: #B07800; }
.tag-vermelho { background: #FFEBEE;            color: var(--red); }
.tag-azul     { background: var(--teal-light);  color: var(--teal-dark); }

/* ─── Utilitários ───────────────────────────────────────────────────── */

.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.hidden { display: none !important; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }

.spinner {
  width: 22px; height: 22px;
  border: 3px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
