/* ===== AUTH / LOGIN ===== */
.login-page {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, .18), transparent 30%),
    radial-gradient(circle at bottom right, rgba(34, 197, 94, .10), transparent 25%),
    linear-gradient(180deg, var(--dsm-panel) 0%, #0b1220 100%);
}

.login-shell {
  width: 100%;
  max-width: 1120px;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 28px;
  align-items: stretch;
}

.login-hero,
.login-card {
  border: 1px solid var(--dsm-border);
  border-radius: 24px;
  background: rgba(2, 6, 23, .82);
  backdrop-filter: blur(12px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}

/* ===== COLUMNA IZQUIERDA ===== */
.login-hero {
  padding: 36px;
  color: var(--dsm-text);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}

.login-hero::after {
  content: "";
  position: absolute;
  inset: auto -80px -80px auto;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(37, 99, 235, .25), transparent 65%);
  pointer-events: none;
}

.login-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(34, 197, 94, .10);
  border: 1px solid rgba(34, 197, 94, .18);
  color: #86efac;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.login-hero__brand {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
}

.login-hero__logo {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 28px;
  color: #fff;
  background: linear-gradient(135deg, var(--dsm-primary), #1d4ed8);
  box-shadow: 0 16px 28px rgba(37, 99, 235, .28);
}

.login-hero__title {
  margin: 0 0 8px;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.05;
  font-weight: 800;
  color: #fff;
}

.login-hero__subtitle {
  margin: 0;
  max-width: 520px;
  color: var(--dsm-muted);
  font-size: 15px;
  line-height: 1.7;
}

.login-hero__features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.login-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(15, 23, 42, .72);
  border: 1px solid rgba(148, 163, 184, .14);
  color: var(--dsm-text);
}

.login-feature i {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #93c5fd;
  background: rgba(37, 99, 235, .14);
}

/* ===== CARD LOGIN ===== */
.login-card {
  padding: 34px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--dsm-text);
}

.login-card__header {
  text-align: center;
  margin-bottom: 26px;
}

.login-card__icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 14px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--dsm-primary), #1d4ed8);
  box-shadow: 0 16px 28px rgba(37, 99, 235, .24);
}

.login-card__title {
  margin: 0 0 6px;
  color: #fff;
  font-size: 28px;
  font-weight: 700;
}

.login-card__text {
  margin: 0;
  color: var(--dsm-muted);
  font-size: 14px;
}

/* ===== FORM ===== */
.login-form {
  margin-top: 6px;
}

.login-field + .login-field {
  margin-top: 16px;
}

.login-label {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--dsm-muted);
  font-size: 13px;
  font-weight: 600;
}

.login-input-wrap {
  position: relative;
}

.login-input-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: var(--dsm-muted);
  font-size: 14px;
  pointer-events: none;
  z-index: 2;
}

.login-input {
  min-height: 50px;
  padding-left: 42px;
  border-radius: 14px;
  background: rgba(15, 23, 42, .75);
  border: 1px solid rgba(148, 163, 184, .22);
  color: var(--dsm-text);
}

.login-input::placeholder {
  color: #64748b;
}

.login-input:focus {
  background: rgba(15, 23, 42, .95);
  border-color: rgba(37, 99, 235, .6);
  box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .18);
  color: var(--dsm-text);
}

.login-options {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.login-options--end {
  justify-content: flex-end;
}

.login-link {
  color: #93c5fd;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.login-link:hover {
  color: #bfdbfe;
  text-decoration: underline;
}

.login-submit {
  min-height: 50px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .2px;
  background: linear-gradient(135deg, var(--dsm-primary), #1d4ed8);
  box-shadow: 0 14px 24px rgba(37, 99, 235, .24);
}

.login-submit:hover {
  background: linear-gradient(135deg, #1d4ed8, var(--dsm-primary));
  transform: translateY(-1px);
}

/* ===== DEVise errors ===== */
#error_explanation {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(239, 68, 68, .10);
  border: 1px solid rgba(239, 68, 68, .22);
  color: #fecaca;
}

#error_explanation h2 {
  font-size: 14px;
  margin: 0 0 8px;
  color: #fff;
}

#error_explanation ul {
  margin: 0;
  padding-left: 18px;
}

.field_with_errors .login-input,
.field_with_errors .form-control {
  border-color: rgba(239, 68, 68, .55);
  box-shadow: 0 0 0 .12rem rgba(239, 68, 68, .12);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991.98px) {
  .login-shell {
    grid-template-columns: 1fr;
    max-width: 620px;
  }

  .login-hero {
    padding: 28px;
  }

  .login-hero__features {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 575.98px) {
  .login-page {
    padding: 16px;
  }

  .login-hero,
  .login-card {
    border-radius: 20px;
  }

  .login-hero,
  .login-card {
    padding: 22px 18px;
  }

  .login-hero__brand {
    flex-direction: column;
  }

  .login-hero__features {
    grid-template-columns: 1fr;
  }

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

  .login-card__title {
    font-size: 24px;
  }
}