@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --roxo: #5c2d91;
  --dourado: #c7a76c;
  --bg: #fdf8f9;
  --texto: #333;
  --cinza: #eaeaea;
  --verde: #4caf50;
  --vermelho: #e74c3c;
  --sombra: 0 4px 16px rgba(0, 0, 0, 0.06);
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--texto);
  margin: 0;
  padding: 0;
}

/* Cabeçalho */
.topbar {
  background: var(--roxo);
  color: white;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--sombra);
}

.topbar h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 22px;
  margin: 0;
}

/* KPI Cards */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  padding: 30px 40px;
}

.kpi {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--sombra);
  padding: 20px;
  text-align: center;
  border-top: 4px solid var(--roxo);
  transition: all 0.3s ease;
}

.kpi:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 22px rgba(92, 45, 145, 0.15);
}

.kpi-title {
  color: var(--texto);
  font-size: 14px;
  margin-bottom: 5px;
}

.kpi-number {
  font-size: 26px;
  color: var(--roxo);
  font-weight: 700;
}

/* Filtros */
.filters {
  background: #fff;
  margin: 0 40px 20px;
  border-radius: 14px;
  padding: 25px;
  box-shadow: var(--sombra);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
}

label {
  display: block;
  font-size: 13px;
  color: #555;
  margin-bottom: 6px;
}

input, select {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--cinza);
  background: #fff;
  font-size: 14px;
  color: #333;
}

.btn {
  background: var(--roxo);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.btn:hover {
  background: #4a1f77;
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--roxo);
  color: var(--roxo);
}

.btn.ghost:hover {
  background: var(--roxo);
  color: white;
}

/* Tabela */
.table-wrap {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--sombra);
  margin: 0 40px 40px;
  overflow: hidden;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th, .table td {
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
}

.table thead {
  background: var(--roxo);
  color: white;
}

.table tbody tr:nth-child(even) {
  background: #fafafa;
}

.table tbody tr:hover {
  background: #f3eaff;
}

.badge {
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
}

.badge.ok {
  background: var(--verde);
  color: #fff;
}

.badge.pending {
  background: #d97706;
  color: #fff;
}

.badge.danger {
  background: var(--vermelho);
  color: #fff;
}

.badge.muted {
  background: #ccc;
  color: #fff;
}

/* Ações */
.inline-form {
  display: inline;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.btn.small {
  padding: 5px 10px;
  font-size: 13px;
}

/* Responsivo */
@media (max-width: 768px) {
  .kpis {
    padding: 20px;
  }

  .filters, .table-wrap {
    margin: 10px 15px;
    padding: 15px;
  }

  .table th, .table td {
    padding: 10px;
    font-size: 13px;
  }
}

/* ====================================================== */
/* === CABEÇALHO CENTRALIZADO PREMIUM (final com animação) === */
/* ====================================================== */

.admin-header-centered {
  background: var(--roxo);
  color: #fff;
  text-align: center;
  padding: 70px 20px 80px;
  position: relative;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  animation: headerFadeSlide 1.2s ease-out both;
}

/* Subtítulo dourado animado */
.painel-subtitulo {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  color: var(--dourado);
  letter-spacing: 1.5px;
  margin-bottom: 12px;
  text-shadow: 0 0 10px rgba(199,167,108,0.5);
  animation: fadeInText 1.3s ease forwards;
}

/* Título com gradiente lilás-dourado */
.admin-header-centered h1 {
  font-family: 'Playfair Display', serif;
  font-size: 52px;
  font-weight: 700;
  margin: 0;
  letter-spacing: 1.2px;
  background: linear-gradient(90deg, #e7d4ff, var(--dourado), #f0e5ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: titleGlow 2.5s ease-in-out infinite alternate, fadeInText 1.4s ease forwards;
}

/* Saudação */
.admin-header-centered p {
  font-family: 'Inter', sans-serif;
  font-size: 24px;
  margin-top: 12px;
  opacity: 0.95;
  animation: fadeInText 1.6s ease forwards;
}

/* Botão Sair */
.logout-btn {
  display: inline-block;
  margin-top: 26px;
  background: var(--dourado);
  color: var(--roxo);
  padding: 12px 26px;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  font-size: 20px;
  transition: all 0.3s ease;
  animation: fadeInText 1.9s ease forwards;
}

.logout-btn:hover {
  background: #fff;
  color: var(--roxo);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Linha dourada animada */
.header-line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, rgba(199,167,108,0.3), var(--dourado), rgba(199,167,108,0.3));
  background-size: 200% auto;
  animation: shimmer 3s linear infinite;
  border-radius: 2px;
}

/* ===== Animações ===== */
@keyframes headerFadeSlide {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes titleGlow {
  0% { text-shadow: 0 0 8px rgba(199,167,108,0.4); }
  100% { text-shadow: 0 0 18px rgba(199,167,108,0.8); }
}

@keyframes fadeInText {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
  from { background-position: 0% center; }
  to { background-position: 200% center; }
}

/* ===== Responsividade aprimorada ===== */
@media (max-width: 1024px) {
  .admin-header-centered { padding: 60px 20px 70px; }
  .painel-subtitulo { font-size: 22px; }
  .admin-header-centered h1 { font-size: 42px; }
  .admin-header-centered p { font-size: 22px; }
  .logout-btn { font-size: 18px; padding: 10px 24px; }
}

@media (max-width: 768px) {
  .admin-header-centered { padding: 50px 15px 60px; }
  .painel-subtitulo { font-size: 20px; }
  .admin-header-centered h1 { font-size: 36px; }
  .admin-header-centered p { font-size: 20px; }
  .logout-btn { font-size: 17px; padding: 10px 22px; }
}

@media (max-width: 480px) {
  .painel-subtitulo { font-size: 18px; }
  .admin-header-centered h1 { font-size: 30px; }
  .admin-header-centered p { font-size: 18px; }
  .logout-btn { font-size: 16px; padding: 9px 20px; }
}
