@import url('./variables.css');

/* ================= RESET E CONFIGURAÇÃO GLOBAL ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  display: flex;
  min-height: 100vh;
  width: 100vw;
  background-color: #FFDBD0;
  color: var(--text-dark, #121212);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

/* ================= SIDEBAR (MENU LATERAL) ================= */
.sidebar {
  width: 250px;
  min-width: 250px;
  background-color: var(--accent-blue, #42557a);
  color: #ffffff;
  padding: 2rem 1.25rem;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.sidebar h2 {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 2rem;
  color: #ffffff;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 0.75rem;
  text-transform: uppercase;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar nav a {
  color: rgba(255, 255, 255, 0.85) !important;
  text-decoration: none;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  display: block;
}

.sidebar nav a:hover,
.sidebar nav a.active {
  background-color: var(--primary-red, #b6231f);
  color: #ffffff !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* ================= ÁREA PRINCIPAL COM O PADRÃO ================= */
.main-content {
  flex: 1;
  padding: 2.5rem 2rem;
  overflow-y: auto;
  min-height: 100vh;
  position: relative;
  background-color: #FFDBD0;
}

/* Camada da imagem de fundo com opacidade ajustável */
.main-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background-image: url('../assets/img/pattern-carnes-flat.png');
  background-repeat: repeat;
  background-size: 220px;
  opacity: 0.18;
  z-index: 0;
  pointer-events: none;
}

.main-content h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-red, #b6231f);
  position: relative;
  z-index: 1;
  margin-bottom: 0.25rem;
}

.main-content p {
  position: relative;
  z-index: 1;
}

/* ================= CAIXA DE BUSCA (SEARCH BOX) ================= */
.search-box {
  display: flex;
  gap: 0.75rem;
  max-width: 550px;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
  background-color: #ffffff;
  padding: 0.5rem;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.search-box input {
  flex: 1;
  border: none;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  outline: none;
  background: transparent;
  color: var(--text-dark, #121212);
}

.search-box button {
  background-color: var(--primary-red, #b6231f);
  color: #ffffff;
  border: none;
  padding: 0.75rem 1.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.search-box button:hover {
  background-color: var(--primary-red-hover, #981b18);
  transform: translateY(-1px);
}

/* ================= CONTAINER E CARDS DE COMPRAS ================= */
#resultados-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 700px;
  position: relative;
  z-index: 1;
}

.compra-card {
  background-color: #ffffff;
  border-radius: 14px;
  padding: 1.5rem;
  
  /* Moldura do Card de Compra */
  border: 2px solid #e2e8f0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.compra-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary-red, #b6231f);
  box-shadow: 0 10px 24px rgba(182, 35, 31, 0.12);
}

.compra-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.header-titles {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.compra-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-blue, #42557a);
  margin-bottom: 0;
}

.comprador-nome {
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* Badges de Status da Rifa (Em Andamento / Finalizada) */
.badge-rifa-status {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-rifa-status.ativa {
  background-color: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.badge-rifa-status.finalizada {
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

/* Badges de Status (PAGO / PENDENTE) */
.badge-pago {
  background-color: #dcfce7;
  color: #16a34a;
  border: 1px solid #86efac;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.badge-pendente {
  background-color: #fef3c7;
  color: #d97706;
  border: 1px solid #fde68a;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

/* ================= TAGS DOS NÚMEROS COMPRADOS ================= */
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed #e2e8f0;
}

.tag-numero {
  background-color: var(--accent-blue, #42557a);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}