/**
 * Login Bento — hero band + overlapping card (scoped)
 */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

.auth-login-bento {
  --auth-indigo: #4f46e5;
  --auth-indigo-mid: #6366f1;
  --auth-indigo-soft: #818cf8;
  --auth-violet: #7c3aed;
  --auth-slate: #0f172a;
  --auth-muted: #64748b;
  --auth-input-bg: #f1f5f9;
  --auth-card: #ffffff;
  --auth-page-bg: #e8eef7;
  --auth-radius-card: 32px;
  --auth-radius-pill: 9999px;
  --auth-shell-width: 420px;
  --auth-transition: 200ms cubic-bezier(0.16, 1, 0.3, 1);

  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--auth-page-bg);
  position: relative;
  overflow-x: hidden;
  padding: 1.5rem 1rem 2rem;
}

/* Soft page texture */
.auth-login-bento::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 85% 60%, rgba(124, 58, 237, 0.05) 0%, transparent 35%);
  pointer-events: none;
  z-index: 0;
}

/* Satu kolom: hero + card sama lebar (tidak full viewport) */
.auth-login-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--auth-shell-width);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* ===== Hero ===== */
.auth-login-hero {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 100%;
  min-height: 200px;
  background: linear-gradient(145deg, #4f46e5 0%, #6366f1 45%, #7c3aed 100%);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2.25rem 1.5rem 4.25rem;
  overflow: hidden;
  border-radius: var(--auth-radius-card) var(--auth-radius-card) 0 0;
  box-shadow: 0 20px 40px -16px rgba(79, 70, 229, 0.35);
}

.auth-login-hero-shape {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.auth-login-hero-shape--left {
  width: 220px;
  height: 220px;
  left: -18%;
  bottom: -40%;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.55) 0%, rgba(245, 158, 11, 0.35) 100%);
  opacity: 0.9;
}

.auth-login-hero-shape--right {
  width: 190px;
  height: 190px;
  right: -14%;
  bottom: -42%;
  background: linear-gradient(160deg, rgba(52, 211, 153, 0.5) 0%, rgba(16, 185, 129, 0.35) 100%);
  opacity: 0.85;
}

.auth-login-hero-shape--soft {
  width: 120px;
  height: 120px;
  top: -30px;
  right: 16%;
  background: rgba(255, 255, 255, 0.08);
  filter: blur(2px);
}

.auth-login-hero-title {
  position: relative;
  z-index: 2;
  margin: 0;
  padding-top: 0.35rem;
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: #ffffff;
  text-align: center;
  text-shadow: 0 2px 16px rgba(15, 23, 42, 0.15);
}

.auth-login-hero-sub {
  position: relative;
  z-index: 2;
  margin: 0.4rem 0 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
}

/* ===== Body + overlapping card ===== */
.auth-login-body {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-top: -2.75rem;
  padding: 0;
}

.auth-login-card {
  width: 100%;
  max-width: none;
  background: var(--auth-card);
  border-radius: var(--auth-radius-card);
  box-shadow:
    0 25px 50px -12px rgba(15, 23, 42, 0.18),
    0 8px 20px -6px rgba(79, 70, 229, 0.12);
  padding: 2rem 1.75rem 1.75rem;
  /* Tanpa transform/opacity animasi: keduanya sering memblokir popup riwayat autofill browser */
  overflow: visible;
}

.auth-login-form,
.auth-login-field,
.auth-login-input-wrap,
.auth-login-actions {
  overflow: visible;
}

.auth-login-input:-webkit-autofill,
.auth-login-input:-webkit-autofill:hover,
.auth-login-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--auth-slate);
  transition: background-color 99999s ease-in-out 0s;
  box-shadow: 0 0 0 1000px #eef2ff inset;
  border-color: var(--auth-indigo-soft);
}

.auth-login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 1.5rem;
}

.auth-login-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.2);
  overflow: hidden;
}

.auth-login-brand-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  mix-blend-mode: lighten;
}

.auth-login-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.auth-login-brand-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--auth-slate);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.auth-login-brand-sub {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--auth-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Alert */
.auth-login-alert {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.auth-login-alert .btn-close {
  padding: 0.35rem;
  font-size: 0.7rem;
}

/* Form fields */
.auth-login-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.auth-login-inputs {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
}

.auth-login-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.auth-login-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--auth-muted);
  letter-spacing: 0.02em;
  padding-left: 0.35rem;
}

.auth-login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-login-input {
  width: 100%;
  border: 1.5px solid transparent;
  background: var(--auth-input-bg);
  border-radius: var(--auth-radius-pill);
  padding: 0.85rem 1.15rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--auth-slate);
  font-family: inherit;
  outline: none;
  transition: border-color var(--auth-transition), box-shadow var(--auth-transition), background var(--auth-transition);
}

.auth-login-input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.auth-login-input:hover {
  background: #e8eef5;
}

.auth-login-input:focus {
  border-color: var(--auth-indigo-soft);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.auth-login-input--password {
  padding-right: 3rem;
}

.auth-login-toggle {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--auth-muted);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color var(--auth-transition), background var(--auth-transition);
}

.auth-login-toggle:hover {
  color: var(--auth-indigo);
  background: rgba(99, 102, 241, 0.08);
}

.auth-login-toggle:focus-visible {
  outline: 2px solid var(--auth-indigo);
  outline-offset: 2px;
}

.auth-login-toggle i {
  font-size: 1.25rem;
}

/* CTA */
.auth-login-submit {
  margin-top: 0.5rem;
  width: 100%;
  border: none;
  border-radius: var(--auth-radius-pill);
  padding: 0.95rem 1.25rem;
  background: var(--auth-slate);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background var(--auth-transition), transform var(--auth-transition), box-shadow var(--auth-transition);
  box-shadow: 0 8px 20px -6px rgba(15, 23, 42, 0.35);
}

.auth-login-submit:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -8px rgba(79, 70, 229, 0.35);
}

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

.auth-login-submit:focus-visible {
  outline: 2px solid var(--auth-indigo);
  outline-offset: 3px;
}

.auth-login-loading {
  margin-top: 0.5rem;
  width: 100%;
}

.auth-login-loading .auth-login-submit--loading {
  width: 100%;
  margin-top: 0;
}

/* Footer */
.auth-login-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--auth-muted);
}

/* Hide legacy auth chrome if still loaded */
.auth-login-bento ~ .layout-overlay,
body:has(.auth-login-bento) .layout-navbar,
body:has(.auth-login-bento) .layout-menu {
  display: none !important;
}

@media (max-width: 575.98px) {
  .auth-login-bento {
    padding: 1rem 0.85rem 1.5rem;
    justify-content: flex-start;
    padding-top: 1.25rem;
  }

  .auth-login-hero {
    min-height: 170px;
    padding: 1.75rem 1.15rem 3.5rem;
    border-radius: 28px 28px 0 0;
  }

  .auth-login-body {
    margin-top: -2.25rem;
  }

  .auth-login-card {
    padding: 1.5rem 1.25rem 1.35rem;
    border-radius: 28px;
  }

  .auth-login-input {
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-login-card {
    animation: none;
  }

  .auth-login-submit,
  .auth-login-input,
  .auth-login-toggle {
    transition: none;
  }

  .auth-login-submit:hover {
    transform: none;
  }
}
