/* B · Azulejo — tokens */
:root {
  --cal: #F6F7F9;
  --branco: #FFFFFF;
  --anil: #14213D;
  --anil-2: #52607A;
  --cobalto: #1F4FB4;
  --azulejo: #DDE6F6;
  --erro: #B42318;
  --erro-fundo: #FBE9E7;
  --r: 10px;
  --titulo: 'Schibsted Grotesk', system-ui, sans-serif;
  --texto: 'Atkinson Hyperlegible', system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--cal); color: var(--anil); font: 19px/1.45 var(--texto); -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
main { max-width: 560px; margin: 0 auto; padding: 0 20px 40px; }
h1, h2 { margin: 0; font-family: var(--titulo); font-weight: 800; letter-spacing: -0.01em; }
h1 { font-size: 30px; line-height: 1.15; }
h2 { font-size: 22px; margin: 28px 0 12px; }
p { margin: 0; }
small { display: block; font-size: 16px; color: var(--anil-2); }
.ic { flex-shrink: 0; }
.sub, .muted { color: var(--anil-2); }
.sub { font-size: 18px; }
.top { margin-top: 22px; }
.centro { text-align: center; }
.recuo { padding-left: 64px; margin: -6px 0 14px; }
.recuo-pequeno { margin: 6px 4px 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.apertado { gap: 10px; }
.stack.largo { gap: 22px; margin-top: 12px; }

/* header band */
.band { height: 64px; background: var(--branco) url(azulejo.svg) repeat-x; border-bottom: 3px solid var(--cobalto); }

/* buttons */
button { font: inherit; color: inherit; cursor: pointer; }
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 60px; padding: 0 20px; border: 2px solid var(--cobalto); border-radius: var(--r); background: var(--branco); color: var(--cobalto); font: 700 19px var(--texto); }
.btn.primario { min-height: 64px; border: 0; background: var(--cobalto); color: #fff; font-size: 20px; }
.btn.perigo { border-color: var(--erro); color: var(--erro); }
.btn:disabled { border-color: var(--azulejo); color: var(--anil-2); cursor: default; }
.btn-link { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; margin: 20px auto 0; padding: 0 16px; border: 0; background: none; color: var(--cobalto); font-size: 18px; text-decoration: underline; }
.btn-link.perigo { color: var(--erro); font-weight: 700; text-decoration: none; }
.redondo { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; flex-shrink: 0; border: 0; border-radius: 24px; background: var(--azulejo); }
.redondo.claro { background: none; }
.redondo.branco { background: var(--branco); }
.barra { display: flex; align-items: center; gap: 12px; padding: 16px 0 12px; }
.barra h1 { flex-grow: 1; font-size: 28px; }
.barra.entre h1 { font-size: 26px; }

/* search */
.pesquisa { display: flex; align-items: center; gap: 12px; height: 60px; margin-top: 16px; padding: 0 16px; background: var(--branco); border: 2px solid var(--azulejo); border-radius: var(--r); color: var(--anil-2); }
.pesquisa .ic { color: var(--cobalto); }
.pesquisa.ativa { flex-grow: 1; margin: 0; height: 56px; border-color: var(--cobalto); }
.pesquisa input { flex-grow: 1; min-width: 0; padding: 0; border: 0; outline: none; background: none; font: 19px var(--texto); color: var(--anil); }

/* folders */
.grelha { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pasta-tile { display: flex; align-items: center; gap: 8px; min-height: 76px; padding: 10px 12px; border: 0; border-radius: var(--r); background: var(--azulejo); text-align: left; }
.pasta-tile .ic, .pasta-linha .ic { color: var(--cobalto); }
.pasta-tile b { display: block; font: 700 17px/1.2 var(--titulo); overflow-wrap: break-word; hyphens: auto; }
.pasta-tile small { font-size: 15px; }
.pasta-tile.nova, .pasta-linha.nova { justify-content: center; border: 2px dashed var(--cobalto); background: none; color: var(--cobalto); font-weight: 700; font-size: 18px; }
.pasta-linha { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 0 18px; border: 0; border-radius: var(--r); background: var(--azulejo); text-align: left; }
.pasta-linha b { flex-grow: 1; font: 700 20px var(--titulo); }
.pasta-linha small { font-size: 17px; }
.pasta-linha.atual { background: var(--cobalto); color: #fff; }
.pasta-linha.atual .ic, .pasta-linha.atual small { color: #fff; }

/* lists */
.lista { background: var(--branco); border: 1px solid var(--azulejo); border-radius: var(--r); overflow: hidden; }
.linha { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--azulejo); }
.linha:last-child { border-bottom: 0; }
.linha b { display: block; font-size: 19px; line-height: 1.3; }
.linha .erro { display: flex; align-items: center; gap: 6px; color: var(--erro); }
.com-icone { display: flex; align-items: center; gap: 6px; }
.com-icone .ic { color: var(--cobalto); }
.thumb { display: flex; align-items: center; justify-content: center; width: 76px; height: 76px; flex-shrink: 0; border-radius: 8px; background: var(--azulejo); color: var(--cobalto); object-fit: cover; }
.thumb.pequeno { width: 56px; height: 56px; }
.thumb.medio { width: 68px; height: 68px; }
.thumb.alto { width: 72px; height: 96px; }

/* cards */
.cartao { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--branco); border: 1px solid var(--azulejo); border-radius: var(--r); }
.cartao b { display: block; line-height: 1.3; }
.origem { padding: 12px; }
.caixa { display: flex; gap: 14px; margin: 16px 0; padding: 16px; background: var(--azulejo); border-radius: var(--r); }
.caixa .ic { color: var(--cobalto); }
.caixa b { font: 800 21px/1.25 var(--titulo); }
.caixa p { margin-top: 6px; font-size: 18px; }
.erro-caixa { background: var(--erro-fundo); border: 2px solid var(--erro); }
.erro-caixa .ic { color: var(--erro); }
.aviso { color: var(--erro); font-weight: 700; }
.dica { display: flex; gap: 10px; margin-top: 24px; font-size: 17px; color: var(--anil-2); }

/* empty state */
.vazio { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 24px; padding: 28px 20px; background: var(--branco); border: 1px solid var(--azulejo); border-radius: var(--r); text-align: center; }
.vazio b { font: 800 24px var(--titulo); }
.azulejo { width: 64px; height: 64px; border: 2px solid var(--cobalto); border-radius: 12px; background: var(--branco) url(azulejo.svg) center / 60px; }
.passos-guia { display: flex; flex-direction: column; gap: 18px; margin: 0; padding: 0; list-style: none; }
.passos-guia li { display: flex; align-items: center; gap: 14px; }
.passos-guia li .ic { color: var(--cobalto); }
.passos-guia span, .passos span { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 20px; background: var(--cobalto); color: #fff; font: 800 19px var(--titulo); }

/* recipe */
.capa-box { position: relative; max-width: 560px; margin: 0 auto; }
.capa { display: block; width: 100%; height: 280px; background: var(--azulejo); object-fit: cover; }
.capa-box .redondo { position: absolute; top: 16px; left: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; background: var(--azulejo); color: var(--cobalto); font-size: 15px; font-weight: 700; }
.chip.branco { padding: 6px 10px; background: var(--branco); border: 1px solid var(--azulejo); color: var(--anil); font-size: 17px; font-weight: 400; }
.chip.branco .ic { color: var(--cobalto); }
main > .btn { margin-top: 18px; }
.interruptor { margin-top: 12px; cursor: pointer; }
.interruptor > .ic { color: var(--cobalto); }
.interruptor span { flex-grow: 1; }
.interruptor input { appearance: none; position: relative; width: 56px; height: 34px; flex-shrink: 0; margin: 0; border-radius: 17px; background: var(--azulejo); cursor: pointer; }
.interruptor input::after { content: ''; position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 13px; background: var(--branco); transition: transform .15s; }
.interruptor input:checked { background: var(--cobalto); }
.interruptor input:checked::after { transform: translateX(22px); }
.ingredientes label { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 6px 0; border-bottom: 1px solid var(--azulejo); line-height: 1.35; cursor: pointer; }
.ingredientes input { width: 24px; height: 24px; flex-shrink: 0; margin: 0; accent-color: var(--cobalto); }
.ingredientes input:checked + span { color: var(--anil-2); text-decoration: line-through; }
.passos { display: flex; flex-direction: column; gap: 20px; margin: 16px 0 0; padding: 0; list-style: none; }
.passos li { display: flex; gap: 14px; }
.passos span { width: 36px; height: 36px; font-size: 18px; }
.passos p { padding-top: 4px; line-height: 1.5; }
.notas { padding: 14px 16px; background: var(--azulejo); border-radius: var(--r); font-size: 18px; white-space: pre-line; }
.acoes { margin-top: 32px; }

/* forms */
.campo { display: flex; flex-direction: column; gap: 8px; }
.campo > span { font-size: 17px; font-weight: 700; }
input:not([type=checkbox]), select, textarea { width: 100%; min-height: 56px; padding: 12px 14px; background: var(--branco); border: 2px solid var(--azulejo); border-radius: var(--r); font: 19px/1.5 var(--texto); color: var(--anil); }
textarea { font-size: 18px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cobalto); }
.pesquisa input[type=search] { min-height: 0; padding: 0; border: 0; background: none; }
.origem b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }

/* bottom sheets */
dialog { width: 100%; max-width: 560px; margin: auto auto 0; padding: 12px 24px 32px; border: 0; border-radius: 16px 16px 0 0; background: var(--branco); color: var(--anil); }
dialog::backdrop { background: rgba(20, 33, 61, 0.55); }
dialog h1 { font-size: 26px; }
.pega { align-self: center; width: 44px; height: 5px; border-radius: 3px; background: var(--azulejo); }

/* saved screen */
.ecra-cheio { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; padding-bottom: 32px; }
.centro-vertical { display: flex; flex-grow: 1; flex-direction: column; align-items: center; justify-content: center; gap: 20px; text-align: center; }
.centro-vertical h1 { font-size: 32px; }
.certo { display: flex; align-items: center; justify-content: center; width: 104px; height: 104px; border-radius: 52px; background: var(--cobalto); color: #fff; }

/* loading azulejo: a quarter per stage, the tile turns slowly */
.carga { display: block; width: 104px; height: 104px; flex-shrink: 0; animation: girar 10s linear infinite; }
.carga path { fill: none; stroke: var(--azulejo); stroke-width: 2.6; stroke-linecap: round; }
.carga .moldura { fill: var(--branco); stroke: var(--cobalto); stroke-width: 1.6; }
.carga .losango { fill: var(--azulejo); stroke: none; }
.carga .feito { stroke: var(--cobalto); }
.carga .agora { stroke: var(--cobalto); stroke-dasharray: 1; animation: desenhar 1.4s ease-in-out infinite alternate; }
.thumb .carga { width: 64px; height: 64px; }
.thumb.pequeno .carga { width: 48px; height: 48px; }
.thumb.a-preparar { background: none; }
@keyframes desenhar { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes girar { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .carga, .carga .agora { animation: none; }
  .carga .agora { stroke-dasharray: none; }
}
.preparar { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 20px 0 4px; padding: 24px 16px; background: var(--branco); border: 1px solid var(--azulejo); border-radius: var(--r); text-align: center; }
.preparar .carga { margin-bottom: 8px; }
.preparar b { font: 800 21px/1.25 var(--titulo); }
.preparar p { font-size: 17px; }
.preparar.sem-caixa { margin: 0; padding: 0; background: none; border: 0; }
.preparar.sem-caixa h1 { margin-bottom: 4px; }
.certo.erro-fundo { background: var(--erro-fundo); color: var(--erro); }
#avisar { width: auto; margin-top: 8px; }
.colar { margin-top: 16px; }
.vazio { margin-top: 16px; }
