/* Minha lista */
.resumo {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
  padding: 24px 26px; margin-bottom: 18px;
  background:
    radial-gradient(ellipse 60% 120% at 0% 0%, rgba(243, 112, 34, .10), transparent 60%),
    #fff;
}
.resumo-num { display: flex; align-items: center; gap: 18px; }
.resumo h2 { font-family: "Oswald", sans-serif; font-size: 1.6rem; }
.resumo p { color: rgba(19, 41, 61, .7); margin-top: 2px; }
.resumo-acoes { display: flex; flex-wrap: wrap; gap: 10px; }
.anel {
  --p: 0;
  width: 78px; height: 78px; border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(var(--verde) calc(var(--p) * 1%), rgba(19, 41, 61, .08) 0);
  position: relative;
  transition: background .4s;
}
.anel::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #fff; }
.anel span { position: relative; font-family: "Oswald", sans-serif; font-weight: 700; font-size: 1.2rem; }

.adicionar { padding: 20px 22px; margin-bottom: 26px; }
.add-campos { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: end; }
@media (min-width: 720px) { .add-campos { grid-template-columns: 2fr 1.2fr auto; } }
.add-btn { height: 48px; }
.filtros { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; align-items: center; }
.filtro {
  font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--linha);
  background: var(--creme); color: var(--tinta);
}
.filtro.on { background: var(--tinta); color: #fff; border-color: var(--tinta); }
.restaurar {
  margin-left: auto; font: inherit; font-size: .85rem; cursor: pointer;
  background: none; border: 0; color: rgba(19, 41, 61, .55); text-decoration: underline;
}
.restaurar:hover { color: var(--tomate); }

.categorias { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.categoria { padding: 18px 18px 12px; }
.cat-topo { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cat-emoji {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem;
  background: linear-gradient(135deg, rgba(243, 112, 34, .16), rgba(215, 38, 61, .10));
}
.cat-topo h3 { font-family: "Oswald", sans-serif; font-size: 1.2rem; flex: 1; }
.cat-cont { font-size: .8rem; font-weight: 700; color: rgba(19, 41, 61, .5); }
.cat-barra { height: 4px; border-radius: 99px; background: rgba(19, 41, 61, .08); overflow: hidden; margin-bottom: 8px; }
.cat-barra i { display: block; height: 100%; background: linear-gradient(90deg, var(--verde), #6cbf4f); transition: width .4s; }

.itens { list-style: none; }
.item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 6px; border-radius: 12px;
  transition: background .2s;
  animation: entra .35s ease;
}
.item:hover { background: var(--creme); }
.item + .item { border-top: 1px dashed rgba(168, 67, 28, .12); }
@keyframes entra { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.item.saindo { animation: sai .25s ease forwards; }
@keyframes sai { to { opacity: 0; transform: translateX(20px); } }

.check {
  appearance: none; flex: 0 0 auto;
  width: 24px; height: 24px; border-radius: 8px; cursor: pointer;
  border: 2px solid rgba(19, 41, 61, .25); background: #fff;
  display: grid; place-items: center; transition: all .2s;
}
.check:checked { background: var(--verde); border-color: var(--verde); }
.check:checked::after { content: "✓"; color: #fff; font-weight: 800; font-size: 14px; }
.check:focus-visible { outline: 3px solid rgba(243, 112, 34, .4); outline-offset: 2px; }
.item-nome { flex: 1; min-width: 0; font-weight: 600; cursor: pointer; }
.item.tem .item-nome { color: rgba(19, 41, 61, .55); }
.item-tag { font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.item.tem .item-tag { background: rgba(62, 142, 46, .12); color: var(--verde); }
.item:not(.tem) .item-tag { background: rgba(215, 38, 61, .1); color: var(--tomate); }
.remover {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 10px; cursor: pointer;
  border: 0; background: transparent; color: rgba(19, 41, 61, .35); font-size: 1.3rem; line-height: 1;
  transition: all .2s;
}
.remover:hover { background: rgba(215, 38, 61, .1); color: var(--tomate); }
.vazio { padding: 10px 6px 6px; color: rgba(19, 41, 61, .45); font-size: .9rem; font-style: italic; }

/* Painel compras */
.painel-fundo {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(12, 27, 41, .5); backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: 20px;
}
.painel-fundo[hidden] { display: none; }
.painel { width: 100%; max-width: 460px; padding: 22px; max-height: 80vh; display: flex; flex-direction: column; }
.painel-topo { display: flex; align-items: center; justify-content: space-between; }
.painel-topo h2 { font-family: "Oswald", sans-serif; font-size: 1.5rem; }
.fechar { border: 0; background: none; font-size: 2rem; line-height: 1; cursor: pointer; color: rgba(19, 41, 61, .5); }
.painel-sub { color: rgba(19, 41, 61, .65); margin: 4px 0 12px; }
.painel ul { list-style: none; overflow: auto; flex: 1; margin-bottom: 16px; }
.painel li { padding: 8px 4px; border-bottom: 1px dashed var(--linha); display: flex; justify-content: space-between; gap: 10px; }
.painel li small { color: rgba(19, 41, 61, .5); }
.painel-acoes { display: flex; gap: 10px; flex-wrap: wrap; }

.aviso {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%) translateY(20px);
  background: var(--tinta); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-weight: 600; font-size: .9rem; opacity: 0; pointer-events: none; transition: all .3s; z-index: 90;
}
.aviso.on { opacity: 1; transform: translateX(-50%); }

/* ---------- Impressão ---------- */
#impressao { display: none; }
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff !important; }
  body > *:not(#impressao) { display: none !important; }
  #impressao { display: block !important; color: #13293d; font-family: "Public Sans", Arial, sans-serif; }
  .imp-topo { display: flex; align-items: center; gap: 14px; padding-bottom: 10px; border-bottom: 3px solid #f37022; margin-bottom: 12px; }
  .imp-topo img { width: 54px; height: 54px; }
  .imp-topo h1 { font-family: "Oswald", sans-serif; font-size: 26pt; line-height: 1; }
  .imp-topo p { font-size: 10pt; color: #555; margin-top: 4px; }
  .imp-total { margin-left: auto; text-align: center; font-size: 9pt; color: #555; border: 1.5px solid #f37022; border-radius: 10px; padding: 6px 12px; }
  .imp-total b { display: block; font-size: 20pt; color: #f37022; font-family: "Oswald", sans-serif; }
  .imp-grade { columns: 2; column-gap: 26px; }
  .imp-cat { margin-bottom: 10px !important; }
  .imp-cat { break-inside: avoid; margin-bottom: 14px; }
  .imp-cat h3, .imp-extra h3 { font-family: "Oswald", sans-serif; font-size: 13pt; color: #a8431c; border-bottom: 1px solid #e6d3c4; padding-bottom: 3px; margin-bottom: 4px; }
  .imp-cat h3 small { color: #888; font-size: 9pt; }
  #impressao ul { list-style: none; }
  #impressao li { display: flex; align-items: center; gap: 8px; font-size: 10.5pt; padding: 3px 0; border-bottom: 1px dotted #ddd; }
  .imp-caixa { width: 13px; height: 13px; border: 1.5px solid #13293d; border-radius: 3px; flex: 0 0 auto; }
  .imp-qtd { margin-left: auto; font-size: 8.5pt; color: #999; }
  .imp-linha { flex: 1; border-bottom: 1px solid #bbb; height: 14px; }
  .imp-extra { margin-top: 8px; break-inside: avoid; }
  .imp-tenho { margin-top: 14px; font-size: 9pt; color: #666; line-height: 1.5; }
  .imp-vazio { font-size: 12pt; margin: 20px 0; }
  .imp-rodape { margin-top: 10px; padding-top: 6px; border-top: 1px solid #eee; font-size: 8.5pt; color: #999; text-align: center; }
}
