/* School Fee Management System - Custom CSS */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #1f2937;
    --light-color: #f3f4f6;
    --border-color: #e5e7eb;
    --text-color: #374151;
    --text-light: #6b7280;
    --white: #ffffff;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
}

.login-box h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 24px;
}

.login-box h2 {
    text-align: center;
    color: var(--dark-color);
    margin-bottom: 30px;
    font-size: 20px;
}

.login-info {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    color: var(--text-light);
}

/* Navigation */
.navbar {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 15px 0;
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.nav-brand a {
    color: var(--white);
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

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

.nav-link-danger {
    color: #fca5a5;
}

.nav-user {
    color: var(--white);
    font-size: 14px;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Container */
.container {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
}

/* Updated for sidebar layout */
.dashboard-body .main-content .container {
    background: var(--white);
    padding: 20px 10px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
}

.page-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.page-header h1 {
    color: var(--dark-color);
    margin-bottom: 5px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    width: 100%;
}

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

.btn-secondary {
    background-color: var(--text-light);
    color: var(--white);
}

.btn-success {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-danger {
    background-color: var(--danger-color);
    color: var(--white);
}

.btn-warning {
    background-color: var(--warning-color);
    color: var(--white);
}

.btn-info {
    background-color: var(--info-color);
    color: var(--white);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

.form-group label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 500;
    font-size: 14px;
    width: 100%;
    word-wrap: break-word;
}

.form-group label i {
    margin-right: 8px;
    color: var(--primary-color);
    width: 18px;
    font-size: 16px;
    flex-shrink: 0;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    background: var(--white);
    color: var(--text-color);
    box-sizing: border-box;
    font-family: inherit;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--primary-color);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23374151' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    line-height: 1.5;
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-light);
    font-style: italic;
}

.form-group small i {
    margin-right: 4px;
    color: var(--info-color);
}

.form-display-value {
    padding: 12px 14px;
    background: linear-gradient(135deg, var(--light-color) 0%, #f1f5f9 100%);
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--dark-color);
    border: 2px solid var(--border-color);
    min-height: 44px;
    display: flex;
    align-items: center;
    transition: all 0.3s;
}

.form-display-value:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.form-row .form-group {
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .dashboard-header > div:first-child {
        width: 100%;
    }
    
    .header-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    
    .header-actions .btn {
        flex: 1;
        min-width: 140px;
        justify-content: center;
    }
}

/* Alerts */
.alert {
    padding: 15px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.alert i {
    font-size: 18px;
    flex-shrink: 0;
}

.alert-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #fcd34d;
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    font-size: 48px;
    opacity: 0.9;
}

.stat-content h3 {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 5px;
    font-weight: normal;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 5px;
}

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

/* Tables */
.table-container {
    overflow-x: auto;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    table-layout: auto;
}

.data-table th,
.data-table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.data-table td:last-child,
.data-table th:last-child {
    white-space: normal;
    max-width: none;
}

.data-table thead {
    background-color: var(--light-color);
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    font-weight: 600;
    color: var(--dark-color);
}

.data-table tbody tr:hover {
    background-color: var(--light-color);
}

/* Department Totals Summary Labels */
.department-totals-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    border: 2px solid var(--border-color);
}

.total-label-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 4px solid;
}

.total-label-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.total-label-card.total-collected {
    border-left-color: var(--secondary-color);
}

.total-label-card.total-outstanding {
    border-left-color: var(--warning-color);
}

.total-label-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--white);
    flex-shrink: 0;
}

.total-label-card.total-collected .total-label-icon {
    background: linear-gradient(135deg, var(--secondary-color), #059669);
}

.total-label-card.total-outstanding .total-label-icon {
    background: linear-gradient(135deg, var(--warning-color), #d97706);
}

.total-label-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.total-label-title {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.total-label-value {
    font-size: 28px;
    font-weight: bold;
    color: var(--dark-color);
    line-height: 1;
}

/* Dashboard Section */
.dashboard-section {
    margin-top: 30px;
}

.dashboard-section h2 {
    color: var(--dark-color);
    margin-bottom: 20px;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.action-btn {
    background: var(--white);
    padding: 25px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-color);
    border: 2px solid var(--border-color);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.action-btn:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

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

.action-icon {
    font-size: 36px;
}

.action-text {
    font-weight: 500;
}

/* Cards */
.card {
    background: var(--white);
    padding: 20px 10px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.card-header {
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    color: var(--dark-color);
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: var(--white);
    text-align: center;
    padding: 20px;
    margin-top: 50px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
    }

    .nav-link {
        text-align: center;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 20px;
    }
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-paid {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-unpaid {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-partial {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-advance {
    background-color: #dbeafe;
    color: #1e40af;
}

/* Search and Filter */
.search-filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-filter-bar input,
.search-filter-bar select {
    flex: 1;
    min-width: 200px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

/* Page Header with Actions */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 0 0 15px 0;
    border-bottom: 2px solid var(--border-color);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap;
    gap: 15px;
    position: relative;
}

.dashboard-header > div:first-child {
    flex: 1;
    min-width: 0;
}

.dashboard-header h1 {
    margin: 0;
    font-size: 28px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    word-wrap: break-word;
    line-height: 1.3;
}

.dashboard-header p {
    margin: 8px 0 0 0;
    color: var(--text-light);
    font-size: 15px;
    font-weight: 400;
    word-wrap: break-word;
}

.header-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
}

.header-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    white-space: nowrap;
    width: auto;
    text-decoration: none;
    flex-shrink: 0;
}

.header-actions .btn i {
    font-size: 14px;
}

.header-actions .btn-secondary {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.3);
}

.header-actions .btn-secondary:hover {
    background: linear-gradient(135deg, #4b5563, #6b7280);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.4);
}

/* Student Count Badge */
.student-count {
    background: var(--light-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
}

/* Enhanced Table Styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    table-layout: auto;
    font-size: 14px;
    min-width: 100%;
}

.data-table thead {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table th {
    font-weight: 600;
    color: var(--dark-color);
    padding: 14px 12px;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.data-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    white-space: nowrap;
}

.data-table td:last-child,
.data-table th:last-child {
    white-space: normal;
}

.data-table tbody tr {
    transition: background-color 0.2s;
}

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

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Empty State */
.data-table tbody tr td[colspan] {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
    font-style: italic;
}

.data-table tbody tr td[colspan]:before {
    content: "📋 ";
    font-size: 24px;
    display: block;
    margin-bottom: 10px;
}

/* File Input Styling */
.file-input-wrapper {
    position: relative;
    margin-top: 8px;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.file-input-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--info-color), #2563eb);
    color: var(--white);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.file-input-label:hover {
    background: linear-gradient(135deg, #2563eb, var(--info-color));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.file-input-label i {
    font-size: 18px;
}

/* Info Box Styling */
.info-box {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 4px solid var(--info-color);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.info-box code {
    background: rgba(59, 130, 246, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--primary-dark);
    font-weight: 600;
}

/* Code Block Styling */
.code-block {
    background: var(--white);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-color);
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Example Section */
.example-section {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.example-section h4 {
    margin: 0 0 15px 0;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Student Profile Info Display */
.info-display {
    margin: 8px 0 0 0;
    padding: 12px 15px;
    background: var(--light-color);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    font-size: 15px;
    color: var(--text-color);
    min-height: 24px;
    display: block;
    width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-weight: 500;
}

.info-display.fee-highlight {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    font-size: 20px;
    font-weight: 700;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

.form-group label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 500;
    font-size: 14px;
    width: 100%;
    word-wrap: break-word;
}

.form-group label i {
    margin-right: 8px;
    color: var(--primary-color);
    width: 18px;
    font-size: 16px;
    flex-shrink: 0;
}

/* Enhanced Badge Styles */
.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-paid {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.badge-unpaid {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.badge-partial {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #fcd34d;
}

.badge-advance {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Button Styles Enhancement */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    text-align: center;
    white-space: nowrap;
}

.btn i {
    font-size: 14px;
}

.btn-success {
    background: linear-gradient(135deg, var(--secondary-color), #059669);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669, var(--secondary-color));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, var(--info-color), #2563eb);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-info:hover {
    background: linear-gradient(135deg, #2563eb, var(--info-color));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    text-decoration: none;
    color: var(--text-color);
}

.pagination a:hover {
    background-color: var(--light-color);
}

.pagination .active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* ============================================
   MODERN SIDEBAR NAVIGATION STYLES
   ============================================ */

.dashboard-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top Navigation Bar */
.top-navbar {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    color: var(--white);
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 70px;
}

.top-nav-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    gap: 20px;
}

.sidebar-toggle {
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    border-radius: 5px;
    transition: background 0.3s;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.top-nav-brand {
    margin-right: auto;
}

.top-nav-brand a {
    color: var(--white);
    text-decoration: none;
    font-size: 22px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    text-align: left;
}

.top-nav-brand i {
    font-size: 28px;
}

.top-nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
    flex-shrink: 0;
}

.nav-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.nav-user-info i {
    font-size: 32px;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    opacity: 0.9;
}

.logout-btn {
    color: var(--white);
    font-size: 20px;
    padding: 10px;
    border-radius: 5px;
    transition: background 0.3s;
    text-decoration: none;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    left: 0;
    top: 70px;
    width: 260px;
    height: calc(100vh - 70px);
    background: var(--white);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    z-index: 999;
    overflow-y: auto;
}

.sidebar.collapsed {
    transform: translateX(-260px);
}

.sidebar-content {
    padding: 20px 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0 10px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s;
    font-weight: 500;
}

.sidebar-item i {
    font-size: 20px;
    width: 24px;
    text-align: center;
    color: var(--text-light);
}

.sidebar-item:hover {
    background: var(--light-color);
    color: var(--primary-color);
}

.sidebar-item:hover i {
    color: var(--primary-color);
}

.sidebar-item.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.sidebar-item.active i {
    color: var(--white);
}

/* Main Wrapper */
.main-wrapper {
    margin-left: 260px;
    margin-top: 70px;
    transition: margin-left 0.3s ease;
    min-height: calc(100vh - 70px);
    background: var(--light-color);
    width: calc(100% - 260px);
    box-sizing: border-box;
    overflow-x: hidden;
    position: relative;
}

.main-wrapper.sidebar-collapsed {
    margin-left: 0;
    width: 100%;
}

/* Main content for sidebar layout */
.dashboard-body .main-content {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 15px 5px;
    box-sizing: border-box;
    min-height: calc(100vh - 70px);
    position: relative;
    overflow-x: hidden;
}

/* Ensure dashboard-header and cards are properly contained */
.main-content > .dashboard-header,
.main-content > .dashboard-card,
.main-content > .filter-bar {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
}

/* Fix layout for pages with multiple sections */
.main-content > div {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
}

/* Enhanced Dashboard Styles */

/* Filter Bar */
.filter-bar {
    background: var(--white);
    padding: 18px 22px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
    width: 100%;
    box-sizing: border-box;
}

.filter-form-compact {
    margin: 0;
    padding: 0;
}

.filter-items {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--light-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    flex: 0 1 auto;
    min-width: 160px;
}

@media (min-width: 992px) {
    .filter-item {
        min-width: 180px;
    }
}

@media (min-width: 1200px) {
    .filter-item {
        min-width: 200px;
    }
}

.filter-item:hover {
    background: #e5e7eb;
    border-color: var(--primary-color);
}

.filter-item i {
    color: var(--primary-color);
    font-size: 16px;
    flex-shrink: 0;
}

.filter-item select,
.filter-item input[type="text"] {
    border: none;
    background: transparent;
    padding: 6px 0;
    font-size: 14px;
    color: var(--dark-color);
    cursor: pointer;
    outline: none;
    min-width: 140px;
    width: 100%;
    flex: 1;
    font-weight: 500;
}

.filter-item input[type="text"] {
    cursor: text;
    min-width: 140px;
}

.filter-item input[type="text"]::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

.filter-item select option {
    padding: 8px;
}

.filter-item select:focus {
    outline: none;
}

.filter-reset-btn {
    background: var(--light-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    width: auto;
    min-width: 42px;
    height: 42px;
    flex-shrink: 0;
}

.filter-reset-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    transform: rotate(180deg);
}

/* Stats Labels Grid - All Statistics Visible */
.stats-labels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-bottom: 30px;
}

.stat-label-item {
    background: var(--white);
    padding: 18px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid;
    cursor: default;
}

.stat-label-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.stat-label-item.primary {
    border-left-color: var(--primary-color);
}

.stat-label-item.success {
    border-left-color: var(--secondary-color);
}

.stat-label-item.warning {
    border-left-color: var(--warning-color);
}

.stat-label-item.danger {
    border-left-color: var(--danger-color);
}

.stat-label-item.info {
    border-left-color: var(--info-color);
}

.stat-label-item.secondary {
    border-left-color: #8b5cf6;
}

.stat-label-item.expense {
    border-left-color: #f97316;
}

.stat-label-item.salary {
    border-left-color: #06b6d4;
}

.stat-label-item.salary-paid {
    border-left-color: #14b8a6;
}

.stat-label-icon {
    width: 55px;
    height: 55px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--white);
    flex-shrink: 0;
}

.stat-label-item.primary .stat-label-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.stat-label-item.success .stat-label-icon {
    background: linear-gradient(135deg, var(--secondary-color), #059669);
}

.stat-label-item.warning .stat-label-icon {
    background: linear-gradient(135deg, var(--warning-color), #d97706);
}

.stat-label-item.danger .stat-label-icon {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
}

.stat-label-item.info .stat-label-icon {
    background: linear-gradient(135deg, var(--info-color), #2563eb);
}

.stat-label-item.secondary .stat-label-icon {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.stat-label-item.expense .stat-label-icon {
    background: linear-gradient(135deg, #f97316, #ea580c);
}

.stat-label-item.salary .stat-label-icon {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.stat-label-item.salary-paid .stat-label-icon {
    background: linear-gradient(135deg, #14b8a6, #0d9488);
}

.stat-label-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-label-name {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

.stat-label-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--dark-color);
    line-height: 1.2;
}

.stat-label-period {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.3;
}

/* Dashboard Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
    width: 100%;
    box-sizing: border-box;
}

/* Full Width Layout for Charts */
.dashboard-grid.full-width {
    grid-template-columns: 1fr;
}

.dashboard-grid.two-column {
    grid-template-columns: 2fr 1fr;
}

@media (max-width: 1200px) {
    .dashboard-grid.two-column {
        grid-template-columns: 1fr;
    }
}

/* Enhanced Stat Cards */
.stat-card {
    background: var(--white);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 4px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.stat-card.primary {
    border-left-color: var(--primary-color);
}

.stat-card.primary .stat-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

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

.stat-card.success .stat-icon {
    background: linear-gradient(135deg, var(--secondary-color), #059669);
}

.stat-card.warning {
    border-left-color: var(--warning-color);
}

.stat-card.warning .stat-icon {
    background: linear-gradient(135deg, var(--warning-color), #d97706);
}

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

.stat-card.danger .stat-icon {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--white);
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-content h3 {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: var(--dark-color);
    margin-bottom: 5px;
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--text-light);
}

/* Dashboard Cards */
.dashboard-card {
    background: var(--white);
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Add padding to dashboard card content (except header and table-container) */
.dashboard-card > form,
.dashboard-card > div:not(.dashboard-card-header):not(.table-container) {
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Ensure table-container doesn't have extra padding */
.dashboard-card .table-container {
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
}

.dashboard-card .table-container table {
    width: 100%;
    min-width: 800px;
}

.dashboard-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 2px solid var(--border-color);
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.dashboard-card-header h2 {
    color: var(--dark-color);
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    margin: 0;
}

.dashboard-card-header h2 i {
    color: var(--primary-color);
    font-size: 18px;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 350px;
    margin-top: 20px;
}

.chart-container-small {
    position: relative;
    height: 250px;
    margin-top: 20px;
}

/* Latest Activities/Transactions */
.latest-activities {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    background: var(--light-color);
    transition: all 0.3s;
}

.activity-item:hover {
    background: #e5e7eb;
    transform: translateX(5px);
}

.activity-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--white);
    flex-shrink: 0;
}

.activity-icon.payment {
    background: linear-gradient(135deg, var(--secondary-color), #059669);
}

.activity-icon.expense {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
}

.activity-icon.user {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.activity-icon.student {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 3px;
    font-size: 15px;
}

.activity-details {
    font-size: 13px;
    color: var(--text-light);
}

.activity-time {
    font-size: 12px;
    color: var(--text-light);
    white-space: nowrap;
}

/* Responsive Design for Sidebar */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-260px);
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-wrapper {
        margin-left: 0;
        width: 100%;
    }
    
    .main-wrapper.sidebar-collapsed {
        margin-left: 0;
        width: 100%;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid.two-column {
        grid-template-columns: 1fr;
    }
    
    .stats-labels-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-items {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-item {
        width: 100%;
    }
    
    .filter-item select {
        flex: 1;
        min-width: auto;
    }
    
    .filter-reset-btn {
        width: 100%;
    }
    
    .user-details {
        display: none;
    }
    
    .main-content {
        padding: 20px 15px;
    }
    
    .dashboard-card > form,
    .dashboard-card > div:not(.dashboard-card-header):not(.table-container) {
        padding: 20px 15px;
    }
    
    .dashboard-card-header {
        padding: 15px 20px;
    }
    
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table {
        min-width: 600px;
    }
    
    .stat-label-item {
        padding: 15px;
    }
    
    .stat-label-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .stat-label-value {
        font-size: 22px;
    }
}

/* Ensure proper width calculations */
@media (max-width: 1400px) {
    .main-content {
        padding: 25px 15px;
    }
}

@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
    
    .stat-value {
        font-size: 26px;
    }
}

/* Student Profile Page - Responsive Styles */
/* Use standard container - no custom class needed */

.btn-text {
    margin-left: 5px;
}

.btn-text-sm {
    margin-left: 4px;
}

/* Form Rows - Responsive Grid (for Student Profile) */
.container .form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    align-items: start;
}

.container .form-row .form-group {
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    margin-bottom: 20px;
}

/* Single column form-group in form-row */
.container .form-row-single {
    grid-template-columns: 1fr;
}

.container .form-row-single .form-group {
    max-width: 100%;
}

.container .form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 500;
    font-size: 14px;
    width: 100%;
}

/* Table alignment classes */
.text-left {
    text-align: left;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.actions-cell {
    white-space: nowrap;
    width: 1%;
    text-align: center;
}

@media (max-width: 992px) {
    .actions-cell {
        white-space: normal;
        width: auto;
    }
}

.action-buttons {
    display: flex !important;
    gap: 6px;
    flex-wrap: nowrap !important;
    justify-content: center;
    align-items: center;
    flex-direction: row !important;
    width: auto;
}

.action-buttons .btn {
    white-space: nowrap;
    flex-shrink: 0;
    width: auto;
}

/* Payment Details */
.payment-details-row td {
    padding: 0;
}

.payment-details-container {
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    margin: 10px 0;
}

.payment-details-title {
    margin: 0 0 15px 0;
    color: var(--dark-color);
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.payment-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.payment-table {
    width: 100%;
    min-width: 600px;
    background: var(--white);
    border-radius: 6px;
}

.payment-table th,
.payment-table td {
    padding: 10px 8px;
    font-size: 13px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-body .main-content {
        padding: 15px 5px;
    }
    
    .dashboard-body .main-content .container {
        padding: 18px 8px;
    }
    
    .container .card > div:not(.card-header) {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .dashboard-body .main-content {
        padding: 15px 3px;
    }
    
    .dashboard-body .main-content .container {
        padding: 15px 8px;
    }
    
    .container .page-header > div {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .container .page-header h1 {
        font-size: 20px;
    }
    
    .container .page-header > div > div:last-child {
        width: 100%;
    }
    
    .container .page-header > div > div:last-child .btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
    
    .container .card > div:not(.card-header) {
        padding: 15px;
    }
    
    .container .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .container .form-row .form-group {
        margin-bottom: 15px;
    }
    
    .container .table-container {
        margin: 0 -5px;
    }
    
    .container .data-table {
        min-width: 650px;
        font-size: 13px;
    }
    
    .container .data-table th,
    .container .data-table td {
        padding: 10px 6px;
    }
    
    .action-buttons {
        flex-direction: row;
        width: 100%;
        gap: 6px;
        flex-wrap: nowrap;
    }
    
    .action-buttons .btn {
        flex: 0 1 auto;
        min-width: 0;
        justify-content: center;
        padding: 6px 8px;
    }
    
    .action-buttons .btn .btn-text-sm {
        display: none;
    }
    
    .payment-details-container {
        padding: 15px;
    }
    
    .payment-table {
        min-width: 500px;
    }
}

@media (max-width: 480px) {
    .dashboard-body .main-content {
        padding: 12px 2px;
    }
    
    .dashboard-body .main-content .container {
        padding: 12px 6px;
    }
    
    .container .page-header h1 {
        font-size: 18px;
    }
    
    .container .page-header > div > div:last-child {
        flex-direction: column;
        width: 100%;
    }
    
    .container .page-header > div > div:last-child .btn {
        width: 100%;
        font-size: 13px;
        padding: 8px 12px;
        justify-content: center;
    }
    
    .btn-text {
        display: none;
    }
    
    .btn-text-sm {
        display: none;
    }
    
    .container .card > div:not(.card-header) {
        padding: 12px;
    }
    
    .container .form-row {
        gap: 12px;
    }
    
    .info-display {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .info-display.fee-highlight {
        font-size: 18px;
    }
    
    .container .table-container {
        margin: 0 -2px;
    }
    
    .container .data-table {
        min-width: 600px;
        font-size: 12px;
    }
    
    .container .data-table th,
    .container .data-table td {
        padding: 8px 4px;
    }
    
    .action-buttons .btn {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .payment-details-container {
        padding: 12px;
    }
    
    .payment-table-wrapper {
        margin: 0 -2px;
    }
    
    .payment-table {
        min-width: 450px;
        font-size: 12px;
    }
    
    .payment-table th,
    .payment-table td {
        padding: 8px 6px;
    }
}

/* Student Profile Modal */
.student-profile-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}

.modal-content {
    position: relative;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 2001;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid var(--border-color);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
}

.modal-header h2 i {
    font-size: 22px;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
    box-sizing: border-box;
}

.modal-body .dashboard-card {
    margin-bottom: 20px;
}

.modal-body .dashboard-card:last-child {
    margin-bottom: 0;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px 25px;
    border-top: 2px solid var(--border-color);
    background: var(--light-color);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.modal-footer .btn {
    min-width: 120px;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .student-profile-modal {
        padding: 10px;
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-header h2 {
        font-size: 20px;
    }
    
    .modal-body {
        padding: 15px;
        max-height: calc(95vh - 70px);
    }
}

@media (max-width: 480px) {
    .modal-content {
        max-width: 100%;
        border-radius: 0;
        max-height: 100vh;
    }
    
    .modal-header {
        padding: 12px 15px;
    }
    
    .modal-header h2 {
        font-size: 18px;
    }
    
    .modal-body {
        padding: 12px;
        max-height: calc(100vh - 60px);
    }
}

/* ============================================
   COMPREHENSIVE RESPONSIVE DESIGN ENHANCEMENTS
   ============================================ */

/* Top Navbar - Mobile Responsive */
@media (max-width: 768px) {
    .top-navbar {
        height: 60px;
    }
    
    .top-nav-container {
        padding: 0 15px;
    }
    
    .sidebar-toggle {
        font-size: 20px;
        padding: 8px;
    }
    
    .top-nav-brand a {
        font-size: 16px;
    }
    
    .top-nav-brand span {
        display: none; /* Hide full name on mobile, show only icon */
    }
    
    .top-nav-brand i {
        font-size: 24px;
    }
    
    .nav-user-info {
        padding: 6px 10px;
        gap: 8px;
    }
    
    .nav-user-info i {
        font-size: 24px;
    }
    
    .user-details {
        display: none; /* Hide user details on mobile */
    }
    
    .logout-btn {
        font-size: 18px;
        padding: 8px;
    }
}

/* Sidebar - Enhanced Mobile */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        max-width: 280px;
        z-index: 1001;
        box-shadow: 2px 0 15px rgba(0, 0, 0, 0.3);
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .sidebar:not(.mobile-open) {
        transform: translateX(-100%);
    }
    
    /* Add overlay when sidebar is open on mobile */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        display: none;
        transition: opacity 0.3s ease;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
}

/* Dashboard Header - Responsive */
@media (max-width: 992px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .dashboard-header h1 {
        font-size: 24px;
    }
    
    .header-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .dashboard-header h1 {
        font-size: 20px;
    }
    
    .dashboard-header p {
        font-size: 13px;
    }
    
    .header-actions {
        gap: 8px;
    }
    
    .header-actions .btn {
        padding: 8px 14px;
        font-size: 13px;
        flex: 1;
        min-width: 0;
    }
    
    .header-actions .btn i {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .dashboard-header h1 {
        font-size: 18px;
    }
    
    .header-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .header-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Search Filter Bar - Responsive */
@media (max-width: 992px) {
    .filter-items {
        gap: 10px;
    }
    
    .filter-item {
        min-width: 160px;
        flex: 1 1 auto;
    }
}

@media (max-width: 768px) {
    .search-filter-bar {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-filter-bar input,
    .search-filter-bar select {
        width: 100%;
        min-width: 0;
    }
    
    .filter-bar {
        padding: 15px;
    }
    
    .filter-items {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .filter-item {
        width: 100% !important;
        min-width: 0 !important;
        flex: 1 1 100% !important;
        flex-direction: row;
        justify-content: space-between;
        padding: 12px 14px;
    }
    
    .filter-item i {
        flex-shrink: 0;
    }
    
    .filter-item select,
    .filter-item input[type="text"] {
        flex: 1;
        min-width: 0;
        width: 100%;
    }
    
    .filter-reset-btn {
        width: 100%;
        justify-content: center;
        height: auto;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .filter-bar {
        padding: 12px;
    }
    
    .filter-item {
        padding: 10px 12px;
    }
    
    .filter-item select,
    .filter-item input[type="text"] {
        font-size: 13px;
    }
}

/* Dashboard Cards - Responsive */
@media (max-width: 768px) {
    .dashboard-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .dashboard-card-header h2 {
        font-size: 18px;
    }
}

/* Stats Grid - Responsive */
@media (max-width: 992px) {
    .stats-labels-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .stats-labels-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-label-item {
        padding: 15px;
    }
    
    .stat-label-icon {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
    
    .stat-label-value {
        font-size: 20px;
    }
}

/* Charts - Responsive */
@media (max-width: 768px) {
    .chart-container {
        height: 250px;
    }
    
    .chart-container-small {
        height: 200px;
    }
}

/* Forms - Enhanced Responsive */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .form-group label i {
        font-size: 14px;
        width: 16px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 14px;
        padding: 10px 12px;
        border-width: 2px;
    }
    
    .form-display-value {
        padding: 10px 12px;
        font-size: 13px;
        min-height: 42px;
    }
    
    .form-group small {
        font-size: 11px;
        margin-top: 5px;
    }
}

@media (max-width: 480px) {
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-group label {
        font-size: 12px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 13px;
        padding: 9px 11px;
    }
    
    .form-display-value {
        padding: 9px 11px;
        font-size: 12px;
        min-height: 40px;
    }
}

/* Buttons - Responsive */
@media (max-width: 768px) {
    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .btn-sm {
        padding: 6px 12px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }
    
    .btn-text,
    .btn-text-sm {
        display: none;
    }
}

/* Tables - Enhanced Responsive */
@media (max-width: 992px) {
    .table-container {
        margin: 0 -10px;
        padding: 0 10px;
    }
}

@media (max-width: 768px) {
    .data-table {
        font-size: 12px;
        min-width: 700px;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }
    
    .data-table th {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .data-table {
        font-size: 11px;
        min-width: 600px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 6px;
    }
    
    .badge {
        font-size: 10px;
        padding: 4px 8px;
    }
}

/* Action Buttons in Tables - Responsive */
@media (max-width: 992px) {
    .data-table .action-buttons {
        flex-wrap: nowrap;
        gap: 5px;
    }
    
    .data-table .action-buttons .btn {
        flex: 0 1 auto;
        min-width: 70px;
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .data-table .action-buttons .btn .btn-text-sm {
        display: none;
    }
}

@media (max-width: 768px) {
    .action-buttons {
        flex-direction: row;
        width: 100%;
        gap: 5px;
        flex-wrap: nowrap;
        justify-content: center;
    }
    
    .action-buttons .btn {
        flex: 0 1 auto;
        min-width: 60px;
        padding: 6px 8px;
        font-size: 11px;
        justify-content: center;
    }
    
    .action-buttons .btn .btn-text-sm {
        display: none;
    }
}

@media (max-width: 480px) {
    .action-buttons {
        flex-direction: row;
        gap: 4px;
        width: auto;
        flex-wrap: nowrap;
    }
    
    .action-buttons .btn {
        flex: 0 1 auto;
        padding: 6px 8px;
        font-size: 11px;
        min-width: 50px;
    }
    
    .action-buttons .btn .btn-text-sm {
        display: none;
    }
}

/* Login Page - Responsive */
@media (max-width: 480px) {
    .login-container {
        padding: 15px;
    }
    
    .login-box {
        padding: 30px 20px;
    }
    
    .login-box h1 {
        font-size: 20px;
    }
    
    .login-box h2 {
        font-size: 18px;
    }
}

/* Reports Page - Responsive */
@media (max-width: 768px) {
    .report-type-card {
        padding: 20px;
    }
    
    .report-type-icon {
        width: 60px;
        height: 60px;
    }
    
    .report-type-icon i {
        font-size: 24px;
    }
    
    .report-type-name {
        font-size: 14px;
    }
}

/* Settings Page - Responsive */
@media (max-width: 768px) {
    .logo-preview-circle {
        width: 120px;
        height: 120px;
    }
    
    .branding-preview {
        padding: 20px;
    }
    
    .branding-header-preview {
        padding: 20px;
    }
}

/* Invoice Page - Responsive */
@media (max-width: 768px) {
    .invoice-container {
        padding: 20px;
    }
    
    .invoice-header {
        margin-bottom: 30px;
    }
    
    .invoice-info {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .school-logo-circle {
        width: 80px;
        height: 80px;
    }
    
    .invoice-header h1 {
        font-size: 20px;
    }
    
    .invoice-header h2 {
        font-size: 18px;
    }
}

/* Payment Modal - Responsive */
@media (max-width: 768px) {
    .modal-content {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
}

/* Filter Bar - Responsive */
@media (max-width: 768px) {
    .filter-bar {
        padding: 15px;
    }
}

/* Activity Items - Responsive */
@media (max-width: 768px) {
    .activity-item {
        padding: 12px;
    }
    
    .activity-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .activity-title {
        font-size: 14px;
    }
    
    .activity-details {
        font-size: 12px;
    }
}

/* Utility Classes for Responsive */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .show-mobile {
        display: none !important;
    }
}

/* Print Styles - Responsive */
@media print {
    .sidebar,
    .top-navbar,
    .header-actions,
    .filter-bar,
    .btn,
    .sidebar-toggle,
    .logout-btn {
        display: none !important;
    }
    
    .main-wrapper {
        margin-left: 0 !important;
        margin-top: 0 !important;
        width: 100% !important;
    }
    
    .main-content {
        padding: 0 !important;
    }
    
    .dashboard-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    .data-table {
        min-width: 100% !important;
        font-size: 10pt !important;
    }
    
    .data-table th,
    .data-table td {
        padding: 6px 4px !important;
    }
}

