@font-face {
  font-family: 'Plus Jakarta Sans';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('../fonts/plus-jakarta-sans-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url('../fonts/plus-jakarta-sans-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('../fonts/plus-jakarta-sans-latin-700-normal.woff2') format('woff2');
}

* { box-sizing: border-box; }

body.login {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
  color: #fff;
  background: #0b1224 url('../img/dinding-bata.jpg') center top / 720px auto repeat;
  position: relative;
  overflow: hidden;
}

.malam, .vinyet, .cahaya, .kerucut {
  position: fixed;
  left: 0;
  right: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}

.malam {
  inset: 0;
  z-index: 0;
  background: rgba(7, 13, 32, 0.94);
  opacity: 1;
}

.vinyet {
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse 85% 95% at 50% 40px, rgba(7, 13, 32, 0.1) 0%, rgba(7, 13, 32, 0.6) 45%, rgba(7, 13, 32, 0.92) 100%);
  opacity: 0;
}

.cahaya {
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse 46% 52% at 50% 40px, rgba(255, 205, 120, 0.5) 0%, rgba(255, 190, 100, 0.18) 45%, transparent 75%);
  opacity: 0;
}

.kerucut {
  top: 54px;
  height: 78vh;
  z-index: 1;
  background: linear-gradient(180deg, rgba(255, 214, 140, 0.34), transparent 85%);
  clip-path: polygon(44% 0, 56% 0, 80% 100%, 20% 100%);
  filter: blur(4px);
  opacity: 0;
}

.lampu {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 54px;
  z-index: 2;
  background: linear-gradient(180deg, #3b4560, #232b40);
  clip-path: polygon(14% 0, 86% 0, 100% 100%, 0 100%);
  transition: background 0.9s ease;
}

.lampu::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  background: #4a5470;
  transition: background 0.9s ease, box-shadow 0.9s ease;
}

body.login:has(.kartu form:focus-within) .malam { opacity: 0; }
body.login:has(.kartu form:focus-within) .vinyet,
body.login:has(.kartu form:focus-within) .cahaya { opacity: 1; }
body.login:has(.kartu form:focus-within) .kerucut { opacity: 0.85; }
body.login:has(.kartu form:focus-within) .lampu { background: linear-gradient(180deg, #5b6a94, #2f3a5c); }
body.login:has(.kartu form:focus-within) .lampu::after {
  background: #f6d58e;
  box-shadow: 0 0 18px 6px rgba(246, 198, 106, 0.75);
}

.kartu {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 420px;
  margin-top: 60px;
  padding: 40px 36px 30px;
  border-radius: 16px;
  background: rgba(10, 18, 45, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

@supports not ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  .kartu { background: rgba(10, 18, 45, 0.85); }
}

.merek {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.25em;
  opacity: 0.8;
}

.kartu h1 {
  margin: 8px 0 6px;
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
}

.sub {
  margin: 0 0 8px;
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
  opacity: 0.8;
}

.isian {
  position: relative;
  margin-top: 20px;
}

.isian input {
  width: 100%;
  height: 56px;
  padding: 0 54px 0 24px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.isian input::placeholder { color: rgba(255, 255, 255, 0.8); }

.isian input:focus {
  outline: none;
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
}

.isian input:-webkit-autofill {
  -webkit-text-fill-color: #fff;
  box-shadow: 0 0 0 100px rgba(24, 40, 96, 0.95) inset;
  caret-color: #fff;
}

.isian svg {
  position: absolute;
  right: 22px;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.tombol {
  width: 100%;
  height: 52px;
  margin-top: 26px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #1f2937;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}

.tombol:hover { background: #e8eefc; }
.tombol:active { transform: translateY(1px); }

.galat {
  margin-top: 18px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(229, 72, 77, 0.28);
  border: 1px solid rgba(255, 140, 140, 0.5);
  font-size: 13px;
  line-height: 1.5;
}

.kaki {
  margin: 22px 0 0;
  text-align: center;
  font-size: 12px;
  opacity: 0.65;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 480px) {
  .kartu { padding: 32px 22px 24px; margin-top: 70px; }
  .kartu h1 { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .malam, .vinyet, .cahaya, .kerucut, .lampu, .lampu::after { transition-duration: 0.01s; }
}