/* ============================================================
   Drogaria Ponto da Saúde — Painel de Ofertas
   Folha de estilos principal (mobile-first)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ------------------------------------------------------------
   1. Tokens / custom properties
   ------------------------------------------------------------ */
:root {
  /* Paleta da marca —
     Vermelho é a cor interativa (CTA, links). Amarelo é acento decorativo
     (barra de marca, destaque de preço). Contraste texto-fundo validado WCAG AA+. */
  --color-brand: #C62828;           /* vermelho principal — botões, links */
  --color-brand-dark: #8B1A1A;      /* hover, ênfase */
  --color-brand-darker: #5F0E0E;    /* tarja, alertas legais */
  --color-accent: #FFD500;          /* amarelo — acento, nunca fundo de botão com texto vermelho */
  --color-accent-dark: #E5BE00;
  --color-accent-soft: #FFF4BF;     /* amarelo claro pra fundos suaves */

  /* Aliases de compatibilidade (antigos) */
  --color-primary: var(--color-brand);
  --color-primary-dark: var(--color-brand-dark);
  --color-secondary: var(--color-brand);
  --color-secondary-dark: var(--color-brand-dark);

  --color-text: #1A1A1A;
  --color-text-on-dark: #FFFFFF;
  --color-muted: #6B7280;
  --color-success: #1F7A38;
  --color-warning: #C7661C;
  --color-danger: #A31818;

  /* Superfícies */
  --surface: #FFFFFF;
  --surface-alt: #FFFBF2;           /* creme quente (em vez de cinza frio) */
  --surface-border: #E7E2D4;        /* bege quente neutro */
  --surface-shadow: 0 2px 6px rgba(36, 20, 10, 0.08);
  --surface-shadow-lg: 0 10px 28px rgba(36, 20, 10, 0.14);

  /* Raio, espaçamento, tipografia */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --touch-min: 44px;
  --max-width: 960px;
  --transition: 0.18s ease;
}

/* ------------------------------------------------------------
   2. Reset / base
   ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  background: #F7F7F5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4 { margin: 0 0 0.5rem; font-weight: 700; line-height: 1.25; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1rem; }
a { color: var(--color-secondary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; }

/* ------------------------------------------------------------
   3. Layout: nav, main, footer
   ------------------------------------------------------------ */
body { background: #FAF7F0; }

.site-nav {
  background: linear-gradient(180deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  border-bottom: 4px solid var(--color-brand);
  padding: 0.5rem 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-nav .nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 56px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--color-text);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
}
.nav-brand:hover { text-decoration: none; }
.nav-brand img {
  height: 40px;
  width: auto;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15));
}
.nav-brand .brand-text { line-height: 1.15; color: var(--color-brand-dark); }
.nav-brand .brand-text small {
  display: block;
  font-weight: 500;
  color: var(--color-text);
  opacity: 0.75;
  font-size: 0.72rem;
  font-style: italic;
}
.nav-links { display: none; margin-left: auto; gap: 0.25rem; align-items: center; flex-wrap: wrap; }
.nav-links a {
  color: var(--color-text);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  min-height: var(--touch-min);
  display: inline-flex;
  align-items: center;
}
.nav-links a:hover { background: rgba(0, 0, 0, 0.06); text-decoration: none; }
.nav-links a.active {
  background: var(--color-brand);
  color: var(--color-text-on-dark);
  box-shadow: 0 2px 4px rgba(139, 26, 26, 0.3);
}
.nav-user {
  display: none;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.75rem;
}
.nav-user .user-chip {
  background: var(--color-brand);
  color: var(--color-text-on-dark);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
main.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem;
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0) + 1rem);
}
.site-footer {
  max-width: var(--max-width);
  margin: 2rem auto 1rem;
  padding: 1rem;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.85rem;
}
.site-footer strong { color: var(--color-secondary); }

/* ------------------------------------------------------------
   4. Barra inferior fixa (mobile)
   ------------------------------------------------------------ */
.bottom-tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  background: #fff;
  border-top: 1px solid var(--surface-border);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
  padding: 0.25rem 0 calc(0.25rem + env(safe-area-inset-bottom, 0));
}
.bottom-tabs .tab {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0.35rem 0.1rem;
  color: var(--color-muted);
  font-size: 0.7rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  min-height: 56px;
}
.bottom-tabs .tab svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}
.bottom-tabs .tab span {
  display: block;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.bottom-tabs .tab:hover { text-decoration: none; color: var(--color-text); }
.bottom-tabs .tab.active {
  color: var(--color-brand);
}
.bottom-tabs .tab.active svg {
  background: var(--color-accent-soft);
  border-radius: 999px;
  padding: 3px;
  box-shadow: inset 0 0 0 1px var(--color-accent-dark);
}
.bottom-tabs .tab-logout {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  display: flex;
  flex: 1 1 0;
}
.bottom-tabs .tab-logout button {
  flex: 1 1 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0.35rem 0.1rem;
  color: var(--color-muted);
  font-size: 0.7rem;
  font-weight: 600;
  font-family: inherit;
  min-height: 56px;
}
.bottom-tabs .tab-logout button svg { width: 24px; height: 24px; }
.bottom-tabs .tab-logout button:hover { color: var(--color-danger); }

/* ------------------------------------------------------------
   5. Botões
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--touch-min);
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  background: #F0ECDF;
  color: var(--color-text);
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition),
              background var(--transition), color var(--transition), border-color var(--transition);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.btn:hover { text-decoration: none; background: #E4DFCD; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.35);
}

/* Primary: vermelho sólido + branco — contraste 5.9:1 (AA) */
.btn-primary {
  background: var(--color-brand);
  color: var(--color-text-on-dark);
  border-color: var(--color-brand);
  box-shadow: 0 2px 6px rgba(139, 26, 26, 0.25);
}
.btn-primary:hover {
  background: var(--color-brand-dark);
  border-color: var(--color-brand-dark);
  color: var(--color-text-on-dark);
}

/* Accent: amarelo + texto escuro — contraste 14.3:1 (AAA). Use pra "enviar agora" */
.btn-accent {
  background: var(--color-accent);
  color: var(--color-text);
  border-color: var(--color-accent-dark);
}
.btn-accent:hover { background: var(--color-accent-dark); color: var(--color-text); }

/* Danger: vermelho escuro pra destruir/arquivar */
.btn-danger {
  background: var(--color-danger);
  color: var(--color-text-on-dark);
  border-color: var(--color-danger);
}
.btn-danger:hover {
  background: var(--color-brand-darker);
  border-color: var(--color-brand-darker);
  color: var(--color-text-on-dark);
}

/* Secondary: outline vermelho */
.btn-secondary {
  background: transparent;
  color: var(--color-brand);
  border-color: var(--color-brand);
}
.btn-secondary:hover {
  background: var(--color-brand);
  color: var(--color-text-on-dark);
}

/* Ghost: sem borda, só texto — pra links de ação discreta */
.btn-ghost {
  background: transparent;
  color: var(--color-brand);
  border-color: transparent;
}
.btn-ghost:hover { background: rgba(198, 40, 40, 0.08); color: var(--color-brand); }
.btn-sm {
  min-height: 36px;
  padding: 0.35rem 0.75rem;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
}
.btn.is-loading { position: relative; color: transparent; pointer-events: none; }
.btn.is-loading::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  border: 3px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  color: var(--color-secondary);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------
   6. Formulários
   ------------------------------------------------------------ */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--color-text);
}
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="date"],
select,
textarea {
  width: 100%;
  min-height: var(--touch-min);
  padding: 0.6rem 0.8rem;
  font-size: 1rem;
  font-family: inherit;
  border: 2px solid var(--surface-border);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
}
textarea { min-height: 110px; resize: vertical; }
.form-control:focus,
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.15);
}
.form-hint { color: var(--color-muted); font-size: 0.85rem; margin-top: 0.25rem; }
.form-error { color: var(--color-danger); font-size: 0.85rem; margin-top: 0.25rem; }
.form-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }

/* Upload área */
.drop-area {
  border: 2px dashed var(--color-secondary);
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  color: var(--color-text);
  cursor: pointer;
}
.drop-area p { margin: 0.25rem 0; }
.drop-area .camera-hint {
  font-size: 0.85rem;
  color: var(--color-muted);
}
.drop-area input[type="file"] { display: none; }
.drop-preview {
  margin-top: 0.75rem;
  display: none;
}
.drop-preview img {
  max-height: 180px;
  margin: 0 auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--surface-border);
}
.drop-preview.is-visible { display: block; }

/* ------------------------------------------------------------
   7. Cartões
   ------------------------------------------------------------ */
.card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--surface-shadow);
  margin-bottom: 1rem;
}
.card-title {
  margin-top: 0;
  color: var(--color-secondary);
}
.card-thumb {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: var(--surface-alt);
}

/* ------------------------------------------------------------
   8. Badges / tarja
   ------------------------------------------------------------ */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #e5e7eb;
  color: var(--color-text);
  line-height: 1.4;
}
.badge-success { background: var(--color-success); color: #fff; }
.badge-danger  { background: var(--color-danger);  color: #fff; }
.badge-warning { background: var(--color-warning); color: #fff; }
.badge-tarja {
  background: var(--color-danger);
  color: #fff;
  border: 2px solid #fff;
  outline: 2px solid var(--color-danger);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
}

/* ------------------------------------------------------------
   9. Toast / flash
   ------------------------------------------------------------ */
.toast-container {
  position: fixed;
  top: 72px;
  right: 1rem;
  left: 1rem;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  background: #fff;
  border-left: 6px solid var(--color-muted);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  box-shadow: var(--surface-shadow-lg);
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  animation: toast-in 0.25s ease;
}
.toast-success { border-left-color: var(--color-success); }
.toast-error,
.toast-danger { border-left-color: var(--color-danger); }
.toast-warning { border-left-color: var(--color-warning); }
.toast-info { border-left-color: var(--color-secondary); }
.toast .close {
  margin-left: auto;
  background: transparent;
  border: 0;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--color-muted);
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------------------
   10. Modal
   ------------------------------------------------------------ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}
.modal.is-open { display: flex; }
.modal-dialog {
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 420px;
  width: 100%;
  padding: 1.25rem;
  box-shadow: var(--surface-shadow-lg);
}
.modal-dialog h3 { color: var(--color-secondary); margin-top: 0; }
.modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------
   11. Tabelas
   ------------------------------------------------------------ */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--surface-shadow);
}
.table th, .table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--surface-border);
  font-size: 0.95rem;
}
.table th {
  background: var(--surface-alt);
  color: var(--color-secondary);
  font-weight: 700;
}
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #FFFBEA; }

/* ------------------------------------------------------------
   12. Auth shell
   ------------------------------------------------------------ */
.auth-shell {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.auth-card {
  background: #fff;
  width: 100%;
  max-width: 400px;
  padding: 2rem 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--surface-shadow-lg);
  text-align: center;
}
.auth-card .logo {
  width: 110px;
  height: auto;
  margin: 0 auto 1rem;
}
.auth-card h1 { color: var(--color-secondary); }
.auth-card .form-group { text-align: left; }

/* ------------------------------------------------------------
   13. Dashboard / KPIs
   ------------------------------------------------------------ */
.kpi-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.kpi,
.kpi-tile {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--surface-shadow);
  border-top: 4px solid var(--color-accent);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.kpi-tile.kpi-accent { border-top-color: var(--color-brand); }
.kpi .kpi-label,
.kpi-tile .kpi-label {
  font-size: 0.8rem;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.kpi .kpi-value,
.kpi-tile .kpi-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-brand-dark);
  line-height: 1.1;
}

/* ------------------------------------------------------------
   14. Catálogo / lista de ofertas
   ------------------------------------------------------------ */
.offer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
.offer-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--surface-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--surface-border);
}
.offer-card .offer-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: var(--surface-alt);
}
.offer-card .offer-body { padding: 0.85rem; flex: 1; }
.offer-card .offer-name { font-weight: 600; margin: 0 0 0.35rem; }
.offer-card .offer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

/* ------------------------------------------------------------
   15. Spellcheck preview
   ------------------------------------------------------------ */
.caption-preview {
  background: #fff;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  min-height: 80px;
  line-height: 1.6;
  white-space: pre-wrap;
}
mark.spell-error {
  background: transparent;
  color: inherit;
  text-decoration: underline wavy var(--color-danger);
  text-underline-offset: 3px;
  cursor: pointer;
  border-radius: 3px;
  padding: 0 2px;
}
mark.spell-error:hover { background: rgba(183, 28, 28, 0.1); }
.spell-popover {
  position: absolute;
  background: #fff;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  box-shadow: var(--surface-shadow-lg);
  padding: 0.5rem;
  z-index: 150;
  min-width: 180px;
  max-width: 260px;
}
.spell-popover .suggestion {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.6rem;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.95rem;
  min-height: 36px;
}
.spell-popover .suggestion:hover { background: var(--surface-alt); }
.spell-popover .ignore {
  margin-top: 0.35rem;
  border-top: 1px solid var(--surface-border);
  padding-top: 0.35rem;
  color: var(--color-muted);
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 0.85rem;
}

/* ------------------------------------------------------------
   16. Error / vazio
   ------------------------------------------------------------ */
.error-shell {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.error-card {
  background: #fff;
  padding: 2rem 1.5rem;
  max-width: 420px;
  text-align: center;
  border-radius: var(--radius-lg);
  box-shadow: var(--surface-shadow-lg);
  border-top: 6px solid var(--color-secondary);
}
.error-card .code {
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-secondary);
  line-height: 1;
}
.error-card .message { color: var(--color-muted); margin: 0.75rem 0 1.25rem; }

/* ------------------------------------------------------------
   17. Utilitários
   ------------------------------------------------------------ */
.stack { display: flex; flex-direction: column; gap: 1rem; }
.flex  { display: flex; }
.row   { display: flex; flex-wrap: wrap; }
.gap   { gap: 0.75rem; }
.gap-sm { gap: 0.35rem; }
.gap-lg { gap: 1.25rem; }
.muted { color: var(--color-muted); }
.small { font-size: 0.85rem; }
.text-center { text-align: center; }
.hidden { display: none !important; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }

/* ------------------------------------------------------------
   18. Media queries — tablet e desktop
   ------------------------------------------------------------ */
@media (min-width: 768px) {
  h1 { font-size: 1.85rem; }
  .nav-links, .nav-user { display: inline-flex; }
  .bottom-tabs { display: none; }
  main.container { padding-bottom: 1rem; }
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .offer-grid { grid-template-columns: repeat(2, 1fr); }
  .toast-container { left: auto; width: 360px; }
}
@media (min-width: 1024px) {
  .offer-grid { grid-template-columns: repeat(3, 1fr); }
  main.container { padding: 1.5rem; padding-bottom: 1.5rem; }
}

/* ------------------------------------------------------------
   19. Componentes adicionais (headers, preços, forms, abas, alertas)
   ------------------------------------------------------------ */

/* Page header — título + ação primária */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.page-header h1 {
  margin: 0;
  color: var(--color-brand-dark);
  font-size: 1.5rem;
}
.page-header > .btn { flex-shrink: 0; }

/* Card head — título dentro de .card */
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid var(--color-accent);
}
.card-head h2 {
  margin: 0;
  color: var(--color-brand-dark);
  font-size: 1.1rem;
}
.card-head a {
  color: var(--color-brand);
  font-weight: 600;
  font-size: 0.9rem;
}

/* Preços — destaque em vermelho para o "por" */
.prices {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 0.4rem 0;
}
.prices s {
  color: var(--color-muted);
  font-size: 0.95rem;
}
.price-now {
  color: var(--color-brand);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* Placeholder quando não tem foto */
.placeholder {
  width: 100%;
  height: 160px;
  background: repeating-linear-gradient(
    45deg,
    var(--color-accent-soft),
    var(--color-accent-soft) 10px,
    #FFFBF2 10px,
    #FFFBF2 20px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-weight: 500;
  font-size: 0.9rem;
}

/* Campos de formulário (nova estrutura .form-field) */
.form-field {
  display: block;
  margin-bottom: 1rem;
}
.form-field > span:first-child {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--color-text);
  font-size: 0.92rem;
}
.form-field small {
  display: block;
  font-size: 0.8rem;
  margin-top: 0.3rem;
}
.form-field.form-check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
}
.form-field.form-check > span { margin: 0; }
.form-field.form-check input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 0;
  margin: 0;
  accent-color: var(--color-brand);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 500px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}

/* Abas */
.tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 2px solid var(--surface-border);
  margin-bottom: 1rem;
  overflow-x: auto;
}
.tabs a {
  padding: 0.6rem 1rem;
  color: var(--color-muted);
  font-weight: 600;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  min-height: var(--touch-min);
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.tabs a:hover { color: var(--color-brand); text-decoration: none; }
.tabs a.active {
  color: var(--color-brand);
  border-bottom-color: var(--color-brand);
}

/* Alertas */
.alert {
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin: 0.75rem 0;
  border-left: 5px solid var(--color-muted);
  background: var(--surface-alt);
}
.alert-danger {
  background: #FFF0F0;
  border-left-color: var(--color-brand-darker);
  color: var(--color-brand-darker);
}
.alert-warning {
  background: var(--color-accent-soft);
  border-left-color: var(--color-warning);
  color: #7A3A0C;
}
.alert-success {
  background: #EAF4EC;
  border-left-color: var(--color-success);
  color: #12562A;
}

/* Card de oferta — imagem + ações */
.offer-card img:first-child {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: var(--surface-alt);
}
.offer-card.archived { opacity: 0.55; }
.offer-card .offer-body { padding: 0.9rem; display: flex; flex-direction: column; gap: 0.4rem; }
.offer-card .offer-body strong { color: var(--color-text); font-size: 1rem; }
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.card-actions .btn { flex: 1 1 auto; }

/* Toolbar do spellcheck */
.spell-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}
.spell-preview {
  margin-top: 0.75rem;
  min-height: 0;
}
.spell-preview:empty { display: none; }
.spell-preview .spell-rendered {
  background: var(--color-accent-soft);
  padding: 0.85rem;
  border-radius: var(--radius-md);
  line-height: 1.6;
  white-space: pre-wrap;
  border: 1px dashed var(--color-accent-dark);
}

/* Badge muted (cinza) */
.badge-muted {
  background: #EEE9DD;
  color: var(--color-text);
}

/* Admin-only accent */
.admin-only {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  background: var(--color-accent);
  color: var(--color-text);
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
