/* ============================================================
   SISTEM PENYALURAN QARDHUL HASAN & BEASISWA PENDIDIKAN
   assets/css/style.css - Tema hijau Wakaf Doa Bangsa
   ============================================================ */
:root {
    --pqh-primary: #0F5132;
    --pqh-accent: #198754;
    --pqh-bg: #F5F7F9;
    --pqh-border: rgba(15, 81, 50, 0.12);
    --pqh-glass: rgba(255, 255, 255, 0.85);
    --pqh-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    --radius-16: 16px;
}

[data-bs-theme="dark"] {
    --pqh-bg: #121212;
    --pqh-glass: rgba(33, 37, 41, 0.85);
    --pqh-border: rgba(255, 255, 255, 0.08);
    --pqh-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

* { font-family: 'Poppins', sans-serif; }
body.pqh-admin, body.pqh-publik { background-color: var(--pqh-bg); }

/* ---------- Komponen glass ---------- */
.card-glass {
    background: var(--pqh-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--pqh-border);
    border-radius: var(--radius-16);
    box-shadow: var(--pqh-shadow);
    transition: transform .3s, box-shadow .3s;
}
.card-glass:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,.08); }

.header-glass {
    background: var(--pqh-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--pqh-border);
    box-shadow: var(--pqh-shadow);
}

.summary-card { position: relative; padding: 20px; overflow: hidden; }
.summary-card .icon-box { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }

.group-label-card { border-radius: var(--radius-16); padding: 26px 20px; text-align: center; transition: .3s; }
.group-label-card i { font-size: 2.6rem; margin-bottom: 8px; }

/* ---------- Sidebar admin ---------- */
.sidebar {
    width: 260px; height: 100vh; position: fixed; top: 0; left: 0;
    background: linear-gradient(180deg, #0F5132, #0a3d26); color: #fff;
    transition: all .3s; z-index: 1040; overflow-y: auto;
    display: flex; flex-direction: column;
}
.sidebar.collapsed { width: 80px; }
.sidebar.collapsed .sidebar-text, .sidebar.collapsed .sidebar-header-text { display: none; }
.sidebar-nav .nav-link { color: rgba(255,255,255,.8); padding: 13px 20px; border-radius: 10px; margin: 4px 10px; transition: .3s; display: flex; align-items: center; }
.sidebar-nav .nav-link:hover, .sidebar-nav .nav-link.active { background: rgba(255,255,255,.18); color: #fff; }
.sidebar-nav .nav-link i { font-size: 1.15rem; min-width: 28px; text-align: center; }

.main-content { margin-left: 260px; transition: all .3s; min-height: 100vh; display: flex; flex-direction: column; }
.sidebar.collapsed ~ .main-content { margin-left: 80px; }

.avatar-circle {
    width: 32px; height: 32px; border-radius: 50%; background: #198754; color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: .85rem;
}

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; background: linear-gradient(135deg, #0F5132 0%, #198754 60%, #66bb6a 100%); }
.login-card { max-width: 420px; width: 92%; border-radius: 20px !important; }
.login-icon {
    width: 64px; height: 64px; border-radius: 18px; background: rgba(25, 135, 84, .12); color: #198754;
    display: flex; align-items: center; justify-content: center; font-size: 2rem;
}

.brand-icon {
    width: 40px; height: 40px; border-radius: 12px; background: #198754; color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0;
}

/* ---------- Hero publik ---------- */
.publik-hero {
    background: linear-gradient(135deg, #0F5132 0%, #198754 70%, #2ea367 100%);
    position: relative; overflow: hidden;
}
.publik-hero::after {
    content: ''; position: absolute; right: -120px; top: -120px; width: 380px; height: 380px;
    border-radius: 50%; background: rgba(255,255,255,.06);
}
.publik-hero::before {
    content: ''; position: absolute; left: -80px; bottom: -160px; width: 300px; height: 300px;
    border-radius: 50%; background: rgba(255,255,255,.05);
}
.publik-hero-sm { background: linear-gradient(135deg, #0F5132 0%, #198754 100%); }

.publik-footer { border-top: 1px solid var(--pqh-border); background: var(--pqh-glass); }

/* ---------- Tabel & form ---------- */
.form-control, .form-select { border-radius: 10px; }
.page-item .page-link { border-radius: 8px; margin: 0 3px; color: var(--pqh-primary); }
.page-item.active .page-link { background-color: var(--pqh-primary); border-color: var(--pqh-primary); color: #fff; }

.mapping-table td { vertical-align: middle; }
.mapping-table .form-control { font-size: .8rem; }

/* ---------- Responsif ---------- */
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-left: 0 !important; }
    .publik-hero::after, .publik-hero::before { display: none; }
}

/* ---------- Print ---------- */
@media print {
    .no-print, .sidebar, header, footer { display: none !important; }
    .main-content { margin-left: 0 !important; }
    body { background: #fff !important; }
    .card-glass { border: 1px solid #ddd !important; box-shadow: none !important; backdrop-filter: none !important; }
}

/* Scrollbar tipis untuk sidebar */
.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 3px; }
