body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f9;
    margin: 0;
    display: flex;
}
.sidebar {
    width: 250px;
    background-color: #343a40;
    color: #fff;
    padding: 15px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
}
.sidebar h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #fff;
}
.user-info {
    margin-bottom: 20px;
    color: white;
}
.user-info p {
    margin: 0;
    font-size: 14px;
    color: white;
}
.campus-info {
font-size: 20px; /* Increase the font size */
font-weight: bold; /* Make it bold */
color: #007bff; /* You can adjust the color to match the design */
margin-top: 10px; /* Adjust the margin as needed */
}
.sidebar-menu {
    list-style-type: none;
    padding: 0;
}
.sidebar-menu li {
    margin-bottom: 10px;
}
.sidebar-menu li a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    display: block;
    padding: 10px;
    border-radius: 5px;
}
.sidebar-menu li a:hover, .sidebar-menu li a.active {
    background: linear-gradient(135deg, #FFD700, #FFA500); /* Yellow to Orange gradient */
    color: #000; /* Black text for better contrast */
}
.sidebar-menu li a.active {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
}
.sidebar-menu li a {
    transition: all 0.3s ease;
}
.submenu {
    padding-left: 20px;
}
.submenu li a {
    font-size: 14px;
}
.content {
margin-left: 270px;
padding: 20px;
width: calc(100% - 290px);
box-sizing: border-box;
}

/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
    body {
        overflow-x: hidden !important;
    }
    
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 280px !important;
        height: 100vh !important;
        transform: translateX(-100%) !important;
        transition: transform 0.3s ease !important;
        z-index: 9998 !important;
        overflow-y: auto !important;
    }
    
    .sidebar.open {
        transform: translateX(0) !important;
    }
    
    .content {
        margin-left: 0 !important;
        padding: 80px 15px 20px 15px !important;
        width: 100% !important;
    }
    
    .summary-cards {
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    .card, .total-fees-card {
        min-width: 100% !important;
        width: 100% !important;
        margin: 0 0 12px 0 !important;
    }
    
    /* Table to Card Conversion */
    table {
        display: block !important;
        width: 100% !important;
    }
    
    thead {
        display: none !important;
    }
    
    tbody {
        display: block !important;
        width: 100% !important;
    }
    
    tr {
        display: block !important;
        margin-bottom: 15px !important;
        background: #fff !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 12px !important;
        padding: 15px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    td {
        display: block !important;
        width: 100% !important;
        padding: 10px 0 !important;
        text-align: left !important;
        border: none !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        position: relative !important;
        padding-left: 40% !important;
    }
    
    td:before {
        content: attr(data-label) !important;
        position: absolute !important;
        left: 0 !important;
        width: 35% !important;
        font-weight: 600 !important;
        color: #475569 !important;
        font-size: 14px !important;
    }
    
    th {
        display: none !important;
    }
    
    .filter-section {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .filter-section select,
    .filter-section input {
        width: 100% !important;
    }
    
    .action-buttons {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .action-buttons .edit-button,
    .action-buttons .details-button {
        width: 100% !important;
        text-align: center !important;
    }
    
    .modal-content {
        width: 95% !important;
        max-width: 500px !important;
        margin: 20px auto !important;
        padding: 20px 15px !important;
    }
    
    .form-group input,
    .form-group select {
        width: 100% !important;
    }
    
    h1 {
        font-size: 24px !important;
    }
    
    .dashboard-container {
        padding: 15px !important;
    }
    
    .header-section {
        padding: 15px !important;
    }
    
    .welcome-container {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }
    
    .welcome-text {
        font-size: 18px !important;
    }
    
    .campus-info {
        font-size: 18px !important;
        text-align: left !important;
    }
}

@media screen and (max-width: 480px) {
    .content {
        padding: 80px 10px 20px 10px !important;
    }
    
    .card, .total-fees-card {
        padding: 20px 15px !important;
    }
    
    .card h3, .total-fees-card h4 {
        font-size: 20px !important;
    }
    
    .card p, .total-fees-card p {
        font-size: 24px !important;
    }
    
    tr {
        padding: 12px !important;
    }
    
    td {
        padding: 8px 0 8px 35% !important;
        font-size: 13px !important;
    }
    
    td:before {
        font-size: 12px !important;
    }
    
    .modal-content {
        width: 98% !important;
        margin: 10px auto !important;
        padding: 15px 12px !important;
    }
}

@media screen and (max-width: 360px) {
    .content {
        padding: 75px 8px 15px 8px !important;
    }
    
    .card, .total-fees-card {
        padding: 16px 12px !important;
    }
    
    .card h3, .total-fees-card h4 {
        font-size: 18px !important;
    }
    
    .card p, .total-fees-card p {
        font-size: 22px !important;
    }
    
    h1 {
        font-size: 20px !important;
    }
    
    tr {
        padding: 10px !important;
    }
    
    td {
        padding: 6px 0 6px 38% !important;
        font-size: 12px !important;
    }
    
    td:before {
        font-size: 11px !important;
        width: 35% !important;
    }
}

.dashboard-container {
max-width: 100%;
background-color: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
margin-bottom: 20px;
}
h1 {
    font-size: 28px;
    color: #333;
    text-align: left;
    margin-bottom: 20px;
}
p {
    font-size: 18px;
    color: #555;
    text-align: left;
    margin: 5px 0;
}
.summary-cards {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    gap: 6px;
    flex-wrap: wrap;
}

/* Base card styles */
.card, .total-fees-card {
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    min-width: 220px;
    
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin: 8px;
    cursor: pointer;
}

/* Content wrapper for title and value */
.card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* Link styles */
.card a, .total-fees-card a {
    color: white !important;
    text-decoration: none;
    font-weight: 400;
    font-size: 16px;
    margin-top: auto;
    padding-top: 15px;
    width: 100%;
    text-align: center;
}

/* Specific card color schemes */
/* Total Students Card */
.card:nth-child(1) {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

/* Total Teachers Card */
.card:nth-child(2) {
    background: linear-gradient(135deg, #2196F3, #1976D2);
}

/* Total Principals Card */
.card:nth-child(3) {
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
}

/* Monthly Admission Fees Card */
.card:nth-child(4) {
    background: linear-gradient(135deg, #e5989b,#e5989b);
}

/* Total Receivable Fee Card */
.card:nth-child(5) {
    background: linear-gradient(135deg, #00BCD4, #0097A7);
}

/* Current Month Received Fee Card */
.card:nth-child(6) {
    background: linear-gradient(135deg, #3F51B5, #303F9F);
}

/* Remaining Fee Card */
.card:nth-child(7) {
    background: linear-gradient(135deg, #ff7f50, #ff7f50);
}

/* Text colors for better contrast */
.card h3, .card p, .card a,
.total-fees-card h3, .total-fees-card p, .total-fees-card a {
    color: white !important;
}

/* Update link styles */
.card a, .total-fees-card a {
    color: white !important;
    text-decoration: none;
    font-weight: 400;
    display: inline-block;
    margin-top: 15px;
    font-size: 16px;
    /* position: absolute; */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 15px;
}

.card a:hover, .total-fees-card a:hover {
    opacity: 0.9;
    transform: none;
    border-bottom: none;
}

/* Keep the card hover effect */
.card:hover, .total-fees-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Shine effect */
.card::before, .total-fees-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s;
}

.card:hover::before, .total-fees-card:hover::before {
    left: 100%;
}

.card h3, .total-fees-card h4 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 15px;
    color: white;
    text-align: center;
}
.card p, .total-fees-card p {
    font-size: 28px;
    font-weight: bold;
    margin: 0;
    color: white;
    text-align: center;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}
th {
    background-color: #f2f2f2;
}
.status-pending { color: orange; }
.status-completed { color: green; }
.status-late { color: red; }
.task-status {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}
.task-status span {
    font-weight: bold;
}
.completed {
    color: green;
}
.incomplete {
    color: red;
}
.filter-section {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.filter-section select,
.filter-section input {
    padding: 10px;
    font-size: 16px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.details-button {
    background-color: #007bff;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    display: inline-block;
    margin: 2px;
}

.details-button:hover {
    background-color: #0056b3;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto; /* Enable vertical scrolling */
    padding: 20px;
}

.modal-content {
    background-color: #fff;
    margin: 20px auto; 
    padding: 20px;
    border-radius: 8px;
  
    position: relative;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    max-height: 90vh; 
    overflow-y: auto; 
}

/* Add smooth scrollbar for the modal content */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Ensure the close button stays visible */
.close-modal {
    position: sticky;
    top: 10px;
    float: right;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    z-index: 1001;
}

/* Add some padding at the bottom of the form for better scrolling */
form {
    padding-bottom: 20px;
}

/* Copy the form styles from add_student_fee.php */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input, .form-group select {
    width: 90%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 16px;
}

.suggestions-box {
    display: none;
    position: absolute;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ccc;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.suggestion-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.total-fees-card {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    min-height: 150px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.total-fees-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.total-fees-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s;
}

.total-fees-card:hover::before {
    left: 100%;
}

.total-fees-card h4 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #000;
}

.total-fees-card p {
    font-size: 32px;
    font-weight: bold;
    color: #000;
}

/* Add these styles to your existing CSS */
.header-section {
    position: sticky;
    top: 0;
    z-index: 1000;
    /* background-color: #f4f6f9; Match your body background */
    padding: 20px;
    /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); */
    
    width: 100%;
    box-sizing: border-box;
}

.dashboard-title {
    /* font-family: 'Playfair Display', serif; */
    font-size: 26px;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.welcome-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
}

.welcome-text {
   
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.welcome-name {
    color: #3498db;
    font-style: italic;
    font-family: 'Playfair Display', serif;
}

.campus-info {
    font-size: 24px;
    font-weight: bold;
    color: #e74c3c;
    background: -webkit-linear-gradient(45deg, #e74c3c, #c0392b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    padding: 10px 20px;
    border-radius: 8px;
    text-align: right;
}

/* Update the dashboard container padding */
.dashboard-container {
    padding-top: 20px; /* Add some space after the sticky header */
}

/* Add a subtle animation when scrolling */
.header-section.scrolled {
    padding: 10px 20px;
    background-color: rgba(244, 246, 249, 0.98);
    backdrop-filter: blur(5px);
}

.header-section.scrolled .dashboard-title {
    font-size: 30px;
    margin-bottom: 15px;
}

.checkin-checkout-container {
    background-color: #e7f0ff; /* Light blue background */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.checkin-checkout-container h2 {
    color: #007bff; /* Blue color for the heading */
    margin-bottom: 15px;
}

.checkin-info p {
    font-size: 16px;
    color: #333;
    margin: 5px 0;
}

.checkin-info strong {
    color: #007bff; /* Blue color for labels */
}

.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.edit-button {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.edit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    background: linear-gradient(135deg, #45a049, #3d8b40);
}

.details-button {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.details-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    background: linear-gradient(135deg, #1976D2, #1565C0);
}

.sidebar {
    width: 250px;
    background-color: #343a40;
    color: #fff;
    padding: 15px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* Add scrollbar when content overflows */
}

/* Add custom scrollbar styling for better appearance */
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: #2c3136;
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #888;
}