/* =========================================================
   HASTO LIBRARY - STYLE UTAMA
   ========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: rgb(12, 189, 220);
}

/* ---------- Header (kepala.php) ---------- */
.Header {
    background-color: brown;
    width: 100%;
    height: 350px;
    position: relative;
}

.perpus {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.textgambar {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 45px;
    font-weight: bold;
    color: aliceblue;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    text-align: center;
    pointer-events: none;
}

.textgambar p {
    font-size: 18px;
    font-weight: normal;
    margin-top: 6px;
    letter-spacing: 1px;
}

/* ---------- Menu (menu.php) ---------- */
.Menu {
    background-color: rgb(179, 232, 245);
    position: relative;
    z-index: 100;
    width: 100%;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.Menu ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 10px;
    margin: 0;
}

.Menu a {
    color: black;
    text-decoration: none;
    font-weight: bold;
    padding: 6px 12px;
    border-radius: 4px;
    display: inline-block;
    transition: background-color 0.2s;
}

.Menu a:hover,
.Menu a.aktif {
    background-color: rgb(194, 255, 255);
}

.Menu a.aktif {
    box-shadow: inset 0 -3px 0 rgb(30, 165, 210);
}

.Menu .keterangan {
    font-weight: bold;
    color: #333;
}

/* ---------- Isi halaman ---------- */
#Sampul {
    display: flex;
    min-height: 500px;
}

.Konten {
    background-color: rgb(12, 189, 220);
    width: 80%;
    padding: 25px;
}

.Sidebar {
    background-color: rgb(30, 165, 210);
    width: 20%;
    padding: 25px;
}

.teksside {
    color: aliceblue;
    font-size: 24px;
    font-weight: bold;
    line-height: 1.4;
}

.InfoPengguna {
    margin-top: 15px;
    background-color: rgba(255, 255, 255, 0.15);
    color: aliceblue;
    padding: 12px;
    border-radius: 6px;
    line-height: 1.6;
}

.InfoPengguna b {
    font-size: 18px;
}

.deskripsi {
    margin-top: 10px;
    margin-bottom: 10px;
    color: #555;
    line-height: 1.6;
}

.KotakInfo {
    background-color: #fcf8ec;
    padding: 15px;
    border-left: 4px solid chocolate;
    border-radius: 4px;
    margin: 20px 0;
}

.KotakInfo h3 {
    margin-bottom: 8px;
}

.KotakInfo ul {
    margin-left: 20px;
    line-height: 1.8;
}

/* ---------- Tabel data ---------- */
.Tabel {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

.Tabel th,
.Tabel td {
    border: 1px solid #999;
    padding: 10px;
}

.Tabel thead tr {
    background-color: rgb(179, 232, 245);
}

.Tabel .tengah {
    text-align: center;
}

/* DataTables di atas latar biru */
.dt-container {
    background-color: white;
    padding: 15px;
    border-radius: 6px;
}

/* ---------- Tombol ---------- */
.Tombol {
    display: inline-block;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s, background-color 0.2s;
}

.Tombol:hover {
    opacity: 0.85;
}

.TombolTambah {
    background-color: rgb(179, 232, 245);
    color: black;
}

.TombolSimpan {
    background-color: #4CAF50;
    color: white;
}

.TombolBatal {
    background-color: #f44336;
    color: white;
    margin-left: 10px;
}

.TombolKecil {
    display: inline-block;
    padding: 4px 10px;
    margin: 2px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

.TombolEdit {
    background-color: rgb(30, 165, 210);
}

.TombolHapus {
    background-color: #f44336;
}

/* ---------- Form tambah / edit ---------- */
.Form {
    max-width: 500px;
    background-color: white;
    padding: 20px;
    border-radius: 6px;
}

.Form .baris {
    margin-bottom: 15px;
}

.Form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.Form input,
.Form select,
.Form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #bbb;
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
}

.Form input[readonly] {
    background-color: #eee;
}

.Form textarea {
    height: 80px;
}

/* samakan tinggi select2 dengan input biasa */
.Form .select2-container .select2-selection--single {
    height: 37px;
    border-color: #bbb;
}

.Form .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 35px;
}

.Form .select2-container .select2-selection--single .select2-selection__arrow {
    height: 35px;
}

.Form .garis {
    border-top: 1px solid #ccc;
    padding-top: 15px;
}

.buku-row {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.buku-row select {
    flex: 1;
}

.TombolPlus,
.TombolMinus {
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.TombolPlus {
    background-color: #f44336;
}

.TombolMinus {
    background-color: #000000;
}

/* tombol Edit pada form edit (input type submit) */
.Form input[type="submit"] {
    width: auto;
    background-color: #4CAF50;
    color: white;
    padding: 10px 15px;
    border: none;
    font-weight: bold;
    cursor: pointer;
}

.Form table td {
    padding: 6px 8px;
}

.Form table td:first-child {
    font-weight: bold;
    white-space: nowrap;
}

/* ---------- Footer ---------- */
.Footer {
    background-color: rgb(179, 232, 245);
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* ---------- Halaman login & logout ---------- */
#Login {
    background-color: rgb(12, 189, 220);
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.KotakLogin {
    background-color: #fdf6e9;
    width: 100%;
    max-width: 400px;
    padding: 30px;
    border-radius: 8px;
    border-left: 4px solid chocolate;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.KotakLogin h2 {
    margin-bottom: 6px;
}

.KotakLogin .deskripsi {
    margin-top: 0;
}

.KotakLogin label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
}

.KotakLogin input[type="text"],
.KotakLogin input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 16px;
    border: 1px solid #bbb;
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
    background-color: white;
}

.KotakLogin input:focus {
    outline: none;
    border-color: rgb(30, 165, 210);
    box-shadow: 0 0 0 3px rgba(30, 165, 210, 0.25);
}

.KotakLogin button,
.KotakLogin .TombolLogin {
    display: block;
    width: 100%;
    padding: 11px;
    background-color: rgb(179, 232, 245);
    color: black;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    font-family: inherit;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.KotakLogin button:hover,
.KotakLogin .TombolLogin:hover {
    background-color: rgb(194, 255, 255);
}

.KotakLogin .ikon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 10px;
}

.KotakLogin.tengah {
    text-align: center;
}

/* ---------- Form login tanpa card ---------- */
.FormLogin {
    width: 100%;
    max-width: 400px;
}

.FormLogin h2 {
    margin-bottom: 6px;
}

.FormLogin .deskripsi {
    margin-top: 0;
    margin-bottom: 20px;
}

.FormLogin label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
}

.FormLogin input[type="text"],
.FormLogin input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 16px;
    border: 1px solid #bbb;
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
    background-color: white;
}

.FormLogin input:focus {
    outline: none;
    border-color: rgb(30, 165, 210);
    box-shadow: 0 0 0 3px rgba(30, 165, 210, 0.25);
}

.FormLogin button,
.FormLogin .TombolLogin {
    display: block;
    width: 100%;
    padding: 11px;
    background-color: rgb(179, 232, 245);
    color: black;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    font-family: inherit;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.FormLogin button:hover,
.FormLogin .TombolLogin:hover {
    background-color: rgb(194, 255, 255);
}

.FormLogin.tengah {
    text-align: center;
}

/* ---------- Pesan (berhasil / gagal) ---------- */
.Pesan {
    padding: 10px 12px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.4;
}

.PesanGagal {
    background-color: #fde2e1;
    color: #a12622;
    border-left: 4px solid #f44336;
}

.PesanInfo {
    background-color: #e3f6fb;
    color: #145a70;
    border-left: 4px solid rgb(30, 165, 210);
}

/* ---------- Layar kecil (HP) ---------- */
@media (max-width: 768px) {
    .Header {
        height: 220px;
    }

    .textgambar {
        font-size: 32px;
    }

    #Sampul {
        flex-direction: column;
    }

    .Konten,
    .Sidebar {
        width: 100%;
    }

    .Menu {
        padding: 10px;
    }
}