/* Halaman login (Admin & Portal Pegawai): panel visual di kiri, form di kanan.
   Dimuat SETELAH style.css. Panel kiri disembunyikan di layar < 992px. */
/* Warna mengikuti token aplikasi (style.css): panel gelap = warna sidebar dashboard,
   tombol & tautan = biru utama, supaya login dan dashboard satu tema. */
:root {
  --auth-deep: var(--ems-sidebar-bg, #111827);
  --auth-teal: var(--ems-primary, #2563EB);
  --auth-teal-hover: var(--ems-primary-dark, #1D4ED8);
  --auth-ink: #101828;
  --auth-muted: #667085;
  --auth-border: #D0D5DD;
}

body.auth-body { margin: 0; background: #F2F4F7; min-height: 100vh; }

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  gap: 24px;
}

/* ---- Panel visual ---- */
.auth-visual {
  flex: 1 1 52%;
  max-width: 760px;
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  color: #FFFFFF;
  padding: 36px 40px;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(120% 80% at 85% 10%, rgba(37, 99, 235, .35), transparent 60%),
    radial-gradient(90% 70% at 10% 95%, rgba(96, 165, 250, .18), transparent 60%),
    linear-gradient(160deg, #1F2937 0%, var(--auth-deep) 55%, #0B1120 100%);
}
/* Foto sendiri (opsional): letakkan di public/img/login-bg.jpg lalu tambahkan class has-photo */
.auth-visual.has-photo {
  background:
    linear-gradient(180deg, rgba(17, 24, 39, .25) 0%, rgba(17, 24, 39, .88) 100%),
    url("/public/img/login-bg.jpg") center / cover no-repeat;
}
.auth-visual .auth-waves { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; pointer-events: none; }
.auth-visual > * { position: relative; }
.auth-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.125rem; letter-spacing: .01em; }
.auth-logo-mark {
  width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--auth-teal); color: #FFFFFF; font-size: 1.15rem;
}
.auth-logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.auth-logo-text small { font-size: .75rem; font-weight: 500; opacity: .8; letter-spacing: 0; }
.auth-headline { font-size: clamp(2rem, 3.4vw, 3rem); font-weight: 700; line-height: 1.08; letter-spacing: -.02em; margin: 0 0 16px; text-transform: uppercase; }
.auth-lead { font-size: .9375rem; line-height: 1.6; color: rgba(255, 255, 255, .82); max-width: 440px; margin: 0 0 18px; }
.auth-tagline { font-size: .875rem; color: rgba(255, 255, 255, .7); margin: 0; }

/* ---- Panel form ---- */
.auth-panel {
  flex: 1 1 48%;
  max-width: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border-radius: 24px;
  padding: 40px 24px;
  box-sizing: border-box;
}
.auth-form { width: 100%; max-width: 380px; }
.auth-mobile-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--auth-teal); margin-bottom: 28px; }
.auth-mobile-logo .auth-logo-mark { background: var(--auth-teal); color: #FFFFFF; border: 0; }
.auth-title { font-size: 1.75rem; font-weight: 700; letter-spacing: -.01em; color: var(--auth-ink); margin: 0 0 6px; text-transform: uppercase; }
.auth-subtitle { font-size: .875rem; color: var(--auth-muted); margin: 0 0 24px; }
.auth-form .form-label { font-size: .8125rem; font-weight: 600; color: #344054; margin-bottom: 6px; }
.auth-form .form-control {
  height: 44px; border-radius: 10px; border-color: var(--auth-border); font-size: .9375rem;
}
.auth-form .input-group > .form-control { height: 44px; }
.auth-form .input-group > .btn { border-color: var(--auth-border); border-radius: 0 10px 10px 0; }
.auth-form .form-control:focus { border-color: var(--auth-teal); box-shadow: 0 0 0 3px rgba(37, 99, 235, .18); }
.auth-captcha { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.auth-captcha img { height: 44px; border-radius: 10px; border: 1px solid var(--auth-border); background: #FFFFFF; }
.auth-captcha .btn { height: 44px; border-radius: 10px; }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 20px; font-size: .875rem; }
.auth-row .form-check-input:checked { background-color: var(--auth-teal); border-color: var(--auth-teal); }
.auth-link { color: var(--auth-teal); font-weight: 600; text-decoration: none; }
.auth-link:hover { color: var(--auth-teal-hover); text-decoration: underline; }
.btn-auth {
  display: block; width: 100%; min-height: 46px; border: 0; border-radius: 10px;
  background: var(--auth-teal); color: #FFFFFF; font-weight: 600; font-size: .9375rem;
}
.btn-auth:hover, .btn-auth:focus-visible { background: var(--auth-teal-hover); color: #FFFFFF; }
.btn-auth:focus-visible { outline: 3px solid rgba(37, 99, 235, .4); outline-offset: 2px; }
.btn-auth-outline {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 46px;
  border: 1px solid var(--auth-border); border-radius: 10px; background: #FFFFFF; color: #344054; font-weight: 600;
  font-size: .9375rem; text-decoration: none; margin-top: 12px;
}
.btn-auth-outline:hover { background: #F9FAFB; color: #101828; }
.auth-foot { text-align: center; font-size: .875rem; color: var(--auth-muted); margin: 22px 0 0; }

@media (min-width: 992px) {
  .auth-visual { display: flex; }
  .auth-mobile-logo { display: none; }
}
@media (max-width: 575.98px) {
  .auth-shell { padding: 0; }
  .auth-panel { border-radius: 0; padding: 32px 16px; align-items: flex-start; }
}
