/* Reset básico */
* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100dvh;
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: #000000;
  background: black;
}

/* ========== Layout general ========== */
.login-page {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(320px, 38%) minmax(0, 62%);
  background: black;
}

/* ========== Panel izquierdo ========== */
.login-left {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  background: #000;
  overflow: hidden;
}

.login-left::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    radial-gradient(800px 500px at 20% 20%, rgba(59, 130, 246, 0.35), transparent 60%),
    radial-gradient(700px 400px at 70% 60%, rgba(59, 130, 246, 0.2), transparent 55%),
    linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent 60%);
  pointer-events: none;
}

.imagen-logo {
  position: absolute;
  z-index: 0;
  inset: clamp(16px, 4vw, 60px);
  border-radius: clamp(14px, 2vw, 28px);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.imagen-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.login-text {
  position: absolute;
  left: 20px;
  bottom: 40px;
  z-index: 2;
  max-width: 80%;
}

.glass-label {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 420px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 18px;
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.login-text-cita p {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.2px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
}

.login-subtext p {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  opacity: 0.9;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

/* ========== Panel derecho: login y registro ========== */
.login-right,
.register-right {
  width: 100%;
  min-width: 0;
  display: grid;
  justify-items: center;
  align-content: center;
  padding: 32px 24px;
  background: linear-gradient(to top,
      rgba(59, 130, 246, 0.25) 0%,
      rgba(0, 0, 0, 0.95) 60%,
      rgb(0, 0, 0) 100%);
}

.login-right {
  gap: 40px;
}

.register-right {
  gap: 30px;
}

.login-header,
.register-header {
  width: min(100%, 620px);
  text-align: center;
}

.login-h1 {
  color: white;
  margin: 0;
  font-size: clamp(42px, 4.2vw, 60px);
  line-height: 1.1;
  letter-spacing: 0.4px;
}

.login-header p,
.register-header p {
  margin: 20px 0 0;
  color: #ffffff;
  font-size: 15px;
  line-height: 1.45;
}

/* ========== Card del formulario ========== */
.login-form,
.register-form {
  width: min(100%, 420px);
  background: #f1f1f1;
  border: 2px solid rgba(15, 23, 42, 0.1);
  border-radius: 18px;
  padding: 26px;
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.30);
  display: grid;
  gap: 14px;
}

.register-form {
  margin-bottom: 40px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.field input {
  width: 100%;
  height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #f8fafc;
  padding: 0 12px;
  font-size: 14px;
  color: #0f172a;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.field input::placeholder {
  color: #6e727a;
}

.field input:hover,
.field input:focus {
  background: #ffffff;
  border-color: #3b82f6;
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4);
}

.login-button {
  margin-top: 6px;
}

.login-button button {
  width: 100%;
  height: 46px;
  background-color: #3b82f6;
  color: white;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
  transition: all 0.25s ease;
}

.login-button button:hover {
  background-color: #2563eb;
  transform: scale(1.03);
  box-shadow: 0 12px 35px rgba(59, 130, 246, 0.6);
}

.login-button button:active {
  transform: translateY(0);
}

.register-enlace,
.login-enlace {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  text-align: center;
}

.register-enlace p,
.login-enlace p {
  margin: 0;
}

.register-enlace a,
.login-enlace a {
  text-decoration: none;
}

.legal-checkbox {
  align-items: flex-start;
  line-height: 1.5;
}

.legal-checkbox a {
  color: #2563eb;
  font-weight: 700;
}

/* ========== Ajustes para escritorio medio ========== */
@media (max-width: 1415px) and (min-width: 1001px) {
  .imagen-logo img {
    object-fit: contain;
    transform: scale(1.7);
  }
}

/* ========== Escritorio con poca altura ========== */
@media (min-width: 1001px) and (max-height: 760px) {
  .imagen-logo {
    inset: clamp(10px, 5vh, 60px);
  }

  .imagen-logo img{
    transform: scale(1.3);
  }

  .login-text {
    bottom: 24px;
  }

  .glass-label {
    gap: 10px;
    padding: 14px;
  }

  .login-text-cita p {
    font-size: 15px;
  }

  .login-subtext p {
    font-size: 12px;
  }

  .login-h1 {
    font-size: clamp(38px, 7vh, 52px);
  }

  .login-right,
  .register-right {
    padding-top: 20px;
    padding-bottom: 20px;
    gap: 30px;
  }

  .login-form,
  .register-form {
    padding: 22px;
    gap: 20px;
  }
}

/* ========== Tablet / móvil: una columna ========== */
@media (max-width: 1000px) {
  .login-page {
    min-height: 100dvh;
    grid-template-columns: 1fr;
    grid-template-rows: clamp(170px, 30dvh, 320px) minmax(0, 1fr);
  }

  .login-left {
    min-height: 0;
    height: auto;
  }

  .login-left::before {
    background:
      radial-gradient(500px 260px at 30% 25%, rgba(59, 130, 246, 0.4), transparent 62%),
      linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.75));
  }

  .imagen-logo {
    inset: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .imagen-logo img {
    object-fit: contain;
    object-position: center;
    transform: scale(2);
  }

  .login-text {
    display: none;
  }

  .login-right,
  .register-right {
    min-height: 0;
    align-content: start;
    gap: 14px;
    padding: clamp(16px, 3dvh, 32px) 24px 28px;
    overflow-y: auto;
  }

  .login-h1 {
    font-size: clamp(32px, 7vw, 44px);
  }

  .login-header p,
  .register-header p {
    margin-top: 12px;
    font-size: 12px;
  }

  .login-form,
  .register-form {
    width: min(100%, 420px);
    padding: clamp(18px, 3vw, 26px);
    margin-bottom: 0;
    margin-top: 30px;
  }
}

/* ========== Móvil/tablet con poca altura ========== */
@media (max-width: 1000px) and (max-height: 760px) {
  .login-page {
    grid-template-rows: clamp(130px, 24dvh, 220px) minmax(0, 1fr);
  }

  .imagen-logo img {
    transform: scale(1.75);
  }

  .login-right,
  .register-right {
    gap: 30px;
    place-content: center;
    margin: 0px;
  }

  .login-h1 {
    font-size: clamp(28px, 6vw, 38px);
  }

  .login-header p,
  .register-header p {
    margin-top: 8px;
    font-size: 13px;
  }

  .login-form,
  .register-form {
    width: min(100%, 420px);
    padding: clamp(18px, 3vw, 26px);
    margin-bottom: 0;
    margin-top: 0px;
  }

  .field {
    gap: 4px;
  }

  .field input {
    height: 40px;
  }

  .login-button button {
    height: 40px;
    font-size: 14px;
  }
}

/* ========== Pantallas muy bajas: móvil horizontal o DevTools pequeño ========== */
@media (max-width: 1000px) and (max-height: 570px) {
  .login-page {
    grid-template-rows: 96px minmax(0, 1fr);
  }

  .imagen-logo img {
    transform: scale(1.35);
  }

  .login-right,
  .register-right {
    padding: 8px 20px 14px;
    gap: 6px;
  }

  .login-h1 {
    font-size: 26px;
  }

  .login-header p,
  .register-header p {
    display: none;
  }

  .login-form,
  .register-form {
    padding: 12px;
    gap: 6px;
    border-radius: 14px;
  }

  .field {
    gap: 3px;
  }

  .field label {
    font-size: 12px;
  }

  .field input {
    height: 34px;
    padding: 0 10px;
    font-size: 13px;
    border-radius: 10px;
  }

  .login-button {
    margin-top: 2px;
  }

  .login-button button {
    height: 36px;
    font-size: 14px;
    border-radius: 10px;
  }

  .register-enlace,
  .login-enlace {
    gap: 6px;
    font-size: 13px;
  }
}

/* ========== Móvil estrecho ========== */
@media (max-width: 500px) {
  .login-page {
    min-height: 100dvh;
    grid-template-rows: clamp(130px, 24dvh, 180px) minmax(0, 1fr);
  }

  .imagen-logo img {
    object-fit: contain;
    transform: scale(1.85);
  }

  .login-right,
  .register-right {
    padding: 14px 16px 24px;
    gap: 40px;
  }

  .login-h1 {
    font-size: clamp(30px, 10vw, 30px);
  }

  .login-header p,
  .register-header p {
    margin-top: 10px;
    font-size: 12px;
  }

  .login-form,
  .register-form {
    width: 100%;
    padding: 18px;
    gap: 10px;
  }

  .register-enlace,
  .login-enlace {
    font-size: 14px;
  }
}

/* ========== Móvil estrecho + poca altura ========== */
@media (max-width: 500px) and (max-height: 760px) {
  .login-page {
    grid-template-rows: 160px minmax(0, 1fr);
  }

  .imagen-logo img {
    transform: scale(2.0);
  }

  .login-right {
    place-content: start;
    justify-content: center;
    margin-top: 12%;
    
  }

  .register-right {
    margin-top: 20px;
    width: 100%;
    place-content: center;
  }

  .register-form {
    padding: 14px;
    gap: 12px;
    max-width: 90%;
    height: 500px;
  }

  .checkbox-row{
    font-size: 11px;
  }

  .login-form{
    padding: 14px;
    gap: 10px;
    min-height: 270px;
  }

  .field input {
    height: 36px;
  }

  .login-button button {
    height: 38px;
  }
}

/* ========== Móvil muy estrecho ========== */
@media (max-width: 360px) {
  .login-right,
  .register-right {
    padding-left: 12px;
    padding-right: 12px;
  }

  .login-form,
  .register-form {
    padding: 12px;
  }

  .login-h1 {
    font-size: 30px;
  }
}