:root {
  --rojo: #b10f2e;
  --rojo-oscuro: #861024;
  --dorado: #c6a24a;
  --gris-950: #191c20;
  --gris-700: #4e5864;
  --gris-500: #7a8592;
  --gris-300: #d7dde3;
  --gris-100: #f3f5f7;
  --blanco: #ffffff;
}

* {
  box-sizing: border-box;
}

body.login-page {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--gris-950);
  background:
    linear-gradient(180deg, rgba(248, 246, 242, 0.7) 0%, rgba(241, 244, 246, 0.76) 100%),
    url("/static/images/background.png") center center / cover no-repeat;
  background-attachment: fixed;
}

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-layout {
  width: min(1040px, 100%);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.login-copy {
  padding: 8px 8px 8px 0;
}

.login-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(198, 162, 74, 0.24);
  color: var(--gris-700);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--dorado), var(--rojo));
}

.brand-mark {
  margin: 26px 0 30px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-mark img {
  width: 96px;
  height: auto;
  object-fit: contain;
}

.brand-mark-text {
  min-width: 0;
}

.brand-mark-text strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--rojo);
  text-transform: uppercase;
}

.brand-mark-text span {
  display: block;
  color: var(--gris-700);
  line-height: 1.6;
}

.login-copy h1 {
  margin: 0 0 16px;
  max-width: 15.5ch;
  font-size: clamp(1.78rem, 2.9vw, 3rem);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.login-copy p {
  max-width: 520px;
  margin: 0 0 16px;
  color: var(--gris-700);
  font-size: 1rem;
  line-height: 1.85;
}

.login-copy-note {
  max-width: 520px;
  padding-top: 8px;
  color: var(--gris-500);
  font-size: 0.92rem;
}

.login-card {
  padding: 36px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(215, 221, 227, 0.92);
  box-shadow: 0 22px 56px rgba(37, 42, 48, 0.1);
  backdrop-filter: blur(12px);
}

.login-card h2 {
  margin: 0 0 8px;
  font-size: 1.65rem;
  font-weight: 800;
}

.login-card-subtitle {
  margin: 0 0 24px;
  color: var(--gris-500);
  line-height: 1.7;
}

.status-banner {
  margin-bottom: 18px;
  padding: 13px 15px;
  border-radius: 16px;
  font-size: 0.92rem;
  line-height: 1.6;
}

.status-banner.success {
  color: #1d5b39;
  background: #edf8f1;
  border: 1px solid #cde6d5;
}

.status-banner.error {
  color: var(--rojo-oscuro);
  background: #fff2f4;
  border: 1px solid #f1c8d0;
}

.login-page .form-label {
  margin-bottom: 8px;
  color: var(--gris-700);
  font-size: 0.9rem;
  font-weight: 700;
}

.login-page .form-control {
  height: 54px;
  border-radius: 16px;
  border: 1px solid var(--gris-300);
  padding: 0 16px;
  background: #fcfcfd;
  font-size: 1rem;
}

.login-page .form-control:focus {
  border-color: rgba(177, 15, 46, 0.45);
  box-shadow: 0 0 0 0.25rem rgba(177, 15, 46, 0.1);
  background: var(--blanco);
}

.password-field {
  position: relative;
}

.password-field .form-control {
  padding-right: 52px;
}

.password-field .form-control.is-invalid {
  padding-right: 84px;
  background-position: right 46px center;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gris-500);
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--gris-700);
}

.password-toggle:focus {
  outline: none;
  color: var(--rojo);
}

.field-error {
  margin-top: 8px;
  color: var(--rojo-oscuro);
  font-size: 0.87rem;
  font-weight: 600;
}

.login-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 26px;
}

.login-link {
  color: var(--rojo);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
}

.login-link:hover {
  color: var(--rojo-oscuro);
  text-decoration: underline;
}

.login-button {
  width: 100%;
  height: 56px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--rojo) 0%, var(--rojo-oscuro) 100%);
  color: var(--blanco);
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 16px 28px rgba(134, 16, 36, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 32px rgba(134, 16, 36, 0.26);
}

.login-footer {
  margin-top: 18px;
  color: var(--gris-500);
  font-size: 0.84rem;
  line-height: 1.7;
  text-align: center;
}

@media (max-width: 920px) {
  .login-shell {
    padding: 14px;
  }

  .login-layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .login-copy {
    padding: 0;
  }

  .login-copy h1 {
    max-width: none;
    font-size: 1.98rem;
  }

  .login-card {
    padding: 28px 22px;
  }
}

@media (max-width: 520px) {
  .brand-mark {
    align-items: flex-start;
  }

  .brand-mark img {
    width: 78px;
  }

  .login-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}
