@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap");

/* ========= Reset ========= */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

:root{
  --fs-base: 16px;
  --radius: 14px;
  --shadow: 0 0 12px rgba(0,0,0,.22);

  --field-h: 52px;
  --btn-h: 52px;

  --pad-x: 34px;
  --pad-y: 30px;
}

body{
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: var(--fs-base);
  line-height: 1.35;
  color: #fff;

  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 100svh;
  padding: 14px;

  background: url('img.jpg') no-repeat center / cover fixed;
}

/* ========= Card ========= */
.wrapper{
  width: min(460px, 94vw);
  background: color-mix(in oklab, #000 12%, transparent);
  border: 2px solid rgba(255,255,255,.18);
  border-radius: var(--radius);
  box-shadow: var(--shadow);

  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);

  padding: var(--pad-y) var(--pad-x);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .wrapper { background: rgba(20, 25, 35, .88); }
}

/* ========= Inputs ========= */
.wrapper .input-box{
  position: relative;
  width: 100%;
  height: var(--field-h);
  margin: 18px 0;
}

.input-box input{
  width: 100%;
  height: 100%;
  background: transparent;

  border: 2px solid rgba(255,255,255,.24);
  border-radius: 999px;

  outline: none;
  font-size: 16px;
  color: #fff;

  padding: 0 56px 0 20px;

  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.input-box input::placeholder{ color: rgba(255,255,255,.86); }

.input-box input:focus-visible{
  border-color: rgba(255,255,255,.95);
  box-shadow: 0 0 0 4px rgba(255,255,255,.16);
  background: rgba(255,255,255,.03);
}

.input-box i{
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  pointer-events: none;
  color: rgba(255,255,255,.92);
}

/* ========= Remember / Forgot ========= */
.wrapper .remember-forgot{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  margin: 6px 0 16px;
  flex-wrap: wrap;
}

.remember-forgot label{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.remember-forgot label input{
  accent-color: #fff;
}

.remember-forgot a{
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
.remember-forgot a:hover{ text-decoration: underline; }

/* ========= Button ========= */
.wrapper .btn{
  width: 100%;
  height: var(--btn-h);
  background: #fff;
  border: none;
  outline: none;
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(0,0,0,.12);
  cursor: pointer;

  font-size: 17px;
  color: #222;
  font-weight: 800;

  transition: transform .04s ease, filter .15s ease;
}

.wrapper .btn:active{ transform: translateY(1px); }
.wrapper .btn:hover{ filter: brightness(0.97); }

/* ========= Register ========= */
.wrapper .register-link{
  font-size: 14px;
  text-align: center;
  margin: 18px 0 0;
}
.wrapper .register-link p a{
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}
.wrapper .register-link p a:hover{ text-decoration: underline; }

/* ========= MODALES ========= */
.modal{
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background: rgba(0,0,0,.55);
  justify-content: center;
  align-items: center;
  padding: 12px;
}

.modal-content{
  width: min(420px, 94vw);
  background: color-mix(in oklab, #020617 86%, transparent);
  border-radius: var(--radius);
  padding: 18px 20px 20px;
  box-shadow: 0 0 22px rgba(0,0,0,.48);
  text-align: center;
  border: 1px solid rgba(255,255,255,.22);
  color: #fff;
}

.modal-title{
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 6px;
}

.modal-text{
  font-size: 15px;
  margin-bottom: 12px;
  opacity: .92;
}

.modal-form{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-input{
  width: 100%;
  height: var(--field-h);
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.24);
  background: transparent;
  color: #fff;
  padding: 0 18px;
  font-size: 16px;
  outline: none;
}

.modal-input::placeholder{ color: rgba(255,255,255,.84); }

.modal-input:focus-visible{
  border-color: rgba(255,255,255,.95);
  box-shadow: 0 0 0 4px rgba(255,255,255,.16);
  background: rgba(255,255,255,.03);
}

.modal-actions{
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-btn{
  min-width: 140px;
  height: var(--btn-h);
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 0 10px rgba(0,0,0,.25);
}

.modal-btn-primary{
  background: #fff;
  color: #222;
}

.modal-btn-close{
  background: #e53935;
  color: #fff;
}

.modal-btn:active{ transform: translateY(1px); }

/* ======================================================
   🔥 MÓVIL BLINDADO (si esto no se aplica, no está cargando el CSS)
   - fuerza ancho/alto del card
   - fuerza tamaños de input/botón
   - usa !important solo en móvil para ganar cualquier guerra de CSS
====================================================== */
@media (max-width: 768px){
  body{
    padding: 0 !important;
    min-height: 100vh !important;
  }

  .wrapper{
    width: 94vw !important;
    max-width: 94vw !important;

    min-height: 78vh !important;   /* más largo */
    padding: 28px 22px !important;

    border-radius: 18px !important;
    border-width: 2px !important;
  }

  /* logo grande */
  .logo{
    width: 78vw !important;
    max-width: 360px !important;
    height: auto !important;
    margin: 0 auto 22px auto !important;
    display: block !important;
  }

  .wrapper .input-box{
    height: 62px !important;
    margin: 18px 0 !important;
  }

  .input-box input{
    font-size: 17px !important;
    padding-left: 22px !important;
  }

  .input-box i{
    font-size: 22px !important;
    right: 18px !important;
  }

  .remember-forgot{
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    font-size: 15px !important;
    margin: 6px 0 16px !important;
  }

  .wrapper .btn{
    height: 62px !important;
    font-size: 18px !important;
  }

  .register-link{
    font-size: 15px !important;
  }

  /* modal también grande en móvil */
  .modal-content{
    width: 94vw !important;
    max-width: 94vw !important;
  }
}

/* Accesibilidad */
:focus-visible{
  outline: 2px solid rgba(255,255,255,.6);
  outline-offset: 2px;
}
