/* Alovance — estilos das áreas novas (login, seletor de alimentos, exercícios, recorrências, assistente, navegação).
   Usa as variáveis de css/vitta.css: --p #244B68, --a #70A9A1, --bg #F5F7F8, --al, --m, --l, --sh. */

.hidden { display: none !important; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--p); font-weight: 700; text-decoration: underline; cursor: pointer; }
.boot { padding: 30vh 0; }
.spin-sm { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; display: inline-block; animation: vspin .8s linear infinite; }
@keyframes vspin { to { transform: rotate(360deg); } }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; filter: none; }
.gnote { font-size: .82rem; margin: 0 0 6px; }

/* ---------- Navegação ---------- */
aside { overflow-y: auto; }
.nb.more { display: none; }
.acct { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--l); display: grid; gap: 8px; }
.acct small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct .btn { justify-content: center; }
@media (max-width: 900px) {
  .nb.sec, .acct { display: none; }
  .nb.more { display: flex; }
}
.panel.sheet { max-width: 420px; }
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 6px 0 14px; }
.more-it { display: grid; justify-items: center; gap: 6px; padding: 16px 8px; border-radius: 16px; border: 1px solid var(--l); background: #fff; font: inherit; font-weight: 600; color: var(--p); cursor: pointer; }
.more-it:hover, .more-it.on { background: var(--al); border-color: var(--a); }
.more-it svg.i { width: 24px; height: 24px; }
.more-acct { border-top: 1px solid var(--l); padding-top: 12px; }
@media (max-width: 640px) {
  #modal { align-items: flex-end; padding: 0; }
  #modal .panel { max-width: none; border-radius: 22px 22px 0 0; max-height: 94vh; }
}

/* ---------- Login ---------- */
.auth { min-height: 92vh; display: grid; place-items: center; padding: 20px 0; }
.auth-card { width: 100%; max-width: 420px; padding: 30px; }
.auth-brand { padding: 0 0 18px; display: flex !important; }
.auth h1 { text-align: left; }
.auth-tabs { background: var(--bg); padding: 4px; border-radius: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.auth-tabs .btn { justify-content: center; }
.auth-tabs .btn.ghost { border-color: transparent; background: transparent; }
.auth-submit { width: 100%; justify-content: center; padding: 13px; }
.auth-note { display: block; margin-top: 14px; text-align: center; }
.auth label small { display: block; margin-top: 4px; font-weight: 500; }

/* ---------- Componentes de formulário ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-r { margin: 0; cursor: pointer; }
.chip-r input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.chip-r span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid #c9d2d7; background: #fff; color: #000; font-weight: 600; font-size: .88rem; transition: .15s; }
.chip-r input:checked + span { background: var(--p); border-color: var(--p); color: #fff; }
.chip-r input:focus-visible + span { outline: 3px solid var(--a); outline-offset: 2px; }
.chips.days .chip-r span { min-width: 52px; text-align: center; padding: 8px 6px; }
.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--bg); border-radius: 14px; width: 100%; }
.seg label { margin: 0; cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.seg span { display: block; text-align: center; padding: 9px 8px; border-radius: 10px; font-weight: 700; color: var(--m); font-size: .9rem; }
.seg span small { font-weight: 500; }
.seg input:checked + span { background: #fff; color: var(--p); box-shadow: 0 1px 4px rgba(36,75,104,.15); }
.seg input:focus-visible + span { outline: 3px solid var(--a); }
.stepper { display: flex; align-items: center; border: 1px solid #c9d2d7; border-radius: 14px; overflow: hidden; background: #fff; }
.stepper input { border: 0; margin: 0; text-align: center; font-size: 1.25rem; font-weight: 800; color: var(--p); min-width: 0; border-radius: 0; }
.stepper button { width: 48px; align-self: stretch; border: 0; background: var(--bg); font-size: 1.4rem; font-weight: 700; color: var(--p); cursor: pointer; }
.stepper button:hover { background: var(--al); }
.stepper .unit { padding: 0 10px; color: var(--m); font-weight: 600; white-space: nowrap; }
.stepper.sm { width: 120px; flex: none; }
.stepper.sm input { font-size: 1rem; padding: 8px 4px; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.qchip { border: 1px dashed #b7c4cb; background: #fff; color: var(--p); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.qchip:hover { border-style: solid; border-color: var(--a); background: var(--al); }
fieldset.fp-meal, fieldset.ex-int { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.fp > fieldset.fp-meal, .rc-ed > fieldset.fp-meal { padding: 0 22px; }
fieldset legend { font-size: .85rem; font-weight: 600; color: var(--m); margin-bottom: 8px; padding: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
textarea { width: 100%; padding: 11px; border: 1px solid #c9d2d7; border-radius: 12px; font: inherit; margin-top: 5px; resize: vertical; color: #000; }

/* ---------- Seletor de alimentos ---------- */
.panel.wide { max-width: 640px; padding: 0; }
.fp, .rc-ed { display: flex; flex-direction: column; min-height: 0; }
.fp > *, .rc-ed > * { padding-left: 22px; padding-right: 22px; }
.fp-head { display: flex; justify-content: space-between; align-items: center; padding-top: 20px; padding-bottom: 6px; }
.fp-head h2 { margin: 0; font-size: 1.25rem; }
.fp-input { display: flex; align-items: center; gap: 10px; border: 2px solid var(--p); border-radius: 16px; padding: 0 14px; background: #fff; box-shadow: 0 4px 16px rgba(36,75,104,.08); }
.fp-input svg.i { color: var(--p); }
.fp-input input { border: 0; margin: 0; padding: 14px 0; font-size: 1.05rem; outline: none; }
.fp-input:focus-within { box-shadow: 0 0 0 4px var(--al); }
.fp-search { padding-top: 10px; padding-bottom: 6px; }
.fp-res { margin-top: 10px; display: grid; gap: 6px; max-height: 46vh; overflow: auto; }
.fp-res.sm { max-height: 30vh; }
.fp-rhead { display: flex; justify-content: space-between; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--m); padding: 2px 4px; }
.fp-item { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; text-align: left; width: 100%; padding: 12px 14px; border: 1px solid var(--l); background: #fff; border-radius: 14px; font: inherit; cursor: pointer; color: #000; }
.fp-item:hover, .fp-item.on { border-color: var(--a); background: var(--al); }
.fp-iname { font-weight: 700; }
.fp-iname small { display: block; font-weight: 500; }
.fp-ikcal { text-align: right; line-height: 1.1; }
.fp-ikcal b { display: block; font-size: 1.05rem; color: var(--p); }
.fp-imac { display: flex; gap: 6px; }
.fp-imac i { font-style: normal; font-size: .74rem; font-weight: 700; color: var(--m); background: var(--bg); border-radius: 8px; padding: 3px 7px; white-space: nowrap; }
.fp-custom { grid-template-columns: auto 1fr; color: var(--p); border-style: dashed; }
.fp-empty { color: var(--m); font-size: .88rem; padding: 10px 4px; }
.fp-det { padding-top: 10px; }
.fp-sel { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 16px; background: var(--al); margin-bottom: 14px; }
.fp-name { font-weight: 800; font-size: 1.1rem; color: var(--p); }
.fp-qty { display: grid; gap: 10px; margin-bottom: 14px; }
.fp-nut { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.nut { background: var(--bg); border-radius: 14px; padding: 10px; text-align: center; }
.nut b { display: block; font-size: 1.05rem; }
.nut small { font-size: .74rem; }
.nut.kcal { background: var(--p); color: #fff; }
.nut.kcal small { color: #cfe0e6; }
.nut.kcal b { font-size: 1.5rem; }
.fp-100 { margin-bottom: 12px; }
.fp-100 summary { cursor: pointer; color: var(--m); font-size: .88rem; font-weight: 600; margin-bottom: 8px; }
.fp-date { max-width: 220px; }
.fp-foot { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--l); padding-top: 14px; padding-bottom: 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: auto; }
.fp-tot b { display: block; font-size: 1.15rem; color: var(--p); }
.fp-tot small { display: block; }
.fp .err, .rc-ed .err { margin: 0 0 6px; }
@media (max-width: 640px) {
  .fp > *, .rc-ed > *, .fp > fieldset.fp-meal, .rc-ed > fieldset.fp-meal { padding-left: 16px; padding-right: 16px; }
  .fp-item { grid-template-columns: 1fr auto; }
  .fp-imac { grid-column: 1 / -1; }
  .fp-nut { grid-template-columns: 1fr 1fr; }
  .fp-foot .row { width: 100%; }
  .fp-foot .row .btn { flex: 1; justify-content: center; }
}

/* ---------- Gasto diário e horários ---------- */
.etiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.etile { background: var(--bg); border-radius: 14px; padding: 12px; }
.etile small { display: block; font-size: .76rem; }
.etile b { display: block; font-size: 1.05rem; color: var(--p); margin: 2px 0; }
.etile.total { background: var(--p); }
.etile.total b, .etile.total small { color: #fff; }
.hrow { display: grid; grid-template-columns: 140px auto auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.hrow input { margin: 0; width: auto; }
.hrow span { color: var(--m); }
@media (max-width: 640px) {
  .etiles { grid-template-columns: 1fr 1fr; }
  .etile.total { grid-column: 1 / -1; }
  .hrow { grid-template-columns: 1fr auto auto auto; }
}

/* ---------- Exercícios ---------- */
.ex-hero { grid-template-columns: auto 1fr; }
.ex-hero-ic { width: 84px; height: 84px; border-radius: 24px; background: rgba(255,255,255,.12); display: grid; place-items: center; }
.ex-hero-ic svg.i { width: 44px; height: 44px; color: var(--a); }
.ex-hero .big { font-size: 1.8rem; }
.note-card { border-left: 5px solid var(--a); }
.ex-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; margin-bottom: 16px; }
.ex-grid > .card { margin: 0; }
.ex-form label .quick { margin-top: 6px; }
.ex-preview { background: var(--bg); border-radius: 14px; padding: 12px 14px; margin: 4px 0 14px; }
.ex-prev { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 6px; }
.ex-prev b { display: block; font-size: 1.1rem; color: var(--p); }
.ex-prev small { font-size: .74rem; }
.ex-item { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; padding: 14px 0; border-top: 1px solid var(--l); }
.ex-item:first-of-type { border-top: 0; }
.ex-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--al); color: var(--p); display: grid; place-items: center; }
.ex-main small { display: block; }
.ex-desc { margin: 4px 0 0; font-size: .86rem; color: var(--m); font-style: italic; }
.ex-kcal { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; font-size: .86rem; }
.ex-kcal b { color: var(--p); }
.ex-how { margin-top: 6px; font-size: .84rem; color: var(--m); }
.ex-how summary { cursor: pointer; font-weight: 600; color: var(--p); }
.ex-how p, .ex-how ul { margin: 6px 0; }
.ex-act { display: flex; gap: 6px; align-items: flex-start; }
.ex-empty svg.i { width: 40px; height: 40px; color: var(--a); }
@media (max-width: 900px) { .ex-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .ex-hero { grid-template-columns: 1fr; } .ex-hero-ic { display: none; } }

/* ---------- Recorrências ---------- */
.rc-card h2 { display: flex; align-items: center; gap: 8px; }
.rc-item { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-top: 1px solid var(--l); align-items: center; flex-wrap: wrap; }
.rc-item:nth-child(2) { margin-top: 10px; }
.rc-item.paused { opacity: .7; }
.rc-main small { display: block; margin-top: 3px; }
.rc-foods { color: var(--m); }
.rc-empty { padding: 14px 0 4px; text-align: left; }
.rc-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--l); }
.rc-n { flex: 1; font-weight: 600; }
.rc-n small { display: block; font-weight: 500; }
.rc-total { text-align: right; padding: 8px 0 0; color: var(--m); }
.rc-total b { color: var(--p); }
.rc-ed label small { display: block; margin-top: 4px; font-weight: 500; }

/* ---------- Assistente ---------- */
.as-wrap { display: grid; grid-template-columns: 240px 1fr; gap: 16px; align-items: start; }
.as-wrap > .card { margin: 0; }
.as-list { display: grid; gap: 4px; position: sticky; top: 16px; }
.as-conv { display: flex; align-items: center; gap: 4px; border-radius: 10px; }
.as-conv > button:first-child { flex: 1; text-align: left; background: none; border: 0; font: inherit; padding: 9px 10px; border-radius: 10px; cursor: pointer; color: #000; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-conv.on, .as-conv:hover { background: var(--al); }
.as-conv .ib { opacity: .5; border: 0; }
.as-chat { display: flex; flex-direction: column; height: calc(100vh - 170px); min-height: 460px; padding: 0; overflow: hidden; }
.as-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--l); flex-wrap: wrap; }
.as-top small { display: block; }
.as-msgs { flex: 1; overflow: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; background: linear-gradient(#fff, var(--bg)); }
.as-msg { display: flex; flex-direction: column; max-width: 82%; }
.as-msg.user { align-self: flex-end; align-items: flex-end; }
.as-bubble { padding: 11px 15px; border-radius: 18px; background: #fff; border: 1px solid var(--l); line-height: 1.55; }
.as-bubble p { margin: 0 0 8px; } .as-bubble p:last-child { margin: 0; }
.as-bubble ul { margin: 4px 0 8px; padding-left: 20px; }
.as-msg.user .as-bubble { background: var(--p); color: #fff; border-color: var(--p); border-bottom-right-radius: 6px; }
.as-msg.assistant .as-bubble { border-bottom-left-radius: 6px; }
.as-meta { font-size: .76rem; color: var(--m); margin-top: 4px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.as-meta svg.i { width: 14px; height: 14px; }
.as-typing { display: flex; gap: 5px; padding: 14px 16px; }
.as-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--a); animation: vdot 1s infinite ease-in-out; }
.as-typing span:nth-child(2) { animation-delay: .15s; } .as-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes vdot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
.as-error { align-self: center; background: #f6e0da; color: #85301f; border-radius: 12px; padding: 10px 14px; font-size: .88rem; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.as-input { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--l); background: #fff; align-items: flex-end; }
.as-input textarea { margin: 0; resize: none; max-height: 160px; }
.as-input .btn { padding: 12px 14px; }
.as-disc { display: block; text-align: center; padding: 0 12px 10px; background: #fff; font-size: .74rem; }
.as-hello { text-align: center; margin: auto; max-width: 520px; }
.as-hello .quick { justify-content: center; }
.as-avatar { width: 56px; height: 56px; border-radius: 18px; background: var(--al); color: var(--p); display: grid; place-items: center; margin: 0 auto 10px; }
.as-avatar svg.i { width: 28px; height: 28px; }
.as-consent h2 { display: flex; gap: 8px; align-items: center; }
.as-scopes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.as-scope { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--l); border-radius: 12px; margin: 0; color: #000; font-weight: 500; cursor: pointer; }
.as-scope input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--p); }
@media (max-width: 900px) {
  .as-wrap { grid-template-columns: 1fr; }
  .as-list { position: static; max-height: 160px; overflow: auto; }
  .as-chat { height: calc(100vh - 230px); }
  .as-msg { max-width: 92%; }
  .as-scopes { grid-template-columns: 1fr; }
}

/* ================================================================
   Conversa com a IA (componente compartilhado: aba, flutuante e FitCare)
   ================================================================ */
.as-card { padding: 0; overflow: hidden; }
.vc { display: flex; flex-direction: column; height: calc(100vh - 190px); min-height: 460px; background: #fff; }
.vc.compact { height: 100%; min-height: 0; }
.fc-conv .vc { height: calc(100vh - 330px); min-height: 420px; }
.vc-loading { padding: 30px; text-align: center; color: var(--m); display: flex; gap: 8px; justify-content: center; align-items: center; }
.spin-sm.dark { border-color: rgba(36,75,104,.2); border-top-color: var(--p); }
.vc-head { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--l); flex-wrap: wrap; }
.vc-head select { flex: 1; min-width: 140px; margin: 0; padding: 8px 10px; }
.vc-msgs { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: linear-gradient(#fff, var(--bg)); overscroll-behavior: contain; }
.vc-msg { display: flex; flex-direction: column; max-width: 86%; gap: 6px; animation: in .25s both; }
.vc-msg.user { align-self: flex-end; align-items: flex-end; }
.vc-bubble { padding: 10px 14px; border-radius: 18px; background: #fff; border: 1px solid var(--l); line-height: 1.55; overflow-wrap: anywhere; }
.vc-bubble p { margin: 0 0 6px; } .vc-bubble p:last-child { margin: 0; } .vc-bubble ul { margin: 4px 0 6px; padding-left: 20px; }
.vc-msg.user .vc-bubble { background: var(--p); color: #fff; border-color: var(--p); border-bottom-right-radius: 6px; }
.vc-msg.assistant .vc-bubble { border-bottom-left-radius: 6px; }
.vc-msg.sys .vc-bubble { background: var(--al); border-color: var(--al); font-size: .9rem; }
.vc-meta { font-size: .74rem; color: var(--m); display: flex; align-items: center; gap: 4px; }
.vc-meta svg.i { width: 13px; height: 13px; }
.vc-typing { display: flex; gap: 5px; padding: 14px 16px; }
.vc-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--a); animation: vdot 1s infinite ease-in-out; }
.vc-typing span:nth-child(2) { animation-delay: .15s; } .vc-typing span:nth-child(3) { animation-delay: .3s; }
.vc-error { align-self: center; background: #f6e0da; color: #85301f; border-radius: 12px; padding: 9px 13px; font-size: .86rem; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.vc-hello { text-align: center; margin: auto 0; padding: 10px; }
.vc-hello p { margin: 6px auto 4px; max-width: 460px; font-size: .9rem; }
.vc-hello .quick { justify-content: center; }
.vc-av, .fab-av { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, var(--p), var(--a)); color: #fff; display: grid; place-items: center; margin: 0 auto 8px; }
.fab-av { width: 34px; height: 34px; margin: 0; flex: none; }
.vc-card { border: 1px solid var(--l); border-radius: 14px; padding: 10px 12px; background: #fff; font-size: .9rem; max-width: 100%; }
.vc-card p { margin: 4px 0; } .vc-card small { display: block; }
.vc-card-h { display: flex; align-items: center; gap: 6px; color: var(--p); }
.vc-card-h svg.i { width: 16px; height: 16px; }
.vc-card.pend.pendente { border: 2px solid #d9a441; background: #fffaf0; }
.vc-card.pend.cancelada, .vc-card.pend.expirada, .vc-card.pend.falhou { opacity: .7; }
.vc-card.done { border-left: 4px solid var(--a); }
.vc-card.done.undone { opacity: .65; border-left-color: var(--l); }
.vc-card .row { margin-top: 6px; }
.vc-input { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--l); background: #fff; align-items: flex-end; }
.vc-input textarea, .fc-free textarea { flex: 1; margin: 0; resize: none; max-height: 140px; padding: 10px 12px; border: 1px solid #c9d2d7; border-radius: 12px; font: inherit; color: #000; }
.vc-input textarea:focus-visible, .fc-free textarea:focus-visible, textarea:focus-visible { outline: 3px solid var(--a); outline-offset: 1px; }
.vc-input .btn { padding: 11px 13px; }
.vc-mic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border-color: var(--a); color: var(--p); flex: none; }
.vc-mic:hover { background: var(--al); }
.vc-hint { font-size: .78rem; color: var(--p); background: var(--al); padding: 6px 12px; display: flex; gap: 6px; align-items: center; }
.vc-hint svg.i { width: 14px; height: 14px; }
.vc-hint.err { background: #f6e0da; color: #85301f; }
.vc-rec { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--l); background: #fff; }
.vc-dot { width: 10px; height: 10px; border-radius: 50%; background: #c4705f; animation: vpulse 1.2s infinite; flex: none; }
.vc-level { flex: 1; display: flex; align-items: center; gap: 3px; height: 32px; }
.vc-level i { flex: 1; max-width: 6px; background: var(--a); border-radius: 3px; height: 8%; transition: height .08s; }
.vc-time { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--p); min-width: 42px; }
@keyframes vpulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.8); } }
.vc-disc { display: block; text-align: center; padding: 0 12px 8px; background: #fff; font-size: .72rem; }
.vc-consent { padding: 18px; overflow: auto; }
.vc-consent p { font-size: .88rem; }
.vc-scopes { display: grid; gap: 6px; margin: 10px 0 14px; }
.vc-scope { display: flex; gap: 10px; align-items: center; margin: 0; padding: 9px 12px; border: 1px solid var(--l); border-radius: 12px; font-weight: 500; color: #000; cursor: pointer; }
.vc-scope input { width: auto; margin: 0; }
.vc-scope.act { border-color: var(--a); background: var(--al); }

/* ================================================================
   Assistente flutuante
   ================================================================ */
#fab-root { position: fixed; right: 22px; bottom: 22px; z-index: 15; display: none; }
#fab-root.on { display: block; }
.fab { width: 58px; height: 58px; border-radius: 50%; border: 0; background: linear-gradient(135deg, var(--p), #2f6a8a); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 8px 24px rgba(36,75,104,.35); position: relative; transition: transform .2s; animation: fabin .35s both; }
.fab:hover { transform: translateY(-2px) scale(1.04); }
.fab svg.i { width: 26px; height: 26px; }
.fab-dot { position: absolute; top: 6px; right: 6px; width: 12px; height: 12px; border-radius: 50%; background: #d9a441; border: 2px solid #fff; }
@keyframes fabin { from { opacity: 0; transform: scale(.6); } }
.fab-tip { position: absolute; right: 0; bottom: 72px; width: min(330px, calc(100vw - 32px)); background: #fff; border: 1px solid var(--l); border-radius: 18px; padding: 14px; box-shadow: var(--sh), 0 12px 30px rgba(36,75,104,.15); animation: in .3s both; }
.fab-tip:after { content: ""; position: absolute; right: 22px; bottom: -8px; width: 14px; height: 14px; background: #fff; border-right: 1px solid var(--l); border-bottom: 1px solid var(--l); transform: rotate(45deg); }
.fab-tip p { margin: 8px 0 10px; font-size: .9rem; }
.fab-tip-h { display: flex; justify-content: space-between; align-items: center; }
.fab-tip-h .ib { border: 0; }
.fab-off { display: block; margin-top: 8px; font-size: .76rem; font-weight: 600; color: var(--m); }
.fab-panel { position: fixed; right: 22px; bottom: 22px; width: 400px; height: min(640px, calc(100vh - 44px)); background: #fff; border-radius: 22px; box-shadow: 0 20px 60px rgba(10,25,36,.28); display: flex; flex-direction: column; overflow: hidden; animation: fabpanel .25s both; border: 1px solid var(--l); }
@keyframes fabpanel { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.fab-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; background: linear-gradient(135deg, var(--p), var(--pd)); color: #fff; }
.fab-head .ib { color: #fff; border-color: rgba(255,255,255,.3); }
.fab-head .ib:hover { background: rgba(255,255,255,.12); }
.fab-title { display: flex; gap: 10px; align-items: center; min-width: 0; }
.fab-title small { display: block; color: #cfe0e6; font-size: .72rem; }
.fab-body { flex: 1; min-height: 0; }
@media (max-width: 900px) {
  #fab-root { right: 14px; bottom: 82px; }
  .fab { width: 52px; height: 52px; }
  .fab-panel { inset: 0; width: auto; height: auto; border-radius: 0; border: 0; }
  #fab-root.open { inset: 0; }
}

/* ================================================================
   FitCare
   ================================================================ */
.fc-ctx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.fc-ctx small { display: block; }
.fc-prefs p { margin: 4px 0; font-size: .9rem; }
.fc-prefs textarea { width: 100%; margin-top: 5px; padding: 9px; border: 1px solid #c9d2d7; border-radius: 12px; font: inherit; resize: vertical; }
.fc-plan { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--l); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: .9rem; }
.fc-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-bottom: 16px; }
.fc-opt { display: grid; grid-template-columns: auto auto 1fr; gap: 12px; align-items: center; text-align: left; background: #fff; border: 1px solid var(--l); border-radius: 18px; padding: 16px; font: inherit; cursor: pointer; box-shadow: var(--sh); transition: border-color .15s, transform .15s; color: #000; }
.fc-opt:hover { border-color: var(--a); transform: translateY(-2px); }
.fc-opt:disabled { opacity: .6; cursor: wait; }
.fc-l { width: 28px; height: 28px; border-radius: 9px; background: var(--p); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.fc-ic { color: var(--a); }
.fc-t b { display: block; color: var(--p); line-height: 1.3; }
.fc-t small { display: block; margin-top: 3px; }
.fc-free h2 { display: flex; gap: 8px; align-items: center; }
.fc-free .vc-input { padding: 0; border: 0; }
.fc-past { text-align: left; font-weight: 600; text-decoration: none; }
.fc-disc { display: block; text-align: center; margin-top: 8px; }
.fc-convh { margin-bottom: 12px; }
@media (max-width: 640px) { .fc-ctx-grid { grid-template-columns: 1fr; } .fc-opt { grid-template-columns: auto 1fr; } .fc-ic { display: none; } }

/* ================================================================
   Treinos programados
   ================================================================ */
.pl-card h2 { display: flex; gap: 8px; align-items: center; }
.pl-form { background: var(--bg); border-radius: 16px; padding: 14px; margin-top: 12px; }
.pl-form h3 { font-size: 1rem; color: var(--p); }
.pl-form .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.pl-pends { margin-top: 12px; display: grid; gap: 8px; }
.pl-pend { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border: 2px dashed #d9a441; background: #fffaf0; border-radius: 14px; padding: 10px 12px; }
.pl-real { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 600; }
.pl-real input { width: 70px; margin: 0; padding: 6px 8px; }
.pl-pend select { width: auto; margin: 0; padding: 6px 8px; }
.pl-fc { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: .9rem; background: var(--al); border-radius: 12px; padding: 8px 12px; margin: 12px 0 0; }
.pl-list { margin-top: 10px; }
.pl-paused { opacity: .65; }

/* ================================================================
   Gasto energético (Perfil)
   ================================================================ */
.en-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.en-opt { text-align: left; background: #fff; border: 2px solid var(--l); border-radius: 16px; padding: 12px 14px; font: inherit; cursor: pointer; color: #000; }
.en-opt b { display: block; color: var(--p); }
.en-opt small { display: block; margin-top: 2px; }
.en-opt.on { border-color: var(--a); background: var(--al); }
.en-total { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.en-total small { display: block; }
.en-comps { border: 1px solid var(--l); border-radius: 14px; overflow: hidden; margin-bottom: 10px; }
.en-comp { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--l); align-items: center; }
.en-comp:first-child { border-top: 0; }
.en-comp small { display: block; font-size: .76rem; }
.en-comp span { font-weight: 700; color: var(--p); white-space: nowrap; }
.en-comp.tot { background: var(--p); color: #fff; } .en-comp.tot span { color: #fff; }
.en-small { font-size: .85rem; margin: 8px 0; }
.en-assume { background: #fffaf0; border: 1px solid #f0d9a8; border-radius: 14px; padding: 10px 12px; margin: 10px 0; font-size: .88rem; }
.en-assume b { display: flex; gap: 6px; align-items: center; color: #7f520c; }
.en-assume ul { margin: 6px 0 8px; padding-left: 20px; }
.en-det { margin-top: 10px; }
.en-det select { margin-bottom: 0; }
.en-notes { font-size: .85rem; padding-left: 18px; }
.en-mform { margin-top: 10px; }
.en-cal { border-top: 1px solid var(--l); margin-top: 12px; padding-top: 10px; }
.en-note b { display: flex; gap: 6px; align-items: center; color: var(--p); }
@media (max-width: 640px) { .en-opts { grid-template-columns: 1fr; } }

/* Preferências, lembretes, conta */
.tgl { display: flex; gap: 8px; align-items: center; font-weight: 500; color: #000; margin: 0 0 6px; }
.tgl input { width: auto; margin: 0; }
.rem-types { padding-left: 22px; }
.rem-types.off { opacity: .5; }
.inl { display: flex; gap: 6px; align-items: center; margin: 0; }
.inl select { width: auto; margin: 0; padding: 6px 8px; }
.acct-g { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.acct-g p { display: flex; gap: 6px; align-items: center; }
a.btn { text-decoration: none; }

/* Seletor de alimentos: medidas caseiras */
.fp-units { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.fp-warn { display: block; color: #7f520c; }

/* Login com Google */
.auth-or { display: flex; align-items: center; gap: 10px; color: var(--m); font-size: .82rem; margin: 14px 0 10px; }
.auth-or:before, .auth-or:after { content: ""; flex: 1; height: 1px; background: var(--l); }
.auth-google { width: 100%; justify-content: center; }
@media (max-width: 520px) {
  .fab-title small { display: none; }
  .fab-head .row { flex-wrap: nowrap; gap: 6px; }
}
@media (max-width: 640px) {
  .hrow { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .hrow b { grid-column: 1 / -1; }
  .hrow input { width: 100%; min-width: 0; }
}
.en-today { background: var(--al); border-radius: 14px; padding: 8px 12px; min-width: 170px; }
.en-today small { display: block; }
.en-today b { display: block; color: var(--p); font-size: 1.15rem; }

/* Questionário de rotina */
.quest { max-width: 640px; }
.quest-page { max-width: 720px; margin: 0 auto; }
.qset { border: 1px solid var(--l); border-radius: 16px; padding: 12px 14px 4px; margin: 0 0 12px; }
.qset legend, .qset summary { font-weight: 700; color: var(--p); padding: 0 4px; }
details.qset summary { cursor: pointer; margin-bottom: 10px; }
details.qset summary small { font-weight: 500; }
.qset select { margin-top: 5px; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.qhint { font-size: .82rem; margin: 0 0 8px; }
@media (max-width: 640px) { .three { grid-template-columns: 1fr 1fr 1fr; gap: 6px; } .three label { font-size: .76rem; } .quest-page .two, .quest .two { grid-template-columns: 1fr; } }
.wvar .neg { color: #1b574f; } .wvar .pos { color: #7f520c; }

/* BodyAI no gasto energético */
.bf-offer { border: 2px solid var(--a); background: linear-gradient(120deg, #fff, var(--al)); }
.bf-offer > b { display: flex; gap: 6px; align-items: center; color: var(--p); }
.bf-offer.inner { box-shadow: none; margin: 10px 0; }
.bf-offer p { font-size: .88rem; }
.bf-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 12px; }
.bf-cmp > div { background: #fff; border: 1px solid var(--l); border-radius: 14px; padding: 10px 12px; }
.bf-cmp small { display: block; }
.bf-cmp b { display: block; color: var(--p); font-size: 1.15rem; }
@media (max-width: 640px) { .bf-cmp { grid-template-columns: 1fr; } }

.wvar-est { margin-top: 4px; font-size: .85rem; }
.wvar-est b { font-weight: 700; } .wvar-est.neg b { color: #1b574f; } .wvar-est.pos b { color: #7f520c; }
.avg7 { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--l); }
.avg7 span { font-weight: 700; color: var(--m); font-size: .85rem; }
.avg7 b { color: var(--p); font-size: 1.1rem; }

/* Marca Alovance */
.brand-mark { width: 40px; height: 40px; object-fit: contain; flex: none; }
.auth-brand .brand-mark { width: 48px; height: 48px; }
.brand { letter-spacing: -.01em; }

/* consumo de IA */
.vc-cost { margin-left: auto; font-size: .7rem; color: var(--m); background: var(--bg); border-radius: 20px; padding: 1px 8px; white-space: nowrap; }
.vc-cost.free { color: #1b574f; background: #dcefeb; }
.ai-lim { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--l); }
.ai-lim small { display: block; margin: 2px 0 8px; }
.ai-use .two small { display: block; }

/* ---------- Seu saldo de hoje: números alinhados em grade ---------- */
.sal-big { margin: 10px 0 14px; }
.sal-num { font-size: 3rem; font-weight: 800; letter-spacing: -.03em; color: var(--p); line-height: 1.1; }
.sal-num span { font-size: 1rem; font-weight: 600; letter-spacing: 0; }
.sal-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 0 0 12px; }
.sal-st { background: var(--bg); border-radius: 14px; padding: 10px 12px; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 2px; }
.sal-st small { font-size: .76rem; line-height: 1.25; }
.sal-st b { font-size: 1.02rem; font-weight: 700; color: #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sal-st b.neg { color: #1b574f; } .sal-st b.pos { color: #7f520c; }
@media (max-width: 1100px) { .sal-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .sal-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .sal-stats .sal-st:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .sal-num { font-size: 2.5rem; }
}

/* ---------- Barra inferior do celular ---------- */
@media (max-width: 900px) {
  aside#nav, aside {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; height: auto;
    display: grid !important; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); overflow: visible;
    background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-top: 1px solid var(--l); border-right: 0; box-shadow: 0 -6px 20px rgba(36, 75, 104, .07); z-index: 20;
  }
  aside .nb.sec, aside .acct, aside .brand { display: none !important; }
  aside .nb {
    flex: none; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    padding: 4px 2px; border-radius: 12px; background: none !important; font-size: .68rem; font-weight: 600; line-height: 1.15;
    color: var(--m); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; min-height: 52px;
  }
  aside .nb svg.i { width: 22px; height: 22px; padding: 3px 14px; box-sizing: content-box; border-radius: 999px; transition: background .2s; }
  aside .nb.on { color: var(--p); }
  aside .nb.on svg.i { background: var(--al); }
  aside .nb.more { display: flex; }
  main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  #fab-root { bottom: calc(78px + env(safe-area-inset-bottom)); right: 14px; }
}
@media (max-width: 360px) {
  aside .nb { font-size: .62rem; }
  aside .nb svg.i { padding: 3px 10px; }
}
