/* Top Employee Navigation Bar */
.emp-nav-bar { display: flex; justify-content: space-between; align-items: center; background: #fff; padding: 10px 15px; border-radius: 12px; box-shadow: 0 2px 5px rgba(0,0,0,0.02); margin-bottom: 15px; }
.current-emp-info { text-align: center; flex: 1; }
.current-emp-info h3 { font-size: 16px; margin: 0; color: #1a202c; }
.current-emp-info p { font-size: 11px; margin: 0; color: #718096; }
.icon-btn { background: #ebf8ff; border: none; font-size: 16px; padding: 8px 12px; border-radius: 8px; cursor: pointer; color: #3182ce; transition: 0.2s; }
.icon-btn:active { transform: scale(0.9); }

/* Month & Year Picker */
.month-year-picker { display: flex; gap: 10px; margin-bottom: 15px; }
.month-year-picker select { flex: 1; padding: 10px; font-size: 14px; border: 1px solid #e2e8f0; border-radius: 8px; outline: none; background: #fff;}

/* Calendar Grid */
.calendar-container { background: #fff; border-radius: 12px; box-shadow: 0 2px 5px rgba(0,0,0,0.02); padding: 15px; overflow: hidden; }
.cal-header-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-bottom: 5px; }
.cal-header { text-align: center; font-size: 12px; font-weight: 600; color: #4a5568; padding-bottom: 5px; border-bottom: 1px solid #e2e8f0; }
.cal-days-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }

/* Calendar Cells */
.cal-day { aspect-ratio: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: 0.2s; }
.cal-day:hover:not(.empty) { border-color: #3182ce; }
.cal-day.empty { background: transparent; cursor: default; border: none; }
.cal-day.selected { border: 2px solid #2b6cb0; transform: scale(1.05); box-shadow: 0 2px 8px rgba(49, 130, 206, 0.4); }

/* COLOR CODES */
.bg-gray { background-color: #e2e8f0; color: #4a5568; } 
.bg-red { background-color: #fed7d7; color: #c53030; } 
.bg-pink { background-color: #fbb6ce; color: #97266d; } 
.bg-green { background-color: #c6f6d5; color: #22543d; } 
.bg-white { background-color: #ffffff; color: #2d3748; border: 1px solid #cbd5e0; } 
.bg-orange { background-color: #feebc8; color: #c05621; } 

/* New KPI Colors */
.bg-purple { background-color: #e9d8fd; color: #553c9a; } /* Late In */
.bg-teal { background-color: #b2f5ea; color: #234e52; } /* Early Out */
.bg-blue { background-color: #bee3f8; color: #2a4365; } /* Overtime */
.bg-indigo { background-color: #c3dafe; color: #434190; } /* Avg Hrs */
.bg-yellow { background-color: #fefcbf; color: #975a16; } /* NEW: For History */

/* Summary Box */
.summary-container { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.sum-box { flex: 1; min-width: 22%; padding: 10px 5px; border-radius: 8px; font-size: 11px; font-weight: 600; text-align: center; cursor: pointer; transition: transform 0.1s;}
.sum-box:active { transform: scale(0.95); }
.sum-box span { display: block; font-size: 16px; font-weight: 700; margin-top: 4px; }

/* ==========================================================================
   ATTENDANCE DESKTOP & MOBILE RESPONSIVE TWO-COLUMN LAYOUT
   ========================================================================== */

.attendance-main-container {
    max-width: 1350px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
    padding: 16px 20px 90px 20px !important;
}

/* Default Mobile: Stacked single column */
.attendance-desktop-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.attendance-left-pane {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.attendance-right-pane {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.kpi-panel-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.attendance-details-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

/* Desktop Two-Column Layout (min-width: 992px) */
@media (min-width: 992px) {
    .attendance-desktop-layout {
        display: grid;
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
        gap: 24px;
        align-items: start;
    }

    .attendance-left-pane {
        position: relative;
    }

    .attendance-right-pane {
        position: sticky;
        top: 75px;
        z-index: 10;
    }

    /* Compact 4-column KPI grid on desktop */
    .summary-container {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 8px !important;
        margin-top: 0 !important;
    }

    .sum-box {
        min-width: unset !important;
        flex: unset !important;
        padding: 8px 4px !important;
    }

    .sum-box div:first-child {
        font-size: 10.5px !important;
    }

    .sum-box div:last-child {
        font-size: 16px !important;
    }
}

/* Extra Large Screens (min-width: 1200px) */
@media (min-width: 1200px) {
    .attendance-desktop-layout {
        grid-template-columns: 1.2fr 0.8fr;
        gap: 28px;
    }
}

/* Mini List Styles (Modal & Details Panel) */
.mini-emp-card { padding: 12px; border-bottom: 1px solid #e2e8f0; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.mini-emp-card:hover { background: #f8fafc; }
.mini-emp-name { font-size: 14px; font-weight: 600; }

.list-row { display: flex; justify-content: space-between; align-items: center; background: #f8fafc; padding: 10px; border-radius: 8px; border-left: 4px solid #cbd5e0;}
.list-row.bg-orange { border-left-color: #c05621; background: #fff;}
.list-row.bg-purple { border-left-color: #553c9a; background: #fff;}
.list-row.bg-teal { border-left-color: #234e52; background: #fff;}
.list-row.bg-blue { border-left-color: #2a4365; background: #fff;}
.list-date { font-weight: 600; font-size: 13px; color: #1a202c;}
.list-info { font-size: 11px; color: #718096;}
.list-val { font-weight: bold; font-size: 13px; color: #3182ce;}
.bg-cyan { background-color: #e6fffa; color: #285e61; } /* NEW: For Half Day */
.list-row.bg-cyan { border-left-color: #285e61; background: #fff;}
