/* ============================================================
           DESIGN TOKENS
        ============================================================ */
        :root {
            --emerald-50:  #ecfdf5;
            --emerald-100: #d1fae5;
            --emerald-200: #a7f3d0;
            --emerald-400: #34d399;
            --emerald-500: #10b981;
            --emerald-600: #059669;
            --emerald-700: #047857;
            --emerald-800: #065f46;
            --emerald-900: #064e3b;
            --gold-300:    #fcd34d;
            --gold-400:    #fbbf24;
            --gold-500:    #f59e0b;
            --gold-600:    #d97706;
            --white:       #ffffff;
            --gray-50:     #f9fafb;
            --gray-100:    #f3f4f6;
            --gray-200:    #e5e7eb;
            --gray-400:    #9ca3af;
            --gray-600:    #4b5563;
            --gray-700:    #374151;
            --gray-800:    #1f2937;
            --gray-900:    #111827;

            --font-primary: 'Plus Jakarta Sans', sans-serif;
            --font-arabic:  'Amiri', serif;

            --radius-sm:  0.375rem;
            --radius-md:  0.75rem;
            --radius-lg:  1rem;
            --radius-xl:  1.5rem;
            --radius-2xl: 2rem;

            --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
            --shadow-md:  0 4px 16px rgba(0,0,0,.10);
            --shadow-lg:  0 10px 40px rgba(0,0,0,.12);
            --shadow-emerald: 0 8px 30px rgba(5,150,105,.25);

            --transition: all .3s cubic-bezier(.4,0,.2,1);

            /* Semantic */
            --bg-primary:   var(--white);
            --bg-secondary: var(--gray-50);
            --bg-card:      var(--white);
            --text-primary: var(--gray-900);
            --text-secondary: var(--gray-600);
            --text-muted:   var(--gray-400);
            --border-color: var(--gray-200);
            --navbar-bg:    rgba(255,255,255,.95);
        }

        [data-theme="dark"] {
            --bg-primary:   #0f1923;
            --bg-secondary: #1a2535;
            --bg-card:      #1e2d3d;
            --text-primary: #f1f5f9;
            --text-secondary: #94a3b8;
            --text-muted:   #64748b;
            --border-color: #2d3f55;
            --navbar-bg:    rgba(15,25,35,.95);
        }

        /* ============================================================
           BASE
        ============================================================ */
        *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

        html { scroll-behavior: smooth; }

        body {
            font-family: var(--font-primary);
            background: var(--bg-primary);
            color: var(--text-primary);
            transition: background .4s, color .4s;
            overflow-x: hidden;
        }

        .section-gap { padding: 5rem 0; }
        .section-gap-sm { padding: 3rem 0; }

        img { max-width: 100%; height: auto; }

        a { text-decoration: none; color: inherit; }

        /* ============================================================
           SKELETON LOADING
        ============================================================ */
        .skeleton {
            background: linear-gradient(90deg,
                var(--gray-200) 25%,
                var(--gray-100) 50%,
                var(--gray-200) 75%);
            background-size: 200% 100%;
            animation: skeleton-wave 1.5s infinite;
            border-radius: var(--radius-sm);
        }
        @keyframes skeleton-wave {
            0%   { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }

        /* ============================================================
           PAGE LOADER
        ============================================================ */
        #page-loader {
            position: fixed; inset: 0; z-index: 9999;
            background: var(--emerald-900);
            display: flex; align-items: center; justify-content: center;
            flex-direction: column; gap: 1rem;
            transition: opacity .5s, visibility .5s;
        }
        #page-loader.hidden { opacity: 0; visibility: hidden; }
        .loader-logo {
            font-size: 2rem; color: var(--white);
            font-weight: 800; letter-spacing: -1px;
        }
        .loader-logo span { color: var(--gold-400); }
        .loader-bar {
            width: 200px; height: 3px;
            background: rgba(255,255,255,.2);
            border-radius: 99px; overflow: hidden;
        }
        .loader-bar-inner {
            height: 100%; width: 0;
            background: linear-gradient(90deg, var(--emerald-400), var(--gold-400));
            animation: loader-fill 1.2s ease forwards;
        }
        @keyframes loader-fill {
            to { width: 100%; }
        }

        /* ============================================================
           FLOATING BUTTONS
        ============================================================ */
        .floating-btns {
            position: fixed; bottom: 2rem; right: 1.5rem;
            display: flex; flex-direction: column; gap: .75rem;
            z-index: 1000;
        }
        .float-btn {
            width: 48px; height: 48px;
            border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            cursor: pointer; border: none; font-size: 1.1rem;
            box-shadow: var(--shadow-lg); transition: var(--transition);
        }
        .float-btn:hover { transform: translateY(-3px) scale(1.05); }
        .float-btn-help {
            background: linear-gradient(135deg, var(--emerald-600), var(--emerald-700));
            color: white;
        }
        .float-btn-top {
            background: var(--bg-card);
            color: var(--emerald-600);
            border: 1px solid var(--border-color);
            opacity: 0; pointer-events: none; transition: var(--transition);
        }
        .float-btn-top.visible { opacity: 1; pointer-events: all; }

        /* ============================================================
           SCROLLBAR
        ============================================================ */
        ::-webkit-scrollbar { width: 6px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb {
            background: var(--emerald-600);
            border-radius: 99px;
        }

        /* member */
        /* ── Akun Wrap ── */
/* ── Akun Wrap ── */
.akun-wrap {
    max-width: 960px;
    margin: 2rem auto;
    padding: 0 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.akun-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, var(--emerald-600), var(--emerald-800));
    color: #fff;
    padding: 1.5rem 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-emerald);
}
.akun-avatar i { font-size: 3rem; opacity: .85; }
.akun-greeting h1 { font-size: 1.4rem; margin: 0 0 .25rem; }
.akun-greeting h1 span { font-weight: 700; color: var(--gold-300); }
.akun-greeting p { margin: 0; font-size: .875rem; opacity: .85; }

.alert-due {
    display: flex;
    align-items: center;
    gap: .75rem;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-left: 4px solid #f97316;
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    font-size: .9rem;
    color: #7c2d12;
}
.alert-due i { color: #f97316; font-size: 1.1rem; flex-shrink: 0; }
.alert-due-link { margin-left: auto; color: #ea580c; font-weight: 600; text-decoration: none; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1rem;
}
.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon { font-size: 1.75rem; width: 2.75rem; text-align: center; }
.stat-icon.green   { color: #16a34a; }
.stat-icon.gold    { color: var(--gold-500); }
.stat-icon.emerald { color: var(--emerald-600); }
.stat-icon.gray    { color: var(--text-muted); }
.stat-num   { font-size: 1.75rem; font-weight: 700; line-height: 1; display: block; color: var(--text-primary); }
.stat-label { font-size: .8rem; color: var(--text-secondary); }

.akun-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
@media (max-width: 640px) { .akun-main { grid-template-columns: 1fr; } }

.akun-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .875rem;
    box-shadow: var(--shadow-sm);
}
.section-head { display: flex; justify-content: space-between; align-items: center; }
.section-head h2 { font-size: 1rem; font-weight: 600; margin: 0; color: var(--text-primary); }
.section-head a  { font-size: .8rem; color: var(--emerald-600); text-decoration: none; font-weight: 500; }
.section-head a:hover { color: var(--emerald-700); }

.borrow-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    gap: .5rem;
    background: var(--bg-secondary);
    transition: var(--transition);
}
.borrow-card:hover { border-color: var(--emerald-200); }
.borrow-card.near-due { border-color: #fed7aa; background: #fff7ed; }
.borrow-title { font-size: .9rem; font-weight: 600; display: block; color: var(--text-primary); }
.borrow-meta  { font-size: .8rem; color: var(--text-secondary); }

.badge-status         { font-size: .75rem; padding: .2rem .6rem; border-radius: 999px; font-weight: 600; }
.badge-status.pending { background: #fef9c3; color: #854d0e; }
.badge-status.ready   { background: #dcfce7; color: #166534; }

.btn-perpanjang {
    font-size: .8rem; padding: .35rem .85rem;
    background: var(--emerald-600); color: #fff;
    border: none; border-radius: var(--radius-sm); cursor: pointer;
    transition: var(--transition);
}
.btn-perpanjang:hover { background: var(--emerald-700); }

.btn-batal {
    font-size: .8rem; padding: .35rem .85rem;
    background: #fee2e2; color: #991b1b;
    border: none; border-radius: var(--radius-sm); cursor: pointer;
    transition: var(--transition);
}
.btn-batal:hover { background: #fecaca; }

.btn-primary-sm {
    display: inline-block; margin-top: .5rem;
    font-size: .85rem; padding: .4rem 1rem;
    background: var(--emerald-600); color: #fff;
    border-radius: var(--radius-sm); text-decoration: none;
    transition: var(--transition);
}
.btn-primary-sm:hover { background: var(--emerald-700); color: #fff; }

.empty-state { text-align: center; color: var(--text-muted); padding: 1.5rem 0; }
.empty-state i { font-size: 2rem; display: block; margin-bottom: .5rem; }
.empty-state p { margin: 0; font-size: .875rem; }

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}
.quick-link {
    display: flex; align-items: center; gap: .5rem;
    padding: .6rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--emerald-100);
    border-radius: var(--radius-sm);
    font-size: .875rem;
    color: var(--emerald-800);
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}
.quick-link:hover {
    background: var(--emerald-50);
    border-color: var(--emerald-400);
    transform: translateY(-2px);
}
.quick-link i { color: var(--emerald-600); }

/* Overdues */
.alert-overdue {
    background: #fef2f2;
    border-color: #fecaca;
    border-left-color: #dc2626;
    color: #7f1d1d;
}
.alert-overdue i { color: #dc2626; }
.alert-overdue .alert-due-link { color: #dc2626; }

.stat-icon.danger { color: #dc2626; }

.btn-perpanjang:disabled {
    background: var(--gray-400);
    cursor: not-allowed;
    opacity: .6;
}

/* logouot */
.btn-logout {
    background: #dc2626;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
.btn-logout:hover {
    background: #b91c1c;
}
   
        /* katalog */
.katalog-wrap {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.katalog-header h1 { font-size: 1.5rem; margin-bottom: .25rem; color: var(--text-primary); }
.katalog-header p  { font-size: .9rem; color: var(--text-secondary); }

.katalog-search {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: .6rem 1rem;
}
.katalog-search i { color: var(--text-muted); }
.katalog-search input {
    flex: 1; border: none; outline: none; background: transparent;
    font-size: .9rem; color: var(--text-primary);
}
.katalog-search button {
    background: var(--emerald-600); color: #fff; border: none;
    padding: .45rem 1rem; border-radius: var(--radius-sm);
    font-size: .85rem; cursor: pointer;
}

/* Chip scroll - mobile first */
.chip-scroll {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    padding-bottom: .25rem;
    scrollbar-width: none;
}
.chip-scroll::-webkit-scrollbar { display: none; }
.chip {
    flex-shrink: 0;
    padding: .4rem .9rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: .8rem;
    white-space: nowrap;
}
.chip-active {
    background: var(--emerald-600);
    border-color: var(--emerald-600);
    color: #fff;
}

/* Filter row */
.filter-row {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
@media (min-width: 640px) {
    .filter-row { flex-direction: row; justify-content: space-between; align-items: center; }
}
.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.filter-form select {
    font-size: .8rem;
    padding: .4rem .6rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-primary);
}
.result-count { font-size: .8rem; color: var(--text-muted); white-space: nowrap; }

/* Book Grid - mobile first: 1 column, horizontal card */
.book-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: .75rem;
}
.book-card {
    display: flex;
    gap: .75rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: .6rem;
    text-decoration: none;
    transition: var(--transition);
}
.book-card:hover { border-color: var(--emerald-400); box-shadow: var(--shadow-sm); }

.book-cover {
    width: 56px; height: 80px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-cover i { font-size: 1.5rem; color: var(--text-muted); }

.book-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.book-title {
    font-size: .85rem; font-weight: 600; color: var(--text-primary);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.book-author { font-size: .75rem; color: var(--text-secondary); }
.book-meta { display: flex; align-items: center; gap: .5rem; margin-top: .25rem; }
.book-rating { font-size: .75rem; color: var(--gold-600); display: flex; align-items: center; gap: 2px; }

.status-available { background: #dcfce7; color: #166534; }
.status-borrowed   { background: #fee2e2; color: #991b1b; }
.status-reserved   { background: #fef9c3; color: #854d0e; }

/* Tablet: 2 kolom, card berubah jadi vertikal */
@media (min-width: 480px) {
    .book-grid { grid-template-columns: repeat(2, 1fr); }
    .book-card { flex-direction: column; }
    .book-cover { width: 100%; height: 160px; }
}

/* Desktop: 3-4 kolom */
@media (min-width: 768px)  { .book-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .book-grid { grid-template-columns: repeat(4, 1fr); } }

.empty-state-full {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}
.empty-state-full i { font-size: 2.5rem; display: block; margin-bottom: .75rem; }

.pagination-wrap { display: flex; justify-content: center; margin-top: 1rem; }

        /* akun/riwayat */
        .page-header { display: flex; flex-direction: column; gap: .5rem; margin-bottom: .5rem; }
.back-link { font-size: .85rem; color: var(--emerald-600); display: flex; align-items: center; gap: .35rem; width: fit-content; }
.page-header h1 { font-size: 1.3rem; color: var(--text-primary); }

.borrow-cover {
    width: 48px; height: 64px; flex-shrink: 0;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.borrow-cover img { width: 100%; height: 100%; object-fit: cover; }
.borrow-cover i { font-size: 1.2rem; color: var(--text-muted); }

.borrow-card.overdue { border-color: #fecaca; background: #fef2f2; }
.borrow-dates { display: flex; flex-direction: column; gap: 1px; font-size: .75rem; color: var(--text-muted); margin-top: 2px; }
.borrow-side { display: flex; flex-direction: column; align-items: flex-end; gap: .4rem; }
.fine-tag { font-size: .72rem; color: #991b1b; font-weight: 600; }

/* akun/bebas pustaka */
    .surat-kop {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    text-align: left;
}
.kop-logo img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}
.kop-text { flex: 1; }
.kop-text h2 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: .03em;
    margin: 0 0 .1rem;
    color: var(--text-primary);
}
.kop-sub {
    font-size: .85rem;
    margin: 0 0 .25rem;
    color: var(--text-secondary);
}
.kop-arabic {
    font-family: var(--font-arabic);
    font-size: 1.1rem;
    direction: rtl;
    margin: .25rem 0;
    color: var(--text-primary);
}
.kop-address {
    font-size: .75rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}
.kop-divider {
    border-top: 3px double var(--text-primary);
    margin: .75rem 0 .5rem;
}
.surat-judul {
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    letter-spacing: .05em;
    margin: 0;
    text-decoration: underline;
}
.bp-status {
    display: flex; align-items: center; gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-lg);
    flex-wrap: wrap;
}
.bp-eligible     { background: #dcfce7; border: 1px solid #86efac; }
.bp-not-eligible { background: #fef2f2; border: 1px solid #fecaca; }
.bp-status-icon  { font-size: 2rem; flex-shrink: 0; }
.bp-eligible .bp-status-icon     { color: #16a34a; }
.bp-not-eligible .bp-status-icon { color: #dc2626; }
.bp-status h2 { font-size: 1rem; font-weight: 600; margin: 0 0 .2rem; }
.bp-status p  { font-size: .85rem; margin: 0; }
.bp-eligible h2 { color: #166534; }
.bp-eligible p  { color: #166534; opacity: .8; }
.bp-not-eligible h2 { color: #991b1b; }
.bp-not-eligible p  { color: #991b1b; opacity: .8; }

.btn-print {
    margin-left: auto; padding: .5rem 1rem;
    background: var(--emerald-600); color: #fff;
    border: none; border-radius: var(--radius-sm);
    font-size: .85rem; cursor: pointer; display: flex;
    align-items: center; gap: .4rem;
}
.btn-print:hover { background: var(--emerald-700); }

/* Surat Cetak */
.bp-surat {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex; flex-direction: column; gap: 1rem;
}
.surat-header { text-align: center; border-bottom: 2px solid var(--text-primary); padding-bottom: 1rem; }
.surat-header h2 { font-size: 1rem; font-weight: 700; letter-spacing: .05em; }
.surat-header p  { font-size: .85rem; color: var(--text-secondary); margin: .25rem 0 0; }
.surat-body { font-size: .9rem; line-height: 1.7; }
.surat-table { font-size: .9rem; border-collapse: collapse; }
.surat-table td { padding: .25rem .5rem; }
.surat-table td:first-child { width: 140px; color: var(--text-secondary); }
.surat-footer { margin-top: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.surat-footer p { font-size: .85rem; }
.surat-ttd { margin-top: 1rem; text-align: right; }
.ttd-space { height: 80px; }

/* Checklist */
.bp-checklist {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    display: flex; flex-direction: column; gap: .75rem;
}
.bp-checklist h3 { font-size: 1rem; font-weight: 600; margin: 0; }

.bp-check-item {
    display: flex; align-items: flex-start; gap: .75rem;
    padding: .75rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}
.check-ok   { background: #f0fdf4; border-color: #bbf7d0; }
.check-fail { background: #fef2f2; border-color: #fecaca; }
.check-ok   i { color: #16a34a; font-size: 1.1rem; margin-top: 1px; }
.check-fail i { color: #dc2626; font-size: 1.1rem; margin-top: 1px; }
.check-label { font-size: .9rem; font-weight: 600; display: block; }
.check-sub   { font-size: .8rem; color: var(--text-secondary); }

.bp-sub-list {
    margin-left: 1rem;
    display: flex; flex-direction: column; gap: .5rem;
}
.bp-sub-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: .5rem .75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    font-size: .85rem; gap: .5rem; flex-wrap: wrap;
}
.bp-sub-item.sub-overdue { border-color: #fecaca; background: #fff5f5; }
.sub-meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }

/* e-resources */
    /* Type chips */
.chip-type {
    font-size: .7rem; padding: .2rem .6rem;
    border-radius: 999px; font-weight: 600;
}
.type-ebook        { background: #dbeafe; color: #1e40af; }
.type-journal      { background: #dcfce7; color: #166534; }
.type-thesis       { background: #fef9c3; color: #854d0e; }
.type-dissertation { background: #f3e8ff; color: #6b21a8; }
.type-research     { background: #ffedd5; color: #9a3412; }

/* Access badges */
.access-badge {
    font-size: .75rem; padding: .2rem .5rem;
    border-radius: 999px; display: inline-flex;
    align-items: center; gap: 3px; font-weight: 600;
}
.access-public     { background: #dcfce7; color: #166534; }
.access-member     { background: #dbeafe; color: #1e40af; }
.access-restricted { background: #fee2e2; color: #991b1b; }

/* Chip counter */
.chip-count {
    background: rgba(0,0,0,.1);
    border-radius: 999px;
    padding: 0 .4rem;
    font-size: .7rem;
}
.chip-active .chip-count { background: rgba(255,255,255,.25); }

.doi-link { color: var(--emerald-600); font-size: .85rem; word-break: break-all; }

    /* events */
    /* Event Grid */
.event-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: .75rem;
}
@media (min-width: 480px) { .event-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .event-grid { grid-template-columns: repeat(3, 1fr); } }

.event-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    transition: var(--transition);
}
.event-card:hover { border-color: var(--emerald-400); box-shadow: var(--shadow-sm); }

.event-thumb {
    position: relative;
    height: 160px;
    overflow: hidden;
}
.event-thumb img { width: 100%; height: 100%; object-fit: cover; }
.event-thumb-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
}
.event-thumb-placeholder i { font-size: 2.5rem; color: rgba(255,255,255,.7); }

.event-type-badge {
    position: absolute; top: .6rem; left: .6rem;
    color: #fff; font-size: .7rem; font-weight: 600;
    padding: .2rem .6rem; border-radius: 999px;
}
.event-free-badge {
    position: absolute; top: .6rem; right: .6rem;
    background: var(--gold-500); color: #fff;
    font-size: .7rem; font-weight: 600;
    padding: .2rem .6rem; border-radius: 999px;
}

.event-info {
    display: flex;
    gap: .75rem;
    padding: .75rem;
}
.event-date-block {
    display: flex; flex-direction: column;
    align-items: center; justify-content: flex-start;
    flex-shrink: 0;
    min-width: 36px;
}
.event-date-day { font-size: 1.4rem; font-weight: 700; line-height: 1; color: var(--emerald-600); }
.event-date-mon { font-size: .65rem; color: var(--text-muted); text-transform: uppercase; }

.event-content { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.event-title { font-size: .85rem; font-weight: 600; color: var(--text-primary); line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.event-speaker { font-size: .75rem; color: var(--text-secondary); }
.event-loc { font-size: .75rem; color: var(--text-muted); display: flex; align-items: center; gap: 3px; }
.event-meta { display: flex; align-items: center; gap: .5rem; margin-top: 4px; }

/* Quota Bar */
.quota-bar-wrap {
    flex: 1; height: 4px;
    background: var(--border-color);
    border-radius: 999px; overflow: hidden;
    max-width: 80px;
}
.quota-bar { display: block; height: 100%; background: var(--emerald-500); border-radius: 999px; }
.quota-text { font-size: .7rem; color: var(--text-muted); }

/* Event Hero */
.event-hero {
    position: relative;
    width: 100%; height: 260px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}
@media (min-width: 640px) { .event-hero { height: 360px; } }
.event-hero img { width: 100%; height: 100%; object-fit: cover; }
.event-hero-placeholder {
    width: 100%; height: 100%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: .75rem;
}
.event-hero-placeholder i { font-size: 3rem; color: rgba(255,255,255,.7); }
.event-hero-placeholder span { font-size: 1.1rem; font-weight: 600; color: #fff; text-align: center; padding: 0 2rem; }

/* Event Detail Meta */
.event-detail-info { display: flex; flex-direction: column; gap: 1rem; }
.event-detail-info h1 { font-size: 1.4rem; color: var(--text-primary); margin: 0; }
.event-meta-list { display: flex; flex-direction: column; gap: .75rem; }
.meta-item {
    display: flex; align-items: flex-start; gap: .75rem;
    font-size: .9rem; color: var(--text-primary);
}
.meta-item > i { color: var(--emerald-600); font-size: 1.1rem; margin-top: 1px; flex-shrink: 0; }
.meta-item > div { display: flex; flex-direction: column; gap: 1px; }
.meta-sub { font-size: .78rem; color: var(--text-muted); }
.meta-link { color: var(--emerald-600); font-size: .82rem; }

    /* news */
    /* News Featured */
.news-featured {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    transition: var(--transition);
}
.news-featured:hover { border-color: var(--emerald-400); box-shadow: var(--shadow-md); }
@media (min-width: 640px) { .news-featured { flex-direction: row; } }

.news-featured-thumb {
    position: relative;
    height: 220px; flex-shrink: 0;
}
@media (min-width: 640px) { .news-featured-thumb { width: 380px; height: auto; } }
.news-featured-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-featured-tag {
    position: absolute; top: .6rem; left: .6rem;
    background: var(--emerald-600); color: #fff;
    font-size: .7rem; font-weight: 600;
    padding: .2rem .7rem; border-radius: 999px;
}

.news-featured-info {
    padding: 1.25rem 1.5rem;
    display: flex; flex-direction: column; gap: .5rem;
}
.news-featured-info h2 {
    font-size: 1.15rem; font-weight: 700;
    color: var(--text-primary); line-height: 1.4; margin: 0;
}
.news-featured-info p {
    font-size: .875rem; color: var(--text-secondary);
    line-height: 1.6; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: .75rem;
}
@media (min-width: 480px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .news-grid { grid-template-columns: repeat(3, 1fr); } }

.news-card {
    display: flex; flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    transition: var(--transition);
}
.news-card:hover { border-color: var(--emerald-400); box-shadow: var(--shadow-sm); }

.news-card-thumb {
    position: relative; height: 160px; overflow: hidden;
}
.news-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.news-card:hover .news-card-thumb img { transform: scale(1.03); }

.news-thumb-placeholder {
    width: 100%; height: 100%;
    background: var(--bg-secondary);
    display: flex; align-items: center; justify-content: center;
}
.news-thumb-placeholder i { font-size: 2rem; color: var(--text-muted); }

.news-card-info {
    padding: .75rem 1rem;
    display: flex; flex-direction: column; gap: 4px; flex: 1;
}
.news-date { font-size: .72rem; color: var(--emerald-600); display: flex; align-items: center; gap: 4px; }
.news-title {
    font-size: .875rem; font-weight: 600; color: var(--text-primary); line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-excerpt {
    font-size: .78rem; color: var(--text-secondary); line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-meta {
    display: flex; gap: .75rem; margin-top: auto; padding-top: .4rem;
    font-size: .72rem; color: var(--text-muted);
}
.news-meta span { display: flex; align-items: center; gap: 3px; }
.news-author { font-size: .78rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }

/* Article */
.news-hero {
    width: 100%; height: 260px;
    border-radius: var(--radius-lg); overflow: hidden;
}
@media (min-width: 640px) { .news-hero { height: 400px; } }
.news-hero img { width: 100%; height: 100%; object-fit: cover; }
.news-hero-placeholder {
    width: 100%; height: 100%;
    background: var(--bg-secondary);
    display: flex; align-items: center; justify-content: center;
}
.news-hero-placeholder i { font-size: 3rem; color: var(--text-muted); }

.news-article {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex; flex-direction: column; gap: 1rem;
}
.article-meta {
    display: flex; flex-wrap: wrap; gap: 1rem;
    font-size: .78rem; color: var(--text-muted);
}
.article-meta span { display: flex; align-items: center; gap: 4px; }
.news-article h1 { font-size: 1.4rem; font-weight: 700; color: var(--text-primary); line-height: 1.4; margin: 0; }
.article-excerpt {
    font-size: .95rem; color: var(--text-secondary);
    border-left: 3px solid var(--emerald-500);
    padding-left: 1rem; line-height: 1.7; margin: 0;
}
.article-content {
    font-size: .95rem; color: var(--text-primary);
    line-height: 1.8;
}
.article-content p  { margin-bottom: 1rem; }
.article-content h2 { font-size: 1.1rem; font-weight: 700; margin: 1.5rem 0 .5rem; }
.article-content h3 { font-size: 1rem; font-weight: 700; margin: 1.25rem 0 .5rem; }
.article-content img { border-radius: var(--radius-md); max-width: 100%; margin: 1rem 0; }
.article-content ul,
.article-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.article-content li { margin-bottom: .35rem; }
.article-content blockquote {
    border-left: 3px solid var(--emerald-500);
    padding-left: 1rem; color: var(--text-secondary);
    font-style: italic; margin: 1rem 0;
}

/* Share */
.article-share {
    display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: .85rem; color: var(--text-muted);
}
.share-btn {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .35rem .85rem;
    border-radius: 999px; font-size: .8rem; font-weight: 600;
    text-decoration: none; border: none; cursor: pointer;
    transition: var(--transition);
}
.share-wa   { background: #dcfce7; color: #166534; }
.share-tg   { background: #dbeafe; color: #1e40af; }
.share-copy { background: var(--bg-secondary); color: var(--text-primary); }
.share-btn:hover { opacity: .85; }

    /* koleksi islami */
    .islamic-page-header {
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, var(--emerald-800), var(--emerald-900));
    border-radius: var(--radius-lg);
    color: #fff;
    display: flex; flex-direction: column; align-items: center; gap: .5rem;
}
.islamic-page-header .arabic-text {
    font-family: var(--font-arabic);
    font-size: 1.5rem; color: var(--gold-300); line-height: 2;
}
.islamic-page-header h1 { font-size: 1.4rem; font-weight: 700; margin: 0; }
.islamic-page-header p  { font-size: .875rem; opacity: .8; margin: 0; }
.islamic-total-badge {
    display: inline-flex; align-items: center; gap: .4rem;
    background: rgba(251,191,36,.2);
    border: 1px solid rgba(251,191,36,.3);
    color: var(--gold-300); font-size: .8rem; font-weight: 600;
    padding: .3rem .9rem; border-radius: 999px;
}

.chip-islamic { border-color: var(--emerald-200); color: var(--emerald-700); }
.chip-islamic.chip-active { background: var(--emerald-700); border-color: var(--emerald-700); }
.chip-arabic {
    font-family: var(--font-arabic);
    font-size: .85rem; margin-right: .25rem;
}

.islamic-mark {
    position: absolute; top: .4rem; left: .4rem;
    background: var(--emerald-700); color: #fff;
    width: 22px; height: 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .6rem;
}

.book-cat-tag {
    font-size: .72rem; color: var(--emerald-700);
    display: flex; align-items: center; gap: 2px;
    margin-top: 2px;
}

.islamic-page-quote {
    text-align: center;
    padding: 2rem 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: .875rem;
}