/* =====================================================================
   Lazuli Pet Shop — estilos
   Mobile first · PC, tablet, iOS e Android
   ===================================================================== */
:root {
  /* Cores da marca (tiradas da logo) */
  --lz-950: #071330;
  --lz-900: #0C1D45;
  --lz-800: #143067;
  --lz-700: #1A3C82;
  --lz-600: #1F4A9A;
  --lz-500: #2F64C2;
  --lz-200: #C3D2F0;
  --lz-100: #E3EBF9;
  --lz-50:  #F1F5FC;
  --gold: #B48F82;      /* caramelo das orelhas */
  --gold-600: #96746A;
  --gold-100: #F6EFEC;
  --tan-light: #D8C2B9;
  --cyan: #1BA6D9;      /* azul dos olhos */

  --bg: #F4F6FB;
  --card: #FFFFFF;
  --text: #0F172A;
  --text-2: #334155;
  --muted: #64748B;
  --line: #E2E8F0;
  --line-2: #EEF2F7;

  --ok: #059669;   --ok-bg: #E7F7F0;
  --warn: #D97706; --warn-bg: #FEF3E2;
  --danger: #DC2626; --danger-bg: #FDECEC;
  --violet: #7C3AED; --violet-bg: #F1EBFE;
  --info: #2563EB; --info-bg: #E8F0FE;
  --slate: #64748B; --slate-bg: #EFF2F6;
  --rose: #9F1239; --rose-bg: #FCE7EE;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15,23,42,.05), 0 4px 14px rgba(15,23,42,.05);
  --shadow-md: 0 6px 24px rgba(15,23,42,.10);
  --shadow-lg: 0 24px 60px rgba(15,23,42,.22);

  --sidebar: 248px;
  --topbar: 58px;
  --bottomnav: 64px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--lz-600); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; }
code { background: rgba(255,255,255,.18); padding: 1px 6px; border-radius: 6px; font-size: 12px; }

svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 15px; height: 15px; }
svg.i.lg { width: 22px; height: 22px; }

/* ---------- Splash ---------- */
.splash { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 22px; background: var(--lz-900); z-index: 100; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(255,255,255,.2); border-top-color: var(--gold); animation: spin .8s linear infinite; }
.spinner.dark { border-color: var(--line); border-top-color: var(--lz-600); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Marca ---------- */
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none !important; }
.brand .brand-mark { border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.18); flex: none; }
.brand .brand-word { display: block; height: 30px; width: auto; }
.brand span { display: block; font-size: 10.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--tan-light); font-weight: 700; margin-top: 2px; padding-left: 2px; }
.topbar .brand .brand-word { height: 24px; }
.topbar .brand span { font-size: 8.5px; margin-top: 1px; }
.login-logo { width: 190px; height: auto; margin: 0 auto 4px; }
.splash img, .login-art img { border-radius: 22px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }

/* ---------- Login ---------- */
.login { position: fixed; inset: 0; display: grid; grid-template-columns: 1fr; background: var(--bg); overflow: auto; }
.login-art { display: none; }
.login-box { display: grid; place-items: center; padding: 24px 18px calc(24px + var(--safe-b)); min-height: 100%; }
.login-card { width: 100%; max-width: 400px; background: var(--card); border-radius: 20px; box-shadow: var(--shadow-md); padding: 28px 24px; display: grid; gap: 14px; }
.login-card h1 { margin: 4px 0 0; font-size: 24px; letter-spacing: -.02em; }
.login-card p { margin: 0; }
.login-demo { margin-top: 6px; padding: 14px; border-radius: 12px; background: var(--gold-100); border: 1px solid #E7D7D0; font-size: 13px; display: grid; gap: 10px; color: #5E4339; }
@media (min-width: 900px) {
  .login { grid-template-columns: 1.1fr 1fr; }
  .login-art {
    display: grid; place-items: center; color: #fff; padding: 48px; position: relative; overflow: hidden; isolation: isolate;
    background: linear-gradient(160deg, #2C7FD8 0%, #1F5DB4 45%, #173F8A 75%, #12306B 100%);
  }
  /* círculos grandes e suaves */
  .login-art::before, .login-art::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255,255,255,.07); z-index: -1; }
  .login-art::before { width: 62vh; height: 62vh; right: -18vh; top: -20vh; }
  .login-art::after { width: 46vh; height: 46vh; left: -16vh; bottom: -18vh; }
  .login-art-inner { max-width: 420px; display: grid; gap: 18px; position: relative; z-index: 1; }
  .login-art h2 { font-size: 38px; line-height: 1.12; margin: 8px 0 0; letter-spacing: -.03em; }
  .login-art p { color: var(--lz-200); font-size: 17px; margin: 0; }
  .login-box { background: #fff; }
  .login-card { box-shadow: none; background: transparent; }
}

/* ---------- Formulários ---------- */
.field { display: grid; gap: 6px; min-width: 0; }
.field > span, .label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field > span .req { color: var(--danger); }
.field small, .hint { font-size: 12px; color: var(--muted); line-height: 1.35; }
.input, .field input, .field select, .field textarea, .select {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: #fff; font-size: 16px; outline: none;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
.field select, select.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 34px;
}
.field textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus, .select:focus {
  border-color: var(--lz-500); box-shadow: 0 0 0 4px rgba(47,100,194,.14);
}
.field input:disabled, .field input[readonly] { background: var(--line-2); color: var(--muted); }
.field.invalid input, .field.invalid select { border-color: var(--danger); }
.field .err { color: var(--danger); font-size: 12px; }
@media (min-width: 768px) {
  .input, .field input, .field select, .field textarea, .select { font-size: 15px; }
}
.form-error { background: var(--danger-bg); color: var(--danger); padding: 10px 12px; border-radius: 10px; font-size: 14px; }

.grid { display: grid; gap: 14px; }
.g2, .g3, .g4 { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .g2 { grid-template-columns: 1fr 1fr; } .g3, .g4 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); } }
.span-2 { grid-column: 1 / -1; }
@media (min-width: 900px) { .g3 .span-2, .g4 .span-2 { grid-column: span 2; } }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: transparent; padding: 11px 10px; font-weight: 600; color: var(--muted); min-height: 44px; }
.seg button.on { background: var(--lz-800); color: #fff; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 14px; font-weight: 500; min-height: 36px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .tg { width: 40px; height: 24px; border-radius: 99px; background: #CBD5E1; position: relative; transition: background .2s; flex: none; }
.switch .tg::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + .tg { background: var(--lz-600); }
.switch input:checked + .tg::after { transform: translateX(16px); }
.switch input:focus-visible + .tg { box-shadow: 0 0 0 4px rgba(47,100,194,.2); }

.input-group { display: flex; gap: 8px; }
.input-group > .input, .input-group > input { flex: 1; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 9px 16px; border-radius: 11px; border: 1.5px solid transparent;
  font-weight: 650; font-size: 14px; white-space: nowrap; text-decoration: none !important;
  transition: background .15s, border-color .15s, transform .05s, box-shadow .15s;
  background: #fff; border-color: var(--line); color: var(--text-2);
}
.btn:active { transform: translateY(1px); }
.btn:hover { border-color: #CBD5E1; background: #FAFBFD; }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn-primary { background: var(--lz-600); border-color: var(--lz-600); color: #fff; box-shadow: 0 4px 14px rgba(31,74,154,.25); }
.btn-primary:hover { background: var(--lz-700); border-color: var(--lz-700); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #2A1A14; }
.btn-gold:hover { background: var(--gold-600); border-color: var(--gold-600); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { background: #047857; border-color: #047857; }
.btn-warn { background: var(--warn); border-color: var(--warn); color: #fff; }
.btn-warn:hover { background: #B45309; border-color: #B45309; }
.btn-violet { background: var(--violet); border-color: var(--violet); color: #fff; }
.btn-violet:hover { background: #6D28D9; border-color: #6D28D9; }
.btn-danger-soft { color: var(--danger); }
.btn-danger-soft:hover { background: var(--danger-bg); border-color: #F5C2C2; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-wa { background: #1FAF5A; border-color: #1FAF5A; color: #fff; }
.btn-wa:hover { background: #17924A; border-color: #17924A; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--line-2); border-color: transparent; }
.btn-link { background: none; border: 0; color: var(--lz-600); box-shadow: none; min-height: 36px; }
.btn-link:hover { background: none; text-decoration: underline; }
.btn-sm { min-height: 34px; padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.btn-lg { min-height: 50px; font-size: 16px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: inherit; flex: none; }
.icon-btn:hover { background: rgba(100,116,139,.12); }
.icon-btn.bordered { border: 1.5px solid var(--line); background: #fff; }

/* ---------- Estrutura ---------- */
.app { min-height: 100%; }
.sidebar { display: none; }
.main { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: calc(var(--topbar) + var(--safe-t)); padding: var(--safe-t) 12px 0 16px;
  display: flex; align-items: center; justify-content: space-between; background: var(--lz-900); color: #fff;
}
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.topbar .icon-btn:hover { background: rgba(255,255,255,.12); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--gold); color: #2A1A14; flex: none; border: 0; }
.avatar-btn { cursor: pointer; }
.demo-banner { background: var(--gold-100); color: #5E4339; font-size: 13px; padding: 8px 16px; border-bottom: 1px solid #E7D7D0; }
.demo-banner code { background: rgba(0,0,0,.06); }
.page { padding: 16px 14px calc(var(--bottomnav) + var(--safe-b) + 24px); outline: none; max-width: 1500px; margin: 0 auto; }

.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(var(--bottomnav) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line);
}
.bottomnav a { display: grid; place-items: center; align-content: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 600; text-decoration: none !important; }
.bottomnav a svg.i { width: 22px; height: 22px; }
.bottomnav a.on { color: var(--lz-600); }
.bottomnav a.on svg.i { stroke-width: 2.4; }

@media (min-width: 900px) {
  .app { display: grid; grid-template-columns: var(--sidebar) 1fr; }
  .topbar, .bottomnav { display: none; }
  .sidebar {
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 20px 14px;
    background: linear-gradient(180deg, var(--lz-900), var(--lz-950)); color: #fff;
  }
  .sidebar .brand { padding: 4px 8px 22px; }
  .nav { display: grid; gap: 4px; }
  .nav-item {
    display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 11px; color: #B9C4EC;
    font-weight: 600; text-decoration: none !important; border: 0; background: transparent; width: 100%; text-align: left;
  }
  .nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
  .nav-item.on { background: rgba(255,255,255,.10); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
  .nav-item .count { margin-left: auto; background: var(--gold); color: #2A1A14; font-size: 11px; padding: 1px 7px; border-radius: 99px; }
  .sidebar-foot { margin-top: auto; display: grid; gap: 8px; }
  .user-chip { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.06); }
  .user-meta { min-width: 0; flex: 1; }
  .user-meta strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .user-meta span { display: block; font-size: 11px; color: #9AA7D6; text-transform: capitalize; }
  .sidebar .icon-btn { color: #B9C4EC; }
  .sidebar .icon-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
  .page { padding: 26px 30px 40px; }
}

/* ---------- Cabeçalho de página ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.page-head h1 { margin: 0; font-size: 24px; letter-spacing: -.025em; font-weight: 800; }
.page-head .sub { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
@media (min-width: 900px) { .page-head h1 { font-size: 30px; } }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 600; font-size: 14px; margin-bottom: 8px; }

/* ---------- Cartões ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid rgba(226,232,240,.7); }
.card-pad { padding: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.card-head h3 { margin: 0; font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-body { padding: 16px 18px; }

.searchbar { position: relative; flex: 1; min-width: 220px; max-width: 520px; }
.searchbar svg.i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.searchbar input { padding-left: 40px; border-radius: 12px; }

/* ---------- Tabela / lista ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #FAFBFD; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { cursor: pointer; transition: background .12s; }
.table tbody tr:hover { background: var(--lz-50); }
.table .code { color: var(--muted); font-variant-numeric: tabular-nums; width: 80px; }
.person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person .avatar { background: var(--lz-100); color: var(--lz-700); }
.person strong { display: block; font-weight: 650; }
.person small { color: var(--muted); font-size: 12.5px; }

.list { display: grid; gap: 10px; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 14px; background: #fff; border-radius: 14px; border: 1px solid var(--line); cursor: pointer; text-align: left; width: 100%; }
.list-item:active { background: var(--lz-50); }
.list-item .grow { min-width: 0; }
.list-item strong { display: block; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item small { display: block; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.show-desk { display: none; }
@media (min-width: 900px) { .show-desk { display: block; } .show-mob { display: none !important; } }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: var(--lz-50); color: var(--lz-700); border: 1px solid var(--lz-100); white-space: nowrap; }
.chip.gold { background: var(--gold-100); color: #6E5146; border-color: #E7D7D0; }
.chip.gray { background: var(--line-2); color: var(--text-2); border-color: var(--line); }
.chip.red { background: var(--danger-bg); color: var(--danger); border-color: #F5C2C2; }
.chip button { border: 0; background: none; padding: 0; margin-left: 2px; color: inherit; opacity: .7; display: inline-grid; }
a.chip:hover { text-decoration: none; background: var(--lz-100); }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); display: grid; justify-items: center; gap: 8px; }
.empty .empty-ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--lz-50); color: var(--lz-600); font-size: 30px; margin-bottom: 4px; }
.empty h3 { margin: 0; color: var(--text); font-size: 17px; }
.empty p { margin: 0 0 8px; max-width: 360px; }

.loading { display: grid; place-items: center; padding: 50px; }

/* ---------- Status ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-agendado { --st: var(--slate); --st-bg: var(--slate-bg); }
.st-confirmado { --st: var(--info); --st-bg: var(--info-bg); }
.st-aguardando { --st: var(--warn); --st-bg: var(--warn-bg); }
.st-em_atendimento { --st: var(--violet); --st-bg: var(--violet-bg); }
.st-finalizado { --st: var(--ok); --st-bg: var(--ok-bg); }
.st-cancelado { --st: var(--danger); --st-bg: var(--danger-bg); }
.st-faltou { --st: var(--rose); --st-bg: var(--rose-bg); }
.badge[class*="st-"] { color: var(--st); background: var(--st-bg); }

/* ---------- Ficha do cliente ---------- */
.profile-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding: 20px; }
.profile-head .avatar { width: 64px; height: 64px; font-size: 22px; background: linear-gradient(135deg, var(--lz-600), var(--lz-800)); color: #fff; }
.profile-head h1 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.profile-head .meta { color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; }
.profile-head .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
@media (max-width: 599px) { .profile-head .actions { width: 100%; } .profile-head .actions .btn { flex: 1; } }
.ficha-grid { display: grid; gap: 16px; margin-top: 16px; grid-template-columns: 1fr; }
@media (min-width: 1100px) { .ficha-grid { grid-template-columns: 1fr 1.35fr; } }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 9px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 550; word-break: break-word; }
.contact-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.contact-row:last-child { border-bottom: 0; }
.contact-row .tipo { font-size: 12px; color: var(--muted); min-width: 84px; }
.contact-row .val { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.pets-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.pet-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 10px; background: #fff; position: relative; }
.pet-card.inativo { opacity: .6; }
.pet-top { display: flex; gap: 12px; align-items: center; }
.pet-ava { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; background: var(--gold-100); flex: none; }
.pet-top strong { font-size: 16px; display: block; }
.pet-top small { color: var(--muted); font-size: 13px; }
.pet-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pet-card .edit { position: absolute; top: 8px; right: 8px; }
.pet-add { border: 2px dashed var(--line); border-radius: 14px; display: grid; place-items: center; gap: 6px; min-height: 120px; color: var(--muted); background: transparent; font-weight: 600; }
.pet-add:hover { border-color: var(--lz-500); color: var(--lz-600); background: var(--lz-50); }

.hist-item { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.hist-item:last-child { border-bottom: 0; }
.hist-date { width: 52px; text-align: center; flex: none; border-radius: 10px; background: var(--lz-50); padding: 6px 0; }
.hist-date b { display: block; font-size: 18px; line-height: 1; color: var(--lz-700); }
.hist-date span { font-size: 11px; color: var(--muted); text-transform: uppercase; font-weight: 700; }

/* ---------- Modal / gaveta ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(8,16,51,.45); z-index: 200; display: flex; align-items: flex-end; justify-content: center;
  animation: fade .18s ease;
}
.overlay.closing { animation: fadeout .18s ease forwards; }
.modal {
  background: #fff; width: 100%; max-height: calc(100dvh - var(--safe-t) - 12px); border-radius: 20px 20px 0 0;
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: up .24s cubic-bezier(.2,.8,.2,1);
}
.overlay.closing .modal { animation: down .18s ease forwards; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px 20px; border-bottom: 1px solid var(--line-2); }
.modal-head h2 { margin: 0; font-size: 18px; letter-spacing: -.01em; flex: 1; min-width: 0; }
.modal-head h2 small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.modal-body { padding: 18px 20px; overflow: auto; flex: 1; -webkit-overflow-scrolling: touch; }
.modal-foot { display: flex; gap: 10px; padding: 12px 20px calc(12px + var(--safe-b)); border-top: 1px solid var(--line-2); background: #FAFBFD; border-radius: 0 0 20px 20px; flex-wrap: wrap; }
.modal-foot .spacer { flex: 1; }
@media (max-width: 599px) {
  .modal.full { height: calc(100dvh - var(--safe-t) - 8px); }
  .modal-foot .btn { flex: 1; }
  .modal-foot .spacer { display: none; }
}
@media (min-width: 600px) {
  .overlay { align-items: center; padding: 24px; }
  .modal { max-width: 560px; border-radius: 20px; max-height: calc(100dvh - 48px); animation: pop .22s cubic-bezier(.2,.8,.2,1); }
  .modal.lg { max-width: 820px; }
  .modal.sm { max-width: 420px; }
  .modal-foot { border-radius: 0 0 20px 20px; padding-bottom: 12px; }
  .overlay.drawer { justify-content: flex-end; padding: 0; align-items: stretch; }
  .overlay.drawer .modal { max-width: 480px; height: 100dvh; max-height: 100dvh; border-radius: 0; animation: slidein .24s cubic-bezier(.2,.8,.2,1); }
  .overlay.drawer .modal-foot { border-radius: 0; }
  .overlay.drawer.closing .modal { animation: slideout .18s ease forwards; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes fadeout { to { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
@keyframes down { to { transform: translateY(40px); } }
@keyframes pop { from { transform: scale(.97) translateY(8px); opacity: 0; } }
@keyframes slidein { from { transform: translateX(40px); opacity: .3; } }
@keyframes slideout { to { transform: translateX(40px); opacity: 0; } }

/* Abas e passos */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -4px -20px 18px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; background: none; padding: 11px 10px; font-weight: 650; color: var(--muted); border-bottom: 2.5px solid transparent; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs button.on { color: var(--lz-600); border-bottom-color: var(--lz-600); }
.tabs button .n { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--line-2); font-size: 11px; }
.tabs button.on .n { background: var(--lz-600); color: #fff; }
.tabs button.done .n { background: var(--ok); color: #fff; }
.progress { height: 5px; background: var(--line-2); border-radius: 99px; overflow: hidden; margin-bottom: 16px; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--lz-500), var(--lz-600)); border-radius: 99px; transition: width .3s; }
.tab-panel { display: none; }
.tab-panel.on { display: grid; gap: 14px; animation: fade .2s; }
.section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 6px 0 -4px; }

.contact-edit { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #FAFBFD; }
.contact-edit .row { display: flex; gap: 8px; }
@media (min-width: 600px) { .contact-edit { grid-template-columns: 150px 1fr 1fr auto; align-items: center; padding: 8px; } }
.star-btn.on { color: var(--gold); }
.star-btn.on svg.i { fill: var(--gold); }

.tag-input { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px; min-height: 48px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.tag-input input { border: 0 !important; box-shadow: none !important; min-height: 30px !important; padding: 2px 4px !important; flex: 1; min-width: 120px; }

/* Autocomplete */
.ac { position: relative; }
.ac-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-md); z-index: 20; max-height: 300px; overflow: auto; }
.ac-item { display: flex; gap: 10px; align-items: center; padding: 10px 12px; cursor: pointer; border-bottom: 1px solid var(--line-2); }
.ac-item:last-child { border-bottom: 0; }
.ac-item:hover, .ac-item.active { background: var(--lz-50); }
.ac-item small { color: var(--muted); display: block; font-size: 12.5px; }
.ac-foot { padding: 10px 12px; font-size: 13px; color: var(--muted); }

.picked { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1.5px solid var(--lz-100); background: var(--lz-50); border-radius: 12px; }
.picked .grow { min-width: 0; }
.picked strong { display: block; }
.picked small { color: var(--muted); }

.pet-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pet-pick label { cursor: pointer; }
.pet-pick input { position: absolute; opacity: 0; pointer-events: none; }
.pet-pick .pp { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 99px; border: 1.5px solid var(--line); background: #fff; font-weight: 600; min-height: 44px; }
.pet-pick .pp .e { width: 28px; height: 28px; border-radius: 50%; background: var(--gold-100); display: grid; place-items: center; font-size: 16px; }
.pet-pick input:checked + .pp { border-color: var(--lz-600); background: var(--lz-50); color: var(--lz-700); box-shadow: 0 0 0 3px rgba(47,100,194,.12); }
.pet-pick .pp.add { border-style: dashed; color: var(--muted); padding-left: 14px; }

.svc-pick { display: flex; flex-wrap: wrap; gap: 8px; max-height: 210px; overflow: auto; padding: 2px; }
.svc-pick label { cursor: pointer; }
.svc-pick input { position: absolute; opacity: 0; pointer-events: none; }
.svc-cat { flex-basis: 100%; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 4px; }
.svc-cat:first-child { margin-top: 0; }
.svc-pick .sp { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font-size: 14px; font-weight: 600; min-height: 38px; }
.svc-pick .sp .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--lz-500)); }
.svc-pick .sp small { color: var(--muted); font-weight: 500; }
.svc-pick input:checked + .sp { border-color: var(--lz-600); background: var(--lz-600); color: #fff; }
.svc-pick input:checked + .sp small { color: var(--lz-200); }
.svc-pick input:checked + .sp .dot { background: #fff; }

.warn-box { display: flex; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--warn-bg); color: #8A4B05; font-size: 13.5px; align-items: flex-start; }
.warn-box.red { background: var(--danger-bg); color: #991B1B; }
.info-box { display: flex; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--info-bg); color: #1E40AF; font-size: 13.5px; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); top: calc(var(--safe-t) + 10px); z-index: 400; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
@media (min-width: 900px) { .toasts { top: auto; bottom: 24px; left: auto; right: 24px; transform: none; } }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--lz-900); color: #fff; box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 550; animation: drop .25s ease; }
@keyframes drop { from { transform: translateY(-14px); opacity: 0; } }
@media (min-width: 900px) { .toast { animation: up .25s ease; } }
.toast.ok svg.i { color: #34D399; }
.toast.err { background: #7F1D1D; }
.toast.out { animation: fadeout .25s forwards; }

/* =====================================================================
   AGENDA
   ===================================================================== */
.ag-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.ag-nav { display: flex; align-items: center; gap: 6px; }
.ag-date { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; min-height: 42px; border-radius: 11px; background: var(--lz-800); color: #fff; font-weight: 650; font-size: 14px; white-space: nowrap; cursor: pointer; border: 0; }
.ag-date input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.ag-views { display: inline-flex; background: #fff; border: 1.5px solid var(--line); border-radius: 11px; padding: 3px; }
.ag-views button { border: 0; background: none; padding: 7px 13px; border-radius: 8px; font-weight: 650; color: var(--muted); font-size: 14px; min-height: 34px; }
.ag-views button.on { background: var(--lz-600); color: #fff; }
.ag-filters { display: flex; gap: 8px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.ag-filters .select { min-height: 42px; width: auto; min-width: 170px; font-size: 14px; }
@media (max-width: 899px) {
  .ag-toolbar { gap: 8px; }
  .ag-nav { order: 1; width: 100%; justify-content: space-between; }
  .ag-nav .ag-date { flex: 1; justify-content: center; }
  .ag-views { order: 2; flex: 1; }
  .ag-views button { flex: 1; }
  .ag-filters { order: 3; margin-left: 0; width: 100%; }
  .ag-filters .select { flex: 1; min-width: 0; }
}

.ag-stats { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 14px; scrollbar-width: none; padding-bottom: 2px; }
.ag-stats::-webkit-scrollbar { display: none; }
.stat { flex: 1 0 auto; min-width: 118px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; display: grid; gap: 2px; }
.stat b { font-size: 22px; letter-spacing: -.02em; line-height: 1.1; }
.stat span { font-size: 12px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stat span::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--st, var(--lz-600)); }

/* Grade (dia / semana) */
.cal-scroll { overflow: auto; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); max-height: calc(100dvh - 250px); min-height: 380px; position: relative; -webkit-overflow-scrolling: touch; }
@media (max-width: 899px) {
  .cal-scroll { max-height: calc(100dvh - var(--topbar) - var(--bottomnav) - var(--safe-t) - var(--safe-b) - 24px); min-height: 420px; }
  .stat { min-width: 92px; padding: 7px 11px; border-radius: 10px; }
  .stat b { font-size: 18px; }
  .stat span { font-size: 11px; }
  .page-head h1 { font-size: 22px; }
}
.cal { display: grid; grid-template-columns: 58px repeat(var(--cols), minmax(var(--colmin, 180px), 1fr)); grid-template-rows: auto var(--h); min-width: 100%; position: relative; }
.cal-corner { position: sticky; top: 0; left: 0; z-index: 6; background: #fff; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.cal-colhead { position: sticky; top: 0; z-index: 5; background: #fff; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line-2); padding: 10px 12px; min-width: 0; }
.cal-colhead strong { display: flex; align-items: center; gap: 8px; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-colhead strong::before { content: ''; width: 10px; height: 10px; border-radius: 4px; background: var(--c, var(--lz-600)); flex: none; }
.cal-colhead small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 18px; }
.cal-colhead.day { text-align: center; cursor: pointer; }
.cal-colhead.day strong { justify-content: center; }
.cal-colhead.day strong::before { display: none; }
.cal-colhead.day small { padding: 0; text-transform: capitalize; }
.cal-colhead.day.today strong { color: var(--lz-600); }
.cal-colhead.day .num { display: inline-grid; place-items: center; min-width: 30px; height: 30px; border-radius: 50%; font-size: 16px; }
.cal-colhead.day.today .num { background: var(--lz-600); color: #fff; }
.cal-times { position: sticky; left: 0; z-index: 4; background: #fff; border-right: 1px solid var(--line); }
.cal-times div { position: absolute; left: 0; right: 0; transform: translateY(-50%); text-align: right; padding-right: 8px; font-size: 11.5px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.cal-times div:first-child { transform: none; }
.cal-col {
  position: relative; border-right: 1px solid var(--line-2); cursor: copy;
  background-image:
    linear-gradient(to bottom, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-2) 1px, transparent 1px);
  background-size: 100% var(--hour), 100% var(--slot);
}
.cal-col.closed { background-color: #FAFBFD; }
.cal-col.today { background-color: rgba(242,245,255,.55); }
.cal-ghost { position: absolute; left: 4px; right: 4px; border-radius: 8px; border: 1.5px dashed var(--lz-500); background: rgba(47,100,194,.06); color: var(--lz-600); font-size: 12px; font-weight: 700; padding: 3px 8px; pointer-events: none; display: none; }
.cal-col:hover .cal-ghost { display: block; }
@media (hover: none) { .cal-col:hover .cal-ghost { display: none; } }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 3; pointer-events: none; }
.now-line::before { content: ''; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }

.ev {
  position: absolute; z-index: 2; border: 0; text-align: left; overflow: hidden; padding: 5px 8px 5px 10px;
  border-radius: 9px; background: var(--st-bg); color: var(--text); font-size: 12.5px; line-height: 1.3;
  box-shadow: inset 3px 0 0 var(--st), 0 1px 2px rgba(15,23,42,.06); cursor: pointer; transition: transform .1s, box-shadow .15s;
  display: flex; flex-direction: column; gap: 1px;
}
.ev:hover { box-shadow: inset 3px 0 0 var(--st), 0 6px 18px rgba(15,23,42,.14); z-index: 4; }
.ev .ev-time { font-weight: 700; color: var(--st); font-size: 11.5px; display: flex; align-items: center; gap: 5px; }
.ev .ev-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev .ev-title span { font-weight: 500; color: var(--text-2); }
.ev .ev-sub { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.st-cancelado .ev-title, .ev.st-faltou .ev-title { text-decoration: line-through; opacity: .75; }
.ev .prof-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }
.ev.compact { padding-top: 2px; padding-bottom: 2px; flex-direction: row; gap: 6px; align-items: center; }
.ev.compact .ev-sub { display: none; }

/* Lista (celular) */
.ag-list { display: grid; gap: 18px; }
.ag-day h3 { margin: 0 0 10px; font-size: 14px; color: var(--text-2); display: flex; gap: 8px; align-items: baseline; text-transform: capitalize; }
.ag-day h3 small { color: var(--muted); font-weight: 600; text-transform: none; }
.ag-day h3.today { color: var(--lz-600); }
.ag-card { display: flex; gap: 12px; padding: 12px; background: #fff; border-radius: 14px; border: 1px solid var(--line); cursor: pointer; width: 100%; text-align: left; box-shadow: inset 4px 0 0 var(--st); align-items: center; }
.ag-card + .ag-card { margin-top: 8px; }
.ag-card .t { width: 54px; flex: none; text-align: center; }
.ag-card .t b { display: block; font-size: 16px; font-variant-numeric: tabular-nums; }
.ag-card .t small { font-size: 11.5px; color: var(--muted); }
.ag-card .grow { min-width: 0; }
.ag-card strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-card .line { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-card .pet-ava { width: 40px; height: 40px; font-size: 21px; border-radius: 12px; }

/* Mês */
.month { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.month-head, .month-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.month-head div { padding: 10px 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--muted); text-align: center; border-bottom: 1px solid var(--line); background: #FAFBFD; }
.mday { min-height: 112px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); padding: 6px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; min-width: 0; background: #fff; text-align: left; border-top: 0; border-left: 0; }
.mday:nth-child(7n) { border-right: 0; }
.mday:hover { background: var(--lz-50); }
.mday.out { background: #FAFBFD; color: #A0AEC0; }
.mday .n { font-weight: 700; font-size: 13px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; }
.mday.today .n { background: var(--lz-600); color: #fff; }
.mday .pill { font-size: 11.5px; padding: 2px 6px; border-radius: 6px; background: var(--st-bg); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: inset 2px 0 0 var(--st); }
.mday .pill b { color: var(--st); font-weight: 700; }
.mday .more { font-size: 11.5px; color: var(--lz-600); font-weight: 700; }
.mday .dots { display: none; gap: 3px; flex-wrap: wrap; }
.mday .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--st); }
@media (max-width: 699px) {
  .mday { min-height: 64px; align-items: center; padding: 6px 2px; }
  .mday .pill, .mday .more { display: none; }
  .mday .dots { display: flex; justify-content: center; }
  .month-head div { font-size: 10.5px; padding: 8px 2px; }
}

/* Detalhe do agendamento */
.ev-detail { display: grid; gap: 16px; }
.ev-who { display: flex; gap: 14px; align-items: center; }
.ev-who .pet-ava { width: 60px; height: 60px; font-size: 32px; border-radius: 18px; }
.ev-who h3 { margin: 0; font-size: 19px; }
.ev-who p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.ev-actions { display: grid; gap: 8px; }
.ev-actions .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.timeline { display: grid; gap: 0; border-left: 2px solid var(--line); margin-left: 6px; padding-left: 16px; }
.timeline div { position: relative; padding: 4px 0; font-size: 13.5px; }
.timeline div::before { content: ''; position: absolute; left: -22px; top: 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--line); border: 2px solid #fff; }
.timeline div.done::before { background: var(--ok); }
.timeline div span { color: var(--muted); }
.menu { position: absolute; z-index: 30; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-md); padding: 6px; display: grid; min-width: 240px; }
.menu button { border: 0; background: none; text-align: left; padding: 10px 12px; border-radius: 8px; font-weight: 600; display: flex; gap: 10px; align-items: center; }
.menu button:hover { background: var(--lz-50); }

/* Configurações */
.cfg-list .row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line-2); }
.cfg-list .row:last-child { border-bottom: 0; }
.cfg-list .sw { width: 14px; height: 14px; border-radius: 5px; background: var(--c); flex: none; }
.cfg-list .row.off { opacity: .5; }
.color-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.color-pick label { cursor: pointer; }
.color-pick input { position: absolute; opacity: 0; }
.color-pick span { display: block; width: 32px; height: 32px; border-radius: 10px; background: var(--c); border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--line); }
.color-pick input:checked + span { box-shadow: 0 0 0 2.5px var(--text); }

.fab { position: fixed; right: 16px; bottom: calc(var(--bottomnav) + var(--safe-b) + 16px); z-index: 35; width: 56px; height: 56px; border-radius: 18px; border: 0; background: var(--lz-600); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 26px rgba(31,74,154,.4); }
.fab svg.i { width: 26px; height: 26px; }
@media (min-width: 900px) { .fab { display: none; } }
@media (max-width: 899px) { .hide-mob { display: none !important; } }

@media print {
  .sidebar, .topbar, .bottomnav, .fab, .ag-toolbar .btn, .demo-banner { display: none !important; }
  .page { padding: 0; }
  .cal-scroll { max-height: none; overflow: visible; }
}

/* ---------- Fotos ---------- */
.pet-ava, .avatar { overflow: hidden; }
.pet-ava img, .avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pet-ava.xl { width: 96px; height: 96px; font-size: 48px; border-radius: 26px; }
.foto-edit { display: flex; gap: 16px; align-items: center; padding-bottom: 4px; }
.foto-edit #pt-foto { cursor: pointer; }
.foto-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.ava-edit { position: relative; border: 0; padding: 0; background: none; cursor: pointer; flex: none; border-radius: 18px; }
.ava-edit .cam { position: absolute; right: -4px; bottom: -4px; width: 26px; height: 26px; border-radius: 50%; background: #fff; color: var(--lz-700); display: grid; place-items: center; box-shadow: 0 2px 8px rgba(15,23,42,.18); }
.ev .ev-ph { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; vertical-align: -3px; display: inline-block; }
.pet-pick .pp .e { overflow: hidden; }
.pet-pick .pp .e img { width: 100%; height: 100%; object-fit: cover; }
.lightbox img { max-width: 100%; max-height: 72dvh; border-radius: 14px; display: block; margin: 0 auto; }

/* ---------- Busca rápida ---------- */
.qs-btn { display: none; }
@media (min-width: 900px) {
  .qs-btn { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 10px 12px; border-radius: 11px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: #B9C4EC; font-size: 13.5px; text-align: left; }
  .qs-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
  .qs-btn span { flex: 1; }
  .qs-btn kbd { font: 600 11px var(--font); padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,.12); color: #DDE3F8; }
}
.qs-res { margin-top: 12px; display: grid; gap: 6px; }
.qs-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); cursor: pointer; }
.qs-item:hover, .qs-item.active { background: var(--lz-50); border-color: var(--lz-200); }
.qs-item strong { display: block; }
.qs-item small { color: var(--muted); }
.qs-pets { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.qs-pets .chip img { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; }
.qs-acts { display: flex; gap: 6px; flex: none; }
.overlay.qs-modal { align-items: flex-start; }
@media (min-width: 600px) { .overlay.qs-modal { padding-top: 10vh; } }

/* ---------- Fundo animado do login (patinhas, cães e gatos subindo) ---------- */
.login-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.login-bg .fl { position: absolute; bottom: -90px; opacity: var(--o, .14); animation: subir var(--d, 20s) linear var(--dl, 0s) infinite; will-change: transform; }
.login-bg .fl svg { width: 100%; height: 100%; display: block; animation: balanco var(--b, 6s) ease-in-out infinite alternate; }
@keyframes subir { from { transform: translateY(0); } to { transform: translateY(calc(-100vh - 200px)); } }
@keyframes balanco { from { transform: rotate(calc(var(--r, 0deg) - 12deg)) translateX(-8px); } to { transform: rotate(calc(var(--r, 0deg) + 12deg)) translateX(8px); } }
@media (prefers-reduced-motion: reduce) { .login-bg .fl, .login-bg .fl svg { animation: none; } .login-bg .fl { bottom: auto; top: var(--top, 50%); } }

/* ---------- Linha do tempo do pet ---------- */
.tl { display: grid; }
.tl-day { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 16px 0 8px; }
.tl-day:first-child { margin-top: 0; }
.tl-item { display: grid; grid-template-columns: 48px 1fr; gap: 12px; position: relative; padding-bottom: 12px; }
.tl-item::before { content: ''; position: absolute; left: 23px; top: 62px; bottom: 2px; width: 2px; background: var(--line-2); }
.tl-ic { text-align: center; }
.tl-ic .dot { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; margin: 0 auto; background: var(--lz-50); color: var(--lz-600); }
.tl-ic .dot.foto { background: var(--gold-100); color: var(--gold-600); }
.tl-ic small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tl-body { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.tl-body.clickable { cursor: pointer; }
.tl-body.clickable:hover { border-color: var(--lz-200); background: var(--lz-50); }
.tl-photo { width: 100%; max-width: 440px; max-height: 360px; object-fit: cover; border-radius: 10px; display: block; cursor: zoom-in; background: var(--line-2); }
.tl-resumo { margin: 8px 0 0; white-space: pre-wrap; line-height: 1.45; }
.tl-photo + .tl-resumo { margin-top: 10px; }
.tl-body > .tl-resumo:first-child { margin-top: 0; }
.tl-meta { font-size: 12.5px; color: var(--muted); margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.reg-preview img { width: 100%; max-height: 46dvh; object-fit: contain; border-radius: 12px; background: var(--line-2); display: block; }
.profile-head .pet-ava.xl { width: 84px; height: 84px; font-size: 44px; }
