/* ============================================================
   UI DESIGN MASTERPLAN — Sistem Informasi Donasi Masjid Baburrahim
   Tema: Emerald Islamic | Modern SaaS 2026 | Trust First
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
    /* Emerald Islamic Palette */
    --primary:     #0F766E;
    --primary-2:   #14B8A6;
    --primary-dark:#0B5A54;
    --accent:      #F59E0B;
    --accent-dark: #d4860a;
    --success:     #10B981;
    --danger:      #EF4444;
    --bg:          #F8FAFC;
    --surface:     #FFFFFF;
    --text:        #1E293B;
    --muted:       #64748B;
    --border:      #E2E8F0;
    --sidebar-dark:#0F172A;
    --sidebar-dark2:#1E293B;

    /* Spacing scale */
    --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px;

    --radius:    12px;
    --radius-lg: 20px;
    --shadow-sm: 0 2px 8px rgba(15,23,42,0.05);
    --shadow:    0 8px 24px rgba(15,23,42,0.08);
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.08);
    --sidebar-w: 280px;
    --navbar-h:  70px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

h1,h2,h3,h4,h5,h6 { font-family: 'Poppins', sans-serif; font-weight: 600; }
a { color: var(--primary); text-decoration: none; transition: .25s; }
a:hover { color: var(--primary-dark); }

/* Smooth transitions global */
.btn, .card, .nav-link, .stat-card { transition: .3s ease; }

/* ------------------------------------------------------------
   BUTTONS
   ------------------------------------------------------------ */
.btn { font-family: 'Poppins', sans-serif; font-weight: 600; border-radius: var(--radius); }
.btn:hover { transform: scale(1.03); }

.btn-emerald {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    border: none; color: #fff;
    box-shadow: 0 6px 16px rgba(15,118,110,0.3);
    padding: 11px 26px;
}
.btn-emerald:hover { color: #fff; box-shadow: 0 8px 22px rgba(15,118,110,0.4); }

.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border: none; color: #fff;
    box-shadow: 0 6px 16px rgba(245,158,11,0.3);
    padding: 11px 26px;
}
.btn-accent:hover { color: #fff; }

.btn-ghost {
    background: transparent; border: 2px solid rgba(255,255,255,0.8); color: #fff;
    padding: 9px 24px;
}
.btn-ghost:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* ------------------------------------------------------------
   ISLAMIC PATTERN (subtle overlay)
   ------------------------------------------------------------ */
.pattern-islamic {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cpath d='M40 0 L80 40 L40 80 L0 40Z' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='1'/%3E%3Ccircle cx='40' cy='40' r='18' fill='none' stroke='rgba(245,158,11,0.08)' stroke-width='1'/%3E%3C/svg%3E");
}

/* ------------------------------------------------------------
   CARD base
   ------------------------------------------------------------ */
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

/* Hover lift utility */
.hover-lift { transition: .3s ease; }
.hover-lift:hover { transform: translateY(-5px); box-shadow: var(--shadow); }

/* ------------------------------------------------------------
   STATUS BADGES (per masterplan)
   ------------------------------------------------------------ */
.badge-pending      { background:#FEF3C7; color:#B45309; }
.badge-dikonfirmasi { background:#DCFCE7; color:#166534; }
.badge-ditolak      { background:#FEE2E2; color:#991B1B; }
.badge-pending,.badge-dikonfirmasi,.badge-ditolak {
    padding: 5px 12px; border-radius: 20px; font-size: .75rem; font-weight: 600;
}

/* ------------------------------------------------------------
   FORM INPUTS (masterplan: h52 r12 focus #14B8A6)
   ------------------------------------------------------------ */
.form-control, .form-select {
    border-radius: var(--radius);
    border: 2px solid var(--border);
    padding: 12px 14px;
    font-size: .95rem;
    background: var(--surface);
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary-2);
    box-shadow: 0 0 0 .2rem rgba(20,184,166,0.15);
}
.input-group-text {
    background: #f1f5f9; border: 2px solid var(--border); border-right: none; color: var(--primary);
    border-radius: var(--radius) 0 0 var(--radius);
}

/* ============================================================
   LANDING PAGE
   ============================================================ */
.navbar-landing {
    height: var(--navbar-h);
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: .3s;
}
.navbar-landing .navbar-brand {
    font-family: 'Poppins', sans-serif; font-weight: 700;
    color: var(--primary); display: flex; align-items: center; gap: 8px;
}
.navbar-landing .nav-link { color: var(--text); font-weight: 500; }
.navbar-landing .nav-link:hover { color: var(--primary); }

/* HERO */
.hero {
    min-height: 100vh;
    display: flex; align-items: center;
    position: relative; overflow: hidden;
    /* Foto masjid sebagai background (taruh file di assets/img/masjid.jpg).
       Jika file belum ada, gradient hijau di bawahnya tetap tampil sebagai fallback. */
    background: linear-gradient(rgba(11,90,84,.88), rgba(15,23,42,.92)),
                url('../img/masjid.jpeg') center/cover no-repeat,
                linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; text-align: center;
    padding: 100px 0 160px;
}
.hero::before {
    content:''; position:absolute; inset:0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cpath d='M40 0 L80 40 L40 80 L0 40Z' fill='none' stroke='rgba(255,255,255,0.04)' stroke-width='1'/%3E%3Ccircle cx='40' cy='40' r='18' fill='none' stroke='rgba(245,158,11,0.08)' stroke-width='1'/%3E%3C/svg%3E");
    pointer-events:none;
}
.hero .container { position: relative; z-index: 2; }
.hero-bismillah {
    font-family:'Poppins',serif; color: var(--accent);
    font-size: 1.1rem; margin-bottom: 14px; letter-spacing: 1px;
}
.hero h1 {
    font-size: 64px; font-weight: 700; line-height: 1.1; margin-bottom: 18px;
    text-shadow: 0 4px 20px rgba(0,0,0,.3);
}
.hero p.sub { font-size: 1.15rem; opacity: .9; max-width: 600px; margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 992px){ .hero h1 { font-size: 42px; } }
@media (max-width: 576px){ .hero h1 { font-size: 32px; } .hero { padding: 90px 0 140px; } }

/* TRANSPARENCY CARD (glassmorphism, overlap hero) */
.transparency-section { margin-top: -100px; position: relative; z-index: 5; }
.glass-card {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0,0,0,.08);
    padding: 36px;
}
.glass-stat { text-align: center; padding: 16px; }
.glass-stat .gs-icon {
    width: 56px; height: 56px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 12px; font-size: 1.4rem; color: #fff;
}
.glass-stat .gs-value { font-family:'Poppins'; font-size: 1.9rem; font-weight: 700; color: var(--text); line-height: 1.1; }
.glass-stat .gs-label { color: var(--muted); font-size: .85rem; font-weight: 500; }
.glass-divider { width: 1px; background: var(--border); }

@media (max-width: 768px){
    .transparency-section { margin-top: -80px; }
    .glass-card { padding: 24px; }
    .glass-divider { display: none; }
}

/* SECTION heading */
.section-pad { padding: 80px 0; }
.section-title {
    font-size: 2rem; font-weight: 700; color: var(--text); text-align: center; margin-bottom: 8px;
}
.section-sub { text-align: center; color: var(--muted); margin-bottom: 48px; }
.section-title .arabic-accent { color: var(--accent); }

/* REKENING card */
.rek-card {
    background: var(--surface);
    border-left: 5px solid var(--primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 24px 28px;
    display: flex; align-items: center; gap: 20px;
}
.rek-card .rek-bank-logo {
    width: 60px; height: 60px; border-radius: 14px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.rek-card .rek-label { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.rek-card .rek-number { font-family:'Poppins'; font-size: 1.5rem; font-weight: 700; color: var(--primary); letter-spacing: 1px; }
.rek-card .rek-owner { font-size: .9rem; color: var(--text); }
.btn-copy {
    background: #f1f5f9; border: 1px solid var(--border); color: var(--primary);
    border-radius: 10px; padding: 8px 14px; font-size: .85rem; font-weight: 600;
}
.btn-copy:hover { background: var(--primary); color: #fff; }

/* TIMELINE langkah donasi */
.timeline-steps { display: flex; justify-content: center; gap: 0; flex-wrap: wrap; }
.tl-step { text-align: center; flex: 1; min-width: 160px; max-width: 240px; position: relative; }
.tl-step .tl-circle {
    width: 80px; height: 80px; border-radius: 50%; background: var(--surface);
    box-shadow: var(--shadow); border: 3px solid var(--primary-2);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px; font-size: 1.8rem; color: var(--primary); position: relative; z-index: 2;
}
.tl-step .tl-num {
    position: absolute; top: 0; right: 50%; transform: translateX(48px);
    width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff;
    font-size: .8rem; font-weight: 700; display: flex; align-items: center; justify-content: center; z-index: 3;
}
.tl-step h5 { font-size: 1.05rem; margin-bottom: 6px; }
.tl-step p { color: var(--muted); font-size: .88rem; }
/* connector line */
.tl-step:not(:last-child)::after {
    content:''; position: absolute; top: 40px; left: 50%; width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--primary-2), var(--border)); z-index: 1;
}
@media (max-width: 768px){ .tl-step:not(:last-child)::after { display: none; } .tl-step { margin-bottom: 24px; } }

/* FOOTER */
.footer-dark {
    background: var(--sidebar-dark); color: rgba(255,255,255,.7);
    padding: 48px 0 24px; position: relative; overflow: hidden;
    border-top: 3px solid var(--accent);
}
.footer-dark .foot-name { font-family:'Poppins'; font-size: 1.3rem; color: #fff; margin-bottom: 8px; }

/* ============================================================
   AUTH — SPLIT SCREEN PREMIUM
   ============================================================ */
.auth-split { display: flex; min-height: 100vh; }
.auth-left {
    flex: 0 0 40%; position: relative; overflow: hidden;
    /* Foto masjid (assets/img/masjid.jpg) dengan overlay hijau. Fallback gradient jika belum ada. */
    background: linear-gradient(rgba(11,90,84,.82), rgba(15,23,42,.9)),
                url('../img/masjid.jpeg') center/cover no-repeat,
                linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; display: flex; flex-direction: column; justify-content: center;
    padding: 60px 48px;
}
.auth-left::before {
    content:''; position:absolute; inset:0; opacity:.5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cpath d='M40 0 L80 40 L40 80 L0 40Z' fill='none' stroke='rgba(255,255,255,0.06)' stroke-width='1'/%3E%3C/svg%3E");
}
.auth-left .al-content { position: relative; z-index: 2; }
.auth-left .al-logo { font-size: 3rem; margin-bottom: 20px; }
.auth-left .al-title { font-size: 2rem; font-weight: 700; margin-bottom: 12px; }
.auth-left .al-quote {
    font-size: 1.15rem; font-style: italic; opacity: .92;
    border-left: 3px solid var(--accent); padding-left: 16px; margin-top: 24px;
}
.auth-left .al-quote small { display: block; font-style: normal; opacity: .7; margin-top: 8px; font-size: .8rem; }

.auth-right {
    flex: 1; display: flex; align-items: center; justify-content: center;
    padding: 40px 24px; background: var(--bg);
}
.auth-form-card {
    width: 100%; max-width: 420px;
    background: var(--surface); border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0,0,0,.06); padding: 40px 36px;
}
.auth-form-card .afc-icon {
    width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.6rem;
}
.auth-form-card h4 { text-align: center; font-size: 1.4rem; margin-bottom: 4px; }
.auth-form-card .afc-sub { text-align: center; color: var(--muted); font-size: .88rem; margin-bottom: 24px; }

@media (max-width: 992px){ .auth-left { display: none; } }

/* ============================================================
   DASHBOARD JAMAAH — TOP NAVBAR LAYOUT
   ============================================================ */
.app-navbar {
    height: var(--navbar-h); background: var(--surface);
    box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 1000;
    display: flex; align-items: center; padding: 0 24px;
}
.app-navbar .an-brand { font-family:'Poppins'; font-weight: 700; color: var(--primary); display:flex; align-items:center; gap:8px; }
.app-navbar .an-menu { display: flex; gap: 4px; margin-left: 40px; }
.app-navbar .an-menu a {
    padding: 8px 16px; border-radius: 10px; color: var(--muted); font-weight: 500; font-size: .92rem;
}
.app-navbar .an-menu a:hover { background: #f1f5f9; color: var(--primary); }
.app-navbar .an-menu a.active { background: var(--primary); color: #fff; }
.app-navbar .an-user { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.app-navbar .an-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.app-content { padding: 32px; max-width: 1200px; margin: 0 auto; }

/* Welcome gradient card */
.welcome-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff; border-radius: var(--radius-lg); padding: 32px;
    position: relative; overflow: hidden; border: none;
}
.welcome-card::after {
    content:''; position:absolute; right:-40px; top:-40px; width:180px; height:180px;
    background: rgba(255,255,255,.08); border-radius: 50%;
}
.welcome-card .wc-arabic { font-family:'Poppins'; color: var(--accent); font-size: 1rem; }
.welcome-card h3 { font-size: 1.6rem; position: relative; z-index: 2; }

/* mobile navbar */
.an-toggle { display: none; background: none; border: none; font-size: 1.3rem; color: var(--primary); }
@media (max-width: 768px){
    .app-navbar .an-menu {
        position: absolute; top: var(--navbar-h); left: 0; right: 0; flex-direction: column;
        background: var(--surface); box-shadow: var(--shadow); padding: 12px; margin: 0; display: none;
    }
    .app-navbar .an-menu.open { display: flex; }
    .an-toggle { display: block; margin-left: auto; }
    .app-navbar .an-user { margin-left: 16px; }
    .app-content { padding: 16px; }
}

/* ============================================================
   STAT CARDS (dashboard)
   ============================================================ */
.stat-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 24px; position: relative; overflow: hidden;
}
.stat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.stat-card .sc-icon {
    width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center;
    justify-content: center; font-size: 1.3rem; color: #fff; margin-bottom: 14px;
}
.stat-card .sc-value { font-family:'Poppins'; font-size: 1.7rem; font-weight: 700; color: var(--text); line-height: 1.1; }
.stat-card .sc-label { color: var(--muted); font-size: .82rem; font-weight: 500; margin-top: 4px; }
.ic-emerald { background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.ic-accent  { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); }
.ic-danger  { background: linear-gradient(135deg, #f87171, var(--danger)); }
.ic-success { background: linear-gradient(135deg, #34d399, var(--success)); }

/* ============================================================
   ADMIN / PENGURUS — DARK SIDEBAR LAYOUT
   ============================================================ */
#wrapper { display: flex; min-height: 100vh; }
#sidebar-wrapper {
    width: var(--sidebar-w); min-width: var(--sidebar-w);
    background: var(--sidebar-dark); min-height: 100vh;
    position: fixed; top: 0; left: 0; z-index: 1000; overflow-y: auto;
    display: flex; flex-direction: column;
}
.sidebar-brand {
    padding: 24px 22px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08);
    display: flex; align-items: center; gap: 12px;
}
.sidebar-brand .sb-logo {
    width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
}
.sidebar-brand .sb-title { font-family:'Poppins'; font-weight: 600; font-size: .98rem; line-height: 1.2; }
.sidebar-brand .sb-sub { font-size: .7rem; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; }

.sidebar-menu { list-style: none; padding: 16px 14px; margin: 0; flex: 1; }
.sidebar-menu .menu-label { color: #64748b; font-size: .7rem; text-transform: uppercase; letter-spacing: 1px; padding: 12px 12px 6px; }
.sidebar-menu a {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 4px;
    color: rgba(255,255,255,.7); border-radius: var(--radius); font-size: .92rem; font-weight: 500;
}
.sidebar-menu a i { width: 20px; text-align: center; }
.sidebar-menu a:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar-menu a.active { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; box-shadow: 0 4px 12px rgba(15,118,110,.4); }
.sidebar-menu a.logout { color: #fca5a5; }
.sidebar-menu a.logout:hover { background: rgba(239,68,68,.15); color: #fecaca; }

#page-content-wrapper {
    margin-left: var(--sidebar-w); flex: 1; min-height: 100vh;
    display: flex; flex-direction: column; background: var(--bg);
}
.content-topbar {
    height: var(--navbar-h); background: var(--surface); box-shadow: var(--shadow-sm);
    display: flex; align-items: center; padding: 0 28px; position: sticky; top: 0; z-index: 999;
}
.content-topbar .ct-title { font-family:'Poppins'; font-weight: 600; color: var(--text); }
.content-topbar .ct-user { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: .9rem; }
.content-topbar .ct-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.page-body { padding: 32px; flex: 1; }
.page-heading { font-size: 1.5rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.page-desc { color: var(--muted); font-size: .9rem; margin-bottom: 28px; }

.sb-toggle { display: none; background: none; border: none; font-size: 1.3rem; color: var(--primary); margin-right: 16px; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 999; }
.sidebar-overlay.active { display: block; }
@media (max-width: 992px){
    #sidebar-wrapper { width: 0; min-width: 0; overflow: hidden; transition: width .3s; }
    #sidebar-wrapper.open { width: var(--sidebar-w); min-width: var(--sidebar-w); }
    #page-content-wrapper { margin-left: 0; }
    .sb-toggle { display: block; }
    .page-body { padding: 18px; }
}

/* ============================================================
   TABLES (modern, zebra, hover)
   ============================================================ */
.table-modern { width: 100%; border-collapse: separate; border-spacing: 0; }
.table-modern thead th {
    background: #f1f5f9; color: var(--muted); font-size: .78rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .5px; padding: 14px 16px; border: none; text-align: left;
}
.table-modern tbody td { padding: 13px 16px; font-size: .9rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table-modern tbody tr:nth-child(even) { background: #fafbfc; }
.table-modern tbody tr:hover { background: #f0fdfa; }

/* thumbnail bukti 60x60 */
.bukti-thumb {
    width: 60px; height: 60px; object-fit: cover; border-radius: 10px;
    border: 2px solid var(--border); cursor: pointer;
}
.bukti-thumb:hover { border-color: var(--primary-2); transform: scale(1.05); }

/* ============================================================
   DRAG & DROP UPLOAD ZONE
   ============================================================ */
.upload-zone {
    border: 2px dashed var(--primary-2); border-radius: var(--radius);
    min-height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 24px; cursor: pointer; transition: .3s; background: #f0fdfa;
}
.upload-zone:hover, .upload-zone.dragover { background: #ccfbf1; border-color: var(--primary); }
.upload-zone .uz-icon { font-size: 2.5rem; color: var(--primary-2); margin-bottom: 12px; }
.upload-zone .uz-text { color: var(--muted); font-size: .9rem; }
.upload-zone img.uz-preview { max-width: 100%; max-height: 220px; border-radius: var(--radius); margin-top: 8px; }

/* ============================================================
   PRINT
   ============================================================ */
@media print {
    #sidebar-wrapper, .content-topbar, .app-navbar, .no-print, .btn, .filter-form, .sidebar-overlay { display: none !important; }
    #page-content-wrapper { margin-left: 0 !important; }
    .page-body, .app-content { padding: 0 !important; }
    body { background: #fff !important; }
    .print-only { display: block !important; }
    .table-modern thead th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.print-only { display: none; }

/* scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary-2); border-radius: 3px; }

/* ============================================================
   LOGO IMAGE (assets/img/logo.png) — fallback ke emoji jika gagal
   ============================================================ */
.brand-logo { height: 32px; width: auto; object-fit: contain; vertical-align: middle; }
.brand-logo-lg { height: 56px; width: auto; object-fit: contain; }
.sb-logo .brand-logo { height: 28px; }

/* ============================================================
   ✨ ENHANCEMENTS — Animasi, 3D ringan, background bermotif
   ============================================================ */

/* --- Keyframes --- */
@keyframes fadeUp { from { opacity:0; transform: translateY(24px); } to { opacity:1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes pulseGlow { 0%,100% { box-shadow: 0 0 0 0 rgba(20,184,166,.4); } 50% { box-shadow: 0 0 0 12px rgba(20,184,166,0); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes gradientShift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* --- Background bermotif untuk area polos (dashboard) --- */
body {
    background-color: var(--bg);
    background-image:
        radial-gradient(circle at 12% 18%, rgba(20,184,166,.06), transparent 30%),
        radial-gradient(circle at 88% 82%, rgba(245,158,11,.05), transparent 32%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M30 0 L60 30 L30 60 L0 30Z' fill='none' stroke='rgba(15,118,110,0.035)' stroke-width='1'/%3E%3C/svg%3E");
    background-attachment: fixed;
}

/* Section putih landing → beri motif tipis */
.section-pad[style*="#fff"], .section-pad {
    position: relative;
}

/* --- Entrance animation otomatis untuk kartu & stat (tanpa JS) --- */
.stat-card { animation: fadeUp .6s ease both; }
.stat-card:nth-child(1){ animation-delay:.05s; }
.row > div:nth-child(2) .stat-card { animation-delay:.15s; }
.row > div:nth-child(3) .stat-card { animation-delay:.25s; }
.row > div:nth-child(4) .stat-card { animation-delay:.35s; }
.welcome-card { animation: fadeUp .6s ease both; }
.page-heading { animation: fadeIn .7s ease both; }

/* --- 3D Hover ringan: perspective tilt + lift (GPU: transform saja) --- */
.stat-card, .card.hover-lift, .glass-stat, .rek-card, .step-card, .tl-step .tl-circle {
    transform-style: preserve-3d;
    will-change: transform;
}
.stat-card { transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s; }
.stat-card:hover {
    transform: translateY(-8px) perspective(700px) rotateX(4deg);
    box-shadow: 0 18px 36px rgba(15,23,42,.16);
}
.card.hover-lift:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 40px rgba(15,23,42,.14);
}

/* Icon di stat-card "mengambang" + glow saat hover card */
.stat-card .sc-icon { transition: transform .35s ease; }
.stat-card:hover .sc-icon { transform: translateY(-3px) scale(1.08) rotate(-4deg); }

/* --- Glass stat (landing) interaktif --- */
.glass-stat { transition: transform .35s ease; border-radius: var(--radius); }
.glass-stat:hover { transform: translateY(-6px); background: rgba(255,255,255,.5); }
.glass-stat .gs-icon { transition: transform .4s ease; }
.glass-stat:hover .gs-icon { transform: rotateY(180deg); }

/* --- Step cards (timeline) lift + circle float --- */
.tl-step:hover .tl-circle {
    transform: translateY(-6px) scale(1.06);
    box-shadow: 0 12px 28px rgba(15,118,110,.3);
    border-color: var(--accent);
}
.tl-step .tl-circle { transition: transform .35s ease, box-shadow .35s, border-color .35s; }

/* --- Rekening card hover --- */
.rek-card { transition: transform .35s ease, box-shadow .35s; }
.rek-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(15,118,110,.18); }
.rek-card .rek-bank-logo { transition: transform .4s ease; }
.rek-card:hover .rek-bank-logo { transform: rotate(-8deg) scale(1.05); animation: floatY 2.5s ease-in-out infinite; }

/* --- Buttons: shine sweep + glow --- */
.btn-emerald, .btn-accent {
    position: relative; overflow: hidden;
    background-size: 200% 200%;
    transition: transform .25s ease, box-shadow .3s ease, background-position .6s ease;
}
.btn-emerald:hover, .btn-accent:hover { background-position: 100% 50%; transform: translateY(-2px) scale(1.04); }
.btn-emerald::after, .btn-accent::after {
    content:''; position:absolute; top:0; left:-120%; width:60%; height:100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,.45), transparent);
    transform: skewX(-20deg); transition: left .6s ease;
}
.btn-emerald:hover::after, .btn-accent:hover::after { left: 130%; }

/* CTA hero pulse */
.hero-actions .btn-accent { animation: pulseGlow 2.6s ease-in-out infinite; }

/* --- Hero text entrance + floating decoration --- */
.hero-bismillah { animation: fadeIn 1s ease both; }
.hero h1 { animation: fadeUp .8s ease both .1s; }
.hero p.sub { animation: fadeUp .8s ease both .25s; }
.hero-actions { animation: fadeUp .8s ease both .4s; }
.donasi-counter-box { animation: fadeUp .9s ease both; transition: transform .4s ease; }
.donasi-counter-box:hover { transform: translateY(-5px) scale(1.02); }

/* Floating orbs di hero (dekoratif, ringan) */
.hero::after {
    content:''; position:absolute; right:-60px; top:-60px;
    width: 260px; height: 260px; border-radius:50%;
    background: radial-gradient(circle, rgba(245,158,11,.18), transparent 70%);
    animation: floatY 6s ease-in-out infinite; pointer-events:none;
}

/* --- Navbar brand & sidebar logo subtle --- */
.navbar-landing .navbar-brand:hover { transform: scale(1.03); }
.navbar-landing .navbar-brand { transition: transform .25s ease; }
.sidebar-menu a { transition: transform .2s ease, background .2s, color .2s; }
.sidebar-menu a:hover { transform: translateX(4px); }

/* --- Badge & avatar pulse ringan --- */
.ct-avatar, .an-avatar { transition: transform .3s ease; }
.ct-avatar:hover, .an-avatar:hover { transform: scale(1.1) rotate(5deg); }

/* --- Tabel baris animasi hover --- */
.table-modern tbody tr { transition: background .2s ease, transform .2s ease; }
.table-modern tbody tr:hover { transform: scale(1.005); }
.bukti-thumb { transition: transform .3s ease, border-color .3s; }
.bukti-thumb:hover { transform: scale(1.12) rotate(-2deg); }

/* --- Welcome card gradient bergerak halus --- */
.welcome-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-2), var(--primary-dark));
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite, fadeUp .6s ease both;
}

/* --- Section heading underline animasi --- */
.section-title .arabic-accent { position: relative; }

/* ============================================================
   📱 RESPONSIVE — Mobile First Improvements
   ============================================================ */
@media (max-width: 992px) {
    .hero h1 { font-size: 38px; }
    .glass-card { padding: 20px; }
    .glass-stat .gs-value { font-size: 1.5rem; }
}

@media (max-width: 768px) {
    .hero { padding: 80px 0 120px; min-height: auto; }
    .hero h1 { font-size: 30px; line-height: 1.25; }
    .hero p.sub { font-size: .95rem; }
    .hero-actions .btn { width: 100%; max-width: 280px; }
    .transparency-section { margin-top: -60px; }
    .glass-card { padding: 18px 14px; }
    .glass-stat { padding: 12px; }
    .glass-stat .gs-value { font-size: 1.35rem; }
    .section-pad { padding: 50px 0; }
    .section-title { font-size: 1.5rem; }
    .rek-card { flex-direction: column; text-align: center; gap: 14px; }
    .rek-card .rek-number { font-size: 1.3rem; }
    .btn-copy { width: 100%; }
    /* matikan tilt 3D di mobile biar nyaman disentuh */
    .stat-card:hover { transform: translateY(-4px); }
    .table-modern { font-size: .82rem; }
    .table-modern thead th, .table-modern tbody td { padding: 10px 10px; }
    .page-heading { font-size: 1.25rem; }
    .welcome-card { padding: 22px; }
    .welcome-card h3 { font-size: 1.3rem; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 25px; }
    .hero-bismillah { font-size: .95rem; }
    .donasi-counter-box { padding: 14px 18px; width: 100%; }
    .total-donasi-display, .glass-stat .gs-value { font-size: 1.5rem; }
    .app-content, .page-body { padding: 14px; }
    .stat-card .sc-value { font-size: 1.35rem; }
    .auth-form-card { padding: 28px 20px; }
    .timeline-steps { gap: 8px; }
    /* tabel: sembunyikan kolom tanggal di layar sangat kecil opsional */
    .bukti-thumb { width: 48px; height: 48px; }
}

/* Reduce motion: hormati preferensi aksesibilitas */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* --- Aksen warna pada card polos (kurangi kesan putih kosong) --- */
.card.hover-lift { position: relative; overflow: hidden; }
.card.hover-lift::before {
    content:''; position:absolute; top:0; left:0; right:0; height:4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-2), var(--accent));
    background-size: 200% 100%; animation: gradientShift 6s ease infinite;
}
/* Stat card: garis aksen bawah + sedikit gradient halus */
.stat-card { background: linear-gradient(180deg, #ffffff 0%, #fbfdfc 100%); }
.stat-card::after {
    content:''; position:absolute; left:0; bottom:0; height:3px; width:100%;
    background: linear-gradient(90deg, var(--primary-2), transparent);
    opacity:.6;
}
/* Empty-state lebih hidup */
.fa-inbox, .fa-search { animation: floatY 3s ease-in-out infinite; }

/* ============================================================
   🔧 FIX MOBILE — overflow & navbar & tabel geser
   ============================================================ */

/* Cegah scroll horizontal di seluruh halaman */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}
* { min-width: 0; }

/* Hilangkan transform scale pada baris tabel (penyebab geser horizontal) */
.table-modern tbody tr:hover { transform: none; background: #f0fdfa; }

/* Pastikan area tabel scroll di dalam kontainernya, bukan menggeser halaman */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.card { max-width: 100%; }

/* ---- NAVBAR LANDING: perbaikan mobile ---- */
.navbar-landing {
    height: auto;
    min-height: var(--navbar-h);
    padding-top: 8px;
    padding-bottom: 8px;
}

@media (max-width: 991.98px) {
    /* Panel menu saat di-toggle: beri background solid + shadow + jarak */
    .navbar-landing .navbar-collapse {
        background: #fff;
        margin-top: 10px;
        padding: 12px 14px;
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        border: 1px solid var(--border);
    }
    .navbar-landing .navbar-nav { gap: 4px !important; align-items: stretch !important; }
    .navbar-landing .nav-link {
        padding: 10px 12px !important;
        border-radius: 8px;
    }
    .navbar-landing .nav-link:hover { background: #f0fdfa; }
    .navbar-landing .btn-emerald { width: 100%; margin-top: 4px; }
    .navbar-toggler { padding: 6px 10px; font-size: 1.2rem; color: var(--primary); }
    .navbar-toggler:focus { box-shadow: none; }
}

/* ---- TOPBAR dashboard (admin/pengurus) mobile ---- */
@media (max-width: 575.98px) {
    .content-topbar { padding: 0 14px; }
    .content-topbar .ct-title { font-size: .95rem; }
    .content-topbar .ct-user { gap: 6px; }
    .content-topbar .ct-user .badge { font-size: .65rem; padding: 4px 6px; }
    .content-topbar .ct-avatar { width: 32px; height: 32px; font-size: .75rem; }
    /* navbar jamaah (top) user area */
    .app-navbar { padding: 0 14px; }
    .app-navbar .an-user { gap: 6px; }
}

/* Background fixed bisa berat di HP → ubah ke scroll di mobile */
@media (max-width: 768px) {
    body { background-attachment: scroll; }
}

/* Jaga semua gambar tidak melebihi lebar layar */
img { max-width: 100%; height: auto; }
.brand-logo, .brand-logo-lg, .bukti-thumb { height: auto; }
.brand-logo { max-height: 32px; }
.brand-logo-lg { max-height: 56px; }
.bukti-thumb { width: 60px; height: 60px; }

/* ============================================================
   ✨ AUTH PAGES — Percantik Login / Register / Lupa Password
   ============================================================ */

/* Panel kanan: background lembut bermotif (tidak polos) */
.auth-right {
    background:
        radial-gradient(circle at 15% 20%, rgba(20,184,166,.10), transparent 35%),
        radial-gradient(circle at 85% 80%, rgba(245,158,11,.08), transparent 35%),
        var(--bg);
}

/* Card form: muncul slide-up + 3D halus + aksen gradient atas */
.auth-form-card {
    position: relative;
    overflow: hidden;
    animation: fadeUp .7s cubic-bezier(.2,.8,.2,1) both;
    box-shadow: 0 24px 60px rgba(15,23,42,.12);
    transition: transform .4s ease, box-shadow .4s ease;
}
.auth-form-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 70px rgba(15,23,42,.16);
}
.auth-form-card::before {
    content:''; position:absolute; top:0; left:0; right:0; height:5px;
    background: linear-gradient(90deg, var(--primary), var(--primary-2), var(--accent), var(--primary-2), var(--primary));
    background-size: 300% 100%;
    animation: gradientShift 6s ease infinite;
}

/* Icon bulat di atas form: float + glow ring */
.auth-form-card .afc-icon {
    animation: floatY 3.5s ease-in-out infinite;
    box-shadow: 0 8px 24px rgba(15,118,110,.35);
    position: relative;
}
.auth-form-card .afc-icon::after {
    content:''; position:absolute; inset:-6px; border-radius:22px;
    border: 2px solid rgba(20,184,166,.3);
    animation: pulseGlow 2.6s ease-in-out infinite;
}

/* Judul form: gradient text */
.auth-form-card h4 {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Input group: efek fokus terangkat + glow + icon ikut berubah warna */
.auth-form-card .input-group {
    border-radius: var(--radius);
    transition: transform .25s ease, box-shadow .25s ease;
}
.auth-form-card .input-group:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(20,184,166,.18);
}
.auth-form-card .input-group:focus-within .input-group-text {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.auth-form-card .input-group-text { transition: background .25s, color .25s, border-color .25s; }
.auth-form-card .form-control { transition: border-color .25s, box-shadow .25s; }

/* Tombol submit auth: full shine sudah ada, tambah lift */
.auth-form-card .btn-emerald { letter-spacing: .3px; }

/* Link bawah form */
.auth-form-card a.fw-semibold { position: relative; }
.auth-form-card a.fw-semibold::after {
    content:''; position:absolute; left:0; bottom:-2px; width:0; height:2px;
    background: var(--primary-2); transition: width .3s ease;
}
.auth-form-card a.fw-semibold:hover::after { width:100%; }

/* ---- Panel kiri (auth-left): lebih hidup ---- */
.auth-left .al-content { animation: fadeUp .8s ease both .15s; }
.auth-left .al-logo { animation: floatY 4s ease-in-out infinite; display:inline-block; }
.auth-left .al-title {
    background: linear-gradient(135deg, #fff, var(--accent));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.auth-left .al-quote {
    backdrop-filter: blur(4px);
    background: rgba(255,255,255,.06);
    padding: 16px 18px; border-radius: 12px;
    border-left: 3px solid var(--accent);
    transition: transform .3s ease, background .3s ease;
}
.auth-left .al-quote:hover { transform: translateX(4px); background: rgba(255,255,255,.12); }

/* Orb dekoratif mengambang di panel kiri */
.auth-left::after {
    content:''; position:absolute; bottom:-90px; left:-90px;
    width: 320px; height: 320px; border-radius:50%;
    background: radial-gradient(circle, rgba(245,158,11,.18), transparent 70%);
    animation: floatY 7s ease-in-out infinite; pointer-events:none; z-index:0;
}
.auth-left > * { position: relative; z-index: 1; }

/* Bismillah kecil di kartu (jika ada) tetap rapi */
.auth-form-card .afc-sub { color: var(--muted); }

/* ============================================================
   📱 AUTH MOBILE — foto masjid jadi background di belakang form
   ============================================================ */
@media (max-width: 992px) {
    /* Panel kanan full layar dengan foto masjid + overlay hijau */
    .auth-right {
        background:
            linear-gradient(rgba(11,90,84,.85), rgba(15,23,42,.9)),
            url('../img/masjid.jpeg') center/cover no-repeat fixed,
            linear-gradient(135deg, var(--primary), var(--primary-dark));
        padding: 28px 18px;
    }
    /* Card form sedikit transparan + blur biar foto terlihat di belakang */
    .auth-form-card {
        background: rgba(255,255,255,.94);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 1px solid rgba(255,255,255,.5);
        box-shadow: 0 24px 60px rgba(0,0,0,.4);
    }
}

/* iOS tidak dukung background-attachment:fixed dgn baik → pakai scroll di layar kecil */
@media (max-width: 576px) {
    .auth-right {
        background:
            linear-gradient(rgba(11,90,84,.85), rgba(15,23,42,.9)),
            url('../img/masjid.jpeg') center/cover no-repeat scroll,
            linear-gradient(135deg, var(--primary), var(--primary-dark));
    }
}
