/* Custom CSS for School Fee Management System */

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Page Title Box */
.page-title-box {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

/* Cards */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

/* Statistics Cards */
.card.bg-primary .avatar-title {
    background-color: rgba(255, 255, 255, 0.2)!important;
}

.card.bg-success .avatar-title {
    background-color: rgba(255, 255, 255, 0.2)!important;
}

.card.bg-warning .avatar-title {
    background-color: rgba(255, 255, 255, 0.2)!important;
}

.card.bg-info .avatar-title {
    background-color: rgba(255, 255, 255, 0.2)!important;
}

.avatar-sm {
    height: 3rem;
    width: 3rem;
}

.avatar-title {
    align-items: center;
    background-color: #007bff;
    border-radius: 0.375rem;
    color: #fff;
    display: flex;
    font-weight: 500;
    height: 100%;
    justify-content: center;
    width: 100%;
}

/* Navigation */
.navbar-brand {
    font-weight: 600;
    font-size: 1.2rem;
}

.nav-link {
    transition: all 0.3s ease;
}

.nav-link:hover {
    transform: translateY(-1px);
}

.dropdown-menu {
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Forms */
.form-control, .form-select {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.input-group-text {
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    color: #6c757d;
}

/* Buttons */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    background-color: #f8f9fa;
    color: #495057;
}

.table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.025);
}

/* DataTables Custom Styling */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #007bff!important;
    border-color: #007bff!important;
    color: white!important;
    border-radius: 0.375rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #0056b3!important;
    border-color: #0056b3!important;
    color: white!important;
}

/* Select2 Custom Styling */
.select2-container--bootstrap-5 .select2-selection {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
}

.select2-container--bootstrap-5 .select2-selection--single {
    height: calc(2.25rem + 2px);
}

/* Fee Collection Specific */
.fee-item {
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background-color: #ffffff;
    transition: all 0.15s ease-in-out;
}

.fee-item:hover {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.1);
}

.fee-summary {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1.5rem;
}

/* Receipt Styling */
.receipt {
    background: white;
    border: 2px solid #000;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
    font-family: 'Courier New', monospace;
}

.receipt-header {
    text-align: center;
    border-bottom: 2px solid #000;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.receipt-title {
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
}

.receipt-number {
    float: right;
    font-weight: bold;
}

.receipt-details {
    margin-bottom: 20px;
}

.receipt-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.receipt-table th,
.receipt-table td {
    border: 1px solid #000;
    padding: 8px;
    text-align: left;
}

.receipt-table th {
    background-color: #f0f0f0;
    font-weight: bold;
}

.receipt-footer {
    border-top: 2px solid #000;
    padding-top: 15px;
    text-align: center;
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .no-print,
    footer {
        display: none!important;
    }
    
    .receipt {
        border: none;
        box-shadow: none;
    }
    
    body {
        background: white!important;
    }
    
    .card {
        border: none;
        box-shadow: none;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .page-title-box {
        text-align: center;
    }
    
    .page-title-right {
        margin-top: 10px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-sm {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
    
    .table-responsive {
        border: none;
    }
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Alert Animations */
.alert {
    animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Badge Styling */
.badge {
    border-radius: 0.375rem;
}

/* Custom Colors for Indian Schools */
.text-saffron {
    color: #FF9933!important;
}

.bg-saffron {
    background-color: #FF9933!important;
}

.text-green {
    color: #138808!important;
}

.bg-green {
    background-color: #138808!important;
}

/* Status Indicators */
.status-paid {
    color: #28a745;
    font-weight: 600;
}

.status-pending {
    color: #ffc107;
    font-weight: 600;
}

.status-overdue {
    color: #dc3545;
    font-weight: 600;
}

.status-partial {
    color: #fd7e14;
    font-weight: 600;
}

/* Amount Highlighting */
.amount-highlight {
    font-size: 1.2em;
    font-weight: bold;
    color: #007bff;
}

.amount-success {
    color: #28a745;
}

.amount-danger {
    color: #dc3545;
}

.amount-warning {
    color: #ffc107;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Utility Classes */
.cursor-pointer {
    cursor: pointer;
}

.border-dashed {
    border-style: dashed!important;
}

.text-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer Styling */
footer {
    margin-top: auto;
}

/* Dashboard Specific */
.quick-stats {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.stat-card {
    text-align: center;
    padding: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}