/* Koperasi SMKSBS: admin login */
:root { --navy: #081B36; --azure: #6690F2; --azure-d: #3E6BD6; --gold: #D9B968; --orange: #E8873A; --ease: cubic-bezier(.16,1,.3,1); --spring: cubic-bezier(.34,1.56,.64,1); }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.login-page { font-family: 'Inter', system-ui, sans-serif; color: #E9EEFC; background: #060F1F; min-height: 100vh; min-height: 100dvh; overflow-x: hidden; -webkit-font-smoothing: antialiased; }

/* backdrop: slow drifting colour blobs on deep navy */
.login-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden;
  background: radial-gradient(1200px 700px at 50% -20%, #12305F 0%, transparent 60%), linear-gradient(180deg, #081B36, #050C18); }
.login-bg i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.login-bg i:nth-child(1) { width: 520px; height: 520px; left: -140px; top: -120px; background: #2C5BC4; animation: drift1 22s ease-in-out infinite alternate; }
.login-bg i:nth-child(2) { width: 460px; height: 460px; right: -120px; bottom: -140px; background: #C96A1F; opacity: .38; animation: drift2 26s ease-in-out infinite alternate; }
.login-bg i:nth-child(3) { width: 300px; height: 300px; right: 24%; top: 8%; background: #6A4FD0; opacity: .25; animation: drift1 30s ease-in-out infinite alternate-reverse; }
.login-bg::after { content: ""; position: absolute; inset: 0; opacity: .5; background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1.2px); background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%); }
@keyframes drift1 { to { transform: translate(90px, 70px) scale(1.12); } }
@keyframes drift2 { to { transform: translate(-80px, -60px) scale(1.1); } }

.login-shell { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 18px; gap: 18px; }

.login-card { width: 100%; max-width: 420px; padding: 38px 34px 28px; border-radius: 26px; text-align: center; position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.05)); border: 1px solid rgba(255,255,255,.14);
  -webkit-backdrop-filter: blur(22px) saturate(1.3); backdrop-filter: blur(22px) saturate(1.3);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.75), inset 0 1px 0 rgba(255,255,255,.18); animation: cardIn 700ms var(--ease) both; }
.login-card::before { content: ""; position: absolute; left: 36px; right: 36px; top: 0; height: 2px; border-radius: 0 0 4px 4px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
@keyframes cardIn { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }

.login-crest { display: inline-flex; width: 84px; height: 84px; border-radius: 50%; padding: 4px; margin-bottom: 14px; background: rgba(255,255,255,.08);
  box-shadow: 0 0 0 1px rgba(217,185,104,.55), 0 14px 30px -10px rgba(0,0,0,.6); transition: transform 500ms var(--spring); }
.login-crest:hover { transform: rotate(-6deg) scale(1.06); }
.login-crest img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.login-card h1 { margin: 0 0 6px; font-family: 'Space Grotesk', sans-serif; font-size: 26px; letter-spacing: -.01em; color: #fff; }
.login-sub { margin: 0 0 24px; font-size: 14px; line-height: 1.5; color: #AEBEDD; }
.login-sub span { color: var(--gold); font-weight: 600; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }

.login-err { display: flex; align-items: center; gap: 10px; text-align: left; margin: 0 0 18px; padding: 12px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.4;
  color: #FFC9C9; background: rgba(224,84,84,.16); border: 1px solid rgba(224,84,84,.4); }
.login-err svg { width: 20px; height: 20px; flex: none; }
.login-card.has-error { animation: cardIn 700ms var(--ease) both, shake 420ms 700ms both; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

.login-form { display: grid; gap: 16px; text-align: left; }
.login-field { display: grid; gap: 7px; }
.login-field > span { font-size: 12.5px; font-weight: 600; letter-spacing: .02em; color: #C9D5F0; }
.login-input { position: relative; display: flex; align-items: center; }
.login-input > svg { position: absolute; left: 14px; width: 19px; height: 19px; color: #7C8FB8; pointer-events: none; transition: color 200ms; }
.login-input input { width: 100%; height: 50px; padding: 0 46px 0 44px; font: inherit; font-size: 15px; color: #fff; border-radius: 14px; outline: none;
  background: rgba(5,12,24,.55); border: 1px solid rgba(255,255,255,.14); transition: border-color 200ms, box-shadow 200ms, background-color 200ms; }
.login-input input::placeholder { color: #6F82AD; }
.login-input input:hover { border-color: rgba(255,255,255,.26); }
.login-input input:focus { border-color: var(--azure); background: rgba(5,12,24,.75); box-shadow: 0 0 0 4px rgba(102,144,242,.22); }
.login-input:focus-within > svg { color: var(--azure); }
.login-input input:-webkit-autofill { -webkit-text-fill-color: #fff; box-shadow: 0 0 0 40px #0A1830 inset; caret-color: #fff; }
.login-input input:disabled { opacity: .5; cursor: not-allowed; }

.login-eye { position: absolute; right: 6px; width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: #8FA2CB; cursor: pointer; transition: color 160ms, background-color 160ms; }
.login-eye:hover { color: #fff; background: rgba(255,255,255,.08); }
.login-eye svg { width: 19px; height: 19px; grid-area: 1 / 1; }
.login-eye .eye-off { display: none; } .login-eye.on .eye-on { display: none; } .login-eye.on .eye-off { display: block; }

.login-btn { position: relative; margin-top: 8px; height: 52px; border: 0; border-radius: 14px; cursor: pointer; font: inherit; font-weight: 700; font-size: 15.5px; letter-spacing: .01em; color: #fff; overflow: hidden;
  background: linear-gradient(155deg, #F0903C, #C96A1F); box-shadow: 0 16px 30px -12px rgba(232,135,58,.65), inset 0 1px 0 rgba(255,255,255,.3);
  transition: transform 220ms var(--spring), box-shadow 220ms, filter 200ms; }
.login-btn::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; transform: skewX(-20deg); background: linear-gradient(120deg, transparent, rgba(255,255,255,.4), transparent); transition: left .7s var(--ease); }
.login-btn:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 20px 36px -12px rgba(232,135,58,.75), inset 0 1px 0 rgba(255,255,255,.3); }
.login-btn:hover:not(:disabled)::after { left: 130%; }
.login-btn:active:not(:disabled) { transform: scale(.98); }
.login-btn:focus-visible { outline: 3px solid rgba(255,255,255,.7); outline-offset: 3px; }
.login-btn:disabled { cursor: not-allowed; filter: grayscale(.4) brightness(.85); }
.lb-spin { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; opacity: 0; animation: spin .7s linear infinite; }
.login-btn.loading .lb-text { opacity: 0; } .login-btn.loading .lb-spin { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

.login-back { display: inline-block; margin-top: 20px; font-size: 13px; color: #9FB3D9; text-decoration: none; transition: color 160ms, transform 200ms var(--ease); }
.login-back:hover { color: #fff; transform: translateX(-3px); }
.login-foot { margin: 0; font-size: 12px; color: #6F82AD; text-align: center; }

@media (max-width: 480px) {
  .login-shell { padding: 18px 14px; justify-content: flex-start; padding-top: max(7vh, 28px); }
  .login-card { padding: 30px 22px 24px; border-radius: 24px; }
  .login-card h1 { font-size: 23px; }
  .login-input input { font-size: 16px; } /* stops iOS zooming into the field */
}
@media (prefers-reduced-motion: reduce) {
  .login-bg i, .login-card, .login-card.has-error { animation: none !important; }
  .login-btn, .login-btn::after, .login-crest, .login-back { transition: none !important; }
}
@media (prefers-reduced-transparency: reduce) { .login-card { background: #0F2142; -webkit-backdrop-filter: none; backdrop-filter: none; } }
