/* =========================================================
   Sistem Informasi Masjid At-Taqwa
   Tema: Hijau tua + Emas, nuansa islami, modern & minimalis
   ========================================================= */

:root {
    --hijau-tua: #0f3d2e;
    --hijau: #1b4332;
    --hijau-muda: #2d6a4f;
    --hijau-soft: #40916c;
    --emas: #c9a227;
    --emas-terang: #e0b93d;
    --cream: #f7f5ef;
    --putih: #ffffff;
    --abu: #6c757d;
    --radius: 16px;
    --shadow-soft: 0 10px 30px rgba(15, 61, 46, 0.08);
    --shadow-hover: 0 16px 40px rgba(15, 61, 46, 0.14);
}

* { box-sizing: border-box; }

html, body { overflow-x: hidden; max-width: 100%; }

body {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    background: var(--cream);
    color: #24312b;
    margin: 0;
}

/* Pengaman ekstra: tabel data selalu bisa digeser ke samping DI DALAM
   kartunya sendiri di layar kecil, tanpa membuat seluruh halaman melebar. */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.table-soft { min-width: 560px; }
@media (max-width: 480px) {
    .page-header h2 { font-size: 1.25rem; }
    .card-soft, .stat-card { padding: 16px; }
}

a { text-decoration: none; }

.text-emas { color: var(--emas) !important; }
.bg-hijau-tua { background: var(--hijau-tua) !important; }

/* ============== LOGIN PAGE ============== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    background: linear-gradient(135deg, var(--hijau-tua) 0%, var(--hijau) 55%, var(--hijau-muda) 100%);
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 15% 20%, rgba(201,162,39,0.12) 0, transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(201,162,39,0.10) 0, transparent 45%);
    pointer-events: none;
}

.pattern-strip {
    position: absolute;
    top: 0; bottom: 0; left: 0; right: 0;
    background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.025) 0 2px, transparent 2px 22px);
    pointer-events: none;
}

.profile-panel {
    flex: 1.15;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 70px;
    color: var(--putih);
    position: relative;
    z-index: 1;
    animation: fadeInLeft .7s ease both;
}

.masjid-icon-badge {
    width: 74px; height: 74px;
    border-radius: 20px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(201,162,39,0.4);
    display: flex; align-items: center; justify-content: center;
    font-size: 34px;
    color: var(--emas-terang);
    margin-bottom: 24px;
    backdrop-filter: blur(4px);
}

.masjid-logo-badge {
    width: 96px; height: 96px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid rgba(201,162,39,0.4);
    box-shadow: 0 10px 26px rgba(0,0,0,0.18);
    display: flex; align-items: center; justify-content: center;
    padding: 12px;
    margin-bottom: 24px;
}
.masjid-logo-badge img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.profile-panel h1 {
    font-size: 2.3rem;
    font-weight: 700;
    margin: 0 0 6px;
    letter-spacing: .3px;
}

.profile-panel .subtitle {
    color: var(--emas-terang);
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: .78rem;
    margin-bottom: 22px;
}

.profile-panel .alamat-box {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 22px;
    max-width: 460px;
}

.profile-panel .alamat-box i { color: var(--emas-terang); margin-top: 2px; }

.profile-panel .deskripsi {
    color: rgba(255,255,255,0.82);
    line-height: 1.75;
    max-width: 480px;
    font-size: .95rem;
    margin-bottom: 26px;
}

.sejarah-timeline {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 26px;
    max-width: 460px;
    flex-wrap: wrap;
}
.sejarah-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 8px 14px;
}
.sejarah-year {
    background: var(--emas);
    color: #1b3324;
    font-weight: 700;
    font-size: .78rem;
    border-radius: 8px;
    padding: 4px 9px;
    white-space: nowrap;
}
.sejarah-text {
    color: rgba(255,255,255,0.85);
    font-size: .8rem;
    white-space: nowrap;
}
.sejarah-connector {
    width: 26px;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--emas-terang) 0 6px, transparent 6px 10px);
    margin: 0 8px;
}
@media (max-width: 480px) {
    .sejarah-timeline { flex-direction: column; align-items: flex-start; gap: 8px; }
    .sejarah-connector { display: none; }
}

.mini-stats {
    display: flex;
    gap: 34px;
    flex-wrap: wrap;
}

.mini-stats .stat b {
    display: block;
    font-size: 1.4rem;
    color: var(--emas-terang);
    font-weight: 700;
}

.mini-stats .stat span {
    font-size: .78rem;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: .5px;
}

.login-panel {
    flex: 0.85;
    background: var(--putih);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    z-index: 1;
    border-top-left-radius: 34px;
    border-bottom-left-radius: 34px;
    box-shadow: -20px 0 60px rgba(0,0,0,0.15);
    animation: fadeInRight .7s ease both;
}

.login-form-box { width: 100%; max-width: 360px; }

.login-form-box h3 {
    font-weight: 700;
    color: var(--hijau-tua);
    margin-bottom: 4px;
}

.login-form-box p.hint {
    color: var(--abu);
    font-size: .87rem;
    margin-bottom: 28px;
}

.form-floating > label { color: #8a8a8a; }

.form-control {
    border-radius: 12px;
    padding: 14px 16px;
    border: 1.5px solid #e9e6dc;
    background: #fbfaf6;
    transition: all .2s ease;
}

.form-control:focus {
    border-color: var(--hijau-soft);
    box-shadow: 0 0 0 4px rgba(45, 106, 79, 0.12);
    background: var(--putih);
}

.btn-masjid {
    background: linear-gradient(135deg, var(--hijau-muda), var(--hijau-tua));
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 13px;
    border-radius: 12px;
    width: 100%;
    letter-spacing: .3px;
    transition: transform .18s ease, box-shadow .18s ease;
}
.btn-masjid:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(15,61,46,0.25);
    color: #fff;
}

.demo-accounts {
    margin-top: 26px;
    background: var(--cream);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: .78rem;
    color: #5a5a52;
}
.demo-accounts b { color: var(--hijau-tua); }

.login-kembali {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .82rem; font-weight: 500; color: var(--hijau-muda);
    margin-bottom: 22px;
}
.login-kembali:hover { color: var(--hijau-tua); text-decoration: underline; }

/* Pilihan peran login: Pengurus/Admin, Bendahara, Jamaah */
.pilih-peran { border: 0; padding: 0; margin: 0; min-width: 0; }
.pilih-peran legend { float: none; width: auto; font-size: .875em; }
.pilih-peran-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.peran-opsi { position: relative; cursor: pointer; margin: 0; display: flex; }
.peran-opsi input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.peran-opsi span {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    border: 1.5px solid #e9e6dc; background: #fbfaf6; border-radius: 12px;
    flex: 1; padding: 10px 6px; font-size: .78rem; font-weight: 600; color: #4d5a53; text-align: center;
    transition: all .15s ease; line-height: 1.2;
}
.peran-opsi span i { font-size: 1.15rem; color: var(--hijau-soft); }
.peran-opsi:hover span { border-color: var(--hijau-soft); }
.peran-opsi input:checked + span { border-color: var(--hijau-muda); background: #e6f2ec; color: var(--hijau-tua); box-shadow: 0 0 0 3px rgba(45,106,79,.12); }
.peran-opsi input:focus-visible + span { outline: 2px solid var(--emas); outline-offset: 2px; }

@keyframes fadeInLeft { from {opacity:0; transform: translateX(-24px);} to {opacity:1; transform: translateX(0);} }
@keyframes fadeInRight { from {opacity:0; transform: translateX(24px);} to {opacity:1; transform: translateX(0);} }

@media (max-width: 991px) {
    .login-wrapper { flex-direction: column; }
    .profile-panel { padding: 44px 32px; }
    .login-panel { border-radius: 34px 34px 0 0; box-shadow: 0 -20px 60px rgba(0,0,0,0.15); }
}

/* ============== APP SHELL (setelah login) ============== */
.app-topbar {
    background: var(--putih);
    border: 1px solid #f0eee5;
    border-radius: var(--radius);
    padding: 10px 18px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: sticky;
    top: 10px;
    z-index: 100;
    box-shadow: var(--shadow-soft);
}
.topbar-tanggal { font-size: .88rem; color: #555; white-space: nowrap; }
.btn-burger {
    display: none; width: 42px; height: 42px; border-radius: 10px; border: 1px solid #e9e6dc;
    background: #fff; color: var(--hijau-tua); font-size: 1.4rem; line-height: 1;
    align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
}
.topbar-user {
    display: flex; align-items: center; gap: 10px; color: inherit; border-radius: 40px;
    padding: 3px 12px 3px 3px; transition: background .15s ease;
}
.topbar-user:hover { background: #f3f1ea; color: inherit; }
.topbar-user .avatar-circle { width: 40px; height: 40px; flex-shrink: 0; }
.topbar-user-teks b { display: block; font-size: .88rem; line-height: 1.15; font-weight: 600; }
.topbar-user-teks small { font-size: .72rem; color: #8a8a82; }

.app-topbar .brand {
    display: flex; align-items: center; gap: 10px;
    font-weight: 700;
    color: var(--hijau-tua);
}
.app-topbar .brand .icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--hijau-muda), var(--hijau-tua));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
}

.app-sidebar {
    background: var(--hijau-tua);
    min-height: 100vh;
    width: 250px;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    overscroll-behavior: contain;
    padding: 22px 16px;
    color: #fff;
    z-index: 200;
    transition: transform .25s ease;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.25) transparent;
}

.app-sidebar::-webkit-scrollbar {
    width: 6px;
}

.app-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.app-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.25);
    border-radius: 10px;
}

.app-sidebar .brand {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 8px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 18px;
}
.app-sidebar .brand .icon {
    width: 40px; height: 40px; border-radius: 11px;
    background: rgba(201,162,39,0.18);
    color: var(--emas-terang);
    display:flex; align-items:center; justify-content:center;
    font-size: 20px;
}
.app-sidebar .brand .icon-logo {
    width: 42px; height: 42px; border-radius: 11px;
    background: #ffffff;
    display:flex; align-items:center; justify-content:center;
    padding: 5px;
    flex-shrink: 0;
}
.app-sidebar .brand .icon-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.app-sidebar .brand div b { font-size: .95rem; display:block; }
.app-sidebar .brand div span { font-size: .68rem; color: rgba(255,255,255,0.55); }

.app-sidebar .nav-section {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: rgba(255,255,255,0.4);
    margin: 18px 10px 8px;
}

.app-sidebar a.nav-link {
    color: rgba(255,255,255,0.82);
    padding: 10px 14px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .89rem;
    margin-bottom: 3px;
    transition: all .15s ease;
}
.app-sidebar a.nav-link i { width: 18px; text-align: center; color: rgba(255,255,255,0.55); }
.app-sidebar a.nav-link:hover { background: rgba(255,255,255,0.07); color: #fff; }
.app-sidebar a.nav-link.active {
    background: linear-gradient(135deg, rgba(201,162,39,0.9), rgba(201,162,39,0.6));
    color: #1b3324;
    font-weight: 600;
}
.app-sidebar a.nav-link.active i { color: #1b3324; }

.app-main { margin-left: 250px; padding: 16px 30px 40px; min-height: 100vh; min-height: 100dvh; }
.app-content { min-width: 0; }

.sidebar-overlay {
    position: fixed; inset: 0; background: rgba(8, 43, 27, .55); z-index: 190;
    opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease;
}
.sidebar-overlay.show { opacity: 1; visibility: visible; }
body.sidebar-terbuka { overflow: hidden; }
.app-sidebar a.nav-link .nav-badge {
    margin-left: auto; background: var(--emas); color: #1b3324; font-size: .68rem; font-weight: 700;
    min-width: 20px; height: 20px; padding: 0 6px; border-radius: 20px; display: inline-flex; align-items: center; justify-content: center;
}
.app-sidebar a.nav-link.active .nav-badge { background: #1b3324; color: #fff; }

/* Tablet & HP: sidebar jadi menu geser, tombol burger muncul */
@media (max-width: 992px) {
    .app-sidebar { transform: translateX(-100%); width: min(290px, 84vw); box-shadow: none; }
    .app-sidebar.open { transform: translateX(0); box-shadow: 10px 0 40px rgba(0,0,0,.25); }
    .app-main { margin-left: 0; padding: 12px 18px 32px; }
    .btn-burger { display: inline-flex; }
}
@media (max-width: 576px) {
    .app-main { padding: 10px 12px 28px; }
    .app-topbar { padding: 8px 10px; top: 6px; margin-bottom: 16px; border-radius: 14px; }
    .topbar-tanggal { font-size: .78rem; white-space: normal; line-height: 1.25; }
    .page-header { margin-bottom: 16px; }
    .page-header > .btn, .page-header > a.btn { width: 100%; text-align: center; }
}



.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 12px;
}
.page-header h2 { font-weight: 700; color: var(--hijau-tua); margin: 0; font-size: 1.5rem; }
.page-header p { color: var(--abu); margin: 2px 0 0; font-size: .88rem; }

.card-soft {
    background: var(--putih);
    border-radius: var(--radius);
    border: 1px solid #f0eee5;
    box-shadow: var(--shadow-soft);
    transition: box-shadow .2s ease, transform .2s ease;
}
.card-soft:hover { box-shadow: var(--shadow-hover); }

.stat-card {
    border-radius: var(--radius);
    padding: 22px;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}
.stat-card .icon-circle {
    width: 46px; height: 46px;
    border-radius: 13px;
    background: rgba(255,255,255,0.18);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    margin-bottom: 14px;
}
.stat-card h3 { font-size: 1.6rem; font-weight: 700; margin: 0; }
.stat-card span.label { font-size: .8rem; opacity: .9; }
.stat-card.c1 { background: linear-gradient(135deg, #2d6a4f, #0f3d2e); }
.stat-card.c2 { background: linear-gradient(135deg, #c9a227, #a5811b); }
.stat-card.c3 { background: linear-gradient(135deg, #40916c, #1b4332); }
.stat-card.c4 { background: linear-gradient(135deg, #52796f, #2f3e46); }

.table-soft { border-collapse: separate; border-spacing: 0; width: 100%; }
.table-soft thead th {
    background: #f7f5ef;
    color: var(--hijau-tua);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .4px;
    padding: 13px 16px;
    border-bottom: 1px solid #eee;
}
.table-soft tbody td { padding: 13px 16px; border-bottom: 1px solid #f2f1eb; font-size: .89rem; vertical-align: middle; }
.table-soft tbody tr:hover { background: #fbfaf5; }

.badge-role { padding: 5px 12px; border-radius: 20px; font-size: .72rem; font-weight: 600; }
.badge-admin { background: #e6f2ec; color: #1b4332; }
.badge-bendahara { background: #fbf1d6; color: #a5811b; }
.badge-jamaah { background: #e8eef7; color: #2b4a7d; }

.badge-masuk { background: #e6f6ee; color: #1e7e46; padding: 5px 12px; border-radius: 20px; font-size: .76rem; font-weight: 600; }
.badge-keluar { background: #fdecec; color: #b3261e; padding: 5px 12px; border-radius: 20px; font-size: .76rem; font-weight: 600; }

.btn-hijau { background: var(--hijau-muda); border: none; color: #fff; }
.btn-hijau:hover { background: var(--hijau-tua); color: #fff; }
.btn-emas { background: var(--emas); border: none; color: #fff; }
.btn-emas:hover { background: #a5811b; color: #fff; }

.avatar-circle {
    width: 42px; height: 42px; border-radius: 50%;
    background: linear-gradient(135deg, var(--hijau-soft), var(--hijau-tua));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .95rem;
}

.public-hero {
    background: linear-gradient(135deg, var(--hijau-tua), var(--hijau-muda));
    border-radius: var(--radius);
    color: #fff;
    padding: 34px;
    margin-bottom: 26px;
}

.kegiatan-card, .info-card {
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid #f0eee5;
    padding: 20px;
    height: 100%;
    box-shadow: var(--shadow-soft);
    transition: transform .2s ease, box-shadow .2s ease;
}
.kegiatan-card:hover, .info-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.kegiatan-date-badge {
    display: inline-flex; flex-direction: column; align-items: center;
    background: var(--cream); border-radius: 10px; padding: 8px 14px; margin-bottom: 12px;
}
.kegiatan-date-badge b { color: var(--hijau-tua); font-size: 1.2rem; line-height: 1; }
.kegiatan-date-badge span { font-size: .7rem; color: var(--abu); text-transform: uppercase; }

.filter-pill {
    border-radius: 30px;
    padding: 8px 18px;
    border: 1.5px solid #e9e6dc;
    background: #fff;
    font-size: .85rem;
    color: #555;
    font-weight: 500;
    transition: all .15s ease;
}
.filter-pill.active, .filter-pill:hover { background: var(--hijau-tua); border-color: var(--hijau-tua); color: #fff; }

.saldo-banner {
    background: linear-gradient(135deg, var(--hijau-tua), var(--hijau-muda));
    border-radius: var(--radius);
    color: #fff;
    padding: 26px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
}
.saldo-banner .amount { font-size: 2rem; font-weight: 700; color: var(--emas-terang); }

footer.app-footer {
    text-align: center;
    color: var(--abu);
    font-size: .82rem;
    padding: 24px 10px 6px;
}

@media print {
    .app-sidebar, .app-topbar, .no-print { display: none !important; }
    .app-main { margin-left: 0 !important; }
}


/* =========================================================
   Tabel -> kartu di HP (tambahkan class "tabel-kartu" pada <table>
   dan atribut data-label pada setiap <td>)
   ========================================================= */
@media (max-width: 640px) {
    .table-soft.tabel-kartu { min-width: 0; }
    .table-soft.tabel-kartu thead { display: none; }
    .table-soft.tabel-kartu,
    .table-soft.tabel-kartu tbody,
    .table-soft.tabel-kartu tr,
    .table-soft.tabel-kartu td { display: block; width: 100%; }
    .table-soft.tabel-kartu tr {
        border: 1px solid #efece3; border-radius: 14px; padding: 8px 14px; margin-bottom: 12px; background: #fff;
    }
    .table-soft.tabel-kartu tbody tr:hover { background: #fff; }
    .table-soft.tabel-kartu td {
        display: flex; justify-content: space-between; align-items: flex-start; gap: 14px;
        padding: 8px 0; border-bottom: 1px dashed #efece3; text-align: right !important;
    }
    .table-soft.tabel-kartu td:last-child { border-bottom: 0; }
    .table-soft.tabel-kartu td::before {
        content: attr(data-label); font-size: .72rem; font-weight: 600; text-transform: uppercase;
        letter-spacing: .4px; color: var(--abu); text-align: left; flex-shrink: 0; padding-top: 2px;
    }
    .table-soft.tabel-kartu td[data-label=""]::before,
    .table-soft.tabel-kartu td:not([data-label])::before { content: none; }
    .table-soft.tabel-kartu td.sel-aksi { justify-content: flex-end; gap: 8px; }
    .table-soft.tabel-kartu td[colspan] { display: block; text-align: center !important; }
    .table-soft.tabel-kartu td[colspan]::before { content: none; }
}

/* Form: tombol penuh di HP, area sentuh nyaman */
@media (max-width: 576px) {
    .form-aksi { flex-direction: column; }
    .form-aksi .btn { width: 100%; }
    .btn, .form-control, .form-select { min-height: 44px; }
    .btn-sm { min-height: 36px; }
    .saldo-banner { padding: 20px; }
    .saldo-banner .amount { font-size: 1.6rem; }
    .stat-card h3 { font-size: 1.3rem; }
}
.btn-aksi-ikon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; }
.kotak-bukti { border: 1px solid #efece3; border-radius: 14px; background: #fbfaf6; padding: 10px; text-align: center; }
.kotak-bukti img { max-width: 100%; max-height: 70vh; border-radius: 10px; object-fit: contain; }
.thumb-bukti { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; border: 1px solid #efece3; background: #fbfaf6; }
.badge-status { padding: 5px 12px; border-radius: 20px; font-size: .74rem; font-weight: 600; display: inline-block; white-space: nowrap; }
.badge-status.menunggu { background: #fbf1d6; color: #8a6a12; }
.badge-status.dikonfirmasi { background: #e6f6ee; color: #1e7e46; }
.badge-status.ditolak { background: #fdecec; color: #b3261e; }

/* Dashboard */
.stat-uang { font-size: 1.25rem !important; word-break: break-word; }
.chart-wrap { position: relative; height: 280px; }
.min-w-0 { min-width: 0; }
@media (max-width: 576px) { .chart-wrap { height: 230px; } .stat-uang { font-size: 1.05rem !important; } }

/* Baris total pada tabel */
.table-soft tfoot .baris-total td { background: #f7f5ef; font-weight: 700; padding: 13px 16px; color: var(--hijau-tua); border-top: 1px solid #eee; }
@media (max-width: 640px) {
    .table-soft.tabel-kartu tfoot, .table-soft.tabel-kartu tfoot tr { display: block; }
    .table-soft.tabel-kartu tfoot .baris-total { background: #f7f5ef; border-color: #efece3; }
    .table-soft.tabel-kartu tfoot .baris-total td { display: block; background: transparent; padding: 4px 0; text-align: right !important; border: 0; }
    .table-soft.tabel-kartu tfoot .baris-total td:empty { display: none; }
}

/* Laporan kas */
.filter-tanggal { max-width: 190px; }
@media (max-width: 767px) { .filter-tanggal { max-width: 100%; width: 100%; } .aksi-laporan { width: 100%; } .aksi-laporan .btn { flex: 1 1 100%; } }


/* Dashboard: daftar yang bisa digulir ke bawah (Kegiatan Mendatang & Pengumuman Terbaru) */
.daftar-gulir {
    max-height: 330px; overflow-y: auto; overflow-x: hidden; padding-right: 8px;
    overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #c9bf9a #f4f1e8;
}
.daftar-gulir-lebar { max-height: 360px; }
.daftar-gulir::-webkit-scrollbar { width: 8px; }
.daftar-gulir::-webkit-scrollbar-track { background: #f4f1e8; border-radius: 8px; }
.daftar-gulir::-webkit-scrollbar-thumb { background: #c9bf9a; border-radius: 8px; }
.daftar-gulir::-webkit-scrollbar-thumb:hover { background: #b3a672; }
.daftar-gulir:focus-visible { outline: 2px solid #c9a227; outline-offset: 3px; border-radius: 8px; }
.daftar-gulir > div:last-child { margin-bottom: 0 !important; }
.badge-hitung {
    display: inline-block; margin-left: 6px; min-width: 22px; padding: 1px 8px; border-radius: 20px;
    background: #e3efe7; color: #0f5132; font-size: .72rem; font-weight: 700; text-align: center; vertical-align: middle;
}
@media (max-width: 576px) { .daftar-gulir { max-height: 300px; } .daftar-gulir-lebar { max-height: 340px; } }

/* Revisi dashboard: area kegiatan/bukti dibatasi dan dapat digulir */
.dashboard-scroll { max-height: 310px; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
.pengumuman-scroll { overflow-x: auto; overflow-y: hidden; max-width: 100%; padding: 2px 2px 12px; scroll-snap-type: x mandatory; }
.pengumuman-track { display: flex; gap: 14px; width: max-content; min-width: 100%; }
.pengumuman-item { flex: 0 0 min(320px, 82vw); scroll-snap-align: start; }

/* Dashboard admin: fixed-height scroll regions and horizontal announcement rail */
.card-soft .dashboard-scroll {
  height: 280px !important;
  max-height: 280px !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}
.card-soft .pengumuman-scroll {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  white-space: normal !important;
}
.card-soft .pengumuman-track {
  display: flex !important;
  flex-flow: row nowrap !important;
  align-items: stretch !important;
  width: max-content !important;
  min-width: 100% !important;
  gap: 14px !important;
}
.card-soft .pengumuman-item {
  flex: 0 0 320px !important;
  width: 320px !important;
  max-width: 82vw !important;
  min-width: 0 !important;
}
