/* ============================================================
   Login — Split-panel layout
   ============================================================ */

.login-wrapper {
  min-height: calc(100vh - 80px);
  /* Anular el padding de #Contenedor-Dinamico para ir de borde a borde */
  margin-left: -1rem;
  margin-right: -1rem;
  display: flex;
  flex-direction: row;
}

/* ---- Panel izquierdo: marca ---- */
.login-brand {
  flex: 0 0 45%;
  background: linear-gradient(145deg, #1b5e20 0%, #2e7d32 55%, #388e3c 100%);
  /*
   * Cuando tengas tu imagen, añade aquí:
   *   background-image: url('/images/tu-foto.jpg');
   *   background-size: cover;
   *   background-position: center;
   */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 3rem 2.5rem;
}

.login-brand-content {
  text-align: center;
  position: relative;
  z-index: 2;
}

.login-brand-logo {
  width: 110px;
  height: auto;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.3));
  animation: float 5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

.login-brand-name {
  font-size: 2.1rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.login-brand-tagline {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.65;
  max-width: 260px;
  margin: 0 auto;
}

/* Círculos decorativos de fondo */
.login-deco {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  pointer-events: none;
}

.login-deco-1 {
  width: 380px;
  height: 380px;
  bottom: -110px;
  right: -110px;
}

.login-deco-2 {
  width: 220px;
  height: 220px;
  top: -70px;
  left: -70px;
}

.login-deco-3 {
  width: 120px;
  height: 120px;
  top: 42%;
  right: 12%;
  background: rgba(255, 255, 255, 0.05);
}

/* ---- Panel derecho: formulario ---- */
.login-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  background: var(--color-bg);
}

.login-card {
  background: var(--color-card);
  padding: 2.5rem 2.25rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  width: 100%;
  max-width: 380px;
  animation: slideUp 0.45s ease;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.login-card-header {
  margin-bottom: 1.75rem;
}

.login-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 0.3rem;
}

.login-subtitle {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* Campos */
.login-field {
  margin-bottom: 1.1rem;
}

.login-field label {
  display: block;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.4rem;
}

.login-card input[type="text"],
.login-card input[type="password"] {
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  padding: 0.75rem 0.9rem;
  width: 100%;
  font-family: var(--font-base);
  font-size: 0.95rem;
  background: var(--color-bg);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.login-card input:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(56, 142, 60, 0.15);
  background: #fff;
}

/* Botón */
.login-submit {
  width: 100%;
  padding: 0.85rem;
  background: var(--color-primary);
  border: none;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-base);
  cursor: pointer;
  margin-top: 0.5rem;
  letter-spacing: 0.01em;
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.login-submit:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(46, 125, 50, 0.35);
}

.login-submit:active {
  transform: translateY(0);
}

/* Mensaje de error inline */
.login-error-msg {
  display: none;
  background: #fef2f2;
  border-left: 3px solid #ef4444;
  color: #b91c1c;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.login-error-msg.visible {
  display: block;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .login-wrapper {
    flex-direction: column;
  }

  .login-brand {
    flex: 0 0 auto;
    padding: 2.5rem 1.5rem 3rem;
  }

  .login-brand-logo {
    width: 80px;
    margin-bottom: 1rem;
  }

  .login-brand-name {
    font-size: 1.6rem;
  }

  .login-brand-tagline {
    font-size: 0.875rem;
  }

  .login-form-panel {
    padding: 2rem 1.25rem 2.5rem;
  }

  .login-card {
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 1.5rem 0.5rem;
  }
}
