/* =========================================================
   Login Page v2 - Split Screen Layout
   Inventory & Reservasi APD - ATK
   File ini KHUSUS untuk login.php, terpisah dari style.css utama
   supaya tidak mengganggu halaman lain (dashboard, dll).
   ========================================================= */

html, body.login-body {
  height: 100%;
  margin: 0;
  overflow-x: hidden;
}

.login-split {
  display: flex;
  min-height: 100vh;
}

/* ---------------------------------------------------------
   PANEL KIRI - Branding
   --------------------------------------------------------- */
.login-brand-panel {
  flex: 1 1 52%;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 70px;
  background: linear-gradient(160deg, var(--navy-dark, #0a1f44) 0%, var(--navy-mid, #123a76) 55%, var(--navy-light, #1a56b0) 100%);
  color: #ffffff;
}

/* Mesh gradient dekoratif halus di background panel kiri */
.brand-mesh-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(111, 194, 255, 0.25) 0%, transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 75% 85%, rgba(31, 138, 76, 0.18) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.brand-content {
  position: relative;
  z-index: 2;
  max-width: 480px;
}

/* =========================================================
   DUAL LOGO: AQUA (perusahaan) + JAGO (mascot sistem)
   Ditampilkan berdampingan dengan divider "×" bergaya
   kolaborasi/partnership, lengkap dengan animasi masuk,
   efek idle mengambang halus, glow, dan hover interaktif.
   ========================================================= */
.brand-logos-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 32px;
}

.brand-logo-chip {
  opacity: 0;
  transform: translateY(-14px) scale(0.9);
  animation: logoDropIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.aqua-chip { animation-delay: 0.15s; }
.jago-chip { animation-delay: 0.35s; }

@keyframes logoDropIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Chip AQUA: kotak putih rounded, logo AQUA punya background putih solid
   jadi otomatis menyatu rapi tanpa perlu treatment tambahan */
.aqua-chip {
  background: #ffffff;
  border-radius: 16px;
  padding: 10px 14px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.aqua-chip:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.24);
}
.aqua-logo-img {
  height: 44px;
  width: auto;
  display: block;
}

/* Divider "×" antara kedua logo - gaya partnership/kolaborasi */
.brand-logo-divider {
  color: rgba(255,255,255,0.35);
  font-size: 1rem;
  opacity: 0;
  animation: fadeInSimple 0.5s ease 0.5s forwards;
}
@keyframes fadeInSimple { to { opacity: 1; } }

/* Chip JAGO: lingkaran gelap dengan ring glow cyan berdenyut halus,
   menyesuaikan aksen warna neon di ilustrasi mascot itu sendiri */
.jago-chip {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 2px solid rgba(111, 194, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  backdrop-filter: blur(6px);
  animation: logoDropIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
             jagoGlowPulse 2.6s ease-in-out 0.8s infinite;
  transition: transform 0.25s ease;
}
.jago-chip:hover { transform: scale(1.08) rotate(-4deg); }
.jago-logo-img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  animation: jagoBob 3.2s ease-in-out infinite;
}
@keyframes jagoGlowPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(111, 194, 255, 0.35); border-color: rgba(111, 194, 255, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(111, 194, 255, 0); border-color: rgba(111, 194, 255, 0.8); }
}
@keyframes jagoBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Versi kecil untuk tampilan mobile (di atas form login, layar sempit) */
.brand-logos-row-mobile {
  justify-content: center;
  margin-bottom: 0;
  gap: 12px;
}
.aqua-chip-sm { padding: 6px 10px; border-radius: 12px; }
.aqua-chip-sm .aqua-logo-img { height: 30px; }
.jago-chip-sm { width: 44px; height: 44px; }

.brand-title {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 14px;
  letter-spacing: -0.3px;
}

.brand-subtitle {
  font-size: 1rem;
  color: #cfe0ff;
  min-height: 24px;
  margin-bottom: 36px;
  font-weight: 500;
}
/* Kursor berkedip untuk efek typewriter */
.brand-subtitle::after {
  content: '|';
  animation: blinkCursor 0.9s step-end infinite;
  margin-left: 2px;
}
@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.brand-feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.brand-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
  font-size: 0.92rem;
  color: #dce8fb;
  line-height: 1.5;
  opacity: 0;
  transform: translateX(-16px);
  animation: featureSlideIn 0.5s ease forwards;
  animation-delay: var(--delay, 0s);
}
@keyframes featureSlideIn {
  to { opacity: 1; transform: translateX(0); }
}
.feature-icon {
  width: 38px; height: 38px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  color: #6fc2ff;
}

.brand-footer-note {
  position: relative;
  z-index: 2;
  margin-top: 48px;
  font-size: 0.8rem;
  color: #9fb4d6;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------------------------------------------------------
   PANEL KANAN - Form Login
   --------------------------------------------------------- */
.login-form-panel {
  flex: 1 1 48%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f9fc;
  padding: 40px 24px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.login-card.card-enter-active {
  opacity: 1;
  transform: translateY(0);
}

.login-footer-text {
  text-align: center;
  font-size: 0.76rem;
  color: #9aa7ba;
  margin-top: 28px;
  margin-bottom: 0;
}

/* ---------------------------------------------------------
   Bubble background (dipakai di panel kiri saja)
   --------------------------------------------------------- */
.bubble-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.bubble {
  position: absolute;
  bottom: -60px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.8), rgba(255,255,255,0.04) 70%);
  border-radius: 50%;
  animation-name: floatBubble;
  animation-timing-function: ease-in;
  animation-iteration-count: infinite;
}
@keyframes floatBubble {
  0% { transform: translateY(0) translateX(0) scale(0.8); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translateY(-115vh) translateX(20px) scale(1.1); opacity: 0; }
}

/* ---------------------------------------------------------
   Shake animation saat error login
   --------------------------------------------------------- */
@keyframes shakeError {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}
.shake-error { animation: shakeError 0.45s ease; }

/* ---------------------------------------------------------
   Badge ikon mobile (hanya tampil di layar kecil) + pulse
   --------------------------------------------------------- */
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(26, 86, 176, 0.35); }
  50% { box-shadow: 0 0 0 10px rgba(26, 86, 176, 0); }
}
.login-avatar-badge {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin: 0 auto;
}
.login-badge-pulse { animation: badgePulse 2.4s ease-in-out infinite; }

/* ---------------------------------------------------------
   Input dengan ikon + efek fokus glow
   --------------------------------------------------------- */
.input-icon-group {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 10px;
  transition: box-shadow 0.2s ease;
}
.input-icon-group input.form-control {
  padding: 11px 44px 11px 40px;
  border-radius: 10px;
  border: 1.5px solid #e2e8f2;
}
.input-icon {
  position: absolute;
  left: 13px;
  color: #9aa7ba;
  font-size: 0.95rem;
  pointer-events: none;
  transition: color 0.2s ease;
  z-index: 2;
}
.input-icon-group.input-focused .input-icon { color: var(--navy-light, #1a56b0); }
.input-icon-group.input-focused {
  box-shadow: 0 0 0 3px rgba(26, 86, 176, 0.15);
  border-radius: 10px;
}

.btn-toggle-password {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: #9aa7ba;
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 6px;
  z-index: 2;
}
.btn-toggle-password:hover { color: var(--navy-dark, #0a1f44); }

.caps-lock-warning {
  font-size: 0.76rem;
  color: #f08a24;
  font-weight: 600;
  margin-top: 6px;
}

/* ---------------------------------------------------------
   Tombol login dengan status loading
   --------------------------------------------------------- */
.btn-login {
  position: relative;
  padding: 11px;
  font-weight: 700;
  border-radius: 10px;
  transition: transform 0.15s ease;
}
.btn-login:active { transform: scale(0.98); }
.btn-login:disabled { opacity: 0.85; cursor: not-allowed; }
.btn-login-spinner { display: inline-flex; align-items: center; gap: 6px; }

/* ---------------------------------------------------------
   Responsive - sembunyikan panel branding di layar kecil,
   form login jadi fokus utama & tampil penuh
   --------------------------------------------------------- */
@media (max-width: 991.98px) {
  .login-brand-panel { display: none; }
  .login-form-panel { flex: 1 1 100%; background: linear-gradient(160deg, var(--navy-dark, #0a1f44) 0%, var(--navy-light, #1a56b0) 100%); }
  .login-card {
    background: #fff;
    border-radius: 18px;
    padding: 32px 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  }
  /* Card login jadi putih di mobile, jadi divider "×" dan chip JAGO
     perlu warna yang kontras terhadap background terang (bukan lagi
     warna transparan putih seperti di panel navy). */
  .login-card .brand-logo-divider { color: #b7c2d6; }
  .login-card .jago-chip {
    background: #eef3fb;
    border-color: rgba(26, 86, 176, 0.35);
  }
  .login-card .jago-chip:hover { transform: none; } /* hemat efek di mobile/touch */
}

@media (min-width: 992px) {
  .login-card { padding: 20px 0; }
}

@media (max-width: 480px) {
  .bubble { display: none; }
  .login-brand-panel { padding: 40px 32px; }
}
