/* ============================================================
   PAGU — Login Page · Deep Charcoal Premium (Scaled Down)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700;800&display=swap');

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

body.login-page,
.login-page * {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Background ── */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #1c1c1e;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 40px 16px;
}

/* Ambient orbs */
.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 30%, rgba(124,110,248,0.12) 0%, transparent 55%),
    radial-gradient(ellipse 70% 55% at 80% 70%, rgba(191,90,242,0.07) 0%, transparent 55%),
    radial-gradient(ellipse 50% 50% at 50% 50%, rgba(0,0,0,0.3) 0%, transparent 70%);
  animation: ambientShift 20s ease-in-out infinite alternate;
  pointer-events: none;
}

/* Subtle noise texture */
.login-page::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

@keyframes ambientShift {
  0%   { transform: scale(1) translate(0,0); }
  100% { transform: scale(1.06) translate(-2%, -3%); }
}

/* ── Card ── */
.login-container {
  margin: auto;
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 350px;
}

.login-card {
  background: rgba(44,44,46,0.75);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 20px;
  padding: 24px 20px;
  box-shadow:
    0 32px 80px rgba(0,0,0,0.6),
    0 0 0 1px rgba(255,255,255,0.04) inset,
    0 1px 0 rgba(255,255,255,0.06) inset;
  animation: cardIn 0.5s cubic-bezier(0.16,1,0.3,1) both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ── Logo ── */
.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
  text-align: center;
}

.login-logo .logo-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #7c6ef8, #bf5af2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  position: relative;
  animation: logoBreathe 5s ease-in-out infinite;
}
.login-logo .logo-icon::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(124,110,248,0.5), rgba(191,90,242,0.5));
  z-index: -1;
  filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s;
  animation: logoBreathe 5s ease-in-out infinite;
}

@keyframes logoBreathe {
  0%, 100% { box-shadow: 0 6px 18px rgba(124,110,248,0.28); }
  50%       { box-shadow: 0 10px 28px rgba(124,110,248,0.48); }
}

.login-logo .logo-icon span {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.login-logo h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #f5f5f7;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
  line-height: 1.2;
}

.login-logo p {
  font-size: 0.7rem;
  color: #6e6e73;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* ── Form ── */
.login-form .form-group { margin-bottom: 14px; }

.login-form .form-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: #aeaeb2;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.login-form .input-group-custom {
  display: flex;
  align-items: center;
  background: rgba(28,28,30,0.8);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 9px;
  padding: 0 10px;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.login-form .input-group-custom:focus-within {
  border-color: rgba(124,110,248,0.55);
  box-shadow: 0 0 0 2px rgba(124,110,248,0.14);
}

.login-form .input-group-custom .input-icon {
  display: flex;
  align-items: center;
  color: #48484a;
  font-size: 0.9rem;
  margin-right: 8px;
  flex-shrink: 0;
  transition: color 0.18s;
}
.login-form .input-group-custom:focus-within .input-icon { color: #9688fa; }

.login-form .input-group-custom .form-control {
  flex: 1;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 9px 0;
  color: #f5f5f7;
  font-size: 0.8rem;
  font-weight: 400;
  font-family: inherit;
  outline: none !important;
}
.login-form .input-group-custom .form-control::placeholder {
  color: #48484a;
}

.login-form .btn-toggle-password {
  background: transparent;
  border: none;
  color: #48484a;
  font-size: 0.9rem;
  padding: 3px;
  margin-left: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: color 0.18s;
  outline: none;
}
.login-form .btn-toggle-password:hover { color: #aeaeb2; }

/* ── Login button ── */
.login-form .btn-login {
  width: 100%;
  padding: 10px;
  background: #7c6ef8;
  border: none;
  border-radius: 9px;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 3px 12px rgba(124,110,248,0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}
.login-form .btn-login::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), transparent);
  border-radius: 9px;
  pointer-events: none;
}
.login-form .btn-login:hover {
  background: #9688fa;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124,110,248,0.4);
}
.login-form .btn-login:active { transform: translateY(0); }

/* ── Error ── */
.login-error {
  background: rgba(255,69,58,0.09);
  border: 1px solid rgba(255,69,58,0.22);
  border-radius: 9px;
  padding: 8px 12px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ff7b74;
  font-size: 0.72rem;
  font-weight: 500;
  animation: slideDown 0.25s cubic-bezier(0.16,1,0.3,1);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Footer ── */
.login-footer {
  text-align: center;
  margin-top: 20px;
  color: #3a3a3c;
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* ── Particles ── */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(124,110,248,0.25);
  border-radius: 50%;
  animation: particleFloat linear infinite;
}
@keyframes particleFloat {
  0%   { transform: translateY(100vh); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-100vh); opacity: 0; }
}
.particle:nth-child(1) { left: 12%;  animation-duration: 15s; animation-delay: 0s;  }
.particle:nth-child(2) { left: 27%;  animation-duration: 19s; animation-delay: 2s;  width: 3px; height: 3px; background: rgba(191,90,242,0.2); }
.particle:nth-child(3) { left: 42%;  animation-duration: 12s; animation-delay: 4s;  }
.particle:nth-child(4) { left: 57%;  animation-duration: 22s; animation-delay: 1s;  width: 3px; height: 3px; background: rgba(255,214,10,0.12); }
.particle:nth-child(5) { left: 72%;  animation-duration: 16s; animation-delay: 3s;  }
.particle:nth-child(6) { left: 87%;  animation-duration: 20s; animation-delay: 5s;  background: rgba(191,90,242,0.18); }
.particle:nth-child(7) { left: 18%;  animation-duration: 24s; animation-delay: 7s;  }
.particle:nth-child(8) { left: 63%;  animation-duration: 14s; animation-delay: 6s;  background: rgba(255,214,10,0.15); }

@media (max-width: 480px) {
  .login-card   { padding: 22px 18px; border-radius: 16px; }
  .login-logo .logo-icon { width: 44px; height: 44px; }
  .login-logo h2 { font-size: 1.05rem; }
}
