/* ============================================================
   COBACH Digital - Login de Aspirantes
   Usado por Views/Home/Login.cshtml
   ============================================================ */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/montserrat-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/montserrat-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/montserrat-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/montserrat-latin-800-normal.woff2") format("woff2"); }

:root {
  --azul-1: #0A2C72;
  --azul-2: #061D55;
  --azul-3: #03123B;
  --cian: #3FC1E0;
  --cian-2: #1E9FD0;
  --rosa: #E5157E;
  --teal: #1696A8;
  --texto: #E3E9F7;
  --texto-suave: #A9B6D6;
  --error: #FF8FB5;
}
[ng-cloak], .ng-cloak { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; background: var(--azul-2); }
body.login-cd {
  margin: 0; min-height: 100%; display: flex; flex-direction: column; position: relative; overflow-x: hidden;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
  color: var(--texto); font: 500 1rem/1.55 "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: radial-gradient(ellipse 70% 60% at 50% 25%, var(--azul-1) 0%, var(--azul-2) 55%, var(--azul-3) 100%);
}
.login-cd > div[ng-controller] { flex: 1; display: flex; flex-direction: column; }
.login-cd a { color: inherit; }
.login-cd :focus-visible { outline: 3px solid var(--cian); outline-offset: 3px; border-radius: 6px; }

/* ===== Decoración de fondo ===== */
.login-cd .deco { position: absolute; pointer-events: none; z-index: 0; }
.login-cd .franjas-sup, .login-cd .franjas-inf { z-index: 1; }
.login-cd .franjas-sup { top: 0; left: 0; width: min(330px, 34vw); height: auto; }
.login-cd .franjas-inf { right: 0; bottom: 0; width: min(330px, 34vw); height: auto; transform: rotate(180deg); }
.login-cd .marca-agua { top: 50%; right: -4vw; transform: translateY(-58%); width: min(380px, 26vw); height: auto; opacity: .07; }
.login-cd .puntos-deco { width: 140px; height: 90px; background-image: radial-gradient(var(--cian-2) 1.4px, transparent 1.6px); background-size: 14px 14px; opacity: .35; }
.login-cd .pd-1 { top: 6%; right: 18%; }
.login-cd .pd-2 { left: 1.5%; top: 48%; }
.login-cd .edificio {
  left: 0; right: 0; bottom: 0; height: min(38vh, 300px);
  background: url("../content/Imgs/login/edificio.webp") center bottom / cover no-repeat;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 45%, #000 80%, rgba(0,0,0,.4) 100%);
          mask-image: linear-gradient(180deg, transparent 0%, #000 45%, #000 80%, rgba(0,0,0,.4) 100%);
  opacity: .9;
}

/* ===== Contenido ===== */
.login-cd main { position: relative; z-index: 2; flex: 1; display: flex; align-items: center; padding: clamp(2rem, 6vh, 4rem) 0 clamp(7rem, 22vh, 13rem); }
.login-cd .wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.login-cd .rejilla { display: grid; grid-template-columns: minmax(0, 1.2fr) 1px minmax(0, .9fr); gap: clamp(2rem, 4.5vw, 4rem); align-items: center; }
.login-cd .divisor { align-self: stretch; background: linear-gradient(180deg, transparent, rgba(169, 182, 214, .45) 15%, rgba(169, 182, 214, .45) 85%, transparent); }

/* Avisos */
.login-cd .avisos { position: relative; padding-top: 22px; }
.login-cd .marco {
  position: relative; border-radius: 22px; padding: 10px; background: rgba(6, 29, 85, .6);
  border: 2px solid rgba(63, 193, 224, .55); box-shadow: 0 0 40px rgba(63, 193, 224, .18), 0 25px 60px rgba(0, 0, 0, .35);
}
.login-cd .pestana {
  position: absolute; top: -22px; left: 64px; z-index: 2; margin: 0;
  padding: .55rem 3.2rem; border-radius: 16px 16px 0 0;
  background: linear-gradient(90deg, #0E5E92, #1B86BE); color: #fff;
  font: 700 1rem "Montserrat", sans-serif; letter-spacing: .14em; text-transform: uppercase;
}
.login-cd .pantalla { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--azul-3); }
.login-cd .aviso { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .5s, visibility .5s; }
.login-cd .aviso.activo { opacity: 1; visibility: visible; }
.login-cd .aviso img { width: 100%; height: 100%; object-fit: cover; display: block; }
.login-cd .aviso a { display: block; height: 100%; }
.login-cd .puntos { display: flex; justify-content: center; gap: .7rem; margin-top: 1.1rem; min-height: 14px; }
.login-cd .puntos button { width: 14px; height: 14px; border-radius: 50%; padding: 0; cursor: pointer; border: 2px solid var(--cian); background: transparent; position: relative; }
.login-cd .puntos button::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: var(--cian); }
.login-cd .puntos button[aria-current="true"] { border-color: var(--rosa); }
.login-cd .puntos button[aria-current="true"]::after { background: var(--rosa); }
.login-cd .tutorial { display: flex; justify-content: center; margin-top: .9rem; }
.login-cd .tutorial a { display: inline-flex; align-items: center; gap: .5rem; color: var(--cian); font-weight: 700; font-size: .95rem; text-decoration: none; }
.login-cd .tutorial a:hover { text-decoration: underline; text-underline-offset: 4px; }
.login-cd .tutorial svg { width: 22px; height: 22px; color: var(--rosa); }

/* Acceso */
.login-cd .acceso { width: 100%; max-width: 440px; justify-self: start; }
.login-cd .acceso-logo { display: block; width: 200px; max-width: 64%; height: auto; margin: 0 auto .6rem; }
.login-cd .acceso h1 { margin: 0 0 1.75rem; text-align: center; font: 800 1.35rem "Montserrat", sans-serif; letter-spacing: .06em; color: #fff; text-transform: uppercase; }
.login-cd .campo { margin-bottom: 1.05rem; }
.login-cd .campo label { display: block; font-weight: 600; font-size: .95rem; color: #fff; margin-bottom: .4rem; }
.login-cd .entrada { position: relative; }
.login-cd .entrada svg.ico { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: #1A3A86; pointer-events: none; }
.login-cd .entrada input {
  width: 100%; height: 50px; padding: 0 3rem 0 2.85rem; border: 2px solid transparent; border-radius: 8px;
  background: #fff; color: #0B1F55; font: 500 1rem "Montserrat", sans-serif; box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
  transition: border-color .15s, box-shadow .15s;
}
.login-cd .entrada input::placeholder { color: #8B97B5; font-weight: 500; }
.login-cd .entrada input:focus { outline: none; border-color: var(--cian); box-shadow: 0 0 0 4px rgba(63, 193, 224, .3); }
.login-cd form.ng-submitted .entrada input.ng-invalid,
.login-cd .entrada input.ng-invalid.ng-touched { border-color: var(--rosa); }
.login-cd .ver { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: none; color: #5B6B92; cursor: pointer; border-radius: 6px; display: grid; place-items: center; }
.login-cd .ver:hover { color: #0B1F55; }
.login-cd .ver svg { width: 20px; height: 20px; }
.login-cd .error { display: block; margin-top: .35rem; font-size: .85rem; color: var(--error); }
.login-cd .olvide { display: inline-block; margin: .1rem 0 1.6rem; color: var(--cian); font-size: .92rem; text-decoration: none; }
.login-cd .olvide:hover { text-decoration: underline; text-underline-offset: 3px; }
.login-cd .botones { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.login-cd .btn {
  display: flex; align-items: center; justify-content: center; height: 48px; border-radius: 6px; border: 0; cursor: pointer;
  font: 700 1rem "Montserrat", sans-serif; color: #fff; text-decoration: none; transition: filter .15s, transform .15s;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
}
.login-cd .btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.login-cd .btn[disabled] { opacity: .55; cursor: not-allowed; filter: none; transform: none; }
.login-cd .btn-rosa { background: var(--rosa); }
.login-cd .btn-teal { background: var(--teal); }

.login-cd footer { position: relative; z-index: 2; text-align: center; padding: 0 1rem 1.6rem; font-size: .88rem; letter-spacing: .03em; color: #fff; }
.login-cd footer p { margin: 0 0 .6rem; }
.login-cd footer a { color: var(--cian); text-decoration: none; }
.login-cd footer a:hover { text-decoration: underline; }
.login-cd .barra { display: block; width: 130px; height: 4px; margin: 0 auto; border-radius: 2px; background: linear-gradient(90deg, var(--cian-2) 0 50%, var(--rosa) 50% 100%); }

/* ===== Ventana "Recuperación de folio" (Home/RecuperarPassword) ===== */
.login-cd .overlay { position: fixed; inset: 0; z-index: 1001; background: rgba(3, 18, 59, .82); backdrop-filter: blur(3px); }
.login-cd .ventanaModal { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; overflow: auto; padding: 1rem; }
.login-cd .ventanaModalBox {
  position: relative; width: 100%; max-width: 420px; padding: 1.5rem 1.5rem 1.25rem; border-radius: 14px;
  background: #fff; color: #0B1F55; border-top: 5px solid var(--rosa); box-shadow: 0 25px 60px rgba(0, 0, 0, .45);
}
.login-cd .ventanaModalBox > p:first-child { display: none; }
.login-cd .ventanaModalBox fieldset { border: 0; margin: 0; padding: 0; }
.login-cd .ventanaModalBox legend { padding: 0 2rem 1rem 0; font: 800 1.05rem/1.3 "Montserrat", sans-serif; letter-spacing: .03em; color: var(--azul-1); text-transform: uppercase; }
.login-cd .ventanaModalBox input[type="text"],
.login-cd .ventanaModalBox input[type="email"] {
  display: block; width: 100%; height: 46px; margin: 0 0 .35rem; padding: 0 .9rem; border: 2px solid #D5DCEB; border-radius: 8px;
  font: 500 .95rem "Montserrat", sans-serif; color: #0B1F55; background: #fff;
}
.login-cd .ventanaModalBox input:focus { outline: none; border-color: var(--cian); box-shadow: 0 0 0 4px rgba(63, 193, 224, .25); }
.login-cd .ventanaModalBox .MensajeErrorDatos { display: block; margin: 0 0 .6rem; font-size: .82rem; color: #C0105F; }
.login-cd .ventanaModalBox .button_registro {
  width: 100%; height: 46px; margin-top: .8rem; border: 0; border-radius: 6px; cursor: pointer;
  background: var(--teal); color: #fff; font: 700 1rem "Montserrat", sans-serif;
}
.login-cd .ventanaModalBox .button_registro:hover { filter: brightness(1.1); }
.login-cd #closeNotificacion_ { position: absolute; top: .9rem; right: .9rem; width: 28px; height: 28px; cursor: pointer; opacity: .7; }
.login-cd #closeNotificacion_:hover { opacity: 1; }
.login-cd #closeNotificacion_ img { width: 100%; height: 100%; }

@media (max-width: 900px) {
  .login-cd .rejilla { grid-template-columns: 1fr; gap: 3rem; }
  .login-cd .divisor { display: none; }
  .login-cd .acceso { order: -1; justify-self: center; }
  .login-cd .avisos { max-width: 560px; width: 100%; margin-inline: auto; }
  .login-cd .pestana { left: 32px; padding-inline: 2rem; }
  .login-cd .marca-agua { display: none; }
  .login-cd .franjas-sup, .login-cd .franjas-inf { width: 90px; }
  .login-cd .edificio { height: 200px; }
  .login-cd main { padding-top: 4.5rem; padding-bottom: 9rem; }
}
@media (max-width: 420px) {
  .login-cd .botones { grid-template-columns: 1fr; }
  .login-cd .btn-teal { order: -1; }
}
@media (prefers-reduced-motion: reduce) { .login-cd .aviso, .login-cd .btn { transition: none; } }
