* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f6f8fb;
  color: #111827;
}

.guard {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guard.hidden {
  display: none;
}

.guard-card {
  padding: 14px 18px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.app {
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 14px;
}

.topo {
  display: grid;
  grid-template-columns: 190px 1fr 380px;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 900;
  color: #0f172a;
}

.logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.topo h1 {
  margin: 0;
  text-align: center;
  font-size: 20px;
  font-weight: 900;
  color: #0f172a;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.top-actions input {
  width: 180px;
  height: 34px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 0 11px;
  font-size: 12px;
  outline: none;
  color: #111827;
  background: #ffffff;
}

.top-actions button {
  height: 34px;
  border: 0;
  border-radius: 10px;
  padding: 0 13px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  background: #1f3b57;
  color: #ffffff;
}

.top-actions .sair {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #dbe3eb;
}

.resumo {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 9px;
  margin-bottom: 12px;
}

.card-resumo {
  border: 1px solid #e5e7eb;
  border-left: 4px solid #94a3b8;
  border-radius: 14px;
  padding: 10px 12px;
  min-height: 58px;
  background: #ffffff;
  cursor: pointer;
  text-align: left;
  font-weight: 800;
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.04);
}

.card-resumo span {
  display: block;
  font-size: 11px;
  color: #64748b;
  font-weight: 800;
}

.card-resumo strong {
  display: block;
  margin-top: 3px;
  font-size: 19px;
  color: #0f172a;
}

.card-resumo.TODOS {
  border-left-color: #64748b;
}

.card-resumo.PENDENTE {
  border-left-color: #d97706;
}

.card-resumo.DEVOLVIDO {
  border-left-color: #ea580c;
}

.card-resumo.ATIVO {
  border-left-color: #16a34a;
}

.card-resumo.INATIVO {
  border-left-color: #6b7280;
}

.card-resumo.ativo {
  background: #eef5fb;
  border-color: #c9d8e6;
}

.cabecalho-lista,
.item-linha {
  display: grid;
  grid-template-columns:
    90px
    minmax(170px, 1.4fr)
    minmax(190px, 1.5fr)
    minmax(190px, 1.4fr)
    minmax(140px, 1fr)
    140px
    95px
    150px
    190px;
  gap: 8px;
  align-items: center;
}

.cabecalho-lista {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 9px 10px;
  margin-bottom: 5px;
  border-radius: 12px;
  background: #eef2f7;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.lista {
  display: grid;
  gap: 6px;
}

.item {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.035);
}

.item-linha {
  padding: 8px 10px;
  min-height: 54px;
}

.item.expandido {
  border-color: #c9d8e6;
  background: #fbfdff;
}

.tipo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 900;
  color: #ffffff;
}

.tipo.anuncio {
  background: #1f3b57;
}

.tipo.evento {
  background: #6d5c3d;
}

.titulo {
  font-size: 12px;
  font-weight: 900;
  color: #111827;
  line-height: 1.25;
  cursor: pointer;
}

.titulo:hover {
  text-decoration: underline;
}

.descricao,
.usuario,
.local,
.data {
  font-size: 11px;
  color: #475569;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 900;
  color: #ffffff;
}

.status.ATIVO {
  background: #15803d;
}

.status.PENDENTE {
  background: #b7791f;
}

.status.DEVOLVIDO,
.status.RECUSADO {
  background: #c05621;
}

.status.INATIVO {
  background: #64748b;
}

.botoes {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
  min-width: 145px;
}

.botoes button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 9px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-aprovar {
  background: #15803d;
}

.btn-devolver {
  background: #b7791f;
}

.btn-inativar {
  background: #64748b;
}

.btn-destaque {
  background: #d1d5db;
  color: #475569;
}

.btn-destaque-ativo {
  background: #d97706;
  color: #ffffff;
}

.fotos {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  max-width: 190px;
  min-width: 190px;
  padding-bottom: 2px;
}

.fotos img {
  width: 40px;
  height: 32px;
  object-fit: cover;
  border-radius: 7px;
  border: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.detalhe-expandido {
  border-top: 1px solid #e5e7eb;
  padding: 14px;
  background: #f8fafc;
}

.detalhe-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.detalhe-campo {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 9px;
}

.detalhe-campo span {
  display: block;
  margin-bottom: 3px;
  font-size: 10px;
  font-weight: 900;
  color: #64748b;
  text-transform: uppercase;
}

.detalhe-campo strong {
  font-size: 12px;
  color: #111827;
  line-height: 1.3;
}

.detalhe-descricao {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px;
  font-size: 12px;
  color: #334155;
  line-height: 1.45;
  margin-bottom: 12px;
}

.detalhe-fotos {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.detalhe-fotos img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

.vazio {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 22px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.hidden {
  display: none;
}

@media (max-width: 900px) {
  .topo {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .brand,
  .top-actions {
    justify-content: center;
  }

  .top-actions {
    flex-wrap: wrap;
  }

  .cabecalho-lista {
    display: none;
  }

  .item-linha {
    grid-template-columns: 1fr;
  }

  .resumo {
    grid-template-columns: 1fr;
  }

  .detalhe-grid {
    grid-template-columns: 1fr;
  }
}
