/* Dashboard Neraca Keuangan - Layout Rapi & Padat */
.dashboard-header, .dashboard-header.mb-5 {
    margin-bottom: 1.5rem !important;
}
.modern-card {
    border-radius: 18px;
    box-shadow: 0 2px 16px rgba(60,72,88,0.10);
    background: #fff;
    padding: 1.25rem 1rem !important;
    margin-bottom: 1.25rem;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.modern-card .card-icon {
    margin-bottom: 0.75rem;
}
.modern-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: #1a237e;
}
.modern-card .counter-value {
    font-size: 1.6rem;
    margin-bottom: 0.25rem;
}
.modern-card button.btn {
    margin-top: 0.5rem;
}
.row.mb-5 {
    margin-bottom: 1.5rem !important;
}
.modern-card.bg-gradient-info {
    background: linear-gradient(120deg, #2196f3 60%, #21cbf3 100%) !important;
    color: #fff !important;
}
.modern-card.bg-gradient-danger {
    background: linear-gradient(120deg, #e53935 60%, #e35d5b 100%) !important;
    color: #fff !important;
}
.modern-card.bg-gradient-success {
    background: linear-gradient(120deg, #43a047 60%, #66bb6a 100%) !important;
    color: #fff !important;
}
.modern-card .progress {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    height: 22px !important;
    border-radius: 12px !important;
}
.modern-card .progress-bar {
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px !important;
}
.modern-card h5.mb-3 {
    margin-bottom: 0.75rem !important;
    font-size: 1.05rem;
    color: #3949ab;
}
/* Professional Overview Section */
.professional-overview-section {
    margin-bottom: 3rem;
    padding: 2rem;
    /* Use centralized translucent white for consistent glass effect */
    background: linear-gradient(135deg, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0.95) 100%);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(102, 126, 234, 0.12);
}

.section-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    color: #2c3e50;
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 0.95rem;
    font-weight: 500;
}

.last-updated {
    background: rgba(102, 126, 234, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 500;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.professional-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.metric-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    /* use primary gradient variable for consistent accent */
    background: var(--primary-gradient);
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    background: var(--primary-gradient);
}

.metric-members .metric-icon {
    background: var(--info-gradient);
}

.metric-documents .metric-icon {
    background: var(--success-gradient);
}

.metric-gallery .metric-icon {
    background: var(--warning-gradient);
}

.metric-budget .metric-icon {
    background: var(--info-gradient);
    color: #2c3e50;
}

.trend-indicator {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    border: 1px solid;
}

.trend-indicator.positive {
    background: rgba(34, 197, 94, 0.1);
    color: #059669;
    border-color: rgba(34, 197, 94, 0.2);
}

.trend-indicator.negative {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.2);
}

.trend-indicator.neutral {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
    border-color: rgba(107, 114, 128, 0.2);
}

.metric-content {
    margin-bottom: 1.5rem;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1;
    margin-bottom: 0.5rem;
    font-family: 'Poppins', sans-serif;
}

.metric-label {
    font-size: 1rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.25rem;
}

.metric-description {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.btn-metric {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-accent));
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    text-decoration: none;
    color: #475569;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-metric:hover {
    background: var(--primary-gradient);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-metric:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Visitor Restricted Styles */
.visitor-restricted {
    position: relative;
    opacity: 0.75;
    background: rgba(255, 255, 255, 0.7) !important;
}

.visitor-restricted::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.02), rgba(0,0,0,0.08));
    border-radius: 16px;
    pointer-events: none;
}

.metric-access-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc2626;
    font-size: 0.75rem;
}

.access-badge {
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 25px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

@media (max-width: 768px) {
    .professional-overview-section {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .professional-metrics-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .metric-card {
        padding: 1.25rem;
    }
    
    .metric-value {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .last-updated {
        display: none;
    }
}

/* Modern System Summary Grid */
.system-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 28px;
    margin-bottom: 2.5rem;
    align-items: stretch;
}
.system-summary-grid .stat-card {
    min-height: 170px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    box-shadow: 0 8px 32px rgba(0,0,0,0.10);
    border-radius: 18px;
    padding: 2.2rem 1.5rem 1.5rem 1.5rem;
    transition: box-shadow 0.3s;
}
.system-summary-grid .stat-card .stat-icon {
    align-self: flex-end;
    font-size: 3.2rem;
    opacity: 0.8;
}
@media (max-width: 767px) {
    .system-summary-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    .system-summary-grid .stat-card {
        padding: 1.2rem 0.7rem 1rem 0.7rem;
        min-height: 120px;
    }
}
@media (max-width: 480px) {
    .system-summary-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}
/* Modern Sidebar Title */
.sidebar-title-modern {
    font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 1.5px;
    color: #fff;
    text-align: center;
    margin-bottom: 0.2rem;
    line-height: 1.1;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.sidebar-title-modern .sidebar-title-makassar {
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 2.5px;
    color: #00d2ff;
    margin-top: -2px;
    text-shadow: 0 2px 8px rgba(0,210,255,0.13);
}
/* Hide sidebar title when collapsed */
.sidebar.collapsed .sidebar-title-modern {
    display: none !important;
}
/* Sembunyikan tulisan menu saat sidebar collapsed */
.sidebar.collapsed ul.nav li.nav-item a.nav-link span {
    display: none !important;
}
/* Sidebar profile image center and bigger */
.sidebar-profile-img {
    margin: 0 auto 10px auto;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.65,0,0.35,1);
}

/* Saat sidebar collapse, foto tetap tampil tapi lebih kecil dan tetap center */
.sidebar.collapsed .sidebar-profile-img {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    margin-bottom: 8px !important;
}
.sidebar.collapsed .sidebar-profile-img img {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    border-width: 2px !important;
    box-shadow: 0 1px 6px rgba(0,0,0,0.10);
}
/* Spasi antara icon dan tulisan sidebar */
/* Spasi sidebar: pastikan selector spesifik dan tidak tertimpa */
.sidebar ul.nav li.nav-item a.nav-link i {
    margin-right: 30px !important;
    vertical-align: middle !important;
}
.sidebar ul.nav li.nav-item a.nav-link span {
    margin-left: 10px !important;
    vertical-align: middle !important;
    display: inline-block;
}
/* Dark Mode Styles */
body.dark-mode {
    background: linear-gradient(135deg, #121212, #2d3436, #1e272e);
    color: #f5f5f5;
}

body.dark-mode .card {
    background-color: rgba(30, 30, 30, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .table {
    color: #f5f5f5;
}

body.dark-mode .form-control {
    background-color: rgba(30, 30, 30, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f5f5f5;
}

.dark-mode-toggle {
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
}

.dark-mode-toggle:hover {
    transform: rotate(30deg);
    background-color: rgba(255, 255, 255, 0.2);
}

.dark-mode-toggle.active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Modern Card Effects */
.card {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 15px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* Modern Button Styles */
.btn {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255,255,255,0.2), rgba(255,255,255,0));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn:hover::after {
    opacity: 1;
}

.btn-primary {
    background-image: linear-gradient(135deg, #3a7bd5, #00d2ff);
    border: none;
}

.btn-success {
    background-image: linear-gradient(135deg, #11998e, #38ef7d);
    border: none;
}

.btn-danger {
    background-image: linear-gradient(135deg, #ED213A, #93291E);
    border: none;
}

/* Modern Form Controls */
.form-control {
    border-radius: 8px;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    color: #fff;
    transition: all 0.3s ease;
}

.form-control:focus {
    box-shadow: 0 0 0 3px rgba(58, 123, 213, 0.3);
    border-color: rgba(58, 123, 213, 0.5);
    background-color: rgba(255, 255, 255, 0.15);
}

/* Table Styling */
.table {
    border-collapse: separate;
    border-spacing: 0 10px;
}

.table thead th {
    border-bottom: none;
    padding: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.table tbody tr {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    background-color: rgba(255, 255, 255, 0.15);
}

.table td {
    padding: 15px;
    border-top: none;
    vertical-align: middle;
}

/* Loading Animation */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* High Contrast Heading for Anggota */
.member-hero h1, h1.member-hero {
     color: #1a237e;
     background: none;
     text-shadow: 0 2px 8px rgba(0,0,0,0.12), 0 1px 0 #fff;
     font-weight: 900;
     letter-spacing: 1px;
     border-radius: 6px;
     padding: 0.25em 0.5em;
}

/* Nama anggota di bawah foto */
.card-title {
    color: #1a237e;
    font-size: 1.15rem;
    font-weight: bold;
    margin-top: 0.5em;
    margin-bottom: 0.2em;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.10);
}

/* Tabel Neraca Keuangan Modern */
.table-bordered {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(60,72,88,0.08);
    background: #fff;
}
.table thead.table-dark th {
    background: linear-gradient(90deg, #1a237e 60%, #3949ab 100%);
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    border-bottom: 2px solid #3949ab;
    letter-spacing: 0.5px;
}
.table-striped tbody tr:nth-of-type(odd) {
    background-color: #f5f7fa;
}
.table-striped tbody tr:nth-of-type(even) {
    background-color: #e9ecef;
}
.table tbody tr:hover {
    background-color: #e3eafc;
    box-shadow: 0 2px 12px rgba(60,72,88,0.10);
    transition: background 0.2s, box-shadow 0.2s;
}
.table td, .table th {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    border: none;
}