/* ==========================================================================
   THEME: LAZISNU MODERN UI (GEN-Z FRIENDLY)
   FONT: Plus Jakarta Sans
   PRIMARY COLOR: #45bf7c
   AUTHOR: Gemini AI (Refined & Standardized)
   ========================================================================== */

/* ==========================================================================
   1. IMPORTS & VARIABLES
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    /* --- Brand Colors --- */
    --primary: #45bf7c;
    --primary-dark: #369b63;
    --primary-darker: #2d8253;
    --primary-light: #e8f5e9;
    --primary-soft: #dcfce7;
    /* Lebih lembut untuk bg */

    /* --- Secondary & Accents --- */
    --secondary: #1e293b;
    /* Biru malam modern (Slate-800) */
    --accent: #f59e0b;
    /* Amber-500 */
    --accent-hover: #d97706;

    /* --- Neutral Colors --- */
    --bg-body: #ffffff;
    --bg-light: #f8fafc;
    /* Cool Gray sangat muda */
    --bg-surface: #ffffff;
    --text-dark: #111827;
    /* Gray-900 */
    --text-medium: #4b5563;
    /* Gray-600 */
    --text-light: #9ca3af;
    /* Gray-400 */
    --border-color: #e2e8f0;
    /* Slate-200 */

    /* --- Status Colors --- */
    --success-bg: #dcfce7;
    --success-text: #166534;
    --warning-bg: #fef3c7;
    --warning-text: #92400e;
    --danger-bg: #fee2e2;
    --danger-text: #991b1b;

    /* --- UI Dimensions & Effects --- */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(69, 191, 124, 0.25);
    /* Glow effect */

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   2. RESET & GLOBAL STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    /* Mencegah scroll horizontal tak diinginkan */
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container Grid System */
.container {
    width: 100%;
    max-width: 1240px;
    /* Sedikit lebih lebar untuk layar modern */
    margin: 0 auto;
    padding: 0 24px;
}

/* Custom Scrollbar Modern */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ==========================================================================
   3. COMPONENTS (Buttons, Forms, Tables, Badges)
   ========================================================================== */

/* --- Buttons --- */
.btn-solid {
    background: var(--primary);
    color: white;
    padding: 12px 28px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(69, 191, 124, 0.2);
}

.btn-solid:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(69, 191, 124, 0.35);
}

.btn-solid:active {
    transform: translateY(0);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 10px 26px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(69, 191, 124, 0.2);
    transform: translateY(-2px);
}

.btn-donate {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: var(--primary);
    color: white;
    padding: 14px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 16px;
    margin-top: 15px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.btn-donate::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn-donate:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-donate:hover::after {
    left: 100%;
}

/* --- Forms --- */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--secondary);
    letter-spacing: -0.01em;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 15px;
    color: var(--text-dark);
    background: #fff;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(69, 191, 124, 0.15);
}

.form-control::placeholder {
    color: #94a3b8;
}

/* --- Tables --- */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 15px;
}

table th {
    text-align: left;
    padding: 18px 20px;
    background-color: #f8fafc;
    color: var(--secondary);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border-color);
}

table td {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-medium);
}

table tr:last-child td {
    border-bottom: none;
}

table tr:hover {
    background-color: #f8fcf9;
}

/* --- Badges --- */
.badge {
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
    letter-spacing: 0.02em;
}

.badge-success {
    background: var(--success-bg);
    color: var(--success-text);
}

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning-text);
}

.badge-danger {
    background: var(--danger-bg);
    color: var(--danger-text);
}




/* ==========================================================================
   8. RESPONSIVE / MOBILE STYLES (UTAMAKAN RAPI & MODERN)
   ========================================================================== */
.mobile-toggle,
.bottom-nav,
.mobile-sidebar {
    display: none;
}

@media (max-width: 992px) {

    /* Header Adjustments */
    .main-header {
        padding: 0 5px;
        height: 70px;
    }

    .main-content-spacer {
        height: 70px;
    }

    .header-wrapper {
        gap: 15px;
    }

    .desktop-text {
        display: none;
    }

    .mobile-text {
        display: block;
        font-weight: 800;
        font-size: 18px;
        color: var(--secondary);
        letter-spacing: -0.5px;
    }

    .desktop-menu {
        display: none;
    }

    .mobile-toggle {
        display: block;
        font-size: 24px;
        color: var(--secondary);
        cursor: pointer;
        padding: 10px;
    }

    .search-container {
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: white;
        padding: 10px 20px;
        box-shadow: var(--shadow-sm);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        z-index: 900;
    }

    .search-container.active {
        transform: translateY(0);
    }

    .search-container form {
        margin: 0;
    }

    /* Hero Responsive */
    .hero {
        padding: 40px 0;
        min-height: auto;
        text-align: center;
        overflow: hidden;
    }

    .hero::before {
        width: 300px;
        height: 300px;
        top: -50px;
        right: -50px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-cta {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-image img {
        transform: none;
        margin-top: 20px;
    }

    .hero-image img:hover {
        transform: none;
    }

    .hero-text h1 {
        font-size: 36px;
    }

    /* Stats Responsive (Scrollable Horizontal for cleanliness) */
    .stats-container {
        grid-template-columns: 1fr;
        margin-top: 30px;
        padding: 30px 20px;
        gap: 30px;
    }

    .stat-item:not(:last-child)::after {
        width: 60%;
        height: 1px;
        top: auto;
        bottom: -15px;
        left: 20%;
        right: auto;
    }

    /* Footer Responsive */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-light {
        padding-top: 60px;
        padding-bottom: 80px;
    }

    /* Jarak untuk bottom nav */
    .footer-copyright {
        padding-bottom: 100px;
    }

    /* === BOTTOM NAV (GEN-Z STYLE STICKY) === */
    .bottom-nav {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
        padding: 10px 0 25px;
        /* Extra padding for iOS home indicator */
        z-index: 2000;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
    }

    .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        font-size: 10px;
        font-weight: 600;
        color: #94a3b8;
        text-decoration: none;
        position: relative;
    }

    .nav-item i {
        font-size: 20px;
        margin-bottom: 4px;
        transition: var(--transition);
        padding: 5px;
        border-radius: 12px;
    }

    .nav-item.active {
        color: var(--primary);
    }

    .nav-item.active i {
        background: var(--primary-light);
        color: var(--primary-dark);
        transform: translateY(-2px);
    }

    /* Indicator dot active */
    .nav-item.active::after {
        content: '';
        width: 4px;
        height: 4px;
        background: var(--primary);
        border-radius: 50%;
        position: absolute;
        bottom: 5px;
    }
}

/* ==========================================================================
   9. ACCOUNT DASHBOARD STYLES
   ========================================================================== */
.account-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    margin-top: 30px;
}

/* Sidebar Profile */
.account-sidebar {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 30px;
    height: fit-content;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 100px;
}

.user-profile-card {
    text-align: center;
    margin-bottom: 30px;
}

.avatar-wrapper {
    margin: 0 auto 15px;
    width: 100px;
    height: 100px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: var(--shadow-md);
}

.avatar-circle {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-light), white);
    color: var(--primary);
    font-size: 40px;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid white;
    box-shadow: var(--shadow-md);
}

.user-profile-card h4 {
    margin-bottom: 6px;
    color: var(--secondary);
    font-size: 18px;
    font-weight: 700;
}

.user-profile-card p {
    color: var(--text-medium);
    font-size: 12px;
    background: #f1f5f9;
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.account-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.account-nav a {
    padding: 14px 18px;
    border-radius: 10px;
    color: var(--text-medium);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
}

.account-nav a i {
    width: 20px;
    text-align: center;
}

.account-nav a:hover,
.account-nav a.active {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.text-danger:hover {
    background: #fee2e2 !important;
    color: #b91c1c !important;
}

/* Content Area */
.account-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.section-heading {
    font-size: 22px;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
}

/* Dashboard Stats Small */
.stats-grid-small {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    padding: 24px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid transparent;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-card i {
    font-size: 24px;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card.green {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.stat-card.green i {
    background: white;
    color: #16a34a;
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.1);
}

.stat-card.orange {
    background: #fff7ed;
    border-color: #fed7aa;
}

.stat-card.orange i {
    background: white;
    color: #ea580c;
    box-shadow: 0 4px 10px rgba(234, 88, 12, 0.1);
}

.stat-card span {
    font-size: 13px;
    color: var(--text-medium);
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.stat-card h3 {
    font-size: 24px;
    color: var(--secondary);
    margin: 0;
    font-weight: 800;
}

/* Transaction List */
.transaction-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    margin-bottom: 16px;
    transition: var(--transition);
    background: #fff;
}

.transaction-item:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transform: translateX(5px);
}

.trx-icon {
    width: 48px;
    height: 48px;
    background: #f8fafc;
    color: var(--text-light);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 18px;
}

.transaction-item:hover .trx-icon {
    background: var(--primary-light);
    color: var(--primary);
}

.trx-info {
    flex-grow: 1;
}

.trx-info strong {
    display: block;
    color: var(--secondary);
    font-size: 15px;
    margin-bottom: 4px;
}

.trx-info span {
    font-size: 13px;
    color: #94a3b8;
}

.trx-amount {
    text-align: right;
    font-weight: 700;
    color: var(--secondary);
    font-size: 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 0;
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    background: #fcfcfc;
}

.empty-state p {
    margin: 10px 0 24px;
    color: var(--text-medium);
    font-size: 15px;
}

.account-header-mobile {
    display: none;
    margin-bottom: 20px;
}

/* Responsive Account */
@media (max-width: 992px) {
    .account-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .account-sidebar {
        display: flex;
        align-items: center;
        gap: 20px;
        padding: 20px;
        flex-wrap: wrap;
        position: static;
        z-index: 1;
    }

    .user-profile-card {
        margin: 0;
        text-align: left;
        display: flex;
        align-items: center;
        gap: 15px;
        width: 100%;
    }

    .avatar-wrapper,
    .avatar-circle {
        width: 50px;
        height: 50px;
        margin: 0;
        font-size: 20px;
        border-width: 2px;
    }

    .avatar-img {
        width: 50px;
        height: 50px;
        border-width: 2px;
    }

    .user-profile-card h4 {
        font-size: 16px;
        margin: 0;
    }

    .user-profile-card p {
        margin-top: 4px;
        padding: 2px 8px;
        font-size: 10px;
    }

    .account-nav {
        flex-direction: row;
        overflow-x: auto;
        width: 100%;
        padding-bottom: 10px;
        border-top: 1px solid #f1f5f9;
        padding-top: 15px;
        gap: 10px;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .account-nav::-webkit-scrollbar {
        display: none;
    }

    .account-nav a {
        white-space: nowrap;
        font-size: 13px;
        padding: 8px 14px;
        background: #f8fafc;
        border: 1px solid #f1f5f9;
    }

    .account-nav a.active {
        background: var(--primary-light);
        border-color: var(--primary-light);
    }

    .account-nav hr {
        display: none;
    }
}

/* ==========================================================================
   10. ADMIN LAYOUT (MODERN DASHBOARD)
   ========================================================================== */
.admin-body {
    background-color: #f3f4f6;
    /* Helper class untuk body admin */
}

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 280px;
    background: #111827;
    /* Gray-900 */
    color: #e5e7eb;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    overflow-y: auto;
}

.admin-sidebar .sidebar-header {
    padding: 24px;
    font-size: 22px;
    font-weight: 800;
    color: white;
    background: #0f172a;
    border-bottom: 1px solid #1f2937;
    margin-bottom: 0;
}

.sidebar-user {
    padding: 24px;
    border-bottom: 1px solid #1f2937;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #131b2e;
}

.user-avatar {
    width: 42px;
    height: 42px;
    background: var(--primary);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: white;
    margin-bottom: 2px;
}

.user-role {
    font-size: 11px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    padding: 20px 0;
    flex-grow: 1;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 24px;
    color: #9ca3af;
    transition: 0.2s;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
    background: #1f2937;
    color: white;
}

.sidebar-nav a.active {
    background: #1f2937;
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
}

.sidebar-nav i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.nav-divider {
    font-size: 11px;
    font-weight: 800;
    color: #4b5563;
    padding: 24px 24px 10px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.nav-logout {
    margin-top: auto;
    color: #ef4444 !important;
    font-weight: 600 !important;
}

.nav-logout:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #f87171 !important;
}

.badge-count {
    background: #ef4444;
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: auto;
    font-weight: 700;
}

/* Content */
.admin-content {
    flex-grow: 1;
    margin-left: 280px;
    padding: 0;
    transition: 0.3s;
    background: #f3f4f6;
    min-height: 100vh;
}

.admin-topbar {
    background: white;
    padding: 15px 30px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 90;
}

#sidebarToggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--secondary);
}

.content-body {
    padding: 30px;
}

/* Table Admin Modern */
.table-admin {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.table-admin th {
    background: #f9fafb;
    padding: 16px 20px;
    text-align: left;
    font-size: 12px;
    color: var(--text-medium);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.table-admin td {
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
    color: var(--text-dark);
    font-size: 14px;
    vertical-align: middle;
}

.table-admin tr:last-child td {
    border-bottom: none;
}

/* Admin Responsive */
@media (max-width: 992px) {
    .admin-sidebar {
        transform: translateX(-100%);
        width: 260px;
    }

    .admin-sidebar.active {
        transform: translateX(0);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.2);
    }

    .admin-content {
        margin-left: 0;
    }

    #sidebarToggle {
        display: block;
    }

    .content-body {
        padding: 20px;
    }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}