/* Halaman login MB Gita Widya Agni — memakai token warna landing.css (terang, emas, merah api). */
.gwa-auth { min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--ivory); }

/* ---------- Panel showcase (kiri) ---------- */
.auth-showcase { position: relative; overflow: hidden; isolation: isolate; padding: 48px clamp(32px, 5vw, 72px); display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
    background: linear-gradient(160deg, #fffdf8 0%, var(--cream) 55%, #fde3c4 100%); border-right: 1px solid var(--line); }
.auth-showcase::before { content: ""; position: absolute; inset: -20%; z-index: -2;
    background:
        radial-gradient(38% 40% at 75% 25%, rgba(232, 181, 42, .38), transparent 70%),
        radial-gradient(34% 36% at 10% 95%, rgba(200, 32, 42, .16), transparent 70%),
        radial-gradient(26% 26% at 40% 5%, rgba(31, 122, 69, .10), transparent 70%); }
.auth-showcase::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .8;
    background-image: linear-gradient(rgba(138, 97, 0, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(138, 97, 0, .07) 1px, transparent 1px);
    background-size: 56px 56px; mask-image: radial-gradient(75% 70% at 50% 45%, #000 30%, transparent 85%); }
.auth-showcase .gwa-brand b { font-size: 1.2rem; }
.auth-stage { position: relative; display: grid; place-items: center; }
.auth-photo { position: relative; width: min(400px, 100%); aspect-ratio: 4 / 3; border-radius: 26px; overflow: hidden; border: 6px solid #fff; transform: rotate(-2deg); box-shadow: 0 40px 80px -40px rgba(90, 60, 10, .55); background: var(--cream); }
.auth-photo img { width: 100%; height: 100%; object-fit: cover; }
.auth-emblem { position: absolute; right: max(0px, calc(50% - 250px)); bottom: -34px; width: 118px; height: 118px; border-radius: 50%; background: #fff; display: grid; place-items: center; border: 3px solid var(--gold-soft); box-shadow: var(--shadow); animation: float 6s ease-in-out infinite; }
.auth-emblem img { width: 74%; }
.auth-stage.no-photo .auth-emblem { position: relative; right: auto; bottom: auto; width: 220px; height: 220px; }
.auth-chip { position: absolute; left: max(0px, calc(50% - 240px)); top: 10%; display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-size: .82rem; font-weight: 600; }
.auth-chip i { color: var(--flame); font-size: 1.2rem; }
.auth-quote { max-width: 460px; }
.auth-quote h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); line-height: 1.15; margin: 12px 0 10px; }
.auth-quote h2 em { font-style: italic; color: var(--gold-deep); }
.auth-quote p { color: var(--text-muted); margin: 0; }
.auth-stripe { display: flex; gap: 6px; }
.auth-stripe span { height: 4px; border-radius: 4px; flex: 4; background: var(--gold); }
.auth-stripe span:nth-child(2) { flex: 3; background: var(--flame); }
.auth-stripe span:nth-child(3) { flex: 2; background: var(--leaf); }

/* ---------- Panel form (kanan) ---------- */
.auth-panel { display: flex; flex-direction: column; padding: 32px clamp(20px, 5vw, 72px); }
.auth-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.auth-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; color: var(--text-muted); font-weight: 500; font-size: .92rem; transition: background-color .2s, color .2s; }
.auth-back:hover { background: var(--cream); color: var(--text); }
.auth-mobile-brand { display: none; }
.auth-body { flex: 1; display: grid; place-items: center; padding: 32px 0; }
.auth-card { width: min(440px, 100%); }
.auth-card h1 { font-size: clamp(2rem, 3.2vw, 2.6rem); line-height: 1.1; margin: 14px 0 10px; }
.auth-card h1 em { font-style: italic; color: var(--gold-deep); }
.auth-card .lead-text { color: var(--text-muted); margin-bottom: 30px; }

.auth-alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--blush); border: 1px solid rgba(200, 32, 42, .25); color: var(--flame-deep); font-weight: 500; margin-bottom: 22px; }
.auth-alert i { font-size: 1.25rem; line-height: 1.2; }

.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 8px; color: var(--text); }
.field-control { position: relative; }
.field-control > i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 1.15rem; color: var(--text-muted); pointer-events: none; transition: color .2s; }
.field-control input { width: 100%; height: 52px; padding: 0 52px 0 46px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; font-size: 1rem; color: var(--text); transition: border-color .2s, box-shadow .2s; }
.field-control input::placeholder { color: #9a9284; }
.field-control input:hover { border-color: #d9cdb4; }
.field-control input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(232, 181, 42, .25); }
.field-control:focus-within > i { color: var(--gold-deep); }
.field-control input[aria-invalid="true"] { border-color: rgba(200, 32, 42, .55); }
.toggle-pass { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--text-muted); font-size: 1.2rem; display: grid; place-items: center; cursor: pointer; transition: background-color .2s, color .2s; }
.toggle-pass:hover { background: var(--cream); color: var(--text); }
.field-hint { display: none; align-items: center; gap: 6px; margin-top: 8px; font-size: .84rem; color: #8a5a00; }
.field-hint.show { display: flex; }

.btn-submit { width: 100%; min-height: 54px; margin-top: 10px; font-size: 1rem; }
.btn-submit .spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(42, 31, 4, .25); border-top-color: var(--on-gold); animation: spin .8s linear infinite; display: none; }
.btn-submit.is-loading .spinner { display: inline-block; }
.btn-submit.is-loading .label-icon { display: none; }
.btn-submit[disabled] { opacity: .85; cursor: progress; transform: none; }

.auth-note { margin-top: 26px; padding: 14px 16px; border-radius: 14px; background: #fff; border: 1px dashed var(--line); font-size: .86rem; color: var(--text-muted); display: flex; gap: 10px; }
.auth-note i { color: var(--leaf); font-size: 1.1rem; }
.auth-foot { text-align: center; font-size: .82rem; color: var(--text-muted); }

/* Konten selain form (mis. akses ditolak) */
.auth-state { text-align: center; }
.auth-state .state-icon { width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 24px; display: grid; place-items: center; font-size: 2.2rem; background: var(--blush); color: var(--flame); }

/* ---------- Animasi (pola login GateSafetySecurity, tema marching band) ---------- */
/* Scene paranada di belakang isi showcase (di atas gradasi ::before, di bawah grid ::after). */
.auth-scene { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.auth-staff use { fill: none; stroke: rgba(138, 97, 0, .22); stroke-width: 1.3; }
.auth-staff-low use { stroke: rgba(138, 97, 0, .16); }
.auth-staff-flow { fill: none; stroke: rgba(200, 32, 42, .45); stroke-width: 1.8; stroke-dasharray: 2 12; stroke-linecap: round; animation: auth-dash 16s linear infinite; }
.auth-beat { fill: none; stroke: #c8202a; stroke-width: 1.4; transform-box: fill-box; transform-origin: center; animation: auth-pulse 2.4s ease-out infinite; }
.auth-drum { position: absolute; top: 40px; right: 40px; width: 140px; height: 140px; opacity: .35; z-index: -1; animation: spin 90s linear infinite; }
.auth-eq { position: absolute; right: clamp(32px, 5vw, 72px); bottom: 52px; display: flex; align-items: flex-end; gap: 5px; height: 46px; z-index: 0; }
.auth-eq span { width: 6px; height: 100%; border-radius: 3px; background: var(--gold); transform-origin: bottom; transform: scaleY(.3); animation: auth-eq 1.1s ease-in-out infinite alternate; }
.auth-eq span:nth-child(3n+2) { background: var(--flame); animation-duration: .9s; animation-delay: -.3s; }
.auth-eq span:nth-child(3n) { background: var(--leaf); animation-duration: 1.3s; animation-delay: -.6s; }
.auth-eq span:nth-child(4) { animation-delay: -.45s; }
.auth-eq span:nth-child(7) { animation-delay: -.8s; }
.auth-eq span:nth-child(10) { animation-delay: -.2s; }

/* Cincin ketukan drum di sekitar emblem logo */
.auth-emblem::before, .auth-emblem::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--gold); z-index: -1; animation: auth-ring 2.4s ease-out infinite; }
.auth-emblem::after { border-color: var(--flame); animation-delay: 1.2s; }
.auth-photo img { animation: auth-zoom 18s ease-in-out infinite alternate; }

/* Masuk bertahap saat halaman dibuka */
.auth-showcase > .gwa-brand, .auth-stage, .auth-quote, .auth-top, .auth-card > *, .auth-card form > * { animation: auth-rise .7s cubic-bezier(.2, .7, .2, 1) backwards; }
.auth-stage { animation-name: auth-pop; animation-duration: .9s; animation-delay: .15s; }
.auth-quote { animation-delay: .3s; }
.auth-card > :nth-child(1) { animation-delay: .1s; }
.auth-card > :nth-child(2) { animation-delay: .18s; }
.auth-card > :nth-child(3) { animation-delay: .26s; }
.auth-card > :nth-child(4) { animation-delay: .34s; }
.auth-card > :nth-child(n+5) { animation-delay: .42s; }
.auth-card form { animation: none; }
.auth-card form > :nth-child(n+3) { animation-delay: .4s; }
.auth-card form > :nth-child(n+4) { animation-delay: .48s; }
.auth-card form > :nth-child(n+5) { animation-delay: .56s; }
.auth-card form > :nth-child(n+6) { animation-delay: .64s; }
.auth-card form > .auth-alert { animation: auth-rise .5s cubic-bezier(.2, .7, .2, 1) backwards, auth-shake .45s .5s; }

/* Kilau emas berjalan di tombol Masuk */
.btn-submit { position: relative; overflow: hidden; }
.btn-submit::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-20deg); animation: auth-shine 4.5s ease-in-out 1.2s infinite; pointer-events: none; }
.btn-submit.is-loading::after { animation: none; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes auth-dash { to { stroke-dashoffset: -280; } }
@keyframes auth-pulse { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(2.4); opacity: 0; } }
@keyframes auth-ring { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes auth-eq { to { transform: scaleY(1); } }
@keyframes auth-zoom { to { transform: scale(1.08); } }
@keyframes auth-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes auth-pop { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes auth-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes auth-shine { 0% { left: -60%; } 40%, 100% { left: 130%; } }

@media (max-width: 991.98px) {
    .gwa-auth { grid-template-columns: 1fr; }
    .auth-showcase { display: none; }
    .auth-panel { background: linear-gradient(180deg, var(--cream) 0, var(--ivory) 260px); }
    .auth-mobile-brand { display: flex; }
    .auth-body { place-items: start center; padding-top: 24px; }
}
@media (max-width: 1199.98px) {
    .auth-eq { display: none; }
    .auth-drum { width: 100px; height: 100px; top: 28px; right: 28px; }
}
@media (prefers-reduced-motion: reduce) {
    .auth-emblem, .auth-emblem::before, .auth-emblem::after, .btn-submit .spinner, .btn-submit::after, .auth-staff-flow, .auth-beat, .auth-drum, .auth-eq span, .auth-photo img,
    .auth-showcase > .gwa-brand, .auth-stage, .auth-quote, .auth-top, .auth-card > *, .auth-card form > *, .auth-alert { animation: none !important; }
    .auth-emblem::before, .auth-emblem::after { display: none; }
}
