/* Meu Churrasco — paleta inspirada em brasa: vermelho/laranja/marrom escuro */
:root {
  --c-fire: #d94814;
  --c-fire-dark: #a8350a;
  --c-ember: #f59e0b;
  --c-charcoal: #1c1917;
  --c-smoke: #44403c;
  --c-mist: #fafaf9;
  --c-paper: #ffffff;
  --c-line: #e7e5e4;
  --c-text: #1c1917;
  --c-muted: #78716c;
  --c-success: #16a34a;
  --c-warning: #f59e0b;
  --c-danger: #dc2626;
  --c-info: #2563eb;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.12);
  --radius: 10px;
  --radius-lg: 18px;
  --maxw: 1180px;
  --header-h: 68px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--c-text);
  background: var(--c-mist);
  line-height: 1.55;
  font-size: 16px;
}
a { color: var(--c-fire-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--c-muted); }

/* Topbar */
.topbar {
  background: var(--c-paper);
  border-bottom: 1px solid var(--c-line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
}
.brand {
  font-weight: 800; font-size: 1.25rem; color: var(--c-charcoal);
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
}
.brand-emoji { font-size: 1.5rem; }
.topnav { display: flex; gap: 24px; }
.topnav a { color: var(--c-smoke); font-weight: 500; }
.topnav a:hover { color: var(--c-fire); text-decoration: none; }
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.logout-form { display: inline; margin: 0; }

@media (max-width: 720px) {
  .topnav { display: none; }
}

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  /* Touch target mínimo 44px altura (Apple HIG / WCAG 2.5.5) */
  min-height: 44px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s ease;
  text-decoration: none;
  font-family: inherit;
}
.btn-primary { background: var(--c-fire); color: white; }
.btn-primary:hover { background: var(--c-fire-dark); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--c-smoke); }
.btn-ghost:hover { background: var(--c-line); text-decoration: none; }
.btn-outline { background: transparent; color: var(--c-fire); border-color: var(--c-fire); }
.btn-outline:hover { background: var(--c-fire); color: white; text-decoration: none; }
.btn-success { background: var(--c-success); color: white; }
.btn-success:hover { filter: brightness(.92); text-decoration: none; }
.btn-danger { background: var(--c-danger); color: white; }
.btn-block { display: flex; width: 100%; }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }

/* Mensagens flash */
.messages { margin-top: 16px; }
.msg {
  padding: 12px 16px; border-radius: var(--radius);
  margin-bottom: 10px;
  border-left: 4px solid var(--c-info);
  background: #eff6ff;
}
.msg-success { background: #f0fdf4; border-color: var(--c-success); }
.msg-warning { background: #fffbeb; border-color: var(--c-warning); }
.msg-danger, .msg-error { background: #fef2f2; border-color: var(--c-danger); }

/* Main */
.main { min-height: calc(100vh - var(--header-h) - 280px); padding: 32px 0 64px; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--c-fire) 0%, var(--c-fire-dark) 60%, var(--c-charcoal) 100%);
  color: white;
  padding: 80px 0 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(245,158,11,.25), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(245,158,11,.18), transparent 40%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 800px; margin: 0 auto; padding: 0 24px; }
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin: 0 0 16px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.02em;
}
.hero p.lead {
  font-size: clamp(1rem, 2vw, 1.25rem);
  opacity: .95;
  margin: 0 0 32px;
}
.hero-stats {
  display: flex; justify-content: center; gap: 40px;
  margin-top: 32px; flex-wrap: wrap;
  font-size: .95rem; opacity: .9;
}
.hero-stat strong { font-size: 1.5rem; display: block; }

/* Search bar */
.search-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  max-width: 720px;
  margin: -50px auto 32px;
  position: relative; z-index: 2;
}
.search-card .input, .search-card select { border: 1px solid var(--c-line); }
@media (max-width: 720px) {
  .search-card { grid-template-columns: 1fr; }
}

/* Inputs */
.input, input[type="text"], input[type="email"], input[type="password"], input[type="url"],
input[type="tel"], input[type="number"], select, textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  background: white;
  transition: border-color .15s;
}
.input:focus, input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--c-fire);
  box-shadow: 0 0 0 3px rgba(217,72,20,.15);
}
textarea { resize: vertical; min-height: 90px; }

/* Form genérico */
.form-grid { display: grid; gap: 16px; }
.form-row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--c-smoke); }
.field .helptext { display: block; font-size: .85rem; color: var(--c-muted); margin-top: 4px; }
.field .errorlist { color: var(--c-danger); font-size: .9rem; list-style: none; padding: 0; margin: 6px 0 0; }
.field ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.field ul label { font-weight: 400; display: inline; margin-left: 6px; color: var(--c-text); }
.field ul li { display: flex; align-items: center; }

.section-title { font-size: 1.4rem; margin: 32px 0 16px; font-weight: 700; }
.section-title-lg { font-size: 1.8rem; margin: 48px 0 20px; font-weight: 800; }

/* Cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.card-assador {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-line);
  transition: transform .15s, box-shadow .15s;
  display: flex; flex-direction: column;
}
.card-assador:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); text-decoration: none; }
.card-cover {
  height: 180px; background: linear-gradient(135deg, var(--c-ember), var(--c-fire));
  background-size: cover; background-position: center;
  position: relative;
}
.card-cover-empty { display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.card-title { font-weight: 700; font-size: 1.1rem; color: var(--c-charcoal); margin: 0; }
.card-meta { font-size: .9rem; color: var(--c-muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  font-size: .75rem;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 600;
}
.tag-fire { background: #fee2e2; color: #991b1b; }
.tag-success { background: #dcfce7; color: #166534; }
.card-price {
  margin-top: auto;
  font-weight: 700;
  color: var(--c-fire-dark);
  font-size: 1rem;
}
.card-price small { font-weight: 400; color: var(--c-muted); }

/* Filtros sidebar */
.busca-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
}
@media (max-width: 900px) { .busca-layout { grid-template-columns: 1fr; } }
.filtros {
  background: white;
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-line);
  height: fit-content;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}
/* Em mobile o layout já virou 1 coluna — sticky nos filtros não faz sentido e cria scroll-locking */
@media (max-width: 900px) {
  .filtros { position: static; }
}
.filtros h3 { margin: 0 0 16px; font-size: 1.1rem; }
.filtros .field { margin-bottom: 14px; }
.busca-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.busca-empty { text-align: center; padding: 60px 20px; background: white; border-radius: var(--radius-lg); }

/* Detalhe do assador */
.perfil-hero {
  background: var(--c-paper);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  border: 1px solid var(--c-line);
}
.perfil-cover {
  height: 260px;
  background: linear-gradient(135deg, var(--c-fire), var(--c-fire-dark));
  background-size: cover; background-position: center;
}
.perfil-body { padding: 24px; display: grid; grid-template-columns: 140px 1fr auto; gap: 24px; align-items: center; }
@media (max-width: 720px) { .perfil-body { grid-template-columns: 1fr; text-align: center; } }
.perfil-foto {
  width: 140px; height: 140px; border-radius: 50%;
  border: 4px solid white; box-shadow: var(--shadow-md);
  margin-top: -90px; background: var(--c-line);
  object-fit: cover;
}
.perfil-foto.empty { display: flex; align-items: center; justify-content: center; font-size: 4rem; background: var(--c-fire); color: white; }
.perfil-info h1 { margin: 0 0 6px; font-size: 1.8rem; }
.perfil-info .perfil-loc { color: var(--c-muted); display: flex; gap: 6px; align-items: center; }
.perfil-actions { display: flex; flex-direction: column; gap: 8px; }
.badge-verified { display: inline-flex; align-items: center; gap: 4px; background: var(--c-success); color: white; padding: 4px 10px; border-radius: 999px; font-size: .85rem; font-weight: 600; }

/* Galeria */
.galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
@media (max-width: 480px) {
  /* Em 320-480px, minmax(180px,1fr) colapsaria para 1 coluna gigante.
     Reduzir para 110px permite 2-3 itens por linha. */
  .galeria { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}
.galeria-item { aspect-ratio: 1; overflow: hidden; border-radius: var(--radius); }
.galeria-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.galeria-item:hover img { transform: scale(1.05); }

/* Menus */
.menus-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.menu-card { background: white; border-radius: var(--radius); padding: 20px; border: 1px solid var(--c-line); }
.menu-card.featured { border-color: var(--c-fire); position: relative; }
.menu-card.featured::before {
  content: "Premium";
  position: absolute; top: -10px; right: 14px;
  background: var(--c-fire); color: white; font-size: .75rem;
  padding: 4px 10px; border-radius: 999px; font-weight: 700;
}
.menu-card h3 { margin: 0 0 4px; }
.menu-card .menu-price { font-size: 1.5rem; font-weight: 800; color: var(--c-fire-dark); margin: 8px 0; }
.menu-card .menu-price small { font-weight: 400; font-size: .85rem; color: var(--c-muted); }
.menu-card .menu-features { list-style: none; padding: 0; margin: 12px 0 0; font-size: .9rem; }
.menu-card .menu-features li { padding: 3px 0; }
.menu-card .menu-features li::before { content: "✓ "; color: var(--c-success); font-weight: 700; }
.menu-card .menu-features li.no::before { content: "✗ "; color: var(--c-muted); }

/* Painel do assador */
.painel-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--c-line); margin-bottom: 24px; }
.painel-tabs a { padding: 12px 16px; color: var(--c-muted); font-weight: 600; border-bottom: 2px solid transparent; }
.painel-tabs a.active { color: var(--c-fire); border-color: var(--c-fire); text-decoration: none; }

.box {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-line);
  margin-bottom: 20px;
}
.box h2 { margin-top: 0; }

/* Auth (login/cadastro) */
.auth-page { max-width: 480px; margin: 32px auto; }
.auth-card { background: white; padding: 32px; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.auth-card h1 { margin: 0 0 8px; font-size: 1.5rem; }

/* Estilos em pílulas (home) */
.estilos-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.estilo-pill {
  background: white; border: 1px solid var(--c-line);
  padding: 16px; border-radius: var(--radius);
  text-align: center; transition: all .15s; color: var(--c-text);
}
.estilo-pill:hover { border-color: var(--c-fire); transform: translateY(-2px); text-decoration: none; box-shadow: var(--shadow-md); }
.estilo-pill .estilo-icone { font-size: 2rem; display: block; margin-bottom: 6px; }
.estilo-pill .estilo-nome { font-weight: 600; }
.estilo-pill .estilo-qtd { font-size: .85rem; color: var(--c-muted); }

/* Como funciona */
.passos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; margin: 32px 0; }
.passo { text-align: center; padding: 24px; }
.passo .passo-num {
  display: inline-flex; width: 48px; height: 48px;
  background: var(--c-fire); color: white;
  border-radius: 50%; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.3rem;
  margin-bottom: 12px;
}

/* CTA */
.cta-banner {
  background: linear-gradient(135deg, var(--c-charcoal), var(--c-smoke));
  color: white;
  padding: 60px 24px;
  border-radius: var(--radius-lg);
  text-align: center;
  margin: 48px 0;
}
.cta-banner h2 { margin: 0 0 12px; font-size: 1.8rem; }
.cta-banner p { opacity: .9; margin: 0 0 24px; }

/* Paginação */
.paginacao { display: flex; justify-content: center; gap: 6px; margin-top: 32px; flex-wrap: wrap; }
.paginacao a, .paginacao span {
  /* Touch target mínimo 44px × 44px (Apple HIG / WCAG 2.5.5) */
  min-width: 44px; min-height: 44px;
  padding: 10px 14px; border: 1px solid var(--c-line);
  border-radius: var(--radius); background: white; color: var(--c-text);
  display: inline-flex; align-items: center; justify-content: center;
}
.paginacao .current { background: var(--c-fire); color: white; border-color: var(--c-fire); }
.paginacao a:hover { background: var(--c-mist); text-decoration: none; }

/* Footer */
.footer {
  background: var(--c-charcoal);
  color: #e7e5e4;
  padding: 48px 0 24px;
  margin-top: 64px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-inner { grid-template-columns: 1fr; } }
.footer .brand { color: white; margin: 0 0 8px; }
.footer strong { display: block; margin-bottom: 10px; color: white; }
.footer a { display: block; color: #d6d3d1; margin-bottom: 6px; }
.footer a:hover { color: var(--c-ember); text-decoration: none; }
.footer .muted { color: #a8a29e; }
.footer-bottom { border-top: 1px solid #44403c; padding-top: 16px; text-align: center; }

/* Utilitários */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: 32px; }
.mb-4 { margin-bottom: 32px; }
.flex { display: flex; }
.gap-2 { gap: 16px; }
.gap-1 { gap: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ===== Painel do assador ===== */
.painel-assador { padding-bottom: 96px; }

.form-perfil { display: block; }

.form-section {
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: 10px;
  padding: 24px 24px 20px;
  margin-bottom: 20px;
  display: grid;
  gap: 16px;
}
.form-section-head { margin-bottom: 4px; }
.form-section-head h2 {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--c-charcoal);
}
.form-section-head p { margin: 0; font-size: .9rem; }
.muted-tag { color: var(--c-muted); font-size: .85rem; font-weight: 500; }
.req { color: var(--c-fire); font-weight: 700; }

.field-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 640px) {
  .field-grid-2, .field-grid-3 { grid-template-columns: 1fr; }
}

.field-checkbox .inline-check {
  display: flex; align-items: flex-start; gap: 10px;
  font-weight: 400; color: var(--c-text);
}
.field-checkbox .inline-check input { margin-top: 4px; }

.checkbox-grid ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.checkbox-grid ul li { display: flex; align-items: center; }

.image-preview-wrap {
  display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap;
}
.image-preview {
  width: 120px; height: 120px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--c-line);
  background: var(--c-mist);
}
.image-preview-empty {
  display: flex; align-items: center; justify-content: center;
  color: var(--c-muted);
  font-size: .8rem;
}
.image-preview-input { flex: 1 1 220px; min-width: 0; }
@media (max-width: 480px) {
  .image-preview-input { flex: 1 1 100%; width: 100%; }
  .image-preview-wrap { flex-direction: column; }
}

.sticky-save-bar {
  position: sticky;
  bottom: 0;
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: 10px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
  margin-top: 8px;
  z-index: 10;
}
.sticky-save-bar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 20px; flex-wrap: wrap;
}
.dirty-indicator { color: var(--c-warning); font-weight: 600; font-size: .9rem; }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.checklist li a { display: block; padding: 4px 0; color: var(--c-text); }
.checklist li a:hover { color: var(--c-fire); text-decoration: none; }
.checklist li.done a { color: var(--c-muted); }
.checklist-box hr { border: 0; border-top: 1px solid var(--c-line); margin: 16px 0 12px; }

/* ===== Hero do PAINEL do assador (capa + avatar editáveis) =====
   Distinto de .perfil-hero (usado em detalhe.html público). */
.painel-hero {
  position: relative;
  margin: 16px 0 80px;
}

.painel-capa {
  position: relative;
  width: 100%;
  height: 220px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #fbeacf 0%, #f3c79e 60%, #d9531e 100%);
  border: 1px solid var(--c-line);
}
.painel-capa-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.painel-capa-vazia {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5b3a17;
  font-weight: 600;
  text-align: center;
  padding: 0 24px;
}
.painel-capa-acoes {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  z-index: 2;
}
.painel-capa-acoes .inline-form { display: inline-flex; margin: 0; }

.painel-avatar-wrap {
  position: absolute;
  bottom: -68px;
  left: 24px;
  display: flex;
  align-items: flex-end;
  gap: 16px;
}
.painel-avatar {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--c-paper, #fff);
  background: var(--c-mist, #f1ede8);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}
.painel-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.painel-avatar-vazio {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  color: var(--c-fire, #d9531e);
  background: var(--c-mist, #f1ede8);
}
.painel-avatar-acoes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 8px;
}
.painel-avatar-acoes .inline-form { display: inline-flex; margin: 0; }

@media (max-width: 640px) {
  .painel-capa { height: 160px; }
  .painel-avatar { width: 96px; height: 96px; }
  .painel-avatar-wrap { bottom: -52px; left: 16px; flex-direction: column; align-items: flex-start; gap: 8px; }
  .painel-avatar-acoes { padding-bottom: 0; }
  .painel-hero { margin-bottom: 110px; }
}

.galeria-box .galeria-item { position: relative; }
.galeria-item-remover-form {
  position: absolute;
  top: 4px;
  right: 4px;
  margin: 0;
}
.galeria-item-remover {
  background: rgba(0, 0, 0, .65);
  color: #fff !important;
  border: none;
  border-radius: 50%;
  /* Touch target mínimo 44×44px — visualmente menor graças ao padding transparente */
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  text-decoration: none;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.galeria-item-remover:hover { background: var(--c-danger, #b71c1c); }
.galeria-item-remover:active { background: var(--c-danger, #b71c1c); opacity: .85; }
/* Versão desktop: botão menor visualmente mas mantendo área clicável */
@media (min-width: 769px) {
  .galeria-item-remover {
    width: 32px;
    height: 32px;
    /* Compensa visualmente com área de hit maior via pseudo-elemento */
    font-size: 1rem;
  }
}

.galeria-upload-rapido {
  background: var(--c-mist, #f9f7f3);
  border: 1px dashed var(--c-line);
  border-radius: 10px;
  padding: 16px;
  margin-top: 12px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== dl.resumo — wizard revisão ===== */
.resumo { margin: 16px 0; }
.resumo dt {
  font-weight: 700;
  font-size: .85rem;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-top: 14px;
}
.resumo dd {
  margin: 2px 0 0 0;
  color: var(--c-text);
  word-break: break-word; /* evita overflow de e-mail/telefone longos em 320px */
}

/* ===== Responsividade mobile — 480px e 320px ===== */

/* --- Boxes e auth-card: padding menor em telas estreitas --- */
@media (max-width: 480px) {
  .box { padding: 16px; }
  .form-section { padding: 16px 16px 14px; }
  .auth-card { padding: 20px 16px; }
  .container { padding: 0 14px; }
}

/* --- Tabelas do painel (leads e propostas): scroll horizontal com indicação visual --- */
.table-responsive-mc {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* Faixa de sombra à direita indica que há mais conteúdo */
  background:
    linear-gradient(to right, white 30%, rgba(255,255,255,0)),
    linear-gradient(to right, rgba(0,0,0,.06), rgba(0,0,0,0) 70%) 100% 0;
  background-repeat: no-repeat;
  background-color: white;
  background-size: 30px 100%, 12px 100%;
  background-attachment: local, scroll;
}
.table-responsive-mc table {
  min-width: 600px;
}

/* --- Detalhe do assador: sidebar lateral vira coluna em tablet/mobile --- */
@media (max-width: 768px) {
  /* Substitui o inline style="grid-template-columns: 1fr 320px" */
  .perfil-layout-2col {
    grid-template-columns: 1fr !important;
  }
}

/* --- .perfil-body em mobile: garantir que .perfil-foto não saia do fluxo --- */
@media (max-width: 720px) {
  .perfil-foto {
    margin-top: -60px;
    width: 100px;
    height: 100px;
    margin-left: auto;
    margin-right: auto;
  }
  .perfil-info h1 { font-size: clamp(1.3rem, 5vw, 1.8rem); }
  .perfil-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .perfil-actions .btn { width: 100%; justify-content: center; }
}

/* --- Calculadora: força 1 coluna em mobile, resultado abaixo do form --- */
@media (max-width: 768px) {
  .calc-layout-2col {
    grid-template-columns: 1fr !important;
  }
}

/* --- Wizard: botões Anterior/Avançar sticky no rodapé mobile --- */
@media (max-width: 600px) {
  .wizard-actions {
    position: sticky;
    bottom: 0;
    background: var(--c-paper);
    border-top: 1px solid var(--c-line);
    padding: 12px 0 env(safe-area-inset-bottom, 0);
    margin: 16px -14px -1px;
    padding-left: 14px;
    padding-right: 14px;
    z-index: 10;
  }
  .wizard-actions .btn { flex: 1; justify-content: center; min-height: 48px; }
}

/* --- Painel hero: títulos adaptativos --- */
.painel-hero-info h1,
.painel-info-nome {
  font-size: clamp(1.2rem, 4vw, 1.8rem);
}

/* --- Hero stats: gap menor em mobile --- */
@media (max-width: 480px) {
  .hero-stats { gap: 20px; }
  .hero-stat strong { font-size: 1.2rem; }
}

/* --- Search card: input ocupa toda a largura em mobile --- */
@media (max-width: 480px) {
  .search-card { padding: 10px; gap: 10px; }
  .search-card .btn { min-height: 48px; }
}

/* --- Menus grid: 1 coluna em < 480px --- */
@media (max-width: 480px) {
  .menus-grid { grid-template-columns: 1fr; }
  .estilos-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* --- Painel tabs: scroll horizontal em mobile --- */
@media (max-width: 600px) {
  .painel-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    gap: 0;
  }
  .painel-tabs a {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

/* --- row-between: empilhar em telas estreitas --- */
@media (max-width: 480px) {
  .row-between { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* --- sticky-save-bar: padding extra no bottom para iPhone com home bar --- */
@media (max-width: 600px) {
  .sticky-save-bar-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
  }
  .sticky-save-bar-inner > div { width: 100%; display: flex; gap: 8px; }
  .sticky-save-bar-inner > div .btn { flex: 1; justify-content: center; }
}

/* --- Foco visível para navegação por teclado --- */
:focus-visible {
  outline: 3px solid var(--c-fire);
  outline-offset: 2px;
}

/* --- Estado :active em elementos clicáveis (feedback de toque) --- */
.btn:active { opacity: .85; transform: scale(.98); }
.card-assador:active { transform: translateY(-1px); }
.estilo-pill:active { transform: translateY(-1px); }

/* ===================================================================
   PROPOSTAS — estilos mobile-first
   Cobre: detalhe.html, nova.html, editar.html, publica.html
   =================================================================== */

/* --- Layout principal detalhe (proposta + calc lateral) --- */
.proposta-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 980px) {
  .proposta-layout { grid-template-columns: 1fr; }
  .calc-lateral { position: static !important; top: auto; }
}

/* --- Calculadora lateral --- */
.calc-lateral {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

/* Desktop: inputs compactos (≥769px) */
@media (min-width: 769px) {
  .calc-lateral .form-control,
  .calc-lateral .form-select {
    font-size: 0.85rem;
    padding: 4px 8px;
  }
  .calc-lateral label { font-size: 0.8rem; }
}

/* Mobile: inputs com 16px para evitar zoom automático iOS Safari */
@media (max-width: 768px) {
  .calc-lateral .form-control,
  .calc-lateral .form-select {
    font-size: 1rem;   /* ≥16px: sem zoom iOS */
    padding: 10px 12px;
    min-height: 44px;  /* touch target */
  }
  .calc-lateral label { font-size: 0.9rem; color: var(--c-smoke); }
  .calc-lateral .field { margin-bottom: 10px; }
}

.calc-lateral label { margin-bottom: 2px; }
.calc-lateral .field { margin-bottom: 6px; }

.calc-secao h6 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-muted);
  margin-top: 14px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--c-line);
  padding-bottom: 3px;
}

/* Grid de campos da calculadora: 2 colunas no desktop, 1 coluna em mobile */
.calc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
@media (max-width: 480px) {
  .calc-row { grid-template-columns: 1fr; }
  /* Exceto convidados (homens/mulheres) que mantém 2 colunas */
  .calc-row--guests { grid-template-columns: 1fr 1fr; }
}

/* Bottom sheet colapsável da calculadora em mobile (≤980px) */
.calc-sheet-toggle { display: none; }
@media (max-width: 980px) {
  .calc-sheet-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: var(--c-charcoal);
    color: white;
    border: none;
    border-radius: var(--radius);
    padding: 14px 18px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 48px;
    margin-bottom: 0;
    font-family: inherit;
  }
  .calc-sheet-toggle:hover { background: var(--c-smoke); }
  .calc-sheet-toggle .chevron {
    transition: transform 0.25s ease;
    font-style: normal;
  }
  .calc-sheet-details[open] .calc-sheet-toggle .chevron {
    transform: rotate(180deg);
  }
  .calc-sheet-details > summary {
    list-style: none;
  }
  .calc-sheet-details > summary::-webkit-details-marker { display: none; }
  .calc-sheet-details .box {
    margin-top: 4px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }
}

/* --- Resultado da calc: aria-live para leitores de tela --- */
#calc-resultado { position: relative; }

/* Resumo do resultado */
.calc-resumo {
  background: #fff8e7;
  border-radius: 8px;
  padding: 12px;
}
.calc-resumo-preco {
  text-align: center;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(217,83,30,.2);
}
.calc-resumo-valor {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--c-fire);
  line-height: 1.1;
}
.calc-resumo-tabela { margin-top: 8px; font-size: 0.9rem; }
.calc-resumo-tabela .row,
.calc-breakdown .row {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
  margin: 0;
}

/* --- Header da proposta (título + botões de ação) --- */
.proposta-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.proposta-header-info { min-width: 0; flex: 1; }
.proposta-header-info h1 {
  margin: 0;
  font-size: clamp(1.3rem, 4vw, 1.9rem);
  line-height: 1.2;
}

/* Ações do header: botões agrupados */
.proposta-acoes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: flex-start;
}
/* Botões primários: PDF + Marcar enviada */
.proposta-acoes-primarias {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
/* Em mobile: botões empilham e ficam full-width */
@media (max-width: 600px) {
  .proposta-acoes {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }
  .proposta-acoes-primarias {
    width: 100%;
    flex-direction: column;
    gap: 8px;
  }
  .proposta-acoes .btn,
  .proposta-acoes form,
  .proposta-acoes-primarias .btn {
    width: 100%;
    display: flex;
  }
  .proposta-acoes .btn,
  .proposta-acoes-primarias .btn {
    justify-content: center;
  }
  /* Formulários inline viram bloco */
  .proposta-acoes form { display: block; }
  .proposta-acoes form .btn { width: 100%; }
}

/* Menu "mais ações" mobile — visível apenas em ≤600px */
.proposta-acoes-menu {
  position: relative;
  display: none;
}
@media (max-width: 600px) {
  .proposta-acoes-menu { display: block; width: 100%; }
}
.proposta-acoes-menu summary {
  list-style: none;
  cursor: pointer;
}
.proposta-acoes-menu summary::-webkit-details-marker { display: none; }
.proposta-acoes-menu-lista {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 200px;
  z-index: 20;
  overflow: hidden;
}
.proposta-acoes-menu-lista .btn {
  border-radius: 0;
  width: 100%;
  justify-content: flex-start;
  border-bottom: 1px solid var(--c-line);
}
.proposta-acoes-menu-lista .btn:last-child { border-bottom: none; }

/* --- Grid de stats da proposta --- */
.proposta-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin: 16px 0;
}
.proposta-stat {
  background: var(--c-mist);
  border-radius: var(--radius);
  padding: 10px 12px;
  text-align: center;
}
.proposta-stat strong {
  display: block;
  font-size: 1.1rem;
  color: var(--c-charcoal);
  line-height: 1.2;
}
.proposta-stat small {
  font-size: 0.78rem;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
@media (max-width: 360px) {
  /* Em 320px com 5 stats: forçar 2 por linha */
  .proposta-stats { grid-template-columns: repeat(2, 1fr); }
  .proposta-stats .proposta-stat:last-child:nth-child(odd) {
    grid-column: span 2;
  }
}

/* --- Cardápio e roteiro (texto Gemini pré-formatado) --- */
.proposta-texto-bloco {
  white-space: pre-wrap;
  background: var(--c-mist);
  padding: 16px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  line-height: 1.65;
  border-left: 3px solid var(--c-line);
}

/* --- Link público: quebra URL longa --- */
.proposta-link-publico {
  word-break: break-all;
  font-size: 0.88rem;
}
.proposta-link-publico a {
  color: var(--c-fire-dark);
}

/* Botão copiar link */
.btn-copiar-link {
  background: var(--c-mist);
  border: 1px solid var(--c-line);
  color: var(--c-smoke);
  font-size: 0.875rem;
  padding: 8px 14px;
  min-height: 40px;
  margin-top: 8px;
}
.btn-copiar-link:hover { background: var(--c-line); }
.btn-copiar-link.copiado { background: #f0fdf4; border-color: var(--c-success); color: var(--c-success); }

/* --- Formulários nova/editar: grids responsivos --- */
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 480px) {
  .form-row-2 { grid-template-columns: 1fr; }
}

/* Fieldset sem borda nativa do browser */
.box fieldset {
  border: none;
  padding: 0;
  margin: 0 0 4px;
}
.box legend {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-muted);
  padding: 0;
  margin-bottom: 12px;
  width: 100%;
  border-bottom: 1px solid var(--c-line);
  padding-bottom: 6px;
}

/* Botões de ação dos formulários nova/editar */
.form-actions-proposta {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}
@media (max-width: 480px) {
  .form-actions-proposta {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .form-actions-proposta .btn {
    width: 100%;
    justify-content: center;
  }
}

/* --- Página pública da proposta (view do cliente) --- */
.proposta-publica { padding-bottom: 96px; } /* espaço para CTA sticky */

/* Bloco de investimento com destaque */
.investimento-bloco {
  background: linear-gradient(135deg, #fff8e7 0%, #fff3cd 100%);
  border: 1px solid rgba(217,83,30,.18);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  margin: 24px 0;
}
.investimento-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-muted);
  font-weight: 600;
  margin-bottom: 4px;
}
.investimento-valor {
  font-size: clamp(2rem, 8vw, 2.8rem);
  font-weight: 800;
  color: var(--c-fire);
  line-height: 1.1;
  margin: 4px 0;
}
.investimento-detalhe {
  font-size: 0.9rem;
  color: var(--c-muted);
}

/* CTA sticky no rodapé mobile (página pública) */
.cta-sticky-wrap {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
  background: var(--c-paper);
  border-top: 1px solid var(--c-line);
  box-shadow: 0 -4px 16px rgba(0,0,0,.10);
  z-index: 40;
  /* Só visível em mobile */
  display: none;
}
@media (max-width: 768px) {
  .cta-sticky-wrap { display: block; }
  .proposta-publica { padding-bottom: 100px; }
}
.cta-sticky-wrap .btn { width: 100%; justify-content: center; font-size: 1.05rem; }

/* Bloco "quem é o assador" na proposta pública */
.assador-bloco {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--c-mist);
  border-radius: var(--radius);
  border: 1px solid var(--c-line);
  margin-top: 24px;
  text-decoration: none;
  color: var(--c-text);
  transition: box-shadow .15s;
}
.assador-bloco:hover { box-shadow: var(--shadow-md); text-decoration: none; }
.assador-bloco-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--c-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  overflow: hidden;
}
.assador-bloco-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.assador-bloco-info { min-width: 0; }
.assador-bloco-nome { font-weight: 700; font-size: 1rem; }
.assador-bloco-local { font-size: 0.875rem; color: var(--c-muted); }

/* --- Página expirada: centralização e espaçamento mobile --- */
.expirada-page {
  max-width: 480px;
  margin: 0 auto;
  padding: 48px 0;
}
@media (max-width: 480px) {
  .expirada-page { padding: 32px 0; }
  .expirada-page .box { text-align: center; }
  .expirada-page .icone-grande { font-size: 56px; margin-bottom: 12px; display: block; }
}
@media (min-width: 481px) {
  .expirada-page .icone-grande { font-size: 48px; margin-bottom: 8px; display: block; }
}

