:root {
    --primary-color: #0a2d57;
    --secondary-color: #1d4d86;
    --accent-color: #437fc6;
    --light-bg: #f8f9fa;
}

.profile-header {
    background: linear-gradient(
            135deg,
            var(--primary-color) 0%,
            var(--primary-color) 100%
    );
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.profile-avatar {
    width: 120px;
    height: 120px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    color: white;
    border: 5px solid white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.section-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.section-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.section-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-body {
    padding: 1.5rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.40rem 0;
    border-bottom: 1px solid #e9ecef;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: var(--secondary-color);
    flex: 0 0 40%;
}

.info-value {
    color: #212529;
    flex: 1;
    text-align: right;
}

.btn-edit {
    background-color: var(--accent-color);
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-edit:hover {
    background-color: #0b5ed7;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.badge-custom {
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: 500;
}

.accordion-button {
    background-color: #f8f9fa;
    color: #212529;
    font-weight: 600;
}

.accordion-button:not(.collapsed) {
    background-color: var(--primary-color);
    color: white;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}

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

.leave-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
}

.leave-card h4 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.leave-card p {
    margin: 0;
    opacity: 0.9;
}

.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.profile-info-item {
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

.schedule-overview {
    max-width: 400px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.schedule-row {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}
.schedule-row:last-child {
    border-bottom: none;
}
.width-label {
    width: 80px;
    font-size: 14px;
    color: #6c757d;
}

.time {
    font-size: 14px;
    font-weight: 500;
    color: #212529;
}

.arrow {
    margin: 0 12px;
    color: #adb5bd;
    font-size: 14px;
}
.duration {
    margin-left: auto;
    font-size: 14px;
    color: #6c757d;
}

@media (max-width: 768px) {
    .profile-avatar {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }

    .info-label,
    .info-value {
        flex: 1;
        text-align: left;
    }

    .info-row {
        flex-direction: column;
        gap: 0.25rem;
    }
}

.widget-area {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1200px) {
    .widget-area { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
    .widget-area { grid-template-columns: 1fr; }
}
.widget-card { min-width: 0; }
.widget-value { font-size: 1.75rem; line-height: 1.2; }
.widget-value-unit { font-size: 1rem; }
.schedule-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
}
.schedule-day { min-width: 0; }
.schedule-day-name, .schedule-day-hours { font-size: 0.7rem; }
.schedule-day.today { border: 2px solid #374151 !important; }
.overtime-period-label { font-size: 0.75rem; }
.overtime-period-value { font-size: 0.875rem; }
.icon-chevron { width: 16px; height: 16px; }

.attendance-table-card {
    border-radius: 12px;
    overflow: hidden;
}
.attendance-table {
    font-size: 0.9rem;
}
.attendance-table thead {
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
    border-bottom: 2px solid #dee2e6;
}
.attendance-table thead th {
    font-weight: 600;
    color: #495057;
    padding: 12px 8px;
    white-space: nowrap;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.attendance-table tbody td {
    padding: 12px 8px;
    vertical-align: middle;
}
.attendance-row {
    transition: background-color 0.15s ease;
}
.attendance-row:hover {
    background-color: rgba(0, 123, 255, 0.04);
}
.attendance-row-today {
    background-color: rgba(0, 123, 255, 0.08) !important;
}
.attendance-row-today:hover {
    background-color: rgba(0, 123, 255, 0.12) !important;
}
.attendance-row-weekend {
    background-color: #f8f9fa;
}
.attendance-row-weekend:hover {
    background-color: #e9ecef;
}
.attendance-row-holiday {
    background-color: #fff5f5;
}
.attendance-row-holiday:hover {
    background-color: #ffe3e3;
}
.today-indicator {
    width: 8px;
    height: 8px;
    background-color: #0d6efd;
    border-radius: 50%;
    display: inline-block;
}
.time-range {
    font-family: "SF Mono", SFMono-Regular, ui-monospace, monospace;
    font-size: 0.85rem;
}
.time-arrow {
    opacity: 0.5;
}
.tracked-hours-cell .progress {
    background-color: #e9ecef;
    border-radius: 2px;
}
.overtime-indicator {
    font-size: 0.75rem;
}
.holiday-icon {
    display: flex;
    align-items: center;
}
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}
.badge-status-approved {
    background-color: #d1e7dd;
    color: #0f5132;
}
.badge-status-pending {
    background-color: #fff3cd;
    color: #664d03;
}
.badge-status-rejected {
    background-color: #f8d7da;
    color: #842029;
}
.action-edit {
    opacity: 0.5;
    transition: opacity 0.15s ease;
}
.attendance-row:hover .action-edit {
    opacity: 1;
}

/* ========================================
   SHARED STYLES FOR LIST & CALENDAR VIEWS
   ======================================== */

/* Common color variables */
:root {
    --tt-today-color: #0d6efd;
    --tt-today-bg: rgba(13, 110, 253, 0.08);
    --tt-weekend-color: #6c757d;
    --tt-weekend-bg: #f8f9fa;
    --tt-holiday-color: #dc3545;
    --tt-holiday-bg: rgba(220, 53, 69, 0.08);
    --tt-success-color: #198754;
    --tt-warning-color: #ffc107;
    --tt-card-radius: 12px;
    --tt-card-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ========================================
   LIST VIEW - ATTENDANCE TABLE
   ======================================== */

.attendance-table-card {
    border-radius: var(--tt-card-radius);
    overflow: hidden;
    border: 1px solid #e9ecef;
    box-shadow: var(--tt-card-shadow);
}

.attendance-table {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.attendance-table thead {
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
    border-bottom: 2px solid #dee2e6;
}

.attendance-table thead th {
    font-weight: 600;
    color: #495057;
    padding: 14px 10px;
    white-space: nowrap;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.attendance-table tbody td {
    padding: 14px 10px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f3f4;
}

/* Row styles */
.attendance-row {
    transition: all 0.15s ease;
    position: relative;
}

.attendance-row:hover {
    background-color: rgba(0, 123, 255, 0.04);
}

/* Today row - blue highlight */
.attendance-row-today {
    background: linear-gradient(to right, var(--tt-today-bg), rgba(13, 110, 253, 0.02)) !important;
    border-left: 4px solid var(--tt-today-color) !important;
}

.attendance-row-today:hover {
    background: linear-gradient(to right, rgba(13, 110, 253, 0.12), rgba(13, 110, 253, 0.04)) !important;
}

.attendance-row-today td:first-child {
    padding-left: 12px !important;
}

/* Weekend row - striped pattern */
.attendance-row-weekend {
    background: repeating-linear-gradient(
        135deg,
        #f8f9fa,
        #f8f9fa 10px,
        #f1f3f5 10px,
        #f1f3f5 20px
    );
    border-left: 4px solid var(--tt-weekend-color) !important;
}

.attendance-row-weekend:hover {
    background: repeating-linear-gradient(
        135deg,
        #e9ecef,
        #e9ecef 10px,
        #dee2e6 10px,
        #dee2e6 20px
    );
}

.attendance-row-weekend td:first-child {
    padding-left: 12px !important;
}

.attendance-row-weekend .date-info .fw-semibold {
    color: var(--tt-weekend-color);
}

/* Holiday row - red gradient */
.attendance-row-holiday {
    background: linear-gradient(to right, var(--tt-holiday-bg), rgba(220, 53, 69, 0.02)) !important;
    border-left: 4px solid var(--tt-holiday-color) !important;
}

.attendance-row-holiday:hover {
    background: linear-gradient(to right, rgba(220, 53, 69, 0.14), rgba(220, 53, 69, 0.06)) !important;
}

.attendance-row-holiday td:first-child {
    padding-left: 12px !important;
}

/* Today indicator dot */
.today-indicator {
    width: 8px;
    height: 8px;
    min-width: 8px;
    background-color: var(--tt-today-color);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.2);
    animation: pulse-today 2s infinite;
}

@keyframes pulse-today {
    0%, 100% { box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.2); }
    50% { box-shadow: 0 0 0 6px rgba(13, 110, 253, 0.1); }
}

/* ========================================
   SHARED BADGES - LIST & CALENDAR
   ======================================== */

/* Weekend badge */
.badge-weekend {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Holiday badge - day off (cannot work) */
.badge-holiday {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    animation: glow-holiday 2s ease-in-out infinite;
}

/* Holiday badge - working allowed (subtle version) */
.badge-holiday-working {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

@keyframes glow-holiday {
    0%, 100% { box-shadow: 0 0 5px rgba(220, 53, 69, 0.3); }
    50% { box-shadow: 0 0 10px rgba(220, 53, 69, 0.5); }
}

/* Holiday message styling */
.holiday-message {
    padding: 6px 12px;
    background: var(--tt-holiday-bg);
    border-radius: 8px;
    display: inline-flex;
}

.holiday-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border-radius: 50%;
}

.holiday-icon-wrapper svg {
    width: 14px;
    height: 14px;
}

.holiday-name {
    color: #842029;
    font-size: 0.9rem;
}

/* Weekend off message */
.weekend-off-message {
    padding: 4px 10px;
    background: rgba(108, 117, 125, 0.08);
    border-radius: 6px;
    display: inline-flex;
}

/* Time range styling */
.time-range {
    font-family: "SF Mono", SFMono-Regular, ui-monospace, monospace;
    font-size: 0.85rem;
    padding: 4px 8px;
    background: #f8f9fa;
    border-radius: 6px;
    display: inline-flex;
}

.time-arrow {
    opacity: 0.4;
}

/* Progress bar */
.tracked-hours-cell .progress {
    background-color: #e9ecef;
    border-radius: 2px;
}

/* Overtime indicator */
.overtime-indicator {
    font-size: 0.7rem;
    font-weight: bold;
}

/* Status badges */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-status-approved {
    background-color: #d1e7dd;
    color: #0f5132;
}

.badge-status-pending {
    background-color: #fff3cd;
    color: #664d03;
}

.badge-status-rejected {
    background-color: #f8d7da;
    color: #842029;
}

/* Action button */
.action-edit {
    opacity: 0.4;
    transition: all 0.15s ease;
}

.attendance-row:hover .action-edit {
    opacity: 1;
}

.action-edit:hover {
    color: var(--tt-today-color) !important;
    transform: scale(1.1);
}

/* Date info column */
.date-info {
    line-height: 1.3;
}

/* ========================================
   CALENDAR VIEW - DAY BOXES
   ======================================== */

/* Calendar scroll wrapper - enables horizontal scroll on small devices */
.calendar-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Calendar container */
.calendar-container {
    background: white;
    border-radius: var(--tt-card-radius);
    box-shadow: var(--tt-card-shadow);
    padding: 1rem;
}

/* Month grid - synced with list view */
.month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    min-width: 700px; /* Ensures grid doesn't shrink too much on small screens */
}

/* Week view grid - for week display */
.week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    min-width: 700px; /* Ensures grid doesn't shrink too much on small screens */
}

/* Day header */
.day-header {
    text-align: center;
    font-weight: 600;
    padding: 10px 5px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #495057;
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
    border-radius: 6px;
}

/* Day box - base styles */
.day-box {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 10px;
    min-height: 100px;
    min-width: 0; /* Allows flex items to shrink below content size */
    width: 100%; /* Ensures equal width within grid */
    text-align: center;
    transition: all 0.2s ease;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    position: relative;
    flex: 1 1 0; /* Equal flex basis for sibling equality */
}

.day-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    z-index: 10;
}

.day-box.empty {
    background-color: #fafafa;
    border-color: transparent;
}

.day-box.empty:hover {
    transform: none;
    box-shadow: none;
}

/* Today elevation - synced with list view blue */
.today-elevate {
    border-top: 4px solid var(--tt-today-color) !important;
    background: linear-gradient(to bottom, var(--tt-today-bg), #fff) !important;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.15);
}

.today-elevate .day-date {
    color: var(--tt-today-color) !important;
    font-weight: 700 !important;
}

/* Weekend day box */
.day-box.weekend-box {
    background: repeating-linear-gradient(
        135deg,
        #fafafa,
        #fafafa 8px,
        #f5f5f5 8px,
        #f5f5f5 16px
    );
    border-left: 3px solid var(--tt-weekend-color);
}

.day-box.weekend-box .day-name,
.day-box.weekend-box .day-date {
    color: var(--tt-weekend-color);
}

/* Holiday day box - synced with list view */
.day-box.holiday-box {
    background: linear-gradient(to bottom, var(--tt-holiday-bg), #fff) !important;
    border-left: 3px solid var(--tt-holiday-color) !important;
}

/* Holiday color text - improved styling */
.holiday-color {
    color: #FFFFFF;
    font-size: 0.75em;
    border: none;
    background: linear-gradient(135deg, #dc3545, #c82333);
    border-radius: 6px;
    padding: 4px 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    animation: glow-holiday 2s ease-in-out infinite;
}

/* Day name and date styling */
.day-name {
    font-weight: 600;
    font-size: 0.85em;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.day-date {
    font-weight: 600;
    font-size: 1.1em;
    color: #212529;
    margin-bottom: 6px;
}

/* Container button */
.containerBtn {
    border: none;
    width: 100%;
    height: 100%;
    background: transparent !important;
    cursor: pointer;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.containerBtn:hover {
    background: transparent;
}

/* Attendance data bars - synced styles */
.rounded-rectangle-bar {
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.existing-hours {
    color: #055160;
    border: 1px solid #9eeaf9;
    background-color: #cff4fc;
}

.no-data {
    color: #6c757d;
    border: 1px solid #e9ecef;
    background-color: #f8f9fa;
}

.applied-leave {
    color: #664d03;
    border: 1px solid #ffecb5;
    background-color: #fff3cd;
}

.approved-leave {
    color: #0f5132;
    border: 1px solid #badbcc;
    background-color: #d1e7dd;
}

.rejected-leave {
    color: #842029;
    border: 1px solid #f5c2c7;
    background-color: #f8d7da;
}

/* Add hours button */
.add-hours-button {
    visibility: hidden;
    padding: 4px 10px;
    font-size: 0.8rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.day-box:hover .add-hours-button {
    visibility: visible;
}

/* Day info card - synced styling */
.day-info-card {
    border: 1px solid #e9ecef;
    border-radius: var(--tt-card-radius);
    box-shadow: var(--tt-card-shadow);
    overflow: hidden;
}

.day-info-card .thCustom {
    font-weight: 600;
    color: #495057;
    padding: 12px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   RESPONSIVE STYLES - LIST & CALENDAR
   ======================================== */

/* Tablet and below */
@media (max-width: 992px) {
    .attendance-table thead th {
        padding: 10px 6px;
        font-size: 0.7rem;
    }

    .attendance-table tbody td {
        padding: 10px 6px;
    }

    .time-range {
        font-size: 0.75rem;
        padding: 3px 6px;
    }

    .badge-weekend,
    .badge-holiday,
    .badge-holiday-working {
        font-size: 0.6rem;
        padding: 2px 6px;
    }

    .day-box {
        min-height: 80px;
        padding: 8px;
    }

    .day-date {
        font-size: 1rem;
    }

    .rounded-rectangle-bar {
        font-size: 0.65rem;
        padding: 3px 6px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .attendance-table {
        font-size: 0.8rem;
    }

    .attendance-table thead th {
        padding: 8px 4px;
        font-size: 0.65rem;
    }

    .attendance-table tbody td {
        padding: 8px 4px;
    }

    .today-indicator {
        width: 6px;
        height: 6px;
        min-width: 6px;
    }

    .widget-area {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Calendar scroll wrapper for mobile */
    .calendar-scroll-wrapper {
        margin: 0 -0.5rem;
        padding: 0 0.5rem;
    }

    .month-grid,
    .week-grid {
        gap: 3px;
        min-width: 600px; /* Slightly smaller for tablets */
    }

    .day-header {
        padding: 6px 2px;
        font-size: 0.65rem;
        min-width: 80px;
    }

    .day-box {
        min-height: 70px;
        min-width: 80px; /* Ensures consistent sizing */
        padding: 6px;
        border-radius: 6px;
    }

    .day-name {
        font-size: 0.7em;
    }

    .day-date {
        font-size: 0.9em;
        margin-bottom: 4px;
    }

    .holiday-color {
        font-size: 0.65em;
        padding: 2px 6px;
    }

    .rounded-rectangle-bar {
        font-size: 0.6rem;
        padding: 2px 4px;
    }

    .add-hours-button {
        padding: 3px 8px;
        font-size: 0.7rem;
    }

    .day-info-card {
        flex-direction: column !important;
    }

    .day-info-card > div {
        border-right: none !important;
        border-left: none !important;
        border-bottom: 1px solid #ddd;
    }

    .day-info-card > div:last-child {
        border-bottom: none;
    }
}

/* Small mobile */
@media (max-width: 576px) {
    .widget-area {
        grid-template-columns: 1fr;
    }

    .widget-value {
        font-size: 1.5rem;
    }

    .schedule-week {
        gap: 2px;
    }

    .schedule-day {
        padding: 4px !important;
    }

    .schedule-day-name,
    .schedule-day-hours {
        font-size: 0.6rem;
    }

    .attendance-table-card {
        border-radius: 8px;
    }

    .badge-weekend,
    .badge-holiday,
    .badge-holiday-working {
        font-size: 0.55rem;
        padding: 1px 4px;
    }

    .badge-weekend svg,
    .badge-holiday svg,
    .badge-holiday-working svg {
        width: 8px;
        height: 8px;
    }

    /* Calendar responsive - horizontal scroll on small mobile */
    .calendar-scroll-wrapper {
        margin: 0 -1rem;
        padding: 0 1rem;
        scrollbar-width: thin;
        scrollbar-color: #ccc #f1f1f1;
    }

    .calendar-scroll-wrapper::-webkit-scrollbar {
        height: 6px;
    }

    .calendar-scroll-wrapper::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 3px;
    }

    .calendar-scroll-wrapper::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 3px;
    }

    .calendar-scroll-wrapper::-webkit-scrollbar-thumb:hover {
        background: #aaa;
    }

    .month-grid,
    .week-grid {
        gap: 2px;
        min-width: 560px; /* Minimum width for proper display */
    }

    .day-header {
        min-width: 75px;
        padding: 5px 2px;
        font-size: 0.6rem;
    }

    .day-box {
        min-height: 60px;
        min-width: 75px; /* Ensures equal sizing across all day boxes */
        padding: 4px;
    }

    .day-box.empty {
        min-width: 75px;
    }

    .day-name {
        font-size: 0.6em;
    }

    .day-date {
        font-size: 0.8em;
    }

    .rounded-rectangle-bar {
        font-size: 0.55rem;
    }

    .holiday-message {
        padding: 4px 8px;
    }

    .holiday-icon-wrapper {
        width: 22px;
        height: 22px;
    }

    .holiday-icon-wrapper svg {
        width: 10px;
        height: 10px;
    }

    .holiday-name {
        font-size: 0.8rem;
    }
}

/* ========================================
   WEEKLY CONTRACT VIEW - HOLIDAY & LEAVE STYLES
   ======================================== */

/* Week statistics in the info box */
.week-stats {
    border-top: 1px solid #e9ecef;
    padding-top: 8px;
    font-size: 0.8rem;
}

.week-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
}

.week-stat-label {
    color: #6c757d;
}

.week-stat-value {
    font-weight: 500;
}

.week-stat-holiday,
.week-stat-leave {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px dashed #e9ecef;
    justify-content: flex-start;
    gap: 4px;
}

/* Date section styles for holidays and leaves */
.date-section-holiday {
    border-left: 4px solid var(--tt-holiday-color) !important;
    background: linear-gradient(to right, var(--tt-holiday-bg), transparent);
}

.date-section-leave-approved {
    border-left: 4px solid var(--tt-success-color) !important;
    background: linear-gradient(to right, rgba(25, 135, 84, 0.08), transparent);
}

.date-section-leave-pending {
    border-left: 4px solid var(--tt-warning-color) !important;
    background: linear-gradient(to right, rgba(255, 193, 7, 0.08), transparent);
}

/* Weekly view badges */
.badge-holiday-weekly {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-leave-approved-weekly {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: linear-gradient(135deg, #198754, #157347);
    color: white;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-leave-pending-weekly {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-leave-rejected-weekly {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Date label in weekly view */
.date-label {
    font-size: 0.8rem;
    font-weight: 500;
    min-width: 90px;
}

/* Work summary text */
.work-summary-text {
    flex: 1;
}

/* Holiday and leave items in expanded section */
.holiday-item,
.leave-item {
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    margin: 4px 0;
}

/* Week info box adjustments for statistics */
.week-info-box {
    min-width: 140px;
}

/* Responsive adjustments for weekly view */
@media (max-width: 768px) {
    .week-stats {
        font-size: 0.75rem;
    }

    .date-label {
        font-size: 0.75rem;
        min-width: 75px;
    }

    .badge-holiday-weekly,
    .badge-leave-approved-weekly,
    .badge-leave-pending-weekly,
    .badge-leave-rejected-weekly {
        font-size: 0.6rem;
        padding: 2px 6px;
    }

    .week-info-box {
        min-width: 120px;
    }
}

@media (max-width: 576px) {
    .week-stat-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .date-info {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .date-label {
        min-width: auto;
    }
}