@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
  --primary-blue: #1b2a47;
  --accent-gold: #c5a059;
  --bg-left: #1b2a47;
  --bg-right: #f8f9fa;
  --text-main: #333333;
  --text-muted: #777777;
  --border-input: #d1d5db;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
  height: 100vh;
  display: flex;
  background-color: var(--bg-right);
  overflow: hidden;
}

/* --- LADO IZQUIERDO --- */
.split-left {
  flex: 1;
  background-image:
    linear-gradient(to bottom,
      rgba(27, 42, 71, 0.55) 0%,
      rgba(25, 55, 110, 0.70) 60%,
      #070c16 100%),
    url('https://hotelero.asinfagency.es/assets/images/hotel-recepcion.png');
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 50px;
  color: white;
  position: relative;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 15px;
}

.brand-logo i {
  font-size: 28px;
  color: var(--accent-gold);
}

.brand-logo h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 2px;
  margin: 0;
}

.brand-logo span {
  display: block;
  font-size: 10px;
  letter-spacing: 5px;
  font-weight: 300;
  color: #ccc;
  margin-top: 2px;
}

.welcome-text {
  max-width: 500px;
  margin-bottom: 50px;
}

.welcome-text h1 {
  font-size: 36px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 15px;
}

.welcome-text p {
  font-size: 15px;
  font-weight: 300;
  color: #e2e8f0;
  line-height: 1.6;  font-family: Arial, Helvetica, sans-serif;
}

.accent-line {
  width: 60px;
  height: 3px;
  background-color: var(--accent-gold);
  margin-bottom: 20px;
}

/* --- LADO DERECHO --- */
.split-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-right);
  padding: 40px;

}

.form-container {
  width: 100%;
  max-width: 400px;
}

.form-container h3 {
  font-size: 24px;
  color: var(--primary-blue);
  margin-bottom: 10px;
  font-weight: 700;
}

.form-container>p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}


.login-error {
  position: absolute;
  top: 20px;
  right: 20px;
  /* transform: translateX(-50%);  */
  z-index: 9999;
  background-color: #fdaecd;
  color: #eb0d62;
  border: 1px solid #ff2176;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  /* Sombra para efecto flotante */
  text-align: center;
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.login-error.fade-out {
  opacity: 0;
  /* transform: translate(-50%, -20px);  */
}

/* ESTILOS DE LOS INPUTS */
.input-group {
  position: relative;
  margin-bottom: 25px;
}

.input-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

/* CORRECCIÓN: Apuntamos solo a los iconos de la izquierda */
.input-wrapper i.icon-left {
  position: absolute;
  left: 15px;
  color: #9ca3af;
  font-size: 16px;
  transition: color 0.3s;
  pointer-events: none;
  /* Para que no bloquee el clic en el input */
}

.input-wrapper input {
  width: 100%;
  padding: 15px 15px 15px 45px;
  border: 1px solid var(--border-input);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-main);
  background-color: #ffffff;
  transition: all 0.3s;
  outline: none;
}

.input-wrapper input:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 4px rgba(27, 42, 71, 0.1);
}

.input-wrapper input:focus+i.icon-left {
  color: var(--primary-blue);
}

/* CORRECCIÓN: Icono de ojo a la derecha */
.toggle-password {
  position: absolute;
  right: 15px;
  cursor: pointer;
  color: #9ca3af;
  font-size: 16px;
  z-index: 10;
  /* Asegura que esté por encima del input */
  transition: color 0.3s;
}

.toggle-password:hover {
  color: var(--primary-blue);
}

/* Opciones extras */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  font-size: 13px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  cursor: pointer;
}

.remember-me input {
  accent-color: var(--primary-blue);
}

.forgot-password {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 600;
}

.forgot-password:hover {
  text-decoration: underline;
}

/* Botón */
.btn-login {
  width: 100%;
  padding: 16px;
  background-color: var(--primary-blue);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.btn-login:hover:not(:disabled) {
  background-color: #121e33;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(27, 42, 71, 0.2);
}

.btn-login:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Nota de seguridad */
.security-note {
  margin-top: 40px;
  text-align: center;
  font-size: 11px;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
  body {
    flex-direction: column;
    height: auto;
    overflow: auto;
  }

  .split-left {
    padding: 30px;
    min-height: 250px;
    flex: none;
  }

  .welcome-text {
    display: none;
  }

  .split-right {
    padding: 30px 20px;
    flex: none;
    min-height: calc(100vh - 250px);
  }
}