/* ==========================================================================
   HRIS LPIT Thariq Bin Ziyad — Login & Splash
   Sumber desain: docs/lpit-hris-clean/{tokens.css,login.html,splash.html}

   Halaman login TIDAK memuat plugins.bundle.css / style.bundle.css.
   Jangan pakai class Bootstrap/Metronic di login.blade.php — CSS-nya tidak ada.
   Semua class di sini diprefiks `auth-` supaya tidak bentrok dengan Bootstrap
   JS yang masih ikut termuat lewat plugins.bundle.js.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Font
   Plus Jakarta Sans variable: satu file per subset melayani weight 200–800.
   Path relatif terhadap file CSS ini: /assets/css/ + ../fonts/ = /assets/fonts/
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/plus-jakarta-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/plus-jakarta-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/plus-jakarta-sans-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169,
    U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309,
    U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/plus-jakarta-sans-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F,
    U+FE2E-FE2F;
}

/* font-display: block, bukan swap. Ikon di sini dipakai lewat ligatur, jadi
   dengan swap teksnya sempat terbaca harfiah ("person", "lock") sampai font
   tiba. block menahannya tetap tak terlihat dulu, lalu muncul utuh. */
@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('../fonts/material-symbols-outlined.woff2') format('woff2');
}

/* --------------------------------------------------------------------------
   2. Token
   -------------------------------------------------------------------------- */

:root {
  /* Brand */
  --auth-orange: #ff8a00;
  --auth-yellow: #ffcb03;
  --auth-green: #0f8f01;
  --auth-green-dark: #0b7001;
  --auth-green-soft: #eaf6e7;

  /* Teks */
  --auth-ink: #151c27;
  --auth-ink-soft: #525a66;
  --auth-ink-mute: #8891a0;

  /* Permukaan */
  --auth-canvas: #f7f8fa;
  --auth-surface: #ffffff;
  --auth-porcelain: #f6f7f9;
  --auth-line: #e2e5ea;

  /* Status — TIDAK ada di palet referensi; ditambahkan untuk region error
     inline yang menggantikan SweetAlert2 (lihat .auth-alert). */
  --auth-danger: #d92d20;
  --auth-danger-soft: #fef3f2;

  /* Radius */
  --auth-radius-card: 22px;
  --auth-radius-field: 12px;
  --auth-radius-pill: 999px;

  /* Bayangan */
  --auth-shadow-card: 0 28px 70px -24px rgba(21, 28, 39, 0.3);

  /* Tipografi */
  --auth-font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

/* --------------------------------------------------------------------------
   3. Reset & base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: var(--auth-font-sans);
  color: var(--auth-ink);
  -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   4. Halaman: canvas + dua glow radial + pola titik
   -------------------------------------------------------------------------- */

.auth-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 24px;
  background-color: var(--auth-canvas);
  background-image:
    radial-gradient(circle at 14% 16%, rgba(255, 138, 0, 0.1), transparent 40%),
    radial-gradient(circle at 86% 84%, rgba(15, 143, 1, 0.12), transparent 42%);
}

.auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.5;
  pointer-events: none;
  background-image: radial-gradient(rgba(15, 143, 1, 0.1) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* --------------------------------------------------------------------------
   5. Ikon
   -------------------------------------------------------------------------- */

.auth-icon {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

/* --------------------------------------------------------------------------
   6. Kartu
   -------------------------------------------------------------------------- */

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: var(--auth-surface);
  border: 1px solid var(--auth-line);
  border-radius: var(--auth-radius-card);
  box-shadow: var(--auth-shadow-card);
  overflow: hidden;
}

.auth-card__accent {
  height: 8px;
  width: 100%;
  background: linear-gradient(
    to right,
    var(--auth-orange) 0%,
    var(--auth-yellow) 50%,
    var(--auth-green) 100%
  );
}

.auth-card__body {
  padding: 36px 40px;
}

/* --------------------------------------------------------------------------
   7. Brand
   -------------------------------------------------------------------------- */

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 28px;
}

.auth-brand__logo {
  height: 48px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  margin-bottom: 24px;
}

.auth-brand__title {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.auth-brand__subtitle {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--auth-green);
}

/* --------------------------------------------------------------------------
   8. Alert error inline
   Menggantikan SweetAlert2: CSS Swal hanya ada di plugins.bundle.css, yang
   sengaja tidak dimuat di halaman ini.
   -------------------------------------------------------------------------- */

.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  padding: 12px 14px;
  border-radius: var(--auth-radius-field);
  background: var(--auth-danger-soft);
  border: 1px solid rgba(217, 45, 32, 0.2);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--auth-ink);
}

.auth-alert[hidden] {
  display: none;
}

.auth-alert__icon {
  flex-shrink: 0;
  font-size: 20px;
  color: var(--auth-danger);
}

/* --------------------------------------------------------------------------
   9. Form
   -------------------------------------------------------------------------- */

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-field__label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--auth-ink-soft);
}

/* Pembungkus input + ikon kiri (+ tombol mata di kanan). */
.auth-field__control {
  position: relative;
}

.auth-field__input {
  width: 100%;
  padding: 12px 16px 12px 44px; /* ruang kiri untuk ikon */
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--auth-ink);
  background: var(--auth-porcelain);
  border: 1px solid var(--auth-line);
  border-radius: var(--auth-radius-field);
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

/* Varian password: sisakan ruang kanan untuk tombol mata. */
.auth-field__input--with-toggle {
  padding-right: 44px;
}

.auth-field__input::placeholder {
  color: var(--auth-ink-mute);
}

.auth-field__input:focus {
  outline: none;
  background: var(--auth-surface);
  border-color: var(--auth-green);
  box-shadow: 0 0 0 3px rgba(15, 143, 1, 0.2);
}

.auth-field__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: rgba(82, 90, 102, 0.6);
  pointer-events: none;
}

.auth-field__toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: rgba(82, 90, 102, 0.55);
  background: none;
  border: 0;
  cursor: pointer;
  transition: color 0.15s;
}

.auth-field__toggle:hover {
  color: var(--auth-ink-soft);
}

.auth-field__toggle:focus-visible {
  outline: 2px solid var(--auth-green);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   10. FormValidation
   KOMPAT — nama class di-emit oleh plugin FormValidation.plugins.Bootstrap5,
   tidak bisa di-rename. Bootstrap sendiri (yang biasanya menata .invalid-feedback)
   ada di style.bundle.css yang tidak dimuat di sini, jadi kita tata sendiri.
   Jangan hapus: tanpa ini pesan validasi jadi teks hitam tanpa gaya.
   -------------------------------------------------------------------------- */

.fv-plugins-message-container {
  margin-top: 6px;
}

.fv-plugins-message-container > div {
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--auth-danger);
}

/* --------------------------------------------------------------------------
   11. Tombol utama
   KOMPAT — .indicator-label / .indicator-progress / [data-kt-indicator] adalah
   konvensi Metronic. CSS aslinya ada di style.bundle.css yang tidak dimuat,
   jadi dideklarasikan ulang di sini. Jangan hapus: tanpa ini kedua span
   tampil bersamaan dan state loading tombol rusak.
   -------------------------------------------------------------------------- */

.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.025em;
  color: #fff;
  background: var(--auth-green);
  border: 0;
  border-radius: var(--auth-radius-field);
  cursor: pointer;
  transition: background-color 0.15s;
}

.auth-btn:hover {
  background: var(--auth-green-dark);
}

.auth-btn:focus-visible {
  outline: 2px solid var(--auth-green-dark);
  outline-offset: 3px;
}

.auth-btn:disabled {
  cursor: default;
  opacity: 0.85;
}

.auth-btn .auth-icon {
  font-size: 19px;
}

.auth-btn .indicator-label,
.auth-btn .indicator-progress {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.auth-btn .indicator-progress {
  display: none;
}

.auth-btn[data-kt-indicator='on'] > .indicator-label {
  display: none;
}

.auth-btn[data-kt-indicator='on'] > .indicator-progress {
  display: inline-flex;
}

/* --------------------------------------------------------------------------
   12. Spinner
   Pengganti .spinner-border milik Bootstrap (ikut terlepas bersama
   style.bundle.css).
   -------------------------------------------------------------------------- */

.auth-spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-right-color: #fff;
  border-radius: 50%;
  animation: auth-spinner 0.75s linear infinite;
}

@keyframes auth-spinner {
  to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   13. Link, bantuan, footer
   -------------------------------------------------------------------------- */

.auth-link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--auth-green);
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-help {
  margin-top: 24px;
  font-size: 13px;
  text-align: center;
  color: var(--auth-ink-soft);
}

.auth-footer {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--auth-ink-soft);
  white-space: nowrap;
}

.auth-footer .auth-icon {
  font-size: 16px;
}

/* --------------------------------------------------------------------------
   14. Splash overlay — desain "Opsi B"
   Sumber: docs/lpit-hris-clean/Splash LPIT HRIS - Opsi B (standalone).html
   Menutup layar sejak paint pertama, lalu memudar begitu sistem siap dan
   menampilkan form login di baliknya.

   Beda dari halaman login: tanpa kartu, latar putih polos, pita gradien di
   tepi kiri, dan tiga titik berdenyut sebagai indikator. Sengaja TIDAK memakai
   ikon Material Symbols sama sekali, jadi tidak ada risiko ligatur sempat
   terbaca sebagai teks di paint pertama.
   -------------------------------------------------------------------------- */

.auth-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  overflow: hidden; /* menahan .auth-splash__glow yang sengaja meluber ke luar */
  background: #fff;
  opacity: 1;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  /* Jaring pengaman tanpa JS. Yang melepas splash normalnya adalah JS, tapi JS
     itu ada di balik plugins.bundle.js (3,4 MB) — kalau bundle-nya gagal dimuat
     splash akan menutupi login selamanya. Animasi ini memudarkannya sendiri di
     detik ke-6 tanpa bergantung pada JS sama sekali. */
  animation: auth-splash-fallback 0.4s ease 6s forwards;
}

@keyframes auth-splash-fallback {
  to { opacity: 0; visibility: hidden; }
}

/* visibility ikut ditransisikan supaya setelah memudar overlay benar-benar
   lepas dari a11y tree dan tidak lagi menangkap klik — tanpa perlu menunggu
   transitionend di JS.
   animation:none membatalkan jaring pengaman di atas: kalau JS sehat, dialah
   yang menentukan waktunya, dan properti animasi kalau dibiarkan akan menang
   atas opacity milik class ini. */
.auth-splash.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  animation: none;
}

/* ---- Dekorasi latar ---- */

/* Pita gradien vertikal di tepi kiri. */
.auth-splash__side {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 14px;
  background: linear-gradient(
    to bottom,
    var(--auth-orange),
    var(--auth-yellow) 50%,
    var(--auth-green)
  );
}

.auth-splash__glow {
  position: absolute;
  width: 60vw;
  max-width: 640px;
  aspect-ratio: 1;
  border-radius: 50%;
  top: -24vw;
  right: -18vw;
  background: radial-gradient(circle, rgba(15, 143, 1, 0.1), transparent 65%);
}

.auth-splash__glow--2 {
  width: 52vw;
  max-width: 560px;
  top: auto;
  right: auto;
  bottom: -22vw;
  left: -14vw;
  background: radial-gradient(circle, rgba(255, 138, 0, 0.09), transparent 65%);
}

/* ---- Isi ---- */

/* z-index 2 di seluruh isi: mengangkatnya di atas .auth-splash__glow. */
.auth-splash__logo {
  position: relative;
  z-index: 2;
  height: 92px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  margin-bottom: 34px;
  animation: auth-fade-up 0.8s ease both;
}

.auth-splash__title {
  position: relative;
  z-index: 2;
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.auth-splash__subtitle {
  position: relative;
  z-index: 2;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--auth-green);
}

@keyframes auth-fade-up {
  0%   { opacity: 0; transform: translateY(14px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ---- Tiga titik berdenyut (indikator "sedang menyiapkan") ---- */

.auth-splash__dots {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 10px;
  margin-top: 36px;
}

.auth-splash__dots i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--auth-green);
}

.auth-splash__dots i:nth-child(1) {
  animation: auth-pulse 1.4s ease-in-out infinite;
}

.auth-splash__dots i:nth-child(2) {
  background: var(--auth-orange);
  animation: auth-pulse 1.4s ease-in-out 0.2s infinite;
}

.auth-splash__dots i:nth-child(3) {
  background: var(--auth-yellow);
  animation: auth-pulse 1.4s ease-in-out 0.4s infinite;
}

@keyframes auth-pulse {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50%      { opacity: 0.9;  transform: scale(1.5); }
}

/* ---- Footer ---- */

.auth-splash__footer {
  position: absolute;
  bottom: 26px;
  left: 0;
  right: 0;
  z-index: 2;
}

.auth-splash__school {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--auth-ink-soft);
}

.auth-splash__copyright {
  margin-top: 6px;
  font-size: 11px;
  color: var(--auth-ink-mute);
}

/* --------------------------------------------------------------------------
   15. Mobile
   Referensi hanya menggarap desktop; di layar pendek footer absolut bisa
   menimpa kartu, jadi dijadikan aliran normal.
   -------------------------------------------------------------------------- */

@media (max-width: 480px) {
  .auth-page {
    justify-content: flex-start;
    padding: 24px 16px 16px;
  }

  .auth-card__body {
    padding: 28px 22px;
  }

  .auth-brand__title {
    font-size: 22px;
  }

  .auth-footer {
    position: static;
    transform: none;
    margin-top: 24px;
    text-align: center;
    white-space: normal;
  }

  /* Judul splash sudah responsif sendiri lewat clamp(); yang perlu diturunkan
     cuma logo, karena 92px terlalu dominan di layar kecil. */
  .auth-splash__logo {
    height: 68px;
    margin-bottom: 26px;
  }
}

/* --------------------------------------------------------------------------
   16. Aksesibilitas: hormati preferensi pengguna yang mematikan animasi.
   Catatan: durasi setTimeout redirect splash dipangkas terpisah di JS —
   CSS tidak bisa menyentuhnya.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   17. Alert sukses
   Varian hijau dari .auth-alert untuk halaman lupa/reset password.
   -------------------------------------------------------------------------- */

.auth-alert--success {
  background: var(--auth-green-soft);
  border-color: rgba(15, 143, 1, 0.25);
}

.auth-alert--success .auth-alert__icon {
  color: var(--auth-green);
}

/* --------------------------------------------------------------------------
   18. Pemisah "atau" antar metode masuk
   -------------------------------------------------------------------------- */

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--auth-ink-mute);
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--auth-line);
}

/* --------------------------------------------------------------------------
   19. Tombol Google
   Outline putih di atas .auth-btn; logo Google adalah SVG inline sehingga
   tidak bergantung pada font ikon.
   -------------------------------------------------------------------------- */

.auth-btn--google {
  gap: 10px;
  color: var(--auth-ink);
  background: var(--auth-surface);
  border: 1px solid var(--auth-line);
  text-decoration: none;
}

.auth-btn--google:hover {
  background: var(--auth-porcelain);
}

.auth-btn--google:focus-visible {
  outline: 2px solid var(--auth-green);
  outline-offset: 3px;
}

.auth-btn--google svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
