/* AylaDog: mesmo estilo do Hábitos Financeiros (barra colorida, menu lateral, fundo claro, cartões brancos).
   Para trocar a cor da marca, mude as variáveis --brand. */

:root {
  --brand: #E2733A;
  --brand-strong: #B4521F;
  --brand-soft: #FCE8DA;
  --brand-tint: #FEF4ED;
  --brand-line: #F6C9AB;
  --bg: #F5F3EF;
  --card: #FFFEFC;
  --ink: #2E2A27;
  --muted: #6F6862;
  --faint: #A49D97;
  --line: #EAE6E1;
  --chip: #F0EDE9;
  --dark: #2E2A27;
  --green: #19A463;
  --green-strong: #11804C;
  --green-soft: #DCF4E6;
  --amber: #E29A12;
  --amber-strong: #8F5B00;
  --amber-soft: #FDF1D8;
  --red: #DC4646;
  --red-soft: #FCEBEB;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(40, 30, 20, .05), 0 2px 10px rgba(40, 30, 20, .03);
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--bg);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: inherit; }
input, select, textarea { font: inherit; color: inherit; }
svg { display: block; flex: none; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
b, strong { font-weight: 650; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13.5px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.mt { margin-top: 12px; }

.app { max-width: 560px; margin: 0 auto; min-height: 100dvh; }
main { padding: 12px 12px calc(32px + var(--safe-bottom)); }

/* ---------- barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--brand); color: #fff;
  padding: calc(var(--safe-top) + 6px) 6px 6px;
  display: grid; grid-template-columns: 48px 1fr 48px; align-items: center;
}
.brand { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 20px; font-weight: 750; letter-spacing: -.4px; }
.brand .ic { width: 24px; height: 24px; }
.tb-btn { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; }
.tb-btn:active { background: rgba(255, 255, 255, .18); }
.offline-bar {
  display: none; align-items: center; justify-content: center; gap: 8px;
  background: var(--dark); color: #fff;
  font-size: 13px; font-weight: 550;
  padding: 7px 12px;
}
body.offline .offline-bar { display: flex; }

/* ---------- cartões ---------- */
.card { position: relative; background: var(--card); border-radius: var(--radius); padding: 18px 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.card-title { font-size: 15.5px; font-weight: 650; margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-title .link { font-size: 14px; }
h1.page { font-size: 20px; font-weight: 700; letter-spacing: -.2px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 4px 12px; min-height: 36px; }
.link { color: var(--brand-strong); font-weight: 600; font-size: 14px; }

/* olá + indicadores */
.hello-row { display: flex; align-items: center; gap: 14px; }
.hello { font-size: 15px; color: var(--muted); }
.hello b { display: block; font-size: 21px; color: var(--ink); margin-top: 1px; letter-spacing: -.2px; }
.kpis { display: flex; gap: 22px; margin-top: 16px; flex-wrap: wrap; }
.kpi .l { font-size: 13px; color: var(--muted); }
.kpi .v { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.start { background: var(--brand-tint); border: 1px solid var(--brand-line); border-radius: 14px; padding: 16px; margin-top: 16px; }
.start h3 { font-size: 16px; margin-bottom: 4px; }
.start p { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.party { background: var(--amber-soft); border: 1px solid #f3d798; border-radius: 14px; padding: 14px 16px; margin-top: 14px; display: flex; gap: 12px; align-items: center; font-size: 14.5px; }
.party .ic { color: var(--amber-strong); }

/* ---------- avatar e ícones redondos ---------- */
.avatar { border-radius: 50%; object-fit: cover; background: var(--brand-soft); color: var(--brand-strong); display: grid; place-items: center; flex: none; overflow: hidden; font-weight: 700; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.ci { width: 38px; height: 38px; border-radius: 50%; background: var(--c, #999); color: #fff; display: grid; place-items: center; flex: none; }
.ci .ic { width: 19px; height: 19px; }
.ci.sm { width: 32px; height: 32px; }
.ci.sm .ic { width: 16px; height: 16px; }
.ci.lg { width: 54px; height: 54px; }
.ci.lg .ic { width: 26px; height: 26px; }

/* ---------- linhas de lista ---------- */
.row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; cursor: pointer; }
.row:last-child { border-bottom: 0; }
.row .t { display: block; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .s { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .s.wrap { white-space: normal; }
.row .chev { color: var(--faint); }
.row-thumb { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; flex: none; }
.right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; }
.right .d { font-size: 12.5px; color: var(--muted); white-space: nowrap; }

/* situação (pílulas) */
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; line-height: 1; padding: 5px 8px; border-radius: 7px; background: var(--chip); color: var(--muted); font-weight: 650; white-space: nowrap; }
.pill.st-atrasado { background: var(--red-soft); color: var(--red); }
.pill.st-hoje, .pill.st-breve { background: var(--amber-soft); color: var(--amber-strong); }
.pill.st-ok { background: var(--green-soft); color: var(--green-strong); }

/* botão redondo "feito" (igual ao "pago" do Hábitos) */
.st { width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line); display: grid; place-items: center; color: #c9c4be; flex: none; transition: background .15s, color .15s; }
.st:hover, .st:active { background: var(--green-soft); color: var(--green-strong); box-shadow: none; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: 12px;
  background: var(--brand); color: #fff; font-weight: 650; font-size: 15px;
  transition: filter .15s, transform .1s;
}
.btn:active { filter: brightness(.94); transform: scale(.99); }
.btn:disabled { background: #dcd8d3; color: #8f8983; }
.btn.block { width: 100%; display: flex; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn-soft { background: var(--brand-soft); color: var(--brand-strong); }
.btn-ghost { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-row { display: flex; gap: 10px; margin-top: 6px; }
.btn-row .btn { flex: 1; }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line); background: var(--card); flex: none; }
.icon-btn.ghost { box-shadow: none; background: transparent; }
.link-btn { display: flex; align-items: center; gap: 4px; margin: 14px auto 0; color: var(--muted); font-size: 14px; text-decoration: underline; }

/* atalhos de registro */
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick button { min-height: 46px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); display: flex; align-items: center; justify-content: flex-start; gap: 10px; padding: 0 12px; font-weight: 600; font-size: 14px; background: #fff; }
.quick .ci { width: 28px; height: 28px; }
.quick .ci .ic { width: 15px; height: 15px; }

/* ---------- abas (segmentos) ---------- */
.seg { display: flex; background: var(--chip); border-radius: 12px; padding: 3px; gap: 3px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg a { flex: 1 0 auto; min-height: 36px; padding: 0 10px; border-radius: 9px; font-weight: 550; font-size: 14px; color: var(--muted); display: flex; align-items: center; justify-content: center; white-space: nowrap; }
.seg a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }

/* ---------- estados vazios ---------- */
.empty { text-align: center; padding: 14px 8px 4px; }
.empty-ic { width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 50%; background: var(--dark); color: #FFB98A; display: grid; place-items: center; box-shadow: 0 0 0 7px var(--chip); }
.empty h3 { font-size: 16.5px; margin-bottom: 6px; }
.empty p { color: var(--muted); font-size: 14px; margin: 0 auto 14px; max-width: 290px; }

/* ---------- fotos ---------- */
.strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.strip a { aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--chip); }
.strip img { width: 100%; height: 100%; object-fit: cover; }
.gal-month { font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; margin: 6px 2px 8px; }
.gal-month small { font-weight: 550; letter-spacing: 0; margin-left: 4px; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-radius: 12px; overflow: hidden; margin-bottom: 14px; }
@media (min-width: 520px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gal-item { position: relative; aspect-ratio: 1; background: var(--chip); overflow: hidden; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; }
.gal-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 5px; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); color: #fff; font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.viewer { position: fixed; inset: 0; z-index: 60; background: #0d0c0b; color: #fff; display: flex; flex-direction: column; opacity: 0; transition: opacity .18s; }
.viewer.open { opacity: 1; }
.viewer .icon-btn { background: transparent; box-shadow: none; color: #fff; }
.viewer .icon-btn:hover { background: rgba(255, 255, 255, .12); }
.viewer-top { display: flex; align-items: center; justify-content: space-between; padding: calc(var(--safe-top) + 6px) 8px 6px; }
.viewer-count { font-size: 14px; opacity: .8; }
.viewer-acts { display: flex; gap: 4px; }
.viewer-stage { flex: 1; min-height: 0; position: relative; display: grid; place-items: center; }
.viewer-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .35); color: #fff; }
.viewer-nav.prev { left: 10px; }
.viewer-nav.next { right: 10px; }
@media (hover: none) { .viewer-nav { display: none; } }
.viewer-cap { padding: 10px 18px calc(var(--safe-bottom) + 16px); min-height: 56px; }
.viewer-cap p { font-weight: 600; }
.viewer-cap small { opacity: .7; }

/* ---------- peso ---------- */
.weight-now { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.weight-now .v { font-size: 28px; font-weight: 750; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.chart { margin-top: 12px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--brand); opacity: .1; }
.chart .dot { fill: #fff; stroke: var(--brand); stroke-width: 2; }
.chart text { fill: var(--faint); font-size: 11px; font-family: var(--font); }

/* ---------- perfil ---------- */
.profile { text-align: center; padding-top: 22px; }
.profile-photo { position: relative; display: inline-block; border-radius: 50%; }
.profile-photo .avatar { box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--line); }
.profile-cam { position: absolute; right: 0; bottom: 4px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; box-shadow: 0 0 0 3px #fff; }
.profile h1 { font-size: 24px; font-weight: 750; letter-spacing: -.4px; margin-top: 12px; }
.profile p { margin-top: 2px; }
.tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 12px; }
.tag { font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--chip); color: var(--muted); }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.kv:last-child { border-bottom: 0; padding-bottom: 2px; }
.kv dt { color: var(--muted); flex: none; }
.kv dd { text-align: right; white-space: pre-wrap; overflow-wrap: anywhere; font-weight: 550; }
.kv.long { flex-direction: column; gap: 3px; }
.kv.long dd { text-align: left; font-weight: 500; }
.add-line { display: flex; align-items: center; gap: 8px; color: var(--brand-strong); font-weight: 600; font-size: 14.5px; padding: 4px 0; width: 100%; }
.contact-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.emerg { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px; border-radius: 12px; background: var(--red-soft); }
.emerg-txt { flex: 1; min-width: 0; }
.emerg-txt small { display: block; color: var(--red); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.emerg-txt b { display: block; font-size: 14.5px; }
.emerg .btn { background: var(--red); color: #fff; }

/* ---------- menu lateral ---------- */
.drawer-wrap { position: fixed; inset: 0; z-index: 50; visibility: hidden; transition: visibility 0s .25s; }
.drawer-wrap.open { visibility: visible; transition: none; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(26, 22, 18, .45); opacity: 0; transition: opacity .2s; }
.drawer { position: absolute; top: 0; bottom: 0; left: 0; width: min(300px, 84vw); background: var(--card); transform: translateX(-100%); transition: transform .25s cubic-bezier(.2, .8, .2, 1); overflow-y: auto; padding-top: var(--safe-top); display: flex; flex-direction: column; }
.drawer-wrap.open .drawer { transform: none; }
.drawer-wrap.open .drawer-backdrop { opacity: 1; }
.drawer-head { display: flex; align-items: center; gap: 14px; padding: 24px 20px 18px; border-bottom: 1px solid var(--line); }
.dr-name { font-weight: 650; font-size: 17px; }
.dr-sub { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dnav { padding: 6px 12px; }
.dnav-label { font-size: 11.5px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; padding: 14px 12px 6px; }
.dnav a, .dnav button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 12px; border-radius: 12px; font-size: 15.5px; font-weight: 550; color: var(--ink); }
.dnav .ic { color: var(--muted); }
.dnav a:active, .dnav button:active { background: var(--chip); }
.dnav a.on { background: var(--brand-soft); color: var(--brand-strong); font-weight: 700; }
.dnav a.on .ic { color: var(--brand-strong); }
.dr-bottom { margin-top: auto; padding: 8px 12px calc(14px + var(--safe-bottom)); border-top: 1px solid var(--line); }
.dr-user { display: flex; align-items: center; gap: 10px; padding: 10px 12px 4px; font-size: 13px; color: var(--muted); }
.dr-user .avatar { width: 28px; height: 28px; font-size: 12px; }
.dr-user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-logout { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border-radius: 12px; font-size: 15px; font-weight: 600; color: var(--red); }
.dr-logout:hover { background: var(--red-soft); }
.dr-foot { display: flex; gap: 8px; align-items: flex-start; padding: 8px 12px 0; font-size: 12.5px; line-height: 1.4; color: var(--faint); }
.dr-foot .ic { flex: none; margin-top: 1px; color: var(--brand-strong); }

/* ---------- folhas (painéis que sobem) ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(26, 22, 18, .45); opacity: 0; transition: opacity .2s; }
.sheet {
  position: relative; width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--card); border-radius: 22px 22px 0 0; padding: 4px 18px calc(18px + var(--safe-bottom));
  transform: translateY(100%); transition: transform .26s cubic-bezier(.2, .8, .2, 1);
}
.sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: #dedad5; margin: 6px auto 4px; }
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 0 12px; }
.sheet-head h2 { font-size: 19px; font-weight: 700; letter-spacing: -.2px; }
.sheet-head .icon-btn { margin-right: -8px; box-shadow: none; background: transparent; }
.sheet-text { margin: -4px 0 14px; font-size: 14.5px; color: var(--muted); }
@media (min-width: 620px) {
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: 22px; max-height: 88dvh; padding-bottom: 20px; transform: translateY(20px) scale(.98); opacity: 0; transition: transform .2s, opacity .2s; }
  .sheet::before { display: none; }
  .sheet-wrap.open .sheet { opacity: 1; }
}
.menu-list { display: grid; gap: 2px; padding-bottom: 4px; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 6px; border-radius: 12px; font-size: 15.5px; font-weight: 550; text-align: left; }
.menu-item:hover { background: #f6f4f1; }
.menu-item .ci { width: 34px; height: 34px; }
.menu-item .ci .ic { width: 17px; height: 17px; }
.menu-item > .ic { color: var(--muted); margin: 0 7px; }
.menu-item.danger { color: var(--red); }
.menu-item.danger > .ic { color: var(--red); }

/* ---------- formulários ---------- */
.fld { display: block; margin-bottom: 14px; min-width: 0; }
.lbl { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 550; margin-bottom: 6px; }
.inp {
  width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
  padding: 0 14px; font-size: 16px; outline: none; text-align: left;
  transition: border-color .15s, box-shadow .15s;
}
.inp:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.inp::placeholder { color: var(--faint); }
textarea.inp { min-height: 76px; padding: 12px 14px; resize: vertical; display: block; }
input[type=date].inp { display: block; line-height: 46px; -webkit-appearance: none; appearance: none; min-width: 0; }
input[type=date].inp::-webkit-date-and-time-value { text-align: left; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-sec { font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; border-top: 1px solid var(--line); padding-top: 16px; margin: 6px 0 12px; scroll-margin-top: 8px; }
.form-sec:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.hint { font-size: 13px; color: var(--muted); margin: -6px 0 14px; }
.hint:empty { display: none; }
.info-box { background: #f3f1ed; border-radius: 12px; padding: 12px 14px; font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.info-box .ic { color: var(--muted); margin-top: 1px; }
.info-box:empty { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 14px; }
.chip { min-height: 34px; padding: 0 12px; border-radius: 17px; box-shadow: inset 0 0 0 1px var(--line); background: #fff; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.chip.on { background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand-line); color: var(--brand-strong); font-weight: 550; }
.radio-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-chips label { position: relative; }
.radio-chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.radio-chips span { min-height: 38px; padding: 0 14px; border-radius: 19px; box-shadow: inset 0 0 0 1px var(--line); background: #fff; font-size: 14.5px; display: inline-flex; align-items: center; cursor: pointer; }
.radio-chips input:checked + span { background: var(--brand-soft); box-shadow: inset 0 0 0 1.5px var(--brand); color: var(--brand-strong); font-weight: 600; }
.radio-chips input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.attach { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.attach-thumb { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--chip); }
.attach-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- avisos ---------- */
.toast {
  position: fixed; left: 50%; top: calc(var(--safe-top) + 12px); z-index: 500;
  transform: translate(-50%, -160%); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
  display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .16); padding: 10px 16px 10px 10px; font-size: 14.5px; font-weight: 550;
  max-width: calc(100vw - 32px); width: max-content;
}
.toast.show { transform: translate(-50%, 0); }
.toast-ic { width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; flex: none; }
.toast.err .toast-ic { background: var(--red); }

/* ---------- login ---------- */
.splash { min-height: 60dvh; display: grid; place-items: center; }
.spinner { width: 30px; height: 30px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.login { min-height: 100dvh; display: flex; flex-direction: column; background: radial-gradient(900px 420px at 85% 0%, #fde8da 0%, rgba(253, 232, 218, 0) 60%), #fffdfa; }
.login-bar { background: var(--brand); color: #fff; padding: calc(var(--safe-top) + 14px) 16px 14px; display: flex; justify-content: center; }
.login-body { flex: 1; width: 100%; max-width: 420px; margin: 0 auto; padding: 32px 20px calc(var(--safe-bottom) + 20px); display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.login-card { background: #fff; border-radius: 20px; box-shadow: 0 1px 2px rgba(40, 30, 20, .05), 0 8px 30px rgba(40, 30, 20, .07); padding: 26px 22px; text-align: center; }
.login-photo { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-strong); box-shadow: 0 0 0 7px var(--brand-tint); }
.login-title { font-size: 22px; font-weight: 750; letter-spacing: -.4px; }
.login-lead { color: var(--muted); font-size: 14.5px; margin: 6px 0 18px; }
.gbtn { width: 100%; min-height: 50px; display: flex; align-items: center; justify-content: center; gap: 12px; background: #fff; color: #1f1f1f; border-radius: 12px; box-shadow: inset 0 0 0 1px #dadce0; font-weight: 650; font-size: 15.5px; }
.gbtn:active { background: #f7f7f7; }
.gbtn:disabled { opacity: .7; }
.login-err { color: var(--red); font-size: 14px; font-weight: 550; margin-top: 12px; }
.trust { list-style: none; display: grid; gap: 10px; padding: 0 6px; }
.trust li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--muted); }
.trust .ic { color: var(--brand-strong); margin-top: 1px; }
.denied-ic { width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 50%; background: var(--red-soft); color: var(--red); display: grid; place-items: center; }

/* ---------- ficha para o veterinário ---------- */
.ficha-bar { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.ficha { font-size: 14.5px; }
.ficha-head { display: flex; align-items: center; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.ficha-head h1 { font-size: 24px; font-weight: 750; letter-spacing: -.4px; }
.ficha-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; margin: 14px 0 4px; }
.ficha-kv div { min-width: 0; }
.ficha-kv dt { font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.ficha-kv dd { margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ficha-sec { margin-top: 18px; }
.ficha-sec h2 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.ficha table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ficha th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); font-weight: 650; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); }
.ficha td { padding: 7px 8px 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.ficha td.nw { white-space: nowrap; overflow-wrap: normal; }

@media print {
  body { background: #fff; }
  .topbar, .offline-bar, .drawer-wrap, .no-print, .toast { display: none !important; }
  main { padding: 0; }
  .card { box-shadow: none; padding: 0; }
  .ficha-sec { break-inside: avoid; }
}
