/*
 * Buku Kuliah: halaman masuk, aktivasi, dan ganti password portal mahasiswa.
 * Membuka buku: sampul bookcloth navy (pita atas di HP, separuh kiri di layar lebar)
 * dan lembar kertas pertama yang memuat formulir. Token dan komponen dari dasar.css.
 */

html, body { margin: 0; }
body.masuk {
    min-height: 100vh; min-height: 100dvh;
    font-family: var(--f-ui); font-size: 16px; line-height: 1.5;
    -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body.masuk *, body.masuk *::before, body.masuk *::after { box-sizing: border-box; }
/* :where() menjaga reset tetap ringan, supaya kelas komponen (margin, huruf tombol) menang. */
:where(body.masuk) :where(h1, h2, p) { margin: 0; }
:where(body.masuk) :where(button) { font: inherit; }
:where(body.masuk) :where(img) { max-width: 100%; }

.masuk-buku { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

/* ---------------------------------------------------------------- Sampul */
.masuk-sampul {
    position: relative; overflow: hidden;
    padding: max(20px, env(safe-area-inset-top)) 20px 68px;
}
.masuk-sampul::after { /* jahitan tepi sampul */
    content: ""; position: absolute; inset: 9px 9px -12px; pointer-events: none;
    border: 1px dashed rgba(232, 181, 74, .3); border-radius: 4px;
}
.masuk-merek { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 14px; min-height: 48px; text-decoration: none; }
.masuk-merek .lambang {
    width: 48px; height: 48px; flex: 0 0 auto; border-radius: 50%; padding: 7px;
    display: grid; place-items: center; background: var(--kertas-putih);
    box-shadow: 0 0 0 2px var(--foil), 0 0 0 4px rgba(0, 0, 0, .25);
}
.masuk-merek .lambang img { max-width: 100%; max-height: 100%; object-fit: contain; }
.merek-teks { display: block; }
.merek-buku { display: block; font-size: 22px; line-height: 1.1; letter-spacing: .07em; text-transform: uppercase; }
.merek-lembaga { display: block; margin-top: 3px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--di-sampul); }

.sampul-tengah, .sampul-kaki { display: none; }

@media (min-width: 1024px) {
    .masuk-buku { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .masuk-sampul {
        position: sticky; top: 0; align-self: start;
        height: 100vh; height: 100dvh;
        display: flex; flex-direction: column; justify-content: space-between;
        padding: 52px 56px 44px;
    }
    .masuk-sampul::after { inset: 16px; }
    .masuk-sampul::before { /* roset pengaman emas, timbul samar */
        content: ""; position: absolute; right: -150px; bottom: -150px; width: 560px; height: 560px;
        background: url('../../img/buku/roset-emas.svg') center / contain no-repeat;
        opacity: .16; pointer-events: none;
    }
    .masuk-sampul > * { position: relative; z-index: 1; }
    .merek-buku { font-size: 16px; }
    .sampul-tengah { display: block; }
    .sampul-judul {
        font-family: var(--f-timbul); font-weight: 700; text-transform: uppercase;
        font-size: clamp(64px, 6.6vw, 104px); line-height: .94; letter-spacing: .035em;
    }
    .sampul-garis { width: 76px; height: 2px; margin: 30px 0 22px; background: var(--foil); box-shadow: 0 1px 0 rgba(0, 0, 0, .45); }
    .sampul-lembaga { font-size: 14px; font-weight: 600; line-height: 1.6; letter-spacing: .14em; text-transform: uppercase; color: var(--di-sampul); }
    .sampul-kaki { display: block; max-width: 34ch; font-size: 15px; line-height: 1.55; color: var(--di-sampul); }
}

/* ---------------------------------------------------------------- Lembar kertas */
.masuk-isi {
    position: relative; z-index: 2; flex: 1 0 auto;
    display: flex; flex-direction: column; align-items: center;
    margin-top: -44px; padding: 0 16px calc(24px + env(safe-area-inset-bottom));
}
@media (min-width: 1024px) {
    .masuk-isi {
        margin-top: 0; min-height: 100vh; min-height: 100dvh; justify-content: center;
        padding: 48px 40px;
        background: rgba(6, 13, 34, .32);
        box-shadow: inset 18px 0 26px -18px rgba(0, 0, 0, .65); /* lipatan punggung buku */
    }
}

.masuk-lembar {
    width: 100%; max-width: 440px;
    padding: 18px 20px 24px;
    border-radius: 3px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 26px 48px -24px rgba(0, 0, 0, .75), 0 2px 6px -1px rgba(0, 0, 0, .3);
}
@media (min-width: 480px) { .masuk-lembar { padding: 22px 32px 30px; } }

.masuk-judul { margin-top: 20px; font-family: var(--f-timbul); font-weight: 700; font-size: 28px; line-height: 1.15; letter-spacing: .005em; color: var(--tinta); }
.masuk-sub { margin-top: 6px; font-size: 15px; color: var(--tinta-2); }
.masuk-pesan { margin-top: 18px; }
.masuk-pesan p { margin: 0; }
.masuk-pesan strong { font-weight: 700; }
.masuk-pesan-tombol { margin-top: 12px; }
.masuk-pengantar { margin-top: 14px; font-size: 15px; line-height: 1.55; color: var(--tinta-2); }

/* ---------------------------------------------------------------- Formulir */
.masuk-form { margin-top: 22px; display: grid; gap: 20px; }
.masuk-form .isian input { margin: 0; }
.isian .isian-cetak { font-family: var(--f-cetak); font-weight: 500; letter-spacing: .08em; }
.isian .isian-cetak::placeholder { letter-spacing: .02em; }

.isian-kepala { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 2px; }
.isian-kepala label { margin-bottom: 0; }
.isian-lupa {
    min-height: 44px; margin-right: -6px; padding: 0 6px;
    background: none; border: 0; cursor: pointer;
    font: 600 14px/1 var(--f-ui); color: var(--sampul-muda);
    text-decoration: underline; text-decoration-color: rgba(30, 58, 138, .35); text-underline-offset: .2em;
}
.isian-lupa:hover { text-decoration-color: currentColor; }

.isian-sandi { position: relative; }
.isian-sandi input { padding-right: 52px; }
.isian-mata {
    position: absolute; top: 0; right: 0; width: 48px; height: 48px;
    display: grid; place-items: center; padding: 0;
    background: none; border: 0; border-radius: 4px; cursor: pointer;
    font-size: 19px; color: var(--tinta-2);
}
.isian-mata:hover { color: var(--tinta); }

.masuk-lupa {
    margin-top: 12px; padding: 14px;
    display: grid; gap: 12px;
    font-size: 14px; line-height: 1.55; color: var(--tinta-2);
    background: var(--kertas-putih); border: 1px dashed var(--garis-titik); border-radius: 4px;
}

/* Garis sobekan: memisahkan bukti identitas dari password baru. */
.masuk-sobek { height: 0; margin: 2px 0; border: 0; border-top: 1px dashed var(--garis-titik); }

.masuk-petunjuk { margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--tinta-2); text-align: center; }
.masuk-petunjuk--kiri { margin-top: 0; display: flex; gap: 8px; text-align: left; }
.masuk-petunjuk--kiri .bi { color: var(--tinta-3); line-height: 1.5; }

.masuk-alih { margin-top: 18px; text-align: center; font-size: 15px; color: var(--tinta-2); }
.masuk-alih .tautan { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }

/* Tautan lain: baris cetak bertitik, bukan kartu. */
.masuk-lain { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--garis); }
.masuk-lain li { border-bottom: 1px dotted var(--garis-titik); }
.masuk-lain a {
    display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 2px;
    color: var(--tinta); font-size: 15px; font-weight: 600; text-decoration: none;
}
.masuk-lain a > .bi:first-child { font-size: 18px; color: var(--sampul-muda); }
.masuk-lain a span { flex: 1 1 auto; }
.masuk-lain a .ujung { color: var(--tinta-3); font-size: 14px; }
.masuk-lain a:hover span { text-decoration: underline; text-decoration-color: var(--garis-titik); }

/* ---------------------------------------------------------------- Bantuan di atas kain sampul */
.masuk-bantuan {
    width: 100%; max-width: 440px; margin-top: 22px;
    display: grid; gap: 2px; text-align: center;
    font-size: 14.5px; color: var(--di-sampul);
}
.masuk-bantuan a {
    display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
    color: #fff; font-weight: 600; text-decoration: underline; text-decoration-color: rgba(232, 181, 74, .6);
}
.masuk-bantuan a:hover { text-decoration-color: var(--foil); }
.masuk-wa .bi { color: var(--foil-terang); }
.masuk-bantuan .masuk-kembali { font-weight: 500; text-decoration: none; color: var(--di-sampul); }
.masuk-bantuan .masuk-kembali:hover { color: #fff; }
.masuk-hak { margin-top: 4px; font-size: 12.5px; color: #B9C5E0; }
