:root {
  --laranja: #e8703a;
  --laranja-escuro: #c65626;
  --fundo: #faf6f1;
  --cartao: #ffffff;
  --texto: #2f2a26;
  --muted: #766d65;
  --borda: #e8dfd5;
  --verde: #2f7d52;
  --verde-claro: #e3f3e9;
  --perigo: #b5372d;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--fundo);
  color: var(--texto);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  -webkit-tap-highlight-color: rgba(232, 112, 58, .2);
}

main { flex: 1 0 auto; }
img { max-width: 100%; }

.container {
  width: min(1100px, calc(100% - 28px));
  margin-inline: auto;
}

.site-header {
  background: var(--cartao);
  border-bottom: 1px solid var(--borda);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  min-height: 60px;
  flex-wrap: wrap;
  padding: 8px 0;
}

.brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--laranja-escuro);
  text-decoration: none;
}

nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 600;
}
.nav-link:hover, .nav-link.ativo { color: var(--laranja-escuro); }

.botao-link {
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
}

.hero { padding: 28px 0 20px; text-align: center; }
.hero h1 {
  font-size: clamp(1.6rem, 6vw, 2.6rem);
  margin: 0 0 8px;
  color: var(--laranja-escuro);
  line-height: 1.2;
}
.hero p { color: var(--muted); margin: 0 auto; max-width: 34rem; font-size: .95rem; }

.grade {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding-bottom: 32px;
}

.card {
  background: var(--cartao);
  border: 1px solid var(--borda);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(60, 40, 25, .06);
  display: flex;
  flex-direction: column;
}

.card-foto {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #efe7de;
}

.card-corpo { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h2 { margin: 0; font-size: 1.15rem; overflow-wrap: anywhere; }
.idade { margin: 0; color: var(--muted); font-size: .9rem; }
.info { margin: 2px 0 0; font-size: .9rem; white-space: pre-wrap; overflow-wrap: anywhere; }

.selos { display: flex; flex-wrap: wrap; gap: 6px; }
.selo {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
}
.selo.sim { background: var(--verde-claro); color: var(--verde); }
.selo.nao { background: #f1ece7; color: var(--muted); }

.vazio { text-align: center; color: var(--muted); padding: 32px 0; }

.site-footer {
  border-top: 1px solid var(--borda);
  color: var(--muted);
  font-size: .8rem;
  padding: 16px 0 calc(16px + env(safe-area-inset-bottom));
}

.centro { display: flex; justify-content: center; align-items: flex-start; padding: 24px 0; }

.painel {
  background: var(--cartao);
  border: 1px solid var(--borda);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 4px 16px rgba(60, 40, 25, .05);
}

.formulario { width: min(560px, 100%); display: flex; flex-direction: column; gap: 14px; }
.formulario h1, .formulario h2 { margin: 0; }
.subtitulo { color: var(--muted); margin: 0 0 6px; font-size: .92rem; }

.campo { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.campo small { color: var(--muted); font-size: .8rem; }
.opcional { color: var(--muted); font-weight: 400; font-size: .82rem; }

label { font-weight: 600; font-size: .9rem; }

input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="file"], select, textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--borda);
  border-radius: 8px;
  background: #fff;
  color: var(--texto);
  font: inherit;
  font-size: 16px;
}

input[type="file"] { padding: 8px 10px; }
textarea { min-height: 96px; resize: vertical; }
:focus-visible { outline: 2px solid var(--laranja); outline-offset: 2px; }

.linha { display: grid; grid-template-columns: 1fr; gap: 14px; }
.opcoes { display: flex; gap: 8px 20px; flex-wrap: wrap; }
.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 500;
}
.checkbox input { width: 22px; height: 22px; accent-color: var(--laranja); }

.botao {
  border: none;
  border-radius: 8px;
  min-height: 46px;
  padding: 10px 18px;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.botao.primario { background: var(--laranja); color: #fff; }
.botao.primario:hover { background: var(--laranja-escuro); }
.botao.secundario { background: #efe7de; color: var(--texto); }
.botao.perigo { background: #fdecea; color: var(--perigo); }
.botao:disabled { opacity: .6; cursor: not-allowed; }
.acoes-formulario { display: grid; grid-template-columns: 1fr; gap: 10px; }

.nota { color: var(--muted); font-size: .82rem; margin: 0; }

.mensagem { padding: 12px 14px; border-radius: 8px; font-size: .9rem; }
.mensagem.erro { background: #fdecea; color: var(--perigo); }
.mensagem.sucesso { background: var(--verde-claro); color: var(--verde); }

.cabecalho-painel { padding: 24px 0 16px; }
.cabecalho-painel h1 { margin: 0; color: var(--laranja-escuro); font-size: 1.6rem; }

.lista { margin: 20px 0 40px; }
.lista h2 { margin: 0 0 14px; font-size: 1.2rem; }
.lista-dogs { display: flex; flex-direction: column; gap: 10px; }

.item-admin {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--borda);
  border-radius: 10px;
  align-items: start;
}
.item-admin img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  background: #efe7de;
}
.item-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.item-info strong { overflow-wrap: anywhere; }
.item-info span { color: var(--muted); font-size: .85rem; }

.acoes {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.item-admin .botao { min-height: 44px; padding: 8px 12px; font-size: .9rem; }

@media (min-width: 480px) {
  .acoes-formulario { display: flex; }
}

@media (min-width: 600px) {
  .container { width: min(1100px, 94%); }
  .header-content { min-height: 68px; }
  .brand { font-size: 1.25rem; }
  .nav-link { font-size: .95rem; padding: 0 10px; }
  .hero { padding: 48px 0 28px; }
  .grade { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding-bottom: 48px; }
  .centro { padding: 56px 0; }
  .painel { padding: 24px; border-radius: 14px; }
  .linha { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cabecalho-painel { padding: 36px 0 20px; }
  .cabecalho-painel h1 { font-size: 1.8rem; }
  .lista { margin: 24px 0 56px; }
}

@media (min-width: 900px) {
  .grade { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
  .item-admin {
    display: flex;
    align-items: center;
    gap: 14px;
  }
  .item-admin img { width: 84px; height: 64px; }
  .acoes { grid-column: auto; display: flex; margin-left: auto; }
}

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