/* Halaman Lupa Password - berdiri sendiri (tidak butuh login.css) */

:root {
    --biru-tua: #1B2A4A;
    --abu: #5B6B84;
    --biru-muda: #EAF2FB;
    --biru-fokus: #3B82C4;
    --emas: #E0A526;
    --emas-gelap: #C98F14;
    --emas-teks: #8A6100;
    --merah: #C0392B;
    --merah-garis: #D64545;
    --nonaktif: #E9EDF2;
    --nonaktif-teks: #9AA5B4;
}

* {
    box-sizing: border-box;
}

body.halaman-lupa {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 24px 16px;
    background: #fff;
    color: var(--biru-tua);
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

.kartu {
    width: 100%;
    max-width: 400px;
    padding: 32px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(27, 42, 74, 0.10);
}

.kepala {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.ikon-atas {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.nama-web {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
}

h1 {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
}

.sub {
    max-width: 320px;
    margin: 0 auto 22px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--abu);
    text-align: center;
}

/* ---------- kolom ---------- */

.kolom {
    margin-bottom: 18px;
}

.kolom label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
}

.kolom input[type="email"],
.kolom input[type="password"],
.kolom .kotak-pw input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 2px solid transparent;
    border-radius: 10px;
    background: var(--biru-muda);
    color: var(--biru-tua);
    font: inherit;
    font-size: 15px;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}

.kolom input::placeholder {
    color: #8FA0B8;
}

.kolom input:focus,
.otp-kotak:focus {
    outline: none;
    border-color: var(--biru-fokus);
    box-shadow: 0 0 0 4px rgba(59, 130, 196, 0.18);
}

.kolom input:disabled {
    background: var(--nonaktif);
    color: var(--nonaktif-teks);
    cursor: not-allowed;
}

.bantu,
.galat-kolom,
.sisa {
    margin: 6px 0 0;
    font-size: 12.5px;
    line-height: 1.4;
}

.bantu {
    color: var(--abu);
}

.galat-kolom {
    color: var(--merah);
}

.galat-kolom[hidden] {
    display: none;
}

.kolom.salah input[type="email"],
.kolom.salah .kotak-pw input,
.kolom.salah .otp-kotak {
    border-color: var(--merah-garis);
}

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

.tombol,
.tombol-kirim {
    display: block;
    width: 100%;
    border-radius: 10px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s, color .15s, border-color .15s, transform .05s;
}

.tombol:active,
.tombol-kirim:active {
    transform: translateY(1px);
}

.tombol {
    height: 48px;
    margin-top: 4px;
    border: 0;
    background: var(--emas);
    color: var(--biru-tua);
    font-size: 16px;
}

.tombol:hover {
    background: var(--emas-gelap);
}

.tombol-kirim {
    height: 40px;
    margin: -4px 0 22px;
    border: 1.5px solid var(--emas);
    background: #fff;
    color: var(--emas-teks);
    font-size: 14px;
}

.tombol-kirim:hover {
    background: #FFF8E6;
}

.tombol:disabled,
.tombol-kirim:disabled {
    background: var(--nonaktif);
    border-color: var(--nonaktif);
    color: var(--nonaktif-teks);
    cursor: not-allowed;
    transform: none;
}

.tombol.memuat,
.tombol-kirim.memuat {
    opacity: .7;
    cursor: progress;
}

/* ---------- OTP ---------- */

.otp-baris {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.otp-kotak {
    flex: 1 1 0;
    min-width: 0;
    height: 52px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    background: var(--biru-muda);
    color: var(--biru-tua);
    font: inherit;
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}

.otp-kotak:disabled {
    background: var(--nonaktif);
    cursor: not-allowed;
}

.sisa {
    text-align: right;
    color: var(--abu);
}

.sisa b {
    font-weight: 700;
    color: var(--biru-tua);
}

.sisa.s1 b {
    color: #D9822B;
}

.sisa.s0 b {
    color: var(--merah);
}

/* ---------- password + mata ---------- */

.kotak-pw {
    position: relative;
}

.kolom .kotak-pw input {
    padding-right: 52px;
}

.mata {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.mata img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
}

.mata:focus-visible {
    outline: 2px solid var(--biru-fokus);
}

/* garis coret saat password terlihat */

.mata::after {
    content: "";
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--biru-tua);
    border-radius: 2px;
    transform: rotate(-45deg) scaleX(0);
    transition: transform .15s;
    pointer-events: none;
}

.mata.terlihat::after {
    transform: rotate(-45deg) scaleX(1);
}

/* ---------- kotak pesan ---------- */

.pesan {
    margin-bottom: 18px;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 13.5px;
    line-height: 1.45;
    animation: muncul .2s ease-out;
}

.pesan.galat-umum {
    background: #FDECEC;
    color: #8E2A20;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.pesan.galat-umum::before {
    content: "!";
    flex: none;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border-radius: 50%;
    background: var(--merah);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.pesan.berhasil {
    background: #E7F5EC;
    color: #1F6B42;
}

.pesan.peringatan {
    background: #FFF6DB;
    color: var(--emas-teks);
}

form.redup {
    opacity: .5;
    pointer-events: none;
}

@keyframes muncul {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

.kembali-login {
    color: var(--biru-tua);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.kembali-login:hover,
.kembali-login:focus-visible {
    text-decoration: underline;
}

/* ---------- layar kecil ---------- */

@media (max-width: 480px) {
    .kartu {
        padding: 24px;
    }

    .otp-baris {
        gap: 6px;
    }

    .otp-kotak {
        height: 48px;
        font-size: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}