/* Ateliê — sistema visual real do app, extraído dos mockups aprovados
   (mockup/*.dc.html). Tema escuro único — o design aprovado não tem
   versão clara. */

:root {
  --bg: #111316;
  --bg-2: #0d0f11;
  --surface: #181b1f;
  --text: #F5F1EE;
  --muted: #A8A29B;
  --muted-2: #8B857E;
  --muted-3: #6E6963;
  --line: rgba(255,255,255,0.09);
  --line-soft: rgba(255,255,255,0.06);
  --accent: #E4587A;
  --accent-on: #111316;
  --accent-soft: rgba(228,88,122,0.14);
  --accent-soft-2: rgba(228,88,122,0.22);
  --danger: #F0665F;
  --success: #5FCE86;
  --warning: #E4A83A;
  --info: #4E8FA6;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

.screen {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
}
/* padding-top: em modo standalone (PWA instalado), o conteúdo pode
   renderizar embaixo do notch/ilha dinâmica/barra de status — esse
   respiro empurra o topo do conteúdo pra fora dessa área em toda tela
   que usa .scroll normalmente. receita.html é a única exceção (hero em
   tela cheia de propósito) e cancela isso explicitamente. */
.scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-top: env(safe-area-inset-top); }
.scroll::-webkit-scrollbar { display: none; }

/* topo com voltar -- min-height (não height) + padding-top pela mesma
   razão acima: cresce pra empurrar o botão/título pra baixo do notch
   em vez de espremer o conteúdo dentro de 56px fixos. */
.topbar {
  min-height: 56px; display: flex; align-items: center; justify-content: space-between;
  padding: env(safe-area-inset-top) 16px 0 16px; flex-shrink: 0;
}
.icon-btn {
  width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.06);
  border: none; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.icon-btn svg { width: 16px; height: 16px; }
.topbar-title { font-size: 16px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* tipografia */
.h1 { font-size: 23px; font-weight: 700; color: var(--text); margin: 0; }
.h2 { font-size: 18px; font-weight: 600; color: var(--text); margin: 0; }
.lede { font-size: 13.5px; color: var(--muted); margin: 6px 0 0 0; line-height: 1.55; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; padding: 26px 20px 12px 20px; }
.section-title .see-all { font-size: 12.5px; font-weight: 500; color: var(--accent); background: none; border: none; }

/* formulário */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 12px; font-weight: 500; color: var(--muted); }
.field input {
  background: var(--surface); border: 1px solid var(--line); border-radius: 11px;
  padding: 13px 14px; font-size: 14px; color: var(--text); font-family: inherit; width: 100%;
}
.field input:focus { outline: none; border-color: var(--accent); }
.field select, .field textarea {
  background: var(--surface); border: 1px solid var(--line); border-radius: 11px;
  padding: 13px 14px; font-size: 14px; color: var(--text); font-family: inherit; width: 100%;
}
.field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 70px; }
.field-error { font-size: 12px; color: var(--danger); margin-top: 2px; }
.field-hint { font-size: 11.5px; color: var(--muted-3); margin-top: 2px; }
.btn-danger-text { background: none; border: none; color: var(--danger); font-size: 13.5px; font-weight: 600; padding: 13px; width: 100%; text-align: center; }
.btn-primary {
  background: var(--accent); color: var(--accent-on); font-size: 14.5px; font-weight: 600;
  padding: 15px; border-radius: 12px; text-align: center; border: none; width: 100%;
}
.btn-primary:disabled { opacity: 0.55; }
.btn-secondary {
  background: transparent; color: var(--text); font-size: 13.5px; font-weight: 600;
  padding: 13px; border-radius: 12px; text-align: center; border: 1px solid rgba(255,255,255,0.1); width: 100%;
}
.link-accent { color: var(--accent); font-weight: 600; }
.center-muted { font-size: 13px; color: var(--muted); text-align: center; }

/* cards de receita */
.cards-row { display: flex; gap: 12px; padding: 0 20px 4px 20px; overflow-x: auto; }
.cards-row::-webkit-scrollbar { display: none; }
/* auto-fill: número de colunas se adapta à largura disponível, caindo
   pra 1 coluna sozinho em telas bem estreitas — sem media query */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 0 20px 24px 20px; }
.recipe-card {
  display: flex; flex-direction: column; gap: 12px; flex-shrink: 0;
  /* min-width:auto (padrão de item de grid/flex) deixava o card não
     encolher abaixo do texto do nome (white-space:nowrap), estourando
     a coluna 1fr e causando overflow horizontal na Biblioteca */
  min-width: 0;
}
.cards-row .recipe-card { width: 178px; }
.recipe-card .photo {
  aspect-ratio: 178 / 230; border-radius: 16px; position: relative; overflow: hidden; background: var(--surface);
}
.recipe-card .photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.recipe-card .photo .photo-placeholder,
.receita-hero .photo-placeholder {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft-2);
}
.recipe-card .photo .photo-placeholder svg { width: 34px; height: 34px; }
.receita-hero .photo-placeholder svg { width: 48px; height: 48px; }
.recipe-card .photo::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 46%;
  background: linear-gradient(180deg, rgba(13,15,17,0.38) 0%, rgba(13,15,17,0) 100%);
}
.recipe-card .heart {
  position: absolute; top: 9px; right: 9px; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(13,15,17,0.4); display: flex; align-items: center; justify-content: center; z-index: 1;
  border: none; padding: 0; cursor: pointer;
}
.recipe-card .heart svg { width: 13px; height: 13px; }
.recipe-card .name { font-size: 14.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recipe-card .cat { font-size: 11.5px; color: var(--muted-2); margin-top: 4px; }

/* chips */
.chips { display: flex; gap: 8px; padding: 0 20px 18px 20px; overflow-x: auto; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  font-size: 12.5px; font-weight: 500; padding: 8px 16px; border-radius: 999px; flex-shrink: 0; border: none;
  background: var(--surface); color: #D8D3CD; border: 1px solid var(--line);
}
.chip.active { background: var(--accent); color: var(--accent-on); font-weight: 600; border: none; }

/* busca */
.search-bar {
  flex: 1; display: flex; align-items: center; gap: 8px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px;
}
.search-bar input {
  flex: 1; background: none; border: none; color: var(--text); font-size: 14px; font-family: inherit;
}
.search-bar input:focus { outline: none; }
.search-bar.focused { border-color: var(--accent); }

/* estados */
.state-box { padding: 60px 28px; text-align: center; }
.state-box .title { font-size: 15px; font-weight: 600; color: var(--text); margin-top: 14px; }
.state-box .desc { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.spinner {
  width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid var(--line);
  border-top-color: var(--accent); animation: spin 0.7s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--surface) 25%, #202329 37%, var(--surface) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 16px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* bottom nav */
.bottom-nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0;
  width: 100%; max-width: 430px;
  height: calc(76px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--bg-2); border-top: 1px solid rgba(255,255,255,0.07);
  display: flex; align-items: flex-start; justify-content: space-around; padding-top: 10px; flex-shrink: 0;
  z-index: 30;
}
/* páginas com menu fixo (as 5 abas raiz) reservam espaço no fim do
   conteúdo rolável, exatamente a altura do nav + safe-area, pra nada
   ficar coberto — :has() evita duplicar essa regra por página. */
.screen:has(> .bottom-nav) .scroll {
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 60px; background: none; border: none; }
.nav-item svg { width: 22px; height: 22px; }
.nav-item span { font-size: 10.5px; }
.nav-item.active span, .nav-item.active svg { color: var(--accent); }
.nav-item:not(.active) span, .nav-item:not(.active) svg { color: var(--muted-3); }
.nav-item.active span { font-weight: 600; }
.nav-item:not(.active) span { font-weight: 500; }

/* avatar */
.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft-2); color: var(--accent);
  font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: #24272c;
  color: var(--text); font-size: 13px; padding: 12px 18px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  opacity: 0; transition: opacity 0.2s; pointer-events: none; z-index: 50; max-width: 90%; text-align: center;
}
.toast.show { opacity: 1; }

/* Receita completa */
/* hero da receita é de propósito tela cheia (bleed embaixo do notch/
   barra de status) -- por isso cancela o padding-top padrão de .scroll
   aqui, e só os botões flutuantes é que descem pra não ficar embaixo
   do notch/ilha dinâmica, sem empurrar a própria foto. */
.receita-hero-scroll { padding-top: 0; }
.receita-hero { position: relative; height: 300px; background: #3A1F0F; overflow: hidden; flex-shrink: 0; }
.receita-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.receita-hero::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 40%; background: linear-gradient(180deg, rgba(13,15,17,0.42) 0%, rgba(13,15,17,0) 100%); }
.receita-hero .hero-btn { position: absolute; top: calc(20px + env(safe-area-inset-top)); width: 34px; height: 34px; border-radius: 50%; background: rgba(13,15,17,0.45); display: flex; align-items: center; justify-content: center; z-index: 1; border: none; cursor: pointer; }
.receita-hero .hero-back { left: 20px; }
.receita-hero .hero-heart { right: 20px; }
.badge-categoria { font-size: 11px; font-weight: 600; color: var(--accent); background: var(--accent-soft-2); padding: 3px 10px; border-radius: 999px; display: inline-block; }
.action-pills { display: flex; gap: 10px; padding: 14px 20px 24px 20px; }
.action-pill { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; background: var(--surface); border-radius: 12px; padding: 11px 6px; border: none; color: #D8D3CD; font-size: 10.5px; font-family: inherit; }
.action-pill svg { width: 16px; height: 16px; }
.action-pill.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.action-pill.disabled { opacity: 0.55; }
.info-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 28px; }
.info-card { background: var(--surface); border-radius: 14px; padding: 15px; }
.info-card .label { font-size: 11px; color: var(--muted-2); font-weight: 500; }
.info-card .value { font-size: 15px; font-weight: 600; color: var(--text); margin-top: 5px; }
.content-card { background: var(--surface); border-radius: 18px; padding: 20px; margin-bottom: 20px; }
.card-head { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.card-head span { font-size: 17px; font-weight: 600; color: var(--text); }
.ingredient-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.ingredient-row:last-child { border-bottom: none; }
.ingredient-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.ingredient-row span { font-size: 15px; color: #EDEAE5; }
.ingredient-section-title { font-size: 13px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; padding: 16px 0 4px 0; }
.ingredient-section-title.is-first { padding-top: 0; }
.step-row { display: flex; gap: 14px; }
.step-num { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step-row span { font-size: 15px; color: #EDEAE5; line-height: 1.55; }
.suggestion-box { background: var(--accent-soft); border: 1px solid rgba(228,88,122,0.2); border-radius: 18px; padding: 20px; margin-bottom: 32px; }

/* Receita bloqueada */
.blur-content { filter: blur(4px); opacity: 0.5; user-select: none; pointer-events: none; }
.skeleton-line { height: 13px; background: #2A2E33; border-radius: 4px; margin-bottom: 10px; }
.unlock-card {
  position: absolute; top: 70px; left: 20px; right: 20px; background: var(--surface);
  border: 1px solid rgba(228,88,122,0.25); border-radius: 16px; padding: 22px 20px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}

/* Paywall */
.benefit-row { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 13px; padding: 13px 15px; }
.benefit-check { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.benefit-check svg { width: 12px; height: 12px; }

/* Lista de compras */
.progress-bar { height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.progress-bar .fill { height: 100%; background: var(--accent); }
.list-section-title { padding: 14px 20px 4px 20px; font-size: 12px; font-weight: 500; color: var(--muted-2); text-transform: uppercase; letter-spacing: .04em; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.checkbox { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--muted-3); flex-shrink: 0; background: none; padding: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.checkbox.checked { background: var(--accent); border: none; }
.checkbox svg { width: 11px; height: 11px; }
.add-item-row { display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px dashed rgba(255,255,255,0.15); border-radius: 12px; padding: 13px; color: var(--muted); font-size: 13.5px; font-weight: 500; background: none; width: 100%; }

/* Home — atalhos, destaque e categorias */
.shortcut-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 14px 20px 4px 20px; }
.shortcut-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; background: var(--surface); border-radius: 14px; padding: 14px 4px; }
.shortcut-card svg { width: 19px; height: 19px; }
.shortcut-card span { font-size: 10.5px; font-weight: 500; color: var(--muted); text-align: center; line-height: 1.25; }

.destaque-card { display: flex; align-items: stretch; gap: 14px; background: var(--surface); border-radius: 20px; padding: 16px; margin: 6px 20px 0 20px; }
.destaque-card .info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.destaque-card .eyebrow { font-size: 10.5px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }
.destaque-card .nome { font-size: 17px; font-weight: 700; color: var(--text); line-height: 1.3; }
.destaque-card .desc { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.destaque-card .cta { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--accent); margin-top: 2px; }
.destaque-card .cta svg { width: 13px; height: 13px; }
.destaque-card .photo { width: 108px; flex-shrink: 0; border-radius: 14px; overflow: hidden; position: relative; background: var(--bg-2); }
.destaque-card .photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.category-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 20px 4px 20px; }
.category-tile { position: relative; aspect-ratio: 3 / 2; border-radius: 16px; overflow: hidden; background: var(--surface); }
.category-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.category-tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13,15,17,0) 45%, rgba(13,15,17,0.8) 100%); }
.category-tile span { position: absolute; left: 12px; bottom: 10px; right: 12px; z-index: 1; font-size: 13.5px; font-weight: 600; color: #fff; }

/* Meu Negócio — home */
.negocio-card { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 16px; padding: 18px; width: 100%; border: none; text-align: left; }
a.negocio-card { border: 1px solid var(--line-soft); }
.negocio-card .icon-badge { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.negocio-card .icon-badge svg { width: 21px; height: 21px; }
.negocio-card .info { flex: 1; min-width: 0; }
.negocio-card .info .title { font-size: 15px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 8px; }
.negocio-card .info .desc { font-size: 12px; color: var(--muted-2); margin-top: 2px; }
.negocio-card > svg { width: 16px; height: 16px; flex-shrink: 0; }
.negocio-card.disabled { opacity: 0.6; cursor: default; }
.soon-tag { font-size: 9.5px; font-weight: 700; color: var(--muted-2); background: var(--line); padding: 2px 7px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }

/* Estoque */
.estoque-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 4px; border-bottom: 1px solid var(--line-soft); width: 100%; background: none; border-left: none; border-right: none; border-top: none; text-align: left; }
.estoque-row:last-child { border-bottom: none; }
.estoque-row .nome { font-size: 14.5px; color: var(--text); font-weight: 500; }
.estoque-row .qtd { font-size: 12px; color: var(--muted-2); margin-top: 2px; }
.status-badge { font-size: 12px; padding: 4px 10px; border-radius: 8px; font-weight: 500; white-space: nowrap; flex-shrink: 0; }
.status-badge--ok { color: var(--success); background: rgba(95,206,134,.14); }
.status-badge--repor { color: var(--warning); background: rgba(228,168,58,.14); }
.status-badge--falta { color: var(--danger); background: rgba(240,102,95,.14); }

/* Pedidos */
.pedido-card { background: var(--surface); border-radius: 14px; padding: 16px; width: 100%; text-align: left; border: none; }
.pedido-card .head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.pedido-card .cliente { font-size: 14.5px; font-weight: 600; color: var(--text); }
.pedido-card .produto { font-size: 13px; color: var(--muted); }
.pedido-card .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.pedido-card .entrega { font-size: 12px; color: var(--muted-3); }
.pedido-card .valor { font-size: 14px; font-weight: 600; color: var(--text); }
.status-pill { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 7px; white-space: nowrap; flex-shrink: 0; }
.status-pill--novo { color: #9AA0A8; background: rgba(154,160,168,.14); }
.status-pill--em_producao { color: var(--warning); background: rgba(228,168,58,.14); }
.status-pill--pronto { color: var(--info); background: rgba(78,143,166,.14); }
.status-pill--entregue { color: var(--success); background: rgba(95,206,134,.14); }

.status-chip { font-size: 12px; font-weight: 500; padding: 8px 14px; border-radius: 999px; background: var(--surface); color: var(--muted); border: 1px solid var(--line); }
.status-chip.active { background: var(--accent); color: var(--accent-on); font-weight: 600; border: none; }

.resumo-box { background: var(--surface); border-radius: 16px; padding: 18px; }
.resumo-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 13px; }
.resumo-row .label { color: var(--muted); }
.resumo-row .value { font-weight: 600; color: var(--text); }
.resumo-row.total { border-top: 1px solid var(--line-soft); margin-top: 4px; }

.alert-box { display: flex; align-items: center; gap: 8px; border-radius: 10px; padding: 11px 14px; font-size: 12.5px; }
.alert-box--warning { background: rgba(228,168,58,.1); border: 1px solid rgba(228,168,58,.25); color: var(--warning); }
.alert-box--danger { background: rgba(240,102,95,.1); border: 1px solid rgba(240,102,95,.25); color: var(--danger); }

.info-box { background: var(--surface); border-radius: 16px; padding: 18px; }
.info-box .k { font-size: 11px; color: var(--muted-2); font-weight: 500; margin-bottom: 4px; }
.info-box .v { font-size: 15px; font-weight: 600; color: var(--text); }

/* Financeiro */
.month-selector { display: flex; align-items: center; gap: 6px; }
.month-selector button { background: none; border: none; padding: 4px; display: flex; }
.month-selector button svg { width: 14px; height: 14px; }
.month-selector .label { font-size: 15px; font-weight: 600; color: var(--text); }
.movimentacao-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 4px; border-bottom: 1px solid var(--line-soft); }
.movimentacao-row:last-child { border-bottom: none; }
.movimentacao-row .esquerda { display: flex; align-items: center; gap: 10px; min-width: 0; }
.movimentacao-row .icon-badge { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.movimentacao-row .icon-badge svg { width: 13px; height: 13px; }
.movimentacao-row .desc { font-size: 13.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.movimentacao-row .data { font-size: 11.5px; color: var(--muted-3); margin-top: 1px; }
.movimentacao-row .valor { font-size: 13.5px; font-weight: 600; flex-shrink: 0; }
.movimentacao-row .valor.entrada { color: var(--success); }
.movimentacao-row .valor.saida { color: var(--danger); }

/* Precificação */
.custo-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 4px; border-bottom: 1px solid var(--line-soft); }
.custo-row:last-child { border-bottom: none; }
.custo-row .nome { font-size: 13.5px; color: #D8D3CD; }
.custo-row input { width: 90px; text-align: right; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; font-size: 13.5px; color: var(--text); font-family: inherit; }
.custo-row input:focus { outline: none; border-color: var(--accent); }
.stat-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.stat-card { border-radius: 18px; padding: 18px; text-align: center; }
.stat-card--accent { background: var(--accent-soft); border: 1px solid var(--accent-soft-2); }
.stat-card--success { background: var(--success-soft); border: 1px solid rgba(95,206,134,.25); }
.stat-card .label { font-size: 11px; font-weight: 500; color: #D8D3CD; margin-bottom: 8px; }
.stat-card .value { font-size: 32px; font-weight: 700; line-height: 1; }
.stat-card .value.small { font-size: 26px; }
.stat-card .hint { font-size: 10.5px; color: var(--muted-2); margin-top: 8px; line-height: 1.4; }
.custo-lucro-bar { display: flex; height: 14px; border-radius: 8px; overflow: hidden; margin-bottom: 8px; }
.bar-legend { display: flex; justify-content: space-between; margin-bottom: 24px; }
.bar-legend .item { display: flex; align-items: center; gap: 6px; }
.bar-legend .dot { width: 8px; height: 8px; border-radius: 2px; }
.bar-legend span { font-size: 11.5px; color: var(--muted); }

/* filtros bottom sheet */
.sheet-overlay {
  position: fixed; inset: 0; background: rgba(13,15,17,0.6); display: none; z-index: 40;
}
.sheet-overlay.open { display: block; }
.sheet {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 430px;
  background: var(--surface); border-radius: 20px 20px 0 0; padding: 12px 20px 28px 20px;
  box-shadow: 0 -12px 32px rgba(0,0,0,0.4); z-index: 41;
}
.sheet-handle { width: 36px; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.15); margin: 0 auto 18px auto; }
.sheet-row {
  display: flex; align-items: center; justify-content: space-between; padding: 12px 4px;
  border-bottom: 1px solid var(--line-soft); font-size: 14px; color: #D8D3CD; background: none; border-left: none; border-right: none; border-top: none; width: 100%; text-align: left;
}
.sheet-row.selected { color: var(--text); font-weight: 600; }
.sheet-radio { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--muted-3); flex-shrink: 0; }
.sheet-radio.checked { background: var(--accent); border: none; display: flex; align-items: center; justify-content: center; }
