/* ===================================================================
   INVETORI — Login Page Styles
   =================================================================== */

.login-page {
  min-height: 100vh;
  display: flex;
  background: var(--bg-body);
}

/* Left panel — illustration */
.login-left {
  flex: 1;
  background: linear-gradient(145deg, #0a1628 0%, #0f2444 40%, #0a2d1f 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  position: relative;
  overflow: hidden;
}

.login-left::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16,185,129,0.15) 0%, transparent 70%);
  top: -100px; left: -100px;
  pointer-events: none;
}
.login-left::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,0.1) 0%, transparent 70%);
  bottom: -80px; right: -80px;
  pointer-events: none;
}

.login-illustration {
  position: relative;
  z-index: 1;
  text-align: center;
  animation: fadeIn 0.8s ease;
}

.login-illustration .brand-logo {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--primary), #059669);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 28px;
  box-shadow: 0 8px 32px rgba(16,185,129,0.35);
}
.login-illustration .brand-logo svg { width: 36px; height: 36px; color: white; }

.login-illustration h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: #f1f5f9;
  margin-bottom: 12px;
  line-height: 1.2;
}
.login-illustration h1 span { color: var(--primary); }

.login-illustration p {
  font-size: 1rem;
  color: #94a3b8;
  max-width: 340px;
  line-height: 1.7;
  margin-bottom: 40px;
}

/* Feature pills */
.feature-pills {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 340px;
}
.feature-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 12px 16px;
  animation: slideIn 0.5s ease both;
}
.feature-pill:nth-child(1) { animation-delay: 0.2s; }
.feature-pill:nth-child(2) { animation-delay: 0.35s; }
.feature-pill:nth-child(3) { animation-delay: 0.5s; }

.feature-pill .pill-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.feature-pill .pill-icon svg { width: 18px; height: 18px; }
.feature-pill .pill-icon.g { background: var(--primary-light); color: var(--primary); }
.feature-pill .pill-icon.b { background: var(--info-light); color: var(--info); }
.feature-pill .pill-icon.y { background: var(--warning-light); color: var(--warning); }

.feature-pill .pill-text strong { display: block; font-size: 0.84rem; font-weight: 600; color: #e2e8f0; }
.feature-pill .pill-text span { font-size: 0.75rem; color: #64748b; }

/* Floating decorative cards */
.float-card {
  position: absolute;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 12px 16px;
  backdrop-filter: blur(10px);
  animation: float 3s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.float-card-1 { top: 80px; right: 40px; animation-delay: 0s; }
.float-card-2 { bottom: 140px; right: 60px; animation-delay: 1.5s; }

.float-card .fc-val {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: #f1f5f9;
}
.float-card .fc-label { font-size: 0.7rem; color: #64748b; }
.float-card .fc-icon { font-size: 1.1rem; margin-bottom: 4px; }

/* Right panel — form */
.login-right {
  width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 48px;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
}

.login-form-wrap {
  width: 100%;
  max-width: 360px;
  animation: popIn 0.4s ease;
}

.login-form-wrap .form-heading {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.login-form-wrap .form-subheading {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.login-form-wrap .form-group { margin-bottom: 18px; }

.login-form-wrap .input-icon-wrap {
  position: relative;
}
.login-form-wrap .input-icon-wrap .input-icon {
  position: absolute;
  left: 12px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--text-faint);
  pointer-events: none;
}
.login-form-wrap .input-icon-wrap .form-control {
  padding-left: 40px;
  height: 46px;
  font-size: 0.9rem;
}

.password-wrap { position: relative; }
.toggle-password {
  position: absolute;
  right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none;
  color: var(--text-faint);
  cursor: pointer;
  padding: 4px;
  display: flex; align-items: center;
  transition: color 0.2s;
}
.toggle-password:hover { color: var(--text-primary); }
.toggle-password svg { width: 17px; height: 17px; }

.login-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.remember-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.remember-wrap input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}
.remember-wrap span { font-size: 0.84rem; color: var(--text-muted); }

.forgot-link {
  font-size: 0.84rem;
  color: var(--primary);
  font-weight: 500;
  transition: color 0.2s;
  background: none; border: none; cursor: pointer;
}
.forgot-link:hover { color: var(--primary-hover); text-decoration: underline; }

.login-btn {
  width: 100%;
  height: 46px;
  font-size: 0.95rem;
  font-weight: 600;
  justify-content: center;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), #059669);
  color: white;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: flex; align-items: center; gap: 8px;
  position: relative;
  overflow: hidden;
}
.login-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #059669, var(--primary));
  opacity: 0;
  transition: opacity 0.3s;
}
.login-btn:hover::before { opacity: 1; }
.login-btn span, .login-btn svg { position: relative; z-index: 1; }
.login-btn svg { width: 18px; height: 18px; }
.login-btn:hover { box-shadow: var(--shadow-primary); transform: translateY(-1px); }

.login-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0;
  color: var(--text-faint);
  font-size: 0.78rem;
}
.login-divider::before, .login-divider::after {
  content: ''; flex: 1;
  height: 1px;
  background: var(--border);
}

.demo-accounts { margin-top: 0; }
.demo-accounts p { font-size: 0.78rem; color: var(--text-faint); margin-bottom: 10px; text-align: center; }
.demo-btn-group { display: flex; flex-direction: column; gap: 8px; }
.demo-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.demo-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.demo-btn .demo-role {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.demo-btn .role-admin { background: var(--danger-light); color: var(--danger); }
.demo-btn .role-petugas { background: var(--warning-light); color: var(--warning); }
.demo-btn .role-user { background: var(--info-light); color: var(--info); }
.demo-btn .demo-creds { margin-left: auto; font-family: monospace; color: var(--text-faint); font-size: 0.75rem; }

.login-footer {
  margin-top: 28px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* Error message */
.login-error {
  display: none;
  background: var(--danger-light);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.84rem;
  color: var(--danger);
  margin-bottom: 16px;
  align-items: center;
  gap: 8px;
}
.login-error.show { display: flex; }
.login-error svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Forgot password panel */
.forgot-panel {
  display: none;
}
.forgot-panel.show { display: block; animation: popIn 0.25s ease; }
.back-to-login {
  background: none; border: none;
  color: var(--primary);
  font-size: 0.84rem;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 20px;
  font-family: var(--font-body);
}
.back-to-login svg { width: 16px; height: 16px; }

/* Theme toggle on login */
.login-theme-toggle {
  position: absolute;
  top: 20px; right: 24px;
  display: flex; align-items: center;
  z-index: 10;
}

/* Responsive login */
@media (max-width: 900px) {
  .login-left { display: none; }
  .login-right { width: 100%; border-left: none; padding: 40px 24px; }
}
@media (max-width: 480px) {
  .login-right { padding: 32px 20px; }
  .login-form-wrap .form-heading { font-size: 1.3rem; }
}
