/* Pet Company — visual "aurora + vidro + granulado". Fontes próprias (OFL), sem CDN. */
@font-face {
  font-family: "Bricolage";
  src: url("/fonts/bricolage.woff2") format("woff2-variations"), url("/fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Jakarta";
  src: url("/fonts/jakarta.woff2") format("woff2-variations"), url("/fonts/jakarta.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --paper: #f4f1ea;
  --ink: #10201e;
  --muted: #5d6d6a;
  --line: rgb(16 32 30 / 0.09);
  --glass: rgb(255 255 255 / 0.62);
  --glass-strong: rgb(255 255 255 / 0.84);
  --glass-edge: rgb(255 255 255 / 0.8);
  --field: rgb(255 255 255 / 0.7);
  --brand: #0b6b63;
  --brand-2: #14b8a6;
  --mint: #2dd4bf;
  --on-brand: #ffffff;
  --coral: #ff7a59;
  --sun: #f5b942;
  --start: #2563eb;
  --finish: #15803d;
  --danger: #d92d20;
  --wa: #128c4b;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --paws: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cg transform='translate%2840 48%29 rotate%28-18%29 scale%281.25%29' fill='%230b6b63' fill-opacity='.06'%3E%3Cellipse cx='-7' cy='-4' rx='2.6' ry='3.3' transform='rotate%28-20 -7 -4%29'/%3E%3Cellipse cx='-2.5' cy='-8.5' rx='2.7' ry='3.5'/%3E%3Cellipse cx='2.5' cy='-8.5' rx='2.7' ry='3.5'/%3E%3Cellipse cx='7' cy='-4' rx='2.6' ry='3.3' transform='rotate%2820 7 -4%29'/%3E%3Cpath d='M0 -2c-4 0-8 4.5-8 8 0 2.6 2 4 4 4 1.6 0 2.4-.8 4-.8s2.4.8 4 .8c2 0 4-1.4 4-4 0-3.5-4-8-8-8z'/%3E%3C/g%3E%3Cg transform='translate%28150 92%29 rotate%2822%29 scale%281.0%29' fill='%230b6b63' fill-opacity='.06'%3E%3Cellipse cx='-7' cy='-4' rx='2.6' ry='3.3' transform='rotate%28-20 -7 -4%29'/%3E%3Cellipse cx='-2.5' cy='-8.5' rx='2.7' ry='3.5'/%3E%3Cellipse cx='2.5' cy='-8.5' rx='2.7' ry='3.5'/%3E%3Cellipse cx='7' cy='-4' rx='2.6' ry='3.3' transform='rotate%2820 7 -4%29'/%3E%3Cpath d='M0 -2c-4 0-8 4.5-8 8 0 2.6 2 4 4 4 1.6 0 2.4-.8 4-.8s2.4.8 4 .8c2 0 4-1.4 4-4 0-3.5-4-8-8-8z'/%3E%3C/g%3E%3Cg transform='translate%2878 170%29 rotate%288%29 scale%281.1%29' fill='%230b6b63' fill-opacity='.06'%3E%3Cellipse cx='-7' cy='-4' rx='2.6' ry='3.3' transform='rotate%28-20 -7 -4%29'/%3E%3Cellipse cx='-2.5' cy='-8.5' rx='2.7' ry='3.5'/%3E%3Cellipse cx='2.5' cy='-8.5' rx='2.7' ry='3.5'/%3E%3Cellipse cx='7' cy='-4' rx='2.6' ry='3.3' transform='rotate%2820 7 -4%29'/%3E%3Cpath d='M0 -2c-4 0-8 4.5-8 8 0 2.6 2 4 4 4 1.6 0 2.4-.8 4-.8s2.4.8 4 .8c2 0 4-1.4 4-4 0-3.5-4-8-8-8z'/%3E%3C/g%3E%3Cg transform='translate%28196 196%29 rotate%28-30%29 scale%280.8%29' fill='%230b6b63' fill-opacity='.06'%3E%3Cellipse cx='-7' cy='-4' rx='2.6' ry='3.3' transform='rotate%28-20 -7 -4%29'/%3E%3Cellipse cx='-2.5' cy='-8.5' rx='2.7' ry='3.5'/%3E%3Cellipse cx='2.5' cy='-8.5' rx='2.7' ry='3.5'/%3E%3Cellipse cx='7' cy='-4' rx='2.6' ry='3.3' transform='rotate%2820 7 -4%29'/%3E%3Cpath d='M0 -2c-4 0-8 4.5-8 8 0 2.6 2 4 4 4 1.6 0 2.4-.8 4-.8s2.4.8 4 .8c2 0 4-1.4 4-4 0-3.5-4-8-8-8z'/%3E%3C/g%3E%3C/svg%3E");
  --aurora-1: rgb(45 212 191 / 0.38);
  --aurora-2: rgb(255 176 110 / 0.36);
  --aurora-3: rgb(120 160 255 / 0.22);
  --shadow: inset 0 1px 0 rgb(255 255 255 / 0.75), 0 1px 2px rgb(16 32 30 / 0.05), 0 18px 40px -22px rgb(16 32 30 / 0.28);
  --radius: 22px;
  --display: "Bricolage", "Jakarta", system-ui, sans-serif;
  --text: "Jakarta", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0a1110;
    --ink: #e9f2f0;
    --muted: #94a7a3;
    --line: rgb(255 255 255 / 0.08);
    --glass: rgb(20 31 30 / 0.58);
    --glass-strong: rgb(22 34 33 / 0.86);
    --glass-edge: rgb(255 255 255 / 0.07);
    --field: rgb(255 255 255 / 0.05);
    --brand: #2dd4bf;
    --brand-2: #5eead4;
    --on-brand: #032521;
    --start: #6b9bff;
    --finish: #3ecf72;
    --danger: #ff6b5e;
    --wa: #25d366;
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    --paws: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cg transform='translate%2840 48%29 rotate%28-18%29 scale%281.25%29' fill='%23ffffff' fill-opacity='.035'%3E%3Cellipse cx='-7' cy='-4' rx='2.6' ry='3.3' transform='rotate%28-20 -7 -4%29'/%3E%3Cellipse cx='-2.5' cy='-8.5' rx='2.7' ry='3.5'/%3E%3Cellipse cx='2.5' cy='-8.5' rx='2.7' ry='3.5'/%3E%3Cellipse cx='7' cy='-4' rx='2.6' ry='3.3' transform='rotate%2820 7 -4%29'/%3E%3Cpath d='M0 -2c-4 0-8 4.5-8 8 0 2.6 2 4 4 4 1.6 0 2.4-.8 4-.8s2.4.8 4 .8c2 0 4-1.4 4-4 0-3.5-4-8-8-8z'/%3E%3C/g%3E%3Cg transform='translate%28150 92%29 rotate%2822%29 scale%281.0%29' fill='%23ffffff' fill-opacity='.035'%3E%3Cellipse cx='-7' cy='-4' rx='2.6' ry='3.3' transform='rotate%28-20 -7 -4%29'/%3E%3Cellipse cx='-2.5' cy='-8.5' rx='2.7' ry='3.5'/%3E%3Cellipse cx='2.5' cy='-8.5' rx='2.7' ry='3.5'/%3E%3Cellipse cx='7' cy='-4' rx='2.6' ry='3.3' transform='rotate%2820 7 -4%29'/%3E%3Cpath d='M0 -2c-4 0-8 4.5-8 8 0 2.6 2 4 4 4 1.6 0 2.4-.8 4-.8s2.4.8 4 .8c2 0 4-1.4 4-4 0-3.5-4-8-8-8z'/%3E%3C/g%3E%3Cg transform='translate%2878 170%29 rotate%288%29 scale%281.1%29' fill='%23ffffff' fill-opacity='.035'%3E%3Cellipse cx='-7' cy='-4' rx='2.6' ry='3.3' transform='rotate%28-20 -7 -4%29'/%3E%3Cellipse cx='-2.5' cy='-8.5' rx='2.7' ry='3.5'/%3E%3Cellipse cx='2.5' cy='-8.5' rx='2.7' ry='3.5'/%3E%3Cellipse cx='7' cy='-4' rx='2.6' ry='3.3' transform='rotate%2820 7 -4%29'/%3E%3Cpath d='M0 -2c-4 0-8 4.5-8 8 0 2.6 2 4 4 4 1.6 0 2.4-.8 4-.8s2.4.8 4 .8c2 0 4-1.4 4-4 0-3.5-4-8-8-8z'/%3E%3C/g%3E%3Cg transform='translate%28196 196%29 rotate%28-30%29 scale%280.8%29' fill='%23ffffff' fill-opacity='.035'%3E%3Cellipse cx='-7' cy='-4' rx='2.6' ry='3.3' transform='rotate%28-20 -7 -4%29'/%3E%3Cellipse cx='-2.5' cy='-8.5' rx='2.7' ry='3.5'/%3E%3Cellipse cx='2.5' cy='-8.5' rx='2.7' ry='3.5'/%3E%3Cellipse cx='7' cy='-4' rx='2.6' ry='3.3' transform='rotate%2820 7 -4%29'/%3E%3Cpath d='M0 -2c-4 0-8 4.5-8 8 0 2.6 2 4 4 4 1.6 0 2.4-.8 4-.8s2.4.8 4 .8c2 0 4-1.4 4-4 0-3.5-4-8-8-8z'/%3E%3C/g%3E%3C/svg%3E");
    --aurora-1: rgb(45 212 191 / 0.2);
    --aurora-2: rgb(255 140 90 / 0.12);
    --aurora-3: rgb(90 120 255 / 0.14);
    --shadow: inset 0 1px 0 rgb(255 255 255 / 0.05), 0 18px 40px -22px rgb(0 0 0 / 0.7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 var(--text);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
}
/* Aurora: manchas de cor desfocadas, fixas atrás do conteúdo. */
body::before {
  content: "";
  position: fixed;
  inset: -20vmax;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(38vmax 30vmax at 12% 8%, var(--aurora-1), transparent 70%),
    radial-gradient(34vmax 28vmax at 92% 18%, var(--aurora-2), transparent 70%),
    radial-gradient(40vmax 34vmax at 70% 96%, var(--aurora-3), transparent 70%);
  filter: blur(20px);
  animation: drift 28s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate3d(2vmax, -1.5vmax, 0) rotate(4deg); } }
/* Granulado: textura de papel desenhada no próprio fundo (sem camada sobreposta, que gera emendas ao rolar). */
html { background: var(--paws), var(--grain), var(--paper); }
body { background: transparent; }

#app { max-width: 920px; margin: 0 auto; padding: 0 16px 40px; }
h1, h2, h3, .brand, .hero-label, .kpis b { font-family: var(--display); letter-spacing: -0.02em; }
h1, h2, h3 { margin: 0; line-height: 1.15; font-weight: 700; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.12rem; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.center { text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.loading { padding: 64px 0; text-align: center; color: var(--muted); }
.brand { font-weight: 800; color: var(--brand); font-size: 1.05rem; }
b, strong { font-weight: 700; }

/* ---------- superfícies de vidro ---------- */
.card {
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.warn {
  background: linear-gradient(135deg, rgb(255 196 120 / 0.28), rgb(255 122 89 / 0.12)), var(--glass);
  border-color: rgb(255 170 100 / 0.45);
}
.inactive { opacity: 0.55; }

/* ---------- formulários ---------- */
label { display: flex; flex-direction: column; gap: 6px; font-size: 0.82rem; color: var(--muted); font-weight: 600; letter-spacing: 0.01em; }
label.check { flex-direction: row; align-items: center; gap: 10px; color: var(--ink); font-weight: 500; font-size: 0.95rem; }
input, select {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 14px;
  min-height: 48px;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
input::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
input:focus, select:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--mint) 28%, transparent); background: var(--glass-strong); }
input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; min-height: 0; padding: 0; accent-color: var(--brand); flex: none; }
button:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--mint) 60%, transparent); outline-offset: 2px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-size: 0.82rem; color: var(--muted); font-weight: 600; margin-bottom: 8px; padding: 0; }
fieldset.seg { display: flex; gap: 6px; padding: 4px; border-radius: 16px; background: var(--field); border: 1px solid var(--line); width: fit-content; max-width: 100%; flex-wrap: wrap; }
fieldset.seg label { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; font-size: 0.9rem; padding: 8px 14px; border-radius: 12px; cursor: pointer; }
fieldset.seg label:has(input:checked) { background: var(--glass-strong); box-shadow: var(--shadow); color: var(--brand); }
fieldset.seg input { width: 16px; height: 16px; }

/* ---------- botões ---------- */
button, .btn {
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 14px;
  padding: 11px 18px;
  min-height: 46px;
  border: 1px solid var(--line);
  background: var(--glass-strong);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.1s ease, filter 0.15s ease, box-shadow 0.15s ease;
}
button:disabled { opacity: 0.55; cursor: progress; }
button:active:not(:disabled), .btn:active { transform: scale(0.97); }
@media (hover: hover) { button:hover:not(:disabled), .btn:hover { filter: brightness(1.05); } }
.primary {
  background: linear-gradient(160deg, var(--brand-2), var(--brand));
  border-color: transparent;
  color: var(--on-brand);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.3), 0 10px 24px -10px color-mix(in srgb, var(--brand) 80%, transparent);
}
.ghost { background: color-mix(in srgb, var(--glass-strong) 60%, transparent); }
.slim { min-height: 38px; padding: 7px 14px; font-size: 0.85rem; border-radius: 12px; }
.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.wa {
  background: linear-gradient(160deg, #22c55e, var(--wa));
  border-color: transparent;
  color: #fff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.3), 0 10px 22px -12px rgb(18 140 75 / 0.9);
}
@media (prefers-color-scheme: dark) { .wa { color: #04220f; } }
.big { width: 100%; min-height: 66px; font-size: 1.15rem; font-family: var(--display); letter-spacing: -0.01em; border: 0; color: #fff; border-radius: 18px; margin-top: 6px; }
.big.start { background: linear-gradient(160deg, #4f86ff, #1d4ed8); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.3), 0 14px 28px -14px #1d4ed8; }
.big.finish { background: linear-gradient(160deg, #34d27a, #15803d); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.3), 0 14px 28px -14px #15803d; }

/* ---------- topo e navegação ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin: 0 -16px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--paper) 70%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo { border-radius: 13px; display: block; box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--brand) 90%, transparent); }
.hello { font-size: 0.9rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hello b { color: var(--ink); }
.role { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--brand); background: color-mix(in srgb, var(--mint) 18%, transparent); padding: 2px 8px; border-radius: 999px; margin-left: 4px; }

.tabs {
  display: flex; gap: 4px; padding: 5px; margin: 14px 0 18px;
  background: var(--glass); border: 1px solid var(--glass-edge); border-radius: 18px; box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  overflow-x: auto; scrollbar-width: none;
}
.tabs button { border: 0; background: transparent; color: var(--muted); font-weight: 600; min-height: 42px; padding: 8px 14px; border-radius: 13px; white-space: nowrap; box-shadow: none; }
.tabs button svg { width: 19px; height: 19px; }
.tabs button[aria-selected="true"] { background: var(--glass-strong); color: var(--brand); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.6), 0 4px 14px -6px rgb(16 32 30 / 0.3); }
.tabs .ts { display: none; }
main#view { display: flex; flex-direction: column; gap: 16px; padding-top: 14px; }
.tabs + main#view { padding-top: 0; }

/* Celular: barra de abas flutuante embaixo, como app. */
@media (max-width: 720px) {
  .tabs {
    position: fixed; z-index: 30; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom));
    margin: 0; padding: 6px; gap: 2px; border-radius: 24px; overflow: visible;
    background: var(--glass-strong);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.5), 0 20px 40px -12px rgb(16 32 30 / 0.45);
  }
  .tabs button { flex: 1 1 0; flex-direction: column; gap: 2px; padding: 7px 2px 6px; min-height: 56px; border-radius: 18px; font-size: 0.68rem; min-width: 0; }
  .tabs button svg { width: 22px; height: 22px; }
  .tabs .tl { display: none; }
  .tabs .ts { display: block; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .tabs button[aria-selected="true"] { background: linear-gradient(160deg, color-mix(in srgb, var(--mint) 26%, transparent), color-mix(in srgb, var(--brand) 14%, transparent)); box-shadow: none; }
  main#view.with-tabs { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  #toast { bottom: calc(100px + env(safe-area-inset-bottom)) !important; }
  .hello .role { display: none; }
}

/* ---------- entrada ---------- */
.auth { max-width: 420px; margin: 9vh auto 0; text-align: center; padding: 32px 22px; display: flex; flex-direction: column; gap: 10px; }
.auth form { text-align: left; margin-top: 8px; }
.auth h1 { font-size: 2.2rem; }
.auth-logo { margin: 0 auto 6px; border-radius: 22px; box-shadow: 0 18px 36px -14px color-mix(in srgb, var(--brand) 90%, transparent); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }

/* ---------- agenda ---------- */
.daynav { display: flex; gap: 8px; align-items: center; }
.daynav .grow { flex: 1; }
.daynav button { padding: 0 14px; font-size: 1.25rem; min-width: 48px; }
.daylabel { text-transform: capitalize; margin-top: -6px; font-weight: 600; }

.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.wday {
  flex-direction: column; gap: 2px; padding: 10px 4px; min-height: 64px;
  font-size: 0.76rem; font-weight: 600; color: var(--muted);
  background: var(--glass); border: 1px solid var(--glass-edge); border-radius: 18px; box-shadow: var(--shadow);
}
.wday b { font-family: var(--display); font-size: 0.9rem; color: var(--finish); }
.wday.full b { color: var(--danger); }
.wday.closed { opacity: 0.5; box-shadow: none; }
.wday.closed b { color: var(--muted); }
.wday.sel { background: linear-gradient(160deg, var(--brand-2), var(--brand)); color: color-mix(in srgb, var(--on-brand) 85%, transparent); border-color: transparent; box-shadow: 0 12px 24px -12px var(--brand); }
.wday.sel b { color: var(--on-brand); }
@media (max-width: 560px) {
  .week { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78px; overflow-x: auto; padding: 8px 16px 30px; margin: -4px -16px -22px; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; scrollbar-width: none; }
  .wday { scroll-snap-align: start; }
}

.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.kpis > div {
  background: var(--glass); border: 1px solid var(--glass-edge); border-radius: 20px; box-shadow: var(--shadow);
  padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; position: relative; overflow: hidden;
}
.kpis > div::before { content: ""; position: absolute; inset: auto -20% -60% auto; width: 90px; height: 90px; border-radius: 50%; background: var(--k, transparent); filter: blur(18px); opacity: 0.55; }
.kpis b { font-size: 1.7rem; line-height: 1.05; font-weight: 800; white-space: nowrap; }
.kpis b small { font-size: 0.55em; font-weight: 700; margin-left: 2px; color: var(--muted); }
.kpis span { font-size: 0.74rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.kpis > div:first-child { --k: var(--mint); }
.kpis .k-wait { --k: #94a3b8; }
.kpis .k-bath { --k: var(--start); }
.kpis .k-bath b { color: var(--start); }
.kpis .k-ready { --k: var(--finish); }
.kpis .k-ready b { color: var(--finish); }
.kpis > div:last-child:not(.k-ready) { --k: var(--sun); }
@media (max-width: 720px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.groomers { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.gcard { display: flex; flex-direction: column; gap: 8px; }
.gcard strong { font-family: var(--display); font-size: 1.15rem; }
.gcard.full { border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.gcard.off { opacity: 0.8; }
meter { width: 100%; height: 10px; border-radius: 999px; }
meter::-webkit-meter-bar { background: color-mix(in srgb, var(--muted) 18%, transparent); border: 0; border-radius: 999px; height: 10px; }
meter::-webkit-meter-optimum-value, meter::-webkit-meter-suboptimum-value { background: linear-gradient(90deg, var(--mint), var(--brand)); border-radius: 999px; }
meter::-webkit-meter-even-less-good-value { background: linear-gradient(90deg, var(--coral), var(--danger)); border-radius: 999px; }
meter::-moz-meter-bar { background: linear-gradient(90deg, var(--mint), var(--brand)); border-radius: 999px; }
.adjust summary { font-size: 0.86rem; font-weight: 700; color: var(--brand); cursor: pointer; list-style: none; }
.adjust summary::before { content: "⚙︎ "; }
.adjust form { margin-top: 10px; align-items: end; }
.adjust p { margin-top: 6px; }

.list { display: flex; flex-direction: column; gap: 10px; }
.list h2 { margin: 6px 2px 2px; }
.results { display: flex; flex-direction: column; gap: 6px; }
.result { flex-direction: column; align-items: flex-start; text-align: left; gap: 2px; width: 100%; font-weight: 500; }
.result b { font-family: var(--display); font-size: 1.05rem; }
.picked { color: var(--brand); font-weight: 600; }
.ok-box { border-color: color-mix(in srgb, var(--wa) 50%, transparent); background: linear-gradient(135deg, rgb(34 197 94 / 0.16), transparent 60%), var(--glass); display: flex; flex-direction: column; gap: 8px; animation: rise-in 0.35s ease-out; }
@keyframes rise-in { from { transform: translateY(8px); opacity: 0; } }

.appt { display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden; padding-left: 22px; }
.appt::before, .qcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--stripe, var(--line)); }
.appt-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.appt h3, .qcard h3 { font-size: 1.25rem; }
.s-agendado { --stripe: linear-gradient(#cbd5e1, #94a3b8); }
.s-em_banho { --stripe: linear-gradient(#7aa5ff, var(--start)); }
.s-pronto { --stripe: linear-gradient(#5be38d, var(--finish)); }
.s-entregue { --stripe: var(--line); opacity: 0.72; }
.s-cancelado { opacity: 0.45; }
.note { background: color-mix(in srgb, var(--field) 100%, transparent); border: 1px dashed var(--line); border-radius: 12px; padding: 8px 12px; font-size: 0.9rem; }

.badges { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 0.74rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; letter-spacing: 0.01em; background: var(--field); border: 1px solid var(--line); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.b-agendado { color: #64748b; }
.b-em_banho { color: var(--start); background: color-mix(in srgb, var(--start) 12%, transparent); }
.b-em_banho::before { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--start) 25%, transparent); } }
.b-pronto { color: var(--finish); background: color-mix(in srgb, var(--finish) 13%, transparent); }
.b-entregue { color: var(--muted); }
.b-cancelado { color: var(--danger); }
.b-late { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.b-discount { color: #c2410c; background: color-mix(in srgb, var(--coral) 16%, transparent); }
.b-discount::before { display: none; }
@media (prefers-color-scheme: dark) { .b-discount { color: #ffb38f; } .b-agendado { color: #a5b4c8; } }

/* ---------- fila do banhista ---------- */
.summary { font-family: var(--display); font-size: 1.15rem; }
.queue { display: flex; flex-direction: column; gap: 14px; }
.qcard { display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; padding-left: 24px; }
.qcard h3 { font-size: 1.55rem; }

/* ---------- clientes, lembretes, lotação ---------- */
.history { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
details summary { cursor: pointer; font-weight: 700; }
.offer { border-color: color-mix(in srgb, var(--coral) 45%, transparent); background: linear-gradient(135deg, rgb(255 122 89 / 0.16), transparent 60%), var(--glass); }
fieldset.days { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.narrow { max-width: 240px; }
fieldset.weekcap { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
fieldset.weekcap input { padding: 8px 4px; text-align: center; font-family: var(--display); font-weight: 700; }
fieldset.weekcap input:disabled { opacity: 0.45; }
@media (max-width: 560px) { fieldset.weekcap { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.dates { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.dates li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.discount { font-weight: 800; color: #c2410c; }
@media (prefers-color-scheme: dark) { .discount { color: #ffb38f; } }

#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50;
  background: color-mix(in srgb, var(--ink) 92%, transparent); color: var(--paper);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  padding: 12px 18px; border-radius: 16px; font-weight: 600;
  max-width: calc(100% - 32px); box-shadow: 0 16px 36px -12px rgb(0 0 0 / 0.45);
  animation: rise-in 0.25s ease-out;
}
#toast.bad { background: var(--danger); color: #fff; }

/* ---------- página do tutor ---------- */
.track-body { background: transparent; }
.track { max-width: 480px; margin: 0 auto; padding: calc(24px + env(safe-area-inset-top)) 16px 40px; display: flex; flex-direction: column; gap: 22px; }
.track-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.track-brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 800; color: var(--brand); padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--shadow); }
.track-brand img { border-radius: 10px; }
.track-head h1 { font-size: 2.8rem; letter-spacing: -0.035em; font-weight: 800; }
.cap::first-letter { text-transform: uppercase; }
.center-img { margin: 0 auto; border-radius: 16px; }

.avatar { position: relative; width: 132px; height: 132px; margin: 8px auto 0; display: grid; place-items: center; }
.avatar svg { position: absolute; inset: 0; }
.ring-bg { stroke: color-mix(in srgb, var(--muted) 18%, transparent); }
.ring-fg { animation: ring-in 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes ring-in { from { stroke-dashoffset: 339.3; } }
.initial {
  width: 98px; height: 98px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: 2.8rem; color: #fff;
  background: radial-gradient(circle at 30% 25%, #5eead4, var(--brand) 70%);
  box-shadow: inset 0 2px 0 rgb(255 255 255 / 0.35), inset 0 -10px 20px rgb(0 0 0 / 0.15), 0 14px 30px -12px var(--brand);
}
.avatar.s-pronto .initial { background: radial-gradient(circle at 30% 25%, #86efac, #15803d 70%); }
.avatar.s-em_banho .initial { background: radial-gradient(circle at 30% 25%, #93c5fd, #1d4ed8 70%); }
.avatar.s-cancelado .initial { background: radial-gradient(circle at 30% 25%, #cbd5e1, #64748b 70%); }
.paw { position: absolute; right: 4px; bottom: 6px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 1.1rem; background: var(--glass-strong); border: 1px solid var(--glass-edge); box-shadow: var(--shadow); }

.status-hero { position: relative; overflow: hidden; isolation: isolate; text-align: center; display: flex; flex-direction: column; gap: 6px; padding: 26px 20px; }
.hero-icon { font-size: 3rem; line-height: 1; position: relative; display: inline-block; margin: 0 auto 2px; }
.hero-label { font-size: 1.9rem; font-weight: 800; }
.status-em_banho { background: linear-gradient(150deg, rgb(37 99 235 / 0.14), transparent 65%), var(--glass); border-color: color-mix(in srgb, var(--start) 35%, transparent); }
.status-em_banho .hero-label { color: var(--start); }
.status-em_banho .hero-icon { animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-5px) rotate(-3deg); } }
.status-pronto { background: linear-gradient(150deg, rgb(22 163 74 / 0.16), transparent 65%), var(--glass); border-color: color-mix(in srgb, var(--finish) 40%, transparent); }
.status-pronto .hero-label { color: var(--finish); }
.status-pronto .hero-icon { animation: pop 0.6s ease-out; }
@keyframes pop { 0% { transform: scale(0.4); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
.status-cancelado .hero-label { color: var(--danger); }
.bubbles i { position: absolute; bottom: 70%; width: 10px; height: 10px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--start) 60%, transparent); animation: rise 2.6s ease-in infinite; opacity: 0; }
.bubbles i:nth-child(1) { left: 10%; }
.bubbles i:nth-child(2) { left: 55%; animation-delay: 0.9s; width: 7px; height: 7px; }
.bubbles i:nth-child(3) { left: 85%; animation-delay: 1.7s; }
@keyframes rise { 10% { opacity: 1; } 100% { transform: translateY(-46px); opacity: 0; } }
.celebrate::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-repeat: no-repeat;
  background-image:
    radial-gradient(circle, #f5b942 0 4px, transparent 5px), radial-gradient(circle, #2dd4bf 0 4px, transparent 5px),
    radial-gradient(circle, #ff7a59 0 3px, transparent 4px), radial-gradient(circle, #4f86ff 0 4px, transparent 5px),
    radial-gradient(circle, #f5b942 0 3px, transparent 4px), radial-gradient(circle, #2dd4bf 0 3px, transparent 4px),
    radial-gradient(circle, #ff7a59 0 4px, transparent 5px), radial-gradient(circle, #4f86ff 0 3px, transparent 4px);
  background-size: 12px 12px;
  background-position: 8% 10%, 22% 4%, 38% 14%, 61% 6%, 76% 16%, 90% 8%, 14% 24%, 84% 26%;
  animation: confetti 2.2s ease-in forwards;
}
@keyframes confetti { 0% { transform: translateY(-20%); opacity: 1; } 100% { transform: translateY(85%); opacity: 0; } }

.steps { list-style: none; margin: 0; padding: 18px 20px; display: flex; flex-direction: column; background: var(--glass); border: 1px solid var(--glass-edge); border-radius: var(--radius); box-shadow: var(--shadow); }
.steps li { display: flex; gap: 14px; align-items: center; padding: 10px 0; color: var(--muted); position: relative; }
.steps li + li::before { content: ""; position: absolute; left: 9px; top: -12px; height: 24px; width: 2px; border-radius: 2px; background: var(--line); }
.steps li.done + li::before, .steps li.done + li.current::before { background: linear-gradient(var(--finish), var(--mint)); }
.steps .dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); background: var(--glass-strong); flex: none; }
.steps li.done, .steps li.current { color: var(--ink); }
.steps li.done .dot { background: var(--finish); border-color: var(--finish); box-shadow: inset 0 0 0 4px var(--glass-strong); }
.steps li.current .dot { background: var(--brand-2); border-color: var(--brand-2); box-shadow: 0 0 0 6px color-mix(in srgb, var(--mint) 25%, transparent); animation: pulse-ring 2s ease-in-out infinite; }
@keyframes pulse-ring { 50% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--mint) 10%, transparent); } }
.steps small { color: var(--muted); font-weight: 600; }
.center-actions { justify-content: center; }
.center-actions .btn { flex: 1 1 160px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- cara de petshop ---------- */
.grow { flex: 1; min-width: 0; }
.appt-head { align-items: center; }
.pet-av {
  flex: none; border-radius: 50%; padding: 4px;
  background: radial-gradient(circle at 35% 30%, #fff, #fff3e4 70%);
  border: 3px solid var(--ring, #e2e8f0);
  box-shadow: 0 6px 14px -8px rgb(120 70 20 / 0.45);
}
.s-agendado .pet-av { --ring: #cbd5e1; }
.s-em_banho .pet-av { --ring: #7aa5ff; animation: wiggle 2.2s ease-in-out infinite; }
.s-pronto .pet-av { --ring: #5be38d; }
.s-entregue .pet-av { --ring: var(--line); }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
@media (prefers-color-scheme: dark) { .pet-av { background: radial-gradient(circle at 35% 30%, #fff8ef, #f3dcc2 70%); } }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 28px 18px; color: var(--muted); font-weight: 600; }
.empty img { animation: float 5s ease-in-out infinite; filter: drop-shadow(0 10px 12px rgb(120 70 20 / 0.18)); }

.kpis i { font-style: normal; font-size: 1.15rem; line-height: 1; margin-bottom: 4px; }

/* Mascotes espiando por cima do cartão de entrada */
.auth { position: relative; margin-top: 14vh; overflow: visible; }
.peek { position: absolute; top: -62px; filter: drop-shadow(0 10px 14px rgb(120 70 20 / 0.25)); pointer-events: none; }
.peek-dog { left: 18px; transform: rotate(-10deg); animation: peek-l 5s ease-in-out infinite; }
.peek-cat { right: 22px; top: -56px; transform: rotate(9deg); animation: peek-r 6s ease-in-out infinite; }
@keyframes peek-l { 50% { transform: rotate(-4deg) translateY(-4px); } }
@keyframes peek-r { 50% { transform: rotate(4deg) translateY(-3px); } }

/* Página do tutor: o próprio bichinho no centro do anel */
.initial { background: radial-gradient(circle at 35% 30%, #ffffff, #fff1df 75%); overflow: hidden; }
.initial img { display: block; margin-top: 6px; }
.avatar.s-em_banho .initial { background: radial-gradient(circle at 35% 30%, #ffffff, #dbe8ff 75%); }
.avatar.s-em_banho .initial img { animation: wiggle 2.2s ease-in-out infinite; }
.avatar.s-pronto .initial { background: radial-gradient(circle at 35% 30%, #ffffff, #d9f7e4 75%); }
.avatar.s-cancelado .initial { background: radial-gradient(circle at 35% 30%, #ffffff, #e5e7eb 75%); filter: grayscale(0.6); }
.paw { font-size: 1rem; }

/* Linha do tempo com patinhas */
.steps .dot { width: 24px; height: 24px; background-repeat: no-repeat; background-position: center; background-size: 15px; }
.steps li.done .dot, .steps li.current .dot { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-12 -14 24 26'%3E%3Cg transform='translate%280 0%29 rotate%280%29 scale%281%29' fill='%23ffffff' fill-opacity='1'%3E%3Cellipse cx='-7' cy='-4' rx='2.6' ry='3.3' transform='rotate%28-20 -7 -4%29'/%3E%3Cellipse cx='-2.5' cy='-8.5' rx='2.7' ry='3.5'/%3E%3Cellipse cx='2.5' cy='-8.5' rx='2.7' ry='3.5'/%3E%3Cellipse cx='7' cy='-4' rx='2.6' ry='3.3' transform='rotate%2820 7 -4%29'/%3E%3Cpath d='M0 -2c-4 0-8 4.5-8 8 0 2.6 2 4 4 4 1.6 0 2.4-.8 4-.8s2.4.8 4 .8c2 0 4-1.4 4-4 0-3.5-4-8-8-8z'/%3E%3C/g%3E%3C/svg%3E"); box-shadow: none; }
.steps li.done .dot { background-color: var(--finish); }
.steps li.current .dot { background-color: var(--brand-2); box-shadow: 0 0 0 6px color-mix(in srgb, var(--mint) 25%, transparent); }
.steps li + li::before { left: 11px; }

/* ---------- produto para qualquer petshop: WhatsApp, ajustes e agendamento pelo tutor ---------- */
textarea {
  font: inherit; font-size: 0.95rem; color: var(--ink); background: var(--field);
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; width: 100%; resize: vertical; line-height: 1.45;
}
textarea:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--mint) 28%, transparent); background: var(--glass-strong); }
.bubble {
  display: block; white-space: pre-wrap; font-size: 0.92rem; font-weight: 500; color: #12261f; line-height: 1.45;
  background: #dcf8c6; border-radius: 14px 14px 14px 4px; padding: 10px 12px; box-shadow: 0 2px 6px -3px rgb(0 0 0 / 0.2);
}
@media (prefers-color-scheme: dark) { .bubble { background: #144d37; color: #e7fbe9; } }
.preview { margin-top: 4px; }
.b-link { color: #7c3aed; background: color-mix(in srgb, #7c3aed 12%, transparent); }
.b-link::before { display: none; }
@media (prefers-color-scheme: dark) { .b-link { color: #c4a5ff; } }
.kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 720px) { .kpis-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cta { min-height: 58px; font-size: 1.05rem; font-family: var(--display); border-radius: 18px; }

.subnav { display: flex; gap: 6px; padding: 4px; border-radius: 16px; background: var(--field); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.subnav button { flex: 1 0 auto; border: 0; background: transparent; box-shadow: none; min-height: 40px; color: var(--muted); }
.subnav button[aria-selected="true"] { background: var(--glass-strong); color: var(--brand); box-shadow: var(--shadow); }

.seq .seq-pet { display: flex; align-items: center; gap: 16px; }
.seq h2 { font-size: 1.6rem; }
.seq .big { color: #fff; }
progress { width: 100%; height: 8px; appearance: none; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--muted) 18%, transparent); overflow: hidden; }
progress::-webkit-progress-bar { background: transparent; }
progress::-webkit-progress-value { background: linear-gradient(90deg, var(--mint), var(--brand)); border-radius: 999px; }
progress::-moz-progress-bar { background: linear-gradient(90deg, var(--mint), var(--brand)); border-radius: 999px; }
.seq-done h2 { font-size: 1.5rem; }

/* Página de agendamento do tutor */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { flex-direction: row; cursor: pointer; }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill span {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 46px; padding: 8px 16px; border-radius: 14px; font-weight: 700; color: var(--ink);
  background: var(--glass-strong); border: 1.5px solid var(--line); transition: all 0.15s ease;
}
.pill input:checked + span { background: linear-gradient(160deg, var(--brand-2), var(--brand)); color: var(--on-brand); border-color: transparent; box-shadow: 0 10px 22px -12px var(--brand); }
.pill input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--mint) 60%, transparent); outline-offset: 2px; }
.day-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 8px; }
.day-pill span { width: 100%; min-height: 62px; }
.day-pill small { font-size: 0.72rem; font-weight: 600; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.04em; }
.day-pill b { font-family: var(--display); font-size: 1.1rem; }
.big-book { min-height: 60px; font-size: 1.1rem; font-family: var(--display); border-radius: 18px; }
.status-agendado .hero-label { color: var(--brand); }

/* Código de recuperação, link discreto e aviso de novidade na aba */
.code { font-family: var(--display); font-size: 1.7rem; font-weight: 800; letter-spacing: 0.08em; text-align: center; padding: 14px; border-radius: 16px; background: var(--field); border: 2px dashed color-mix(in srgb, var(--brand) 45%, transparent); color: var(--brand); user-select: all; }
button.link { background: none; border: 0; box-shadow: none; color: var(--brand); font-weight: 600; min-height: 36px; text-decoration: underline; text-underline-offset: 3px; }
.tabs button.dot { position: relative; }
.tabs button.dot::after { content: ""; position: absolute; top: 8px; right: calc(50% - 18px); width: 9px; height: 9px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 2px var(--glass-strong); }
.undo { align-self: flex-start; margin-top: 2px; }
.resched summary::before { content: "🔁 "; }

/* ---------- WhatsApp: conversas, envios e simulador ---------- */
.wa-on { border-color: color-mix(in srgb, var(--wa) 45%, transparent); background: linear-gradient(135deg, rgb(37 211 102 / 0.12), transparent 60%), var(--glass); font-size: 0.9rem; }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--coral); color: #fff; font-size: 0.72rem; font-weight: 800; }
.convo { gap: 4px; }
.convo .appt-head { width: 100%; }
.chat { display: flex; flex-direction: column; gap: 8px; max-height: 55vh; overflow-y: auto; padding: 10px; border-radius: 16px; background: color-mix(in srgb, #d9cbb5 22%, var(--field)); }
@media (prefers-color-scheme: dark) { .chat { background: color-mix(in srgb, #0b141a 80%, var(--field)); } }
.msg { max-width: 82%; white-space: pre-wrap; word-break: break-word; padding: 8px 12px; border-radius: 14px; font-size: 0.93rem; line-height: 1.4; box-shadow: 0 1px 2px rgb(0 0 0 / 0.12); }
.msg.in { align-self: flex-start; background: var(--glass-strong); border-top-left-radius: 4px; }
.msg.out { align-self: flex-end; background: #dcf8c6; color: #12261f; border-top-right-radius: 4px; }
@media (prefers-color-scheme: dark) { .msg.out { background: #144d37; color: #e7fbe9; } }
.msg .who { display: block; font-size: 0.7rem; font-weight: 700; opacity: 0.65; margin-bottom: 2px; }
.msg .err { display: block; font-size: 0.75rem; color: var(--danger); margin-top: 4px; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; }
.chat-form textarea { flex: 1; }
.outbox { gap: 4px; display: flex; flex-direction: column; }
@media (max-width: 560px) {
  .subnav { flex-wrap: wrap; overflow-x: visible; }
  .subnav button { flex: 1 1 auto; padding: 8px 10px; font-size: 0.85rem; }
}

/* ---------- Editor de fluxos ---------- */
.flow-step { display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; padding-left: 22px; }
.flow-step::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--step, var(--line)); }
.flow-step.loose { opacity: 0.7; border-style: dashed; }
.t-start { --step: linear-gradient(var(--mint), var(--brand)); }
.t-message, .t-collect { --step: #94a3b8; }
.t-menu, .t-condition { --step: var(--sun); }
.t-agendar, .t-status { --step: linear-gradient(#5be38d, var(--finish)); }
.t-ai { --step: linear-gradient(#c4a5ff, #7c3aed); }
.t-human { --step: linear-gradient(#7aa5ff, var(--start)); }
.t-end { --step: var(--coral); }
.b-step { color: var(--ink); }
.b-step::before { display: none; }
.step-title { font-family: var(--display); font-weight: 700; font-size: 1.1rem; }
.opts .opt { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; }
.ports { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; border-top: 1px dashed var(--line); }
.port { flex-direction: column; gap: 4px; }
.port span { color: var(--ink); font-weight: 700; }
.flow-sim { border-color: color-mix(in srgb, var(--wa) 45%, transparent); }
.sim-note { align-self: center; max-width: 92%; text-align: center; font-size: 0.78rem; color: var(--muted); background: var(--glass-strong); border: 1px dashed var(--line); border-radius: 12px; padding: 6px 10px; }
.flow-warn summary { color: #b45309; }
.flow-warn ul { margin: 6px 0 0; padding-left: 18px; }
@media (prefers-color-scheme: dark) { .flow-warn summary { color: #fbbf24; } }
@media (min-width: 900px) {
  .flow-sim { position: sticky; top: 90px; z-index: 4; }
}
