:root {
  --verde: #009c58;
  --verde-oscuro: #006b3c;
  --negro: #121212;
  --gris: #d1d1d1;
  --blanco: #ffffff;
}

/* GENERAL */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--negro);
  color: var(--blanco);
  overflow: hidden;
}

.login-container {
  display: flex;
  height: 100vh;
}

/* PANEL IZQUIERDO */
.brand-panel {
  position: relative;
  width: 55%;
  overflow: hidden;
}
.brand-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(65%) contrast(1.05);
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}
.brand-image.active {
  opacity: 1;
}
.overlay {
  position: absolute;
  inset: 0; 
  z-index: 1;
}
.brand-info {
  position: absolute;
  z-index: 2;
  bottom: 60px;
  left: 60px;
  color: var(--blanco);
}
.brand-logo {
  width: 220px; 
  margin-bottom: 20px;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.4));
}
.brand-info h2 {
  font-weight: 600;
  font-size: 1.6rem;
}
.brand-info p {
  color: #ccc;
}

/* PANEL DERECHO */
.form-panel {
  width: 45%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at top left, rgba(0,156,88,0.15), rgba(0,0,0,0.95));
  backdrop-filter: blur(25px);
  box-shadow: inset 0 0 30px rgba(0,0,0,0.5);
  padding: 40px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 40px 35px;
  box-shadow: 0 0 40px rgba(0,0,0,0.4);
}

.mini-logo {
  width: 200px; 
  margin-bottom: 8px;
}

.brand-logo,
.mini-logo {
  filter: brightness(0) invert(1) drop-shadow(0 4px 6px rgba(0,0,0,0.4));
}

.portal-title {
  font-size: 1.9rem;
  font-weight: 600;
}
.portal-title span {
  color: var(--verde);
}
.subtitle {
  color: #bbb;
  font-size: 0.9rem;
  margin-bottom: 25px;
}

/* INPUTS */
.input-group {
  position: relative;
  margin-bottom: 25px;
}
.input-group i {
  position: absolute;
  top: 13px;
  left: 12px;
  color: #aaa;
}
.input-group input {
  width: 100%;
  padding: 12px 40px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: var(--blanco);
  outline: none;
  transition: border-color 0.3s;
}
.input-group label {
  position: absolute;
  left: 40px;
  top: 13px;
  font-size: 0.85rem;
  color: #aaa;
  pointer-events: none;
  transition: all 0.2s ease;
}
.input-group input:focus {
  border-color: var(--verde);
}
.input-group input:focus + label,
.input-group input:valid + label {
  top: -9px;
  left: 35px;
  font-size: 0.7rem;
  color: var(--verde);
  background: var(--negro);
  padding: 0 4px;
  border-radius: 3px;
}

/* BOTÓN DE OJO */
.toggle-password {
  position: absolute;
  right: 5px;
  background: transparent;
  border: none;
  color: #aaa;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 20px;
  transition: color 0.2s ease;
}
.toggle-password:hover {
  color: var(--verde);
}

/* BOTÓN LOGIN */
.btn-login {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--verde), var(--verde-oscuro));
  border: none;
  border-radius: 30px;
  color: #fff;
  font-weight: 600;
  transition: transform 0.3s, box-shadow 0.3s;
}
.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,156,88,0.4);
}

/* ERROR */
.error-message {
  background: rgba(255,0,0,0.1);
  border: 1px solid rgba(255,0,0,0.2);
  color: #ff7777;
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 15px;
}

/* FOOTER */
.footer-text {
  font-size: 0.8rem;
  color: #888;
  margin-top: 25px;
}

/* RESPONSIVO */
@media (max-width: 900px) {
  .login-container {
    flex-direction: column;
  }
  .brand-panel {
    width: 100%;
    height: 40vh;
  }
  .form-panel {
    width: 100%;
    height: 60vh;
  }

  .brand-panel {
    display: none;
  }

  .form-panel {
    width: 100%;
    height: 100vh;
    padding: 40px 20px;
  }

  .login-container {
    flex-direction: column;
  }
}
