/* ===================================================================
   Patient Redesign — "Direção Sereno". Escopo: body.cm-v2 (index.html).
   Não altera login/landing/psy-dashboard (arquivos separados).
   =================================================================== */
body.cm-v2 {
  --cm-blue: #3d6491;
  --cm-blue-soft: #5b8ec4;
  --cm-ink: #1b2a3d;
  --cm-muted: #6a7a90;
  --cm-muted-2: #8493a8;
  --cm-line: rgba(120,150,190,.14);
  --cm-surface: #fff;
  --cm-chip: #eef4fb;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--cm-ink);
  background: radial-gradient(1200px 600px at 50% -10%, #eaf1fa 0%, #eef1f6 55%, #edeef2 100%);
}
body.cm-v2 h1, body.cm-v2 h2, body.cm-v2 h3, body.cm-v2 .cm-serif {
  font-family: 'Newsreader', serif; font-weight: 500; letter-spacing: -.01em;
}
@keyframes cmFade { from{opacity:0} to{opacity:1} }
@keyframes cmBreath { 0%,100%{transform:scale(.72);opacity:.55} 45%,55%{transform:scale(1);opacity:1} }
@keyframes cmSheet { from{transform:translateY(100%)} to{transform:translateY(0)} }
@keyframes cmMenu { from{transform:translateY(-8px) scale(.97);opacity:0} to{transform:translateY(0) scale(1);opacity:1} }

/* Progress ring (Hoje) */
.cm-ring { position: relative; width: 104px; height: 104px; flex: none; }
.cm-ring svg { transform: rotate(-90deg); }
.cm-ring__track { fill: none; stroke: #e4ecf7; stroke-width: 11; }
.cm-ring__fill { fill: none; stroke: var(--cm-blue-soft); stroke-width: 11; stroke-linecap: round;
  transition: stroke-dashoffset .6s cubic-bezier(.4,0,.2,1); }
.cm-ring__label { position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; }
.cm-ring__pct { font-size: 26px; font-weight: 700; color: var(--cm-ink); line-height: 1; }
.cm-ring__cap { font-size: 11px; color: var(--cm-muted-2); font-weight: 600; }

/* Weekly dots (Hoje) */
.cm-week { display: flex; justify-content: space-between; background: var(--cm-surface);
  border-radius: 22px; padding: 14px 12px; border: 1px solid var(--cm-line); }
.cm-week__col { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.cm-week__lab { font-size: 11px; color: var(--cm-muted-2); font-weight: 600; }
.cm-dot { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; }
.cm-dot--done { background: var(--cm-blue-soft); color: #fff; }
.cm-dot--today { background: #eaf1fa; border: 2px solid var(--cm-blue-soft); }
.cm-dot--today::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--cm-blue-soft); }
.cm-dot--empty { border: 2px dashed #d3ddec; }

/* Care items (Hoje) */
.cm-care { background: var(--cm-surface); border-radius: 22px; border: 1px solid var(--cm-line);
  box-shadow: 0 10px 26px -22px rgba(40,70,110,.55); overflow: hidden; margin-bottom: 12px; }
.cm-care__head { display: flex; align-items: center; gap: 14px; padding: 16px; cursor: pointer; }
.cm-care__tick { width: 32px; height: 32px; flex: none; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; background: #fff; border: 2px solid #cdd9e8; transition: all .25s; }
.cm-care__tick--done { background: var(--cm-blue-soft); border-color: var(--cm-blue-soft); }
.cm-care__icon { width: 38px; height: 38px; flex: none; border-radius: 12px; background: var(--cm-chip);
  display: flex; align-items: center; justify-content: center; color: var(--cm-blue); }
.cm-care__body { flex: 1; min-width: 0; }
.cm-care__name { font-size: 15px; font-weight: 600; color: var(--cm-ink); }
.cm-care__name--done { text-decoration: line-through; color: var(--cm-muted-2); }
.cm-care__meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--cm-muted-2); margin-top: 2px; }
.cm-care__form { padding: 0 16px 16px 62px; animation: cmFade .25s ease; }
.cm-breath-orb { width: 78px; height: 78px; border-radius: 50%; margin: 6px auto 16px;
  background: radial-gradient(circle,#7fb0e0,#4d7fb5); animation: cmBreath 6s ease-in-out infinite;
  box-shadow: 0 0 30px -4px rgba(91,142,196,.6); }

/* Therapy card + subtabs + toggle */
.cm-therapy-card { display: flex; align-items: center; gap: 14px; background: var(--cm-surface);
  border-radius: 22px; padding: 16px; border: 1px solid var(--cm-line);
  box-shadow: 0 14px 34px -26px rgba(40,70,110,.5); }
.cm-subtabs { display: flex; gap: 4px; background: #e3ebf5; border-radius: 15px; padding: 4px; }
.cm-subtab { flex: 1; text-align: center; padding: 9px 4px; border-radius: 11px; font-size: 13px;
  font-weight: 700; cursor: pointer; color: var(--cm-muted); background: transparent; border: none; }
.cm-subtab--active { background: #fff; color: var(--cm-ink); box-shadow: 0 4px 12px -6px rgba(40,70,110,.4); }
.cm-toggle { width: 46px; height: 28px; flex: none; border-radius: 999px; background: #cdd9e8;
  cursor: pointer; padding: 3px; transition: background .25s; border: none; }
.cm-toggle--on { background: var(--cm-blue-soft); }
.cm-toggle__thumb { display: block; width: 22px; height: 22px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .25s cubic-bezier(.4,0,.2,1); }
.cm-toggle--on .cm-toggle__thumb { transform: translateX(18px); }

/* Chat bubbles (restyle #userChatModal) */
.cm-v2 .cm-bubble { max-width: 78%; border-radius: 18px; padding: 11px 14px; font-size: 13.5px;
  line-height: 1.45; box-shadow: 0 4px 14px -10px rgba(40,70,110,.5); }
.cm-v2 .cm-bubble--me { margin-left: auto; background: var(--cm-blue); color: #fff; border-bottom-right-radius: 5px; }
.cm-v2 .cm-bubble--them { background: var(--cm-chip); color: var(--cm-ink); border-bottom-left-radius: 5px; }

/* SOS bar + sheet */
.cm-sos-bar { width: 100%; display: flex; align-items: center; justify-content: center; gap: 9px;
  border: none; border-radius: 16px; padding: 13px; font: inherit; font-size: 14px; font-weight: 700;
  cursor: pointer; background: rgba(255,255,255,.92); color: #b25563;
  box-shadow: 0 10px 30px -14px rgba(178,85,99,.6), 0 0 0 1px rgba(178,85,99,.22); }
.cm-v2 .cm-sos-sheet { border-radius: 28px 28px 0 0 !important; animation: cmSheet .32s cubic-bezier(.32,.72,0,1); }

/* Bottom nav */
.cm-nav { display: flex; justify-content: space-around; padding: 10px 8px 26px;
  background: rgba(255,255,255,.9); border-top: 1px solid var(--cm-line); }
.cm-nav__item { display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--cm-muted-2); cursor: pointer; background: none; border: none; font: inherit; }
.cm-nav__item span { font-size: 11px; font-weight: 600; }
.cm-nav__item--active { color: var(--cm-blue); }
.cm-nav__item--active span { font-weight: 700; }

/* Fixed bottom footer (SOS bar stacked above the nav) */
.cm-footer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: linear-gradient(to top, #edeef2 62%, rgba(237,238,242,0)); }
body.cm-v2 main { padding-bottom: 156px; }
/* keep the (out-of-scope) Explorar FAB clear of the footer */
body.cm-v2 [data-action="open-explore-drawer"] { bottom: 164px !important; }

/* Profile menu (restyle within scope) */
.cm-v2 .cm-profile-menu { animation: cmMenu .22s cubic-bezier(.32,.72,0,1); transform-origin: top right; }

/* Header roxo legado removido — perfil vive no avatar da faixa de saudação */
body.cm-v2 #main-header { display: none !important; }
body.cm-v2 #main-app { padding-top: max(18px, env(safe-area-inset-top)); }
.cm-greet { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cm-avatar-btn { width: 44px; height: 44px; flex: none; border-radius: 50%; background: #dbe6f4;
  display: flex; align-items: center; justify-content: center; color: var(--cm-blue); cursor: pointer;
  border: none; transition: background .2s; }
.cm-avatar-btn:hover { background: #cdddf0; }
