/* ============================================================
   SISTEM INFORMASI PERPUSTAKAAN SEKOLAH ALIYAH — app.css
   Tema: Perpustakaan Sekolah Modern (teal hijau profesional)
   ============================================================ */

:root {
    --app-primary: #1f6f5c;
    --app-primary-dark: #195c4c;
    --app-primary-soft: #e6f2ee;
    --app-primary-tint: #f2f8f6;
    --app-sidebar-bg: #0d2b24;
    --app-sidebar-hover: rgba(255, 255, 255, .07);
    --app-sidebar-active: #1f6f5c;
    --app-bg: #f3f6f5;
    --app-ink: #22333b;
    --app-muted: #6b7c84;
    --app-border: #e2e8e6;
    --app-amber: #c68e31;
    --app-danger: #b02a37;
}

body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; color: var(--app-ink); background: var(--app-bg); }

/* ---------------- SIDEBAR ---------------- */
.app-body { min-height: 100vh; }

.side {
    background: var(--app-sidebar-bg);
    color: #cfe3dc;
    display: flex;
    flex-direction: column;
    width: 264px;
}

.side-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.side-logo {
    width: 42px; height: 42px;
    border-radius: 12px;
    background: var(--app-sidebar-active);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: #fff;
    overflow: hidden;
}
.side-logo img { width: 100%; height: 100%; object-fit: cover; }

.side-brand-text strong { display: block; color: #fff; font-size: 14px; line-height: 1.25; }
.side-brand-text small { font-size: 11px; color: #8fb3a7; }

.side-nav { flex: 1; overflow-y: auto; padding: 10px 0 16px; }

.side-menu { list-style: none; margin: 0; padding: 0; }
.side-menu li a {
    display: flex; align-items: center; gap: 12px;
    color: #cfe3dc; text-decoration: none;
    padding: 10px 18px; font-size: 14px;
    border-left: 3px solid transparent;
    transition: background .15s ease;
}
.side-menu li a i { font-size: 16px; width: 20px; text-align: center; }
.side-menu li a:hover { background: var(--app-sidebar-hover); color: #fff; }
.side-menu li a.active {
    background: var(--app-sidebar-active);
    color: #fff; border-left-color: #ffd166; font-weight: 500;
}
.side-label {
    padding: 14px 18px 6px;
    font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
    color: #7d9f92;
}

@media (min-width: 992px) {
    .side {
        position: fixed; top: 0; bottom: 0; left: 0; z-index: 1030;
        transform: none !important; visibility: visible !important;
    }
    .app-main { margin-left: 264px; }
}

/* ---------------- NAVBAR ---------------- */
.app-navbar {
    position: sticky; top: 0; z-index: 1020;
    background: #fff;
    border-bottom: 1px solid var(--app-border);
    padding: 10px 22px;
    display: flex; align-items: center; gap: 12px;
    min-height: 60px;
}
.app-navbar-title { font-size: 18px; font-weight: 600; margin: 0; }
.btn-icon {
    background: transparent; border: 0; color: var(--app-ink);
    width: 42px; height: 42px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
}
.btn-icon:hover { background: var(--app-bg); }

.user-btn { border: 0; background: transparent; padding: 4px 8px; }
.user-btn:hover, .user-btn.show { background: var(--app-bg); }
.user-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    object-fit: cover; background: var(--app-primary-soft);
}
.user-avatar-initial {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--app-primary); color: #fff; font-weight: 700;
}

.notif-badge {
    position: absolute; top: 2px; right: 2px;
    background: var(--app-danger); color: #fff;
    font-size: 10px; font-weight: 700;
    min-width: 17px; height: 17px; line-height: 17px;
    border-radius: 10px; text-align: center; padding: 0 4px;
}
.notif-menu { width: 360px; max-width: 92vw; padding: 0; }
.notif-head { padding: 10px 14px; border-bottom: 1px solid var(--app-border); }
.notif-empty { padding: 22px; text-align: center; color: var(--app-muted); }
.notif-item { padding: 10px 14px; border-bottom: 1px solid #f0f3f2; white-space: normal; }
.notif-item.unread { background: #f2faf7; }

/* ---------------- KONTEN ---------------- */
.app-content { padding: 22px; min-height: calc(100vh - 60px); }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h2 { font-size: 20px; font-weight: 600; margin: 0; }
.breadcrumb { --bs-breadcrumb-margin-bottom: 0; font-size: 13px; }

.card { border: 1px solid var(--app-border); border-radius: 14px; box-shadow: 0 1px 3px rgba(15, 40, 33, .07); }
.card-header {
    background: linear-gradient(180deg, #f7fbf9, #f0f7f4);
    border-bottom: 1px solid var(--app-border);
    border-left: 4px solid var(--app-primary);
    border-radius: 14px 14px 0 0;
    padding: 14px 18px; font-weight: 600;
}
.card-body { padding: 18px; }

/* Kartu statistik */
.stat-card { display: flex; gap: 14px; align-items: center; padding: 18px; }
.stat-icon {
    width: 52px; height: 52px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; flex-shrink: 0;
}
.stat-icon.teal  { background: #e0f2ec; color: #1f6f5c; }
.stat-icon.blue  { background: #e3eef7; color: #2d6fa3; }
.stat-icon.amber { background: #faf0dc; color: #b07d16; }
.stat-icon.red   { background: #fbe6e4; color: #b02a37; }
.stat-icon.violet{ background: #efe9f6; color: #6f4fa0; }
.stat-icon.gray  { background: #eceff0; color: #5c6f79; }
.stat-value { font-size: 22px; font-weight: 700; line-height: 1.1; }
.stat-label { font-size: 13px; color: var(--app-muted); }

/* Tabel */
.table { --bs-table-hover-bg: #f6faf8; }
.table thead th {
    background: #f7faf9; font-size: 12px; text-transform: uppercase;
    letter-spacing: .04em; color: #52645c; white-space: nowrap;
}
.table td, .table th { vertical-align: middle; font-size: 14px; }
.table-wrap { overflow-x: auto; }

.badge { font-weight: 500; padding: .45em .7em; border-radius: 8px; }

.btn { border-radius: 8px; }
.btn-primary { background: var(--app-primary); border-color: var(--app-primary); }
.btn-primary:hover { background: var(--app-primary-dark); border-color: var(--app-primary-dark); }
.btn-outline-primary { color: var(--app-primary); border-color: var(--app-primary); }
.btn-outline-primary:hover { background: var(--app-primary); border-color: var(--app-primary); }
.btn-soft { background: var(--app-primary-soft); color: var(--app-primary-dark); border: 0; }
.btn-soft:hover { background: #d3eae2; }

.form-control, .form-select { border-radius: 8px; }
.form-control:focus, .form-select:focus { border-color: var(--app-primary); box-shadow: 0 0 0 .2rem rgba(31, 111, 92, .15); }
.form-label { font-weight: 500; font-size: 14px; }

/* ---------------- HALAMAN LOGIN ---------------- */
.auth-body {
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 20% 10%, var(--app-hero-glow), transparent 55%),
        radial-gradient(ellipse at 85% 90%, var(--app-accent-glow), transparent 50%),
        linear-gradient(135deg, var(--app-hero-1) 0%, var(--app-hero-2) 55%, var(--app-hero-3) 100%);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.auth-card-wrap { width: 100%; max-width: 430px; }
.auth-card {
    background: #fff; border-radius: 20px;
    padding: 34px 32px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
.auth-brand { text-align: center; margin-bottom: 26px; }
.auth-brand h1 { font-size: 20px; font-weight: 700; margin: 10px 0 2px; }
.auth-brand p { font-size: 14px; }
.auth-logo {
    width: 72px; height: 72px; margin: 0 auto;
    border-radius: 20px; background: var(--app-primary);
    color: #fff; font-size: 34px;
    display: flex; align-items: center; justify-content: center;
}
.auth-btn { font-weight: 600; background: var(--app-primary); border-color: var(--app-primary); }
.auth-btn:hover { background: var(--app-primary-dark); }
.auth-footer { text-align: center; margin-top: 20px; color: var(--app-muted); }

/* ---------------- KATALOG ---------------- */
.katalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.book-card { border: 1px solid var(--app-border); border-radius: 14px; overflow: hidden; background: #fff; transition: transform .15s ease, box-shadow .15s ease; }
.book-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(15, 40, 33, .10); }
.book-cover {
    aspect-ratio: 3 / 4; background: var(--app-primary-soft);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; position: relative;
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-cover .no-cover { font-size: 44px; color: var(--app-primary); opacity: .5; }
.book-info { padding: 12px 14px; }
.book-info h3 { font-size: 14px; font-weight: 600; margin: 0 0 4px; line-height: 1.35; }
.book-info .meta { font-size: 12px; color: var(--app-muted); }
.book-status { position: absolute; top: 8px; left: 8px; }

/* ---------------- KARTU ANGGOTA ----------------
   Ukuran kartu dipatok tepat ID-1 (85,6 × 53,98 mm) supaya cocok dengan
   cetakan/plastik kartu. Versi sebelumnya memakai min-height 54mm sehingga
   kartu memuai mengikuti isi (tinggi ±76 mm) dan tidak sesuai cetakan.
   ---------------------------------------------------------------- */
.member-card {
    width: 85.6mm;
    height: 53.98mm;
    margin: 0 auto;
    border-radius: 3.5mm;
    overflow: hidden;
    border: 1px solid var(--app-border);
    background: linear-gradient(160deg, #fff 0%, #f2faf7 100%);
    display: flex;
    flex-direction: column;
    color: var(--app-ink);
    font-size: 11px;
    /* Browser tidak mencetak warna latar secara default — ini yang membuat
       header kartu hilang saat dicetak pada versi sebelumnya. */
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.member-card-head {
    flex-shrink: 0;
    background: var(--app-primary);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
}
.member-card-head img {
    width: 30px; height: 30px; border-radius: 7px;
    object-fit: cover; flex-shrink: 0; background: #fff;
}
.member-card-head-text { min-width: 0; line-height: 1.2; }
.member-card-head-text strong {
    display: block; font-size: 12px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.member-card-head-text small {
    display: block; font-size: 7.5px; opacity: .88;
    letter-spacing: .08em; text-transform: uppercase;
}

/* Badan kartu mengisi sisa tinggi dan isinya ditengahkan */
.member-card-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px 3px;
}

.member-photo {
    width: 58px; height: 72px;
    object-fit: cover; border-radius: 6px;
    background: var(--app-primary-soft);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; color: var(--app-primary);
    flex-shrink: 0;
}
.member-photo-empty { border: 1px dashed var(--app-border); }

.member-card-fields { flex: 1 1 auto; min-width: 0; }

.member-card .row-label {
    font-size: 6.5px; line-height: 1.25;
    text-transform: uppercase; letter-spacing: .06em;
    color: var(--app-muted);
}

.member-name {
    font-size: 12.5px; font-weight: 700; line-height: 1.2;
    margin-bottom: 5px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.member-field-grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 5px 8px;
}
.member-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 9px; font-weight: 700; line-height: 1.25;
    word-break: break-all;
}
.member-strong { font-size: 9px; font-weight: 700; line-height: 1.25; }

.member-qr { flex-shrink: 0; text-align: center; }
/* Kelas .qrcode (bukan id) supaya satu halaman bisa memuat banyak QR — dipakai
   oleh kartu massal (10 kartu per lembar A4). */
.member-qr .qrcode {
    /* Padding putih = "quiet zone" QR: tanpa ini banyak pemindai gagal membaca
       QR saat kartu dicetak/difoto. */
    width: 68px; height: 68px;
    background: #fff; padding: 3px; border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
}
.member-qr .qrcode img,
.member-qr .qrcode canvas { width: 100% !important; height: 100% !important; display: block; }
.member-qr small {
    display: block; margin-top: 2px;
    font-size: 6px; line-height: 1.15; color: var(--app-muted);
}

.member-card-foot {
    flex-shrink: 0;
    padding: 0 12px 5px;
    font-size: 6.5px; line-height: 1.3;
    color: var(--app-muted);
}
.member-card-addr { display: block; }

.card-toolbar { margin-bottom: 14px; }

/* Halaman cetak khusus kartu: satu kartu = satu halaman, tanpa margin */
@page kartu { size: 85.6mm 53.98mm; margin: 0; }
.print-card { page: kartu; }

@media print {
    .print-card { margin: 0; padding: 0; }
    .print-card .card-toolbar,
    .print-card .print-credit { display: none !important; }
    .print-card .member-card {
        margin: 0; border: 0; box-shadow: none;
        border-radius: 0;
        /* Satu kartu tidak boleh terbelah ke halaman berikutnya. */
        break-inside: avoid; page-break-inside: avoid;
    }
    /* Pastikan warna kepala kartu & QR ikut tercetak pada semua mesin cetak. */
    .print-card .member-card-head,
    .print-card .member-qr .qrcode {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ---------------- LABEL BARCODE BUKU ---------------- */
.barcode-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 6mm 4mm;
}
.barcode-label {
    border: 1px dashed #999; border-radius: 4px; padding: 6px 8px;
    text-align: center; break-inside: avoid; page-break-inside: avoid;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 34mm;
}
.barcode-label .bl-title { font-size: 10px; font-weight: 700; line-height: 1.2; margin-bottom: 2px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barcode-label .bl-copy { font-size: 9px; color: var(--app-muted); margin-top: 2px; }
.barcode-label svg { max-width: 100%; height: auto; }

/* ---------------- CETAK ---------------- */
@media print {
    .app-navbar, .app-side, .side, .no-print, .btn, .dataTables_filter, .dataTables_length, .dataTables_info, .dataTables_paginate, .page-head .btn-group { display: none !important; }
    .app-main { margin-left: 0 !important; }
    .app-content { padding: 0; min-height: auto; }
    body { background: #fff; }
    .print-body { padding: 0; }
    .card { border: 0; box-shadow: none; }
    .table { font-size: 11px; }
}

/* ---------------- LAIN-LAIN ---------------- */
.table-datatable { width: 100% !important; }
.dt-length select, .dt-search input { border-radius: 8px !important; }

.filter-card { background: #fff; border: 1px solid var(--app-border); border-radius: 14px; padding: 14px 16px; margin-bottom: 18px; }

.progress-thin { height: 6px; }

.avatar-sm { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; }
.avatar-sm-initial {
    width: 34px; height: 34px; border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--app-primary-soft); color: var(--app-primary-dark); font-weight: 600;
}

.text-app { color: var(--app-primary) !important; }
.bg-app { background-color: var(--app-primary) !important; }

/* Toast */
.toast-container { z-index: 1080; }

/* Offcanvas sidebar (mobile) */
.offcanvas.side { background: var(--app-sidebar-bg); }
.offcanvas.side .side-brand { border-bottom-color: rgba(255,255,255,.08); }

/* Book detail */
.book-detail-cover {
    width: 100%; max-width: 260px; aspect-ratio: 3/4;
    border-radius: 14px; overflow: hidden;
    background: var(--app-primary-soft);
    display: flex; align-items: center; justify-content: center; font-size: 72px; color: var(--app-primary);
}
.book-detail-cover img { width: 100%; height: 100%; object-fit: cover; }

/* Peminjaman create */
.cart-item { border: 1px solid var(--app-border); border-radius: 10px; padding: 10px 12px; background: #fff; }
.search-result-item { cursor: pointer; }
.search-result-item:hover { background: var(--app-primary-soft); }

/* ============================================================
   LANDING PAGE — halaman depan publik
   ============================================================ */

.landing-body { background: #fff; }

/* ---- Navbar ---- */
.landing-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1040;
    background: linear-gradient(180deg, var(--app-nav-scrim), rgba(0, 0, 0, 0));
    transition: background .3s ease, box-shadow .3s ease;
}
.landing-nav.scrolled { background: var(--app-sidebar-bg); box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.hover-white { transition: color .15s ease; }
.hover-white:hover { color: #fff !important; }
.landing-logo {
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--app-primary); color: #fff; font-size: 22px;
    display: inline-flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0;
}
.landing-logo img { width: 100%; height: 100%; object-fit: cover; }
/* Blok brand navbar: min-width:0 supaya teks boleh menyusut/terpotong rapi,
   dan tombol di kanan tidak pernah ikut terdesak keluar layar di HP. */
.landing-brand { min-width: 0; }
.landing-brand-text { min-width: 0; }
.landing-brand-title { font-size: 15px; line-height: 1.2; }
.landing-brand-sub { line-height: 1.2; }
.landing-nav-actions { flex-shrink: 0; }

/* ---- Hero ---- */
.landing-hero {
    position: relative; overflow: hidden;
    min-height: 92vh; display: flex; align-items: center;
    padding: 130px 0 90px;
    background:
        radial-gradient(ellipse at 15% 20%, var(--app-hero-glow), transparent 55%),
        radial-gradient(ellipse at 85% 80%, var(--app-accent-glow), transparent 50%),
        linear-gradient(135deg, var(--app-hero-1) 0%, var(--app-hero-2) 55%, var(--app-hero-3) 100%);
}
.landing-hero::after {
    content: ""; position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
    pointer-events: none;
}
.landing-badge {
    background: var(--app-accent-glow); color: var(--app-accent-light);
    border: 1px solid var(--app-accent); padding: .5em .9em; font-weight: 500;
    letter-spacing: .01em;
}

.landing-search {
    position: relative; display: flex; align-items: center; gap: 8px;
    background: #fff; border-radius: 14px; padding: 6px 6px 6px 16px;
    max-width: 560px; box-shadow: 0 16px 40px rgba(0,0,0,.3);
}
.landing-search > i { color: #8aa49a; }
.landing-search input { border: 0; box-shadow: none; font-size: 15px; }
.landing-search input:focus { box-shadow: none; }
.landing-suggest {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 50;
    background: #fff; border-radius: 14px; overflow: hidden;
    box-shadow: 0 18px 44px rgba(0,0,0,.22);
}
.landing-suggest-item {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 16px; color: var(--app-ink); text-decoration: none;
    border-bottom: 1px solid #f0f3f2; font-size: 14px;
}
.landing-suggest-item:hover { background: var(--app-primary-soft); color: var(--app-primary-dark); }
.landing-suggest-item:last-child { border-bottom: 0; }

/* Buku mengambang di hero */
.landing-hero-books { position: relative; height: 460px; }
.hero-book-card {
    position: absolute; width: 200px; border-radius: 16px; overflow: hidden;
    background: #fff; box-shadow: 0 24px 60px rgba(0,0,0,.4);
    transition: transform .35s ease;
    animation: floatBook 7s ease-in-out infinite;
}
.hero-book-card:hover { transform: translateY(-10px) scale(1.04); }
.hero-book-1 { top: 20px; left: 0; animation-delay: 0s; }
.hero-book-2 { top: 120px; left: 220px; animation-delay: 1.4s; }
.hero-book-3 { top: 260px; left: 70px; animation-delay: 2.6s; }
.hero-book-card img, .hero-book-ph {
    width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block;
}
.hero-book-ph {
    background: linear-gradient(150deg, var(--app-primary) 0%, var(--app-primary-dark) 60%, var(--app-accent) 130%);
    color: rgba(255,255,255,.9); font-size: 84px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}
.hero-book-info { padding: 10px 12px; }
.hero-book-info strong { display: block; font-size: 13px; line-height: 1.3; }
.hero-book-info small { color: var(--app-muted); }
@keyframes floatBook {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

/* ---- Statistik ---- */
.landing-stats {
    margin-top: -58px; position: relative; z-index: 3;
}
.landing-stat {
    background: #fff; border: 1px solid var(--app-border); border-radius: 18px;
    padding: 22px 16px; display: flex; align-items: center; gap: 14px;
    box-shadow: 0 10px 30px rgba(15, 40, 33, .10); height: 100%;
    /* min-width:0 + min-width pada anak wajib: tanpa ini isi kartu tidak boleh
       menyusut di bawah ukuran teksnya, sehingga angka & label meluber keluar
       kartu pada layar sempit (Android). */
    min-width: 0;
}
.landing-stat-icon {
    width: 54px; height: 54px; border-radius: 14px; flex-shrink: 0;
    background: var(--app-primary-soft); color: var(--app-primary);
    font-size: 24px; display: flex; align-items: center; justify-content: center;
}
/* Angka dan label ditumpuk dalam satu blok supaya label tidak ikut berbaris
   di samping angka (dulu label adalah saudara dari ikon, jadi ikut satu baris
   dan terdorong keluar kartu). */
.landing-stat-body {
    min-width: 0; display: flex; flex-direction: column; gap: 2px;
}
.landing-stat .stat-counter { font-size: 30px; font-weight: 700; line-height: 1.05; }

/* ---- Section umum ---- */
.landing-section { padding: 76px 0; }
.landing-section-alt { background: #f4f8f6; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 40px; }
.section-eyebrow {
    display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .12em;
    text-transform: uppercase; color: var(--app-primary); margin-bottom: 10px;
}

/* ---- Kategori ---- */
.landing-kategori {
    display: flex; align-items: center; gap: 12px;
    background: #fff; border: 1px solid var(--app-border); border-radius: 14px;
    padding: 14px 16px; text-decoration: none; color: var(--app-ink);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; height: 100%;
}
.landing-kategori:hover {
    transform: translateY(-4px); border-color: var(--app-primary);
    box-shadow: 0 10px 26px rgba(31, 111, 92, .16);
}
.landing-kategori-icon {
    width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
    background: var(--app-primary-soft); color: var(--app-primary);
    font-size: 20px; display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.landing-kategori-icon img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}

/* ---- Fitur ---- */
.landing-feature {
    background: #fff; border: 1px solid var(--app-border); border-radius: 16px;
    padding: 26px 22px; height: 100%; text-align: center;
    transition: transform .2s ease, box-shadow .2s ease;
}
.landing-feature:hover { transform: translateY(-5px); box-shadow: 0 14px 34px rgba(15,40,33,.12); }
.landing-feature-icon {
    width: 58px; height: 58px; border-radius: 50%;
    background: var(--app-primary-soft); color: var(--app-primary);
    font-size: 26px; display: inline-flex; align-items: center; justify-content: center;
}

/* ---- Tentang ---- */
.landing-about-card {
    background: #fff; border: 1px solid var(--app-border); border-radius: 20px;
    padding: 34px 30px; box-shadow: 0 16px 44px rgba(15,40,33,.10);
}
/* Angka besar di kartu "Tentang" (transaksi & denda). Nilai denda berbentuk
   rupiah yang bisa panjang, jadi diberi batas agar tidak meluber keluar kotak. */
.landing-about-num { line-height: 1.15; overflow-wrap: anywhere; }
.landing-about-quote {
    background: var(--app-accent-soft); border-radius: 14px; padding: 18px 20px;
    border-left: 4px solid var(--app-accent);
}

/* ---- CTA ---- */
.landing-cta {
    padding: 70px 0;
    background:
        radial-gradient(ellipse at 20% 30%, var(--app-hero-glow), transparent 55%),
        radial-gradient(ellipse at 80% 70%, var(--app-accent-glow), transparent 50%),
        var(--app-sidebar-bg);
}

/* ---- Footer ---- */
.landing-footer { background: var(--app-footer-bg); color: rgba(255, 255, 255, .72); padding: 56px 0 24px; }
.landing-footer a { transition: color .15s ease; }
.landing-footer a:hover { color: #fff !important; }

/* ---- Back to top ---- */
.landing-top {
    position: fixed; right: 22px; bottom: 22px; z-index: 1050;
    width: 46px; height: 46px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 26px rgba(0,0,0,.25);
}

/* ---- Reveal on scroll ---- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.shown { opacity: 1; transform: none; }

/* ---- Placeholder cover bergradien + inisial ---- */
.book-ph-text {
    font-size: 52px; font-weight: 800; color: rgba(255,255,255,.88);
    background: linear-gradient(150deg, var(--app-primary) 0%, var(--app-primary-dark) 65%, var(--app-accent) 140%);
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
}

/* ---- Hover kartu buku (katalog & landing) ---- */
.book-card .book-cover img { transition: transform .35s ease; }
.book-card:hover .book-cover img { transform: scale(1.07); }

/* ---- Responsive hero ---- */
@media (max-width: 991px) {
    .landing-hero { min-height: auto; padding: 120px 0 90px; text-align: center; }
    .landing-search { margin: 0 auto; }
    .landing-hero .lead { margin-left: auto; margin-right: auto; }
    .landing-stats { margin-top: -40px; }
}
@media (max-width: 575px) {
    .landing-hero h1 { font-size: 1.8rem; }
    .landing-search { flex-wrap: wrap; }
    .landing-search .btn { width: 100%; }
    .landing-nav .landing-nav-links { display: none; }

    /* Kartu statistik: pada 2 kolom hanya tersisa ~120px untuk teks, sehingga
       angka + ikon + label tidak muat satu baris. Ikon ditumpuk di atas angka. */
    .landing-stat {
        flex-direction: column; text-align: center; gap: 8px; padding: 16px 10px;
    }
    .landing-stat-icon {
        width: 44px; height: 44px; font-size: 20px; border-radius: 12px;
    }
    .landing-stat .stat-counter { font-size: 24px; }
    .landing-stat-body { gap: 1px; }

    /* Angka transaksi/denda: pada 2 kolom tidak cukup untuk display-6 (40px). */
    .landing-about-num { font-size: 22px; }

    /* Navbar: nama sekolah yang panjang tidak boleh mendorong tombol keluar layar. */
    .landing-brand-title, .landing-brand-sub {
        display: block; max-width: 100%;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .landing-brand-title { font-size: 13px; }
    .landing-brand-sub { font-size: 11px; }
}

/* ============================================================
   GALERI, BERITA, WHATSAPP — landing & halaman publik
   ============================================================ */

/* ---- Galeri ---- */
.landing-foto {
    position: relative; display: block; border-radius: 16px; overflow: hidden;
    aspect-ratio: 3/2; text-decoration: none;
    box-shadow: 0 8px 24px rgba(15, 40, 33, .12);
}
.landing-foto img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .4s ease;
}
.landing-foto:hover img { transform: scale(1.08); }
.landing-foto-cap {
    position: absolute; inset: auto 0 0 0;
    padding: 26px 12px 10px; font-size: 13px; color: #fff;
    background: linear-gradient(180deg, transparent, var(--app-nav-scrim));
    display: flex; align-items: center; gap: 6px;
}

/* ---- Kartu berita ---- */
.berita-card {
    display: block; background: #fff; border: 1px solid var(--app-border);
    border-radius: 16px; overflow: hidden; height: 100%;
    transition: transform .2s ease, box-shadow .2s ease;
}
.berita-card:hover { transform: translateY(-5px); box-shadow: 0 14px 34px rgba(15, 40, 33, .13); }
.berita-thumb {
    position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--app-primary-soft);
}
.berita-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.berita-card:hover .berita-thumb img { transform: scale(1.06); }
.berita-thumb-ph {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    font-size: 44px; color: var(--app-primary); opacity: .6;
    background: linear-gradient(150deg, #e6f2ee, #dbeae4);
}
.berita-body { padding: 16px 18px; }
.berita-title { font-size: 16px; font-weight: 600; line-height: 1.35; margin: 6px 0 6px; }
.berita-title:hover { color: var(--app-primary); }

/* ---- Header halaman publik (berita) ---- */
.pub-hero {
    padding: 130px 0 60px;
    background:
        radial-gradient(ellipse at 20% 30%, var(--app-hero-glow), transparent 55%),
        radial-gradient(ellipse at 85% 80%, var(--app-accent-glow), transparent 50%),
        linear-gradient(135deg, var(--app-hero-1) 0%, var(--app-hero-2) 60%, var(--app-hero-3) 100%);
}
.pub-hero-sm { padding: 110px 0 46px; }
.pub-main { min-height: 60vh; }

/* ---- Artikel berita ---- */
.berita-article { background: #fff; border: 1px solid var(--app-border); border-radius: 18px; padding: 28px; }
.berita-isi { font-size: 16px; line-height: 1.85; color: #33443d; }

/* ---- Tombol WhatsApp melayang ---- */
.landing-wa {
    position: fixed; right: 22px; bottom: 78px; z-index: 1050;
    width: 54px; height: 54px; border-radius: 50%;
    background: #25d366; color: #fff; font-size: 28px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 28px rgba(37, 211, 102, .45);
    transition: transform .2s ease;
    text-decoration: none;
}
.landing-wa:hover { transform: scale(1.1); color: #fff; }
.landing-wa::after {
    content: ""; position: absolute; inset: 0; border-radius: 50%;
    border: 2px solid #25d366; animation: waPulse 1.8s ease-out infinite;
}
@keyframes waPulse {
    0% { transform: scale(1); opacity: .8; }
    100% { transform: scale(1.45); opacity: 0; }
}

/* ============================================================
   POLISH LANDING — smooth scroll, badge hero, steps, nav mobile
   ============================================================ */

html { scroll-behavior: smooth; }
section[id], header[id] { scroll-margin-top: 84px; }

.landing-nav-mobile { border-top: 1px solid rgba(255,255,255,.08); }

/* Badge mengambang di hero */
.hero-float-badge {
    position: absolute; display: flex; align-items: center; gap: 8px;
    background: rgba(255, 255, 255, .96); color: var(--app-ink);
    border-radius: 14px; padding: 10px 14px; font-size: 13px;
    box-shadow: 0 14px 34px rgba(0,0,0,.28);
    animation: floatBadge 6s ease-in-out infinite;
}
.hero-float-badge i { color: var(--app-primary); font-size: 20px; }
.hero-float-badge strong { display: block; line-height: 1.1; }
.hero-float-1 { top: 28px; right: -10px; animation-delay: .6s; }
.hero-float-2 { bottom: 40px; right: 40px; animation-delay: 2.2s; }
@keyframes floatBadge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Step / Cara Kerja */
.landing-step {
    position: relative; background: #fff; border: 1px solid var(--app-border);
    border-radius: 18px; padding: 30px 24px 26px; height: 100%;
    text-align: center; transition: transform .2s ease, box-shadow .2s ease;
}
.landing-step:hover { transform: translateY(-5px); box-shadow: 0 14px 34px rgba(15,40,33,.12); }
.landing-step-icon {
    width: 62px; height: 62px; border-radius: 50%;
    background: var(--app-primary-soft); color: var(--app-primary);
    font-size: 28px; display: inline-flex; align-items: center; justify-content: center;
}
.landing-step-num {
    position: absolute; top: 14px; right: 18px;
    font-size: 44px; font-weight: 800; color: rgba(31, 111, 92, .10);
    line-height: 1;
}

/* Progress bar dashboard */
.progress-thin { height: 6px; border-radius: 6px; }

/* ============================================================
   PENGUATAN VISUAL KONTEN — konten tidak lagi "putih polos"
   ============================================================ */

/* Latar konten sedikit bertingkat agar area kerja terlihat jelas */
.app-content {
    background:
        linear-gradient(180deg, #e9f3ef 0%, var(--app-bg) 180px);
}

/* Header halaman diberi batas bawah yang tegas */
.page-head {
    border-bottom: 1px solid var(--app-border);
    padding-bottom: 14px;
}

/* Header tabel: latar hijau muda + garis bawah tegas */
.table thead th {
    background: #eaf4f0 !important;
    color: #24443a !important;
    border-bottom: 2px solid var(--app-primary) !important;
    letter-spacing: .05em;
}

/* Kartu KPI: efek angkat saat hover */
.stat-card { transition: transform .18s ease, box-shadow .18s ease; }
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(15, 40, 33, .12);
}

/* Kartu filter: aksen kiri */
.filter-card { border-left: 4px solid var(--app-primary); }

/* Tombol primary lebih tegas */
.btn-primary {
    background: var(--app-primary);
    box-shadow: 0 2px 6px rgba(31, 111, 92, .25);
}
.btn-primary:hover { box-shadow: 0 4px 12px rgba(31, 111, 92, .35); }

/* Breadcrumb lebih jelas */
.breadcrumb a { font-weight: 500; }
.breadcrumb .active { font-weight: 600; color: var(--app-primary-dark); }

/* Badge di dalam tabel sedikit lebih besar agar terbaca */
.table .badge { font-size: 12px; }

/* Baris tabel hover tegas */
.table-hover tbody tr:hover { background: #eef6f2 !important; }

/* Empty state lebih hidup */
.table td .text-secondary { font-size: 13.5px; }

/* Sidebar: pastikan tetap hijau tua walau offcanvas Bootstrap */
.offcanvas-lg.side {
    background: var(--app-sidebar-bg) !important;
}
@media (min-width: 992px) {
    .offcanvas-lg.side {
        background: var(--app-sidebar-bg) !important;
    }
}

/* ============================================================
   POLESAN MODERN PROFESIONAL
   ============================================================ */

/* Navbar landing: efek kaca saat scroll */
.landing-nav.scrolled {
    background: rgba(10, 40, 32, .82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
}

/* Navbar dashboard: kaca putih */
.app-navbar {
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Sampul buku placeholder: tampak seperti buku sungguhan */
.hero-book-ph, .book-ph-text {
    position: relative;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 32%),
        linear-gradient(150deg, var(--app-primary) 0%, var(--app-primary-dark) 52%, var(--app-hero-1) 130%);
    box-shadow: inset 12px 0 18px rgba(0, 0, 0, .28), inset -4px 0 10px rgba(255, 255, 255, .06);
    overflow: hidden;
}
.hero-book-ph::after, .book-ph-text::after {
    content: "";
    position: absolute; left: 0; right: 0; bottom: 0; height: 26%;
    background: linear-gradient(180deg, rgba(8, 31, 26, 0), rgba(8, 31, 26, .5));
    pointer-events: none;
}
.hero-book-ph, .book-ph-text { color: rgba(255, 255, 255, .95); }

/* Sidebar: item aktif berbentuk pill modern */
.side-menu li a { border-left: 3px solid transparent; }
.side-menu li a.active {
    background: linear-gradient(90deg, var(--app-sidebar-active), #287a66);
    border-left: 3px solid #ffd166;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .28);
}
.side-menu li a:hover { padding-left: 22px; }

/* Ikon statistik: cincin lembut */
.landing-stat-icon, .stat-icon {
    box-shadow: inset 0 0 0 1px rgba(31, 111, 92, .07);
}

/* Judul section landing dengan garis dekoratif */
.section-head h2::after {
    content: "";
    display: block; width: 56px; height: 4px; border-radius: 4px;
    background: linear-gradient(90deg, var(--app-primary), var(--app-accent-light));
    margin: 12px auto 0;
}

/* Kartu buku katalog: garis atas tipis saat hover */
.book-card { position: relative; }
.book-card::before {
    content: "";
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--app-primary), #ffd166);
    opacity: 0; transition: opacity .2s ease; z-index: 2;
}
.book-card:hover::before { opacity: 1; }

/* Tombol kecil aksi: konsisten & jelas */
.btn-sm { font-size: 12.5px; }
.btn-sm i { margin-right: 3px; }

/* ============================================================
   FOOTER APLIKASI + KREDIT PENGEMBANG (EDU APP ID)
   ============================================================ */
.app-footer {
    margin-top: auto;
    padding: 14px 22px;
    border-top: 1px solid rgba(15, 70, 60, .10);
    background: #fff;
}
.app-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    font-size: 12.5px;
    color: #6b7c78;
}
.app-footer-version {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(15, 118, 96, .10);
    color: #0f7660;
    font-size: 11px;
    font-weight: 600;
}
.credit-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    color: #0f7660;
    text-decoration: none;
    transition: color .15s ease;
}
.credit-link:hover { color: #0b5c4a; text-decoration: underline; }
.credit-link i { font-size: 13px; }

/* Kredit di dalam footer gelap (landing & halaman publik) */
.landing-footer .credit-link { color: #ffd76a; }
.landing-footer .credit-link:hover { color: #fff; text-decoration: underline; }

/* Kredit pada layout login & cetak */
.auth-credit { text-align: center; }
.auth-credit, .auth-credit .credit-link { color: #6b7c78; font-size: 12.5px; }
.auth-credit .credit-link { color: #0f7660; }
.print-credit { text-align: center; font-size: 11px; color: #6b7c78; margin-top: 10px; }
.print-credit .credit-link { color: #0f7660; }

/* Bilah kredit khusus halaman Tentang Aplikasi */
.about-credit-card {
    background: linear-gradient(135deg, #0f7660 0%, #0b5c4a 100%);
    color: #eafaf4;
    border: 0;
}
.about-credit-card a { color: #ffd76a; font-weight: 600; }

/* ============================================================
   BOTTOM NAVIGATION — NAVBAR GAYA APLIKASI ANDROID
   (Material Design 3). Hanya tampil di layar < 992px.
   Di desktop tidak berubah sama sekali (tetap sidebar + navbar atas).
   ============================================================ */

:root {
    --app-bn-height: 58px;
}

.app-bottomnav { display: none; }

@media (max-width: 991.98px) {

    .app-bottomnav {
        display: flex;
        align-items: stretch;
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 1035;                      /* di bawah backdrop (1040) & offcanvas (1045) */
        background: #fff;
        border-top: 1px solid var(--app-border);
        box-shadow: 0 -6px 20px rgba(15, 40, 33, .10);
        padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px));
        -webkit-tap-highlight-color: transparent;
    }

    .bn-item {
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        padding: 5px 2px 3px;
        border: 0;
        background: transparent;
        color: var(--app-muted);
        text-decoration: none;
        font-size: 11px;
        font-weight: 500;
        line-height: 1.15;
    }

    .bn-item .bn-ico {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 56px;
        max-width: 100%;
        height: 26px;
        border-radius: 999px;
        transition: background .18s ease, color .18s ease;
    }
    .bn-item .bn-ico i { font-size: 20px; }

    .bn-item .bn-label {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Umpan balik sentuh khas Android */
    .bn-item:active .bn-ico { background: var(--app-primary-soft); }

    /* Item aktif: pil + warna tema */
    .bn-item.active { color: var(--app-primary-dark); font-weight: 700; }
    .bn-item.active .bn-ico {
        background: var(--app-primary-soft);
        color: var(--app-primary);
    }
    .bn-item:focus-visible { outline: 2px solid var(--app-primary); outline-offset: -2px; border-radius: 10px; }

    /* Titik notifikasi pada tombol "Lainnya" */
    .bn-badge {
        position: absolute;
        top: -4px;
        right: 8px;
        min-width: 17px;
        height: 17px;
        padding: 0 4px;
        border-radius: 10px;
        background: var(--app-danger);
        color: #fff;
        font-size: 10px;
        font-weight: 700;
        line-height: 17px;
        text-align: center;
        box-shadow: 0 0 0 2px #fff;
    }

    /* Ruang bawah supaya konten & footer tidak tertutup navbar */
    .app-body .app-content { padding-bottom: calc(var(--app-bn-height) + 30px); }
    .app-body .app-footer { margin-bottom: var(--app-bn-height); }
}

/* ============================================================
   PERBAIKAN: lebar sidebar (offcanvas) di mobile
   Bootstrap memakai .offcanvas-lg.offcanvas-start (2 kelas) untuk
   menentukan width: var(--bs-offcanvas-width) = 400px, sehingga
   .side { width: 264px } kalah spesifisitas dan menu menjadi
   400px (penuh layar di ponsel 390px). Rule ini mengembalikannya
   ke 264px + sisi kanan tetap tersisa sebagai area tutup.
   ============================================================ */
@media (max-width: 991.98px) {
    .offcanvas-lg.side,
    .side.offcanvas-lg,
    .side.offcanvas-start {
        width: 264px;
        max-width: 84vw;
    }
}

@media print {
    .app-bottomnav { display: none !important; }
}

/* ============================================================
   PEMILIH WARNA TEMA (Pengaturan → Warna Tema Tampilan)
   ============================================================ */
.theme-presets {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.theme-swatch {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.theme-swatch:hover { border-color: var(--swatch); background: #fafcfb; }
.theme-swatch input { position: absolute; opacity: 0; pointer-events: none; }

.theme-swatch-dot {
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--swatch);
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
}

.theme-swatch-name { line-height: 1.2; }

.theme-swatch:has(input:checked) {
    border-color: var(--swatch);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--swatch) 22%, transparent);
    font-weight: 600;
}
.theme-swatch:has(input:checked) .theme-swatch-dot::after {
    content: "\F26E"; /* bi-check-lg */
    font-family: "bootstrap-icons";
    color: #fff; font-size: 13px;
    display: flex; align-items: center; justify-content: center; height: 100%;
}

.theme-preview {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--app-primary-soft);
    color: var(--app-primary-dark);
    font-size: 13px;
}
.theme-preview-dot {
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--app-primary);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15);
}

/* ============================================================
   PANEL JAM LAYANAN (halaman depan)
   ============================================================ */
.landing-hours {
    background: #fff;
    border: 1px solid var(--app-border);
    border-top: 4px solid var(--app-primary);
    border-radius: 18px;
    padding: 22px 24px;
    box-shadow: 0 12px 32px rgba(15, 40, 33, .09);
}

.landing-hours-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.landing-hours-icon {
    width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0;
    background: var(--app-primary-soft); color: var(--app-primary);
    font-size: 22px; display: inline-flex; align-items: center; justify-content: center;
}

.landing-hours-list {
    list-style: none; margin: 0; padding: 0;
    display: grid; gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.landing-hours-list li {
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
    padding: 9px 14px; border-radius: 10px;
    background: var(--app-primary-tint);
    font-size: 14px;
}
.landing-hours-list li strong { font-weight: 600; white-space: nowrap; }
.landing-hours-list li.is-today {
    background: var(--app-primary-soft);
    color: var(--app-primary-dark);
    box-shadow: inset 0 0 0 1px var(--app-primary);
}
.landing-hours-list li.is-today::before {
    content: "\F288"; /* bi-dot */
    font-family: "bootstrap-icons";
    color: var(--app-primary);
    margin-right: 2px;
}

.landing-hours-note {
    margin-top: 14px; padding-top: 12px;
    border-top: 1px dashed var(--app-border);
    font-size: 13px; color: var(--app-muted);
}

.hours-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 13px; border-radius: 999px;
    font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.hours-badge.is-open { background: #e3f6ea; color: #15703a; }
.hours-badge.is-closed { background: #fdeaea; color: #a3222e; }
.hours-badge i { font-size: 13px; }

/* ---------------- KARTU ANGGOTA MASSAL (A4) ----------------
   Sepuluh kartu per lembar A4: 2 kolom × 5 baris (kartu tetap ukuran ID-1).
   Tinggi 5 × 53,98 mm + celah 2 mm = ±278 mm, pas di area cetak A4
   (297 mm − margin 8 mm atas/bawah = 281 mm).
   ---------------------------------------------------------- */
.member-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 85.6mm);
    gap: 2mm 6mm;
    justify-content: center;
    align-content: start;
}
.member-card-grid .member-card { margin: 0; }

@page kartu-massal { size: A4 portrait; margin: 8mm; }
.print-card-grid { page: kartu-massal; }

@media print {
    .print-card-grid { margin: 0; padding: 0; }
    .print-card-grid .card-toolbar,
    .print-card-grid .print-credit { display: none !important; }
    .print-card-grid .member-card {
        margin: 0; box-shadow: none; border-radius: 0;
        border: 1px dashed #cbd5d1;
        /* Satu kartu tidak boleh terbelah ke halaman berikutnya. */
        break-inside: avoid; page-break-inside: avoid;
    }
    .print-card-grid .member-card-head,
    .print-card-grid .member-qr .qrcode {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
