/* =========================================================================
   Carro Fácil — design system único (painel + site)
   Carregar DEPOIS de /assets/styles.css (Tailwind do site).
   ========================================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  /* Marca */
  --cf-primary: #0a58e0;
  --cf-primary-hover: #0847b8;
  --cf-primary-soft: #e8f0fe;
  --cf-primary-ink: #0a3a99;

  /* Neutros */
  --cf-ink: #0f172a;
  --cf-ink-2: #334155;
  --cf-muted: #5b6b80;
  --cf-ink-3: var(--cf-muted); /* cinza de apoio com contraste AA até em fundo cinza-claro */
  --cf-line: #e2e8f0;
  --cf-line-strong: #cbd5e1;
  --cf-bg: #f6f8fb;
  --cf-surface: #ffffff;
  --cf-surface-2: #f1f5f9;

  /* Estados */
  --cf-success: #15803d;
  --cf-success-soft: #dcfce7;
  --cf-warning: #b45309;
  --cf-warning-soft: #fef3c7;
  --cf-danger: #dc2626;
  --cf-danger-hover: #b91c1c;
  --cf-danger-soft: #fee2e2;
  --cf-info: #0369a1;
  --cf-info-soft: #e0f2fe;

  /* Tipografia */
  --cf-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --cf-fs-xs: .75rem;
  --cf-fs-sm: .875rem;
  --cf-fs-base: 1rem;
  --cf-fs-lg: 1.125rem;
  --cf-fs-xl: 1.375rem;
  --cf-fs-2xl: 1.75rem;

  /* Espaçamento */
  --cf-sp-1: .25rem;
  --cf-sp-2: .5rem;
  --cf-sp-3: .75rem;
  --cf-sp-4: 1rem;
  --cf-sp-5: 1.25rem;
  --cf-sp-6: 1.5rem;
  --cf-sp-8: 2rem;
  --cf-sp-10: 2.5rem;

  /* Raios */
  --cf-r-sm: .375rem;
  --cf-r: .5rem;
  --cf-r-lg: .75rem;
  --cf-r-xl: 1rem;
  --cf-r-full: 999px;

  /* Sombras */
  --cf-sh-1: 0 1px 2px rgb(15 23 42 / .06);
  --cf-sh-2: 0 4px 14px rgb(15 23 42 / .08);
  --cf-sh-3: 0 18px 44px rgb(15 23 42 / .14);
  --cf-focus: 0 0 0 3px rgb(10 88 224 / .6); /* anel de foco dos campos, visível (Etapa 7) */

  --cf-sidebar-w: 252px;

  /* Ponte com os tokens do tema do site (Tailwind/Lovable) */
  --primary: var(--cf-primary);
  --primary-foreground: #ffffff;
  --primary-glow: #3b7bf0;
  --ring: var(--cf-primary);
  --background: var(--cf-surface);
  --foreground: var(--cf-ink);
  --card: var(--cf-surface);
  --card-foreground: var(--cf-ink);
  --muted: var(--cf-surface-2);
  --muted-foreground: var(--cf-muted);
  --border: var(--cf-line);
  --destructive: var(--cf-danger);
  --radius: var(--cf-r-lg);
  --gradient-primary: linear-gradient(135deg, #0a58e0, #2f74f5);
  --shadow-glow: 0 20px 60px -20px rgb(10 88 224 / .45);
  --font-sans: var(--cf-font);
  --default-font-family: var(--cf-font);
}

/* ---------- 2. Base ---------- */
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--cf-font);
  color: var(--cf-ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  /* Foco sempre visível (teclado): contorno sólido azul, 3:1 em fundo claro e escuro. */
  outline: 3px solid var(--cf-primary, #0a58e0);
  outline-offset: 2px;
  border-radius: var(--cf-r-sm);
}
.cf-body { margin: 0; background: var(--cf-bg); color: var(--cf-ink); min-height: 100vh; }
:where(.cf-body) a { color: var(--cf-primary); }
:where(.cf-body) :is(h1, h2, h3) { color: var(--cf-ink); letter-spacing: -.015em; }
.cf-num { font-variant-numeric: tabular-nums; }
.cf-muted { color: var(--cf-muted); }
.cf-visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.cf-file { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin: .35rem 0 0; }
.cf-file label { margin: 0; cursor: pointer; text-transform: none; }
.cf-file input:focus-visible + label { outline: 2px solid var(--cf-primary); outline-offset: 2px; }
.cf-file-nome { font-size: .8rem; color: var(--cf-muted); overflow-wrap: anywhere; }

/* ---------- 3. Botões ----------
   primary   = ação principal (1 por tela)
   secondary = contorno, ações comuns
   danger    = apagar / irreversível
   link      = terciário, navegação leve
*/
.btn, .estq-btn, .btn-ghost, .cotacao-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 2.5rem; padding: .55rem 1rem;
  border-radius: var(--cf-r); border: 1px solid transparent;
  font: 600 var(--cf-fs-sm)/1.2 var(--cf-font);
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 1rem; height: 1rem; flex-shrink: 0; }

.btn-primary, .estq-btn.estq-btn-primary, .cotacao-btn {
  background: var(--cf-primary); color: #fff; border-color: var(--cf-primary);
  box-shadow: var(--cf-sh-1);
}
.btn-primary:hover, .estq-btn.estq-btn-primary:hover, .cotacao-btn:hover {
  background: var(--cf-primary-hover); border-color: var(--cf-primary-hover); color: #fff;
}

.btn-secondary, .estq-btn, .btn-ghost {
  background: var(--cf-surface); color: var(--cf-ink); border-color: var(--cf-line-strong);
}
.btn-secondary:hover, .estq-btn:hover, .btn-ghost:hover {
  background: var(--cf-surface-2); border-color: #94a3b8; color: var(--cf-ink);
}

.btn-danger {
  background: var(--cf-surface); color: var(--cf-danger); border-color: #fca5a5;
}
.btn-danger:hover { background: var(--cf-danger-soft); color: var(--cf-danger-hover); border-color: var(--cf-danger); }
.btn-danger-solid { background: var(--cf-danger); color: #fff; border-color: var(--cf-danger); }
.btn-danger-solid:hover { background: var(--cf-danger-hover); border-color: var(--cf-danger-hover); color: #fff; }

.btn-link {
  background: none; border-color: transparent; color: var(--cf-primary);
  padding-inline: .35rem; box-shadow: none;
}
.btn-link:hover { text-decoration: underline; text-underline-offset: 3px; background: none; }

.btn-sm, .btn.btn-sm, .estq-btn.btn-sm { min-height: 2rem; padding: .35rem .7rem; font-size: var(--cf-fs-xs); }
.btn-lg { min-height: 3rem; padding: .75rem 1.35rem; font-size: var(--cf-fs-base); }
.btn-block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"], .estq-btn:disabled, .cotacao-btn:disabled {
  opacity: .55; cursor: not-allowed; box-shadow: none;
}
.btn-group { display: flex; flex-wrap: wrap; gap: var(--cf-sp-2); align-items: center; }

/* ---------- 4. Chips de filtro (nunca botão primário) ---------- */
.chips, .crm-filters, .ofc-filters { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 var(--cf-sp-4); }
.chip, .crm-filters a, .ofc-filters a {
  display: inline-flex; align-items: center; gap: .35rem;
  min-height: 2rem; padding: .3rem .75rem; border-radius: var(--cf-r-full);
  border: 1px solid var(--cf-line-strong); background: var(--cf-surface);
  color: var(--cf-ink-2); font-size: var(--cf-fs-xs); font-weight: 600; text-decoration: none;
}
.chip:hover, .crm-filters a:hover, .ofc-filters a:hover { border-color: #94a3b8; background: var(--cf-surface-2); }
.chip.is-active, .crm-filters a.on, .ofc-filters a.on {
  background: var(--cf-primary-soft); color: var(--cf-primary-ink); border-color: #a8c4f7;
}
.chip .chip-n, .ofc-filters a span { opacity: .75; font-variant-numeric: tabular-nums; }

/* ---------- 5. Cartões, cabeçalho de página ---------- */
.card, .estq-card {
  background: var(--cf-surface); border: 1px solid var(--cf-line);
  border-radius: var(--cf-r-lg); box-shadow: var(--cf-sh-1);
}
.card { padding: var(--cf-sp-5); }
.estq-card { overflow: auto; }
.card-title { font-size: var(--cf-fs-base); font-weight: 700; margin: 0 0 var(--cf-sp-3); }

.page-head {
  display: flex; flex-wrap: wrap; gap: var(--cf-sp-3) var(--cf-sp-4);
  align-items: flex-end; justify-content: space-between; margin: 0 0 var(--cf-sp-6);
}
.page-head h1 { font-size: var(--cf-fs-2xl); line-height: 1.2; margin: 0; font-weight: 700; }
.page-head .page-sub { margin: .35rem 0 0; color: var(--cf-muted); font-size: var(--cf-fs-sm); max-width: 60ch; }
.page-head .btn-group { margin-left: auto; }
.breadcrumb { font-size: var(--cf-fs-sm); color: var(--cf-muted); margin: 0 0 var(--cf-sp-2); }
.breadcrumb a { color: var(--cf-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--cf-primary); }

/* ---------- 6. Badges ---------- */
.badge, .estq-pill {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .15rem .55rem; border-radius: var(--cf-r-full);
  font-size: var(--cf-fs-xs); font-weight: 600; line-height: 1.5;
  background: var(--cf-surface-2); color: var(--cf-ink-2);
}
.badge-info { background: var(--cf-info-soft); color: var(--cf-info); }
.badge-success { background: var(--cf-success-soft); color: var(--cf-success); }
.badge-warning { background: var(--cf-warning-soft); color: var(--cf-warning); }
.badge-danger { background: var(--cf-danger-soft); color: var(--cf-danger-hover); }
.badge-primary { background: var(--cf-primary-soft); color: var(--cf-primary-ink); }

/* ---------- 7. Alertas / mensagens ---------- */
.alert, .flash, .estq-flash {
  display: flex; gap: .6rem; align-items: flex-start;
  padding: .8rem 1rem; border-radius: var(--cf-r); margin: 0 0 var(--cf-sp-4);
  font-size: var(--cf-fs-sm); line-height: 1.45; border: 1px solid var(--cf-line);
  background: var(--cf-surface);
}
.alert-success, .flash.ok, .estq-flash.ok { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.alert-error, .flash.error, .flash.err, .estq-flash.err { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.alert-info { background: #f0f7ff; border-color: #bfdbfe; color: #1e3a8a; }

/* ---------- 8. Formulários ---------- */
.field { margin: 0 0 var(--cf-sp-4); }
.label, .admin-form label, .crm-form label, .ofc-form label, .crm-chat-send label {
  display: block; margin: 0 0 .35rem;
  font-size: var(--cf-fs-sm); font-weight: 600; color: var(--cf-ink-2);
  text-transform: none; letter-spacing: 0;
}
.admin-form label, .crm-form label { margin-top: var(--cf-sp-4); }
.hint, .ofc-hint { font-size: var(--cf-fs-xs); color: var(--cf-muted); margin: .35rem 0 0; line-height: 1.4; }
.input, .select, .textarea,
.admin-form input:not([type=checkbox]):not([type=radio]):not([type=file]),
.admin-form select, .admin-form textarea,
.crm-form input, .crm-form select, .crm-form textarea,
.ofc-form input, .ofc-form select, .ofc-form textarea,
.crm-chat-send textarea, .estq-search, .estq-input {
  width: 100%; min-height: 2.5rem; padding: .55rem .75rem;
  border: 1px solid var(--cf-line-strong); border-radius: var(--cf-r);
  background: var(--cf-surface); color: var(--cf-ink);
  font: 400 var(--cf-fs-sm)/1.4 var(--cf-font); box-sizing: border-box;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.admin-form input, .admin-form select, .admin-form textarea { max-width: 34rem; }
.input:hover, .select:hover, .textarea:hover { border-color: #94a3b8; }
.input:focus, .select:focus, .textarea:focus,
.admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus,
.crm-form input:focus, .crm-form select:focus, .crm-form textarea:focus,
.ofc-form input:focus, .ofc-form select:focus, .ofc-form textarea:focus,
.crm-chat-send textarea:focus, .estq-search:focus, .estq-input:focus {
  outline: none; border-color: var(--cf-primary); box-shadow: var(--cf-focus);
}
textarea.input, .textarea, .admin-form textarea, .crm-form textarea, .ofc-form textarea { min-height: 5rem; resize: vertical; }
.form-actions, .ofc-actions {
  display: flex; flex-wrap: wrap; gap: var(--cf-sp-2); align-items: center; margin-top: var(--cf-sp-6);
}
.form-actions .btn-danger, .ofc-actions .btn-danger { margin-left: auto; }

/* ---------- 9. Tabelas ---------- */
.cf-table, .admin-table, .estq-table {
  width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--cf-fs-sm);
}
.cf-table th, .admin-table th, .estq-table th {
  position: sticky; top: 0; z-index: 1;
  background: var(--cf-surface-2); color: var(--cf-muted);
  font-size: var(--cf-fs-xs); font-weight: 600; text-align: left; white-space: nowrap;
  padding: .65rem .8rem; border-bottom: 1px solid var(--cf-line);
}
.cf-table td, .admin-table td, .estq-table td {
  padding: .7rem .8rem; border-bottom: 1px solid var(--cf-line); vertical-align: middle; text-align: left;
}
.cf-table tbody tr:last-child td, .admin-table tbody tr:last-child td, .estq-table tbody tr:last-child td { border-bottom: 0; }
.cf-table tbody tr:hover td, .admin-table tbody tr:hover td, .estq-table tbody tr:hover td { background: #f8fafc; }
.table-wrap { background: var(--cf-surface); border: 1px solid var(--cf-line); border-radius: var(--cf-r-lg); overflow: auto; box-shadow: var(--cf-sh-1); }

/* ---------- 10. Estado vazio ---------- */
.empty {
  text-align: center; padding: var(--cf-sp-10) var(--cf-sp-6);
  color: var(--cf-muted); font-size: var(--cf-fs-sm);
}
.empty h3 { color: var(--cf-ink); font-size: var(--cf-fs-lg); margin: 0 0 var(--cf-sp-2); }
.empty p { margin: 0 auto var(--cf-sp-4); max-width: 46ch; }

/* ---------- 11. Estrutura do painel ---------- */
.app {
  display: grid; grid-template-columns: var(--cf-sidebar-w) minmax(0, 1fr); min-height: 100vh;
  background: linear-gradient(90deg,
    var(--cf-surface) 0 calc(var(--cf-sidebar-w) - 1px),
    var(--cf-line) calc(var(--cf-sidebar-w) - 1px) var(--cf-sidebar-w),
    var(--cf-bg) var(--cf-sidebar-w));
}
.app-sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: var(--cf-sp-1);
  padding: var(--cf-sp-4) var(--cf-sp-3); background: var(--cf-surface);
  border-right: 1px solid var(--cf-line);
}
.app-brand {
  display: flex; align-items: center; gap: .65rem; padding: .25rem .5rem var(--cf-sp-4);
  text-decoration: none; color: var(--cf-ink);
}
.app-brand img { width: 2.25rem; height: 2.25rem; }
.app-brand strong { display: block; font-size: .95rem; line-height: 1.15; letter-spacing: .01em; }
.app-brand strong em { font-style: normal; color: var(--cf-primary); }
.app-brand span { display: block; font-size: var(--cf-fs-xs); color: var(--cf-muted); }
.cf-body .app-brand { color: var(--cf-ink); }

.nav-section { margin-top: var(--cf-sp-3); }
.nav-section-title {
  display: flex; align-items: baseline; justify-content: space-between; gap: .5rem;
  padding: 0 .75rem; margin: 0 0 .3rem;
  font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--cf-muted);
}
.nav-section-title small { font-size: .68rem; font-weight: 500; letter-spacing: 0; text-transform: none; }
.cf-body .nav-link, .nav-link {
  display: flex; align-items: center; gap: .65rem; min-height: 2.35rem;
  padding: .45rem .75rem; border-radius: var(--cf-r);
  color: var(--cf-ink-2); font-size: var(--cf-fs-sm); font-weight: 500; text-decoration: none;
}
.nav-link svg { width: 1.1rem; height: 1.1rem; flex-shrink: 0; color: #64748b; }
.cf-body .nav-link:hover { background: var(--cf-surface-2); color: var(--cf-ink); }
.cf-body .nav-link.is-active { background: var(--cf-primary-soft); color: var(--cf-primary-ink); font-weight: 600; }
.nav-link.is-active svg { color: var(--cf-primary); }
.app-sidebar-foot { margin-top: auto; padding-top: var(--cf-sp-4); border-top: 1px solid var(--cf-line); }
.app-user { padding: .25rem .75rem .5rem; font-size: var(--cf-fs-xs); color: var(--cf-muted); }
.app-user strong { display: block; color: var(--cf-ink); font-size: var(--cf-fs-sm); }

.app-main { min-width: 0; padding: var(--cf-sp-8) var(--cf-sp-8) var(--cf-sp-10); }
.app-content { max-width: 1200px; margin: 0 auto; }
.app-topbar { display: none; }
.app-scrim { display: none; }

@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; background: var(--cf-bg); }
  .app-sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 70; width: min(86vw, 300px); height: 100dvh;
    transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--cf-sh-3);
  }
  .app.nav-open .app-sidebar { transform: none; }
  .app.nav-open .app-scrim {
    display: block; position: fixed; inset: 0; z-index: 65; background: rgb(15 23 42 / .45);
  }
  .app-topbar {
    position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: .5rem;
    min-height: 3.5rem; padding: .4rem .75rem; background: var(--cf-surface);
    border-bottom: 1px solid var(--cf-line);
  }
  .app-topbar .app-brand { padding: 0; }
  .app-menu-btn {
    display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem;
    border: 0; border-radius: var(--cf-r); background: transparent; color: var(--cf-ink); cursor: pointer;
  }
  .app-menu-btn:hover { background: var(--cf-surface-2); }
  .app-menu-btn svg { width: 1.4rem; height: 1.4rem; }
  .app-main { padding: var(--cf-sp-5) var(--cf-sp-4) var(--cf-sp-10); }
  .page-head h1 { font-size: var(--cf-fs-xl); }
}

/* ---------- 12. Login ---------- */
.auth-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: var(--cf-sp-6);
  background:
    radial-gradient(900px 420px at 12% -8%, rgb(10 88 224 / .14), transparent 60%),
    var(--cf-bg);
}
.auth-card, .estq-login-card {
  width: min(100%, 400px); background: var(--cf-surface); border: 1px solid var(--cf-line);
  border-radius: var(--cf-r-xl); padding: var(--cf-sp-8) var(--cf-sp-6) var(--cf-sp-6);
  box-shadow: var(--cf-sh-3);
}
.estq-login-wrap { min-height: 100vh; display: grid; place-items: center; padding: var(--cf-sp-6); background: var(--cf-bg); }
.estq-login-card h1 { font-size: var(--cf-fs-lg); margin: 0 0 .35rem; }
.estq-login-card p { margin: 0 0 var(--cf-sp-4); color: var(--cf-muted); font-size: var(--cf-fs-sm); line-height: 1.45; }
.estq-login-card label { display: block; font-size: var(--cf-fs-sm); font-weight: 600; color: var(--cf-ink-2); margin-bottom: .35rem; }
.estq-login-card input { margin-bottom: var(--cf-sp-4); }
.estq-login-card button { width: 100%; }

/* ---------- 13. Componentes legados do painel (estoque / CRM / oficina) ---------- */
.estq-main { max-width: 1200px; margin: 0 auto; }
.estq-meta { color: var(--cf-muted); font-size: var(--cf-fs-sm); margin: .15rem 0 0; }
.estq-sub { color: var(--cf-muted); font-size: var(--cf-fs-xs); margin-top: .1rem; }
.estq-title { font-weight: 600; }
.estq-hint { color: var(--cf-muted); font-size: var(--cf-fs-xs); }
.estq-table { min-width: 960px; }
.estq-table th, .estq-table td { padding-inline: .45rem; }
.estq-table th:first-child, .estq-table td:first-child { padding-left: .8rem; }
.estq-carcell { display: flex; gap: .65rem; align-items: center; min-width: 17rem; }
.estq-thumb {
  width: 72px; height: 54px; object-fit: cover; border-radius: var(--cf-r-sm);
  border: 1px solid var(--cf-line); background: var(--cf-surface-2); flex-shrink: 0;
}
.estq-thumb-ph {
  width: 72px; height: 54px; border-radius: var(--cf-r-sm); border: 1px solid var(--cf-line);
  background: var(--cf-surface-2); display: grid; place-items: center; flex-shrink: 0;
  color: var(--cf-muted); font-size: var(--cf-fs-xs);
}
.estq-input { width: 5.4rem; min-height: 2.25rem; padding: .3rem .45rem; font-variant-numeric: tabular-nums; }
.estq-input.nota { width: 8rem; }
.estq-search { width: auto; min-width: 15rem; }
.estq-pos { color: var(--cf-success); font-weight: 600; }
.estq-neg { color: var(--cf-danger); font-weight: 600; }

/* Locação */
.thumb { width: 64px; height: 40px; object-fit: cover; border-radius: var(--cf-r-sm); border: 1px solid var(--cf-line); }
.mt-8 { margin-top: 2rem; }
.mb-8 { margin-bottom: 2rem; }
.admin-form { max-width: 46rem; }
.admin-form h2, .admin-form h3 { font-size: var(--cf-fs-lg); margin: var(--cf-sp-8) 0 var(--cf-sp-2); }

/* Etapa 4 — estoque: rótulos, sem foto, alterações pendentes */
.estq-th-sub { display:block; font-weight:400; font-size:.68rem; text-transform:none; letter-spacing:0; color:var(--muted-foreground, #64748b); margin-top:.1rem; }
.estq-thumb-ph { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.15rem; color:var(--muted-foreground, #94a3b8); font-size:.6rem; text-align:center; }
.estq-table tr.is-dirty { background:#fffbeb; }
.estq-input.is-dirty { border-color:#d97706; box-shadow:0 0 0 1px #d97706 inset; }
.btn[aria-busy="true"] { cursor:progress; opacity:.75; }

/* ── Etapa 5 — celular ─────────────────────────────────────────────────────
   Tabelas do painel viram cartões (rótulo vem do cabeçalho via data-label, preenchido em JS)
   e alvos de toque com 44 px. */
@media (max-width: 900px) {
  .admin-table, .estq-table { min-width: 0 !important; width: 100%; border: 0 !important; background: transparent !important; }
  .admin-table thead, .estq-table thead {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  .admin-table tbody, .estq-table tbody { display: block; }
  .admin-table tbody tr, .estq-table tbody tr {
    display: block; border: 1px solid var(--border, #e2e8f0); border-radius: .75rem;
    background: var(--card, #fff); padding: .7rem .9rem; margin: 0 0 .75rem;
  }
  .admin-table tbody tr:hover td, .estq-table tbody tr:hover td { background: transparent; }
  .admin-table td, .estq-table td {
    display: grid; grid-template-columns: minmax(6.5rem, 38%) minmax(0, 1fr); gap: .25rem .6rem; align-items: center;
    padding: .3rem 0 !important; border: 0 !important; white-space: normal !important; text-align: left !important;
    max-width: none !important; min-width: 0;
  }
  .admin-table td::before, .estq-table td::before {
    content: attr(data-label); font-size: .72rem; font-weight: 600; color: var(--muted-foreground, #64748b); line-height: 1.3;
  }
  .admin-table td:first-child, .estq-table td:first-child,
  .admin-table td:not([data-label]), .estq-table td:not([data-label]),
  .admin-table td[data-label=""], .estq-table td[data-label=""],
  .admin-table td[colspan], .estq-table td[colspan] { grid-template-columns: minmax(0, 1fr); }
  .admin-table td:first-child::before, .estq-table td:first-child::before,
  .admin-table td:not([data-label])::before, .estq-table td:not([data-label])::before,
  .admin-table td[data-label=""]::before, .estq-table td[data-label=""]::before,
  .admin-table td[colspan]::before, .estq-table td[colspan]::before { display: none; }
  .admin-table td:first-child, .estq-table td:first-child { padding-bottom: .45rem !important; font-size: .95rem; }
  /* Coluna marcada como título (ex.: cliente) sobe para o topo do cartão; a 1ª coluna volta a ter rótulo */
  .admin-table tbody tr:has(.cf-titulo), .estq-table tbody tr:has(.cf-titulo) { display: flex; flex-direction: column; }
  .admin-table td.cf-titulo, .estq-table td.cf-titulo { order: -1; grid-template-columns: minmax(0, 1fr); padding-bottom: .45rem !important; font-size: .95rem; }
  .admin-table td.cf-titulo::before, .estq-table td.cf-titulo::before { display: none; }
  .admin-table tr:has(.cf-titulo) td:first-child:not(.cf-titulo),
  .estq-table tr:has(.cf-titulo) td:first-child:not(.cf-titulo) { grid-template-columns: minmax(6.5rem, 38%) minmax(0, 1fr); padding-bottom: .3rem !important; font-size: inherit; }
  .admin-table tr:has(.cf-titulo) td:first-child:not(.cf-titulo)::before,
  .estq-table tr:has(.cf-titulo) td:first-child:not(.cf-titulo)::before { display: block; }
  .admin-table td:last-child .btn, .estq-table td:last-child .btn { width: 100%; justify-content: center; }
  .estq-table .estq-input { width: 100%; }
  .cf-valor { min-width: 0; }
  .cf-valor .orc-nw, .cf-valor .estq-sub { white-space: normal; }
  .estq-table tr.is-dirty { background: #fffbeb; }
  .estq-card { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .crm-hide-sm { display: grid !important; }
  #crm-fila .col-extra { display: none !important; }
  #crm-fila.mais .col-extra { display: grid !important; }

  /* toque: 44 px */
  .btn, .btn-sm, .nav-link, .chip, .crm-filters a, .input, .select, .estq-input, .estq-search,
  .admin-form input, .admin-form select, .crm-form input, .crm-form select,
  input[type=text], input[type=search], input[type=email], input[type=tel], input[type=number], input[type=date], select {
    min-height: 44px !important; height: auto !important;
  }
  .btn-sm { padding-block: .5rem; }
  /* formulários com grade fixa de 2–3 colunas: uma coluna no celular */
  form div[style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; max-width: 100% !important; }
  form input, form select, form textarea { max-width: 100%; }
  .crm-filters a { display: inline-flex; align-items: center; }
  input[type=checkbox] { width: 22px; height: 22px; }
}

/* Site da locação: e-mail longo no rodapé não empurra a página */
footer a { overflow-wrap: anywhere; }

/* Site da locação: menu do celular */
.site-menu-btn { display: none; }
.site-menu { display: none; }
@media (max-width: 767px) {
  .site-menu-btn {
    display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
    border: 1px solid var(--border, #e2e8f0); border-radius: .6rem; background: var(--background, #fff); color: inherit;
  }
  /* O cabeçalho tem backdrop-filter: isso faz ele ser a referência de position:fixed dos filhos.
     Por isso o menu é absolute logo abaixo do cabeçalho, com a altura da tela. */
  .site-menu { position: absolute; top: 100%; left: 0; right: 0; height: calc(100vh - 4rem); height: calc(100dvh - 4rem); z-index: 60; background: #fff; padding: 1rem 1.25rem 2rem; overflow-y: auto; border-top: 1px solid var(--border, #e2e8f0); box-shadow: 0 12px 24px rgba(15, 23, 42, .08); }
  .site-menu.is-open { display: block; }
  .site-menu a { display: flex; align-items: center; min-height: 48px; padding: 0 .25rem; font-size: 1.05rem; font-weight: 500; border-bottom: 1px solid var(--border, #e2e8f0); color: inherit; text-decoration: none; }
  .site-menu a.is-atual { color: var(--primary, #0a58e0); }
  .site-menu .site-menu-cta { margin-top: 1.25rem; justify-content: center; border: 0; border-radius: .6rem; color: #fff; background: var(--primary, #0a58e0); }
  body.site-menu-aberto { overflow: hidden; }
  .site-publico a.inline-flex, .site-publico form button, .site-publico .btn { min-height: 44px; }
}
/* Botões do formulário do site: a classe h-11 do Tailwind não está no CSS compilado */
.site-publico form button.h-11 { min-height: 44px; }

/* ── Etapa 6 — site da locação ─────────────────────────────────────────── */
.site-publico form input:not([type=checkbox]):not([type=radio]), .site-publico form select, .site-publico form textarea { min-height: 44px; }
.site-publico .cf-alvo { min-height: 44px; }
.cf-btn-whats { background: #15803d; color: #fff !important; } /* 5:1 com texto branco */
.cf-btn-whats:hover { background: #166534; }
.cf-btn-sec { border: 1px solid var(--border, #e2e8f0); background: var(--background, #fff); color: inherit; }
.cf-btn-sec:hover { background: var(--accent, #f1f5f9); }
.cf-mapa { width: 100%; aspect-ratio: 16 / 10; border: 0; border-radius: .75rem; background: #eef2f7; }
.cf-card-site { border: 1px solid var(--border, #e2e8f0); border-radius: .9rem; background: var(--card, #fff); padding: 1.25rem 1.35rem; }
.cf-preco { font-variant-numeric: tabular-nums; white-space: nowrap; }

.cf-alvo { padding-inline: 1.25rem; }


/* ── Etapa 7 — acessibilidade e acabamento ─────────────────────────────── */
/* Pular para o conteúdo: aparece só ao navegar pelo teclado (Tab). */
.cf-pular { position: absolute; left: .75rem; top: -4rem; z-index: 100; padding: .75rem 1rem; border-radius: .5rem;
  background: #0f172a; color: #fff !important; font-weight: 600; text-decoration: none; transition: top .15s; }
.cf-pular:focus { top: .75rem; }
main[tabindex="-1"]:focus { outline: none; }
/* Links no meio do texto: sublinhados (não depender só da cor). */
:where(.cf-body) :is(p, li, .alert, .hint, .empty, td) a:not(.btn):not(.nav-link) { text-decoration: underline; text-underline-offset: 2px; }
/* Rodapé escuro do site: azul mais claro para ter contraste. */
.cf-azul-claro { color: #60a5fa; }
.site-rodape a:hover { color: #93c5fd; }
/* Login: mostrar senha, Caps Lock e "Esqueci a senha". */
.cf-senha { position: relative; }
.cf-senha .input { padding-right: 6rem; }
.cf-senha-btn { position: absolute; right: .25rem; top: 50%; transform: translateY(-50%); min-height: 40px; min-width: 5rem; padding: 0 .75rem;
  border: 0; border-radius: var(--cf-r-sm, .375rem); background: transparent; color: var(--cf-primary, #0a58e0); font: inherit; font-size: var(--cf-fs-sm, .875rem); font-weight: 600; cursor: pointer; }
.cf-senha-btn:hover { background: #eef4ff; }
.cf-caps:empty { display: none; }
.cf-caps { color: #92400e; font-weight: 600; }
.cf-esqueci { margin-top: var(--cf-sp-5, 1.25rem); font-size: var(--cf-fs-sm, .875rem); }
.cf-esqueci summary { cursor: pointer; color: var(--cf-primary, #0a58e0); font-weight: 600; min-height: 44px; display: flex; align-items: center; width: fit-content; }
.cf-esqueci p { margin: .25rem 0 .5rem; color: var(--cf-ink-2, #334155); line-height: 1.5; }
