/* ═══════════════════════════════════════════════════════════════
   LOGIN MODERN — overlay tampilan (varian "Calm Minimal")
   File ini HANYA menimpa tampilan. Tidak mengubah HTML/JS/ID elemen.
   Dimuat setelah archives/css/style.css lewat header.php.
   Untuk membatalkan: hapus <link> ke file ini di header.php.

   Catatan penting:
   - #loginbox / #loginbody juga dipakai halaman Konfirmasi & Cek Nilai
     (class .konfirm) — aturan di sini dibuat tetap kompatibel.
   - Selector sengaja dibuat setara/mengungguli style.css
     (mis. #loginbody #submitlogin) supaya gaya lama tidak menang.
   - Font tetap Droid Sans (400/700 asli) agar tidak ada bold sintetis.
   ═══════════════════════════════════════════════════════════════ */

/* ── Latar halaman: gradien lembut senada header sekolah ── */
html {
    background: #e7edf7;
}

body {
    background: linear-gradient(180deg, #eff4fb 0%, #e7edf7 100%);
    min-height: 100vh;
}

/* Garis 4px di bawah header dibuat senada di halaman login */
body:has(#loginbox:not(.konfirm)) #header {
    border-bottom-color: #0d4b96;
}

/* ── Kartu login (bagian atas; footer kartu adalah elemen terpisah) ── */
#loginbox {
    background: #fff;
    border: 1px solid #e6ecf5;
    border-bottom: none;
    border-radius: 18px 18px 0 0;
    padding: 26px 34px 0;
    box-shadow: 0 22px 44px -18px rgba(21, 101, 192, 0.30);
    margin-top: 12px;
    color: #5a5a5a;
}

/* ── Judul ── */
#logintitle {
    text-align: center;
    border-bottom: 1px solid #eef2f7;
    padding-bottom: 14px;
    margin-bottom: 18px;
    font-size: 14px;
}

#logintitle h3 {
    font-weight: 700;
    color: #1565C0;
    font-size: 22px;
    margin: 0;
    letter-spacing: .2px;
}

/* aksen garis pendek di bawah judul */
#logintitle h3::after {
    content: "";
    display: block;
    width: 44px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, #1565C0, #5b9be4);
    margin: 10px auto 0;
}

#logintitle p {
    color: #7b8aa0;
    font-weight: 400;
    font-size: 13.5px;
    line-height: 1.55;
    text-align: center;
    margin: 13px 0 0;
}

/* ── Body form ── */
#loginbody {
    font-weight: 400;
    color: #46566b;
    padding-bottom: 18px;
}

#loginbody table {
    margin: auto;
    width: 100%;
}

#loginbody table td {
    padding: 7px 0;
    position: relative;
}

/* ── Input: modern, ringan, fokus biru ── */
#loginbody input[type=text],
#loginbody input[type=password],
#loginbody select {
    width: 100%;
    display: block;
    margin: 0;
    box-sizing: border-box;
    background: #f6f8fc;
    border: 1px solid #e4eaf3;
    border-radius: 12px;
    padding: 13px 14px 13px 42px;
    font-size: 14.5px;
    font-weight: 400;
    color: #26364a;
    text-align: left;
    box-shadow: none !important;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

#loginbody input[type=password],
#loginbody #password {
    padding-right: 40px;
}

#loginbody input[type=text]:focus,
#loginbody input[type=password]:focus,
#loginbody select:focus {
    background: #fff;
    border-color: #1565C0 !important;
    box-shadow: 0 0 0 4px rgba(21, 101, 192, 0.13) !important;
    outline: none;
}

#loginbody input::placeholder {
    color: #9aa9bd;
    opacity: 1;
}

/* ── Ikon kiri & mata kanan (menimpa bulatan abu CSS lama) ── */
#loginbody table td .glyphicon-user,
#loginbody table td .glyphicon-lock,
#loginbody table td .glyphicon-list-alt {
    background: transparent !important;
    background-color: transparent !important;
    color: #9aa9bd !important;
    border-radius: 0 !important;
    padding: 0 !important;
    width: auto;
    height: auto;
    left: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    position: absolute !important;
    z-index: 3;
    font-size: 14px;
    line-height: 1 !important;
}

#loginbody table td .glyphicon-lock:before,
#loginbody table td .glyphicon-user:before,
#loginbody table td .glyphicon-list-alt:before {
    position: static;
    left: 0;
}

#eye {
    position: absolute !important;
    right: 14px !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    left: auto !important;
    margin: 0 !important;
    color: #9aa9bd !important;
    background: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
    width: auto;
    height: auto;
    line-height: 1 !important;
    font-size: 15px;
    cursor: pointer;
    z-index: 5 !important;
}

#eye:hover {
    color: #1565C0 !important;
}

/* ── Dropdown mapel (#mapel adalah input readonly + .dropdown-menu) ── */
#divtest {
    position: relative;
}

#loginbody #mapel {
    font-weight: 400;
    color: #5b6b81;
    cursor: pointer;
    padding-right: 40px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239aa9bd' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    -webkit-appearance: none;
    appearance: none;
}

#loginbody #mapel:focus {
    color: #26364a;
}

#loginbody .dropdown {
    position: relative;
}

#loginbody ul.dropdown-menu {
    left: 0;
    right: auto;
    width: 100%;
    margin-top: 8px;
    padding: 6px;
    border: 1px solid #e4eaf3;
    border-radius: 12px;
    box-shadow: 0 18px 40px -14px rgba(16, 42, 86, 0.28);
    max-height: 252px;
    overflow-y: auto;
}

#loginbody .dropdown-menu>li {
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 400;
    color: #46566b;
    line-height: 1.3;
    border-radius: 8px;
    cursor: pointer;
}

#loginbody .dropdown-menu>li:hover,
#loginbody .dropdown-menu>li:focus {
    background: #eef4fd;
    color: #1565C0;
}

/* ── Tombol ── */
#loginbody button {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    padding: 13px 12px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15.5px;
    letter-spacing: .3px;
    line-height: 1.3;
    cursor: pointer;
    transition: filter .15s ease, box-shadow .15s ease, transform .08s ease;
}

#loginbody #submitlogin {
    background: linear-gradient(135deg, #1e61ad, #1565C0);
    color: #fff;
    box-shadow: 0 10px 22px -8px rgba(21, 101, 192, 0.55);
}

#loginbody #submitlogin:hover {
    filter: brightness(1.07);
    box-shadow: 0 14px 26px -8px rgba(21, 101, 192, 0.62);
}

#loginbody #submitlogin:active {
    transform: translateY(1px);
}

#loginbody #tombolDaftar button,
#loginbody #refreshWindow {
    color: #fff;
}

#loginbody #tombolLogin {
    margin-top: 6px;
}

/* ── Notifikasi (pesan error / sambutan) ── */
#notif {
    min-height: 4px;
}

#box_keterangan {
    color: #b3261e;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    padding: 8px 4px;
}

/* Error (JS mengganti isi, #pesan_homepage hilang) -> banner merah.
   Selector :has() gugur mulus di browser lawas = tampilan lama. */
#box_keterangan:not(:has(> #pesan_homepage)) {
    background: #fdecec;
    border: 1px solid #f7d3d3;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 4px;
}

/* Sambutan (opt_welcome terisi) -> banner info biru */
#box_keterangan:has(> #pesan_homepage) {
    color: #1565C0;
    background: #eef4fd;
    border: 1px solid #d7e4fa;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 4px;
}

/* Masih kosong -> tutup sepenuhnya */
#box_keterangan:has(> #pesan_homepage:empty) {
    padding: 0;
    margin-bottom: 0;
    background: none;
    border: none;
}

#pesan_homepage {
    color: #1565C0 !important;
    text-align: center;
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.55;
}

/* ── Footer kartu (halaman login: elemen bersaudara setelah #loginbox) ── */
#loginbox:not(.konfirm)+#loginfooter {
    background: #fff;
    border: 1px solid #e6ecf5;
    border-top-color: #eef2f7;
    border-radius: 0 0 18px 18px;
    padding: 13px 24px 15px;
    font-size: 11.5px;
    font-weight: 400;
    color: #97a4b8;
    box-shadow: 0 22px 44px -18px rgba(21, 101, 192, 0.30);
}

#loginbox:not(.konfirm)+#loginfooter p {
    margin: 0;
    text-align: center;
}

#loginbox:not(.konfirm)+#loginfooter .summary-log {
    margin-top: 5px;
    font-size: 11px;
}

#loginbox:not(.konfirm)+#loginfooter .summary-log .content {
    color: #a7b3c4;
    font-weight: 400;
}

/* ── Halaman Konfirmasi / Cek Nilai (footer di dalam kartu) ── */
#loginbox.konfirm #loginfooter {
    background: #fff;
    border-radius: inherit;
    font-weight: 400;
    color: #97a4b8;
}

/* kartu konfirmasi: border bawah dipertahankan (footer ada di dalam kartu) */
#loginbox.konfirm {
    border-bottom: 1px solid #e6ecf5;
}

/* ── Responsif ── */
@media (max-width: 560px) {
    #loginbox {
        padding: 22px 18px 0;
        border-radius: 16px 16px 0 0;
    }

    #loginbox:not(.konfirm)+#loginfooter {
        padding: 12px 16px 14px;
        border-radius: 0 0 16px 16px;
    }

    #logintitle h3 {
        font-size: 19px;
    }

    #loginbody button {
        font-size: 15px;
    }

    #header {
        padding-bottom: 90px;
    }
}
