/* ============================================
   LOGIN PAGE - SIAKAR
   ============================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: #0f172a;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* Animated Background */
.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
}
.bg-particle {
  position: absolute;
  border-radius: 50%;
  opacity: .15;
  animation: float linear infinite;
}
.bg-particle:nth-child(1)  { width:80px;  height:80px;  background:#3b82f6; top:10%;  left:10%;  animation-duration:8s;  animation-delay:0s; }
.bg-particle:nth-child(2)  { width:120px; height:120px; background:#8b5cf6; top:20%;  right:15%; animation-duration:12s; animation-delay:-3s; }
.bg-particle:nth-child(3)  { width:60px;  height:60px;  background:#06b6d4; bottom:25%; left:20%;  animation-duration:10s; animation-delay:-5s; }
.bg-particle:nth-child(4)  { width:100px; height:100px; background:#1e40af; bottom:15%; right:10%; animation-duration:9s;  animation-delay:-2s; }
.bg-particle:nth-child(5)  { width:40px;  height:40px;  background:#3b82f6; top:50%;  left:50%;  animation-duration:7s;  animation-delay:-4s; }
.bg-particle:nth-child(6)  { width:70px;  height:70px;  background:#0ea5e9; top:70%;  right:30%; animation-duration:11s; animation-delay:-1s; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25%       { transform: translateY(-30px) rotate(90deg); }
  50%       { transform: translateY(-60px) rotate(180deg); }
  75%       { transform: translateY(-30px) rotate(270deg); }
}

/* Grid lines animation */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(rgba(59,130,246,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,.05) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: gridMove 20s linear infinite;
  z-index: 0;
}
@keyframes gridMove {
  0%   { transform: translate(0,0); }
  100% { transform: translate(40px,40px); }
}

/* Login Card */
.login-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  padding: 1rem;
  animation: cardEntry .6s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes cardEntry {
  from { opacity: 0; transform: translateY(40px) scale(.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.login-card {
  background: rgba(255,255,255,.07);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 1.25rem;
  padding: 2.5rem 2rem;
  box-shadow: 0 25px 50px rgba(0,0,0,.5);
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}
.logo-icon {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  border-radius: 1.25rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
  font-size: 2rem;
  box-shadow: 0 8px 32px rgba(59,130,246,.4);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 8px 32px rgba(59,130,246,.4); }
  50%       { box-shadow: 0 8px 40px rgba(59,130,246,.7); }
}
.logo-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: .05em;
}
.logo-title span { color: #3b82f6; }
.logo-sub { color: rgba(255,255,255,.5); font-size: .8rem; margin-top: .25rem; }

.login-form-title {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-align: center;
}

.input-group {
  position: relative;
  margin-bottom: 1rem;
}
.input-icon {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,.4);
  font-size: .9rem;
  pointer-events: none;
  transition: color .2s;
}
.login-input {
  width: 100%;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: .75rem;
  padding: .85rem 2.75rem .85rem 2.5rem;
  color: #fff;
  font-size: .9rem;
  outline: none;
  transition: all .2s;
}
.login-input::placeholder { color: rgba(255,255,255,.3); }
.login-input:focus {
  background: rgba(255,255,255,.12);
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,.2);
}
.login-input:focus ~ .input-icon { color: #3b82f6; }
.toggle-pass {
  position: absolute;
  right: .9rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,.4);
  cursor: pointer;
  font-size: .9rem;
  transition: color .2s;
  padding: .2rem;
}
.toggle-pass:hover { color: #fff; }

.btn-login {
  width: 100%;
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  border: none;
  border-radius: .75rem;
  padding: .9rem;
  color: #fff;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  margin-top: .5rem;
  position: relative;
  overflow: hidden;
}
.btn-login::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,.1), transparent);
  transform: rotate(45deg) translate(-100%, -100%);
  transition: transform .4s;
}
.btn-login:hover::before { transform: rotate(45deg) translate(100%, 100%); }
.btn-login:hover { box-shadow: 0 8px 24px rgba(59,130,246,.5); transform: translateY(-1px); }
.btn-login:active { transform: translateY(0); }
.btn-login:disabled { opacity: .7; cursor: not-allowed; }

.login-error {
  background: rgba(239,68,68,.15);
  border: 1px solid rgba(239,68,68,.3);
  border-radius: .75rem;
  padding: .75rem 1rem;
  color: #fca5a5;
  font-size: .83rem;
  margin-bottom: 1rem;
  display: none;
  align-items: center;
  gap: .5rem;
}
.login-error.show { display: flex; }

.login-footer {
  text-align: center;
  margin-top: 1.5rem;
  color: rgba(255,255,255,.3);
  font-size: .75rem;
}

/* Demo accounts */
.demo-accounts {
  margin-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1rem;
}
.demo-title { color: rgba(255,255,255,.4); font-size: .72rem; text-align: center; margin-bottom: .5rem; }
.demo-list  { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center; }
.demo-btn {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: .5rem;
  padding: .3rem .7rem;
  color: rgba(255,255,255,.6);
  font-size: .72rem;
  cursor: pointer;
  transition: all .2s;
}
.demo-btn:hover { background: rgba(59,130,246,.2); border-color: #3b82f6; color: #93c5fd; }

/* Loading overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.8);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
}
.loading-overlay.show { display: flex; }
.loading-spinner {
  width: 48px; height: 48px;
  border: 3px solid rgba(59,130,246,.2);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { color: rgba(255,255,255,.7); font-size: .9rem; }
