/* ConfiaVET — camada mobile v2 (redesign do app, SÓ celular).
   GARANTIA: tudo aqui vive dentro de .v2m, que é display:none no desktop.
   O site (landing) NEM carrega este arquivo (é standalone). Desktop e site: intocados. */

.v2m { display: block; }
@media (min-width: 769px) { .v2m { display: none !important; } }
/* Esconde a versão atual (desktop) quando o mobile v2 está ativo */
@media (max-width: 768px) { .desktop-view { display: none !important; } }

/* ConfiaVET — App v2 (área logada, mobile-first)
   Camada de produto sobre o design system: shell (tab bar / sidebar),
   componentes clínicos (badges de probabilidade, chips de sinais, cards
   de exame, chat) e ganchos de Tweaks (densidade, raio, verde, serif).

   Layout é dirigido por [data-layout="mobile|desktop"] no .v2m
   (setado por matchMedia no protótipo; fixo nos frames do canvas). */

/* =====================  Tweak hooks  ===================== */
.v2m {
  --d: 1;                       /* densidade (multiplicador de respiro) */
  --r-ctl: 12px;                /* inputs, chips, botões */
  --r-card: 18px;               /* cards */
  --r-modal: 22px;              /* sheets/modais */
  --resumo-size: 19px;          /* serif do resumo */
  --title-size: 26px;           /* título de tela */
  --sans: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --serif: "Fraunces", ui-serif, Georgia, serif;
  /* durações + focus-ring do design system deles (autocontido aqui) */
  --dur-fast: 180ms;
  --dur-base: 220ms;
  --dur-slow: 350ms;
  --focus-ring: rgba(79, 112, 216, 0.15);
  font-family: var(--sans);
  color: var(--text);
}
[data-density="compacta"] .v2m { --d: 0.72; }
[data-radius="reto"] .v2m { --r-ctl: 7px; --r-card: 10px; --r-modal: 12px; }
[data-serif="dramatica"] .v2m { --resumo-size: 23px; --title-size: 31px; }

/* =====================  Base  ===================== */
.v2m a { color: var(--brand); text-decoration: none; }
.v2m a:hover { color: var(--brand-deep); text-decoration: underline; }
.v2-serif { font-family: var(--serif); font-variation-settings: "opsz" 144; letter-spacing: -0.02em; }

.v2-screen { padding: 0 20px calc(112px * var(--d) + 88px); max-width: 640px; margin: 0 auto; }
.v2m[data-layout="desktop"] .v2-screen { max-width: 1160px; padding: 0 40px 72px; }

/* Cabeçalho de tela (mobile: sticky com blur) */
.v2-top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  margin: 0 -20px calc(8px * var(--d));
  padding: calc(14px * var(--d) + 8px) 16px calc(10px * var(--d) + 4px);
  background: rgba(250, 247, 242, 0.82);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
}
.v2-top.is-line { border-bottom-color: var(--border-soft); }
.v2m[data-layout="desktop"] .v2-top {
  position: static; background: none; backdrop-filter: none; border: 0;
  margin: 0 0 calc(18px * var(--d)); padding: calc(34px * var(--d)) 0 0;
}
.v2-top-title { font-family: var(--serif); font-variation-settings: "opsz" 144; font-weight: 600; font-size: 19px; letter-spacing: -0.02em; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2m[data-layout="desktop"] .v2-top-title { font-size: var(--title-size); font-weight: 700; letter-spacing: -0.028em; }

.v2-iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--r-ctl);
  color: var(--text-soft); background: transparent; flex-shrink: 0;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.v2-iconbtn:hover { background: var(--card-tint); color: var(--brand-deep); }
.v2-iconbtn:active { transform: scale(0.94); }
.v2-iconbtn.is-card { background: var(--card); border: 1px solid var(--border-soft); box-shadow: var(--shadow-sm); }
.v2-iconbtn.is-on { color: var(--warn); }

/* =====================  Tab bar (mobile)  ===================== */
.v2-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: repeat(4, 1fr); align-items: end;
  padding: 6px 8px calc(env(safe-area-inset-bottom, 0px) + 8px);
  background: rgba(254, 253, 251, 0.88);
  -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px);
  border-top: 1px solid var(--border-soft);
}
.v2m[data-layout="desktop"] .v2-tabbar { display: none; }
.v2-tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 4px 6px; min-height: 52px; border-radius: 12px;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.02em; color: var(--text-muted);
  transition: color var(--dur-fast) var(--ease-out);
}
.v2-tab.active { color: var(--brand); }
.v2-tab:active { transform: scale(0.96); }
.v2-tab-nova {
  width: 54px; height: 54px; border-radius: 50%; margin: -22px auto 2px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff;
  box-shadow: 0 8px 20px rgba(29, 58, 138, 0.34), 0 2px 5px rgba(29, 58, 138, 0.22);
  transition: transform var(--dur-base) var(--ease-spring), background var(--dur-fast) var(--ease-out);
}
.v2-tab-nova:active { transform: scale(0.92); }

/* =====================  Sidebar (desktop)  ===================== */
.v2-sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: 256px; z-index: 40;
  display: none; flex-direction: column; gap: 8px;
  padding: 28px 18px 22px;
  background: var(--card); border-right: 1px solid var(--border-soft);
}
.v2m[data-layout="desktop"] .v2-sidebar { display: flex; }
.v2m[data-layout="desktop"] .v2-body { margin-left: 256px; }
.v2-side-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: var(--r-ctl);
  font-size: 14.5px; font-weight: 500; color: var(--text-soft);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.v2-side-item:hover { background: var(--card-tint); color: var(--brand-deep); }
.v2-side-item.active { background: var(--brand-mist); color: var(--brand); font-weight: 600; }
.v2-side-cta { margin: 18px 0 14px; }
.v2-side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }

/* =====================  Quota / plano  ===================== */
.v2-quota { display: flex; flex-direction: column; gap: 7px; padding: 14px; border-radius: var(--r-card); background: var(--card-tint); border: 1px solid var(--border-soft); }
.v2-quota-bar { height: 5px; border-radius: 999px; background: var(--border-soft); overflow: hidden; }
.v2-quota-fill { height: 100%; border-radius: 999px; background: var(--brand-light); transition: width 600ms var(--ease-out); }
[data-green="presente"] .v2-quota-fill { background: var(--accent); }
.v2-quota-num { font-family: var(--serif); font-variation-settings: "opsz" 144; font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }

/* =====================  Cards / seções  ===================== */
.v2-card {
  background: var(--card); border: 1px solid var(--border-soft);
  border-radius: var(--r-card); padding: calc(20px * var(--d));
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.v2-card.is-tint { background: var(--card-tint); box-shadow: none; }
.v2-card.is-press { cursor: pointer; }
.v2-card.is-press:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.v2-card.is-press:active { transform: scale(0.985); }

.v2-sec { margin-top: calc(30px * var(--d)); }
.v2-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: calc(14px * var(--d)); }
.v2-sec-title { font-family: var(--serif); font-variation-settings: "opsz" 144; font-weight: 600; font-size: 20px; letter-spacing: -0.022em; }
.v2-sec-note { font-size: 12.5px; color: var(--text-muted); font-weight: 500; }
.v2-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brand-light); }
[data-green="presente"] .v2-kicker { color: var(--accent); }

.v2-stack { display: flex; flex-direction: column; gap: calc(12px * var(--d)); }
.v2-row { display: flex; align-items: center; gap: 12px; }

/* =====================  Pills de status  ===================== */
.v2-status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap; }
.v2-status.is-concluida { background: var(--accent-soft); color: var(--accent-deep); }
.v2-status.is-analise { background: var(--brand-soft); color: var(--brand); }
.v2-status.is-fechado { background: var(--bg-tint); color: var(--text-muted); }
.v2-status.is-atualizada { background: var(--brand-mist); color: var(--brand); }

/* =====================  Badge de probabilidade  ===================== */
.v2-prob { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; flex-shrink: 0; }
.v2-prob.is-alta { background: var(--brand); color: #fff; }
.v2-prob.is-moderada { background: var(--warn-soft); color: var(--warn-deep); }
.v2-prob.is-baixa { background: var(--bg-tint); color: var(--text-muted); }

/* Medidor de 3 segmentos (tratamento 2 do card de diferencial) */
.v2-meter { display: inline-flex; gap: 3px; }
.v2-meter i { width: 16px; height: 4px; border-radius: 999px; background: var(--border); }
.v2-meter.is-alta i:nth-child(-n+3),
.v2-meter.is-moderada i:nth-child(-n+2),
.v2-meter.is-baixa i:nth-child(1) { background: var(--brand); }
.v2-meter.is-moderada i:nth-child(-n+2) { background: var(--warn); }
.v2-meter.is-baixa i:nth-child(1) { background: var(--text-faint); }

/* =====================  Diferenciais (accordion)  ===================== */
.v2-diff { overflow: hidden; }
.v2-diff-head { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 0; min-height: 44px; color: inherit; }
.v2-rank {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-variation-settings: "opsz" 144; font-weight: 600; font-size: 16px;
  background: var(--brand-mist); color: var(--brand); border: 1px solid var(--brand-soft);
}
[data-serif="dramatica"] .v2-rank { width: 38px; height: 38px; font-size: 19px; }
.v2-diff-name { flex: 1; min-width: 0; font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.v2-diff-caret { color: var(--text-faint); transition: transform var(--dur-base) var(--ease-out); flex-shrink: 0; }
.v2-diff.open .v2-diff-caret { transform: rotate(180deg); }
.v2-diff-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-slow) var(--ease-out); }
.v2-diff.open .v2-diff-body { grid-template-rows: 1fr; }
.v2-diff-body > div { overflow: hidden; }
.v2-diff-just { font-size: 14.5px; line-height: 1.6; color: var(--text-soft); padding-top: calc(14px * var(--d)); }
.v2-diff-fonte { font-family: var(--serif); font-style: italic; font-size: 13px; color: var(--text-muted); padding-top: 12px; display: flex; gap: 8px; align-items: baseline; line-height: 1.5; }

/* Chips de sinais */
.v2-signs { display: flex; flex-wrap: wrap; gap: 7px; padding-top: 12px; }
.v2-sign { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; line-height: 1; }
.v2-sign.is-sup { background: var(--accent-soft); color: var(--accent-deep); }
.v2-sign.is-con { background: var(--bg-tint); color: var(--text-muted); }
[data-green="presente"] .v2-sign.is-sup { background: var(--accent); color: #fff; }
.v2-signs-label { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin: 14px 0 -4px; }

/* =====================  Exames  ===================== */
.v2-urg { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; margin: calc(20px * var(--d)) 0 calc(10px * var(--d)); }
.v2-urg i { width: 8px; height: 8px; border-radius: 50%; }
.v2-urg.is-imediato { color: var(--brand); } .v2-urg.is-imediato i { background: var(--brand); }
.v2-urg.is-em-breve { color: var(--warn-deep); } .v2-urg.is-em-breve i { background: var(--warn); }
.v2-urg.is-acompanhamento { color: var(--text-muted); } .v2-urg.is-acompanhamento i { background: var(--text-faint); }
.v2-exam-name { font-family: var(--serif); font-variation-settings: "opsz" 144; font-weight: 600; font-size: 17px; letter-spacing: -0.015em; line-height: 1.3; }
.v2-exam-just { font-size: 13.5px; line-height: 1.55; color: var(--text-soft); margin-top: 7px; }
.v2-exam-esp { display: flex; gap: 8px; margin-top: 11px; padding: 10px 12px; border-radius: calc(var(--r-ctl) - 2px); background: var(--card-tint); font-size: 13px; line-height: 1.5; color: var(--text-soft); }
.v2-exam-esp b { color: var(--text); font-weight: 600; }

/* =====================  Referências / passos  ===================== */
.v2-ref { display: flex; gap: 12px; padding: calc(13px * var(--d)) 2px; border-bottom: 1px solid var(--border-soft); align-items: flex-start; }
.v2-ref:last-child { border-bottom: 0; }
.v2-ref-title { font-family: var(--serif); font-weight: 600; font-size: 14.5px; letter-spacing: -0.01em; line-height: 1.35; }
.v2-ref-meta { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; }
.v2-step { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; line-height: 1.55; color: var(--text-soft); }
.v2-step b { color: var(--text); font-weight: 600; }
.v2-step-n { font-family: var(--serif); font-weight: 600; font-size: 14px; color: var(--brand); background: var(--brand-mist); width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }

/* Disclaimer */
.v2-disclaimer { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; line-height: 1.5; color: var(--text-muted); padding: 14px 4px 0; }

/* =====================  Resumo do caso  ===================== */
.v2-resumo { font-family: var(--serif); font-variation-settings: "opsz" 144; font-weight: 400; font-size: var(--resumo-size); line-height: 1.62; letter-spacing: -0.012em; color: var(--text); text-wrap: pretty; }
.v2-resumo::first-letter { font-weight: 600; }

/* Cabeçalho do paciente */
.v2-pet { display: flex; gap: 14px; align-items: flex-start; }
.v2-pet-ico { width: 52px; height: 52px; border-radius: 16px; background: var(--brand-mist); color: var(--brand); display: flex; align-items: center; justify-content: center; flex-shrink: 0; border: 1px solid var(--brand-soft); }
.v2-pet-name { font-family: var(--serif); font-variation-settings: "opsz" 144; font-weight: 700; font-size: 24px; letter-spacing: -0.025em; line-height: 1.1; }
[data-serif="dramatica"] .v2-pet-name { font-size: 29px; }
.v2-pet-meta { font-size: 13px; color: var(--text-soft); margin-top: 5px; line-height: 1.5; }
.v2-pet-meta b { font-weight: 600; color: var(--text); }
.v2-pet-date { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

/* =====================  Chat  ===================== */
.v2-chat { display: flex; flex-direction: column; gap: calc(14px * var(--d)); }
.v2-msg { max-width: 86%; padding: 12px 15px; border-radius: 20px; font-size: 14.5px; line-height: 1.55; white-space: pre-line; }
.v2-msg.is-vet { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 6px; }
.v2-msg.is-ia { align-self: flex-start; background: var(--card); border: 1px solid var(--border-soft); border-bottom-left-radius: 6px; box-shadow: var(--shadow-sm); color: var(--text); }
.v2-msg-time { font-size: 10.5px; opacity: 0.6; margin-top: 6px; }
.v2-msg.is-ia .v2-msg-time { color: var(--text-muted); }
.v2-chat-ia-tag { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin: 4px 0 -6px 4px; }
.v2-caret { display: inline-block; width: 7px; height: 15px; background: var(--brand-light); border-radius: 2px; margin-left: 3px; vertical-align: text-bottom; animation: v2blink 0.9s steps(2) infinite; }
@keyframes v2blink { 50% { opacity: 0; } }
.v2-chat-sug { display: flex; gap: 8px; flex-wrap: wrap; }
.v2-sug { padding: 9px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); font-size: 13px; font-weight: 600; color: var(--brand-deep); cursor: pointer; transition: all var(--dur-fast) var(--ease-out); min-height: 38px; }
.v2-sug:hover { border-color: var(--brand-light); background: var(--brand-mist); }
.v2-sug:active { transform: scale(0.97); }
.v2-chat-input { display: flex; gap: 8px; align-items: flex-end; padding: 8px; border-radius: 999px; background: var(--card); border: 1.5px solid var(--border); transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out); }
.v2-chat-input:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--focus-ring); }
.v2-chat-input input { flex: 1; border: 0; outline: 0; background: none; font-family: var(--sans); font-size: 15px; color: var(--text); padding: 10px 8px 10px 12px; min-width: 0; }
.v2-chat-input input::placeholder { color: var(--text-faint); }
.v2-send { width: 42px; height: 42px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: var(--shadow-brand); transition: transform var(--dur-fast) var(--ease-spring), background var(--dur-fast) var(--ease-out); }
[data-green="presente"] .v2-send { background: var(--accent); box-shadow: 0 4px 14px rgba(13, 143, 107, 0.28); }
.v2-send:active { transform: scale(0.9); }
.v2-send:disabled { background: var(--text-faint); box-shadow: none; }

/* =====================  Rodapé de ações fixo  ===================== */
.v2-foot {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  display: flex; gap: 10px; align-items: center;
  padding: 12px 16px calc(env(safe-area-inset-bottom, 0px) + 12px);
  background: rgba(250, 247, 242, 0.86);
  -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px);
  border-top: 1px solid var(--border-soft);
}
.v2m[data-layout="desktop"] .v2-foot { left: 256px; padding: 14px 40px; }

/* =====================  Botões (extensões v2)  ===================== */
.v2m .btn { border-radius: var(--r-ctl); min-height: 46px; }
.v2m .btn-sm { min-height: 38px; }
.v2-btn-cta {
  display: flex; align-items: center; gap: 16px; width: 100%;
  padding: calc(22px * var(--d)) calc(22px * var(--d));
  border-radius: var(--r-card);
  background: linear-gradient(135deg, var(--brand-deep) 0%, var(--brand) 78%);
  color: #fff; text-align: left;
  box-shadow: 0 10px 28px rgba(20, 42, 99, 0.28), 0 2px 6px rgba(20, 42, 99, 0.18);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
  position: relative; overflow: hidden;
}
.v2-btn-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(20, 42, 99, 0.34), 0 3px 8px rgba(20, 42, 99, 0.2); }
.v2-btn-cta:active { transform: scale(0.985); }
.v2-btn-cta::after { content: ""; position: absolute; inset: 0; background: radial-gradient(420px 180px at 88% -30%, rgba(163, 187, 245, 0.35), transparent 70%); pointer-events: none; }
.v2-cta-title { font-family: var(--serif); font-variation-settings: "opsz" 144; font-weight: 600; font-size: 21px; letter-spacing: -0.02em; }
.v2-cta-sub { font-size: 13px; opacity: 0.82; margin-top: 3px; }
.v2-cta-ico { width: 52px; height: 52px; border-radius: 16px; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
[data-green="presente"] .v2-cta-ico { background: rgba(13, 143, 107, 0.4); border-color: rgba(215, 240, 227, 0.35); }

/* =====================  Formulário (Nova consulta)  ===================== */
.v2-fsec { margin-top: calc(26px * var(--d)); }
.v2-fsec-head { display: flex; align-items: center; gap: 10px; margin-bottom: calc(13px * var(--d)); }
.v2-fsec-n { font-family: var(--serif); font-weight: 600; font-size: 13px; color: var(--brand); background: var(--brand-mist); border: 1px solid var(--brand-soft); width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.v2-fsec-title { font-family: var(--serif); font-variation-settings: "opsz" 144; font-weight: 600; font-size: 18px; letter-spacing: -0.02em; flex: 1; }
.v2-fsec-opt { font-size: 11.5px; font-weight: 600; color: var(--text-faint); letter-spacing: 0.06em; text-transform: uppercase; }
.v2m .input, .v2m .textarea, .v2m .select { border-radius: var(--r-ctl); min-height: 46px; font-size: 16px; }
.v2m .textarea { line-height: 1.55; }
.v2m .label { font-size: 13.5px; }

/* Campo com microfone */
.v2-voicewrap { position: relative; }
.v2-voicewrap .textarea { padding-right: 52px; }
.v2-mic {
  position: absolute; right: 7px; bottom: 7px; width: 38px; height: 38px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); background: var(--card); border: 1px solid var(--border-soft);
  transition: all var(--dur-fast) var(--ease-out);
}
.v2-mic:hover { color: var(--brand); border-color: var(--brand-light); }
.v2-mic.is-rec { color: #fff; background: var(--brand); border-color: var(--brand); animation: v2recpulse 1.6s var(--ease-out) infinite; }
@keyframes v2recpulse { 0% { box-shadow: 0 0 0 0 rgba(29,58,138,0.32); } 100% { box-shadow: 0 0 0 12px rgba(29,58,138,0); } }
.v2-recbar { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 10px 14px; border-radius: var(--r-ctl); background: var(--brand-mist); border: 1px solid var(--brand-soft); font-size: 13px; font-weight: 600; color: var(--brand); }
.v2-eq { display: flex; align-items: center; gap: 2.5px; height: 16px; }
.v2-eq i { width: 3px; border-radius: 2px; background: var(--brand-light); animation: v2eq 1s ease-in-out infinite; }
.v2-eq i:nth-child(1) { height: 6px; } .v2-eq i:nth-child(2) { height: 14px; animation-delay: 0.15s; }
.v2-eq i:nth-child(3) { height: 9px; animation-delay: 0.3s; } .v2-eq i:nth-child(4) { height: 15px; animation-delay: 0.45s; }
.v2-eq i:nth-child(5) { height: 7px; animation-delay: 0.6s; }
@keyframes v2eq { 0%, 100% { transform: scaleY(0.5); } 50% { transform: scaleY(1); } }

/* Chips de sinais clínicos (input) */
.v2-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.v2-chip { display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-deep); font-size: 13.5px; font-weight: 600; min-height: 38px; }
.v2-chip button { display: flex; color: var(--brand-light); padding: 2px; }
.v2-chip-add { display: inline-flex; align-items: center; gap: 6px; padding: 9px 13px; min-height: 38px; border-radius: 999px; border: 1.5px dashed var(--border); color: var(--text-muted); font-size: 13.5px; font-weight: 600; background: none; transition: all var(--dur-fast) var(--ease-out); }
.v2-chip-add:hover { border-color: var(--brand-light); color: var(--brand); }

/* Segmentado (espécie, sexo, abas do resultado B) */
.v2-seg { display: flex; gap: 4px; padding: 4px; border-radius: var(--r-ctl); background: var(--bg-tint); border: 1px solid var(--border-soft); }
.v2-seg button { flex: 1; padding: 10px 8px; min-height: 42px; border-radius: calc(var(--r-ctl) - 4px); font-size: 13.5px; font-weight: 600; color: var(--text-muted); transition: all var(--dur-fast) var(--ease-out); white-space: nowrap; }
.v2-seg button.active { background: var(--card); color: var(--brand); box-shadow: var(--shadow-sm); }
.v2-seg button:active { transform: scale(0.97); }

/* Anexos */
.v2-dropzone { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: calc(22px * var(--d)) 16px; border: 1.5px dashed var(--border); border-radius: var(--r-card); background: var(--card-tint); color: var(--text-muted); text-align: center; cursor: pointer; transition: all var(--dur-fast) var(--ease-out); width: 100%; }
.v2-dropzone:hover { border-color: var(--brand-light); color: var(--brand); background: var(--brand-mist); }
.v2-file { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-ctl); background: var(--card); border: 1px solid var(--border-soft); box-shadow: var(--shadow-sm); }
.v2-file-thumb { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: repeating-linear-gradient(-45deg, var(--bg-tint) 0 6px, var(--card-tint) 6px 12px); border: 1px solid var(--border-soft); color: var(--text-muted); }
.v2-file-name { font-size: 13.5px; font-weight: 600; }
.v2-file-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }
.v2-lgpd { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--warn-soft); border: 1px solid rgba(194, 132, 26, 0.25); font-size: 13px; line-height: 1.5; color: var(--warn-deep); }
.v2-lgpd input { accent-color: var(--warn-deep); width: 18px; height: 18px; margin-top: 1px; flex-shrink: 0; cursor: pointer; }
.v2-lgpd.is-ok { background: var(--accent-soft); border-color: rgba(13, 143, 107, 0.25); color: var(--accent-deep); }
.v2-lgpd.is-ok input { accent-color: var(--accent-deep); }

/* Exame físico — grid de vitais */
.v2-vitals { display: grid; grid-template-columns: 1fr 1fr; gap: calc(12px * var(--d)); }
.v2m[data-layout="desktop"] .v2-vitals { grid-template-columns: repeat(4, 1fr); }
.v2-vital { display: flex; flex-direction: column; gap: 6px; }
.v2-vital-unit { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); font-size: 12.5px; color: var(--text-faint); font-weight: 600; pointer-events: none; }

/* =====================  Skeleton / loading  ===================== */
.v2-load { display: flex; flex-direction: column; gap: 18px; }
.v2-load-steps { display: flex; flex-direction: column; gap: 12px; }
.v2-load-step { display: flex; align-items: center; gap: 11px; font-size: 14px; font-weight: 500; color: var(--text-faint); transition: color var(--dur-slow) var(--ease-out); }
.v2-load-step.is-now { color: var(--brand); font-weight: 600; }
.v2-load-step.is-done { color: var(--text-soft); }
.v2-load-dot { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--card); transition: all var(--dur-slow) var(--ease-out); }
.v2-load-step.is-now .v2-load-dot { border-color: var(--brand-light); }
.v2-load-step.is-done .v2-load-dot { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-deep); }
.v2-breathe { border-radius: var(--r-card); background: var(--bg-tint); animation: v2breathe 1.9s var(--ease-out) infinite; }
@keyframes v2breathe { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
.v2-breathe:nth-child(odd) { animation-delay: 0.4s; }

/* =====================  Sheet (mobile) / modal  ===================== */
.v2-scrim { position: fixed; inset: 0; z-index: 70; background: rgba(20, 26, 43, 0.4); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: fadeIn var(--dur-base) var(--ease-out) both; }
.v2-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 71;
  max-width: 640px; margin: 0 auto; max-height: 88vh; overflow: auto;
  background: var(--card); border-radius: var(--r-modal) var(--r-modal) 0 0;
  padding: 10px 20px calc(env(safe-area-inset-bottom, 0px) + 20px);
  box-shadow: var(--shadow-lg);
  animation: v2up var(--dur-slow) var(--ease-spring) both;
}
.v2m[data-layout="desktop"] .v2-sheet { bottom: auto; top: 50%; left: 50%; right: auto; transform: translate(-50%, -50%); width: 520px; border-radius: var(--r-modal); padding: 10px 28px 26px; animation: v2pop var(--dur-slow) var(--ease-spring) both; }
@keyframes v2up { from { transform: translateY(60px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes v2pop { from { transform: translate(-50%, -46%) scale(0.96); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.v2-sheet-grip { width: 40px; height: 4px; border-radius: 999px; background: var(--border); margin: 4px auto 14px; }
.v2m[data-layout="desktop"] .v2-sheet-grip { visibility: hidden; }

/* =====================  Histórico  ===================== */
.v2-search { display: flex; align-items: center; gap: 10px; padding: 0 14px; min-height: 48px; border-radius: var(--r-ctl); background: var(--card); border: 1.5px solid var(--border); transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out); }
.v2-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--focus-ring); }
.v2-search input { flex: 1; border: 0; outline: 0; background: none; font-family: var(--sans); font-size: 15.5px; color: var(--text); min-width: 0; }
.v2-search input::placeholder { color: var(--text-faint); }
.v2-filters { display: flex; gap: 8px; overflow-x: auto; padding: 2px; margin: 0 -2px; scrollbar-width: none; }
.v2-filters::-webkit-scrollbar { display: none; }
.v2-filter { padding: 8px 14px; min-height: 38px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); font-size: 13px; font-weight: 600; color: var(--text-soft); white-space: nowrap; transition: all var(--dur-fast) var(--ease-out); }
.v2-filter.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Linha de caso (dashboard + histórico) */
.v2-case { display: flex; gap: 13px; align-items: center; width: 100%; text-align: left; padding: calc(15px * var(--d)) calc(16px * var(--d)); color: inherit; }
.v2-case-ico { width: 42px; height: 42px; border-radius: 13px; background: var(--brand-mist); color: var(--brand); border: 1px solid var(--brand-soft); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.v2-case-name { font-family: var(--serif); font-variation-settings: "opsz" 144; font-weight: 600; font-size: 16.5px; letter-spacing: -0.015em; }
.v2-case-queixa { font-size: 13px; color: var(--text-soft); line-height: 1.45; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.v2-case-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }

/* =====================  Perfil / Plano / Equipe  ===================== */
.v2-prow { display: flex; align-items: center; gap: 13px; width: 100%; text-align: left; padding: calc(15px * var(--d)) 4px; border-bottom: 1px solid var(--border-soft); color: inherit; min-height: 56px; }
.v2-prow:last-child { border-bottom: 0; }
.v2-prow-label { font-size: 14.5px; font-weight: 600; }
.v2-prow-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.v2-plan { position: relative; display: flex; flex-direction: column; gap: 10px; }
.v2-plan.is-atual { border-color: var(--brand-light); box-shadow: 0 0 0 1px var(--brand-light), var(--shadow-md); }
.v2-plan-price { font-family: var(--serif); font-variation-settings: "opsz" 144; font-weight: 700; font-size: 30px; letter-spacing: -0.03em; }
.v2-plan-price small { font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--text-muted); letter-spacing: 0; }
.v2-plan-feat { display: flex; gap: 9px; font-size: 13.5px; color: var(--text-soft); line-height: 1.5; align-items: flex-start; }
.v2-member { display: flex; align-items: center; gap: 12px; padding: calc(13px * var(--d)) 0; border-bottom: 1px solid var(--border-soft); }
.v2-member:last-child { border-bottom: 0; }

/* =====================  Erro  ===================== */
.v2-error-ico { width: 64px; height: 64px; border-radius: 20px; background: var(--danger-soft); color: var(--danger); display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }

/* =====================  Entradas suaves  ===================== */
.v2-in { animation: v2in 480ms var(--ease-out) both; }
.v2-in-1 { animation-delay: 40ms; } .v2-in-2 { animation-delay: 110ms; } .v2-in-3 { animation-delay: 180ms; }
.v2-in-4 { animation-delay: 250ms; } .v2-in-5 { animation-delay: 320ms; } .v2-in-6 { animation-delay: 390ms; }
@keyframes v2in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* =====================  Desktop: grids  ===================== */
.v2-cols { display: block; }
.v2m[data-layout="desktop"] .v2-cols { display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 32px; align-items: start; }
.v2m[data-layout="desktop"] .v2-rail { position: sticky; top: 28px; display: flex; flex-direction: column; gap: 16px; }
.v2-grid2 { display: grid; gap: calc(14px * var(--d)); }
.v2m[data-layout="desktop"] .v2-grid2 { grid-template-columns: 1fr 1fr; }
.v2-grid3 { display: grid; gap: calc(14px * var(--d)); }
.v2m[data-layout="desktop"] .v2-grid3 { grid-template-columns: repeat(3, 1fr); }
/* Direção B — painel */
.v2m[data-layout="desktop"] .v2-panelgrid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 32px; align-items: start; }

/* Visibilidade por layout */
.v2m[data-layout="desktop"] .v2-mob-only { display: none; }
.v2m[data-layout="mobile"] .v2-desk-only { display: none !important; }

/* =====================  Canvas frames (screens.html)  ===================== */
.v2-frame { position: relative; overflow: hidden; background: var(--bg); border-radius: 20px; }
.v2-frame .v2m { min-height: 100%; }
.v2-frame .v2-tabbar, .v2-frame .v2-foot, .v2-frame .v2-sidebar, .v2-frame .v2-scrim, .v2-frame .v2-sheet { position: absolute; }
.v2-frame .v2-top { position: relative; }
.v2-frame .v2m[data-layout="desktop"] .v2-rail { position: relative; top: 0; }
.v2-frame .v2-in { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .v2-in, .v2-breathe, .v2-eq i, .v2-mic.is-rec, .v2-caret, .v2-sheet, .v2-scrim { animation: none !important; }
}
