/* ─── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --indigo-900: #1e1b4b;
  --indigo-800: #312e81;
  --indigo-700: #3730a3;
  --indigo-600: #4f46e5;
  --indigo-500: #6366f1;
  --indigo-400: #818cf8;
  --indigo-300: #a5b4fc;
  --indigo-200: #c7d2fe;
  --indigo-100: #e0e7ff;
  --indigo-50:  #eef2ff;
  --violet-600: #7c3aed;
  --violet-500: #8b5cf6;
  --amber-400:  #fbbf24;
  --amber-300:  #fcd34d;
  --amber-100:  #fef3c7;
  --amber-700:  #b45309;
  --amber-900:  #78350f;
  --emerald-400:#34d399;
  --emerald-300:#6ee7b7;
  --emerald-100:#d1fae5;
  --emerald-600:#059669;
  --red-400:    #f87171;
  --red-100:    #fee2e2;
  --red-700:    #b91c1c;
  --green-400:  #4ade80;
  --green-100:  #dcfce7;
  --green-600:  #16a34a;
  --gray-800:   #1f2937;
  --gray-700:   #374151;
  --gray-600:   #4b5563;
  --gray-500:   #6b7280;
  --gray-400:   #9ca3af;
  --gray-300:   #d1d5db;
  --gray-200:   #e5e7eb;
  --gray-100:   #f3f4f6;
  --gray-50:    #f9fafb;
  --white:      #ffffff;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ─── Auth Layout ───────────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--indigo-900) 0%, var(--indigo-800) 50%, var(--violet-600) 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  position: relative;
  overflow: hidden;
}
.auth-page::before {
  content: '';
  position: absolute; top: -10rem; right: -10rem;
  width: 20rem; height: 20rem;
  background: rgba(139,92,246,0.2);
  border-radius: 50%; filter: blur(60px); pointer-events: none;
}
.auth-page::after {
  content: '';
  position: absolute; bottom: -10rem; left: -10rem;
  width: 20rem; height: 20rem;
  background: rgba(99,102,241,0.2);
  border-radius: 50%; filter: blur(60px); pointer-events: none;
}

.auth-container { width: 100%; max-width: 420px; position: relative; z-index: 1; }

.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 4rem; height: 4rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 1rem; margin-bottom: 1rem;
  backdrop-filter: blur(8px);
  font-size: 1.75rem;
}
.auth-title { font-size: 1.4rem; font-weight: 800; color: white; }
.auth-subtitle { color: var(--indigo-300); font-size: 0.8rem; margin-top: 0.25rem; }

.auth-card {
  background: white;
  border-radius: 1.25rem;
  box-shadow: 0 25px 50px rgba(0,0,0,0.35);
  padding: 2rem;
}
.auth-card h2 { font-size: 1rem; font-weight: 700; color: var(--gray-800); margin-bottom: 0.25rem; }
.auth-card .subtitle { color: var(--gray-400); font-size: 0.75rem; margin-bottom: 1.5rem; }

/* ─── Form Elements ─────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block; font-size: 0.75rem; font-weight: 600;
  color: var(--gray-600); margin-bottom: 0.375rem;
}
.form-control {
  width: 100%; padding: 0.75rem 1rem;
  border: 1.5px solid var(--gray-200);
  border-radius: 0.75rem;
  font-size: 0.875rem; color: var(--gray-800);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.form-control:focus {
  border-color: var(--indigo-400);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.form-control:disabled {
  background: var(--gray-50); color: var(--gray-500);
}

.input-wrapper { position: relative; }
.input-wrapper .form-control { padding-right: 3rem; }

/* ─── Field-level error state (estilo Stripe/Material/GitHub) ─────────────── */
/* Quando o form-group tem .has-error: label fica vermelho, borda do input
   tambem vermelha, e mostra mensagem especifica abaixo do campo. */
.form-group.has-error label { color: var(--red-700); }
.form-group.has-error .form-control {
  border-color: var(--red-400);
  background: rgba(248, 113, 113, 0.04);
}
.form-group.has-error .form-control:focus {
  border-color: var(--red-700);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15);
}
.field-error-msg {
  display: flex; align-items: center; gap: 0.3rem;
  margin-top: 0.375rem;
  font-size: 0.72rem; color: var(--red-700); font-weight: 500;
}
.field-error-msg::before {
  content: '⚠';
  font-size: 0.78rem;
}
.input-toggle {
  position: absolute; right: 0.75rem; top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400); font-size: 1.1rem;
  padding: 0.25rem; border-radius: 4px;
}
.input-toggle:hover { color: var(--gray-600); }

/* ─── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem; padding: 0.75rem 1.5rem;
  border-radius: 0.75rem; font-size: 0.875rem;
  font-weight: 600; transition: all 0.15s;
  cursor: pointer; border: none;
}
.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--indigo-600), var(--violet-600));
  color: white;
  box-shadow: 0 4px 12px rgba(99,102,241,0.35);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--indigo-700), #6d28d9);
  transform: translateY(-1px); box-shadow: 0 6px 16px rgba(99,102,241,0.45);
}
.btn-primary:disabled { opacity: 0.65; transform: none; cursor: not-allowed; }
.btn-ghost { color: var(--indigo-600); font-size: 0.875rem; font-weight: 500; padding: 0.5rem 1rem; border-radius: 0.5rem; }
.btn-ghost:hover { background: var(--indigo-50); }
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.78rem; border-radius: 0.5rem; }
.btn-success { background: var(--green-600); color: white; }
.btn-success:hover { background: #15803d; }
.btn-danger { background: var(--red-700); color: white; }
.btn-danger:hover { background: #991b1b; }
.btn-outline { border: 1.5px solid var(--gray-200); background: white; color: var(--gray-600); }
.btn-outline:hover { border-color: var(--indigo-300); color: var(--indigo-600); background: var(--indigo-50); }

/* ─── Auth Footer Links ─────────────────────────────────────────────────────── */
.auth-links {
  margin-top: 1.5rem; padding-top: 1.5rem;
  border-top: 1px solid var(--gray-100);
  display: flex; flex-direction: column; gap: 0.5rem; align-items: center;
}
.auth-links a, .auth-links button {
  font-size: 0.875rem; color: var(--indigo-600); font-weight: 500;
  padding: 0.5rem 1rem; border-radius: 0.5rem;
  width: 100%; text-align: center;
}
.auth-links a:hover, .auth-links button:hover { background: var(--indigo-50); }
.auth-links .link-muted { color: var(--gray-400); font-weight: 400; }
.auth-links .link-muted:hover { color: var(--gray-600); background: var(--gray-50); }

/* ─── Demo Hint ─────────────────────────────────────────────────────────────── */
.demo-hint {
  margin-top: 1rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.75rem; padding: 1rem;
  backdrop-filter: blur(8px);
}
.demo-hint p { color: var(--indigo-200); font-size: 0.75rem; font-weight: 600; margin-bottom: 0.5rem; }
.demo-hint .demo-row { color: var(--indigo-300); font-size: 0.75rem; line-height: 1.8; }
.demo-hint .demo-row span { color: white; }

/* ─── Messages / Alerts ─────────────────────────────────────────────────────── */
.messages-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.alert {
  padding: 0.75rem 1rem; border-radius: 0.625rem;
  font-size: 0.8rem; font-weight: 500;
  display: flex; align-items: center; gap: 0.5rem;
}
.alert-success { background: var(--green-100); color: var(--green-600); }
.alert-error { background: var(--red-100); color: var(--red-700); }
.alert-warning { background: var(--amber-100); color: var(--amber-700); }
.alert-info { background: var(--indigo-100); color: var(--indigo-700); }

/* ─── Navbar ────────────────────────────────────────────────────────────────── */
.navbar {
  background: white;
  border-bottom: 1px solid var(--gray-100);
  padding: 0 1rem;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  max-width: 100vw;
  overflow: hidden;
}
.navbar-inner {
  max-width: 64rem; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 3.5rem;
  gap: 0.5rem;
}
.navbar-brand {
  display: flex; align-items: center; gap: 0.5rem;
  font-weight: 800; color: var(--indigo-700); font-size: 0.9rem;
  min-width: 0;
}
.navbar-brand .trophy { font-size: 1.2rem; flex-shrink: 0; }
.navbar-brand .brand-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.navbar-right { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.navbar-user {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; color: var(--gray-600);
  min-width: 0;
}
.navbar-user .navbar-username {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 120px;
}
.navbar-avatar {
  width: 2rem; height: 2rem;
  background: var(--indigo-100); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8rem; color: var(--indigo-700);
  flex-shrink: 0;
}
.badge-admin {
  background: var(--amber-400); color: var(--amber-900);
  font-size: 0.65rem; font-weight: 700; padding: 0.15rem 0.5rem;
  border-radius: 0.25rem; flex-shrink: 0;
}
.btn-icon { padding: 0.4rem 0.5rem; }

/* ─── Dashboard Hero ────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #3730a3 0%, var(--indigo-600) 50%, var(--violet-600) 100%);
  color: white; padding: 1.5rem 1rem 4.5rem;
}
.hero-admin {
  background: linear-gradient(135deg,#1e1b4b 0%,#3730a3 50%,#7c3aed 100%);
}
.hero-inner { max-width: 64rem; margin: 0 auto; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-bottom: 0.375rem;
}
.hero h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.25rem; }
.hero .meta { color: var(--indigo-300); font-size: 0.75rem; }

.hero-top { display:flex; justify-content:space-between; align-items:flex-start; flex-wrap:wrap; gap:1rem; }
.hero-rank-label { font-size:0.72rem; }
.hero-rank-value { font-size:2.5rem; font-weight:900; line-height:1; }

.admin-hero-top { display:flex; align-items:center; gap:0.5rem; margin-bottom:0.25rem; }
.admin-hero-sub { color:var(--indigo-300); font-size:0.8rem; }
.badge-admin-hero { background:var(--amber-400); color:var(--amber-900); }

.stats-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem; margin-top: 1.5rem;
}
.stats-grid-admin {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem; margin-top: 1.5rem;
}
.stat-card {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  border-radius: 0.75rem; padding: 0.75rem;
  text-align: center;
}
.stat-card .stat-value { font-size: 1.5rem; font-weight: 800; color: white; }
.stat-card .stat-label { color: var(--indigo-200); font-size: 0.7rem; margin-top: 0.15rem; }
.stat-card .stat-value.accent { color: var(--amber-300); }

/* ─── Dashboard Content ─────────────────────────────────────────────────────── */
.dashboard-content { max-width: 64rem; margin: 0 auto; padding: 0 1rem; }
.content-offset { margin-top: -2.5rem; }

.card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border: 1px solid var(--gray-100);
}
.card-body { padding: 1rem; }
.card-header { padding: 1rem 1rem 0; display: flex; align-items: center; justify-content: space-between; }
.card-header h3 { font-size: 0.875rem; font-weight: 700; color: var(--gray-800); }
.card-header a { font-size: 0.75rem; color: var(--indigo-600); }
.card-header a:hover { color: var(--indigo-700); }

/* ─── Tabs ──────────────────────────────────────────────────────────────────── */
.tab-bar {
  background: white; border-radius: 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border: 1px solid var(--gray-100);
  padding: 0.25rem; display: flex;
  overflow-x: auto; gap: 0.25rem;
  margin-bottom: 1rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab-btn {
  flex-shrink: 0; display: flex; align-items: center;
  gap: 0.375rem; padding: 0.5rem 0.85rem;
  border-radius: 0.625rem; font-size: 0.78rem; font-weight: 600;
  transition: all 0.15s; white-space: nowrap;
  color: var(--gray-500);
}
.tab-btn:hover { color: var(--gray-700); background: var(--gray-50); }
.tab-btn.active {
  background: linear-gradient(135deg, var(--indigo-600), var(--violet-600));
  color: white; box-shadow: 0 2px 6px rgba(99,102,241,0.35);
}
.tab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.25rem; height: 1.25rem;
  padding: 0 0.25rem; border-radius: 999px;
  font-size: 0.7rem; font-weight: 700;
}
.tab-btn .tab-badge { background: rgba(255,255,255,0.25); color: white; }
.tab-btn:not(.active) .tab-badge { background: var(--amber-100); color: var(--amber-700); }

/* ─── Progress Bar ──────────────────────────────────────────────────────────── */
.progress-card { padding: 1rem; margin-bottom: 1rem; }
.progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.progress-label { font-size: 0.8rem; font-weight: 600; color: var(--gray-700); display: flex; align-items: center; gap: 0.375rem; }
.progress-value { font-size: 0.75rem; color: var(--gray-500); }
.progress-bar-track {
  width: 100%; background: var(--gray-100);
  border-radius: 999px; height: 0.6rem; overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--indigo-500), var(--violet-500));
  border-radius: 999px;
  transition: width 0.5s ease;
}
.progress-hint { font-size: 0.72rem; color: var(--gray-400); margin-top: 0.375rem; }

/* ─── Prize Banners ─────────────────────────────────────────────────────────── */
.prize-banners { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.prize-banner {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1rem; border-radius: 0.75rem;
  font-size: 0.8rem; font-weight: 600;
}
.prize-banner.podium {
  background: rgba(251,191,36,0.15);
  border: 1px solid rgba(252,211,77,0.3);
  color: var(--amber-300);
}
.prize-banner.brinde {
  background: rgba(52,211,153,0.15);
  border: 1px solid rgba(110,231,183,0.3);
  color: var(--emerald-300);
}

/* ─── Activity Cards ────────────────────────────────────────────────────────── */
.activity-card {
  padding: 1rem; border-bottom: 1px solid var(--gray-100);
}
.activity-card:last-child { border-bottom: none; }
.activity-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; margin-bottom: 0.5rem; }
.activity-title { font-size: 0.875rem; font-weight: 700; color: var(--gray-800); flex: 1; }
.activity-points {
  font-size: 0.75rem; font-weight: 700;
  color: var(--indigo-600); background: var(--indigo-50);
  padding: 0.2rem 0.6rem; border-radius: 999px; white-space: nowrap;
}
.activity-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: 0.72rem; color: var(--gray-500); margin-bottom: 0.75rem; }
.activity-meta span { display: flex; align-items: center; gap: 0.25rem; }
.activity-desc { font-size: 0.78rem; color: var(--gray-600); line-height: 1.5; margin-bottom: 0.75rem; }
.activity-footer { display: flex; justify-content: space-between; align-items: center; }

/* ─── Badges ────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 0.2rem 0.6rem; border-radius: 999px;
  font-size: 0.7rem; font-weight: 600;
}
.badge-palestra  { background: #dbeafe; color: #1d4ed8; }
.badge-workshop  { background: #ede9fe; color: #6d28d9; }
.badge-minicurso { background: #e0e7ff; color: #3730a3; }
.badge-mesa      { background: #fef3c7; color: #92400e; }
.badge-hackathon { background: #fee2e2; color: #991b1b; }
.badge-visita    { background: #dcfce7; color: #15803d; }
.badge-cerimonia { background: #fce7f3; color: #9d174d; }
.badge-default   { background: var(--gray-100); color: var(--gray-600); }
.badge-pending   { background: var(--amber-100); color: var(--amber-700); }
.badge-validated { background: var(--green-100); color: var(--green-600); }
.badge-rejected  { background: var(--red-100); color: var(--red-700); }

/* ─── Participation Status Button ───────────────────────────────────────────── */
.status-tag {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.35rem 0.75rem; border-radius: 0.5rem;
  font-size: 0.75rem; font-weight: 600;
}
.status-tag.pending   { background: var(--amber-100); color: var(--amber-700); }
.status-tag.validated { background: var(--green-100); color: var(--green-600); }
.status-tag.rejected  { background: var(--red-100); color: var(--red-700); }

/* ─── Ranking Table ─────────────────────────────────────────────────────────── */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ranking-table { width: 100%; border-collapse: collapse; min-width: 500px; }
.ranking-table th {
  padding: 0.5rem 0.75rem; text-align: left;
  font-size: 0.7rem; font-weight: 700; color: var(--gray-500);
  text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 1.5px solid var(--gray-100);
}
.ranking-table td { padding: 0.75rem; border-bottom: 1px solid var(--gray-50); }
.ranking-table tr:last-child td { border-bottom: none; }
.ranking-table tr:hover td { background: var(--gray-50); }

.rank-medal { font-size: 1.1rem; }
.rank-num { font-size: 0.75rem; font-weight: 700; color: var(--gray-500); }
.rank-name { font-size: 0.85rem; font-weight: 600; color: var(--gray-800); }
.rank-pts { font-size: 0.9rem; font-weight: 800; color: var(--indigo-600); }
.rank-sub { font-size: 0.7rem; color: var(--gray-400); }

.row-top1 td { background: linear-gradient(90deg, rgba(251,191,36,0.08), transparent); }
.row-top2 td { background: linear-gradient(90deg, rgba(209,213,219,0.12), transparent); }
.row-top3 td { background: linear-gradient(90deg, rgba(180,120,60,0.08), transparent); }
.row-me td   { background: linear-gradient(90deg, rgba(99,102,241,0.06), transparent); }

.rank-you { color:var(--indigo-400); font-size:0.7rem; }
.brinde-retirado-tag { font-size:0.68rem; background:var(--gray-100); color:var(--gray-600); padding:0.15rem 0.45rem; border-radius:999px; font-weight:600; }

/* ─── Recent Items ─────────────────────────────────────────────────────────── */
.recent-item { display:flex; justify-content:space-between; align-items:center; padding:0.6rem 0; border-bottom:1px solid var(--gray-100); }
.recent-item:last-child { border-bottom: none; }
.recent-title { font-size:0.82rem; font-weight:600; color:var(--gray-800); }
.recent-pts { font-size:0.7rem; color:var(--gray-400); }

/* ─── Quick Stats (2-col grid) ──────────────────────────────────────────────── */
.stats-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1rem; }
.mini-stat-card { padding: 1rem; }
.mini-stat-icon { display: flex; align-items: center; gap: 0.5rem; font-size: 0.72rem; color: var(--gray-500); margin-bottom: 0.5rem; }
.mini-stat-value { font-size: 0.875rem; font-weight: 700; color: var(--gray-800); }
.mini-stat-sub { font-size: 0.7rem; color: var(--gray-400); margin-top: 0.15rem; }

/* ─── Admin Pending List ────────────────────────────────────────────────────── */
.pending-card { padding: 1rem; margin-bottom: 0.75rem; }
.pending-header { display: flex; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.pending-user { display: flex; align-items: center; gap: 0.75rem; }
.pending-avatar {
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: var(--indigo-100);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.9rem; color: var(--indigo-700);
  flex-shrink: 0;
}
.pending-name { font-size: 0.875rem; font-weight: 700; color: var(--gray-800); }
.pending-cpf { font-size: 0.72rem; color: var(--gray-400); }
.pending-actions { display: flex; gap: 0.5rem; }
.pending-activity { margin-top: 0.75rem; padding: 0.75rem; background: var(--gray-50); border-radius: 0.625rem; }
.pending-activity .act-title { font-size: 0.82rem; font-weight: 600; color: var(--gray-700); }
.pending-activity .act-meta { font-size: 0.72rem; color: var(--gray-500); margin-top: 0.2rem; }

/* ─── Alert Banner ──────────────────────────────────────────────────────────── */
.alert-banner {
  background: var(--amber-100); border: 1px solid rgba(251,191,36,0.4);
  border-radius: 1rem; padding: 0.75rem 1rem;
  display: flex; align-items: center; gap: 0.5rem;
  cursor: pointer; margin-bottom: 1rem;
  transition: background 0.15s;
}
.alert-banner:hover { background: #fde68a; }
.alert-banner p { font-size: 0.8rem; color: var(--amber-700); font-weight: 600; }

/* ─── Empty State ───────────────────────────────────────────────────────────── */
.empty-state { padding: 3rem 1rem; text-align: center; }
.empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; opacity: 0.3; }
.empty-state p { font-size: 0.875rem; color: var(--gray-500); }
.empty-state small { font-size: 0.75rem; color: var(--gray-400); }

/* ─── Section Header ────────────────────────────────────────────────────────── */
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 0.75rem;
}
.section-header h3 { font-size: 0.875rem; font-weight: 700; color: var(--gray-700); }
.section-header .count { font-size: 0.75rem; color: var(--gray-400); }

/* ─── Success Box ───────────────────────────────────────────────────────────── */
.success-box { text-align: center; padding: 2rem 1rem; }
.success-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 4rem; height: 4rem; border-radius: 50%;
  background: var(--green-100); color: var(--green-600);
  font-size: 2rem; margin-bottom: 1rem;
}
.success-box h2 { font-size: 1.1rem; font-weight: 700; color: var(--gray-800); margin-bottom: 0.375rem; }
.success-box p { font-size: 0.8rem; color: var(--gray-500); margin-bottom: 1.5rem; }

/* ─── Forgot Password Steps ─────────────────────────────────────────────────── */
.step-indicator {
  display: flex; align-items: center; justify-content: center;
  gap: 0.5rem; margin-bottom: 1.5rem;
}
.step-dot {
  width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: var(--gray-200);
}
.step-dot.active { background: var(--indigo-500); width: 1.5rem; border-radius: 999px; }
.step-dot.done { background: var(--green-400); }

.identity-confirm {
  background: var(--indigo-50); border: 1px solid var(--indigo-200);
  border-radius: 0.75rem; padding: 0.875rem 1rem; margin-bottom: 1.25rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.identity-confirm .ic-icon { font-size: 1.5rem; }
.identity-confirm .ic-text h4 { font-size: 0.85rem; font-weight: 700; color: var(--indigo-700); }
.identity-confirm .ic-text p { font-size: 0.75rem; color: var(--indigo-600); }

/* ─── Loader Spinner ────────────────────────────────────────────────────────── */
.spinner {
  display: inline-block; width: 1rem; height: 1rem;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white; border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Utilities ─────────────────────────────────────────────────────────────── */
.mt-1  { margin-top: 0.25rem; }
.mt-2  { margin-top: 0.5rem; }
.mt-3  { margin-top: 0.75rem; }
.mt-4  { margin-top: 1rem; }
.mb-1  { margin-bottom: 0.25rem; }
.mb-2  { margin-bottom: 0.5rem; }
.mb-3  { margin-bottom: 0.75rem; }
.mb-4  { margin-bottom: 1rem; }
.pb-8  { padding-bottom: 2rem; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-sm     { font-size: 0.875rem; }
.text-xs     { font-size: 0.75rem; }
.text-muted  { color: var(--gray-400); }
.text-indigo { color: var(--indigo-600); }
.font-bold   { font-weight: 700; }
.flex        { display: flex; }
.items-center { align-items: center; }
.gap-2       { gap: 0.5rem; }
.w-full      { width: 100%; }

/* ─── Status Badges ────────────────────────────────────────────────────────── */
.badge-status {
  display: inline-flex; align-items: center;
  padding: 0.2rem 0.6rem; border-radius: 999px;
  font-size: 0.68rem; font-weight: 600; white-space: nowrap;
}
.badge-status-validado {
  background: var(--green-100); color: var(--green-600);
  border: 1px solid rgba(22,163,74,0.15);
}
.badge-status-pendente {
  background: var(--amber-100); color: var(--amber-700);
  border: 1px solid rgba(180,83,9,0.15);
}
.badge-status-brinde {
  background: var(--emerald-100); color: var(--emerald-600);
  border: 1px solid rgba(5,150,105,0.15);
}
.badge-status-rejeitado {
  background: var(--red-100); color: var(--red-700);
  border: 1px solid rgba(185,28,28,0.15);
}

/* ─── CSV Button ────────────────────────────────────────────────────────────── */
.btn-csv {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.35rem 0.75rem; font-size: 0.7rem; font-weight: 600;
  color: var(--gray-500); border-radius: 0.4rem; white-space: nowrap;
  transition: all 0.15s; flex-shrink: 0;
  border: 1.5px solid var(--gray-200);
}
.btn-csv:hover {
  color: var(--indigo-600); border-color: var(--indigo-300);
  background: var(--indigo-50);
}
.btn-csv::before {
  content: '⬇';
  font-size: 0.6rem; opacity: 0.6;
}

/* ─── Participants Toolbar ────────────────────────────────────────────────── */
.participants-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; margin-bottom: 1rem; flex-wrap: wrap;
}
.participants-toolbar-left {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
}
.participants-toolbar-right {
  display: flex; align-items: center; gap: 0.5rem;
}
.participants-count {
  font-size: 0.8rem; font-weight: 600; color: var(--gray-500);
  white-space: nowrap;
}
.participants-filter {
  display: flex; gap: 0.25rem; flex-wrap: wrap;
}
.filter-chip {
  display: inline-flex; align-items: center;
  padding: 0.3rem 0.65rem; font-size: 0.72rem; font-weight: 600;
  color: var(--gray-500); border-radius: 0.5rem; white-space: nowrap;
  transition: all 0.15s; cursor: pointer;
}
.filter-chip:hover { color: var(--gray-700); background: var(--gray-100); }
.filter-chip.active {
  color: white;
  background: linear-gradient(135deg, var(--indigo-600), var(--violet-600));
}
.participants-search { display: flex; align-items: center; }
.search-input {
  border: 1.5px solid var(--gray-200); border-radius: 0.5rem;
  padding: 0.4rem 0.75rem; font-size: 0.78rem; outline: none;
  width: 160px; transition: border-color 0.15s, width 0.2s;
  color: var(--gray-800);
}
.search-input:focus {
  border-color: var(--indigo-400); width: 200px;
}
.search-input::placeholder { color: var(--gray-400); }

/* ─── Participants Grid ───────────────────────────────────────────────────── */
.participants-grid {
  display: grid; gap: 0.75rem;
}

.participant-card {
  display: flex; gap: 0.75rem; padding: 1rem;
  background: white; border-radius: 0.75rem;
  border: 1px solid var(--gray-100);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: box-shadow 0.15s, border-color 0.15s;
  cursor: default;
}
.participant-card:hover {
  box-shadow: 0 3px 10px rgba(0,0,0,0.07);
  border-color: var(--gray-200);
}
.participant-card-avatar {
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: linear-gradient(135deg, var(--indigo-100), var(--indigo-50));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.95rem; color: var(--indigo-600);
  flex-shrink: 0; letter-spacing: 0.02em;
}
.participant-card-body {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
  gap: 0.4rem;
}
.participant-card-name {
  font-size: 0.875rem; font-weight: 700; color: var(--gray-800);
  line-height: 1.3;
}
.participant-card-email {
  font-size: 0.7rem; color: var(--gray-400);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.participant-card-progress { margin-top: 0.15rem; }
.participant-card-progress-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 0.25rem;
}
.participant-card-pts {
  font-size: 0.78rem; font-weight: 800; color: var(--indigo-600);
}
.participant-card-pts-label {
  font-size: 0.62rem; color: var(--gray-400);
}
.participant-card-footer {
  display: flex; justify-content: space-between; align-items: center;
  gap: 0.5rem; margin-top: 0.15rem; flex-wrap: wrap;
}
.participant-card-stats {
  font-size: 0.65rem; color: var(--gray-400);
}
.participant-card-badges {
  display: flex; gap: 0.3rem; flex-wrap: wrap;
}

/* ─── Brindes Section ──────────────────────────────────────────────────────── */
.brinde-stats-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem; margin-bottom: 1rem;
}
.brinde-stat-card { padding: 1rem; text-align: center; border-left: 3px solid; }
.brinde-list-card { overflow: hidden; }
.brinde-list-header {
  padding: 0.75rem 1rem; font-size: 0.8rem; font-weight: 700;
  color: var(--emerald-600);
  background: var(--emerald-100);
  border-bottom: 1px solid rgba(52,211,153,0.25);
}
.brinde-row {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.875rem 1rem; border-bottom: 1px solid var(--gray-50); flex-wrap: wrap;
}
.brinde-row:last-child { border-bottom: none; }
.brinde-row:hover { background: var(--gray-50); }
.brinde-row-pos { font-size: 1.1rem; width: 2rem; text-align: center; flex-shrink: 0; }
.brinde-row-avatar {
  width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--emerald-100);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.8rem; color: var(--emerald-700); flex-shrink: 0;
}
.brinde-row-info { flex: 1; min-width: 0; }
.brinde-row-name { font-size: 0.875rem; font-weight: 700; color: var(--gray-800); }
.brinde-row-cpf { font-size: 0.7rem; color: var(--gray-400); font-family: monospace; }
.brinde-row-pts { text-align: right; flex-shrink: 0; }
.brinde-row-value { font-size: 1rem; font-weight: 900; color: var(--emerald-600); }
.brinde-row-sub { font-size: 0.65rem; color: var(--gray-400); }
.brinde-row-action { flex-shrink: 0; }
.brinde-retirado-badge {
  font-size: 0.75rem; font-weight: 700;
  background: var(--gray-100); color: var(--gray-600);
  padding: 0.35rem 0.75rem; border-radius: 999px; display: inline-block;
}
.brinde-retirado-date {
  font-size: 0.62rem; color: var(--gray-400);
  text-align: center; margin-top: 0.2rem;
}
.brinde-section-header { margin-top: 0.5rem; }
.quase-row { flex-wrap: wrap; }
.quase-avatar {
  background: var(--amber-100); color: var(--amber-700);
}
.quase-pts { flex-shrink: 0; }

/* ─── Solicitações Responsive ──────────────────────────────────────────────── */
.solicitacoes-search-card {
  padding: 0.65rem 0.85rem; margin-bottom: 0.75rem;
}
.solicitacoes-search-form {
  display: flex; flex: 1; gap: 0.5rem; align-items: center; flex-wrap: wrap;
}
.solicitacoes-search-input-wrap {
  position: relative; flex: 1 1 220px; min-width: 0; display: flex; align-items: center;
}
.solicitacoes-search-icon {
  position: absolute; left: 0.65rem; top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem; color: var(--gray-400); pointer-events: none;
  line-height: 1;
}
.solicitacoes-search-input {
  width: 100%;
  border: 1.5px solid var(--gray-200);
  border-radius: 0.625rem;
  padding: 0.5rem 0.875rem 0.5rem 2rem;
  font-size: 0.82rem; outline: none;
  color: var(--gray-800);
  transition: border-color 0.15s;
}
.solicitacoes-search-input:focus { border-color: var(--indigo-400); }
.solicitacoes-search-input::placeholder { color: var(--gray-400); }
.solicitacoes-search-btn {
  padding: 0.45rem 0.95rem; white-space: nowrap;
  font-size: 0.78rem;
}
.solicitacoes-clear-btn { white-space: nowrap; padding: 0.4rem 0.65rem; }
.solicitacoes-csv-btn { margin-left: auto; }

/* ─── Brinde status-tag modifier (simpler badge) ───────────────────────────── */
.status-tag.brinde { background: var(--emerald-100); color: var(--emerald-600); }

/* ─── Responsive enhancements ─────────────────────────────────────────────── */
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-grid-admin { grid-template-columns: repeat(2, 1fr); }
  .stats-2col { grid-template-columns: 1fr; }
  .pending-actions { flex-direction: column; }
  .auth-card { padding: 1.5rem; }
  .hero-top { flex-direction: column; align-items: flex-start; }
  .text-right { text-align: left; }
  .hero h2 { font-size: 1.15rem; }
  .hero-rank-value { font-size: 2rem; }
  .stat-card .stat-value { font-size: 1.25rem; }
  .ranking-table { min-width: 400px; }
  .ranking-table th, .ranking-table td { padding: 0.4rem 0.5rem; }
  .rank-name { font-size: 0.78rem; }
  .participant-card-avatar { width: 2rem; height: 2rem; font-size: 0.8rem; }
  .participant-card { gap: 0.5rem; padding: 0.75rem; }
  .participant-card-name { font-size: 0.82rem; }
  .participant-card-pts { font-size: 0.72rem; }
  .brinde-stats-grid { grid-template-columns: 1fr; gap: 0.5rem; }
  .brinde-stat-card { padding: 0.75rem; }
  .brinde-stat-card div:first-child { font-size: 1.3rem; }
  .brinde-row { padding: 0.75rem; gap: 0.5rem; }
  .brinde-row-pts { text-align: left; width: 100%; display: flex; gap: 0.5rem; align-items: baseline; }
  .brinde-row-action { width: 100%; }
  .brinde-row-action .btn { width: 100%; }
  .brinde-row-progress { min-width: 80px; }
  .quase-pts { text-align: left; width: 100%; display: flex; gap: 0.5rem; align-items: baseline; padding-top: 0.25rem; }
  .solicitacoes-search-card { padding: 0.6rem 0.7rem; }
  .solicitacoes-search-form { gap: 0.4rem; }
  .solicitacoes-search-input-wrap { flex: 1 1 100%; }
  .solicitacoes-search-btn { flex: 0 0 auto; padding: 0.4rem 0.85rem; font-size: 0.74rem; }
  .solicitacoes-clear-btn { padding: 0.35rem 0.55rem; font-size: 0.74rem; }
  .solicitacoes-csv-btn { margin-left: auto; padding: 0.3rem 0.65rem; font-size: 0.68rem; }
  .card-header { flex-wrap: wrap; gap: 0.5rem; }
  .activity-status-badges { margin-top: 0.5rem; }
}

@media (max-width: 640px) {
  .stats-grid-admin { grid-template-columns: repeat(2, 1fr); }
  .tab-btn { padding: 0.35rem 0.55rem; font-size: 0.7rem; }
  .section-header { flex-wrap: wrap; gap: 0.5rem; }
  .navbar-brand .brand-text { font-size: 0.72rem; }
  .navbar-user .navbar-username { display: none; }
  .participants-toolbar { flex-direction: column; align-items: stretch; }
  .participants-toolbar-left { justify-content: center; }
  .participants-toolbar-right { justify-content: center; }
  .search-input { width: 100%; }
  .search-input:focus { width: 100%; }
  .participants-filter { justify-content: center; }
  .participant-card { padding: 0.85rem; }
  .brinde-stats-grid { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .brinde-stat-card { padding: 0.65rem 0.5rem; }
  .brinde-row { padding: 0.75rem; gap: 0.5rem; }
  .brinde-row-pts { text-align: right; }
  .brinde-list-header { padding: 0.65rem 0.75rem; font-size: 0.75rem; }
}

@media (max-width: 768px) {
  .navbar-brand .brand-text { font-size: 0.78rem; }
  .navbar-user .navbar-username { display: none; }
  .stats-grid-admin { grid-template-columns: repeat(2, 1fr); }
  .hero h2 { font-size: 1.2rem; }
  .ranking-table { min-width: 450px; }
  .brinde-stats-grid { grid-template-columns: repeat(3, 1fr); }
  .brinde-row-pts { text-align: right; }
}

@media (min-width: 768px) {
  .participants-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .hero-inner, .navbar-inner, .dashboard-content { max-width: 72rem; }
  .hero { padding: 2rem 1rem 5rem; }
  .hero h2 { font-size: 1.75rem; }
}

@media (min-width: 1280px) {
  .hero-inner, .navbar-inner, .dashboard-content { max-width: 80rem; }
  .stat-card { padding: 1rem; }
  .stat-card .stat-value { font-size: 1.75rem; }
}
