* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f4f4f4;
    padding-bottom: 60px; /* Space for the fixed footer */
    overflow-x: hidden; /* Prevent horizontal scrolling on the body */
}

.container {
    padding: 20px;
    max-width: 100%; /* Ensure container doesn't exceed viewport width */
    overflow-x: hidden; /* Prevent horizontal overflow */
}

/* Shift Code Label */
.shift-code {
    background-color: #ffccbc;
    color: #333;
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: 5px;
    font-size: 12px;
}

/* Shift Details Table */
.shift-details-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-top: 5px;
}

.shift-details-table th,
.shift-details-table td {
    padding: 8px;
    text-align: center;
    border: 1px solid #ddd;
}

.shift-details-table th {
    background-color: #f4f4f4;
    font-weight: bold;
}

.shift-details-table td {
    background-color: #fff8e1; /* Light yellow background as in the image */
}

.welcome-header {
    background-color: #0a5a8d;
    color: white;
    padding: 10px;
    text-align: center;
}

.welcome-header h1 {
    font-size: 18px;
}

.welcome-header p {
    font-size: 14px;
}

.section {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-width: 100%; /* Ensure section doesn't exceed viewport width */
    overflow-x: hidden; /* Prevent horizontal overflow */
}

.section h2 {
    font-size: 16px;
    margin-bottom: 10px;
}

.section h3 {
    font-size: 14px;
    margin-top: 20px;
    margin-bottom: 10px;
}

.separator {
    height: 1px;
    background-color: #ddd;
    margin-bottom: 10px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.card {
    border-radius: 8px;
    text-align: center;
    overflow: hidden;
    width: 90px;
    height: 90px;
    display: flex;
    flex-direction: column;
}

.card-link {
    text-decoration: none;
    color: inherit;
}

.card-link .card:hover {
    transform: scale(1.05);
    transition: transform 0.2s ease-in-out;
}

.card-icon {
    padding: 8px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon img {
    width: 32px;
    height: 32px;
}

.card-title {
    padding: 8px;
    color: white;
    font-size: 12px;
}

/* Center content in View section cards */
.section:nth-child(2) .card {
    justify-content: center;
}

.section:nth-child(2) .card-title,
.section:nth-child(2) .card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.guidelines-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.illustration {
    width: 60px;
    height: 60px;
}

.guidelines-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.view-btn {
    background-color: #0c9ca6;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    width: fit-content;
}

.thoughts {
    font-style: italic;
    text-align: center;
    padding: 10px;
    background-color: #f9f9f9;
}

.carousel {
    position: relative;
    display: flex;
    align-items: center;
}

.carousel-container {
    display: flex;
    overflow: hidden;
    width: 200px;
    gap: 10px;
}

.birthday-card {
    min-width: 200px;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}

.birthday-card img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-bottom: 5px;
}

.birthday-card p {
    font-size: 12px;
    margin: 2px 0;
}

.carousel-btn {
    background: none;
    color: #000;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    position: absolute;
    z-index: 1;
    font-size: 16px;
}

.prev-btn {
    left: 0;
}

.next-btn {
    right: 0;
}

.carousel-btn:hover {
    color: #0056b3;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.calendar-btn {
    background-color: #fff;
    color: #0056b3;
    border: 1px solid #ddd;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
}

.calendar {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* Ensure columns are evenly distributed */
}

.calendar th, .calendar td {
    text-align: center;
    padding: 10px;
    border: 1px solid #ddd;
    width: 14.28%; /* Ensure equal width for each day */
    height: 40px; /* Fixed height for consistency */
    vertical-align: middle; /* Center content vertically */
    font-size: 14px; /* Default font size */
}

.calendar th {
    background-color: #0c9ca6;
    color: white;
}

.calendar .wo {
    border: 2px solid #ffeb3b;
}

.calendar .dp {
    border: 2px solid #ff9800;
}

.calendar .fp {
    border: 2px solid #4caf50;
}

.calendar .sl {
    border: 2px solid #e91e63;
}

.calendar .previous-day {
    border: 2px solid #ff9800; /* Orange border for the previous day */
}

.calendar .today {
    background-color: #ffccbc;
    font-weight: bold;
    border: 2px solid #ffccbc;
}

/* Media query for smaller screens (e.g., iOS devices) */
@media screen and (max-width: 768px) {
    .container {
        padding: 10px; /* Reduce padding on smaller screens */
    }

    .section {
        padding: 10px; /* Reduce padding on smaller screens */
    }

    .calendar {
        width: 100%;
        max-width: 100%; /* Ensure the table doesn't exceed the viewport */
    }

    .calendar th, .calendar td {
        padding: 5px; /* Reduce padding to fit more comfortably */
        font-size: 12px; /* Reduce font size for better fit */
        width: 14.28%; /* Maintain equal width */
        height: 30px; /* Reduce height for better fit */
    }

    .calendar-header {
        font-size: 14px; /* Reduce font size for the header */
    }

    .calendar-btn {
        padding: 3px 6px; /* Reduce button padding */
        font-size: 12px; /* Reduce button font size */
    }

    .calendar-legend {
        flex-wrap: wrap; /* Allow legend items to wrap if needed */
        font-size: 10px; /* Reduce font size */
        justify-content: flex-start; /* Align to left on smaller screens */
        gap: 5px; /* Add spacing between items */
    }

    .legend-item {
        padding: 3px 6px; /* Reduce padding */
    }
}

.calendar-legend {
    display: flex;
    justify-content: flex-start; /* Align items to the left */
    gap: 10px; /* Add spacing between legend items */
    margin-top: 10px;
    font-size: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    padding: 5px 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.legend-text.wo::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: #ffeb3b;
    margin-right: 5px;
}

.legend-text.dp::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: #ff9800;
    margin-right: 5px;
}

.legend-text.fp::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: #4caf50;
    margin-right: 5px;
}

.legend-text.sl::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: #e91e63;
    margin-right: 5px;
}

.anniversary-card {
    display: flex;
    align-items: center;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
}

.anniversary-card img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 10px;
}

.anniversary-details {
    flex: 1;
}

.employee-name {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 2px;
}

.anniversary-details p {
    font-size: 12px;
    margin: 2px 0;
}

/* Leave Buttons */
.leave-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.leave-btn {
    text-decoration: none;
    display: flex;
    align-items: stretch; /* Ensure icon and title stretch to fill the height */
    border-radius: 5px;
    overflow: hidden; /* Ensure the rounded corners are respected */
}

.leave-btn-icon {
    background-color: #005F73 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    transition: background-color 0.2s ease-in-out;
}

.leave-btn-icon img {
    width: 16px; /* Match the previous Font Awesome icon size */
    height: 16px;
}

.leave-btn-title {
    background-color: #e6e6e6; /* Light grey background */
    color: #333; /* Darker text color for contrast */
    flex: 1; /* Take up remaining space */
    display: flex;
    align-items: center;
    padding: 10px 15px;
    font-size: 14px;
}

.leave-btn:hover .leave-btn-icon {
    background-color: #14b5c0; /* Hover effect for the icon part */
}

.leave-btn:hover .leave-btn-title {
    background-color: #f0f0f0; /* Slightly lighter grey on hover */
}

/* No Data Found Message */
.no-data-message {
    text-align: center;
    padding: 20px;
}

.no-data-message p {
    font-size: 16px;
    color: #666;
}

/* Leave Application Form */
.leave-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-size: 14px;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    width: 100%;
    max-width: 300px;
}

.form-group input[type="date"] {
    width: 200px;
}

.form-group input[type="file"] {
    padding: 3px;
}

.form-group textarea {
    resize: vertical;
}

.day-display {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

/* Two-Column Layout for Specific Fields */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-grid .form-group {
    max-width: 200px; /* Adjust width for two-column layout */
}

.form-grid .form-group input[type="date"] {
    width: 100%; /* Ensure date picker fits within the column */
}

.form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.apply-btn,
.cancel-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.apply-btn {
    background-color: #005F73;
    color: white;
}

.apply-btn:hover {
    background-color: #14b5c0;
}

.cancel-btn {
    background-color: #e6e6e6;
    color: #333;
}

.cancel-btn:hover {
    background-color: #f0f0f0;
}

/* Leave Balance Table */
.leave-balance-table {
    margin-top: 20px;
}

.leave-balance-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.leave-balance-table th,
.leave-balance-table td {
    padding: 8px;
    text-align: center;
    border: 1px solid #ddd;
}

.leave-balance-table th {
    background-color: #f4f4f4;
    font-weight: bold;
}

.leave-balance-table td {
    background-color: #fff;
}

/* Footer Styles */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #0a5a8d;
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.footer-nav {
    display: flex;
    gap: 20px;
}

.footer-btn {
    background: none;
    border: none;
    color: white;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.footer-btn-link {
    text-decoration: none; /* Remove underline from link */
    color: inherit; /* Inherit color from parent */
}

.footer-btn i {
    font-size: 16px;
    margin-bottom: 5px;
}

.footer-brand {
    display: flex;
    align-items: center;
}

.footer-logo {
    height: 20px; /* Adjust the height as needed */
    width: auto; /* Maintain aspect ratio */
}

/* Popup Styles */
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay */
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.popup-content {
    position: relative;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
}

.id-card-image {
    max-width: 100%;
    height: auto;
    display: block;
}

.popup-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #333;
}

.popup-close-btn:hover {
    color: #e91e63; /* Pink hover effect for visibility */
}

/* Responsive adjustments for popup */
@media screen and (max-width: 768px) {
    .popup-content {
        max-width: 95%;
        padding: 15px;
    }

    .id-card-image {
        max-width: 100%;
    }

    .popup-close-btn {
        font-size: 18px;
        top: 5px;
        right: 5px;
    }
}