@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fontes/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Work Sans";
  src: url("fontes/work-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --papel: #f7f3ea;
  --papel-forte: #ece4d2;
  --tinta: #171717;
  --tinta-suave: #5d5a54;
  --verde: #0f6b5b;
  --verde-escuro: #0a4d42;
  --amarelo: #ffc531;
  --branco: #fffdf8;
  --vermelho: #b33a3a;
  --sombra: 0 18px 45px rgba(32, 25, 14, 0.18);
  --raio: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  width: 380px;
  background:
    radial-gradient(circle at 88% 4%, rgba(255, 197, 49, 0.36), transparent 32%),
    var(--papel);
  color: var(--tinta);
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

.painel {
  height: 600px;
  min-height: 560px;
  padding: 20px 18px 16px;
  display: flex;
  flex-direction: column;
}

.topo {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.marca {
  display: flex;
  align-items: center;
  gap: 11px;
}

.marca-simbolo {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--verde);
  color: var(--amarelo);
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.14);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

#contador {
  margin-top: 3px;
  color: var(--tinta-suave);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.botao {
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 650;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.botao:hover {
  transform: translateY(-1px);
}

.botao:focus-visible,
.botao-fechar:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(15, 107, 91, 0.3);
  outline-offset: 2px;
}

.botao-novo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  background: var(--tinta);
  color: var(--branco);
  font-size: 13px;
  box-shadow: 0 7px 16px rgba(23, 23, 23, 0.14);
}

.botao-novo:hover {
  background: var(--verde);
  box-shadow: 0 8px 18px rgba(15, 107, 91, 0.22);
}

.botao-novo svg,
.busca svg,
.botao-fechar svg,
.item-acao svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.busca {
  position: relative;
  display: block;
  margin-top: 18px;
}

.busca svg {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 17px;
  height: 17px;
  color: var(--tinta-suave);
  transform: translateY(-50%);
}

.busca input {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 11px 12px 11px 38px;
  background: var(--branco);
  color: var(--tinta);
  box-shadow: 0 4px 14px rgba(32, 25, 14, 0.07);
}

.busca input::placeholder {
  color: #8d877b;
}

.dica {
  margin: 11px 2px 5px;
  color: var(--tinta-suave);
  font-size: 12px;
}

.dica span,
.dica button {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 750;
}

.dica span {
  color: var(--verde);
}

.dica button {
  border: 0;
  padding: 0;
  background: none;
  color: var(--verde);
  cursor: pointer;
}

.lista-vazia {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 34px 16px;
  text-align: center;
}

.lista-vazia[hidden] {
  display: none;
}

.vazio-desenho {
  width: 62px;
  height: 62px;
  border-radius: 22px 22px 22px 7px;
  display: grid;
  place-items: center;
  margin-bottom: 15px;
  background: var(--amarelo);
  color: var(--tinta);
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 34px;
  font-weight: 800;
  box-shadow: inset -7px -7px 0 rgba(23, 23, 23, 0.08);
}

.lista-vazia h2 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.lista-vazia p {
  max-width: 25ch;
  margin-top: 7px;
  color: var(--tinta-suave);
  font-size: 13px;
  text-wrap: pretty;
}

.lista {
  list-style: none;
  margin: 9px 0 0;
  padding: 0 2px 14px;
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: 9px;
  overflow-y: auto;
}

.item {
  position: relative;
  border: 1px solid rgba(23, 23, 23, 0.06);
  border-radius: 15px;
  padding: 12px 12px 11px;
  background: var(--branco);
  box-shadow: 0 5px 14px rgba(32, 25, 14, 0.06);
}

.item-cabecalho {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.atalho {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border-radius: 8px;
  padding: 4px 8px;
  background: var(--papel-forte);
  color: var(--verde-escuro);
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-acoes {
  display: inline-flex;
  gap: 2px;
  flex-shrink: 0;
}

.item-acao {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--tinta-suave);
  cursor: pointer;
}

.item-acao:hover {
  background: var(--papel);
  color: var(--tinta);
}

.item-acao svg {
  width: 16px;
  height: 16px;
}

.item-acao.apagar:hover {
  background: rgba(179, 58, 58, 0.1);
  color: var(--vermelho);
}

.item-texto {
  display: -webkit-box;
  margin-top: 8px;
  color: var(--tinta-suave);
  font-size: 13px;
  line-height: 1.45;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.rodape {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(23, 23, 23, 0.08);
  color: var(--tinta-suave);
  font-size: 11px;
  text-align: center;
}

.acoes-rodape {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-top: 11px;
}

.botao-backup {
  border: 1px solid rgba(23, 23, 23, 0.1);
  border-radius: 10px;
  padding: 7px 10px;
  background: transparent;
  color: var(--verde-escuro);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.botao-backup:hover {
  background: var(--papel-forte);
}

.aviso {
  min-height: 18px;
  margin: 7px 2px 0;
  color: var(--verde-escuro);
  font-size: 12px;
  text-align: center;
}

.aviso.erro {
  color: var(--vermelho);
}

.rodape-ponto {
  margin: 0 5px;
  color: var(--verde);
}

.editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(23, 23, 23, 0.42);
  backdrop-filter: blur(4px);
}

.editor-overlay[hidden] {
  display: none;
}

.editor {
  width: 100%;
  border-radius: 20px;
  padding: 18px;
  background: var(--papel);
  box-shadow: var(--sombra);
}

.editor-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.editor h2 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.botao-fechar {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--papel-forte);
  cursor: pointer;
}

.botao-fechar svg {
  width: 16px;
  height: 16px;
}

.campo {
  display: block;
  margin-top: 13px;
}

.campo span {
  display: block;
  margin: 0 0 6px 2px;
  color: var(--tinta-suave);
  font-size: 12px;
  font-weight: 650;
}

.campo input,
.campo textarea {
  width: 100%;
  border: 1px solid rgba(23, 23, 23, 0.08);
  border-radius: 12px;
  padding: 10px 11px;
  background: var(--branco);
  color: var(--tinta);
  resize: vertical;
}

.campo textarea {
  line-height: 1.5;
}

.erro {
  min-height: 18px;
  margin-top: 8px;
  color: var(--vermelho);
  font-size: 12px;
}

.editor-acoes {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 5px;
}

.botao-cancelar {
  padding: 10px 12px;
  background: var(--papel-forte);
  color: var(--tinta);
}

.botao-cancelar:hover {
  background: #e2d8c3;
}

.botao-salvar {
  padding: 10px 15px;
  background: var(--verde);
  color: var(--branco);
  box-shadow: 0 7px 16px rgba(15, 107, 91, 0.18);
}

.botao-salvar:hover {
  background: var(--verde-escuro);
  box-shadow: 0 8px 18px rgba(15, 107, 91, 0.24);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
