/* =====================================================================
   Fácil Gado — Design System v1
   Mobile-first · tema claro/escuro · sem build · ~1 arquivo
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Bricolage Grotesque", "Inter", ui-sans-serif, system-ui, sans-serif;

  /* Paleta: pasto, capim, sol do cerrado, terra vermelha */
  --green-950: #06231a;
  --green-900: #0b3326;
  --green-800: #0f4431;
  --green-700: #12543a;
  --green-600: #17704c;
  --green-500: #1f8d5f;
  --green-100: #dcefe4;
  --green-50: #eef7f1;
  --lime-400: #b8e65a;
  --lime-300: #cdf27f;
  --sun-500: #e99a1f;
  --sun-400: #f2b544;
  --sun-100: #fdf0d6;
  --soil-600: #a8461f;
  --soil-500: #c4572b;
  --soil-100: #f8e3d9;
  --sky-600: #1f6fb2;
  --sky-100: #e0eefa;

  --bg: #f5f3ec;
  --bg-elevated: #fbfaf6;
  --surface: #ffffff;
  --surface-2: #efece2;
  --surface-3: #e6e2d6;
  --line: #e1dccf;
  --line-strong: #cdc6b5;
  --text: #13201a;
  --text-2: #4a564f;
  --text-3: #5c6660; /* >= 4,6:1 em todos os fundos claros (antes #79837d = 3,0 a 3,9:1) */
  --brand: var(--green-700);
  --brand-hover: var(--green-800);
  --brand-soft: var(--green-50);
  --brand-contrast: #ffffff;
  --accent: var(--lime-400);
  --accent-ink: var(--green-950);
  --focus: #2d9cdb;

  --success: #17804f; --success-soft: #e2f4ea;
  --warning: #b86e00; --warning-soft: #fdf0d6;
  --danger: #c0392b;  --danger-soft: #fbe5e2;
  --info: var(--sky-600); --info-soft: var(--sky-100);
  --neutral: #5c665f; --neutral-soft: #ecebe5;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --pill: 999px;

  --shadow-xs: 0 1px 2px rgb(19 32 26 / .06);
  --shadow-sm: 0 1px 2px rgb(19 32 26 / .05), 0 2px 8px rgb(19 32 26 / .05);
  --shadow: 0 2px 4px rgb(19 32 26 / .04), 0 8px 24px rgb(19 32 26 / .08);
  --shadow-lg: 0 12px 48px rgb(19 32 26 / .16);
  --ring: 0 0 0 3px color-mix(in srgb, var(--focus) 40%, transparent);

  --header-h: 64px;
  --bottom-nav-h: 64px;
  --container: 1240px;
  --gutter: clamp(16px, 4vw, 32px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0a100d;
  --bg-elevated: #0e1612;
  --surface: #111a15;
  --surface-2: #17221c;
  --surface-3: #1e2b24;
  --line: #233229;
  --line-strong: #2f4136;
  --text: #e8efe9;
  --text-2: #aab8af;
  --text-3: #85948b; /* >= 4,6:1 em todas as superfícies escuras (antes #7d8c83 = 4,2:1 na surface-3) */
  --brand: #2fae74;
  --brand-hover: #3cc286;
  --brand-soft: #12261c;
  --brand-contrast: #04160e;
  --accent: var(--lime-300);
  --success: #39c27f; --success-soft: #11291c;
  --warning: #f2b544; --warning-soft: #2b2310;
  --danger: #ff7a6b;  --danger-soft: #2f1512;
  --info: #6cb4f0;    --info-soft: #102335;
  --neutral: #a3ada6; --neutral-soft: #1d2621;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / .4);
  --shadow: 0 8px 24px rgb(0 0 0 / .35);
  --shadow-lg: 0 16px 48px rgb(0 0 0 / .5);
  color-scheme: dark;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
}
img, picture, video, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
p a, .prose a, .link { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--lime-300); color: var(--green-950); }
hr { border: 0; border-top: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; }
[hidden] { display: none !important; }
[x-cloak] { display: none !important; }

h1, h2, h3, h4, .display { font-family: var(--font-display); line-height: 1.12; letter-spacing: -.02em; font-weight: 750; text-wrap: balance; }
h1, .h1 { font-size: clamp(2rem, 1.3rem + 3.2vw, 3.6rem); letter-spacing: -.035em; }
h2, .h2 { font-size: clamp(1.5rem, 1.15rem + 1.6vw, 2.3rem); }
h3, .h3 { font-size: clamp(1.15rem, 1.05rem + .5vw, 1.4rem); letter-spacing: -.015em; }
h4, .h4 { font-size: 1.05rem; letter-spacing: -.01em; }
p { text-wrap: pretty; }
small, .small { font-size: .875rem; }
.xsmall { font-size: .78rem; }
.muted { color: var(--text-2); }
.subtle { color: var(--text-3); }
.num, .price { font-variant-numeric: tabular-nums; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-size: .78rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.lead { font-size: clamp(1.05rem, 1rem + .35vw, 1.25rem); color: var(--text-2); max-width: 62ch; }
.prose { max-width: 72ch; }
.prose > * + * { margin-top: 1em; }
.prose h2 { margin-top: 1.6em; font-size: 1.45rem; }
.prose h3 { margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }

/* ---------- 3. Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container-narrow { max-width: 820px; }
.container-tight { max-width: 520px; }
.section { padding-block: clamp(48px, 8vw, 96px); }
.section-sm { padding-block: clamp(28px, 5vw, 48px); }
.stack > * + * { margin-top: var(--stack, 1rem); }
.stack-xs { --stack: .35rem; } .stack-sm { --stack: .65rem; } .stack-lg { --stack: 1.6rem; } .stack-xl { --stack: 2.5rem; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, .75rem); }
.cluster-sm { --gap: .4rem; } .cluster-lg { --gap: 1.25rem; }
.between { justify-content: space-between; }
.center { align-items: center; justify-content: center; text-align: center; }
.grid { display: grid; gap: var(--gap, 1rem); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); } /* coluna única que não cresce com texto sem quebra */
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
  .split-wide { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
  .sticky-side { position: sticky; top: calc(var(--header-h) + 20px); }
}
.flex { display: flex; } .flex-col { flex-direction: column; } .items-center { align-items: center; } .grow { flex: 1 1 auto; min-width: 0; }
.w-full { width: 100%; } .mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2.5rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.text-center { text-align: center; } .text-right { text-align: right; } .nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-break { overflow-wrap: anywhere; } /* e-mail, link ou nome comprido quebra dentro da caixa; use só no texto que precisa (não no body: em coluna espremida quebrava letra por letra) */
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
/* Só esconde; acima de 768 px cada elemento mantém o próprio display (o "revert" quebrava botões: ícone em cima do texto). */
@media (max-width: 767.98px) { .hide-mobile { display: none !important; } }
@media (min-width: 768px) { .show-mobile { display: none !important; } }
.scroll-x { overflow-x: auto; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }

/* ---------- 4. Ícones ---------- */
.icon { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 1em; height: 1em; } .icon-lg { width: 1.6em; height: 1.6em; } .icon-xl { width: 2.2em; height: 2.2em; }
.icon-fill { fill: currentColor; stroke: none; }
.icon-bubble { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); flex: none; }
.icon-bubble.lg { width: 56px; height: 56px; border-radius: 16px; }

/* ---------- 5. Botões ---------- */
.btn {
  --btn-bg: var(--surface); --btn-fg: var(--text); --btn-bd: var(--line-strong);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .6rem 1.1rem; border-radius: var(--pill);
  background: var(--btn-bg); color: var(--btn-fg); border: 1px solid var(--btn-bd);
  font-weight: 620; font-size: .95rem; line-height: 1.2; white-space: nowrap; user-select: none;
  transition: transform .15s var(--ease), background-color .2s, border-color .2s, box-shadow .2s, color .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { border-color: var(--text-3); }
.btn:active { transform: scale(.97); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn-primary { --btn-bg: var(--brand); --btn-fg: var(--brand-contrast); --btn-bd: transparent; box-shadow: 0 1px 0 rgb(255 255 255 / .15) inset, 0 6px 16px -6px color-mix(in srgb, var(--brand) 70%, transparent); }
.btn-primary:hover { --btn-bg: var(--brand-hover); border-color: transparent; }
.btn-accent { --btn-bg: var(--accent); --btn-fg: var(--accent-ink); --btn-bd: transparent; }
.btn-accent:hover { --btn-bg: var(--lime-300); border-color: transparent; }
.btn-dark { --btn-bg: var(--green-950); --btn-fg: #fff; --btn-bd: transparent; }
.btn-ghost { --btn-bg: transparent; --btn-bd: transparent; }
.btn-ghost:hover { --btn-bg: var(--surface-2); border-color: transparent; }
.btn-soft { --btn-bg: var(--brand-soft); --btn-fg: var(--brand); --btn-bd: transparent; }
.btn-danger { --btn-bg: var(--danger); --btn-fg: #fff; --btn-bd: transparent; }
.btn-danger-soft { --btn-bg: var(--danger-soft); --btn-fg: var(--danger); --btn-bd: transparent; }
.btn-whatsapp { --btn-bg: #25d366; --btn-fg: #06331a; --btn-bd: transparent; }
.btn-whatsapp:hover { --btn-bg: #1fbe5b; border-color: transparent; }
.btn-sm { min-height: 36px; padding: .4rem .85rem; font-size: .875rem; }
.btn-lg { min-height: 54px; padding: .8rem 1.5rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-icon { width: 44px; padding: 0; } .btn-icon.btn-sm { width: 36px; }
/* Alvo de toque ≥ 44 px no celular/toque (o visual compacto do btn-sm fica para mouse em tela grande) */
@media (max-width: 767.98px), (pointer: coarse) {
  .btn-sm { min-height: 44px; }
  .btn-sm { min-width: 44px; } /* botão curto (só ícone ou "OK") também com 44 px de largura */
  .btn-icon.btn-sm { width: 44px; }
}
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--btn-fg); border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 6. Badges, chips, tags ---------- */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: var(--pill); font-size: .75rem; font-weight: 650; line-height: 1.4; background: var(--neutral-soft); color: var(--neutral); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge.plain::before { display: none; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-brand { background: var(--brand-soft); color: var(--brand); }
/* Tema claro: texto do selo mais escuro (AA 4,5:1 em 12 px; antes "Reservado" 3,5:1). Ícones e destaques seguem nas cores do tema. */
:root:not([data-theme="dark"]) .badge-warning { color: #8f5600; }
:root:not([data-theme="dark"]) .badge-info { color: color-mix(in srgb, var(--info) 85%, #000); }
:root:not([data-theme="dark"]) .badge-success { color: color-mix(in srgb, var(--success) 85%, #000); }
.badge-dark { background: rgb(6 35 26 / .72); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.badge-accent { background: var(--accent); color: var(--accent-ink); }

.chip { display: inline-flex; align-items: center; gap: .4rem; min-height: 38px; padding: .4rem .9rem; border-radius: var(--pill); border: 1px solid var(--line-strong); background: var(--surface); font-size: .9rem; font-weight: 550; color: var(--text-2); transition: all .18s var(--ease); white-space: nowrap; }
.chip:hover { border-color: var(--text-3); color: var(--text); }
.chip.is-active, .chip[aria-pressed="true"], input:checked + .chip { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip-row { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; scroll-padding-inline: 40px; overscroll-behavior-x: contain; }
.chip-row::-webkit-scrollbar { display: none; }
@media (max-width: 767.98px), (pointer: coarse) { .chip { min-height: 44px; } }

/* ---------- Faixas que rolam de lado (chips, abas, passos, miniaturas) ----------
   Celular (tela estreita + toque): uma linha que desliza; o app.js ("Faixas roláveis") marca data-more="start end"
   e o esmaecido aparece só do lado que tem mais. A opção escolhida já abre à vista.
   Computador/tablet (>= 768 px ou mouse): chips e passos quebram linha (tudo à vista, nada escondido);
   abas e miniaturas seguem numa linha, com setas (.hscroll-btn, criadas pelo app.js) e barra fina visível. */
[data-more~="start"] { --more-s: 36px; }
[data-more~="end"] { --more-e: 36px; }
[data-more~="start"], [data-more~="end"] {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--more-s, 0px), #000 calc(100% - var(--more-e, 0px)), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 var(--more-s, 0px), #000 calc(100% - var(--more-e, 0px)), transparent);
}
/* foco por dentro do item: a faixa corta o que passa da borda dela */
:is(.chip-row, .tabs, .vt-types, .gallery-track, .freight-steps, .m5-steps) :focus-visible { outline-offset: -2px; }
.hscroll { position: relative; min-width: 0; }
.hscroll-btn { position: absolute; z-index: 3; top: calc(var(--hs-top, 0px) + var(--hs-h, 44px) / 2); translate: 0 -50%; display: none; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); transition: background-color .15s, border-color .15s; }
.hscroll-btn:hover { background: var(--surface-2); border-color: var(--text-3); }
.hscroll-btn.prev { left: 0; } .hscroll-btn.next { right: 0; }
/* min-height: celular deitado (800-930 px de largura, ~400 de altura) continua com a linha que desliza */
@media (min-width: 768px) and (min-height: 500px), (hover: hover) and (pointer: fine) {
  .chip-row { flex-wrap: wrap; overflow: visible; }
  .chip-row .chip { white-space: normal; }
  .hscroll-btn:not([hidden]) { display: grid; }
  /* barra fina e visível onde a faixa continua numa linha (abas e miniaturas: junto da regra de cada uma) */
  .kanban, .scroll-x, .table-wrap { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--text-3) 55%, transparent) transparent; }
}

/* ---------- 7. Cartões ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-pad { padding: clamp(16px, 3vw, 24px); }
.card-hover { transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 16px clamp(16px, 3vw, 24px); border-bottom: 1px solid var(--line); }
.card-header h2, .card-header h3 { font-size: 1.05rem; font-family: var(--font-sans); font-weight: 680; letter-spacing: -.01em; }
.card-body { padding: clamp(16px, 3vw, 24px); }
.card-footer { padding: 14px clamp(16px, 3vw, 24px); border-top: 1px solid var(--line); background: var(--bg-elevated); border-radius: 0 0 var(--radius) var(--radius); }
.panel-soft { background: var(--surface-2); border-radius: var(--radius); padding: clamp(16px, 3vw, 24px); }
.callout { display: flex; gap: .9rem; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--info-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--info) 22%, transparent); }
.callout .icon { color: var(--info); margin-top: 2px; }
.callout-success { background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 22%, transparent); } .callout-success .icon { color: var(--success); }
.callout-warning { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 25%, transparent); } .callout-warning .icon { color: var(--warning); }
.callout-danger { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 25%, transparent); } .callout-danger .icon { color: var(--danger); }

/* ---------- 8. Formulários ---------- */
.field { display: grid; gap: .4rem; }
.field > label, .label { font-size: .875rem; font-weight: 620; color: var(--text); }
.field .hint { font-size: .8rem; color: var(--text-3); }
.field .error { font-size: .82rem; color: var(--danger); font-weight: 550; }
.req::after { content: " *"; color: var(--danger); }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: .7rem .9rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font-size: 16px; /* evita zoom no iOS */ transition: border-color .15s, box-shadow .15s, background .15s;
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.is-invalid .input, .is-invalid .select, .is-invalid .textarea, .input.is-invalid { border-color: var(--danger); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 2.4rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2379837d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8rem center; }
.input-group { position: relative; display: flex; align-items: stretch; }
.input-group .addon { display: inline-flex; align-items: center; padding: 0 .85rem; color: var(--text-3); font-size: .9rem; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line-strong); }
.input-group .addon:first-child { border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .addon:last-child { border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.input-group .addon:first-child + .input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.input-group .input:has(+ .addon) { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-icon { position: relative; }
.input-icon > .icon { position: absolute; left: .9rem; top: 50%; translate: 0 -50%; color: var(--text-3); pointer-events: none; }
.input-icon > .input { padding-left: 2.6rem; }
.check { display: flex; align-items: flex-start; gap: .65rem; cursor: pointer; font-size: .95rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.form-grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } .form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } .span-2 { grid-column: span 2; } .span-all { grid-column: 1 / -1; } }
.form-section { padding-block: 1.25rem; border-top: 1px solid var(--line); }
.form-section:first-child { border-top: 0; padding-top: 0; }
.form-section > h3 { font-family: var(--font-sans); font-size: 1rem; font-weight: 700; margin-bottom: .9rem; }
.form-actions { display: flex; gap: .75rem; flex-wrap: wrap; justify-content: flex-end; padding-top: 1rem; }
.hp-field { display: none !important; }
/* Toggle (switch) */
.switch { position: relative; display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; }
.switch input { appearance: none; width: 44px; height: 26px; border-radius: 99px; background: var(--line-strong); position: relative; transition: background .2s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-xs); transition: transform .25s var(--ease-spring); }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(18px); }
/* Segmented */
.segmented { display: inline-flex; padding: 4px; gap: 2px; background: var(--surface-2); border-radius: var(--pill); }
.segmented label, .segmented a { position: relative; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span, .segmented a { display: inline-flex; align-items: center; gap: .4rem; min-height: 38px; padding: .4rem 1rem; border-radius: var(--pill); font-weight: 600; font-size: .92rem; color: var(--text-2); cursor: pointer; transition: all .2s var(--ease); }
.segmented input:checked + span, .segmented a.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
/* Dropzone */
.dropzone { display: grid; place-items: center; gap: .5rem; padding: 28px 16px; text-align: center; border: 2px dashed var(--line-strong); border-radius: var(--radius); background: var(--bg-elevated); color: var(--text-2); cursor: pointer; transition: all .2s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }

/* ---------- 9. Tabelas responsivas ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; font-size: .92rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 650; padding: 12px 16px; background: var(--bg-elevated); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--bg-elevated); }
.table .row-link { position: relative; }
.table .row-link a.stretched::after { content: ""; position: absolute; inset: 0; }
@media (max-width: 767px) {
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { position: relative; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .table-cards td { padding: 3px 0; border: 0; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
  .table-cards td::before { content: attr(data-label); font-size: .78rem; color: var(--text-3); font-weight: 600; text-align: left; }
  .table-cards td[data-label=""]::before, .table-cards td:not([data-label])::before { display: none; }
  .table-cards td.cell-main { display: block; text-align: left; font-size: 1rem; padding-bottom: 6px; }
}

/* ---------- 10. Toasts, diálogos, bottom sheet ---------- */
.toasts { position: fixed; z-index: 90; left: 50%; bottom: calc(var(--bottom-nav-h) + 16px + env(safe-area-inset-bottom)); translate: -50% 0; display: grid; gap: .5rem; width: min(92vw, 440px); pointer-events: none; }
@media (min-width: 768px) { .toasts { bottom: 24px; left: auto; right: 24px; translate: none; } }
/* Tablet (768–1023 px) no site: a barra de baixo ainda aparece, o aviso fica acima dela (o painel não tem essa barra). */
@media (min-width: 768px) and (max-width: 1023.98px) { body.has-bottom-nav .toasts { bottom: calc(var(--bottom-nav-h) + 16px + env(safe-area-inset-bottom)); } }
/* Barra fixa de preço/ação visível (ficha do anúncio, ferramentas): o aviso sobe e não tapa o botão dela.
   No notebook baixo a barra também aparece: regra em vitrine.css. */
@media (max-width: 1023.98px) { body:has(.sticky-cta.is-visible, .sticky-cta:focus-within) .toasts { bottom: calc(var(--bottom-nav-h) + 80px + env(safe-area-inset-bottom)); } }
/* Página com barra de salvar fixa embaixo (Configurações, editar anúncio): o aviso sobe e não tapa o "Salvar"
   (no celular a barra quebra em 2 linhas, ~105 px). */
body:has(.save-bar, .m5-save-bar) .toasts { bottom: calc(120px + env(safe-area-inset-bottom)); }
@media (min-width: 768px) { body:has(.save-bar, .m5-save-bar) .toasts { bottom: 96px; } }
.toast { pointer-events: auto; display: flex; gap: .75rem; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); background: var(--green-950); color: #eaf5ee; box-shadow: var(--shadow-lg); animation: toast-in .45s var(--ease-spring) both; }
.toast .icon { color: var(--lime-300); margin-top: 1px; }
.toast.is-error { background: #3a0f0a; } .toast.is-error .icon { color: #ff9b8f; }
.toast.is-leaving { animation: toast-out .3s var(--ease) both; }
.toast > div { min-width: 0; overflow-wrap: anywhere; }
/* Fechar: alvo de 44 px sem engordar o aviso (margem negativa). Erro fica até fechar; o tempo do sucesso para com o mouse/foco em cima (app.js). */
.toast button { flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin: -12px -12px -12px auto; border-radius: 50%; color: inherit; opacity: .75; }
.toast button:hover { opacity: 1; background: rgb(255 255 255 / .1); }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) scale(.98); } }

dialog.modal { border: 0; padding: 0; margin: auto; width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 48px); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); overflow: hidden; }
dialog.modal.wide { width: min(820px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgb(6 20 14 / .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
dialog.modal[open] { display: flex; flex-direction: column; animation: dialog-in .35s var(--ease-spring); }
dialog.modal[open]::backdrop { animation: fade-in .25s var(--ease); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 1.2rem; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { display: flex; gap: .75rem; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--bg-elevated); }
@media (max-width: 640px) {
  dialog.modal { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: var(--radius-xl) var(--radius-xl) 0 0; max-height: 92dvh; }
  dialog.modal[open] { animation: sheet-in .4s var(--ease); }
  .modal-head::before { content: ""; position: absolute; top: 8px; left: 50%; translate: -50% 0; width: 40px; height: 4px; border-radius: 4px; background: var(--line-strong); }
  .modal-head { position: relative; padding-top: 24px; }
  .modal-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .modal-foot .btn { flex: 1; }
}
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes sheet-in { from { transform: translateY(100%); } }
@keyframes fade-in { from { opacity: 0; } }

/* ---------- 11. Navegação: header, bottom nav, footer ---------- */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: .6rem 1rem; border-radius: var(--radius-sm); background: var(--text); color: var(--bg); font-weight: 650; }
.skip-link:focus { top: 12px; }
.announce { background: var(--green-950); color: #dff3e6; font-size: .86rem; text-align: center; padding: .5rem var(--gutter); }
.announce a { color: var(--lime-300); font-weight: 650; }
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid transparent; transition: border-color .25s, background .25s; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header .container { display: flex; align-items: center; gap: 1rem; height: 100%; }
.logo { display: inline-flex; align-items: center; flex: none; min-height: 44px; border-radius: 10px; }
.logo-img { display: block; height: 40px; width: auto; max-width: none; }
.logo-img--dark { display: none; }
:root[data-theme="dark"] .logo-img--light { display: none; }
:root[data-theme="dark"] .logo-img--dark { display: block; }
@media (max-width: 380px) { .site-header .logo-img { height: 34px; } }
.main-nav { display: none; gap: .25rem; margin-left: 1.25rem; }
.main-nav a { position: relative; padding: .5rem .8rem; border-radius: var(--pill); font-weight: 560; font-size: .95rem; color: var(--text-2); transition: color .2s, background .2s; }
.main-nav a:hover { color: var(--text); background: var(--surface-2); }
.main-nav a[aria-current="page"] { color: var(--text); }
.main-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 18px; height: 3px; translate: -50% 0; border-radius: 3px; background: var(--brand); }
.header-actions { display: flex; align-items: center; gap: .4rem; margin-left: auto; }
@media (min-width: 1024px) { .main-nav { display: flex; } }

.bottom-nav { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); padding: 0 6px env(safe-area-inset-bottom); background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5); border-top: 1px solid var(--line); }
.bottom-nav a { display: grid; justify-items: center; gap: 2px; padding: 8px 0 10px; font-size: .7rem; font-weight: 600; color: var(--text-3); transition: color .2s; }
.bottom-nav a .icon { width: 24px; height: 24px; transition: transform .25s var(--ease-spring); }
.bottom-nav a[aria-current="page"] { color: var(--brand); }
.bottom-nav a[aria-current="page"] .icon { transform: translateY(-2px); }
.bottom-nav .fab { position: relative; top: -14px; justify-self: center; display: grid; place-items: center; width: 56px; height: 56px; padding: 0; border-radius: 18px; background: var(--brand); color: #fff; box-shadow: 0 8px 20px -6px color-mix(in srgb, var(--brand) 80%, transparent); }
.bottom-nav .fab .icon { width: 26px; height: 26px; }
body.has-bottom-nav { padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); }
@media (min-width: 1024px) { .bottom-nav { display: none; } body.has-bottom-nav { padding-bottom: 0; } }

.drawer-toggle { display: inline-flex; }
@media (min-width: 1024px) { .drawer-toggle { display: none; } }

.site-footer { margin-top: clamp(48px, 8vw, 96px); background: var(--green-950); color: #b9cdbf; padding-block: 56px 32px; }
.site-footer .logo-img { height: 52px; }
.footer-brand { max-width: 440px; }
.site-footer h4 { color: #fff; font-family: var(--font-sans); font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: .9rem; }
/* Só links de texto: nos botões (WhatsApp, redes) a cor vem do .btn (antes o WhatsApp ficava 1,2:1, ilegível) */
.site-footer a:not(.btn) { color: #b9cdbf; transition: color .2s; }
.site-footer a:not(.btn):hover { color: #fff; }
.site-footer .footer-social { --btn-fg: #fff; }
.site-footer .footer-social:hover { --btn-bg: rgb(255 255 255 / .12); }
.footer-grid { display: grid; gap: 28px 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 2fr repeat(3, minmax(0, 1fr)); } .footer-brand { grid-column: auto; } }
.footer-grid ul { list-style: none; padding: 0; display: grid; gap: .55rem; font-size: .94rem; }
.footer-grid li, .footer-grid a { min-width: 0; overflow-wrap: anywhere; }
/* Celular: cada link do rodapé com alvo de toque de ~47 px (antes 19 px) */
@media (max-width: 767.98px) {
  .footer-grid ul { gap: 0; }
  .footer-grid ul a { display: inline-block; padding-block: 12px; }
}
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgb(255 255 255 / .1); display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: .84rem; color: #87a090; }

/* ---------- 12. Hero e seções da home ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; padding-block: clamp(40px, 8vw, 96px) clamp(48px, 7vw, 88px); }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto; height: 120%; z-index: -2;
  background:
    radial-gradient(40% 50% at 15% 20%, color-mix(in srgb, var(--lime-300) 55%, transparent), transparent 70%),
    radial-gradient(35% 45% at 85% 10%, color-mix(in srgb, var(--sun-400) 35%, transparent), transparent 70%),
    radial-gradient(45% 55% at 70% 85%, color-mix(in srgb, var(--green-500) 30%, transparent), transparent 70%);
  filter: blur(20px); animation: mesh 18s ease-in-out infinite alternate; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35; mix-blend-mode: multiply; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .18 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
:root[data-theme="dark"] .hero::after { mix-blend-mode: screen; opacity: .15; }
@keyframes mesh { to { transform: translate3d(3%, 4%, 0) scale(1.08) rotate(2deg); } }
.hero h1 { max-width: 15ch; }
.hero h1 em { font-style: normal; background: linear-gradient(100deg, var(--brand), var(--green-500) 50%, var(--sun-500)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-search { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; padding: 8px; max-width: 720px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.hero-search .input-icon { flex: 1 1 260px; }
.hero-search .input { border: 0; min-height: 52px; background: transparent; }
.hero-search .input:focus { box-shadow: none; }
.hero-search .btn { flex: 1 1 auto; min-height: 52px; border-radius: var(--radius); }
@media (min-width: 640px) { .hero-search .btn { flex: 0 0 auto; } }
.hero-stats { display: flex; flex-wrap: wrap; gap: clamp(20px, 4vw, 48px); margin-top: 32px; }
.hero-stats strong { display: block; font-family: var(--font-display); font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.2rem); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.hero-stats span { font-size: .88rem; color: var(--text-2); }
.hero-visual { position: relative; }

/* Ticker de cotações */
.ticker { position: relative; overflow: hidden; border-block: 1px solid var(--line); background: var(--surface); }
.ticker-track { display: flex; width: max-content; animation: ticker 40s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { display: inline-flex; align-items: center; gap: .6rem; padding: 12px 28px; border-right: 1px solid var(--line); white-space: nowrap; font-size: .92rem; }
.ticker-item strong { font-variant-numeric: tabular-nums; }
.ticker-label { position: absolute; left: 0; top: 0; bottom: 0; z-index: 2; display: flex; align-items: center; gap: .4rem; padding: 0 12px 0 var(--gutter); background: var(--surface); box-shadow: 14px 0 14px var(--surface); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); }
/* Movimento reduzido: faixa parada que rola de lado (dedo, barra ou Shift + rodinha). O rótulo fica preso à esquerda
   sem cobrir o começo (a faixa começa depois dele) e a cópia do laço infinito some. */
@media (prefers-reduced-motion: reduce) {
  .ticker { display: flex; overflow-x: auto; overscroll-behavior-x: contain; scroll-padding-inline-start: 10rem; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--text-3) 55%, transparent) transparent; }
  .ticker-label { position: sticky; flex: none; }
  .ticker-track { flex: none; }
  .ticker-item[aria-hidden="true"] { display: none; }
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 60%, transparent); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes ticker { to { transform: translateX(-50%); } }
.up { color: var(--success); } .down { color: var(--danger); } .flat { color: var(--text-3); }

.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: clamp(20px, 3vw, 32px); }
.section-head p { color: var(--text-2); max-width: 56ch; margin-top: .4rem; }

.feature { display: grid; gap: .8rem; align-content: start; padding: clamp(20px, 3vw, 28px); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.feature h3 { font-size: 1.15rem; }
.feature p { color: var(--text-2); font-size: .95rem; }

.steps { counter-reset: step; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; list-style: none; padding: 0; } /* o número já vem no selo do .step; sem o "1." da lista o texto ganha 40 px no celular */
.steps code { overflow-wrap: anywhere; } /* nome de variável/comando comprido (painel/fretes/conexao) quebra dentro do passo */
.step { counter-increment: step; position: relative; padding: 20px 20px 20px 72px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.step::before { content: counter(step); position: absolute; left: 20px; top: 20px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--brand); color: #fff; font-family: var(--font-display); font-weight: 800; }

.cta-band { position: relative; overflow: hidden; border-radius: var(--radius-xl); padding: clamp(28px, 5vw, 56px); background: var(--green-900); color: #e6f3ea; isolation: isolate; }
.cta-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 80% at 100% 0%, color-mix(in srgb, var(--lime-400) 35%, transparent), transparent 70%), radial-gradient(50% 70% at 0% 100%, color-mix(in srgb, var(--sun-400) 25%, transparent), transparent 70%); }
.cta-band h2 { color: #fff; }
.cta-band p { color: #b9d3c2; }

/* ---------- 13. Card de anúncio ---------- */
.listing-card { position: relative; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s; }
.listing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.listing-card .media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); }
.listing-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.listing-card:hover .media img { transform: scale(1.05); }
.listing-card .media .badges { position: absolute; left: 10px; top: 10px; right: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.listing-card .media .trust-ring { position: absolute; right: 10px; bottom: 10px; }
.listing-card .fav { position: absolute; top: 8px; right: 8px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgb(255 255 255 / .9); color: var(--green-950); box-shadow: var(--shadow-sm); transition: transform .2s var(--ease-spring); }
.listing-card .fav:hover { transform: scale(1.1); }
.listing-card .fav[aria-pressed="true"] { color: #e0245e; }
.listing-card .fav[aria-pressed="true"] .icon { fill: currentColor; }
/* Coluna flex: a largura é a do card (uma trilha "auto" de grid crescia até o local longo em nowrap e o card cortava tudo à direita)
   e nada estica com a linha da grade (o título em clamp-2 esticado mostrava meia 3ª linha). A sobra vai para o .foot (margin-top: auto). */
.listing-card .body { display: flex; flex-direction: column; gap: .35rem; padding: 14px 16px 16px; flex: 1; min-width: 0; }
.listing-card .body > * { min-width: 0; }
.listing-card .meta { display: flex; align-items: flex-start; gap: .35rem; font-size: .82rem; color: var(--text-3); }
.listing-card .meta > .icon { flex: none; margin-top: .15em; }
.listing-card .meta .truncate { flex: 0 1 auto; min-width: 0; }
/* Cidade comprida quebra em até 2 linhas (antes cortava: "Chapada dos Guimarães..."); o código FG fica na 1ª linha */
.listing-card .meta .vt-loc { flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.listing-card .meta .nowrap { flex: none; }
.listing-card h3 { font-family: var(--font-sans); font-size: 1.02rem; font-weight: 680; letter-spacing: -.01em; line-height: 1.3; }
.listing-card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.listing-card .specs { font-size: .88rem; color: var(--text-2); }
.listing-card .foot { display: flex; align-items: end; justify-content: space-between; gap: .5rem; margin-top: auto; padding-top: 10px; }
.listing-card .price { font-family: var(--font-display); font-size: 1.3rem; font-weight: 750; letter-spacing: -.02em; }
.listing-card .price small { font-family: var(--font-sans); font-size: .78rem; font-weight: 600; color: var(--text-3); letter-spacing: 0; }
.listing-card.is-sold .media img { filter: grayscale(.7) brightness(.85); }
/* Card da vitrine (site/anuncios/_card, usado também por x-listing-card fora das telas do M1) */
.vt-card .media .badges { right: 64px; }
.vt-card:not(.has-fav) .media .badges { right: 10px; }
.vt-card .vt-thermo { align-self: flex-start; max-width: 100%; white-space: normal; text-align: left; }
.vt-card .foot { flex-wrap: wrap; row-gap: .15rem; }
.vt-card .price { display: inline-flex; align-items: baseline; gap: .15rem; min-width: 0; overflow-wrap: anywhere; }
.vt-card .vt-approx { font-size: .8em; color: var(--text-3); margin-right: .1rem; }
.vt-card .vt-sub { min-width: 0; max-width: 100%; font-size: .8rem; color: var(--text-3); font-weight: 600; overflow-wrap: anywhere; }
.vt-card .vt-consult { font-size: .95rem; }
.vt-card h3 { overflow-wrap: anywhere; }
.listing-card.is-sold .media::after { content: "Vendido"; position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; color: #fff; letter-spacing: .02em; text-shadow: 0 2px 12px rgb(0 0 0 / .4); }

/* Selo de confiança (anel) */
.trust-ring { --size: 48px; --score: 0; --tone: var(--text-3); position: relative; display: grid; place-items: center; width: var(--size); height: var(--size); border-radius: 50%; background: conic-gradient(var(--tone) calc(var(--score) * 1%), color-mix(in srgb, var(--tone) 18%, transparent) 0); box-shadow: var(--shadow-sm); flex: none; }
.trust-ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--surface); }
.trust-ring span { position: relative; font-weight: 800; font-size: calc(var(--size) * .3); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.trust-ring.ouro { --tone: #d79a12; } .trust-ring.prata { --tone: var(--brand); } .trust-ring.bronze { --tone: #b4693b; } .trust-ring.basico { --tone: var(--text-3); }
.trust-ring.lg { --size: 84px; }
.trust-list { display: grid; gap: .55rem; list-style: none; padding: 0; }
.trust-list li { display: flex; gap: .6rem; align-items: flex-start; font-size: .94rem; }
.trust-list .ok { color: var(--success); } .trust-list .no { color: var(--text-3); }
.trust-list li.is-missing { color: var(--text-3); }

/* Termômetro de preço */
.thermo { display: grid; gap: .5rem; }
.thermo-bar { position: relative; height: 10px; border-radius: 99px; background: linear-gradient(90deg, #1f9d61 0%, #9bc53d 35%, #f2b544 65%, #d9534f 100%); }
.thermo-marker { position: absolute; top: 50%; left: var(--pos, 50%); width: 22px; height: 22px; translate: -50% -50%; border-radius: 50%; background: var(--surface); border: 3px solid var(--text); box-shadow: var(--shadow-sm); transition: left .8s var(--ease-spring); }
.thermo-scale { display: flex; justify-content: space-between; font-size: .75rem; color: var(--text-3); }

/* ---------- 14. Página do anúncio ---------- */
.gallery { position: relative; display: grid; gap: 8px; border-radius: var(--radius-lg); overflow: hidden; }
.gallery-main { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); border-radius: var(--radius-lg); overflow: hidden; }
.gallery-main img, .gallery-main video, .gallery-main iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.gallery-track { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.gallery-track::-webkit-scrollbar { display: none; }
/* mouse: barra fina visível + setas (app.js); a folga de 48 px deixa a miniatura fora de baixo da seta */
@media (min-width: 768px), (hover: hover) and (pointer: fine) { .gallery-track { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--text-3) 55%, transparent) transparent; scroll-padding-inline: 48px; padding-bottom: 2px; } }
.gallery-thumb { position: relative; flex: 0 0 84px; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; opacity: .65; scroll-snap-align: start; transition: opacity .2s, outline-color .2s; outline: 2px solid transparent; outline-offset: -2px; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.is-active, .gallery-thumb:hover { opacity: 1; outline-color: var(--brand); }
.gallery-thumb .play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgb(0 0 0 / .3); }
.gallery-nav { position: absolute; top: 50%; translate: 0 -50%; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgb(255 255 255 / .9); color: var(--green-950); box-shadow: var(--shadow-sm); }
.gallery-nav.prev { left: 10px; } .gallery-nav.next { right: 10px; }
.gallery-count { position: absolute; right: 12px; bottom: 12px; z-index: 2; }
.watermark { position: absolute; left: 14px; bottom: 12px; z-index: 2; font-family: var(--font-display); font-weight: 800; font-size: .95rem; color: rgb(255 255 255 / .85); text-shadow: 0 1px 6px rgb(0 0 0 / .5); pointer-events: none; letter-spacing: -.02em; }

.spec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.spec { display: grid; gap: .15rem; padding: 14px 16px; background: var(--surface); }
.spec dt { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 650; }
.spec dd { font-weight: 650; font-variant-numeric: tabular-nums; }

.price-box { display: grid; gap: 1rem; padding: clamp(18px, 3vw, 24px); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.price-box .big { font-family: var(--font-display); font-size: clamp(1.9rem, 1.5rem + 1.5vw, 2.4rem); font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.price-box .rows { display: grid; gap: .45rem; font-size: .92rem; }
.price-box .rows div { display: flex; justify-content: space-between; gap: 1rem; }
.price-box .rows dt { color: var(--text-2); } .price-box .rows dd { font-weight: 650; font-variant-numeric: tabular-nums; }

.sticky-cta { position: fixed; z-index: 55; left: 0; right: 0; bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: .6rem; padding: 10px var(--gutter); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); transform: translateY(110%); transition: transform .35s var(--ease); }
.sticky-cta.is-visible { transform: none; }
.sticky-cta .price-mini { margin-right: auto; line-height: 1.15; }
.sticky-cta .price-mini strong { display: block; font-family: var(--font-display); font-size: 1.15rem; }
@media (min-width: 1024px) { .sticky-cta { display: none; } }

.breadcrumbs { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .85rem; color: var(--text-3); }
.breadcrumbs a:hover { color: var(--text); }

/* ---------- 15. Filtros da vitrine ---------- */
.filters-bar { position: sticky; top: var(--header-h); z-index: 30; padding-block: 12px; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.filters-panel { display: grid; gap: 1rem; }
.results-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-block: 20px 16px; }

/* ---------- 16. Estados vazios, skeleton, progresso ---------- */
.empty { display: grid; justify-items: center; gap: .75rem; padding: clamp(32px, 6vw, 64px) 20px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); background: var(--bg-elevated); }
.empty .icon-bubble { width: 64px; height: 64px; border-radius: 20px; }
.empty p { color: var(--text-2); max-width: 44ch; }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.progress { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.progress > span { display: block; height: 100%; width: var(--value, 0%); border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--green-500)); transition: width .8s var(--ease); }

/* ---------- 17. Timeline ---------- */
.timeline { list-style: none; padding: 0; display: grid; gap: 0; }
.timeline li { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: .75rem; padding-bottom: 18px; }
.timeline li::before { content: ""; position: absolute; left: 13px; top: 26px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .dot { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); }
.timeline .dot .icon { width: 14px; height: 14px; }
.timeline .when { font-size: .8rem; color: var(--text-3); }

/* ---------- 18. Estatísticas ---------- */
.stat { display: grid; gap: .3rem; padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.stat .label { font-size: .82rem; color: var(--text-2); font-weight: 560; display: flex; align-items: center; gap: .4rem; }
.stat .value { font-family: var(--font-display); font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem); font-weight: 780; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat .delta { font-size: .8rem; font-weight: 650; }
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 750; font-size: .85rem; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 56px; height: 56px; font-size: 1.1rem; }
/* Avatar que é link (cabeçalho do site/painel): alvo de 44 px com o mesmo círculo de 36 px (borda transparente) */
a.avatar:not(.lg) { box-sizing: border-box; width: 44px; height: 44px; border: 4px solid transparent; background-clip: padding-box; }
/* "Voltar" do x-page-header: linha inteira de 44 px de altura para o toque */
.page-header .page-back { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 0; }

/* Abas */
.tabs { display: flex; gap: .25rem; overflow-x: auto; overflow-y: hidden; border-bottom: 1px solid var(--line); scrollbar-width: none; scroll-padding-inline: 40px; overscroll-behavior-x: contain; }
.tabs::-webkit-scrollbar { display: none; }
/* Abas ficam numa linha (o sublinhado da aba atual fica logo acima da borda de baixo, sem passar dela: nada rola na vertical,
   então não aparece barra vertical nem a rodinha fica presa na faixa). Mouse: setas do app.js; sem JS, barra fina visível. */
@media (min-width: 768px), (hover: hover) and (pointer: fine) {
  .tabs { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--text-3) 55%, transparent) transparent; }
  .hscroll > .tabs { scroll-padding-inline: 52px; } /* a barra fina fica junto das setas: altura igual antes e depois do JS */
}
.tabs a, .tabs button { position: relative; display: inline-flex; align-items: center; gap: .45rem; padding: .8rem 1rem; font-weight: 600; font-size: .94rem; color: var(--text-2); white-space: nowrap; }
.tabs a:hover, .tabs button:hover { color: var(--text); }
.tabs a[aria-current="page"], .tabs [aria-selected="true"] { color: var(--text); }
.tabs a[aria-current="page"]::after, .tabs [aria-selected="true"]::after { content: ""; position: absolute; left: .6rem; right: .6rem; bottom: 0; height: 2px; border-radius: 2px; background: var(--brand); }
.tabs .count { font-size: .75rem; padding: 0 .45rem; border-radius: 99px; background: var(--surface-2); color: var(--text-2); }

/* Paginação */
.pagination { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: center; align-items: center; margin-top: 28px; }
.pagination a, .pagination span { display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 .7rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: .92rem; font-variant-numeric: tabular-nums; }
.pagination a:hover { border-color: var(--text-3); }
.pagination .is-current { background: var(--text); color: var(--bg); border-color: var(--text); }
.pagination .is-disabled { opacity: .4; }

/* ---------- 19. Painel (equipe) ---------- */
.app { display: grid; min-height: 100dvh; }
@media (min-width: 1024px) { .app { grid-template-columns: 260px minmax(0, 1fr); } .app.is-collapsed { grid-template-columns: 76px minmax(0, 1fr); } }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 70; width: min(84vw, 300px); display: flex; flex-direction: column; background: var(--green-950); color: #b7cbbf; transform: translateX(-100%); transition: transform .3s var(--ease); }
.sidebar.is-open { transform: none; box-shadow: var(--shadow-lg); }
@media (min-width: 1024px) { .sidebar { position: sticky; top: 0; height: 100dvh; width: auto; transform: none; } }
.sidebar .logo { color: #fff; padding: 18px 20px; } .sidebar .logo b { color: var(--lime-300); }
.sidebar nav { flex: 1; overflow-y: auto; padding: 8px 12px 20px; scrollbar-width: thin; }
.sidebar .group { margin-top: 18px; padding: 0 10px 6px; font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: #728d7d; font-weight: 700; }
.sidebar a.nav-item { display: flex; align-items: center; gap: .75rem; padding: .62rem .8rem; border-radius: 10px; font-weight: 560; font-size: .93rem; color: #b7cbbf; transition: background .15s, color .15s; }
.sidebar a.nav-item:hover { background: rgb(255 255 255 / .06); color: #fff; }
.sidebar a.nav-item[aria-current="page"] { background: rgb(184 230 90 / .14); color: var(--lime-300); }
/* O rótulo do item usa .label: não herdar a cor/peso do rótulo de formulário (texto escuro sobre a barra escura) */
.sidebar a.nav-item .label { color: inherit; font-weight: inherit; font-size: inherit; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar a.nav-item .icon { flex: none; }
@media (max-width: 1023.98px), (pointer: coarse) { .sidebar a.nav-item { min-height: 44px; } }
.sidebar a.nav-item .count { margin-left: auto; font-size: .72rem; font-weight: 700; padding: .05rem .5rem; border-radius: 99px; background: var(--lime-400); color: var(--green-950); }
.sidebar .user-box { display: flex; align-items: center; gap: .7rem; padding: 14px 18px; border-top: 1px solid rgb(255 255 255 / .08); }
.sidebar .user-box .avatar { background: rgb(255 255 255 / .1); color: #fff; }
/* Recolhido só vale no desktop (abaixo de 1024 px o menu é gaveta e sempre mostra os nomes). */
@media (min-width: 1024px) { .app.is-collapsed .sidebar .label, .app.is-collapsed .sidebar .group, .app.is-collapsed .sidebar .count, .app.is-collapsed .sidebar .user-box div { display: none; } }
/* "Sistema" recolhido (<details>, funciona sem JS): abre sozinho quando um dos itens é a página atual. */
.sidebar .nav-fold { margin-top: 12px; }
.sidebar .nav-fold-toggle { display: flex; align-items: center; gap: .75rem; padding: .62rem .8rem; border-radius: 10px; font-weight: 560; font-size: .93rem; color: #b7cbbf; cursor: pointer; list-style: none; user-select: none; transition: background .15s, color .15s; }
.sidebar .nav-fold-toggle::-webkit-details-marker { display: none; }
.sidebar .nav-fold-toggle:hover { background: rgb(255 255 255 / .06); color: #fff; }
.sidebar .nav-fold[open] > .nav-fold-toggle { color: #fff; }
.sidebar .nav-fold-toggle .label { color: inherit; font-weight: inherit; font-size: inherit; }
.sidebar .nav-fold-toggle .icon { flex: none; }
.sidebar .nav-fold-go { margin-left: auto; opacity: .7; transition: transform .2s var(--ease); }
.sidebar .nav-fold[open] > .nav-fold-toggle .nav-fold-go { transform: rotate(180deg); }
@media (max-width: 1023.98px), (pointer: coarse) { .sidebar .nav-fold-toggle { min-height: 44px; } }
@media (min-width: 1024px) { .app.is-collapsed .sidebar .nav-fold-go { display: none; } }
/* Tela baixa: menu mais justo para caber inteiro sem rolar (medido com 12 itens + "Sistema" fechado: precisa de
   ~917 px de altura sem ajuste, ~751 px no 1º degrau e ~610 px no 2º — 1366×768 com a barra do navegador ≈ 625 px).
   Só muda o espaçamento; no toque (pointer: coarse) os itens seguem com 44 px. */
@media (min-width: 1024px) and (max-height: 940px) {
  .sidebar .logo { padding-block: 10px; }
  .sidebar nav { padding-top: 4px; padding-bottom: 10px; }
  .sidebar .group { margin-top: 10px; padding-bottom: 3px; }
  .sidebar a.nav-item, .sidebar .nav-fold-toggle { padding-block: .42rem; }
  .sidebar .nav-fold { margin-top: 10px; }
  .sidebar .user-box { padding-block: 8px; }
}
@media (min-width: 1024px) and (max-height: 760px) {
  .sidebar .logo { padding-block: 6px; }
  .sidebar nav { padding-bottom: 6px; }
  .sidebar .group { margin-top: 8px; padding-bottom: 2px; line-height: 1.3; }
  .sidebar a.nav-item, .sidebar .nav-fold-toggle { padding-block: .3rem; line-height: 1.3; }
  .sidebar a.nav-site { margin-bottom: 2px; }
  .sidebar .nav-fold { margin-top: 8px; }
  .sidebar .user-box { padding-block: 6px; }
}
/* Sino dos avisos no topo: número em vermelho (texto branco 5,4:1 nos dois temas); o nome completo está no aria-label. */
.topbar-bell { position: relative; flex: none; }
.topbar-bell[aria-current="page"] { --btn-bg: var(--brand-soft); color: var(--brand); }
.topbar-bell-count { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #c0392b; color: #fff; font-size: .68rem; font-weight: 750; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--bg); pointer-events: none; }
/* Celular (< 480 px): o botão de tema sai do topo (cabe o sino) e aparece no menu, ao lado do "Sair". */
.sidebar-theme { display: none; }
@media (max-width: 479.98px) { .topbar-theme { display: none; } .sidebar-theme { display: inline-flex; } }
.cmdk-results a { min-height: 44px; } /* atalhos e resultados da busca rápida: alvo de toque de 44 px */
.scrim { position: fixed; inset: 0; z-index: 65; background: rgb(6 20 14 / .5); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .3s; }
.scrim.is-visible { opacity: 1; pointer-events: auto; }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: .75rem; height: var(--header-h); padding: 0 var(--gutter); background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar .search-trigger { flex: 1; max-width: 460px; display: flex; align-items: center; gap: .6rem; min-height: 44px; padding: 0 .9rem; border-radius: var(--pill); border: 1px solid var(--line); background: var(--surface); color: var(--text-3); font-size: .92rem; }
/* Busca do topo numa linha só a 360 px (texto cortado com reticências, sem quebrar o botão) */
.topbar .search-trigger { min-width: 0; }
.topbar .search-trigger > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .search-trigger > .icon { flex: none; }
.topbar .search-trigger kbd { margin-left: auto; font-size: .72rem; padding: .1rem .4rem; border-radius: 6px; border: 1px solid var(--line); font-family: inherit; }
.main { min-width: 0; }
.page { padding: clamp(20px, 3vw, 32px) var(--gutter) 64px; max-width: 1400px; }
.page-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 24px; }
.page-header h1 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem); }
.page-header p { color: var(--text-2); margin-top: .25rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 16px; }
.toolbar .input, .toolbar .select { min-height: 42px; width: auto; }
.toolbar .input-icon { flex: 1 1 240px; }
.toolbar .input-icon > .input { width: 100%; } /* a busca enche o espaço dela (o "width: auto" acima é para os campos soltos) */
/* Filtros extras da barra (<details class="toolbar-more">): no celular ficam em "Filtros", com a busca à vista.
   >= 768 px: sempre abertos e sem o botão (navegador sem ::details-content mostra o "Filtros", e funciona igual). */
.toolbar-more { min-width: 0; }
.toolbar-more > summary { display: flex; align-items: center; gap: .5rem; min-height: 44px; padding: .5rem 1rem; border: 1px solid var(--line-strong); border-radius: var(--pill); background: var(--surface); font-weight: 620; cursor: pointer; list-style: none; }
.toolbar-more > summary::-webkit-details-marker { display: none; }
.toolbar-more > summary::after { content: ""; flex: none; width: 8px; height: 8px; margin-left: auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; opacity: .6; transform: translateY(-2px) rotate(45deg); }
.toolbar-more[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.toolbar-more-body { display: flex; flex-wrap: wrap; gap: .6rem; }
.toolbar-more[open] > .toolbar-more-body { margin-top: .6rem; }
@media (max-width: 767.98px) { .toolbar-more { flex: 1 1 100%; } .toolbar-more-body > .select { flex: 1 1 100%; } }
@media (min-width: 768px) {
  @supports selector(::details-content) {
    .toolbar-more, .toolbar-more::details-content, .toolbar-more-body { display: contents; }
    .toolbar-more::details-content { content-visibility: visible; }
    .toolbar .toolbar-more > summary { display: none; } /* vence o "details > summary" das telas (ex.: .m6) */
  }
}

.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x proximity; }
.kanban-col { display: flex; flex-direction: column; gap: 10px; min-height: 200px; padding: 12px; border-radius: var(--radius); background: var(--surface-2); scroll-snap-align: start; }
.kanban-col header { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: .9rem; padding: 2px 4px 6px; }
.kanban-card { display: grid; gap: .4rem; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-xs); transition: box-shadow .2s, transform .2s; }
.kanban-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }

.cmdk { position: fixed; inset: 0; z-index: 95; display: none; align-items: flex-start; justify-content: center; padding-top: 12vh; background: rgb(6 20 14 / .5); backdrop-filter: blur(4px); }
.cmdk.is-open { display: flex; }
.cmdk-box { width: min(640px, 94vw); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden; animation: dialog-in .25s var(--ease); }
.cmdk-box .input { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; min-height: 56px; font-size: 1.05rem; }
.cmdk-box .input:focus { box-shadow: none; }
.cmdk-results { max-height: 50vh; overflow-y: auto; padding: 8px; }
.cmdk-results a { display: flex; align-items: center; gap: .7rem; padding: .6rem .75rem; border-radius: 10px; font-size: .94rem; }
.cmdk-results a:hover, .cmdk-results a.is-active { background: var(--brand-soft); }
.cmdk-results .group { padding: .6rem .75rem .3rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); font-weight: 700; }

/* Mídia no painel */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.media-item { position: relative; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); border: 2px solid transparent; }
.media-item.is-cover { border-color: var(--brand); }
.media-item img, .media-item video { width: 100%; height: 100%; object-fit: cover; }
.media-item .actions { position: absolute; inset: auto 6px 6px; display: flex; gap: 4px; justify-content: flex-end; }
.media-item .actions .btn { background: rgb(255 255 255 / .92); color: var(--green-950); }
.upload-progress { height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.upload-progress span { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }

/* ---------- 20. Efeitos e movimento ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--delay, 0s); }
.reveal.is-visible { opacity: 1; transform: none; }
.glow-hover { position: relative; }
.glow-hover::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--brand) 55%, transparent), transparent 60%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .3s; pointer-events: none; }
.glow-hover:hover::after { opacity: 1; }
/* Painel (.app só existe no layout do painel): ferramenta de trabalho. Tabelas, fila e cards aparecem na hora,
   mesmo sem JS (o app.js não carregou) — sem fade, sem atraso em cascata e sem o brilho do mouse. O site segue igual. */
.app .reveal { opacity: 1; transform: none; transition: none; }
.app .glow-hover::after { content: none; }
.float { animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }
.count-up { font-variant-numeric: tabular-nums; }

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .ticker-track { animation: none; }
}

/* ---------- 21. Auth ---------- */
.auth { display: grid; min-height: 100dvh; }
@media (min-width: 960px) { .auth { grid-template-columns: 1fr 1fr; } }
.auth-aside { position: relative; display: none; overflow: hidden; background: var(--green-950); color: #dbeee2; padding: 48px; isolation: isolate; }
.auth-aside::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 50% at 20% 20%, color-mix(in srgb, var(--lime-400) 30%, transparent), transparent 70%), radial-gradient(50% 50% at 80% 90%, color-mix(in srgb, var(--sun-400) 25%, transparent), transparent 70%); }
@media (min-width: 960px) { .auth-aside { display: flex; flex-direction: column; justify-content: space-between; } }
.auth-main { display: grid; place-items: center; padding: 32px var(--gutter); }
.auth-card { width: 100%; max-width: 420px; }
.code-input { letter-spacing: .6em; text-align: center; font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- 22. Impressão ---------- */
@media print {
  .site-header, .site-footer, .bottom-nav, .sticky-cta, .toasts, .no-print, .sidebar, .topbar { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .card, .price-box { box-shadow: none; border-color: #ccc; }
  a { text-decoration: none; color: #000; }
}

/* ---------- Menu da conta (cabeçalho) ---------- */
/* <details>/<summary>: funciona sem JS; o app.js fecha com Esc (foco volta ao avatar), clique fora e foco saindo. */
.account-menu { position: relative; flex: none; }
.account-menu > summary { list-style: none; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu-trigger { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.account-menu-trigger .avatar { transition: box-shadow .2s; }
.account-menu-trigger:hover .avatar, .account-menu[open] > .account-menu-trigger .avatar { box-shadow: 0 0 0 2px var(--brand); }
.account-menu-panel { position: absolute; top: calc(100% + 8px); right: 0; z-index: 80; width: max-content; min-width: 220px; max-width: min(300px, calc(100vw - 2 * var(--gutter))); padding: 6px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: account-menu-in .18s var(--ease) both; }
@keyframes account-menu-in { from { opacity: 0; transform: translateY(-4px); } }
.account-menu-head { display: grid; gap: .1rem; min-width: 0; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); line-height: 1.35; }
.account-menu-head > * { overflow-wrap: anywhere; }
.account-menu-list { list-style: none; padding: 0; display: grid; gap: 2px; }
.account-menu-panel a, .account-menu-exit button { display: flex; align-items: center; gap: .6rem; width: 100%; min-height: 44px; padding: .55rem .7rem; border-radius: var(--radius-sm); font-weight: 560; font-size: .94rem; color: var(--text); text-align: left; transition: background .15s, color .15s; }
.account-menu-panel a:hover { background: var(--surface-2); }
.account-menu-panel a .icon { color: var(--text-2); }
.account-menu-exit { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--line); }
.account-menu-exit button { color: var(--danger); }
.account-menu-exit button:hover { background: var(--danger-soft); }

/* == Atalhos site <-> painel == */
/* Painel → site: "Ver site" no topo (sempre à vista) e no começo do menu lateral, na mesma aba.
   Site → painel (equipe): botão "Painel" no cabeçalho e no atalho de baixo.
   No celular os botões do topo ficam só com o ícone (44 px); o nome continua para leitor de tela.
   Exceção: "Ver site" mostra "Site" curto ao lado do globo (toque não mostra dica; ninguém precisa adivinhar o ícone). */
.topbar-actions { flex: none; flex-wrap: nowrap; }
.topbar-site { flex: none; }
.tb-short { display: none; }
.topbar .search-trigger kbd { flex: none; white-space: nowrap; } /* "Ctrl K" numa linha quando a busca encolhe */
@media (max-width: 767.98px) {
  .topbar-site { min-width: 44px; min-height: 44px; padding: 0 .7rem; gap: .35rem; }
  .tb-short { display: inline; white-space: nowrap; }
  .topbar-new, .header-painel { width: 44px; min-width: 44px; padding: 0; }
  .header-painel .icon, .topbar-new .icon { width: 20px; height: 20px; }
  .tb-label, .hp-label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
}
/* Menu lateral: "Ver site" logo abaixo da marca, com contorno para não parecer uma área do painel. */
.sidebar a.nav-site { margin: 2px 0 4px; border: 1px solid rgb(255 255 255 / .16); color: #fff; }
.sidebar a.nav-site:hover { background: rgb(255 255 255 / .08); border-color: rgb(255 255 255 / .3); }
.sidebar a.nav-site .nav-site-go { margin-left: auto; opacity: .7; }
@media (min-width: 1024px) {
  .app.is-collapsed .sidebar a.nav-site { justify-content: center; }
  .app.is-collapsed .sidebar .nav-site-go { display: none; }
  /* Menu recolhido (76 px): só o selo do logo e o "Sair" embaixo do avatar (antes vazavam por cima do topo). */
  .app.is-collapsed .sidebar .logo { justify-content: center; padding-inline: 0; }
  .app.is-collapsed .sidebar .logo-img { width: 37px; height: 40px; object-fit: cover; object-position: left center; }
  .app.is-collapsed .sidebar .user-box { flex-direction: column; gap: .4rem; padding-inline: 0; }
}
/* Abaixo de 1024 px o menu é gaveta: sem "Recolher menu", e a gaveta fechada sai da ordem do Tab. */
@media (max-width: 1023.98px) {
  .sidebar-collapse { display: none !important; }
  .sidebar { visibility: hidden; transition: transform .3s var(--ease), visibility 0s linear .3s; }
  .sidebar.is-open { visibility: visible; transition: transform .3s var(--ease); }
}
/* Topo do painel em celular estreito: menos espaço entre os botões; abaixo de 400 px a busca vira só a lupa
   (o "Site" ao lado ocupa o espaço; um campo cortado em "Bu…" ajudava menos que a lupa). */
@media (max-width: 399.98px) {
  .topbar { gap: .5rem; }
  .topbar .search-trigger { position: relative; flex: 0 0 44px; width: 44px; padding: 0; justify-content: center; }
  .topbar .search-trigger > span { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 359.98px) {
  /* Cabeçalho do site com a equipe: a busca sai do topo para caber o "Painel" (fica no atalho "Buscar" de baixo). */
  .header-actions.is-staff .header-search { display: none; }
}
/* Cabeçalho do site entre 1024 e 1199 px: menu principal mais justo; "Como funciona" não quebra em duas linhas. */
.main-nav a { white-space: nowrap; }
@media (min-width: 1024px) and (max-width: 1199.98px) {
  .site-header .container { gap: .75rem; }
  .main-nav { margin-left: .25rem; gap: 0; }
  .main-nav a { padding: .5rem .55rem; }
}
