@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --primary-color: #00b047; /* Verde Brasil Premium */
  --primary-glow: rgba(0, 176, 71, 0.4);
  --secondary-color: #ffd700; /* Dourado / Amarelo Vibrante */
  --secondary-glow: rgba(255, 215, 0, 0.4);
  --accent-color: #e62020; /* Vermelho CEUNSP */
  --accent-glow: rgba(230, 32, 32, 0.3);
  --bg-dark: #070b12; /* Azul Ultra Escuro / Quase Preto */
  --bg-card: rgba(15, 23, 42, 0.6);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 176, 71, 0.2);
  --glass-blur: blur(20px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  transition: all 0.3s;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(0, 176, 71, 0.18), transparent 35%),
    radial-gradient(circle at 90% 10%, rgba(255, 215, 0, 0.12), transparent 35%),
    radial-gradient(circle at 50% 90%, rgba(230, 32, 32, 0.08), transparent 30%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#root {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.glass-panel {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: 2rem;
  padding: 2.5rem 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 
              0 0 40px rgba(0, 0, 0, 0.2) inset;
  position: relative;
  overflow: hidden;
  transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

.glass-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.glass-panel:hover {
  border-color: rgba(0, 176, 71, 0.3);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 
              0 0 40px rgba(0, 176, 71, 0.05);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, #008736 100%);
  color: white;
  border: none;
  padding: 1.125rem 2rem;
  border-radius: 1.25rem;
  font-size: 1.125rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 6px 20px var(--primary-glow);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-decoration: none;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 176, 71, 0.6);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-primary:active {
  transform: translateY(-1px);
}

.btn-primary:disabled {
  background: #1e293b;
  color: #64748b;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
  border-color: transparent;
}

.btn-secondary {
  background: rgba(255, 215, 0, 0.05);
  color: var(--secondary-color);
  border: 2px solid var(--secondary-color);
  padding: 1.125rem 2rem;
  border-radius: 1.25rem;
  font-size: 1.125rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-decoration: none;
  width: 100%;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.btn-secondary:hover {
  background: var(--secondary-color);
  color: #000;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px var(--secondary-glow);
}

.btn-secondary:active {
  transform: translateY(-1px);
}

.btn-danger {
  background: rgba(230, 32, 32, 0.05);
  color: var(--accent-color);
  border: 2px solid var(--accent-color);
  padding: 1.125rem 2rem;
  border-radius: 1.25rem;
  font-size: 1.125rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-decoration: none;
  width: 100%;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.btn-danger:hover {
  background: var(--accent-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px var(--accent-glow);
}

.btn-danger:active {
  transform: translateY(-1px);
}

h1, h2, h3 {
  font-weight: 800;
  line-height: 1.2;
}

.text-gradient {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-ceunsp {
  background: linear-gradient(135deg, var(--accent-color) 0%, #ff5252 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 2.5rem 1rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: center;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-100 { animation-delay: 100ms; opacity: 0; }
.delay-200 { animation-delay: 200ms; opacity: 0; }
.delay-300 { animation-delay: 300ms; opacity: 0; }

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  color: white;
  padding: 1.125rem;
  border-radius: 1rem;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
  width: 100%;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: rgba(0, 0, 0, 0.5);
}

/* Quiz Option Card */
.quiz-option {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  border-radius: 1.25rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: var(--text-main);
  text-align: left;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.quiz-option::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s;
}

.quiz-option:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(6px);
}

.quiz-option:hover::after {
  opacity: 1;
}

.quiz-option.selected {
  background: var(--primary-glow);
  border-color: var(--primary-color);
  box-shadow: 0 4px 15px rgba(0, 176, 71, 0.2);
}

.progress-bar-bg {
  background: rgba(255, 255, 255, 0.07);
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  margin: 1.75rem 0;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.progress-bar-fill {
  background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
  height: 100%;
  border-radius: 5px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(0, 176, 71, 0.5);
}

/* Admin Dashboard Specific Styles */
.admin-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  width: 100%;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  width: 100%;
}

.stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 1.5rem;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  backdrop-filter: var(--glass-blur);
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.05);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 176, 71, 0.15);
  color: var(--primary-color);
}

.stat-val {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.table-wrapper {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 1.5rem;
  overflow-x: auto;
  margin-top: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9375rem;
  min-width: 800px;
}

.admin-table th {
  background: rgba(0, 0, 0, 0.3);
  padding: 1.125rem 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
}

.admin-table td {
  padding: 1.125rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.badge {
  padding: 0.35rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-block;
  text-align: center;
}

.badge-low {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.badge-medium {
  background: rgba(255, 215, 0, 0.15);
  color: var(--secondary-color);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.badge-high {
  background: rgba(0, 176, 71, 0.15);
  color: var(--primary-color);
  border: 1px solid rgba(0, 176, 71, 0.3);
}

.search-container {
  display: flex;
  gap: 1rem;
  width: 100%;
  align-items: center;
  flex-wrap: wrap;
}

.admin-search-input {
  flex-grow: 1;
  min-width: 280px;
}

.no-data {
  padding: 4rem 2rem;
  text-align: center;
  color: var(--text-muted);
}

/* Modal de Confirmação */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 2rem;
  padding: 2.5rem;
  max-width: 450px;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  position: relative;
}

.modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--accent-color);
}

/* Utility */
.text-center { text-align: center; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.font-bold { font-weight: 700; }
.text-muted { color: var(--text-muted); }
.w-full { width: 100%; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.pointer-events-none { pointer-events: none; }
.relative { position: relative; }
.absolute { position: absolute; }
.inset-y-0 { top: 0; bottom: 0; }
.left-0 { left: 0; }
.pl-3 { padding-left: 0.75rem; }

/* Custom SPA specific styling */
.hidden {
  display: none !important;
}

@media (max-width: 600px) {
  .glass-panel {
    padding: 2rem 1.25rem;
    border-radius: 1.5rem;
  }
}
