@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700;800&family=Inter:wght@400;500;600;700&family=Fraunces:ital,wght@1,600;1,700&display=swap');

:root {
    --brand-1: #F5B52E;
    --brand-2: #C9781A;
    --coffee-1: #17110E;
    --coffee-2: #241710;
    --coffee-3: #5A321B;
    --coffee-4: #8A522A;
    --cream: #FFF8EF;
    --cream-soft: #FBEDD8;
    --ink: #17110E;
    --ink-soft: #241710;
    --white: #FFFFFF;
    --text-muted: #6B5140;

    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --radius-pill: 999px;

    --shadow-sm: 0 2px 10px rgba(23, 17, 14, 0.08);
    --shadow-md: 0 10px 28px rgba(23, 17, 14, 0.12);
    --shadow-lg: 0 18px 48px rgba(23, 17, 14, 0.20);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { overflow-x: hidden; width: 100%; }
body {
    margin: 0; font-family: 'Inter', sans-serif; background: var(--cream); color: var(--ink);
    -webkit-font-smoothing: antialiased; display: flex; flex-direction: column; min-height: 100vh;
    overflow-x: hidden; width: 100%;
}
.page-wrap { flex: 1 0 auto; max-width: 100vw; overflow-x: hidden; }
h1, h2, h3, .logo, .btn, .navbar-menu a { font-family: 'Poppins', sans-serif; }
a { text-decoration: none; color: inherit; }
::selection { background: var(--brand-1); color: var(--ink); }

/* ---------- SAFETY NET RESPONSIF: cegah teks panjang / kata tanpa spasi (judul, link, dsb)
   mendorong lebar layar di HP sehingga muncul scroll horizontal ---------- */
h1, h2, h3, p, span, a, td, th, label, .desc-text, .logo-title {
    overflow-wrap: break-word; word-break: break-word;
}
img, video, iframe, canvas, svg { max-width: 100%; height: auto; }
table { max-width: 100%; }
input, textarea, select, button { max-width: 100%; }

/* ---------- NAVBAR ---------- */
.navbar {
    background: var(--coffee-1); color: var(--white);
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 32px; min-height: 96px; position: sticky; top: 0; z-index: 50; box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}
.navbar .logo { display: flex; align-items: center; gap: 12px; color: var(--white); }
.navbar .logo .logo-badge {
    width: 58px; height: 58px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, var(--brand-1), var(--brand-2) 70%);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; color: var(--ink); box-shadow: 0 0 0 5px rgba(245,181,46,0.18);
}
.navbar .logo img { height: 56px; border-radius: 12px; }
.navbar .logo-word { display: flex; flex-direction: column; line-height: 1.1; }
.navbar .logo-title { font-weight: 800; font-size: 25px; letter-spacing: -0.02em; color: var(--white); }
.navbar .logo-title b { color: var(--brand-1); font-weight: 800; }
.navbar .logo-caption { font-size: 10.5px; letter-spacing: .16em; color: rgba(255,255,255,0.5); font-weight: 700; margin-top: 3px; }

.navbar-menu { display: flex; gap: 6px; background: rgba(255,255,255,0.06); padding: 6px; border-radius: var(--radius-pill); }
.navbar-menu a {
    color: rgba(255,255,255,0.75); font-weight: 600; font-size: 13.5px;
    padding: 11px 18px; border-radius: var(--radius-pill); transition: .2s;
}
.navbar-menu a.active { background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); color: var(--ink); }
.navbar-menu a:hover:not(.active) { background: rgba(255,255,255,0.1); color: white; }
.navbar-burger { display: none; background: rgba(255,255,255,0.08); border: none; color: white; width: 42px; height: 42px; border-radius: 10px; font-size: 17px; cursor: pointer; }
.navbar-right { display: flex; align-items: center; gap: 10px; }
.icon-btn {
    width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: white; background: rgba(255,255,255,0.08); font-size: 16px; position: relative; transition: .2s;
}
.icon-btn:hover { background: rgba(255,255,255,0.18); }
.bell-badge {
    position: absolute; top: -2px; right: -2px; background: var(--brand-1); color: var(--ink);
    font-size: 10px; font-weight: 800; border-radius: 50%; width: 18px; height: 18px;
    display: flex; align-items: center; justify-content: center; border: 2px solid var(--coffee-1);
}

/* ---------- HERO (foto background) ---------- */
.hero {
    position: relative; min-height: 560px; display: flex; align-items: center;
    background-size: cover; background-position: center; overflow: hidden;
    padding: 60px 32px;
}
.hero::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(100deg, rgba(23,17,14,0.94) 0%, rgba(23,17,14,0.80) 40%, rgba(23,17,14,0.45) 75%, rgba(23,17,14,0.25) 100%);
}
.hero-grid { position: relative; z-index: 2; width: 100%; max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 1.5fr 1fr; gap: 30px; align-items: center; }
.hero .address {
    color: var(--ink); display: inline-flex; gap: 8px; align-items: center;
    margin-bottom: 22px; font-weight: 700; font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
    background: var(--brand-1); padding: 9px 18px 9px 14px; border-radius: var(--radius-pill);
    box-shadow: var(--shadow-sm);
}
.hero .address:hover { filter: brightness(1.06); }
.hero h2 {
    margin: 4px 0 18px; font-size: 46px; font-weight: 700; font-style: italic; letter-spacing: -0.01em; line-height: 1.22;
    font-family: 'Fraunces', serif; color: white; text-shadow: 0 2px 18px rgba(0,0,0,0.35);
}
.hero h2 .highlight { color: var(--brand-1); }
.hero-sub { color: rgba(255,255,255,0.85); font-size: 15.5px; line-height: 1.6; max-width: 480px; margin-bottom: 26px; }
.search-box {
    display: flex; align-items: center; background: var(--cream); border-radius: var(--radius-pill);
    padding: 8px 8px 8px 22px; max-width: 520px; box-shadow: var(--shadow-lg);
}
.search-box i.fa-magnifying-glass:first-child { color: var(--coffee-3); font-size: 16px; }
.search-box input {
    border: none; background: transparent; outline: none; flex: 1; font-size: 15px; margin-left: 12px; color: var(--ink);
    font-family: 'Inter', sans-serif; min-width: 0;
}
.search-box input::placeholder { color: var(--text-muted); }
.search-box button {
    width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer; flex-shrink: 0;
    background: radial-gradient(circle at 35% 30%, var(--brand-1), var(--brand-2) 75%);
    color: var(--ink); font-size: 16px; display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-sm); transition: .2s;
}
.search-box button:hover { transform: scale(1.06); }
.hero-tags { margin-top: 18px; font-size: 13px; color: rgba(255,255,255,0.85); display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.hero-tags b { color: var(--brand-1); font-weight: 700; }
.hero-tags span { opacity: 0.5; }

/* ---------- STAT CARD (glass) ---------- */
.stat-glass { background: rgba(23,17,14,0.55); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.14); border-radius: 24px; padding: 8px; box-shadow: var(--shadow-lg); }
.stat-glass-item { display: flex; align-items: center; gap: 16px; padding: 18px 20px; }
.stat-glass-item + .stat-glass-item { border-top: 1px solid rgba(255,255,255,0.12); }
.stat-glass-icon { width: 52px; height: 52px; border-radius: 16px; background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); display: flex; align-items: center; justify-content: center; font-size: 21px; color: var(--ink); flex-shrink: 0; }
.stat-glass-num { font-size: 26px; font-weight: 800; color: white; line-height: 1.1; }
.stat-glass-label { font-size: 12.5px; color: rgba(255,255,255,0.7); font-weight: 600; margin-top: 2px; }

/* ---------- 4-kolom ringkasan jumlah per jenis konten, di atas Pembaca Aktif ---------- */
.stat-glass-media-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    padding: 12px 8px;
}
.stat-media-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 6px 2px; }
.stat-media-icon {
    width: 34px; height: 34px; border-radius: 10px;
    background: rgba(245,181,46,0.16); color: var(--brand-1);
    display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.stat-media-num { font-size: 15px; font-weight: 800; color: white; line-height: 1.1; }
.stat-media-label { font-size: 10px; color: rgba(255,255,255,0.65); font-weight: 600; }
@media (max-width: 460px) {
    .stat-media-label { font-size: 9px; }
    .stat-media-num { font-size: 13px; }
}

/* ---------- FEATURE STRIP ---------- */
.feature-strip-wrap { position: relative; z-index: 3; max-width: 1240px; margin: -46px auto 0; padding: 0 32px; }
.feature-strip { background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 26px 30px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.feature-item { display: flex; align-items: center; gap: 14px; }
.feature-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--cream-soft); color: var(--coffee-4); display: flex; align-items: center; justify-content: center; font-size: 19px; flex-shrink: 0; }
.feature-item h4 { margin: 0 0 3px; font-size: 14.5px; font-weight: 700; color: var(--ink); }
.feature-item p { margin: 0; font-size: 12px; color: var(--text-muted); line-height: 1.4; }

/* ---------- SECTION ---------- */
.section { padding: 34px 28px; max-width: 1240px; margin: 0 auto; }
.section-2col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.section-head h3 { margin: 0; color: var(--ink); font-size: 21px; font-weight: 700; letter-spacing: -0.01em; }
.section-head a { color: var(--coffee-3); font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; gap: 4px; }
.section-head a:hover { text-decoration: underline; }
.section, .feature-item, .book-card, .category-mini-card { animation: fadeSlideUp .5s ease both; }
@keyframes fadeSlideUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- BOOK GRID / CARD ---------- */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px,1fr)); gap: 18px; }
.book-card {
    background: var(--white); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm);
    transition: .25s ease; display: flex; flex-direction: column; border: 1px solid rgba(23,17,14,0.04);
}
.book-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.book-card img { width: 100%; height: 205px; object-fit: cover; background: var(--cream-soft); display: block; }
.card-type-badge {
    position: absolute; top: 8px; left: 8px; z-index: 2;
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 999px; font-size: 10.5px; font-weight: 800; color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.card-type-buku  { background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); color: var(--ink); }
.card-type-ebook { background: linear-gradient(135deg, #2E86C1, #1B4F72); }
.card-type-video { background: linear-gradient(135deg, #E24C4C, #B92929); }
.card-type-audio { background: linear-gradient(135deg, #27AE60, #1E8449); }
.book-card .info { padding: 12px 13px 14px; flex: 1; display: flex; flex-direction: column; gap: 5px; }
.book-card .title { font-weight: 700; font-size: 14px; color: var(--ink); line-height: 1.35; }
.book-card .author { font-size: 11.5px; color: var(--text-muted); font-weight: 500; }
.book-card .desc { font-size: 12px; color: #A8927A; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.book-card .stock {
    font-size: 11px; font-weight: 700; color: var(--coffee-3);
    margin-top: 4px; display: inline-flex; align-items: center; gap: 5px; width: fit-content;
    background: var(--cream-soft); padding: 3px 10px; border-radius: var(--radius-pill);
}

/* ---------- KATEGORI mini card (icon + label) ---------- */
.category-mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.category-mini-card {
    display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-radius: 14px;
    color: white; font-weight: 700; font-size: 14px; box-shadow: var(--shadow-sm); transition: .2s;
}
.category-mini-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.category-mini-card .icon-circle {
    width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.25);
    display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0;
}
/* fallback (halaman kategori.php - flow chip biasa) */
.category-row { display: flex; flex-wrap: wrap; gap: 12px; }
.category-chip {
    display: inline-flex; align-items: center; gap: 10px; padding: 15px 24px; border-radius: var(--radius-md);
    color: white; font-weight: 700; font-size: 14px; box-shadow: var(--shadow-sm); transition: .2s;
}
.category-chip:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* ---------- PAGINATION ---------- */
.pagination { display: flex; gap: 8px; justify-content: center; margin: 30px 0; }
.pagination a, .pagination span {
    min-width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm); background: var(--white); box-shadow: var(--shadow-sm); color: var(--ink); font-weight: 600; font-size: 14px;
}
.pagination a.active, .pagination span.active { background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); color: var(--ink); }

/* ---------- FILTER TABS (front-end: kategori/populer/topview jenis konten) ---------- */
.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    background: white;
    padding: 6px;
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-sm);
    width: fit-content;
    max-width: 100%;
}
.filter-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    transition: .2s;
}
.filter-tabs a i { font-size: 12px; }
.filter-tabs a.active {
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    color: var(--ink);
    box-shadow: var(--shadow-sm);
}
.filter-tabs a:hover:not(.active) { background: var(--cream-soft); color: var(--ink); }
@media (max-width: 700px) {
    .filter-tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
    .filter-tabs a { flex-shrink: 0; }
}

/* ---------- FORMS ---------- */
.form-card {
    background: var(--white); max-width: 480px; margin: 48px auto; padding: 34px;
    border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid rgba(23,17,14,0.04);
}
.form-card h2 { color: var(--ink); margin-top: 0; font-size: 24px; font-weight: 800; }
.form-group { margin-bottom: 17px; }
.form-group label { display: block; margin-bottom: 7px; font-weight: 600; color: var(--ink); font-size: 13.5px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 12px 14px; border: 1.5px solid #EEE1D3; border-radius: var(--radius-sm); font-size: 14px; outline: none;
    font-family: 'Inter', sans-serif; background: var(--cream); transition: .2s; color: var(--ink);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--brand-2); background: white; box-shadow: 0 0 0 4px rgba(201,120,26,0.12); }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); color: var(--ink); border: none; padding: 13px 24px;
    border-radius: var(--radius-sm); font-weight: 700; cursor: pointer; font-size: 14px; text-align: center;
    transition: .2s; box-shadow: var(--shadow-sm); font-family: 'Poppins', sans-serif;
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 12.5px; }
.btn-outline { background: transparent; border: 2px solid var(--coffee-3); color: var(--coffee-3); box-shadow: none; }
.btn-outline:hover { background: var(--cream-soft); }
.btn-danger { background: linear-gradient(135deg, #E24C4C, #B92929); color: white; }
.btn-google { background: white; color: #444; border: 1.5px solid #EEE1D3; box-shadow: none; }
.alert { padding: 13px 18px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 10px; }
.alert-error { background: #FDECEC; color: #B92929; }
.alert-success { background: #E9F9EF; color: #1E8449; }

/* ---------- DETAIL BUKU ---------- */
.page-bg-fixed { position: fixed; inset: 0; z-index: -2; background-size: cover; background-position: center; --overlay: 0.6; }
.page-bg-fixed::after { content: ""; position: absolute; inset: 0; background: rgba(255,248,239, var(--overlay)); }
.detail-page-bg { background: transparent; }
.detail-wrap { max-width: 900px; margin: 0 auto; padding: 28px; }
.detail-back-link {
    display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; font-weight: 700;
    font-size: 13.5px; color: var(--coffee-3); background: white; padding: 8px 16px; border-radius: var(--radius-pill);
    box-shadow: var(--shadow-sm);
}
.detail-back-link:hover { background: var(--cream-soft); }
.locked-media-box {
    background: var(--cream-soft); border-radius: var(--radius-md); padding: 26px; text-align: center;
    border: 1px dashed #EEE1D3;
}
.locked-media-box p { margin: 0 0 14px; font-size: 14px; color: var(--coffee-3); }
.detail-card { background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 26px; display: flex; gap: 24px; flex-wrap: wrap; }
.detail-card img { width: 190px; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); flex-shrink: 0; }
.detail-body { flex: 1; min-width: 240px; display: flex; flex-direction: column; }
.detail-body h1 { margin: 0 0 4px; color: var(--ink); font-size: 23px; font-weight: 800; }
.detail-body .author { color: var(--text-muted); font-size: 13.5px; margin-bottom: 12px; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.badge-mode { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 700; color: white; }
.badge-baca { background: linear-gradient(135deg, #2E86C1, #1B4F72); }
.badge-pinjam { background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); color: var(--ink); }
.fav-btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: var(--radius-pill);
    background: var(--cream-soft); color: var(--coffee-3); font-weight: 700; font-size: 12px; border: 1.5px solid #EEE1D3;
    cursor: pointer; transition: .2s;
}
.fav-btn.active { background: linear-gradient(135deg, #FF7A45, #D9480F); color: white; border-color: transparent; }
.fav-btn:hover { transform: translateY(-2px); }
.detail-stock { font-size: 13px; color: var(--coffee-3); font-weight: 600; margin-bottom: 10px; }

/* Kategori di halaman detail — diperbaiki: pakai flex + gap supaya tidak nempel saat wrap */
.detail-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}
.detail-cats span, .detail-cats a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    color: white;
    transition: transform .15s ease;
}
.detail-cats a:hover { transform: translateY(-2px); }

.detail-body .desc-text { font-size: 13.5px; color: #5A4B3E; line-height: 1.6; margin-bottom: 16px; }

/* Tombol aksi (Baca Preview / Pinjam Buku) — diperbaiki: pakai flex + gap supaya tidak nempel */
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ---------- MEDIA PLAYER (video/audio di halaman detail) ---------- */
.media-player-wrap {
    position: relative; width: 100%; aspect-ratio: 16/9; border-radius: var(--radius-md);
    overflow: hidden; background: #000; box-shadow: var(--shadow-md); margin-top: 6px;
}
.media-player-wrap iframe, .media-player-wrap video {
    position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.audio-player-wrap {
    background: var(--cream-soft); border-radius: var(--radius-md); padding: 18px; margin-top: 6px;
    box-shadow: var(--shadow-sm);
}
.audio-player-wrap audio { display: block; max-width: 100%; }
.media-note { font-size: 12px; color: var(--text-muted); margin: 8px 0 0; display: flex; align-items: center; gap: 6px; }

.detail-box { background: white; padding: 24px; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); margin-top: 20px; }
.detail-box h3 { color: var(--ink); margin-top: 0; font-weight: 700; }
.spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; }
.spec-grid div { font-weight: 600; }
.spec-grid div span { display: block; font-size: 12px; color: var(--text-muted); font-weight: 500; margin-bottom: 2px; }

/* ---------- FOOTER ---------- */
.footer { text-align: center; padding: 26px; font-size: 13px; background: var(--ink-soft); color: rgba(255,255,255,0.5); flex-shrink: 0; }

/* ---------- PROFILE ---------- */
.profile-photo { width: 108px; height: 108px; border-radius: 50%; object-fit: cover; border: 4px solid var(--brand-1); box-shadow: var(--shadow-md); }
.borrow-item { display: flex; gap: 16px; background: white; border-radius: var(--radius-md); padding: 16px; box-shadow: var(--shadow-sm); margin-bottom: 14px; align-items: center; flex-wrap: wrap; }
.borrow-item img { width: 56px; height: 76px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.borrow-item .meta { flex: 1; min-width: 180px; }
.borrow-item .meta .title { font-weight: 700; font-size: 14.5px; margin-bottom: 4px; }
.borrow-item .meta .sub { font-size: 12px; color: var(--text-muted); }
.status-pill { padding: 5px 12px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.status-pending { background: #FDF3E4; color: #C9781A; }
.status-active { background: #E9F9EF; color: #1E8449; }
.status-due-soon { background: #FDECEC; color: #B92929; }

/* ---------- HISTORI ---------- */
.histori-item { display: flex; gap: 16px; background: white; border-radius: var(--radius-md); padding: 14px; box-shadow: var(--shadow-sm); margin-bottom: 14px; align-items: center; }
.histori-item img { width: 60px; height: 82px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.histori-item .meta { flex: 1; }
.histori-item .meta .title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.histori-item .progress-bar { background: var(--cream-soft); border-radius: 999px; height: 7px; overflow: hidden; margin-top: 8px; max-width: 260px; }
.histori-item .progress-bar-fill { background: linear-gradient(90deg, var(--brand-1), var(--brand-2)); height: 100%; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1000px) {
    .hero-grid { grid-template-columns: 1fr; }
    .section-2col { grid-template-columns: 1fr; }
    .feature-strip { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
    .navbar {
        flex-wrap: wrap;
        row-gap: 10px;
        padding: 14px 20px;
    }
    .navbar-menu { display: none; position: absolute; top: 96px; left: 0; right: 0; background: var(--coffee-1); flex-direction: column; padding: 12px; gap: 4px; border-radius: 0 0 16px 16px; }
    .navbar-menu.open { display: flex; }
    .navbar-burger { display: flex; align-items: center; justify-content: center; }
    .navbar-right {
        order: 3;
        flex: 1 1 100%;
        display: flex;
        justify-content: space-between;
        margin-top: 2px;
    }
    .navbar .logo-caption { display: none; }
    .hero h2 { font-size: 30px; }
    .hero { min-height: auto; padding: 44px 20px 60px; }
    .feature-strip { grid-template-columns: 1fr; margin-top: -30px; }
    .category-mini-grid { grid-template-columns: 1fr; }
    .book-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-card { flex-direction: column; align-items: center; text-align: center; }
    .detail-cats { justify-content: center; }
    .detail-actions { justify-content: center; }
    .spec-grid { grid-template-columns: 1fr; }
}