:root {
  --primary: #1a56db;
  --primary-dark: #1e429f;
  --secondary: #0e4c8a;
  --accent: #ff6b35;
  --bg-light: #f8fafc;
  --bg-dark: #0f172a;
  --card: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --success: #22c55e;
  --error: #ef4444;
  --warning: #f59e0b;
  --institutional-blue: #0e4c8a;
  --institutional-light: #e0f2fe;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', system-ui, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg-light);
  color: var(--text);
  line-height: 1.6;
}

.auth-container {
  display: flex;
  min-height: 100vh;
}

/* Panel institucional izquierdo */
.institutional-panel {
  flex: 1;
  background: linear-gradient(135deg, var(--institutional-blue) 0%, var(--primary) 100%);
  color: white;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.institutional-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100" opacity="0.05"><text x="50%" y="50%" font-size="12" text-anchor="middle" dominant-baseline="middle" fill="white">EST91</text></svg>');
  opacity: 0.1;
}

.institutional-content {
  max-width: 500px;
  z-index: 1;
}

.school-logo {
  height: 100px;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.institutional-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.school-name {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.platform-description {
  font-size: 1rem;
  margin-bottom: 2.5rem;
  color: rgba(255, 255, 255, 0.9);
}

.features-list {
  margin: 2rem 0;
}

.feature-item {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.feature-item i {
  font-size: 1.2rem;
  margin-right: 1rem;
  width: 24px;
  text-align: center;
  color: var(--accent);
}

.feature-item span {
  font-size: 1rem;
}

.school-motto {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-style: italic;
  text-align: center;
}

/* Panel de autenticación derecho */
.auth-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--bg-light);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  padding: 2.5rem;
  margin-bottom: 1rem;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h2 {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.auth-header p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Formulario */
.auth-form {
  margin-top: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text);
  font-size: 0.9rem;
}

.input-with-icon {
  position: relative;
}

.input-with-icon i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
}

.input-with-icon input {
  width: 100%;
  padding: 12px 12px 12px 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s ease;
  background: var(--bg-light);
}

.input-with-icon input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.input-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.checkbox-container {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--text-light);
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.checkmark {
  height: 18px;
  width: 18px;
  background-color: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkbox-container input:checked ~ .checkmark {
  background-color: var(--primary);
  border-color: var(--primary);
}

.checkmark:after {
  content: "";
  display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-top: -2px;
}

.forgot-password {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.forgot-password:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.auth-links {
  margin-top: 1.5rem;
  text-align: center;
}

.back-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.back-link i {
  margin-right: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 86, 219, 0.2);
}

.btn-large {
  padding: 14px 16px;
  font-size: 1.05rem;
}

.btn i {
  margin-right: 8px;
}

/* Alertas */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  font-size: 0.9rem;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.alert i {
  margin-right: 8px;
  font-size: 1.1rem;
}

/* Footer de autenticación */
.auth-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-light);
  font-size: 0.9rem;
}

.support-info {
  margin-top: 1rem;
  font-size: 0.85rem;
}

.support-info i {
  margin-right: 5px;
  color: var(--primary);
}

.system-info {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 1rem;
}

/* Validación de contraseña */
.hint {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 4px;
  display: block;
}

/* Responsive */
@media (max-width: 900px) {
  .auth-container {
    flex-direction: column;
  }
  
  .institutional-panel {
    padding: 1.5rem;
    text-align: center;
  }
  
  .institutional-content {
    max-width: 100%;
  }
  
  .school-logo {
    height: 80px;
  }
  
  .institutional-content h1 {
    font-size: 2rem;
  }
  
  .features-list {
    display: none;
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 1.5rem;
  }
  
  .form-options {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .forgot-password {
    margin-top: 0.5rem;
  }
}