/* ============================================================
   SIA-Net — Halaman Autentikasi (login & register)
   Tema: Modern Dark cinematic — kaca gelap + cahaya ambient.
   Mandiri dari sia.css agar tampilan selalu terkendali.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    font-family: 'Lexend', 'Source Sans 3', system-ui, sans-serif;
    color: #e2e8f0;
    background:
        radial-gradient(1100px 700px at 78% -10%, rgba(59, 130, 246, .10), transparent 60%),
        radial-gradient(900px 650px at 8% 108%, rgba(52, 211, 153, .10), transparent 60%),
        linear-gradient(160deg, #0a1e38 0%, #071729 55%, #050f20 100%);
    overflow-x: hidden;
}

/* ---------------- cahaya ambient mengambang ---------------- */

.auth-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
}
.auth-glow--emerald {
    width: 420px; height: 420px;
    top: -140px; left: -120px;
    background: rgba(52, 211, 153, .17);
    animation: apung 19s ease-in-out infinite alternate;
}
.auth-glow--biru {
    width: 480px; height: 480px;
    bottom: -180px; right: -140px;
    background: rgba(96, 165, 250, .15);
    animation: apung 24s ease-in-out infinite alternate-reverse;
}
@keyframes apung {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(60px, 40px, 0) scale(1.12); }
}

/* jaring titik samar bernuansa fintech */
.auth-grid-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(148, 163, 184, .07) 1px, transparent 1px);
    background-size: 30px 30px;
    mask-image: radial-gradient(circle at 50% 40%, black, transparent 78%);
    -webkit-mask-image: radial-gradient(circle at 50% 40%, black, transparent 78%);
}

/* ---------------- kartu kaca ---------------- */

.auth-card {
    position: relative;
    z-index: 1;
    width: min(440px, 100%);
    padding: 36px 32px 28px;
    border-radius: 22px;
    background: linear-gradient(165deg, rgba(23, 35, 66, .78), rgba(13, 21, 43, .82));
    border: 1px solid rgba(255, 255, 255, .09);
    box-shadow:
        0 24px 70px rgba(2, 8, 20, .55),
        inset 0 1px 0 rgba(255, 255, 255, .06);
    backdrop-filter: blur(18px) saturate(1.25);
    -webkit-backdrop-filter: blur(18px) saturate(1.25);
}

/* garis aksen di puncak kartu */
.auth-card::before {
    content: '';
    position: absolute;
    top: 0; left: 24px; right: 24px;
    height: 1px;
    background: linear-gradient(90deg, transparent,
        rgba(52, 211, 153, .65), rgba(96, 165, 250, .65), transparent);
}

/* ---------------- identitas merek ---------------- */

.auth-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 26px;
}
.auth-brand-mark {
    width: 47px; height: 47px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    font-size: 19px;
    background: linear-gradient(135deg, #34d399 0%, #38bdf8 100%);
    box-shadow: 0 8px 22px rgba(52, 211, 153, .35);
}
.auth-brand h2 {
    margin: 0;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: .01em;
    color: #f1f5f9;
}
.auth-brand span {
    display: block;
    margin-top: 2px;
    font-size: 12.5px;
    color: #94a3b8;
}

/* ---------------- judul & subjudul ---------------- */

.auth-judul h1 { margin: 0 0 4px; font-size: 21px; font-weight: 600; color: #f1f5f9; }
.auth-judul p { margin: 0 0 22px; font-size: 13.5px; line-height: 1.55; color: #94a3b8; }

/* ---------------- pesan flash ---------------- */

.auth-flash {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    border: 1px solid;
}
.auth-flash i { font-size: 15px; margin-top: 2px; flex-shrink: 0; }
.auth-flash strong { display: block; margin-bottom: 2px; }

.auth-flash--sukses { background: rgba(52, 211, 153, .10); border-color: rgba(52, 211, 153, .28); color: #a7f3d0; }
.auth-flash--galat { background: rgba(248, 113, 113, .10); border-color: rgba(248, 113, 113, .30); color: #fecaca; }
.auth-flash--info { background: rgba(96, 165, 250, .10); border-color: rgba(96, 165, 250, .28); color: #bfdbfe; }

/* ---------------- formulir ---------------- */

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-group label {
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: .02em;
    color: #cbd5e1;
}

.auth-field { position: relative; }

.auth-field > i.fa-user, .auth-field > i.fa-lock, .auth-field > i.fa-envelope {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    font-size: 13.5px;
    color: #64748b;
    transition: color .2s ease;
    pointer-events: none;
}
.auth-field input:focus ~ i.fa-user,
.auth-field input:focus ~ i.fa-lock,
.auth-field input:focus ~ i.fa-envelope { color: #34d399; }

.auth-field input {
    width: 100%;
    padding: 12px 42px 12px 41px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .045);
    color: #f1f5f9;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.auth-field input::placeholder { color: #475569; }
.auth-field input:hover { border-color: rgba(255, 255, 255, .16); }
.auth-field input:focus {
    border-color: rgba(52, 211, 153, .55);
    background: rgba(52, 211, 153, .05);
    box-shadow: 0 0 0 3px rgba(52, 211, 153, .14);
}

/* tombol lihat/sembunyikan sandi */
.auth-lihat {
    position: absolute;
    right: 8px; top: 50%;
    transform: translateY(-50%);
    width: 30px; height: 30px;
    display: grid; place-items: center;
    border: none; border-radius: 8px;
    background: transparent;
    color: #64748b;
    font-size: 13px;
    cursor: pointer;
    transition: color .15s ease, background-color .15s ease;
}
.auth-lihat:hover { color: #cbd5e1; background: rgba(255, 255, 255, .06); }

.field-error {
    margin: 2px 0 0;
    font-size: 12px;
    color: #fca5a5;
}

/* ---------------- tombol utama ---------------- */

.btn-auth {
    width: 100%;
    margin-top: 4px;
    padding: 13px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: .01em;
    color: #06281c;
    cursor: pointer;
    background: linear-gradient(135deg, #34d399 0%, #2dd4bf 55%, #38bdf8 130%);
    box-shadow: 0 10px 26px rgba(45, 212, 168, .30), inset 0 1px 0 rgba(255, 255, 255, .25);
    transition: transform .15s ease, box-shadow .25s ease, filter .2s ease;
}
.btn-auth:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(45, 212, 168, .38); filter: brightness(1.04); }
.btn-auth:active { transform: translateY(0) scale(.97); }
.btn-auth:disabled { opacity: .65; cursor: wait; transform: none; }
.btn-auth:focus-visible { outline: 2px solid #6ee7b7; outline-offset: 2px; }

.btn-auth--sekunder {
    background: rgba(255, 255, 255, .06);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
    color: #e2e8f0;
}
.btn-auth--sekunder:hover {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .24);
    filter: none;
}

/* ---------------- kirim ulang verifikasi (details/summary) ---------------- */

.auth-kirim-ulang {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}
.auth-kirim-ulang summary {
    font-size: 13.5px;
    color: #94a3b8;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
}
.auth-kirim-ulang summary::before {
    content: "\f078";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 10px;
    transition: transform .18s ease;
}
.auth-kirim-ulang[open] summary::before { transform: rotate(180deg); }
.auth-kirim-ulang summary:hover { color: #cbd5e1; }
.auth-kirim-ulang summary::-webkit-details-marker { display: none; }
.auth-kirim-ulang .auth-form { margin-top: 14px; }

/* ---------------- tautan bawah kartu ---------------- */

.auth-aksi {
    margin-top: 20px;
    text-align: center;
    font-size: 13.5px;
    color: #94a3b8;
}
.auth-aksi a {
    color: #6ee7b7;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: color .15s ease;
}
.auth-aksi a:hover { color: #a7f3d0; text-decoration: underline; }

.auth-kaki {
    position: relative;
    z-index: 1;
    margin-top: 18px;
    font-size: 12px;
    color: #475569;
    text-align: center;
}

/* ---------------- gerbang animasi ----------------
   Elemen disembunyikan sejak HTML dikirim, lalu dianimasikan
   masuk oleh auth-motion.js; pengaman waktu memunculkannya
   bila pustaka Motion gagal dimuat. */
.js-motion [data-gerak] { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
    .js-motion [data-gerak] { opacity: 1 !important; }
}

/* ---------------- responsif ---------------- */

@media (max-width: 480px) {
    body { padding: 16px; }
    .auth-card { padding: 26px 20px 22px; border-radius: 18px; }
    .auth-brand-mark { width: 42px; height: 42px; }
}
