/* ===== NVIAS VOTING SYSTEM - UNIFIED CSS FRAMEWORK ===== */

:root {
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --secondary-color: #f59e0b;
  --secondary-light: #fef3c7;
  --success-color: #10b981;
  --success-light: #f0fdf4;
  --error-color: #ef4444;
  --error-light: #fef2f2;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --font-family: 'Inter', system-ui, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: var(--gray-800);
  line-height: 1.6;
}

.container { max-width: 1200px; margin: 0 auto; padding: 1.25rem; }

.header {
  background: white;
  border-radius: var(--radius-2xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  margin-bottom: 1.5rem;
  text-align: center;
  position: relative;
}

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

.header h1 { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; }
.header p { color: var(--gray-600); font-size: 1.1rem; }
.header .logo { height: 48px; margin-bottom: 1rem; }

.card {
  background: white;
  border-radius: var(--radius-2xl);
  padding: 2rem;
  box-shadow: var(--shadow-xl);
  margin-bottom: 1.5rem;
  position: relative;
}

.card-header {
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.5rem;
}

.card-subtitle {
  color: var(--gray-600);
  font-size: 0.875rem;
}

.card-sm {
  background: var(--gray-50);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  border: 1px solid var(--gray-200);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-lg);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-primary { background: var(--primary-color); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-success { background: var(--success-color); color: white; }
.btn-success:hover { background: #059669; transform: translateY(-1px); }
.btn-danger { background: var(--error-color); color: white; }
.btn-danger:hover { background: #dc2626; transform: translateY(-1px); }
.btn-secondary { background: var(--gray-100); color: var(--gray-700); border: 1px solid var(--gray-300); }
.btn-secondary:hover { background: var(--gray-200); transform: translateY(-1px); }

.form-group { margin-bottom: 1.25rem; }

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-lg);
  background: white;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.grid { display: grid; gap: 1.5rem; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--gray-200);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1.25rem;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.loading-container {
  text-align: center;
  padding: 4rem 1.25rem;
}

.message {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-xl);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.message-success { background: var(--success-light); color: var(--success-color); }
.message-error { background: var(--error-light); color: var(--error-color); }

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.team-card {
  background: var(--gray-50);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-2xl);
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  position: relative;
}

.team-card:hover, .team-card.selected {
  border-color: var(--primary-color);
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.team-card i { font-size: 2rem; color: var(--primary-color); margin-bottom: 0.75rem; }
.team-card h3 { font-weight: 600; }

.sidebar {
  width: 280px;
  background: var(--gray-800);
  color: white;
  padding: 1.5rem;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  box-shadow: var(--shadow-xl);
  z-index: 1000;
}

.sidebar h3 {
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary-color);
}

.user-info {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
}

.sidebar-nav {
  list-style: none;
}

.nav-item {
  margin-bottom: 0.5rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: #d1d5db;
  text-decoration: none;
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
  font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
  background: var(--primary-color);
  color: white;
  transform: translateX(4px);
}

.nav-link i {
  width: 20px;
  text-align: center;
}

.main-content {
  margin-left: 280px;
  padding: 1.5rem;
  min-height: 100vh;
}

.chart-container {
  background: white;
  border-radius: var(--radius-2xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  margin-bottom: 1.5rem;
}

.chart-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 1rem;
  text-align: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.stat-card:hover { transform: translateY(-2px); }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--primary-color); }
.stat-label { color: var(--gray-600); font-size: 0.875rem; }
.stat-icon { font-size: 1.5rem; color: var(--primary-color); margin-bottom: 0.75rem; }

.btn-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: 0.75rem;
}

.status-active {
  background: var(--success-light);
  color: var(--success-color);
  border: 1px solid var(--success-color);
}

.status-inactive {
  background: var(--error-light);
  color: var(--error-color);
  border: 1px solid var(--error-color);
}

.status-pending {
  background: var(--secondary-light);
  color: var(--secondary-color);
  border: 1px solid var(--secondary-color);
}

@media (max-width: 768px) {
  .container { padding: 0.75rem; }
  .sidebar { display: none; }
  .main-content { margin-left: 0; }
  .team-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-cols-2 { grid-template-columns: 1fr; }
  .btn-group { flex-direction: column; align-items: center; }
}
