/**
 * Admin login — Acelera Agenda (standalone, aligned with landing tokens)
 */
body.al-login-page {
  margin: 0;
  min-height: 100vh;
  font-family: var(--il-font);
  color: var(--il-text);
  background: var(--il-bg);
  -webkit-font-smoothing: antialiased;
}

.al-login {
  display: grid;
  min-height: 100vh;
}

@media (min-width: 992px) {
  .al-login {
    grid-template-columns: 1fr 1fr;
  }
}

/* —— Brand panel —— */
.al-login__brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.5rem 2rem 3rem;
  overflow: hidden;
  background: var(--il-gradient-soft);
}

.al-login__brand-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.al-login__mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, rgba(59, 130, 246, 0.18), transparent 50%),
    radial-gradient(ellipse 70% 50% at 80% 80%, rgba(124, 58, 237, 0.14), transparent 55%);
}

.al-login__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
}

.al-login__orb--1 {
  width: 280px;
  height: 280px;
  top: -80px;
  right: -60px;
  background: rgba(37, 99, 235, 0.25);
}

.al-login__orb--2 {
  width: 200px;
  height: 200px;
  bottom: 10%;
  left: -40px;
  background: rgba(124, 58, 237, 0.2);
}

.al-login__lines {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  max-width: 420px;
  height: auto;
  opacity: 0.35;
}

.al-login__brand-inner {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

.al-login__logo {
  display: block;
  width: 160px;
  height: auto;
  margin-bottom: 2rem;
}

.al-login__headline {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 0.75rem;
  color: var(--il-text);
}

.al-login__headline span {
  background: var(--il-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.al-login__tagline {
  font-size: 1.05rem;
  color: var(--il-muted);
  line-height: 1.55;
  margin: 0 0 2rem;
  max-width: 36ch;
}

.al-login__mock-wrap {
  margin-top: 1.5rem;
}

@media (max-width: 991.98px) {
  .al-login__brand {
    padding: 2rem 1.5rem 1.5rem;
    text-align: center;
    align-items: center;
  }

  .al-login__brand-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .al-login__logo {
    width: 130px;
    margin-bottom: 1.25rem;
  }

  .al-login__headline {
    font-size: 1.35rem;
  }

  .al-login__tagline {
    font-size: 0.95rem;
    margin-bottom: 0;
    max-width: none;
  }

  .al-login__mock-wrap {
    display: none;
  }
}

/* —— Form panel —— */
.al-login__form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  background: var(--il-bg);
}

.al-login__card {
  width: 100%;
  max-width: 420px;
  padding: 2.25rem 2rem;
  background: var(--il-surface);
  border: 1px solid var(--il-border);
  border-radius: var(--il-radius-lg);
  box-shadow: var(--il-shadow-lg);
  animation: al-fade-in 0.6s ease both;
}

@keyframes al-fade-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.al-login__card-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}

.al-login__card-sub {
  font-size: 0.95rem;
  color: var(--il-muted);
  margin: 0 0 1.75rem;
  line-height: 1.5;
}

/* —— Fields —— */
.al-field {
  margin-bottom: 1.15rem;
}

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

.al-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--il-text);
  background: var(--il-bg-muted);
  border: 1px solid var(--il-border);
  border-radius: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.al-field input::placeholder {
  color: #94a3b8;
}

.al-field input:hover {
  border-color: rgba(37, 99, 235, 0.25);
}

.al-field input:focus {
  outline: none;
  background: #fff;
  border-color: var(--il-accent);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.al-field--error input {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.al-login__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.al-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--il-muted);
  cursor: pointer;
  user-select: none;
}

.al-check input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--il-accent);
  cursor: pointer;
}

.al-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--il-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

.al-link:hover {
  color: var(--il-accent-2);
}

/* —— CTA —— */
.al-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.875rem 1.25rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.al-btn--primary {
  color: #fff;
  background: var(--il-gradient);
  box-shadow: 0 4px 20px var(--il-glow);
}

.al-btn--primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px var(--il-glow);
}

.al-btn--primary:active:not(:disabled) {
  transform: translateY(0);
}

.al-btn--primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.al-btn__spinner {
  width: 1.125rem;
  height: 1.125rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: al-spin 0.7s linear infinite;
  display: none;
}

.al-btn.is-loading .al-btn__spinner {
  display: block;
}

.al-btn.is-loading .al-btn__label {
  opacity: 0.85;
}

@keyframes al-spin {
  to { transform: rotate(360deg); }
}

/* —— Divider & social —— */
.al-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--il-muted);
}

.al-divider::before,
.al-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--il-border);
}

.al-social {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.al-social__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--il-text);
  background: var(--il-bg-muted);
  border: 1px solid var(--il-border);
  border-radius: 12px;
  cursor: not-allowed;
  opacity: 0.65;
}

.al-social__btn svg {
  flex-shrink: 0;
}

.al-social__badge {
  position: absolute;
  top: -6px;
  right: -4px;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  background: var(--il-text);
  color: #fff;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.al-login__footer {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--il-border);
  text-align: center;
  font-size: 0.875rem;
  color: var(--il-muted);
}

.al-login__footer a {
  color: var(--il-accent);
  font-weight: 600;
  text-decoration: none;
}

.al-login__footer a:hover {
  text-decoration: underline;
}

/* —— Toast —— */
.al-toast-region {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  left: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  max-width: 380px;
  margin-left: auto;
}

@media (min-width: 576px) {
  .al-toast-region {
    left: auto;
  }
}

.al-toast {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: #fff;
  border: 1px solid var(--il-border);
  border-radius: 12px;
  box-shadow: var(--il-shadow-lg);
  pointer-events: auto;
  animation: al-toast-in 0.35s ease both;
}

.al-toast--error {
  border-left: 3px solid #ef4444;
}

.al-toast--info {
  border-left: 3px solid var(--il-accent);
}

@keyframes al-toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.al-toast__text {
  flex: 1;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--il-text);
  margin: 0;
}

.al-toast__close {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--il-muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
}

.al-toast__close:hover {
  color: var(--il-text);
  background: var(--il-bg-muted);
}

/* —— Mock variant on login —— */
.il-dashboard-mock--login {
  max-width: 100%;
  animation: al-mock-float 8s ease-in-out infinite;
}

.il-dashboard-mock--login .il-dashboard-mock__frame {
  min-height: 240px;
  transform: rotateY(-2deg) rotateX(1deg) scale(0.92);
  transform-origin: center left;
}

@media (prefers-reduced-motion: reduce) {
  .il-dashboard-mock--login {
    animation: none;
  }
}

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