:root {
  
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --background-color: #f3f4f6;
    --text-color: #1f2937;
    --light-gray: #e5e7eb;
    --white: #ffffff;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Fix body scrolling */
body {
    background-color: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
}

/* Adjust header for better spacing */
header {
    background-color: var(--white);
    /* padding: 0.75rem 1rem; */
    box-shadow: var(--box-shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: auto;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}


/* Fix report container to ensure content is visible */
.report-container {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: none;
    overflow-x: auto;
}

/* Make tables responsive */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    min-width: 650px;
}

.tab-content {
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

/* Optimize for 1366x768 resolution */
@media (max-width: 1366px) {
    .header-content {
        padding: 0 0.5rem;
    }

    .search-container {
        max-width: 450px;
    }

    .report-container {
        padding: 1rem;
    }

    .tab {
        padding: 0.5rem 0.75rem;
    }

    th,
    td {
        padding: 0.5rem 0.75rem;
    }

    .welcome-message {
        padding: 1rem;
    }

    .chart-container {
        height: 250px;
    }
}

/* Improve mobile responsiveness */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.5rem;
    }

    .search-container {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .login-button {
        width: 100%;
    }

 
    .report-container {
        padding: 0.75rem;
    }

    .report-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .report-tabs {
        gap: 0.5rem;
    }

    .tab {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .footer-links {
        gap: 1rem;
        justify-content: center;
    }

    .search-again {
        width: 100%;
    }
}

/* Fix calendar styling for better display */
.calendar {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.calendar th {
    background-color: #007bff;
    color: #fff;
    padding: 8px 5px;
    text-align: center;
    font-size: 0.9rem;
}

.calendar td {
    width: 14.28%;
    height: 35px;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    position: relative;
    border: 1px solid #ddd;
    font-size: 0.9rem;
}

/* Keep existing calendar color classes */
.calendar td[data-attendance="100"] {
    background-color: #28a745;
    color: white;
}

.calendar td[data-attendance="75"] {
    background-color: #17a2b8;
    color: white;
}

.calendar td[data-attendance="50"] {
    background-color: #ffc107;
}

.calendar td[data-attendance="25"] {
    background-color: #fd7e14;
    color: white;
}

.calendar td[data-attendance="0"] {
    background-color: #dc3545;
    color: white;
}

.calendar td.empty {
    background-color: #f8f9fa;
}

/* Fix student dropdown styling */
.student-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    max-height: 200px;
    overflow-y: auto;
}

.student-item {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
}

.student-item:hover {
    background-color: #f0f0f0;
}

.calendar-container {
    width: 100%;
    overflow-x: auto;
}

.calendar {
    width: 100%;
    border-collapse: collapse;
}

.calendar th {
    background-color: #007bff;
    color: #fff;
    padding: 10px;
}

.calendar td {
    width: 40px;
    height: 40px;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    position: relative;
}

.calendar td[data-attendance="100"] {
    background-color: #28a745;
}

.calendar td[data-attendance="75"] {
    background-color: #17a2b8;
}

.calendar td[data-attendance="50"] {
    background-color: #ffc107;
}

.calendar td[data-attendance="25"] {
    background-color: #dc3545;
}

.calendar td[data-attendance="0"] {
    background-color: #f8f9fa;
}

.calendar td:hover::after {
    content: attr(data-attendance) '%';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .calendar td {
        width: 30px;
        height: 30px;
    }
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.header-content {
    position: sticky;
    top: 0;
    background-color: #fff;
    z-index: 1000;

}

.report-container {
    padding-top: 60px;
    /* Adjust based on header height */
    padding-bottom: 60px;
    /* Adjust based on footer height */
}

/* Calendar styling */
.calendar {
    width: 100%;
    border-collapse: collapse;
}

.calendar th {
    background-color: #007bff;
    color: #fff;
    padding: 10px;
    text-align: center;
}

.calendar td {
    width: 40px;
    height: 40px;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    position: relative;
    border: 1px solid #ddd;
}

.calendar td[data-attendance="100"] {
    background-color: #28a745;
    color: white;
}

.calendar td[data-attendance="75"] {
    background-color: #17a2b8;
    color: white;
}

.calendar td[data-attendance="50"] {
    background-color: #ffc107;
}

.calendar td[data-attendance="25"] {
    background-color: #fd7e14;
    color: white;
}

.calendar td[data-attendance="0"] {
    background-color: #dc3545;
    color: white;
}

.calendar td.empty {
    background-color: #f8f9fa;
}

.calendar td:hover::after {
    content: attr(data-attendance) '%';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    z-index: 10;
}

.calendar-legend {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 0 10px;
}

.legend-color {
    width: 20px;
    height: 20px;
    margin-right: 5px;
    border-radius: 3px;
}

/* Progress bar styling */
.progress {
    height: 20px;
    width: 100%;
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    background-color: var(--primary-color);
    font-size: 0.8rem;
}

.attendance-good {
    background-color: #28a745 !important;
    color: white;
}

.attendance-warning {
    background-color: #ffc107 !important;
    color: #212529;
}

.attendance-bad {
    background-color: #dc3545 !important;
    color: white;
}

/* Calendar specific styles */
.calendar td[data-attendance="100"] {
    background-color: #28a745;
    color: white;
}

.calendar td[data-attendance="75"] {
    background-color: #17a2b8;
    color: white;
}

.calendar td[data-attendance="50"] {
    background-color: #ffc107;
}

.calendar td[data-attendance="25"] {
    background-color: #fd7e14;
    color: white;
}

.calendar td[data-attendance="0"] {
    background-color: #dc3545;
    color: white;
}

.calendar td.empty {
    background-color: #f8f9fa;
}

.calendar td:hover::after {
    content: attr(data-attendance) '%';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    z-index: 10;
}

/* Chart container */
.chart-container {
    height: 300px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
} */

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2563eb;
}

.search-container {
    display: flex;
    gap: 10px;
    flex: 1;
    max-width: 600px;
    margin: 0 10px;
}


   

.search-button,
.login-button {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

.search-button {
    background-color: #2563eb;
    color: white;
}

.login-button {
    background-color: #1f2937;
    color: white;
}

main {
    margin-top: 70px;
    margin-bottom: 60px;
    padding: 20px;
    flex: 1;
}

.report-container {
    background-color: white;

    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.welcome-message {
    background-color: #e8f4ff;
    border-left: 5px solid #2563eb;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.student-info {
    background-color: #f3f4f6;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.report-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
    flex-wrap: wrap;
}

.tab {
    padding: 10px 15px;
    cursor: pointer;
    font-weight: bold;
    border-bottom: 3px solid transparent;
}

.tab.active {
    color: #2563eb;
    border-bottom: 3px solid #2563eb;
}

.tab-content {
    display: none;
    overflow-x: auto;
}

.tab-content.active {
    display: block;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    min-width: 600px;
}

th,
td {
    padding: 10px 15px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

th {
    background-color: #2563eb;
    color: white;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #1f2937;
    text-decoration: none;
}

.search-again {
    background-color: white;
    color: #2563eb;
    border: 2px solid #2563eb;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.student-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: white;
    border: 1px solid #ccc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    max-height: 200px;
    overflow-y: auto;
}

.student-item {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
}

.student-item:hover {
    background-color: #f3f4f6;
}

/* Calendar styling */
.calendar-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

.calendar {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.calendar th {
    background-color: #2563eb;
    color: white;
    padding: 8px;
    text-align: center;
}

.calendar td {
    width: 40px;
    height: 40px;
    text-align: center;
    vertical-align: middle;
    border: 1px solid #ddd;
}

.calendar-legend {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
}

.legend-color {
    width: 20px;
    height: 20px;
    margin-right: 5px;
    border-radius: 3px;
}

/* Calendar cell styles */
.calendar td.present {
    background-color: #28a745;
    color: white;
}

.calendar td.absent {
    background-color: #dc3545;
    color: white;
}

.calendar td.no-record {
    background-color: #f8f9fa;
    color: #6c757d;
}

.calendar td.empty {
    background-color: #fff;
    border: none;
}

/* Calendar legend styles */
.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

/* Recent attendance table styles */
#recent table {
    width: 100%;
    margin-top: 1rem;
}

#recent th {
    background-color: #2563eb;
    color: white;
    padding: 12px;
}

#recent td {
    padding: 10px;
    vertical-align: middle;
}

#recent tr:nth-child(even) {
    background-color: #f8f9fa;
}

#recent .text-success {
    color: #28a745;
}

#recent .text-danger {
    color: #dc3545;
}

/* Responsive styles for recent attendance */
@media (max-width: 768px) {
    #recent th,
    #recent td {
        padding: 8px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
    }

    .search-container {
        margin: 10px 0;
        max-width: 100%;
    }

    .report-header {
        flex-direction: column;
    }



    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    @media (max-width: 768px) {
        .header-content.results-shown {
            padding: 5px;
        }

        .header-content.results-shown .search-container,
        .header-content.results-shown .login-button {
            display: none;
        }

        .header-content.results-shown .logo {
            font-size: 1.2rem;
        }

        /* Improve table responsiveness */
        .tab-content table {
            min-width: unset;
            width: 100%;
        }

        .tab-content table th,
        .tab-content table td {
            padding: 8px 5px;
            font-size: 0.9rem;
            white-space: nowrap;
        }

        /* Make progress bars more compact */
        .progress {
            height: 15px;
            font-size: 0.75rem;
        }

        /* Adjust calendar for mobile */
        .calendar td {
            width: 30px;
            height: 30px;
            font-size: 0.8rem;
        }

        .calendar th {
            padding: 5px 2px;
            font-size: 0.8rem;
        }

        /* Improve welcome message layout */
        .welcome-message {
            padding: 10px;
        }

        .welcome-message h3 {
            font-size: 1.2rem;
            margin-bottom: 0.5rem;
        }

        /* Better tab navigation */
        .report-tabs {
            gap: 5px;
        }

        .tab {
            padding: 8px 10px;
            font-size: 0.9rem;
        }

        /* Chart container adjustment */
        .chart-container {
            height: 250px;
        }

        /* Adjust main content spacing
        main {
            margin-top: 50px;
            padding: 10px;
        } */

        .report-container {
            padding: 10px;
        }

    }
}
/* Search section styles */
.search-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 20px;
    margin-top: -60px;
}



.search-box-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.search-box:focus {
    outline: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-color: #5C5EDE;
}

.search-button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    padding: 10px 25px;
    background-color: #5C5EDE;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.search-button:hover {
    background-color: #4B4DCB;
}

/* Student dropdown styles */
.student-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow: hidden;
}

.student-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.student-item:hover {
    background-color: #F8F9FE;
}

.student-name {
    color: #333;
    font-weight: 500;
}

.student-class {
    color: #666;
    font-size: 0.9rem;
}

/* Responsive styles */
@media (max-width: 768px) {
   
    
    .search-box-container {
        max-width: 90%;
    }
    
    .search-box {
        padding: 12px 20px;
    }
    
    .search-button {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
}

.back-button {
    display: block;
    margin: 2rem auto;
    padding: 0.75rem 2rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
  }

  .back-button:hover {
    background-color: var(--secondary-color);
  }
