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

html, body {
    width: 100%;
    height: 100%;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    color: #3a3128;
    background-color: #faf7f2;
}

/* judul bergaya buku (serif) */
h1, h2, h3 {
    font-family: Georgia, "Palatino Linotype", "Book Antiqua", serif;
    font-weight: normal;
    color: #2f4a3c;
    letter-spacing: 0.2px;
}

.wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}


.header {
    width: 100%;
    height: 180px;
    background-color: #fff;
    overflow: hidden;
    position: relative;
}

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

/* MENU */
.menu {
    width: 100%;
    background-color: #2f4a3c;
}

.menu ul {
    list-style: none;
    display: flex;
}

.menu ul li a {
    display: block;
    padding: 14px 20px;
    text-decoration: none;
    color: #efe8d6;
    font-weight: normal;
    font-family: Georgia, "Palatino Linotype", serif;
    letter-spacing: 0.4px;
    text-transform: capitalize;
}

.menu ul li a:hover {
    background-color: #3b5a48;
    color: #fff;
}

.main {
    display: flex;
    flex: 1;
    width: 100%;
}

.leftbar {
    width: 20%;
    padding: 20px;
    background-color: #f1ebe0;
    border-right: 1px solid #ddd3c2;
    color: #3a3128;
}

.konten {
    width: 80%;
    padding: 20px;
    background-color: #faf7f2;
}


.footer {
    width: 100%;
    padding: 20px;
    text-align: center;
    background-color: #2f4a3c;
    color: #e9e1cf;
    font-family: Georgia, "Palatino Linotype", serif;
    font-size: 14px;
    letter-spacing: 0.5px;
}


form table {
    margin-top: 20px;
    background: #fffdf9;
    padding: 25px 35px;
    border-radius: 4px;
    border: 1px solid #ddd3c2;
    box-shadow: 0 2px 8px rgba(60, 45, 25, 0.07);
}

form table td {
    padding: 10px;
    font-size: 15px;
}

form table input[type="text"],
form table input[type="password"],
form table input[type="number"],
form table select,
form table textarea {
    width: 250px;
    padding: 8px 12px;
    border: 1px solid #d6ccba;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    background-color: #fff;
    color: #3a3128;
}

form table input:focus,
form table select:focus,
form table textarea:focus {
    outline: none;
    border-color: #2f4a3c;
    box-shadow: 0 0 0 2px rgba(47, 74, 60, 0.12);
}

form table input[type="submit"] {
    padding: 8px 20px;
    background-color: #2f4a3c;
    color: #f6f1e4;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

form table input[type="submit"]:hover {
    background-color: #44624f;
}


.table-data {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}
.table-data th, .table-data td {
    color: #3a3128;
    padding: 8px 10px;
    border: 1px solid #d6ccba;
    text-align: left;
}
.table-data th {
    color: #2f4a3c;
    background-color: #efe8da;
    color: #2f4a3c;
    font-weight: bold;
}
.table-data tr:nth-child(even) {
    background-color: #fbf8f2;
}
.btn {
    display: inline-block;
    padding: 7px 15px;
    background-color: #2f4a3c;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 12px;
    border: none;
    cursor: pointer;
}
.btn:hover {
    background-color: #44624f;
}
.action-link {
    color: #2f4a3c;
    text-decoration: none;
    font-weight: bold;
}
.action-link:hover {
    text-decoration: underline;
}
.action-link.delete {
    color: #9b3a2e;
}

/* ===== DATATABLES (pencarian & pagination) ===== */
.konten .dt-container {
    margin-top: 15px;
    width: 100%;
    overflow-x: auto;
    font-size: 14px;
}
.konten .dt-container .dt-search label,
.konten .dt-container .dt-length label {
    font-weight: bold;
    color: #3a3128;
}
.konten .dt-container .dt-search input,
.konten .dt-container .dt-length select {
    padding: 6px 10px;
    margin: 0 6px;
    border: 1px solid #d6ccba;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}
.konten .dt-container .dt-search input {
    width: 240px;
}
.konten .dt-container .dt-search input:focus,
.konten .dt-container .dt-length select:focus {
    outline: none;
    border-color: #2f4a3c;
}
.konten .dt-container .dt-layout-row {
    margin: 8px 0;
}
.konten .dt-container table.table-data {
    margin-top: 8px;
}
.konten .dt-container table.table-data thead th {
    background-color: #2f4a3c;
    color: #f1ebdb;
    border: 1px solid #2f4a3c;
}
.konten .dt-container table.table-data tbody tr:hover {
    background-color: #f1ede2;
}
.konten .dt-container .dt-info {
    color: #7a6e5c;
    padding-top: 6px;
}
.konten .dt-container .dt-paging .dt-paging-button {
    padding: 5px 12px;
    margin: 0 2px;
    border: 1px solid #d6ccba;
    border-radius: 4px;
    background: #fffdf9;
    color: #2f4a3c !important;
    cursor: pointer;
}
.konten .dt-container .dt-paging .dt-paging-button:hover {
    background: #44624f;
    border-color: #44624f;
    color: #fff !important;
}
.konten .dt-container .dt-paging .dt-paging-button.current {
    background: #2f4a3c;
    border-color: #2f4a3c;
    color: #fff !important;
    font-weight: bold;
}
.konten .dt-container .dt-paging .dt-paging-button.disabled {
    opacity: 0.45;
    cursor: default;
}
.konten .dt-container .dt-paging .dt-paging-button.disabled:hover {
    background: #fffdf9;
    border-color: #d6ccba;
    color: #2f4a3c !important;
}

/* rata kiri untuk semua kolom (DataTables meratakan angka ke kanan secara default) */
.konten .dt-container table.table-data th,
.konten .dt-container table.table-data td {
    text-align: left;
}
.konten .dt-container table.table-data th .dt-column-header {
    justify-content: flex-start;
}
.konten .dt-container .dt-paging .dt-paging-button[aria-current="page"] {
    background: #2f4a3c;
    border-color: #2f4a3c;
    color: #fff !important;
    font-weight: bold;
}


/* ===== Aksen perpustakaan ===== */
a { color: #2f4a3c; }

/* pesan error / info di halaman (override inline style) */
p[style*="color: red"]   { color: #9b3a2e !important; }
p[style*="color: green"] { color: #3f6b4f !important; }
span[style*="#999"]      { color: #9a8f7c !important; }

/* ===== LOGIN (hanya berlaku di halaman login) ===== */
body.login-page {
    height: auto;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background-color: #f3eee2;
    background-image:
        radial-gradient(circle at 15% 20%, rgba(47, 74, 60, 0.10) 0, transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(176, 141, 62, 0.14) 0, transparent 45%),
        repeating-linear-gradient(90deg, rgba(47, 74, 60, 0.035) 0 2px, transparent 2px 28px);
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: #fffdf9;
    border: 1px solid #ddd3c2;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(47, 74, 60, 0.16), 0 2px 6px rgba(60, 45, 25, 0.08);
    overflow: hidden;
}

.login-head {
    text-align: center;
    padding: 28px 24px 22px;
    background: #2f4a3c;
    border-bottom: 4px solid #b08d3e;
}

.login-head h2 {
    color: #f6f1e4;
    font-size: 28px;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.login-head p {
    color: #d9cfae;
    font-family: Georgia, "Palatino Linotype", serif;
    font-size: 14px;
    letter-spacing: 0.6px;
}

.login-body {
    padding: 28px 30px 32px;
}

.login-body h3 {
    text-align: center;
    font-size: 20px;
    margin-bottom: 18px;
}

.login-body label {
    display: block;
    margin: 14px 0 6px;
    font-size: 14px;
    font-weight: bold;
    color: #3a3128;
}

.login-body input[type="text"],
.login-body input[type="password"] {
    display: block;
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #d6ccba;
    border-radius: 5px;
    background: #fff;
    font-size: 15px;
    font-family: inherit;
    color: #3a3128;
    transition: border-color .15s, box-shadow .15s;
}

.login-body input[type="text"]:focus,
.login-body input[type="password"]:focus {
    outline: none;
    border-color: #2f4a3c;
    box-shadow: 0 0 0 3px rgba(47, 74, 60, 0.14);
}

.login-body input[type="submit"] {
    display: block;
    width: 100%;
    margin-top: 24px;
    padding: 12px;
    background: #2f4a3c;
    color: #f6f1e4;
    border: none;
    border-radius: 5px;
    font-size: 15px;
    font-weight: bold;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .15s, transform .05s;
}

.login-body input[type="submit"]:hover  { background: #44624f; }
.login-body input[type="submit"]:active { transform: translateY(1px); }

.login-pesan {
    padding: 10px 14px;
    margin-bottom: 4px;
    border-radius: 5px;
    font-size: 14px;
    text-align: center;
}
.login-pesan.error {
    background: #f8e6e3;
    border: 1px solid #e3b9b2;
    color: #9b3a2e;
}
.login-pesan.warning {
    background: #fff4d6;
    border: 1px solid #e6c36a;
    border-left: 5px solid #b08d3e;
    color: #6b4e0f;
    text-align: left;
    font-weight: bold;
}
.login-pesan.warning .ikon {
    font-size: 16px;
    margin-right: 2px;
}
.login-pesan.info {
    background: #e7f0e9;
    border: 1px solid #bcd3c2;
    color: #3f6b4f;
}

/* ========================================================
   SELECT2 CUSTOM STYLING (WARM LIBRARY THEME)
   ======================================================== */
.select2-container {
    width: 100% !important;
    max-width: 100%;
    font-size: 14px;
    font-family: inherit;
}

.select2-container .select2-selection--single {
    height: 38px;
    border: 1px solid #d6ccba;
    border-radius: 4px;
    background-color: #fff;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    transition: border-color .15s, box-shadow .15s;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #3a3128;
    line-height: 28px;
    padding-left: 6px;
    padding-right: 28px;
    font-size: 14px;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #8e8271;
    font-style: italic;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
    color: #9b3a2e;
    font-size: 16px;
    font-weight: bold;
    margin-right: 18px;
    line-height: 28px;
}
.select2-container--default .select2-selection--single .select2-selection__clear:hover {
    color: #c0392b;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
    position: absolute;
    top: 1px;
    right: 8px;
    width: 20px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #2f4a3c transparent transparent transparent;
    border-width: 6px 5px 0 5px;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #2f4a3c transparent;
    border-width: 0 5px 6px 5px;
}

.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #2f4a3c;
    box-shadow: 0 0 0 2px rgba(47, 74, 60, 0.15);
    outline: none;
}

/* Dropdown Container */
.select2-dropdown {
    border: 1px solid #2f4a3c;
    border-radius: 4px;
    box-shadow: 0 6px 16px rgba(47, 74, 60, 0.15);
    background-color: #fffdf9;
    z-index: 9999;
    overflow: hidden;
}

.select2-container--default .select2-search--dropdown {
    padding: 8px 10px;
    background-color: #f7f3ec;
    border-bottom: 1px solid #ddd3c2;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #d6ccba;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 13.5px;
    font-family: inherit;
    background-color: #fff;
    color: #3a3128;
    width: 100%;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    outline: none;
    border-color: #2f4a3c;
    box-shadow: 0 0 0 2px rgba(47, 74, 60, 0.12);
}

.select2-results__options {
    max-height: 220px;
    padding: 4px 0;
}

.select2-container--default .select2-results__option {
    padding: 8px 12px;
    font-size: 14px;
    color: #3a3128;
    line-height: 1.4;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #2f4a3c;
    color: #f6f1e4;
}

.select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: #e5ece6;
    color: #2f4a3c;
    font-weight: 600;
}

.select2-container--default .select2-results__option[aria-disabled="true"] {
    color: #a89f91;
    font-style: italic;
}

/* Multiple Selection (jika digunakan) */
.select2-container--default .select2-selection--multiple {
    min-height: 38px;
    border: 1px solid #d6ccba;
    border-radius: 4px;
    background-color: #fff;
    padding: 3px 6px;
    transition: border-color .15s, box-shadow .15s;
}

.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--multiple {
    border-color: #2f4a3c;
    box-shadow: 0 0 0 2px rgba(47, 74, 60, 0.15);
    outline: none;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #e8efe9;
    border: 1px solid #2f4a3c;
    color: #2f4a3c;
    border-radius: 3px;
    padding: 2px 8px;
    font-size: 13px;
    font-weight: 500;
    margin-top: 3px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #2f4a3c;
    margin-right: 5px;
    font-weight: bold;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #9b3a2e;
}

/* ===== KOMPONEN TAMBAHAN UNTUK PEMINJAMAN MULTI-BUKU (SESSION) ===== */
.pinjam-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 15px;
}

.pinjam-section {
    background: #fffdf9;
    border: 1px solid #ddd3c2;
    border-radius: 6px;
    padding: 20px 24px;
    box-shadow: 0 2px 8px rgba(60, 45, 25, 0.05);
}

.pinjam-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #efe6d5;
    padding-bottom: 10px;
    margin-bottom: 16px;
}

.pinjam-section-header h3 {
    font-size: 18px;
    color: #2f4a3c;
    margin: 0;
}

.pinjam-section-desc {
    font-size: 13.5px;
    color: #7a6e5c;
    margin-bottom: 14px;
}

.alert-box {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-danger {
    background-color: #fdf2f0;
    border: 1px solid #e8b8b3;
    color: #9b3a2e;
}

.alert-success {
    background-color: #f1f8f3;
    border: 1px solid #b7dcc1;
    color: #265937;
}

.alert-info {
    background-color: #f3f6fa;
    border: 1px solid #c0d3e8;
    color: #204d74;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-count {
    background-color: #2f4a3c;
    color: #fff;
}

.badge-info {
    background-color: #eaf1ed;
    color: #2f4a3c;
    border: 1px solid #2f4a3c;
}

.btn-danger {
    background-color: #9b3a2e !important;
    color: #fff !important;
}

.btn-danger:hover {
    background-color: #7b2c22 !important;
}

.btn-secondary {
    background-color: #6e675f !important;
    color: #fff !important;
}

.btn-secondary:hover {
    background-color: #554f49 !important;
}

.btn-sm {
    padding: 4px 10px !important;
    font-size: 12.5px !important;
}

.btn-lg {
    padding: 10px 24px !important;
    font-size: 15px !important;
}

.cart-empty-state {
    text-align: center;
    padding: 30px 15px;
    color: #8c806f;
    background-color: #fcfaf6;
    border: 1px dashed #dcd3c3;
    border-radius: 4px;
    margin: 10px 0;
}


