*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f0f2f5;
}

body.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-wrapper {
  display: flex;
  width: 900px;
  max-width: 98vw;
  min-height: 520px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.13);
}

/* Panel imagen izquierdo */
.login-image-panel {
  flex: 1;
  overflow: hidden;
  min-height: 400px;
}
.login-image-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Panel formulario derecho */
.login-form-panel {
  width: 420px;
  min-width: 320px;
  padding: 50px 44px;
  display: flex;
  align-items: center;
}
.login-form-inner { width: 100%; }

.login-logo-wrap {
  text-align: center;
  margin-bottom: 28px;
  padding-bottom: 22px;
  position: relative;
}
.login-logo-wrap::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, #0d6efd 0%, #0dcaf0 100%);
}
.login-logo {
  height: 104px;
  width: auto;
  max-width: 100%;
  display: inline-block;
  margin: 0 auto;
}

.login-form-inner h2 {
  font-size: 1.5rem;
  color: #0d253f;
  margin-bottom: 8px;
  font-weight: 700;
}

.login-subtitle {
  font-size: 0.88rem;
  color: #666;
  margin-bottom: 28px;
  line-height: 1.5;
}
.login-subtitle a { color: #0d6efd; }

/* Formulario */
.login-form-inner label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #344054;
  margin-bottom: 6px;
}

.login-form-inner .form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #d0d5dd;
  border-radius: 8px;
  font-size: 0.97rem;
  color: #101828;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.login-form-inner .form-control:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13,110,253,0.12);
}

.login-form-inner .mb-3 { margin-bottom: 18px; }

.btn-login {
  width: 100%;
  padding: 13px;
  background: #0d253f;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
  transition: background 0.2s;
}
.btn-login:hover { background: #0d6efd; }

.login-forgotten {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 0.87rem;
  color: #0d6efd;
  text-decoration: none;
}
.login-forgotten:hover { text-decoration: underline; }

.login-get-credentials {
  display: block;
  text-align: center;
  margin-top: 8px;
  font-size: 0.87rem;
  color: #0d6efd;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  padding-right: 14px;
}
.login-get-credentials::after {
  content: "▾";
  position: absolute;
  right: 38%;
  transition: transform 0.25s;
  display: inline-block;
}
.login-get-credentials.active::after { transform: rotate(180deg); }
.login-get-credentials:hover { text-decoration: underline; }

.credentials-info {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.25s ease, margin-top 0.25s ease;
  background: #eaf4ff;
  border-left: 3px solid #0dcaf0;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #344054;
  line-height: 1.5;
}
.credentials-info.open {
  max-height: 200px;
  opacity: 1;
  margin-top: 12px;
  padding: 12px 14px;
}
.credentials-info a {
  color: #0d6efd;
  text-decoration: none;
  font-weight: 600;
}
.credentials-info a:hover { text-decoration: underline; }

.alert-danger {
  background: #fff2f2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  padding: 10px 14px;
  border-radius: 7px;
  font-size: 0.88rem;
  margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 680px) {
  .login-image-panel { display: none; }
  .login-form-panel { width: 100%; padding: 36px 24px; }
}