/* ============================================================
   login.css — Login & Auth | Campus Virtual FCL
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body, html {
  font-family: 'Segoe UI', Arial, sans-serif;
  background-color: #90adf0;
  background-image: url("img/fondo.png");
  background-repeat: repeat;
  background-attachment: fixed;
  min-height: 100vh;
}

/* ── HEADER ──────────────────────────────────────────────────── */
.header { background: #ffffff; box-shadow: 0 2px 4px rgba(194,177,177,0.1); position: sticky; top: 0; z-index: 1000; }
.header .container { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 1.5rem; }
.logo img { height: 50px; animation: bounce 2s infinite; }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.nav-links { list-style: none; display: flex; gap: 0.25rem; margin: 0; padding: 0; }
.nav-links a { padding: 0.5rem 1rem; border-radius: 4px; text-decoration: none; color: #333; font-weight: 400; transition: all 0.3s; white-space: nowrap; }
.nav-links a.active, .nav-links a:hover { background: #e0f0ff; color: #005baa; }
.menu-item-has-children { position: relative; }
.menu-item-has-children .sub-menu { position: absolute; top: 100%; left: 0; background: white; box-shadow: 0 5px 20px rgba(0,0,0,0.1); border-radius: 8px; padding: 0.5rem 0; min-width: 280px; opacity: 0; visibility: hidden; transition: all 0.3s; z-index: 100; list-style: none; }
.menu-item-has-children:hover .sub-menu { opacity: 1; visibility: visible; top: calc(100% + 5px); }
.sub-menu a { padding: 0.7rem 1.5rem; color: #333; white-space: nowrap; display: block; font-size: 0.95rem; transition: background 0.3s; text-decoration: none; }
.sub-menu a:hover { background: #4a90e2; color: white; }
.arrow { font-size: 0.7rem; margin-left: 5px; transition: transform 0.3s; }
.menu-item-has-children:hover .arrow { transform: rotate(180deg); }
.menu-toggle { display: none; flex-direction: column; justify-content: space-around; width: 30px; height: 30px; background: transparent; border: none; cursor: pointer; padding: 0; z-index: 1001; }
.menu-toggle span { width: 30px; height: 3px; background: #005baa; border-radius: 10px; transition: all 0.3s linear; }
.menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(7px,-7px); }
@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .nav { position: fixed; top: 70px; left: 0; width: 100%; background: white; box-shadow: 0 4px 6px rgba(0,0,0,0.1); transform: translateY(-100%); transition: transform 0.3s, visibility 0.3s; visibility: hidden; z-index: 999; }
  .nav.open { transform: translateY(0); visibility: visible; }
  .nav-links { flex-direction: column; gap: 0; padding: 1rem 0; }
  .nav-links li { border-bottom: 1px solid #eee; }
  .nav-links a { text-align: center; padding: 1rem; }
  .sub-menu { position: static; opacity: 1; visibility: visible; display: none; box-shadow: none; padding-left: 1.5rem; min-width: auto; background: transparent; }
  .menu-item-has-children.submenu-open .sub-menu { display: block; }
  .sub-menu a { white-space: normal; padding: 0.8rem 1rem; font-size: 1rem; color: #555; }
  .sub-menu a:hover { background: #e0f0ff; color: #005baa; }
}

/* ── LAYOUT PRINCIPAL ─────────────────────────────────────── */
.auth-main {
  min-height: calc(100vh - 70px);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 1.5rem;
}
.auth-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 900px; width: 100%;
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: fadeUp 0.5s ease;
}

/* ── PANEL IZQUIERDO ─────────────────────────────────────── */
.auth-left {
  background: linear-gradient(160deg, #002d6e, #005baa, #1976d2);
  color: white;
  padding: 3rem 2.5rem;
  display: flex; align-items: center;
}
.auth-brand {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 2.5rem;
}
.auth-brand img { height: 48px; border-radius: 8px; }
.auth-brand span { font-size: 0.95rem; color: rgba(255,255,255,0.85); line-height: 1.4; }
.auth-brand strong { color: #ffd700; }
.auth-left h2 { font-size: 1.9rem; font-weight: 800; line-height: 1.25; margin-bottom: 1rem; }
.auth-left .gold { color: #ffd700; }
.auth-left p  { color: rgba(255,255,255,0.75); font-size: 0.9rem; line-height: 1.6; margin-bottom: 2rem; }
.auth-features { list-style: none; }
.auth-features li { font-size: 0.875rem; color: rgba(255,255,255,0.85); margin-bottom: 0.6rem; display: flex; align-items: center; gap: 8px; }
.auth-features li i { color: #ffd700; font-size: 0.9rem; }

/* ── PANEL DERECHO ───────────────────────────────────────── */
.auth-right { background: white; padding: 3rem 2.5rem; overflow-y: auto; }
.auth-form-wrap { max-width: 380px; width: 100%; margin: 0 auto; }
.form-header { margin-bottom: 1.5rem; }
.form-header h3 { font-size: 1.6rem; font-weight: 800; color: #002d6e; margin-bottom: 0.3rem; }
.form-header p  { font-size: 0.875rem; color: #666; }
.form-header a  { color: #005baa; font-weight: 600; text-decoration: none; }
.form-header a:hover { text-decoration: underline; }

/* Google */
.btn-google {
  width: 100%; padding: 11px 16px;
  border: 1.5px solid #e5e7eb; border-radius: 10px; background: white;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 0.875rem; font-weight: 600; color: #374151;
  cursor: pointer; transition: all 0.2s; font-family: 'Segoe UI', Arial, sans-serif;
  margin-bottom: 1.2rem;
}
.btn-google:hover { border-color: #005baa; box-shadow: 0 2px 10px rgba(0,91,170,0.12); }

/* Divider */
.divider { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; color: #aaa; font-size: 0.8rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: #e5e7eb; }

/* Form elements */
.form-group { margin-bottom: 1.1rem; }
.form-label { display: block; font-size: 0.82rem; font-weight: 600; color: #374151; margin-bottom: 5px; }
.form-label i { color: #005baa; margin-right: 4px; }
.form-input {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid #e5e7eb; border-radius: 10px;
  font-size: 0.875rem; font-family: 'Segoe UI', Arial, sans-serif;
  outline: none; transition: all 0.2s; color: #111;
}
.form-input:focus { border-color: #005baa; box-shadow: 0 0 0 3px rgba(0,91,170,0.1); }
.form-input.error { border-color: #dc2626; }
.form-select {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid #e5e7eb; border-radius: 10px;
  font-size: 0.875rem; font-family: 'Segoe UI', Arial, sans-serif;
  outline: none; transition: all 0.2s; color: #111; background: white; cursor: pointer;
}
.form-select:focus { border-color: #005baa; }
.input-wrap { position: relative; }
.toggle-pass {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: #aaa; font-size: 0.9rem;
}
.toggle-pass:hover { color: #005baa; }
.forgot-link { display: block; text-align: right; font-size: 0.8rem; color: #005baa; font-weight: 600; cursor: pointer; margin-top: 6px; }
.forgot-link:hover { text-decoration: underline; }

/* Password strength */
.strength-wrap { margin-top: 6px; }
.strength-bar { height: 4px; background: #e5e7eb; border-radius: 2px; overflow: hidden; }
.strength-fill { height: 100%; border-radius: 2px; width: 0; transition: all 0.3s; }
.strength-label { font-size: 0.72rem; color: #aaa; margin-top: 3px; }

/* Form row 2 col */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }

/* Terms */
.terms-check { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 1.1rem; }
.terms-check input { margin-top: 3px; accent-color: #005baa; }
.terms-check label { font-size: 0.8rem; color: #666; }
.terms-check a { color: #005baa; }

/* Submit */
.btn-submit {
  width: 100%; padding: 12px;
  background: #005baa; color: white; border: none;
  border-radius: 10px; font-size: 0.95rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
  font-family: 'Segoe UI', Arial, sans-serif; margin-top: 0.5rem;
}
.btn-submit:hover { background: #004a8f; box-shadow: 0 4px 14px rgba(0,91,170,0.3); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.register-link { text-align: center; margin-top: 1.2rem; font-size: 0.875rem; color: #666; }
.register-link a { color: #005baa; font-weight: 700; text-decoration: none; }

/* Alerts */
.alert { padding: 10px 14px; border-radius: 8px; font-size: 0.85rem; margin-bottom: 1rem; display: none; }
.alert.show { display: block; }
.alert-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.err-msg { font-size: 0.75rem; color: #dc2626; margin-top: 3px; display: none; }
.err-msg.show { display: block; }

/* Recovery */
.back-btn { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: #666; cursor: pointer; margin-bottom: 1.5rem; font-weight: 500; }
.back-btn:hover { color: #005baa; }
.recovery-success { text-align: center; padding: 1.5rem 0; }
.recovery-success .big-icon { font-size: 3.5rem; margin-bottom: 1rem; }
.recovery-success h4 { font-size: 1.2rem; color: #002d6e; margin-bottom: 0.5rem; }
.recovery-success p  { font-size: 0.875rem; color: #666; margin-bottom: 1.5rem; }

/* Hidden */
.hidden { display: none !important; }

/* Animations */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 700px) {
  .auth-container { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .auth-right { padding: 2rem 1.5rem; }
  .form-row { grid-template-columns: 1fr; }
}