/* School Fee Management System Styles */

:root {
    --primary-color: #4e73df;
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --info-color: #36b9cc;
    --light-color: #f8f9fc;
    --dark-color: #5a5c69;
    --border-color: #e3e6f0;
    --text-muted: #858796;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fc;
    font-size: 0.875rem;
    color: #333;
    margin: 0;
    padding: 0;
}

/* Navigation */
.navbar-brand {
    font-weight: 600;
    font-size: 1.1rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: rgba(255,255,255,.8) !important;
}

.navbar-nav .nav-link:hover {
    color: white !important;
}

/* Sidebar */
.sidebar {
    background: linear-gradient(180deg, #4e73df 10%, #224abe 100%);
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    min-height: calc(100vh - 56px);
}

.sidebar .nav-link {
    color: rgba(255,255,255,.8);
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 0.35rem;
    margin: 0.25rem 0;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
}

.sidebar .nav-link.active {
    background-color: rgba(255,255,255,0.2);
    color: white;
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
}

/* Main Content */
.content-section {
    padding: 1.5rem;
}

.content-section h1.h2 {
    color: #5a5c69;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* Cards */
.card {
    border: none;
    border-radius: 0.35rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: #5a5c69;
}

.card-body {
    padding: 1.5rem;
}

/* Summary Cards */
.border-left-primary {
    border-left: 0.25rem solid var(--primary-color) !important;
}

.border-left-success {
    border-left: 0.25rem solid var(--success-color) !important;
}

.border-left-warning {
    border-left: 0.25rem solid var(--warning-color) !important;
}

.border-left-info {
    border-left: 0.25rem solid var(--info-color) !important;
}

.border-left-danger {
    border-left: 0.25rem solid var(--danger-color) !important;
}

.text-xs {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.font-weight-bold {
    font-weight: 700 !important;
}

.text-gray-800 {
    color: #5a5c69 !important;
}

.text-gray-300 {
    color: #dddfeb !important;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    background-color: #f8f9fc;
    color: #5a5c69;
    font-weight: 600;
    border-top: none;
    padding: 1rem 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.table td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    border-top: 1px solid var(--border-color);
}

.table-hover tbody tr:hover {
    background-color: rgba(78, 115, 223, 0.05);
}

/* Buttons */
.btn {
    border-radius: 0.35rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #2e59d9;
    border-color: #2653d4;
}

.btn-outline-secondary {
    border-color: var(--border-color);
    color: var(--secondary-color);
}

.btn-outline-secondary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* Forms */
.form-control, .form-select {
    border-radius: 0.35rem;
    border: 1px solid var(--border-color);
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.form-label {
    font-weight: 600;
    color: #5a5c69;
    margin-bottom: 0.5rem;
}

/* Modal */
.modal-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-weight: 600;
    color: #5a5c69;
}

.modal-footer {
    background-color: #f8f9fc;
    border-top: 1px solid var(--border-color);
}

/* Status Badges */
.badge {
    border-radius: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bg-success {
    background-color: var(--success-color) !important;
}

.bg-warning {
    background-color: var(--warning-color) !important;
}

.bg-danger {
    background-color: var(--danger-color) !important;
}

.bg-info {
    background-color: var(--info-color) !important;
}

.bg-secondary {
    background-color: var(--secondary-color) !important;
}

/* Charts */
canvas {
    max-height: 400px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        min-height: auto;
    }
    
    .content-section {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.8rem;
    }
    
    .btn-sm {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .row-cols-1 > * {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1rem;
    }
    
    .content-section h1.h2 {
        font-size: 1.25rem;
    }
    
    .table {
        font-size: 0.75rem;
    }
    
    .table th, .table td {
        padding: 0.5rem 0.25rem;
    }
    
    .btn {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Utility Classes */
.shadow {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15) !important;
}

.border-left {
    border-left: 0.25rem solid !important;
}

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

.fw-bold {
    font-weight: 700 !important;
}

.fs-6 {
    font-size: 0.875rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.py-2 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

.px-3 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Print Styles */
@media print {
    .sidebar, .navbar, .btn, .modal {
        display: none !important;
    }
    
    .content-section {
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .table {
        font-size: 0.75rem;
    }
}