/* ============================================================
   /static/css/index.css
   ============================================================ */
:root {
  --font: 'Poppins', sans-serif;
  --txt: #fff;
  --border: rgba(255, 255, 255, 0.08);
  --card-bg: rgba(255, 255, 255, 0.06);
  --radius: 16px;
  --accent: #900; /* karakter utama PGV */
}

/* Reset & base */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { height: 100%; }

/* ===== Body (background tetap diam) ===== */
body {
  font-family: var(--font);
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--txt);
  overflow-y: auto; /* scroll aktif */
  -webkit-overflow-scrolling: touch; /* bounce di iOS */
  overscroll-behavior: none;
  background: #050506;
  background-image:
    radial-gradient(circle at 40% 40%, rgba(255, 0, 0, 0.28) 0%, transparent 45%),
    radial-gradient(circle at 60% 60%, rgba(180, 0, 90, 0.35) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(120, 0, 0, 0.35) 0%, transparent 55%);
  background-blend-mode: screen;
  filter: saturate(130%);
  animation: splashMove 18s ease-in-out infinite alternate;
  position: relative;
}

@keyframes splashMove {
  0% { background-position: 45% 55%, 55% 45%, 50% 50%; }
  100% { background-position: 60% 40%, 40% 60%, 48% 52%; }
}

/* ===== Overlay lembut (blur depth) ===== */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(8px);
  pointer-events: none; /* tidak blok scroll */
  z-index: 0;
}

/* ===== Wrapper bounce ===== */
.auth {
  height: 100dvh;
  min-height: 100dvh;
  padding: 10svh 16px 8svh;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
}
@supports (height: 100svh) {
  .auth {
    min-height: 100svh;
    padding: 10svh 16px 8svh;
  }
}

/* ===== Login Card ===== */
.login-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 64px 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  min-width: 340px;
  max-width: 420px;
  max-height: calc(100dvh - 40px);

  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;

  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
  padding-bottom: 40px;
  
  backdrop-filter: blur(24px) saturate(140%);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}


/* ===== Logo ===== */
.logo {
  width: 260px;
  height: auto;
  margin-bottom: 10px;
}

/* ===== Notifikasi (note minimalis, sejajar & jarak seimbang) ===== */
.note {
  width: 100%;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 28px;
  margin-top: 0;
  margin-bottom: 0;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  color: rgba(255,255,255,0.72);
}

.note svg.icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  vertical-align: middle;
  position: relative;
  top: 0px;
  opacity: 0.9;
}

.note .username {
  font-size: 12px;
}

.note.success {
  color: #a4f6a4;
  opacity: 1;
  transform: translateY(0);
}

.note.error {
  color: #ff9b9b;
  opacity: 1;
  transform: translateY(0);
}


/* ===== Input ===== */
input {
  padding: 14px 18px;
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--txt);
  font-size: 12px;
  text-align: center;
  outline: none;
  transition: border 0.25s ease, background 0.25s ease;
}
input:focus {
  border-color: #cc4c6e;
  background: rgba(255, 255, 255, 0.12);
  transition: all 0.25s ease;
}

input::placeholder { color: rgba(255, 255, 255, 0.45); }

/* ===== Tombol Login (normal & disabled) ===== */
button {
  padding: 14px 18px;
  width: 100%;
  border-radius: 10px;
  border: none;
  background: linear-gradient(180deg, #b30000 0%, #800000 85%);
  color: #fff;
  font-weight: 500;
  letter-spacing: 0.08em;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.25s ease;
}

button:hover:not(:disabled):not(.disabled) {
  background: linear-gradient(180deg, #d00000 0%, #a00000 85%);
}

/* === Disabled state === */
button:disabled,
button.disabled {
  opacity: 0.45;
  filter: grayscale(0.3);
  background: linear-gradient(180deg, #4a0000 0%, #300000 85%);
  box-shadow: none;
  pointer-events: all;
  cursor: not-allowed;
}

/* ===== Responsif ===== */
@media (max-width: 768px) {
  .login-card {
    padding: 48px 36px;
    min-width: 320px;
    max-height: 92vh;
  }
  .logo {
    width: 240px;
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 40px 28px;
    min-width: 280px;
    max-height: 92vh;
  }
  .logo {
    width: 210px;
  }
}

/* ===== PWA Safe Area ===== */
@media (display-mode: standalone) {
  :root {
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bot: env(safe-area-inset-bottom, 0px);
  }
  html, body { height: 100dvh; }
  .auth {
    min-height: calc(100dvh - var(--safe-top) - var(--safe-bot));
    padding-top: calc(10svh + var(--safe-top));
    padding-bottom: calc(8svh + var(--safe-bot));
  }
}

/* ===== Tombol Loading ===== */
button.loading {
  position: relative;
  pointer-events: none;
  color: #fff;
  overflow: hidden;
}

button.loading::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0.15) 100%
  );
  animation: shimmer 1.4s linear infinite;
  z-index: 0;
}

button .loading-text {
  position: relative;
  z-index: 1;
  font-size: 12px;
  letter-spacing: 0.08em;
  animation: pulse 1.4s ease-in-out infinite;
}

/* Efek shimmer */
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Efek teks kelap-kelip */
@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
