@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;600&display=swap');

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Roboto", sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: #fff;
  overflow-x: hidden;
}

/* ---- Fondo con overlay ---- */

.bg-cover {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  z-index: 0;
}

.bg-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.6);
}

/* ---- Card ---- */

#container {
  width: 480px;
  max-width: 95%;
  background: #fff;
  color: #202020;
  border-radius: 6px;
  box-shadow: 0 2px 16px rgba(0,0,0,.18), 0 1px 4px rgba(0,0,0,.1);
  overflow: hidden;
  position: relative;
  z-index: 2;
  padding: 48px 40px 40px;
}

.logoContainer {
  text-align: center;
  margin-bottom: 28px;
}

.logoContainer a {
  display: inline-block;
  line-height: 0;
}

.img-logo {
  height: 90px;
  width: auto;
  object-fit: contain;
  transition: opacity .15s;
}

.logoContainer a:hover .img-logo { opacity: .85; }

#container h1 {
  font-size: 30px;
  font-weight: 300;
  line-height: 1.2;
  text-align: center;
  margin-bottom: 10px;
  letter-spacing: -.02em;
  color: #202020;
  text-transform: uppercase;
}

#container p {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.55;
  text-align: center;
  color: #202020;
  opacity: .75;
  margin-bottom: 28px;
}

/* ---- Form ---- */

.formGroup {
  margin-bottom: 20px;
}

.formGroup label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 7px;
  color: #202020;
  opacity: .7;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.formGroup input[type="email"],
.formGroup input[type="password"],
.formGroup input[type="text"] {
  width: 100%;
  padding: 14px 44px 14px 16px;
  font-size: 15px;
  color: #242424;
  background: #fff;
  border: 1.5px solid rgba(0,0,0,.12);
  border-radius: 4px;
  outline: none;
  font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.formGroup input:focus {
  border-color: #2196f3;
  box-shadow: 0 0 0 3px rgba(33,150,243,.15);
}

.toggle-password {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #888;
  display: flex;
  align-items: center;
  transition: color .15s;
  line-height: 0;
}

.toggle-password:hover { color: #202020; }

.toggle-password svg {
  fill: currentColor;
  pointer-events: none;
}

.field-hint {
  display: block;
  font-size: 12px;
  margin-top: 5px;
  color: #888;
  min-height: 16px;
  transition: color .15s;
}

.field-hint--error { color: #c62828; }
.field-hint--ok    { color: #166534; }

/* ---- Botón ---- */

.btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 280px;
  margin: 8px auto 0;
  padding: 14px 24px;
  border: none;
  border-radius: 4px;
  background: #202020;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
  appearance: none;
  backface-visibility: hidden;
  transform: translate3d(0,0,0);
  transition: box-shadow .25s, transform .25s, background .2s;
  text-decoration: none;
}

.btn-submit:hover {
  background: #333;
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
  transform: translateY(-2px);
}

.btn-submit:active {
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
  transform: translateY(0);
}

/* ---- Volver ---- */

.back-to-login {
  display: block;
  text-align: center;
  margin-top: 18px;
  font-size: 13px;
  color: #202020;
  text-decoration: none;
  opacity: .65;
  transition: opacity .15s;
}

.back-to-login:hover { opacity: 1; }

/* ---- Alertas ---- */

.alert {
  padding: 11px 14px;
  border-radius: 4px;
  font-size: 13px;
  text-align: center;
  margin: 14px 0;
  border: 1px solid transparent;
}

.alert-error   { background: #ffebee; color: #c62828; border-color: #ffcdd2; }
.alert-success { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }

/* ---- Responsive ---- */

@media (max-width: 768px) {
  body { min-height: 100dvh; }

  #container {
    width: 95%;
    max-width: 400px;
    padding: 32px 20px 28px;
  }

  #container h1 {
    font-size: 26px;
    margin-bottom: 8px;
  }

  #container p { margin-bottom: 20px; }

  .img-logo { height: 75px; }

  .formGroup { margin-bottom: 16px; }

  .btn-submit {
    width: 100%;
    max-width: 100%;
    padding: 14px;
  }
}