/* Halaman login pegawai (dipakai js/masuk.js). Warna mengikuti token di style.css. */

/* ---------- latar: berlian berkilau yang melayang ---------- */
.gems { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.gem {
  position: absolute; width: var(--s); color: var(--c); opacity: .8;
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--c) 60%, transparent));
  animation: gemMelayang var(--d) ease-in-out var(--dl) infinite alternate both;
}
.gem svg { display: block; width: 100%; height: auto; animation: gemKilap 3s ease-in-out var(--dl) infinite; }
.kilau {
  position: absolute; top: -8px; right: -6px; width: 16px; height: 16px; background: #fff; opacity: 0;
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  animation: kilau 2.8s ease-in-out var(--dl) infinite;
}
@keyframes gemMelayang { from { transform: translate(0, 0) rotate(var(--r)); } to { transform: translate(12px, -36px) rotate(calc(var(--r) + 16deg)); } }
@keyframes gemKilap { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.45); } }
@keyframes kilau { 0%, 100% { opacity: 0; transform: scale(0) rotate(0); } 45% { opacity: 1; transform: scale(1) rotate(90deg); } 60% { opacity: 0; transform: scale(.4) rotate(120deg); } }

/* ---------- kartu login ---------- */
.lg-wrap { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.lg-card { width: 100%; max-width: 400px; border-radius: 30px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: cardIn .7s var(--spring) both; }

.lg-hero {
  position: relative; height: 250px; overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 70%, #fff), var(--accent) 50%, var(--primary));
}
.lg-hero::before { content: ""; position: absolute; left: 50%; top: 46%; width: 220px; height: 220px; margin: -110px 0 0 -110px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .45), transparent 65%); }
.lg-mk { position: absolute; left: 50%; bottom: -118px; width: 130px; margin-left: -65px; animation: mkMelayang 3.4s ease-in-out infinite; }
.lg-mk img { display: block; width: 100%; user-select: none; -webkit-user-drag: none; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .28)); }
@keyframes mkMelayang { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }

.lg-shape { position: absolute; animation: bendaMelayang 5s ease-in-out infinite; }
@keyframes bendaMelayang { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.lg-koin {
  left: 9%; top: 16%; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; transform: rotate(-14deg);
  background: radial-gradient(circle at 35% 30%, #ffe58a, #f3b52a 55%, #c98500); box-shadow: inset -3px -4px 0 rgba(0, 0, 0, .15), 0 8px 16px rgba(0, 0, 0, .2);
}
.lg-koin svg { width: 22px; height: 22px; }
.lg-gem { right: 9%; top: 11%; width: 52px; color: #e6f3ff; transform: rotate(14deg); animation-delay: .8s; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .2)); }
.lg-gem svg { display: block; width: 100%; height: auto; }
.lg-limas { left: 7%; bottom: 46px; width: 44px; height: 50px; background: linear-gradient(90deg, #fff 50%, #d9d3ff 50%); clip-path: polygon(50% 0, 100% 100%, 0 100%); animation-delay: 1.6s; }
.lg-cincin { right: 7%; bottom: 52px; width: 66px; height: 66px; border-radius: 50%; border: 14px solid #ff7aa2; transform: rotate(-20deg) scaleY(.62); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .12); animation-delay: 2.4s; }

.lg-panel { position: relative; margin-top: -32px; background: var(--surface); border-radius: 30px 30px 0 0; padding: 26px 22px 24px; }
.lg-form h1 { text-align: center; font-size: 28px; margin: 0 0 18px; letter-spacing: -.02em; }
.lg-form .alert { margin-bottom: 14px; }
.lg-fields { border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.lg-f { display: flex; align-items: center; gap: 12px; padding: 9px 14px; transition: background .2s; }
.lg-f + .lg-f { border-top: 1px solid var(--line); }
.lg-f:focus-within { background: color-mix(in srgb, var(--primary) 9%, var(--surface-2)); }
.lg-f.error { background: var(--bad-soft); animation: shake .4s; }
.lg-ic { width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.lg-ic svg { width: 18px; height: 18px; }
.lg-f input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font: inherit; font-size: 15px; color: var(--text); padding: 9px 0; }
.lg-f input::placeholder { color: var(--text-3); }
.lg-row { margin-top: 20px; }
.lg-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 30px; border: 0; border-radius: 16px; cursor: pointer;
  background: var(--text); color: var(--surface); font: inherit; font-size: 15px; font-weight: 700; box-shadow: var(--shadow); transition: transform .15s var(--ease);
}
.lg-btn:hover { transform: translateY(-1px); }
.lg-btn:disabled { opacity: .7; cursor: default; transform: none; }
.lg-alt { margin: 14px 0 0; text-align: center; font-size: 13px; }
.lg-alt a { color: var(--text-3); text-decoration: none; }
.lg-alt a:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  .gem, .gem svg, .kilau, .lg-mk, .lg-shape { animation: none !important; }
}
