/* Custom CSS for Fee Management Application */

/* General Styles */
body {
    font-family: 'Noto Sans Devanagari', sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

/* Navigation Bar Styles - Indian Tricolor Theme */
.navbar {
    padding: 0;
    background: linear-gradient(to right, #FF9933, #ffffff, #138808) !important;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
}

.navbar-nav {
    display: flex;
    width: 100%;
    justify-content: space-between;
}

.navbar-nav .nav-item {
    flex: 1;
    text-align: center;
}

.navbar-nav .nav-link {
    font-size: 18px;
    padding: 15px;
    color: #000080 !important; /* Navy blue for better visibility */
    font-weight: 600;
    position: relative;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.5);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 0;
    background-color: #FF9933;
    transition: width 0.3s;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 100%;
}

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

/* School Header Styles */
.school-header {
    background: linear-gradient(135deg, #FF9933 0%, #FFFFFF 50%, #138808 100%);
    color: #000080;
    padding: 20px 0;
    margin-bottom: 0;
    border-bottom: 3px solid #000080;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.school-name {
    font-weight: 700;
    font-size: 28px;
    margin-bottom: 5px;
    color: #000080;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.1);
}

/* Card Styles */
.card {
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #dee2e6;
    transition: transform 0.3s ease;
}

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

.card-header {
    font-weight: 600;
    padding: 15px 20px;
    background-color: #f0f0f0;
    border-bottom: 2px solid #138808;
}

/* Form Styles */
.form-label {
    font-weight: 500;
    color: #333;
}

.form-control, .form-select {
    padding: 10px 12px;
    border-radius: 4px;
    border: 1px solid #ced4da;
    background-color: #fff;
    color: #333;
}

.form-control:focus, .form-select:focus {
    border-color: #138808;
    box-shadow: 0 0 0 0.25rem rgba(19, 136, 8, 0.25);
    color: #333;
}

/* Ensure text color in all inputs and sections */
input, select, textarea, option, .table td, .table th, p, label, h1, h2, h3, h4, h5, h6, 
.card-body, .card-text, .card-title, .modal-body, .modal-title, .dropdown-item, 
.list-group-item, .nav-link, .form-text, .form-check-label {
    color: #333 !important;
}

#totalAmount, .fee-amount, .amount-display {
    color: #000080 !important;
    font-weight: 600;
}

/* Button Styles */
.btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #000080;
    border-color: #000080;
}

.btn-success {
    background-color: #138808;
    border-color: #138808;
}

/* Tab Styles */
.nav-tabs {
    border-bottom: 2px solid #138808;
    margin-bottom: 20px;
    background-color: #f0f0f0;
    border-radius: 5px 5px 0 0;
    overflow: hidden;
}

.nav-tabs .nav-link {
    margin-bottom: -2px;
    border: none;
    color: #495057;
    font-weight: 500;
    padding: 12px 20px;
    border-radius: 0;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    background-color: #e9ecef;
    color: #000080;
}

.nav-tabs .nav-link.active {
    color: white;
    background-color: #138808;
    border-color: transparent;
}

/* Table Styles */
.table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.table th {
    background-color: #000080;
    color: white !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    padding: 12px 15px;
}

.table td {
    color: #333 !important;
    font-weight: 400;
    padding: 10px 15px;
}

/* Make sure input values are visible with good contrast */
input, select, textarea {
    color: #333 !important;
    background-color: #fff !important;
}

/* Fix for fee display amounts */
.fee-item input[type="number"], 
.fee-item .amount-display,
#totalAmount {
    color: #000080 !important;
    font-weight: 600;
    background-color: #fff !important;
}

/* Fix for fee collection items */
.fee-item {
    background-color: #f8f9fa !important;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px !important;
    border: 1px solid #dee2e6;
}

.fee-item .form-check-label {
    color: #333 !important;
    font-weight: 500;
}

.fee-checkbox {
    border-color: #000080;
}

#regularFeeList, #packageFeeList {
    background-color: #fff !important;
    padding: 15px;
    border-radius: 5px;
}

/* Dashboard Styles */
.dashboard-stats {
    margin-bottom: 30px;
}

.stat-card {
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: 100%;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card .stat-icon {
    font-size: 36px;
    margin-bottom: 15px;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-card .stat-label {
    font-size: 16px;
    opacity: 0.8;
}

/* Chart Styles */
.chart-container {
    height: 300px;
    margin-bottom: 30px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar-nav {
        display: block;
    }
    
    .navbar-nav .nav-item {
        text-align: left;
    }
    
    .stat-card {
        margin-bottom: 15px;
    }
    
    .chart-container {
        height: 250px;
    }
}

/* Login Form Styles */
.login-form {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
}

.login-form h3 {
    text-align: center;
    margin-bottom: 25px;
    color: #000080;
}

.login-form .btn {
    width: 100%;
    padding: 12px;
    font-size: 18px;
}

/* Loader Styles */
.loader {
    border: 5px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 5px solid var(--bs-primary);
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Receipt Styles */
.receipt {
    padding: 20px;
    background-color: white;
    color: black;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.receipt-header {
    text-align: center;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.receipt-school-logo {
    max-height: 80px;
    margin-bottom: 10px;
}

.receipt-school-name {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.receipt-school-address {
    font-size: 14px;
    margin-bottom: 5px;
}

.receipt-title {
    font-size: 20px;
    font-weight: bold;
    margin: 15px 0;
    text-align: center;
}

.receipt-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.receipt-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.receipt-table th, .receipt-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.receipt-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.receipt-total {
    text-align: right;
    font-weight: bold;
    font-size: 18px;
    margin-top: 20px;
}

.receipt-footer {
    margin-top: 30px;
    text-align: center;
    font-size: 14px;
    border-top: 1px solid #ddd;
    padding-top: 10px;
}

.receipt-signature {
    margin-top: 50px;
    display: flex;
    justify-content: space-between;
}

.receipt-signature div {
    text-align: center;
}

@media print {
    body {
        background-color: white;
    }
    
    .receipt {
        box-shadow: none;
        width: 100%;
        max-width: 100%;
    }
    
    .no-print {
        display: none !important;
    }
    
    @page {
        size: A4;
        margin: 0.5cm;
    }
}