:root {
  --primary: #dc3545;
  --primary-dark: #b02a37;
  --secondary: #ffc107;
  --bg: #f8f9fa;
  --text: #212529;
  --card-bg: #ffffff;
  --radius: 12px;
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  color: var(--text);
}

.container {
  width: 100%;
  max-width: 600px;
}

header {
  text-align: center;
  margin-bottom: 24px;
}

header h1 {
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.wifi-info {
  margin-top: 8px;
  font-size: 0.9rem;
  color: #6c757d;
  background: #fff;
  padding: 8px 12px;
  border-radius: 20px;
  display: inline-block;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.card h2 {
  font-size: 1.2rem;
  margin-bottom: 16px;
  color: var(--primary);
}

form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.9rem;
}

form input, form select {
  width: 100%;
  padding: 12px;
  margin-bottom: 16px;
  border: 1px solid #ced4da;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

form input:focus, form select:focus {
  border-color: var(--primary);
  outline: none;
}

.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  width: 100%;
  padding: 12px;
  background: var(--secondary);
  color: #212529;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.status {
  text-align: center;
  padding: 10px;
  border-radius: 20px;
  margin-top: 10px;
  font-weight: 600;
}

.status.online {
  background: #d4edda;
  color: #155724;
}

.status.offline {
  background: #f8d7da;
  color: #721c24;
}

/* Overlay de alerta */
.alert-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 999;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s;
}

.alert-box {
  background: white;
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  max-width: 90%;
  box-shadow: 0 0 30px rgba(220,53,69,0.7);
}

.alert-icon {
  font-size: 3rem;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Admin */
.admin .grupo-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.btn-group, .btn-all {
  padding: 12px 18px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  flex: 1 1 calc(50% - 10px);
}

.btn-group {
  background: #007bff;
  color: white;
}

.btn-all {
  background: var(--primary);
  color: white;
  flex-basis: 100%;
}

.table-responsive {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #dee2e6;
}

th {
  background: #f1f3f5;
}

/* Responsivo */
@media (max-width: 480px) {
  header h1 { font-size: 1.4rem; }
  .card { padding: 18px; }
  .btn-group { flex-basis: 100%; }
}

.btn-logout {
  padding: 8px 16px;
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  margin-left: 10px;
}

.btn-logout:hover {
  background: #5a6268;
}