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

html {
  scrollbar-width: thin;
  scrollbar-color: #667eea #1a1a2e;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  min-height: 100vh;
  color: #e0e0e0;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #764ba2;
}

.navbar {
  background: #1a1a2e;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.nav-brand h1 {
  color: #667eea;
  font-size: 1.8rem;
}

.tagline {
  font-size: 0.85rem;
  color: #aaa;
}

.nav-links a {
  padding: 0.5rem 1rem;
  color: #ccc;
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.3s;
}

.nav-links a:hover {
  background: #2d2d44;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-logout {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
}

.lang-select {
  padding: 0.5rem;
  border: 1px solid #444;
  border-radius: 5px;
  background: #2d2d44;
  color: #e0e0e0;
  cursor: pointer;
  font-size: 0.9rem;
}

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

.section {
  background: #1a1a2e;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.section h2 {
  margin-bottom: 1.5rem;
  color: #e0e0e0;
  border-bottom: 2px solid #667eea;
  padding-bottom: 0.5rem;
}

.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
}

.auth-box {
  background: #1a1a2e;
  padding: 2.5rem;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
  width: 100%;
  max-width: 400px;
}

.auth-box h2 {
  text-align: center;
  color: #667eea;
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.3rem;
  color: #bbb;
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #444;
  border-radius: 5px;
  font-size: 1rem;
  background: #2d2d44;
  color: #e0e0e0;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-row .form-group {
  flex: 1;
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.btn-primary {
  background: #667eea;
  color: white !important;
  width: 100%;
  font-weight: bold;
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-success {
  background: #28a745;
  color: white;
}

.btn-danger {
  background: #dc3545;
  color: white;
}

.btn-small {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

.btn-back {
  background: #6c757d;
  color: white;
  margin-bottom: 1rem;
}

.auth-switch {
  text-align: center;
  margin-top: 1rem;
  color: #aaa;
}

.auth-switch a {
  color: #667eea;
  text-decoration: none;
}

.auth-forgot {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.auth-forgot a {
  color: #aaa;
  text-decoration: none;
}

.auth-forgot a:hover {
  color: #667eea;
  text-decoration: underline;
}

.panel {
  background: #2d2d44;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.panel h3 {
  margin-bottom: 1rem;
  color: #ccc;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  background: #2d2d44;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.card h3 {
  color: #667eea;
  margin-bottom: 0.5rem;
}

.card-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
  font-size: 0.9rem;
  color: #aaa;
}

.card-info span {
  background: #1a1a2e;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
}

.card p {
  color: #aaa;
  font-size: 0.95rem;
  line-height: 1.5;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.card h3 {
  color: #667eea;
  margin-bottom: 0.5rem;
}

.card-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
  font-size: 0.9rem;
  color: #666;
}

.card-info span {
  background: #f0f0f0;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.card p {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.5;
}

.list-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.list-table th,
.list-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #444;
}

.list-table th {
  background: #2d2d44;
  font-weight: 600;
  color: #ccc;
}

.list-table tr:hover {
  background: #2d2d44;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-admin {
  background: #dc3545;
  color: white;
}

.badge-monitor {
  background: #17a2b8;
  color: white;
}

.badge-inscrito {
  background: #28a745;
  color: white;
}

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

.stat-card {
  background: linear-gradient(135deg, #2d2d44 0%, #1a1a2e 100%);
  color: #e0e0e0;
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  border: 1px solid #444;
}

.stat-card h4 {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.stat-card .number {
  font-size: 2.5rem;
  font-weight: bold;
}

.inscription-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #2d2d44;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

.inscription-info h4 {
  color: #667eea;
  margin-bottom: 0.25rem;
}

.inscription-info p {
  font-size: 0.9rem;
  color: #aaa;
}

.attendance-list {
  background: #2d2d44;
  padding: 1rem;
  border-radius: 8px;
}

.attendance-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border-bottom: 1px solid #444;
}

.attendance-item:last-child {
  border-bottom: none;
}

.attendance-item label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.attendance-buttons {
  display: flex;
  gap: 0.5rem;
}

.attendance-btn {
  padding: 0.3rem 0.6rem;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.8rem;
}

.attendance-btn.present {
  background: #28a745;
  color: white;
}

.attendance-btn.absent {
  background: #dc3545;
  color: white;
}

.attendance-btn.late {
  background: #ffc107;
  color: black;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
}

.modal-content {
  background: #1a1a2e;
  margin: 10% auto;
  padding: 2rem;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  border: 1px solid #444;
}

.close {
  float: right;
  font-size: 1.5rem;
  cursor: pointer;
  color: #aaa;
}

.close:hover {
  color: #667eea;
}

.empty-state {
  text-align: center;
  padding: 3rem;
  color: #aaa;
}

.empty-state h3 {
  margin-bottom: 1rem;
  color: #ccc;
}

.alert {
  padding: 1rem;
  border-radius: 5px;
  margin-bottom: 1rem;
}

.alert-success {
  background: #1a3a2a;
  color: #4ade80;
  border: 1px solid #2d5a3d;
}

.alert-error {
  background: #3a1a1a;
  color: #f87171;
  border: 1px solid #5a2d2d;
}

.loading {
  text-align: center;
  padding: 2rem;
  color: #aaa;
}

@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 1rem;
  }
  
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .form-row {
    flex-direction: column;
    gap: 0;
  }
  
  .grid-cards {
    grid-template-columns: 1fr;
  }
}
