/* Custom styles for Wakafinance */

:root {
    --primary-color: #0d6efd;
    --danger-color: #dc3545;
    --success-color: #198754;
}

body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
    margin-bottom: 2rem;
}

.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #fff;
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
}

/* Negative balance highlighting */
.negative-balance {
    color: var(--danger-color);
    font-weight: bold;
}

.table-danger {
    background-color: #f8d7da !important;
}

/* Summary cards on dashboard */
.summary-card {
    border-left: 4px solid var(--primary-color);
    transition: transform 0.2s;
}

.summary-card:hover {
    transform: translateY(-2px);
}

.summary-card.danger {
    border-left-color: var(--danger-color);
}

.summary-card.success {
    border-left-color: var(--success-color);
}

/* Form styling */
.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Table styling */
.table thead th {
    background-color: #e9ecef;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Button spacing */
.btn + .btn {
    margin-left: 0.25rem;
}

/* Alert messages */
.alert {
    border-radius: 0.5rem;
    border: none;
}

/* Responsive table wrapper */
.table-responsive {
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Amount display */
.amount-masuk {
    color: var(--success-color);
    font-weight: 600;
}

.amount-keluar {
    color: var(--danger-color);
    font-weight: 600;
}

/* Mobile responsive */
@media (max-width: 991px) {
    /* Separator untuk user info di navbar mobile */
    .navbar-collapse .navbar-nav.ms-auto {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .navbar-collapse .navbar-text {
        display: block;
        padding: 0.5rem 0;
        margin: 0 0 0.5rem 0 !important;
    }
    
    .navbar-collapse .btn {
        margin: 0.25rem 0.5rem 0.25rem 0 !important;
    }
}

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    /* Mobile card styles */
    .card .card {
        border: 1px solid #dee2e6;
        border-radius: 0.5rem;
    }
    
    .card .card.border-danger {
        border-color: var(--danger-color) !important;
        background-color: #fff5f5;
    }
    
    .card .card-body h6 {
        color: #333;
        border-bottom: 2px solid #e9ecef;
        padding-bottom: 0.5rem;
    }
    
    .card .card-body .row {
        font-size: 0.9rem;
    }
    
    .card .card-body small {
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
}

/* Print styles */
@media print {
    .navbar, .btn, .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}

/* Mobile card styles for student list */
@media (max-width: 768px) {
    .card .card {
        border: 1px solid #dee2e6;
        border-radius: 0.5rem;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }
    
    .card .card.border-danger {
        border-color: var(--danger-color) !important;
        background-color: #fff5f5;
    }
    
    .card .card-body h6 {
        color: #333;
        border-bottom: 2px solid #e9ecef;
        padding-bottom: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .card .card-body .row {
        font-size: 0.9rem;
    }
    
    .card .card-body small {
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        font-weight: 600;
    }
    
    .card .card-body strong {
        font-size: 1rem;
    }
}
