/* General */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background: #f4f7f9;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.login-wrapper {
  padding: 1rem;
  width: 100%;
  max-width: 400px;
}
.login-card {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  text-align: center;
}
.login-logo {
  max-width: 120px;
  margin-bottom: 1rem;
}
.login-card h1 {
  margin: 0 0 1.5rem;
  font-size: 1.4rem;
  color: #1976d2;
}
.field {
  margin-bottom: 1rem;
  text-align: left;
}
.field label {
  display: block;
  margin-bottom: 0.3rem;
  color: #333;
}
.field input {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}

/* Ojos para contraseñas */
.password-wrapper {
  position: relative;
}
.password-wrapper input {
  width: 100%;
  padding-right: 2.8rem;
  height: 2.4rem;
  line-height: 2.4rem;
  font-size: 1rem;
}
.password-wrapper button {
  position: absolute;
  top: 20%;
  right: 0.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0;
  line-height: 1;
}

/* Botones */
.btn-primary {
  width: 100%;
  padding: 0.8rem;
  background: #1976d2;
  border: none;
  color: #fff;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.3s ease;
}
.btn-primary:hover {
  background: #115293;
}
.btn-secondary {
  margin-top: 0.5rem;
  background: transparent;
  border: none;
  color: #555;
  cursor: pointer;
  text-decoration: underline;
}

/* Mensajes */
.error {
  color: #c62828;
  font-size: 0.9rem;
  display: none;
  margin-bottom: 0.5rem;
}

/* Enlace recuperar */
.forgot {
  margin-top: 1rem;
}
.forgot a {
  color: #1976d2;
  text-decoration: none;
}
.forgot a:hover {
  text-decoration: underline;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal {
  background: #fff;
  padding: 1.5rem;
  border-radius: 6px;
  width: 100%;
  max-width: 350px;
  position: relative;
}
.modal h2 {
  margin-top: 0;
  color: #1976d2;
  font-size: 1.2rem;
}
.modal .field {
  margin-bottom: 1rem;
}
.modal .btn-secondary {
  display: block;
  margin: 0.5rem auto 0;
}
.modal input {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Helpers */
.oculto {
  display: none !important;
}
