/* ──────────────────────────────────────────
   LOGIN PAGE — LABKESDA PANDEGLANG
   PANDEGLANG teal theme (selaras dengan admin dashboard)
   Primary: #106EA0 (teal)
   Accent : #D3DD03 (lime), #EEF96B (yellow)
   Dark   : #041F2F, #0F5476
   Font   : Plus Jakarta Sans
────────────────────────────────────────── */

.login-page {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #041F2F 0%, #0F5476 40%, #106EA0 100%);
  background-size: 200% 200%;
  animation: login-bg 18s ease-in-out infinite;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* ── Animated Background Gradient ── */
@keyframes login-bg {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Background Shapes (floating blobs) ── */
.login-bg-shapes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.login-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  will-change: transform;
}

.login-shape-1 {
  width: 520px;
  height: 520px;
  background:
    radial-gradient(circle at 30% 30%, rgba(211, 221, 3, 0.55) 0%, transparent 60%),
    rgba(16, 110, 160, 0.55);
  top: -160px;
  right: -120px;
  animation: login-float 16s ease-in-out infinite;
}

.login-shape-2 {
  width: 380px;
  height: 380px;
  background:
    radial-gradient(circle at 70% 30%, rgba(238, 249, 107, 0.5) 0%, transparent 60%),
    rgba(16, 110, 160, 0.45);
  bottom: -100px;
  left: -80px;
  animation: login-float 20s ease-in-out infinite reverse;
}

.login-shape-3 {
  width: 220px;
  height: 220px;
  background: rgba(211, 221, 3, 0.35);
  bottom: 28%;
  right: 6%;
  animation: login-float 12s ease-in-out infinite;
  animation-delay: 1.5s;
}

@keyframes login-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(-24px, 22px) scale(1.06); }
  66%      { transform: translate(18px, -18px) scale(0.97); }
}

/* ── Wrapper ── */
.login-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.login-container {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

/* ── Card ── */
.login-card {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(16, 110, 160, 0.18);
  border-radius: 20px;
  padding: 2.5rem 2rem 2rem;
  box-shadow:
    0 20px 45px -18px rgba(4, 47, 46, 0.55),
    0 8px 24px -12px rgba(16, 110, 160, 0.28);
  animation: login-fade-up 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* accent bar atas — meniru kpi-card::before di dashboard */
.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #09A9EB 0%, #F6F755 100%);
}

@keyframes login-fade-up {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Header ── */
.login-card-header {
  text-align: center;
  margin-bottom: 1.9rem;
}

.login-logo {
  margin-bottom: 1.25rem;
}

.login-logo-img {
  width: 90px;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 8px 22px -8px rgba(16, 110, 160, 0.5);
  animation: login-logo-pulse 3.5s ease-in-out infinite;
}

@keyframes login-logo-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 8px 22px -8px rgba(16, 110, 160, 0.5); }
  50%      { transform: scale(1.04); box-shadow: 0 12px 30px -8px rgba(16, 110, 160, 0.65); }
}

.login-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 0.35rem;
  line-height: 1.3;
  color: #106EA0;
}

.login-subtitle {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

/* ── Body ── */
.login-card-body {
  margin-bottom: 1.5rem;
}

.login-field {
  margin-bottom: 1.25rem;
}

.login-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #133A4E;
  margin-bottom: 0.4rem;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon {
  position: absolute;
  left: 0.875rem;
  color: #94a3b8;
  font-size: 0.875rem;
  pointer-events: none;
  z-index: 2;
}

.login-input {
  width: 100%;
  padding: 0.72rem 0.875rem 0.72rem 2.5rem;
  font-size: 0.9rem;
  font-family: inherit;
  color: #133A4E;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  box-sizing: border-box;
}

.login-input:focus {
  border-color: #106EA0;
  box-shadow: 0 0 0 3px rgba(16, 110, 160, 0.14);
}

.login-input.is-invalid {
  border-color: #ef4444;
}

.login-input::placeholder {
  color: #9ca3af;
}

/* ── Captcha ── */
.login-captcha {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #F0FBFD;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.6rem 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-captcha:focus-within {
  border-color: #106EA0;
  box-shadow: 0 0 0 3px rgba(16, 110, 160, 0.14);
}

.login-captcha-question {
  font-size: 1.1rem;
  font-weight: 800;
  color: #133A4E;
  min-width: 60px;
  text-align: center;
  letter-spacing: 0.05em;
}

.login-captcha-eq {
  font-size: 1.1rem;
  font-weight: 600;
  color: #64748b;
}

.login-captcha-input {
  width: 70px;
  padding: 0.4rem 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-captcha-input:focus {
  border-color: #106EA0;
  box-shadow: 0 0 0 3px rgba(16, 110, 160, 0.14);
}

.login-caption {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0.35rem 0 0;
  line-height: 1.4;
}

/* ── Error ── */
.login-error {
  font-size: 0.8rem;
  color: #ef4444;
  margin: 0.35rem 0 0;
  line-height: 1.4;
}

/* ── Button ── */
.login-btn {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 0.82rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  color: #0B2233;
  background: linear-gradient(135deg, #09A9EB 0%, #F6F755 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
  margin-top: 0.25rem;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -10px rgba(16, 110, 160, 0.6);
  filter: brightness(1.05);
}

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

/* shine sweep saat hover */
.login-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 45%;
  height: 100%;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.45) 50%, transparent 100%);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
}

.login-btn:hover::after {
  left: 130%;
}

.login-btn-icon {
  font-size: 0.85rem;
}

/* ── Footer ── */
.login-card-footer {
  border-top: 1px solid #f1f5f9;
  padding-top: 1.25rem;
}

.login-footer-text {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0;
  text-align: center;
  line-height: 1.5;
}

.login-footer-icon {
  margin-right: 0.3rem;
  color: #106EA0;
  opacity: 0.7;
}

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

/* ── Login Loading Overlay ── */
.login-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #041F2F 0%, #0F5476 40%, #106EA0 100%);
  background-size: 200% 200%;
  animation: login-bg 18s ease-in-out infinite;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.login-loader.is-visible {
  opacity: 1;
  visibility: visible;
}

.login-loader-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  will-change: transform;
  pointer-events: none;
}

.login-loader-shape-1 {
  width: 460px;
  height: 460px;
  background:
    radial-gradient(circle at 30% 30%, rgba(211, 221, 3, 0.5) 0%, transparent 60%),
    rgba(16, 110, 160, 0.5);
  top: -140px;
  right: -100px;
  animation: login-float 16s ease-in-out infinite;
}

.login-loader-shape-2 {
  width: 340px;
  height: 340px;
  background:
    radial-gradient(circle at 70% 30%, rgba(238, 249, 107, 0.45) 0%, transparent 60%),
    rgba(16, 110, 160, 0.4);
  bottom: -90px;
  left: -70px;
  animation: login-float 20s ease-in-out infinite reverse;
}

.login-loader-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: login-fade-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.login-loader-logo-wrap {
  position: relative;
  width: 132px;
  height: 132px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0%, rgba(9, 169, 235, 0.95) 38%, #F6F755 62%, transparent 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 7px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 7px));
  animation: login-loader-spin 1.1s linear infinite;
}

.login-loader-logo {
  width: 92px;
  height: auto;
  border-radius: 18px;
  animation: login-logo-pulse 2.4s ease-in-out infinite;
  box-shadow: 0 12px 30px -8px rgba(16, 110, 160, 0.6);
}

@keyframes login-loader-spin {
  to { transform: rotate(360deg); }
}

.login-loader-title {
  margin: 1.15rem 0 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, #fff 0%, #CCF2FB 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-loader-text {
  margin: 0.4rem 0 0;
  font-size: 0.86rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}

.login-loader-dots span {
  display: inline-block;
  animation: login-loader-dot 1.2s ease-in-out infinite;
}

.login-loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.login-loader-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes login-loader-dot {
  0%, 60%, 100% { opacity: 0.2; transform: translateY(0); }
  30%           { opacity: 1; transform: translateY(-3px); }
}

.login-loader-track {
  position: relative;
  width: 220px;
  height: 6px;
  margin-top: 1.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.login-loader-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 40%;
  border-radius: 999px;
  background: linear-gradient(135deg, #09A9EB 0%, #F6F755 100%);
  animation: login-loader-bar 1.3s ease-in-out infinite;
}

@keyframes login-loader-bar {
  0%   { left: -40%; }
  100% { left: 100%; }
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .login-card {
    padding: 2rem 1.25rem 1.75rem;
    border-radius: 16px;
  }

  .login-title {
    font-size: 1.3rem;
  }

  .login-captcha-question {
    font-size: 1rem;
    min-width: 50px;
  }
}

/* ── Aksesibilitas ── */
@media (prefers-reduced-motion: reduce) {
  .login-page,
  .login-shape,
  .login-logo-img,
  .login-card,
  .login-loader,
  .login-loader-shape,
  .login-loader-ring,
  .login-loader-logo,
  .login-loader-dots span,
  .login-loader-bar {
    animation: none;
  }
}
