@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  height: 100vh;
  background: linear-gradient(135deg, #000000, #258c63);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* --- Caja principal --- */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.login-box {
  background-color: #ffffff;
  border-radius: 16px;
  padding: 40px 45px;
  width: 380px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  animation: fadeIn 0.8s ease;
}

/* --- Logo --- */
.logo-container {
  text-align: center;
  margin-bottom: 15px;
}

.logo-container img {
  width: 180px;
  filter: brightness(0) saturate(100%) invert(24%) sepia(91%) saturate(281%) hue-rotate(111deg) brightness(94%) contrast(95%);
}

/* --- Título --- */
h1 {
  text-align: center;
  font-size: 1.6rem;
  color: #1c5c46;
  margin-bottom: 25px;
}

/* --- Campos de texto --- */
.txt_field {
  position: relative;
  margin: 30px 0;
  border-bottom: 2px solid #ccc;
}

.txt_field input {
  width: 100%;
  padding: 8px 5px;
  height: 40px;
  font-size: 15px;
  border: none;
  background: none;
  outline: none;
  color: #333;
}

.txt_field label {
  position: absolute;
  top: 50%;
  left: 5px;
  color: #999;
  transform: translateY(-50%);
  font-size: 15px;
  pointer-events: none;
  transition: 0.3s;
}

.txt_field span::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0%;
  height: 2px;
  background: #258c63;
  transition: 0.3s;
}

.txt_field input:focus ~ label,
.txt_field input:valid ~ label {
  top: -6px;
  color: #258c63;
  font-weight: 500;
  font-size: 14px;
}

.txt_field input:focus ~ span::before,
.txt_field input:valid ~ span::before {
  width: 100%;
}

/* --- Botón --- */
input[type="submit"] {
  width: 100%;
  height: 48px;
  background: #258c63;
  border: none;
  border-radius: 25px;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

input[type="submit"]:hover {
  background: #1c5c46;
}

/* --- Mensaje de error --- */
.error {
  color: #c0392b;
  text-align: center;
  font-size: 14px;
  margin-bottom: 10px;
  margin-top: -10px;
}

/* --- Animación de aparición --- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


@media (max-width: 768px) {

  body {
    padding: 20px;
    background: linear-gradient(135deg, #000000, #258c63);
  }

  .login-box {
    width: 100%;
    max-width: 420px;
    padding: 35px 30px;
    border-radius: 14px;
  }
  .login-container {
    min-height: calc(100vh - 120px) !important; /* acerca visualmente el cuadro */
    padding-top: 40px !important;               /* sube el cuadro */
  }

  h1 {
    font-size: 1.4rem;
    margin-bottom: 20px;
  }

  .txt_field {
    margin: 22px 0;
  }

  input[type="submit"] {
    height: 46px;
    font-size: 16px;
  }
}

