/**
 * SISTEM INFORMASI PEMBAYARAN SISWA
 * MA BAHRUL ULUM KECAMATAN KEPOHBARU KABUPATEN BOJONEGORO
 * Modern Madrasah Dashboard Styling (CSS)
 */

:root {
    --mabu-primary: #15803d;       /* Islamic Green */
    --mabu-primary-dark: #166534;  /* Deep Emerald */
    --mabu-primary-light: #22c55e; /* Vibrant Green */
    --mabu-secondary: #0d9488;     /* Modern Teal */
    --mabu-accent: #d97706;        /* Islamic Gold / Amber */
    --mabu-dark: #0f172a;          /* Slate Dark */
    --mabu-bg: #f8fafc;            /* Clean Soft Gray */
    --mabu-card-bg: #ffffff;
    --mabu-border: #e2e8f0;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 76px;
    --bottom-nav-height: 68px;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--mabu-bg);
    color: #334155;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Islamic Green Gradients */
.bg-mabu-primary {
    background-color: var(--mabu-primary) !important;
}

.bg-gradient-mabu {
    background: linear-gradient(135deg, #166534 0%, #15803d 50%, #059669 100%) !important;
    color: #ffffff !important;
}

.bg-gradient-gold {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%) !important;
    color: #ffffff !important;
}

.text-mabu-primary {
    color: var(--mabu-primary) !important;
}

/* Card Styling */
.card-mabu {
    background: var(--mabu-card-bg);
    border: 1px solid var(--mabu-border);
    border-radius: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-mabu:hover {
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
}

.card-stat {
    border-radius: 14px;
    border: 1px solid var(--mabu-border);
    background: #ffffff;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
}

.card-stat .icon-box {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

/* Desktop Sidebar */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.desktop-sidebar {
    width: var(--sidebar-width);
    background: #ffffff;
    border-right: 1px solid var(--mabu-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1030;
    transition: all 0.3s ease;
}

.sidebar-header {
    height: 72px;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--mabu-border);
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0.75rem;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    color: #475569;
    font-weight: 500;
    font-size: 0.92rem;
    text-decoration: none;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
}

.sidebar-item i {
    width: 24px;
    font-size: 1.15rem;
    margin-right: 0.85rem;
    color: #64748b;
    transition: color 0.2s ease;
}

.sidebar-item:hover {
    background-color: #f0fdf4;
    color: var(--mabu-primary);
}

.sidebar-item:hover i {
    color: var(--mabu-primary);
}

.sidebar-item.active {
    background: linear-gradient(135deg, #15803d, #166534);
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(21, 128, 61, 0.25);
}

.sidebar-item.active i {
    color: #ffffff !important;
}

.menu-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #94a3b8;
    font-weight: 700;
    padding: 1rem 1rem 0.4rem;
}

/* Main Content Area */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.app-navbar {
    height: 72px;
    background: #ffffff;
    border-bottom: 1px solid var(--mabu-border);
    position: sticky;
    top: 0;
    z-index: 1020;
    padding: 0 1.5rem;
}

.app-content {
    flex: 1;
    padding: 1.5rem;
}

/* Mobile Fixed Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: #ffffff;
    border-top: 1px solid var(--mabu-border);
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.08);
    z-index: 1045;
    padding: 0 0.5rem;
}

.bottom-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: #64748b;
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 6px 0;
    position: relative;
    transition: all 0.2s ease;
}

.bottom-nav-item i {
    font-size: 1.25rem;
    margin-bottom: 3px;
    transition: transform 0.2s ease;
}

.bottom-nav-item.active {
    color: var(--mabu-primary);
    font-weight: 700;
}

.bottom-nav-item.active i {
    transform: translateY(-2px);
    color: var(--mabu-primary);
}

.bottom-nav-item.center-action {
    transform: translateY(-12px);
}

.bottom-nav-item.center-action .action-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #15803d, #059669);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(21, 128, 61, 0.4);
    margin-bottom: 2px;
}

/* Quick Action Mobile Pill */
.quick-action-btn {
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #334155;
    background: #ffffff;
    border: 1px solid var(--mabu-border);
    transition: all 0.2s ease;
}

.quick-action-btn:hover {
    background-color: #f0fdf4;
    border-color: var(--mabu-primary-light);
    color: var(--mabu-primary);
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .desktop-sidebar {
        display: none;
    }
    
    .app-main {
        margin-left: 0 !important;
    }
    
    .mobile-bottom-nav {
        display: block;
    }
    
    .app-content {
        padding: 1rem;
        padding-bottom: 88px !important; /* Mencegah konten tertutup bottom nav */
    }
    
    .app-navbar {
        padding: 0 1rem;
    }
}

/* Clean Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Print Specific Rules */
@media print {
    .desktop-sidebar, .mobile-bottom-nav, .app-navbar, .no-print {
        display: none !important;
    }
    .app-main {
        margin-left: 0 !important;
    }
    .app-content {
        padding: 0 !important;
    }
}
