/* Acceso Plataforma EGEL: composición fotográfica y panel institucional */
.auth-page {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: #fff;
  background: #1b0305 !important;
}

.auth-wrap,
.auth-shell {
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 59fr) minmax(430px, 41fr);
  overflow: hidden;
  background: #240406;
}

/* Lado fotográfico */
.auth-brand-panel {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 100vh;
  min-height: 100svh;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(42px, 6.4vh, 66px) clamp(42px, 6.4vw, 66px);
  isolation: isolate;
  background-image:
    linear-gradient(90deg, rgba(12, 3, 3, .78) 0%, rgba(16, 4, 4, .57) 46%, rgba(28, 5, 6, .24) 100%),
    linear-gradient(0deg, rgba(13, 3, 3, .47), transparent 48%),
    url('../images/auth-study-space.webp');
  background-position: center center;
  background-size: cover;
}

.auth-brand-panel::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 1, 1, .2), transparent 55%);
  content: '';
  pointer-events: none;
}

.auth-brand-header,
.auth-brand-message,
.auth-benefits,
.auth-brand-footer {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
}

.auth-institution {
  margin: 0;
  color: rgba(255,255,255,.92);
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(.68rem, .78vw, .82rem);
  font-weight: 600;
  letter-spacing: .27em;
  line-height: 1.55;
  text-transform: uppercase;
}

.auth-brand-header > span,
.auth-brand-footer > span {
  display: block;
  width: 50px;
  height: 2px;
  margin-top: 27px;
  background: rgba(255,255,255,.86);
}

.auth-brand-message { margin-top: clamp(44px, 7vh, 72px); }
.auth-kicker {
  margin: 0;
  color: rgba(255,255,255,.93);
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(.72rem, .85vw, .86rem);
  font-weight: 600;
  letter-spacing: .29em;
  text-transform: uppercase;
}

.auth-brand-message h2 {
  margin: 20px 0 21px;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2.5rem, 3.55vw, 3.55rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.08;
}

.auth-brand-message h2 em {
  color: #ffaaa9;
  font-style: normal;
}

.auth-brand-description {
  max-width: 430px;
  margin: 0;
  color: rgba(255,255,255,.82);
  font-size: clamp(.94rem, 1.1vw, 1.08rem);
  line-height: 1.52;
}

.auth-benefits {
  display: grid;
  gap: 25px;
  margin: clamp(42px, 6vh, 60px) 0 32px;
  padding: 0;
  list-style: none;
}

.auth-benefits li {
  display: grid;
  grid-template-columns: 53px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  color: rgba(255,255,255,.79);
  font-size: .9rem;
  line-height: 1.35;
}

.auth-benefits i {
  display: grid;
  width: 53px;
  height: 53px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 13px;
  color: #ffb7b2;
  background: rgba(20,5,5,.24);
  font-size: 1.25rem;
}

.auth-benefits strong {
  display: block;
  margin-bottom: 3px;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: .91rem;
  font-weight: 700;
}

.auth-brand-footer {
  margin-top: auto;
  padding-top: 16px;
}

.auth-brand-footer > span { margin: 0 0 22px; }
.auth-brand-footer p {
  margin: 0;
  color: rgba(255,255,255,.9);
  font-family: 'Montserrat', sans-serif;
  font-size: .69rem;
  font-weight: 600;
  letter-spacing: .34em;
  line-height: 1.7;
  text-transform: uppercase;
}

/* Panel derecho */
.auth-form-panel {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  padding: clamp(28px, 4.6vh, 47px) clamp(38px, 6vw, 68px) 34px;
  color: #fff;
  background:
    radial-gradient(circle at 70% 23%, rgba(150,13,19,.38), transparent 35%),
    radial-gradient(circle at 16% 82%, rgba(116,5,10,.3), transparent 33%),
    linear-gradient(145deg, #260305 0%, #50070b 48%, #210203 100%);
}

.auth-form-panel::before,
.auth-form-panel::after {
  position: absolute;
  display: block;
  border: 1px solid rgba(222,91,94,.38);
  border-radius: 50%;
  content: '';
  pointer-events: none;
}

.auth-form-panel::before {
  width: 390px;
  height: 390px;
  top: -255px;
  right: -145px;
}

.auth-form-panel::after {
  width: 390px;
  height: 390px;
  right: -185px;
  bottom: -245px;
}

.auth-panel-inner {
  position: relative;
  z-index: 2;
  width: min(394px, 100%);
  margin: 0 auto;
}

.auth-uaeh-brand { display: inline-flex; flex-direction: column; align-items: flex-start; }
.auth-uaeh-wordmark {
  position: relative;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2.35rem, 3.2vw, 3.45rem);
  font-weight: 800;
  letter-spacing: -.095em;
  line-height: .92;
}

.auth-uaeh-wordmark sup {
  position: absolute;
  top: -.1em;
  right: -1.1em;
  font-size: .22em;
  letter-spacing: 0;
}

.auth-uaeh-brand > span { width: 31px; height: 2px; margin: 13px 0 10px; background: rgba(255,255,255,.86); }
.auth-uaeh-brand p {
  margin: 0;
  color: rgba(255,255,255,.88);
  font-family: 'Montserrat', sans-serif;
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .36em;
  text-transform: uppercase;
  white-space: nowrap;
}

.auth-form-content { margin-top: clamp(32px, 5.1vh, 52px); }
.auth-form-icon {
  display: grid;
  width: 55px;
  height: 55px;
  margin-bottom: 17px;
  place-items: center;
  border: 1px solid rgba(255,142,143,.44);
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, rgba(180,48,53,.44), rgba(93,11,15,.62));
  box-shadow: inset 0 1px rgba(255,255,255,.08);
  font-size: 1.35rem;
}

.auth-title {
  margin: 0;
  color: #fff !important;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.95rem, 2.7vw, 2.45rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.15;
}

.auth-subtitle {
  margin: 10px 0 29px;
  color: rgba(255,255,255,.68);
  font-size: 1rem;
  line-height: 1.45;
}

.auth-alert {
  margin: -12px 0 17px;
  padding: 9px 12px;
  border: 1px solid rgba(255,170,170,.28);
  border-radius: 9px;
  color: #ffe0e0 !important;
  background: rgba(111,9,13,.48) !important;
  box-shadow: none;
  font-size: .79rem;
}

.auth-form,
.auth-register-form { display: grid; gap: 19px; }
.auth-field { min-width: 0; }
.auth-field label {
  display: block;
  margin-bottom: 8px;
  color: rgba(255,255,255,.92);
  font-size: .82rem;
  font-weight: 700;
}

.auth-input-wrap { position: relative; }
.auth-input-wrap > .bi {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 17px;
  color: #ffaaa8;
  font-size: 1rem;
  pointer-events: none;
  transform: translateY(-50%);
}

.auth-input {
  width: 100%;
  min-height: 57px;
  padding: 10px 47px 10px 55px;
  border: 1px solid rgba(255,220,220,.36);
  border-radius: 11px;
  color: #fff !important;
  background-color: rgba(42,3,6,.32) !important;
  box-shadow: inset 0 1px rgba(255,255,255,.018);
  font-size: .9rem;
  color-scheme: dark;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

select.auth-input {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23f5c4c4' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
  background-position: right 15px center !important;
  background-size: 13px 10px !important;
  background-repeat: no-repeat !important;
}

.auth-input option { color: #fff; background: #4a080c; }
.auth-input::placeholder { color: rgba(255,255,255,.5); opacity: 1; }
.auth-input:focus {
  border-color: #e87678;
  background-color: rgba(71,5,9,.5) !important;
  box-shadow: 0 0 0 3px rgba(222,76,80,.18);
  outline: 0;
}

.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  box-shadow: 0 0 0 1000px #3e070a inset;
  transition: background-color 9999s ease-in-out 0s;
}

.auth-toggle {
  position: absolute;
  z-index: 3;
  top: 50%;
  right: 7px;
  display: grid;
  width: 39px;
  height: 39px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: rgba(255,215,215,.72);
  background: transparent;
  transform: translateY(-50%);
}

.auth-toggle:hover,
.auth-toggle:focus-visible { color: #fff; background: rgba(255,255,255,.08); outline: 0; }
.auth-btn {
  display: inline-flex;
  min-height: 57px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 3px;
  border: 1px solid #bd2025;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #b3151b, #8f0c12) !important;
  box-shadow: 0 12px 27px rgba(20,0,1,.28);
  font-family: 'Montserrat', sans-serif;
  font-size: .79rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.auth-btn:hover,
.auth-btn:focus { border-color: #dc393e; color: #fff; background: linear-gradient(135deg, #c81c22, #9d0c12) !important; box-shadow: 0 14px 30px rgba(20,0,1,.38); }
.auth-foot {
  margin: 24px 0 0;
  color: rgba(255,255,255,.67);
  font-size: .85rem;
}

.auth-login-shell .auth-foot { padding-top: 27px; border-top: 1px solid rgba(255,255,255,.16); }
.auth-foot a { color: #ff9b99; font-weight: 700; text-decoration: none; }
.auth-foot a:hover { color: #ffc0bf; text-decoration: underline; }
.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: clamp(28px, 5.5vh, 56px);
  color: #f18d8b;
  font-size: .84rem;
  text-decoration: none;
}

.auth-back-link:hover { color: #ffc0bf; }
.auth-panel-motto {
  position: absolute;
  z-index: 2;
  right: clamp(29px, 4vw, 52px);
  bottom: clamp(30px, 5vh, 50px);
  margin: 0;
  color: rgba(255,220,220,.82);
  font-family: 'Montserrat', sans-serif;
  font-size: .61rem;
  font-weight: 600;
  letter-spacing: .34em;
  line-height: 1.75;
  text-align: right;
  text-transform: uppercase;
}

/* Registro: ritmo vertical compacto del modelo */
.auth-register-shell .auth-form-panel { padding-top: clamp(25px, 3.4vh, 35px); padding-bottom: 25px; }
.auth-register-shell .auth-panel-inner { width: min(390px, 100%); }
.auth-register-shell .auth-uaeh-wordmark { font-size: clamp(2.05rem, 2.7vw, 2.85rem); }
.auth-register-shell .auth-uaeh-brand > span { margin-top: 10px; margin-bottom: 7px; }
.auth-register-shell .auth-uaeh-brand p { font-size: .72rem; }
.auth-register-content { margin-top: 13px; }
.auth-register-content .auth-form-icon { width: 50px; height: 50px; margin-bottom: 9px; border-radius: 12px; font-size: 1.18rem; }
.auth-register-content .auth-title { font-size: clamp(1.8rem, 2.3vw, 2.2rem); }
.auth-register-content .auth-subtitle { margin: 5px 0 13px; font-size: .85rem; line-height: 1.4; }
.auth-register-form { gap: 8px; }
.auth-register-form .auth-field label { margin-bottom: 4px; font-size: .72rem; }
.auth-register-form .auth-input { min-height: 39px; height: 39px; padding-top: 5px; padding-bottom: 5px; padding-left: 51px; border-radius: 8px; font-size: .79rem; }
.auth-register-form .auth-input-wrap > .bi { left: 17px; font-size: .9rem; }
.auth-register-form .auth-toggle { right: 3px; width: 36px; height: 34px; }
.auth-register-help { display: flex; min-height: 16px; justify-content: space-between; gap: 8px; color: rgba(255,255,255,.64); font-size: .68rem; line-height: 1.3; }
.auth-register-help .text-success { color: #7de1b7 !important; font-weight: 700; white-space: nowrap; }
.auth-register-help .text-danger { color: #ffaaa8 !important; font-weight: 700; white-space: nowrap; }
.auth-register-form .auth-btn { min-height: 49px; margin-top: -1px; border-radius: 8px; font-size: .72rem; }
.auth-register-content .auth-foot { margin-top: 12px; font-size: .76rem; }
.auth-register-content .auth-back-link { margin-top: 19px; font-size: .76rem; }

/* Portátiles y tabletas */
@media (max-width: 1180px) {
  .auth-shell { grid-template-columns: minmax(0, 54fr) minmax(420px, 46fr); }
  .auth-brand-panel { padding-right: 42px; padding-left: 42px; }
  .auth-form-panel { padding-right: 38px; padding-left: 38px; }
  .auth-brand-message h2 { font-size: clamp(2.35rem, 4.3vw, 3.15rem); }
}

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; overflow: visible; }
  .auth-brand-panel { min-height: 590px; padding: 46px clamp(28px, 8vw, 70px); background-position: center 53%; }
  .auth-brand-message { margin-top: 48px; }
  .auth-brand-message h2 { font-size: clamp(2.55rem, 7vw, 3.7rem); }
  .auth-benefits { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; max-width: 720px; gap: 13px; margin-top: 45px; }
  .auth-benefits li { grid-template-columns: 43px minmax(0, 1fr); gap: 10px; font-size: .76rem; }
  .auth-benefits i { width: 43px; height: 43px; }
  .auth-brand-footer { display: none; }
  .auth-form-panel { min-height: 720px; padding: 42px clamp(28px, 9vw, 80px) 60px; overflow: hidden; }
  .auth-panel-inner,
  .auth-register-shell .auth-panel-inner { width: min(520px, 100%); }
  .auth-form-content { margin-top: 40px; }
  .auth-register-content { margin-top: 20px; }
  .auth-panel-motto { display: none; }
  .auth-register-shell .auth-form-panel { min-height: auto; padding-top: 38px; padding-bottom: 48px; }
}

/* Celulares */
@media (max-width: 620px) {
  .auth-brand-panel { min-height: 430px; padding: 30px 24px; background-position: 56% center; }
  .auth-institution { font-size: .61rem; }
  .auth-brand-header > span { width: 42px; margin-top: 19px; }
  .auth-brand-message { margin-top: 38px; }
  .auth-kicker { font-size: .64rem; }
  .auth-brand-message h2 { margin: 14px 0 16px; font-size: clamp(2.15rem, 11vw, 3rem); }
  .auth-brand-description { max-width: 360px; font-size: .88rem; }
  .auth-benefits { display: none; }
  .auth-form-panel,
  .auth-register-shell .auth-form-panel { min-height: auto; padding: 32px 22px 48px; }
  .auth-uaeh-wordmark { font-size: 2.55rem; }
  .auth-uaeh-brand p { font-size: .68rem; letter-spacing: .29em; }
  .auth-form-content,
  .auth-register-content { margin-top: 34px; }
  .auth-title { font-size: 1.9rem; }
  .auth-subtitle { margin-bottom: 24px; }
  .auth-input { min-height: 53px; }
  .auth-back-link { margin-top: 32px; }
  .auth-register-content .auth-form-icon { width: 48px; height: 48px; }
  .auth-register-content .auth-subtitle { margin-bottom: 18px; }
  .auth-register-form { gap: 12px; }
  .auth-register-form .auth-field label { margin-bottom: 6px; }
  .auth-register-form .auth-input { min-height: 47px; height: 47px; }
  .auth-register-help { flex-direction: column; min-height: 0; }
  .auth-register-form .auth-btn { min-height: 51px; }
}

@media (max-width: 390px) {
  .auth-brand-message h2 { font-size: 2.05rem; }
  .auth-form-panel,
  .auth-register-shell .auth-form-panel { padding-right: 17px; padding-left: 17px; }
  .auth-uaeh-brand p { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-page *,
  .auth-page *::before,
  .auth-page *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
