* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  min-height: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  min-height: 100vh;
  background:
    linear-gradient(rgba(230,238,242,.55), rgba(230,238,242,.55)),
    url('assets/img/1.jpg') center center / cover no-repeat fixed;
  color: #0f172a;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

.login-page {
  min-height: calc(100vh - 70px);
  width: 100%;
  display: grid;
  grid-template-columns: minmax(320px, 1.1fr) minmax(320px, 460px);
  align-items: center;
  gap: clamp(30px, 6vw, 120px);
  padding: clamp(35px, 6vw, 90px);
}

.branding {
  max-width: 720px;
  animation: fadeInLeft .9s ease both;
}

.logo-responsive {
  width: min(100%, 650px);
  height: auto;
  display: block;
  margin-bottom: 34px;
  filter:
    drop-shadow(0 0 12px rgba(255,255,255,.75))
    drop-shadow(0 12px 28px rgba(0,55,100,.32));
}

.leyenda {
  max-width: 720px;
  font-size: clamp(18px, 1.35vw, 30px);
  line-height: 1.55;
  font-style: italic;
  color: #020617;
  text-shadow: 0 1px 8px rgba(255,255,255,.65);
}

.login-container {
  width: 100%;
  max-width: 460px;
  justify-self: center;
  padding: clamp(28px, 3vw, 50px);
  border-radius: 28px;
  text-align: center;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.65);
  box-shadow:
    0 25px 70px rgba(15,23,42,.24),
    inset 0 1px 0 rgba(255,255,255,.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: fadeInRight .9s ease both;
}

.login-container h2 {
  color: #2f3640;
  font-size: clamp(30px, 2.2vw, 46px);
  margin-bottom: 18px;
  font-weight: 800;
}

.login-container p {
  color: #64748b;
  font-size: clamp(15px, .95vw, 18px);
  line-height: 1.35;
  margin-bottom: 24px;
}

.login-container form {
  margin-bottom: 16px;
}

input[type="email"],
input[type="password"] {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  margin-bottom: 14px;
  border-radius: 10px;
  border: 1px solid rgba(100,116,139,.35);
  background: rgba(255,255,255,.46);
  color: #1e293b;
  font-size: 16px;
  outline: none;
}

input[type="email"]:focus,
input[type="password"]:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 4px rgba(14,165,233,.14);
}

button[type="submit"],
.btn-create {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 0 34px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #0ea5e9, #0369a1);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(3,105,161,.28);
  transition: transform .2s ease, box-shadow .2s ease;
}

button[type="submit"]:hover,
.btn-create:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(3,105,161,.35);
}

.forgot-password {
  margin: 14px 0;
}

.forgot-password a {
  color: #0369a1;
  font-size: 15px;
  font-weight: 700;
}

.divider {
  color: #64748b;
  font-weight: 800;
  margin: 22px 0;
}

.register-text {
  margin-bottom: 12px !important;
}

small {
  display: block;
  margin-top: 24px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.legal-link {
  border: none;
  background: transparent;
  color: #0369a1;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.alert-error {
  background: rgba(239,68,68,.12);
  border: 1px solid rgba(239,68,68,.35);
  color: #991b1b;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-weight: 700;
}

footer {
  width: 100%;
  text-align: center;
  padding: 18px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-shadow: 0 2px 10px rgba(0,0,0,.45);
}

/* MODALES */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(2,6,23,.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  position: relative;
  width: min(760px, 96vw);
  max-height: 86vh;
  overflow-y: auto;
  background: rgba(255,255,255,.96);
  border-radius: 24px;
  padding: clamp(26px, 4vw, 44px);
  box-shadow: 0 30px 90px rgba(0,0,0,.42);
  animation: modalIn .25s ease both;
}

.modal-content h2 {
  color: #0369a1;
  font-size: clamp(26px, 2.2vw, 34px);
  margin-bottom: 18px;
}

.modal-content p,
.modal-content li {
  color: #334155;
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 14px;
}

.cerrar-modal {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

/* RESPONSIVE TV */

@media (min-width: 1800px) {
  .login-page {
    grid-template-columns: minmax(600px, 1.2fr) minmax(480px, 560px);
    padding: 100px 140px;
  }

  .logo-responsive {
    width: 850px;
    max-width: 100%;
  }

  .leyenda {
    font-size: 32px;
  }

  .login-container {
    max-width: 560px;
    padding: 62px;
  }

  input[type="email"],
  input[type="password"] {
    height: 58px;
    font-size: 19px;
  }

  button[type="submit"],
  .btn-create {
    min-height: 56px;
    font-size: 19px;
  }
}

/* LAPTOPS */

@media (max-width: 1200px) {
  .login-page {
    gap: 45px;
    padding: 45px;
    grid-template-columns: minmax(300px, 1fr) minmax(320px, 410px);
  }

  .logo-responsive {
    width: 480px;
  }

  .leyenda {
    font-size: 18px;
  }

  .login-container {
    max-width: 410px;
  }
}

/* TABLETS */

@media (max-width: 900px) {
  body {
    background-attachment: scroll;
  }

  .login-page {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 34px 22px;
  }

  .branding {
    text-align: center;
    margin: 0 auto;
  }

  .logo-responsive {
    width: min(460px, 86vw);
    margin: 0 auto 18px;
  }

  .leyenda {
    max-width: 650px;
    margin: 0 auto;
    font-size: 17px;
  }

  .login-container {
    max-width: 460px;
    margin: 0 auto;
  }
}

/* MÓVILES */

@media (max-width: 600px) {
  .login-page {
    padding: 18px 12px 10px;
    gap: 14px;
  }

  .logo-responsive {
    width: min(260px, 82vw);
    margin-bottom: 12px;
  }

  .leyenda {
    font-size: 13px;
    line-height: 1.45;
    padding: 0 8px;
  }

  .login-container {
    max-width: 100%;
    padding: 22px 18px;
    border-radius: 20px;
  }

  .login-container h2 {
    font-size: 26px;
    margin-bottom: 12px;
  }

  .login-container p {
    font-size: 14px;
    margin-bottom: 16px;
  }

  input[type="email"],
  input[type="password"] {
    height: 44px;
    font-size: 14px;
  }

  button[type="submit"],
  .btn-create {
    width: 100%;
    min-height: 46px;
    font-size: 15px;
  }

  .divider {
    margin: 16px 0;
  }

  small {
    font-size: 12px;
  }

  footer {
    font-size: 12px;
    padding: 12px;
  }

  .modal-content {
    width: 94vw;
    max-height: 82vh;
    padding: 24px 20px;
  }
}

@media (max-height: 700px) and (min-width: 901px) {
  .login-page {
    padding-top: 30px;
    padding-bottom: 20px;
  }

  .logo-responsive {
    width: 450px;
    margin-bottom: 18px;
  }

  .leyenda {
    font-size: 17px;
  }

  .login-container {
    padding: 30px;
  }
}

/* ANIMACIONES */

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-28px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(28px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}