/* =====================================================
   Sistem Informasi & Asisten Sekretariat KPP Tulungagung – Login Page CSS
   ===================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

:root {
  --primary: #003366;
  --primary-light: #004080;
  --primary-dark: #002244;
  --accent: #FF8C00;
  --accent-light: #FFA500;
  --bg-dark: #0a0f1e;
  --bg-card: rgba(255, 255, 255, 0.05);
  --text-white: #f8fafc;
  --text-muted: rgba(248, 250, 252, 0.6);
  --border: rgba(255, 255, 255, 0.12);
  --error: #ef4444;
  --success: #22c55e;
  --glass: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(255, 255, 255, 0.15);
  --shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

html,
body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  overflow: hidden;
}

/* ---- Background ---- */
.login-bg {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, #1e3a8a 0%, #0a0f1e 60%),
    radial-gradient(ellipse at 80% 20%, #1d4ed8 0%, transparent 50%);
  z-index: 0;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: float 8s ease-in-out infinite;
}

.orb1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #3b82f6, #1e40af);
  top: -100px;
  left: -100px;
  animation-delay: 0s;
}

.orb2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #f59e0b, #d97706);
  bottom: -80px;
  right: -80px;
  animation-delay: -3s;
}

.orb3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #8b5cf6, #6d28d9);
  top: 50%;
  right: 20%;
  animation-delay: -6s;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-30px) scale(1.05);
  }
}

.particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: rise linear infinite;
}

@keyframes rise {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 0.5;
  }

  100% {
    transform: translateY(-10vh) scale(1);
    opacity: 0;
  }
}

/* ---- Login Wrapper ---- */
.login-wrapper {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

/* ---- Login Card ---- */
.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 48px 40px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }

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

/* ---- Header ---- */
.login-header {
  text-align: center;
  margin-bottom: 36px;
}

.logo-circle {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.4)
  }

  50% {
    box-shadow: 0 8px 48px rgba(59, 130, 246, 0.7)
  }
}

.login-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-white);
  background: linear-gradient(135deg, #fff, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.6;
}

/* ---- Form ---- */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.input-wrapper:focus-within {
  border-color: var(--primary-light);
  background: rgba(59, 130, 246, 0.08);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.input-icon {
  padding: 0 14px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.input-wrapper input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-white);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  padding: 14px 14px 14px 0;
}

.input-wrapper input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.toggle-password {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 14px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.toggle-password:hover {
  color: var(--text-white);
}

/* ---- Error ---- */
.login-error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 10px;
  padding: 10px 14px;
  color: #fca5a5;
  font-size: 13px;
  animation: shake 0.4s ease;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0)
  }

  25% {
    transform: translateX(-6px)
  }

  75% {
    transform: translateX(6px)
  }
}

/* ---- Button ---- */
.btn-login {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  margin-top: 6px;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
}

.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.5);
  background: linear-gradient(135deg, #2563eb, #3b82f6);
}

.btn-login:active {
  transform: translateY(0);
}

.btn-login:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.spin {
  animation: spinAnim 1s linear infinite;
}

@keyframes spinAnim {
  to {
    transform: rotate(360deg);
  }
}

/* ---- Footer ---- */
.login-footer {
  margin-top: 32px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.version-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 11px;
  width: fit-content;
  margin: 0 auto;
}

/* Responsive */
@media (max-width: 480px) {
  .login-card {
    padding: 36px 24px;
    border-radius: 20px;
  }

  .login-title {
    font-size: 24px;
  }
}