*{
box-sizing:border-box;
}

body{
margin:0;
padding:0;
overflow-x:hidden;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: radial-gradient(
        circle at 50% 0%,
        #2F3742 0%,
        #1a2026 100%
    );
    color: #FFFFFF;
    height: 100vh;
    overflow-x: hidden;
}

h2 {
    color: #FFFFFF;
    text-shadow: 0 0 10px rgba(77,239,255,0.2);
    font-weight: 600;
    margin-top: 5px;    /* Change: set a small specific top margin */
    margin-bottom: 15px;
}

.container {
    display: flex;
    height: calc(100vh - 100px); 
    width: 100%;
    margin-top: 100px; /* Reduced to match header height exactly */
}
.column {
    padding: 0 15px 15px 15px; /* Change: top padding from 15px to 0 */
    overflow-y: auto;
    position: relative;
}

.column.left h2, .column.right h2 {
    margin-top: 5px !important; /* Forces the text up to the red line area you marked */
}
.left, .center, .right {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}


/* Flexible side-by-side panels - FIXED FOR RESPONSIVENESS */
.left {
    width: 25% !important; /* Forces fixed proportion */
    display: block;
    background: rgba(47, 55, 66, 0.6);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    color: #B8C0CC;
    min-width: 0; /* Allows it to shrink below 200px if needed */
}

.center {
    width: 50% !important; /* Center panel gets half the screen */
    background: rgba(30, 36, 44, 0.7);
    text-align: center;
    padding-bottom: 80px;
    min-width: 0;
}

.right {
    width: 25% !important; /* Forces fixed proportion */
    display: block;
    background: rgba(47, 55, 66, 0.6);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    color: #B8C0CC;
    min-width: 0;
}
/* This container allows the title to be in the dead center */
.panel-header-container {
    position: relative; 
    padding: 20px 0;   
    width: 100%;
    display: flex;
    justify-content: center; /* This forces the H2 to the center */
    align-items: center;
    margin-bottom: 20px;
    min-height: 45px; /* Ensures layout doesn't jump */
}

/* The title will now ignore the space the button takes up */
#panelTitle {
    margin: 0;
    text-align: center;
    width: 100%; /* Occupies full width to ensure true center */
}

.back-btn {
    background: transparent;
    border: 1px solid rgba(77, 239, 255, 0.3);
    color: #4DEFFF;
    font-size: 18px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

.back-btn:hover {
    background: rgba(77, 239, 255, 0.1);
    border-color: #4DEFFF;
    transform: translateX(-3px); /* Subtle slide effect when hovering */
}

.back-btn i {
    font-weight: bold;
}
/* Right Panel */
.right {
    width: 25%;
    background: rgba(47, 55, 66, 0.6);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    color: #B8C0CC;
}

/* ===============================
   FILTER BAR & CHIPS
================================ */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.filter-chip {
    padding: 8px 16px;
    border-radius: 20px;
    background: #2F3742;
    color: #B8C0CC;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid #3F4A59;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.filter-chip:hover {
    background: #3A4452;
    color: #FFFFFF;
    border-color: #5BCBFF;
    box-shadow: 0 0 10px rgba(77, 239, 255, 0.2);
}

.filter-chip.active {
    background: rgba(77, 239, 255, 0.12);
    color: #4DEFFF;
    border-color: #4DEFFF;
    box-shadow:
        0 0 0 1px rgba(77, 239, 255, 0.5),
        0 5px 15px rgba(77, 239, 255, 0.25);
}

/* ===============================
   EMPLOYEE SEARCH INPUT
================================ */
.emp-search {
    width: 90%;
    padding: 10px 12px;
    margin: 0 auto 15px auto;
    display: block;
    border-radius: 12px;
    border: 1px solid #3F4A59;
    font-size: 13px;
    outline: none;
    background: #2F3742;
    color: #FFFFFF;
    transition: all 0.3s ease;
}

.emp-search::placeholder {
    color: #8A94A6;
}

.emp-search:focus {
    border-color: #4DEFFF;
    box-shadow: 0 0 0 2px rgba(77, 239, 255, 0.3);
}

/* ===============================
   EMPLOYEE CARDS
================================ */
.emp-item {
    display: flex;
    align-items: center;
    gap: 6px;             /* Reduced gap to save horizontal space */
    padding: 6px 4px;     /* Reduced side padding */
    margin-bottom: 8px;
    height: auto;
    min-height: 65px !important;
    position: relative;
    background: #2F3742;
    border-radius: 10px;
    border: 1px solid #3F4A59;
    color: #FFFFFF;
    transition: all 0.2s ease;
    cursor: pointer;
    box-sizing: border-box; /* ✅ CRITICAL: Keeps everything inside the 25% width */
}



.emp-item:hover {
    transform: translateY(-3px);
    background: #3A4452;
    border-color: #4DEFFF;
    box-shadow:
        0 0 0 1px rgba(77, 239, 255, 0.3),
        0 10px 25px rgba(0, 0, 0, 0.4);
}

.emp-photo {
    width: 30px !important;  /* Reduced from 40px to leave room for text */
    height: 30px !important;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;          /* ✅ Prevents the photo from getting squashed */
    border: 2px solid #5BCBFF;
}
.emp-text {
    flex: 1;              /* ✅ Forces name to fill the middle space */
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;      /* ✅ Essential for text-overflow to work */
    min-width: 0;          /* ✅ Standard flex fix for disappearing text */
}

/* Force the name text to shrink but stay visible */
   /* ✅ Fix: Allow names to wrap to multiple lines so they are never cut off */
.emp-text strong {
    display: block;
    width: 100% !important;
    white-space: normal !important; /* ✅ Changed from 'nowrap' to allow wrapping */
    word-wrap: break-word;          /* Ensures long names break to next line */
    overflow: visible !important;   /* ✅ Stop hiding the text */
    text-overflow: clip !important; /* Removes the "..." dots */
    font-size: 11px !important;    /* Slightly larger for desktop readability */
    line-height: 1.2;
    margin-bottom: 2px;
}

.emp-text small {
    display: block;
    font-size: 9px !important;
    opacity: 0.8;
    white-space: normal !important;
}
/* ===============================
   STATUS BADGES / STATES
================================ */

/* Checked-In State (Neon Pulse) */
.status-checkedin {
    background: rgba(77, 239, 255, 0.1);
    color: #4DEFFF;
    border: 1px solid rgba(77, 239, 255, 0.5);
}

.status-checkedin:hover {
    box-shadow:
        0 0 0 2px rgba(77, 239, 255, 0.4),
        0 0 20px rgba(77, 239, 255, 0.25);
}

/* Absent State (Muted Dark) */
.emp-item.name-absent {
    background: rgba(26, 32, 38, 0.8); /* Solid dark background */
    border: 1px dashed #FF6B6B;
    opacity: 1 !important; /* Forces the card to not be blurry */
}

.emp-item.name-absent .emp-text strong {
    color: #FFFFFF !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8); /* Sharp shadow for readability */
    opacity: 1 !important;
}

.emp-item.name-absent .emp-text small {
    color: #B8C0CC !important;
    opacity: 1 !important;
}
.emp-item.name-absent:hover {
    opacity: 1;
    border-style: solid;
    border-color: #8A94A6;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
}



/* Absent Badge */
.emp-item.name-absent::after {
    content: "ABSENT";
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: #3F4A59;
    color: #B8C0CC;
}

/* ===============================
    CAMERA & IMAGES
================================ */
.camera-wrapper {
    width: 330px !important;       /* Slightly larger than video */
    height: 330px !important;      /* MUST MATCH WIDTH */
    border-radius: 50% !important; /* Force circle */
    overflow: hidden;
    margin: 20px auto;
    background: rgba(30, 36, 44, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid #3F4A59;
}
/* Update this block in Emp.css */
#video, #canvas, .checkin-image, #checkoutPhoto {
    width: 320px !important;      /* Fixed Width */
    height: 320px !important;     /* FIXED HEIGHT - THIS STOPS THE OVAL */
    min-width: 320px !important;
    min-height: 320px !important;
    border-radius: 50% !important;
    object-fit: cover !important; /* CROP SIDES, DON'T STRETCH */
    display: block;
    margin: 0 auto; 
    border: 4px solid #4DEFFF;
    transform: scaleX(-1); 
    background: #000;
    image-rendering: -webkit-optimize-contrast;
}
/* ===============================
   BUTTONS (CYAN NEON)
================================ */
button, input[type=submit] {
    padding: 12px 24px;
    margin: 10px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    background: #4DEFFF; /* Primary Neon */
    color: #1a2026;      /* Dark Text */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(77, 239, 255, 0.3);
}

button:hover, input[type=submit]:hover {
    transform: translateY(-2px);
    background: #5BCBFF;
    box-shadow:
        0 0 0 2px rgba(77, 239, 255, 0.6),
        0 12px 28px rgba(77, 239, 255, 0.4);
}

/* ===============================
   AUTO MESSAGES (TOASTS)
================================ */
.auto-message {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    min-width: 300px;
    padding: 15px 25px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    display: none;
    z-index: 9999;
   
    /* Dark Glass Default */
    background: rgba(26, 32, 38, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid #3F4A59;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    animation: fadeSlide 0.3s ease;
}

/* Success / Check-In Message */
.msg-in {
    background: rgba(26, 32, 38, 0.95);
    color: #4DEFFF;
    border-color: #4DEFFF;
    box-shadow: 0 0 20px rgba(77, 239, 255, 0.2);
}

/* Check-Out Message */
.msg-out {
    background: rgba(26, 32, 38, 0.95);
    color: #B8C0CC;
    border-color: #B8C0CC;
}

@keyframes fadeSlide {
    from { opacity: 0; transform: translate(-50%, -20px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* ===============================
   LATE BADGE
================================ */
.late-badge {
    position: absolute;
    top: 6px;
    right: 8px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 4px;
    
    /* CRITICAL: Fixed height prevents pushing hours text down */
    height: 18px !important;
    max-height: 18px !important;
    padding: 2px 8px;
    
    background: #2F3742;
    border: 1px solid #3F4A59;
    border-radius: 6px;
    overflow: visible; /* Allows the heart glow to show outside the box */
    z-index: 100;
}

/* Green Highlight for "On time" */
.late-badge:contains("On time") {
    color: #00FF94;
    border-color: #00FF94;
}
/* 🔍 SEARCH HIDE FIX */
.search-hide {
    display: none !important;
}

/* ===============================
   WORK TIME (TOTAL HOURS)
================================ */
.work-time {
    display: block;
    margin-top: 14px;   /* ✅ pushes it below badge */
    font-size: 11px;    /* ✅ smaller font */
    color: #7fffd4;
    line-height: 1.4;
}
.late-badge {
    position: absolute;
    top: 6px;
    right: 8px;
    display: inline-flex !important; /* Forces horizontal alignment */
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 20px;       /* Fixed height to prevent pushing text down */
    max-height: 20px;
    overflow: visible;  /* Allows the heart glow to show but not push content */
    padding: 2px 8px;
    z-index: 100;       /* Keeps it on top of the card background */
}


/* ✅ ON TIME (GREEN) */
.late-badge.on-time {
    color: #00FF94;
    border-color: #00FF94;
    box-shadow: 0 0 8px rgba(0,255,148,0.4);
}

/* ❌ LATE (RED) */
.late-badge.late {
    color: #FF6B6B;
    border-color: #FF6B6B;
}

/* ===============================
   FOOTER
================================ */
.footer {
    position: fixed;
    bottom: 8px;
    width: 100%;
    text-align: center;
    font-size: 11px;
    color: #8A94A6;
    opacity: 0.85;
    line-height: 1.6;
}


.footer-link {
    color: #4DEFFF;
    text-decoration: none;
    font-weight: 500;
    pointer-events: auto;
    cursor: pointer;
}

.footer-link:hover {
    text-shadow: 0 0 8px rgba(77,239,255,0.6);
}

/* ===== CHECKED-IN LIST ALIGNMENT FIX ===== */

/* Fixed Row Layout to prevent spill */
.checkin-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100% !important;
    box-sizing: border-box; /* Ensures padding is included in width */
}

.checkin-info {
    flex: 1; /* Takes remaining space */
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Prevents long names from pushing timings out */
}



.checkin-info strong {
    font-size: 13px;
}

.checkin-info small {
    font-size: 11px;
    color: #8A94A6;
}

.checkin-time {
    width: 110px !important; /* ✅ Reduced from 135px to give name more space */
    text-align: right;
    font-size: 11px;
    color: #7fffd4;
    white-space: nowrap;
    margin-top: 18px !important; 
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
/* keep red badge top-right */
.status-checkedin .late-badge {
    position: absolute;
    top: 8px;
    right: 10px;
}
//* Ensure name-present removes the absent badge */
.emp-item.name-present::after {
    display: none !important;
}

/* Red-ish style for people who haven't checked in yet */
.emp-item.name-absent {
    background: rgba(255, 99, 132, 0.05);
    border: 1px dashed #FF6B6B;
    opacity: 0.7;
}

.emp-item.name-absent::after {
    content: "ABSENT";
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: #FF6B6B;
    color: white;
    z-index: 5;
}

/* ===== Fullscreen Icon – FINAL FIX ===== */

.btn-icon { 
    width: 42px;
    height: 42px;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;
}

/* THIS is the key */
.fs-icon {
    font-size: 16px;              
    line-height: 1;
    display: inline-block;

    transform: scale(1.6);       
    transform-origin: center;
}

.status-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 20;
}

.badge-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px; 
    background: transparent; 
    border: none; 
    text-shadow: 0 0 10px rgba(77, 239, 255, 0.8), 0 0 20px rgba(77, 239, 255, 0.4); 
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}
/* Removes the red ABSENT badge for people who checked out today */
.emp-item.name-finished::after {
    display: none !important;
}

/* Subtle styling for finished employees */
.emp-item.name-finished {
    background: rgba(77, 239, 255, 0.04);
    border: 1px solid rgba(77, 239, 255, 0.2);
    opacity: 0.95;
}

/* Ensure icons don't wrap strangely */
.status-badge {
    display: flex;
    gap: 5px;
    align-items: center;
}

/* ✅ STYLING FOR DISABLED BUTTONS */
button:disabled, input[type=submit]:disabled, .btn-disabled {
    opacity: 0.5 !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
    filter: grayscale(1);
}

/* ✅ 2. Adjust heart sizes to fit within the 18px height */
/* Ensures the Icon and Number stay perfectly aligned horizontally */
.heart-streak {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.mid-streak {
    font-size: 14px; /* Medium heart */
    filter: drop-shadow(0 0 4px #ff4d4d);
}

.super-streak {
    display: inline-block;
    animation: heartPulse 1.5s infinite ease-in-out;
    filter: drop-shadow(0 0 5px #ff69b4); 
}

/* ✅ 3. Gentle heartbeat scale so it doesn't overlap text */
@keyframes heartPulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* --- KEEP 3 PANELS SIDE-BY-SIDE ON ALL DEVICES --- */
@media (max-width: 1024px) {
    
    #video, #canvas, .checkin-image {
        width: 220px !important;
        height: 220px !important;
    }
    h2 { font-size: 18px; }
    .emp-text strong { font-size: 11px; }
}

/* =======================================================
   TRUE MOBILE LAYOUT 
======================================================== */
@media screen and (max-width: 768px) {
    
    #btnBack, .back-btn {
        display: none !important; /* Forces the button to stay hidden on mobile */
    }
    /* ADD #historicalReport TO THIS LIST */
    .top-header,
    #subGreeting,
    .filter-bar,
    .column.left,
    #historicalReport 
    .btn-trophy-only,    /* <--- Hides the Trophy and Flame buttons */
    .header-right,
    #btnBack{      /* <--- Hides the entire right-side button group */
        display: none !important;
    }

    /* 2.  THE MAIN CONTAINER TO STACK VERTICALLY */
    .container {
        display: flex !important;
        flex-direction: column !important;
        margin-top: 0 !important;
        height: auto !important;
        min-height: 100vh !important;
        padding: 10px !important;
    }

    /* 3. CENTER COLUMN */
    .column.center {
        width: 100% !important;
        max-width: 100% !important;
        order: 1 !important; 
        padding: 0 0 20px 0 !important;
        border: none !important;
    }

    /* 4. RIGHT COLUMN */
    .column.right {
        width: 100% !important;
        max-width: 100% !important;
        order: 2 !important;
        padding: 20px 0 0 0 !important;
        border-left: none !important; 
        border-top: 2px solid rgba(77, 239, 255, 0.2) !important;
    }

    /* 5. FIX CAMERA & UI SIZING FOR SMALL SCREENS */
    .camera-wrapper {
        width: 250px !important;
        height: 250px !important;
        margin: 10px auto !important;
    }
    
    #video, 
    #canvas, 
    .checkin-image, 
    #checkoutPhoto {
        width: 230px !important;
        height: 230px !important;
    }

    #panelTitle {
        font-size: 1.6rem !important;
        margin-top: 15px !important;
    }
}

/* Add this inside your <style> tag */
.blink-slow {
    animation: pulse-cyan 3s infinite ease-in-out;
}

@keyframes pulse-cyan {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* This handles the sliding effect for both bars */
#divPulseBar, #divVelocityBar {
    transition: width 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}


#divPulseBar {
    box-shadow: 0 0 8px rgba(77, 239, 255, 0.4);
}

/* ✅ FORCE GREY STYLE FOR DISABLED BUTTONS */
input[type="submit"]:disabled, 
button:disabled, 
.btn-header:disabled, 
.btn-premium:disabled {
    background: #555555 !important;
    color: #888888 !important;
    opacity: 0.6 !important;
    filter: grayscale(1) !important;
    cursor: not-allowed !important;
    border-color: #444444 !important;
    box-shadow: none !important;
    pointer-events: none !important;
}
/* Position the HR Icon to the left of the text */
.hr-dashboard-btn {
    position: absolute;
    left: 20px;
    top: 15px;
    width: 42px;
    height: 42px;
    background: rgba(77, 239, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(77, 239, 255, 0.3);
    border-radius: 12px;
    color: #4DEFFF;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
}


/* Sidebar & Layout Fixes */
.hide-sidebars { display: none !important; }
.center-full-width { width: 100% !important; max-width: 100% !important; flex: 1 !important; }

/* 🚀 THE TABLE-STYLE CONTAINER */
.dept-board-container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 15px;
    padding: 20px;
    overflow-x: auto; 
    min-height: 80vh;
}

/* 🚀 THE VERTICAL COLUMN (One per Department) */
.dept-column {
    flex: 1;
    min-width: 160px; 
    max-width: 220px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
}

/* 🚀 THE TABLE HEADER (Department Name) */
.dept-table-header {
    background: rgba(77, 239, 255, 0.1);
    border-bottom: 2px solid #4DEFFF;
    padding: 10px;
    color: #4DEFFF;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    text-align: center;
    border-radius: 12px 12px 0 0;
    letter-spacing: 1px;
}

/* 🚀 THE CARD AREA UNDER THE HEADER */
.dept-card-list {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Professional Compact Cards */
.hr-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
}

.hr-card:hover { background: rgba(77, 239, 255, 0.05); border-color: #4DEFFF; }

.hr-photo-circle {
    width: 35px; height: 35px;
    border-radius: 50%;
    border: 1.5px solid #4DEFFF;
    object-fit: cover;
}

.hr-card-info { text-align: left; overflow: hidden; }

.hr-card-name {
    font-size: 10px;
    font-weight: 600;
    color: #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.hr-card-time { font-size: 9px; color: #7fffd4; font-weight: 700; }

/* 🎂 Modern Birthday Celebration Style */
.birthday-mode {
    background: linear-gradient(135deg, rgba(255, 105, 180, 0.2) 0%, #2F3742 100%) !important;
    border: 1.5px solid #FF69B4 !important; /* Birthday Pink */
    box-shadow: 0 0 15px rgba(255, 105, 180, 0.4) !important;
}

.bday-icon {
    margin-left: 8px;
    font-size: 14px;
    display: inline-block;
    filter: drop-shadow(0 0 5px #FF69B4);
    animation: bdayBounce 1s infinite;
}

@keyframes bdayBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* 🚫 No Scrollbar + Professional Theme */
#leaderboardList {
    -ms-overflow-style: none;
    scrollbar-width: none;
    max-height: 600px;
}
#leaderboardList::-webkit-scrollbar { display: none; }

.reliability-card {
    display: flex;
    align-items: center;
    padding: 14px;
    background: linear-gradient(90deg, rgba(77, 239, 255, 0.05) 0%, rgba(0, 0, 0, 0) 100%) !important;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(77, 239, 255, 0.15) !important;
}

/* Rank Number - Vibrant Electric Cyan */
.rank-number {
    font-size: 20px;
    font-weight: 900;
    color: #00E5FF !important; /* Bright Electric Cyan */
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
    width: 40px;
}

/* Day Count - Deep Emerald Green */
.streak-count {
    text-align: right;
    color: #00FF9D !important; /* Vivid Emerald */
    font-weight: 800;
    text-shadow: 0 0 12px rgba(0, 255, 157, 0.3);
}



/* =======================================================
    TRUE MOBILE-FIRST APP OVERHAUL (LAPTOP SAFE)
======================================================== */

@media screen and (max-width: 900px) {

    .personal-card-active {
        background: rgba(77, 239, 255, 0.1) !important;
        border: 1px solid rgba(77, 239, 255, 0.4) !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        margin-top: 5px !important;    /* Tightened top */
        margin-bottom: 8px !important; /* Reduced gap below card */
        width: 100% !important;
        animation: slideDown 0.5s ease;
    }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
    /* 1. HIDE KIOSK ELEMENTS ON MOBILE */
    .column.left, .filter-bar, .top-header, #subGreeting, .footer {
        display: none !important;
    }

    /* 2. VERTICAL CONTAINER STACK */
    .container {
        display: flex !important;
        flex-direction: column !important;
        margin-top: 0 !important;
        height: auto !important;
        min-height: 100vh !important;
    }

    /* 3. MOBILE ORDER & CENTER ALIGNMENT */
   .column.center { 
        order: 1 !important; 
        width: 100% !important; 
        padding: 5px 10px !important; /* Pulls content to the very top */
        border: none !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important; 
    }

    #panelTitle {
        font-size: 1.5rem !important; 
        margin-top: 0px !important;    /* No gap above Name */
        margin-bottom: 2px !important; /* Tight gap below Name */
    }
    
    /* ✅ REPLACE THE OLD .column.right block WITH THIS */
.column.right {
    order: 2 !important;
    width: 100% !important;
    padding: 0px !important; 
    border-top: 1px solid rgba(77, 239, 255, 0.1) !important;
    background: transparent !important;
     pointer-events: auto !important;
    /* pointer-events: none is REMOVED so the button works */
}

#staffListWrapper .emp-item {
        pointer-events: none !important;
        cursor: default !important;
    }

   

@keyframes fadeIn {
    from { opacity: 0; } to { opacity: 1; }
}

    /* 4. PROFESSIONAL LEAVE POPUP (CENTERED OVERLAY) */
    .modal-overlay {
        position: fixed !important;
        top: 0 !important; left: 0 !important;
        width: 100vw !important; height: 100vh !important;
        background: rgba(0, 0, 0, 0.85) !important;
        z-index: 100000 !important;
        display: none; /* Managed by JS selectEmployee */
        align-items: center;
        justify-content: center;
        padding: 15px;
    }

    .modal-content {
        width: 92% !important;
        max-width: 380px;
        padding: 25px 20px !important;
        border-radius: 24px !important;
        background: #1a2026 !important;
        border: 1px solid rgba(77, 239, 255, 0.3) !important;
        display: flex;
        flex-direction: column;
        gap: 15px;
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    }

    /* 5. MODAL HEADER & CLOSE BUTTON FIX */
    .modal-header {
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        padding-bottom: 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        margin-bottom: 10px;
    }

    .modal-header h3 {
        margin: 0 !important;
        font-size: 18px !important;
        color: #4DEFFF !important;
        text-align: center;
    }
   /* 🚀 THE FIX: Hide date containers by default on Mobile */
    #singleDateField, 
    #rangeDateFields {
        display: none !important; 
    }

    /* 📅 Calendar Icon Fix: Makes sure the date picker is clickable */
    input[type="date"]::-webkit-calendar-picker-indicator {
        background-color: #4DEFFF;
        border-radius: 4px;
        padding: 2px;
        cursor: pointer;
    }
    .close-modal {
        position: absolute !important;
        top: -5px; right: 0;
        font-size: 28px !important;
        color: #8A94A6 !important;
        cursor: pointer;
    }

    /* 6. PROFESSIONAL INPUT STACKING */
    .input-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px;
    }

    .input-field {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        width: 100% !important;
    }

    .input-field label {
        color: #8A94A6 !important;
        font-size: 11px !important;
        text-transform: uppercase;
        margin-bottom: 5px !important;
        font-weight: bold;
    }

    .input-field input, .input-field textarea {
        width: 100% !important;
        background: rgba(0, 0, 0, 0.2) !important;
        border: 1px solid #3F4A59 !important;
        border-radius: 10px !important;
        padding: 12px !important;
        color: white !important;
    }

    /* 🚀 7. UNIFORM BUTTON SIZES (UNLOCKED) */
    #btnCheckIn, #btnCheckOut, #btnEndBreak, #btnCommonBreak, #btnLunchBreak, .btn-header, .btn-premium {
        width: 95% !important;
        height: 55px !important; /* ✅ Uniform height */
        font-size: 16px !important;
        margin: 10px auto !important;
        border-radius: 15px !important;
        display: inline-block; /* Allows JS to control visibility */
    }

    /* 8. SIDE-BY-SIDE BUTTONS (BREAK/LUNCH) */
    #breakControls { width: 100% !important; display: none; } 
    #breakControls > div > div {
        display: flex !important;
        flex-direction: row !important;
        gap: 10px !important;
        width: 95% !important;
        margin: 0 auto !important;
    }
    #btnCommonBreak, #btnLunchBreak { flex: 1 !important; margin: 0 !important; }

    /* ✅ ADD SPACE BETWEEN CAMERA/PHOTO AND THE ID/ROLE TEXT */
#employeeDetails {
        margin-top: 0px !important;    /* Pulls Role closer to Name */
        margin-bottom: 8px !important; /* Space before camera */
        font-size: 0.9rem !important;
    }

    #video, #checkoutPhoto, .checkin-image {
        margin-top: 5px !important;    /* Pulls camera up significantly */
        width: 230px !important;
        height: 230px !important;
    }
}

/* 💻 LAPTOP RESTORATION: Ensure sidebars are visible on large screens */
@media screen and (min-width: 769px) {

    /* --- PASTE THE FIX HERE --- */
    .modal-overlay {
        display: none; 
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: rgba(0, 0, 0, 0.8) !important;
        backdrop-filter: blur(8px);
        z-index: 200000 !important; 
        align-items: center;
        justify-content: center;
    }

    .modal-content {
        width: 400px !important;
        margin: auto !important;
        background: #1a2026 !important;
        border: 1px solid rgba(77, 239, 255, 0.4) !important;
        padding: 30px !important;
        border-radius: 20px !important;
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.7);
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    /* --- Fix the internal inputs for Desktop --- */
.modal-content h3 {
    font-size: 22px !important;
    margin-bottom: 20px !important;
    color: #4DEFFF;
    text-align: center;
}

.modal-content .input-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important; 
}

/* REMOVED !important from display here so JS can hide/show them */
.modal-content .input-field {
    width: 100% !important;
    flex-direction: column !important;
    gap: 8px !important;
    /* Removed 'display: flex !important' */
}

/* Ensure hidden fields STAY hidden even on Desktop */
/* 1. Hide the date containers by default on Desktop */
#singleDateField, 
#rangeDateFields {
    display: none !important; 
}

/* 2. When the JS adds the style to show them, we allow it */
.modal-content .input-field[style*="display: block"],
.modal-content .input-field[style*="display: flex"] {
    display: flex !important;
}

.modal-content label {
    font-size: 11px !important;
    color: rgba(77, 239, 255, 0.8) !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.modal-content input, 
.modal-content select, 
.modal-content textarea {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(77, 239, 255, 0.2) !important;
    border-radius: 12px !important;
    padding: 12px 15px !important;
    color: white !important;
    font-size: 14px !important;
    width: 100% !important;
}

/* Fix the Leave Button at the bottom */
.modal-content button[type="submit"] {
    margin-top: 10px !important;
    width: 100% !important;
    height: 50px !important;
    background: #4DEFFF !important;
    color: #1a2026 !important;
}
    .column.left, .column.right { display: block !important; width: 25% !important; }
    .column.center { width: 50% !important; }
    .container { flex-direction: row !important; margin-top: 100px; }
    .top-header { display: flex !important; }
    
}

/*New Updates*/

@media screen and (min-width: 1024px) {

    .container{
        display:flex !important;
        flex-direction:row !important;
        align-items:stretch;
        justify-content:space-between;
        gap:20px;
        width:100%;
        margin-top:90px;
        padding:0 20px;
    }

    .column.left{
        width:25% !important;
        max-width:25%;
        display:block !important;
    }

    .column.center{
        width:50% !important;
        max-width:50%;
        display:flex;
        flex-direction:column;
        align-items:center;
        justify-content:flex-start;
    }

    .column.right{
        width:25% !important;
        max-width:25%;
        display:block !important;
    }

}
.column.right{
    max-height:calc(100vh - 120px);
    overflow-y:auto;
}

/* Desktop: Hide the button, show the list */
@media screen and (min-width: 901px) {
    #btnToggleStaff { display: none !important; }
    #staffListWrapper { display: block !important; }
}

/* Mobile: Show the button, hide the list by default */
@media screen and (max-width: 900px) {
    #btnToggleStaff { display: block !important; }
    #staffListWrapper { display: none; }
}

@media screen and (max-width: 900px) {
    /* Hide side columns for Personal Mobile View */
    .column.left, .top-header, .filter-bar {
        display: none !important;
    }

    /* Make the center column fill the whole phone screen */
    .container {
        flex-direction: column !important;
        margin-top: 0 !important;
    }

    .column.center {
        width: 100% !important;
    }

    /* Shrink the camera for phone screens */
    #video, #checkoutPhoto, .checkin-image {
        width: 250px !important;
        height: 250px !important; /* Match width for perfect circle */
        object-fit: cover !important;
        border-radius: 50% !important;
    }
}
/* Hide My Dashboard card on Desktop (screens larger than 900px) */
@media screen and (min-width: 901px) {
    #personalStatusContainer {
        display: none !important;
    }
}

/* Enhanced Header Layout */
.desktop-checked-header {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
}

/* The Modern Professional Badge */
.count-badge {
    background: rgba(77, 239, 255, 0.1);
    backdrop-filter: blur(8px); /* Glass effect */
    color: #4DEFFF;
    border: 1px solid rgba(77, 239, 255, 0.5);
    padding: 4px 12px;
    border-radius: 30px; /* Capsule shape */
    font-size: 12px;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 0 15px rgba(77, 239, 255, 0.2);
    transition: all 0.3s ease;
}

/* 🟢 The "Live" Pulse Dot */
.count-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #4DEFFF;
    border-radius: 50%;
    display: inline-block;
    animation: livePulse 1.5s infinite;
}

/* Pulsing Animation */
@keyframes livePulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(77, 239, 255, 0.7); }
    70% { transform: scale(1.2); box-shadow: 0 0 0 6px rgba(77, 239, 255, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(77, 239, 255, 0); }
}

/* Subtle Hover Effect */
.count-badge:hover {
    background: rgba(77, 239, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 0 20px rgba(77, 239, 255, 0.4);
}

/* 🚀 Minimalist Top-Right Logout */
.mobile-top-logout {
    position: absolute;
    top: 5px;
    right: 15px;
    display: none; /* Hidden by default for desktop */
    z-index: 10001;
}

.mobile-top-logout span {
    color: #FF6B6B;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
    text-transform: uppercase;
    opacity: 0.8;
}

/* Show only on Mobile View */
@media screen and (max-width: 768px) {
    .mobile-top-logout {
        display: block !important;
    }
    /* Hide the old button if you haven't removed it yet */
    .mobile-only-logout, .mobile-logout-container { display: none !important; }
}

/* Ensure Reset button is visible when requested on Desktop */
@media screen and (min-width: 769px) {
    #btnBack.back-btn {
        z-index: 10005 !important;
        opacity: 1 !important;
    }
}
* =========================================
   NEW Updates
========================================= */


.powered-by {
    margin-top: auto;
    text-align: center;
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    padding: 10px 0;
}


@media screen and (min-width: 1024px) {
    .column.center {
        display: flex !important;
        flex-direction: column !important;
    }
}
/* 📱 Add space at the bottom so the new nav bar doesn't hide your footer */
@media screen and (max-width: 768px) {
    .column.center {
        padding-bottom: 100px !important; 
    }
    
    /* This makes sure your footer text isn't hidden behind the buttons */
    .powered-by {
        margin-bottom: 80px !important;
    }
}

/* 🚀 Prevent Desktop Overlap during Audit */
@media screen and (min-width: 769px) {
    /* If the report is active, force hide the live elements */
    #historicalReport[style*="display: block"] ~ #video,
    #historicalReport[style*="display: block"] ~ #employeeDetails,
    #historicalReport[style*="display: block"] ~ #checkoutPhoto,
    #historicalReport[style*="display: block"] ~ #btnCheckIn,
    #historicalReport[style*="display: block"] ~ #btnCheckOut {
        display: none !important;
    }

    /* Ensure the Audit Name doesn't collide with the header */
    #historicalReport {
        margin-top: 20px;
        position: relative;
        z-index: 10;
        width: 100%;
    }
}


/* Circular Progress look */
.pulse-circle {
    margin: 20px auto; 
    width: 130px; 
    height: 130px; 
    border: 8px solid rgba(77, 239, 255, 0.1); 
    border-top: 8px solid #4DEFFF; /* Progress effect */
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    box-shadow: 0 0 20px rgba(77, 239, 255, 0.15);
}
.pulse-value { font-size: 28px; font-weight: 800; color: white; }

/* Audit Cards */
.audit-card {
    background: rgba(255, 255, 255, 0.04); 
    padding: 20px 10px; 
    border-radius: 18px; 
    text-align: center; 
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.audit-card small { color: #8A94A6; font-weight: 700; letter-spacing: 1px; font-size: 10px; }
.audit-card .val { font-size: 22px; font-weight: 800; color: white; margin-top: 5px; }

/* Simple Spinner */
.loader-spinner {
    width: 30px; height: 30px; border: 3px solid rgba(77, 239, 255, 0.2);
    border-top-color: #4DEFFF; border-radius: 50%; animation: spin 0.8s linear infinite;
    margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- MOBILE VIEW ONLY: BOTTOM NAVIGATION BAR --- */
@media screen and (max-width: 768px) {
   .personal-trigger-container {
        display: flex !important; 
        position: fixed !important; 
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        background: rgba(10, 12, 16, 0.98) !important; 
        backdrop-filter: blur(15px);
        border-top: 1px solid rgba(77, 239, 255, 0.2);
        padding: 10px 5px 25px 5px !important; 
        z-index: 99999;
        margin: 0 !important;
        width: 100% !important;
        justify-content: space-around;
        align-items: center;
    }

    .btn-personal {
        background: transparent !important; /* No background box, just icons */
        border: none !important;
        color: #8A94A6 !important; /* Muted color when not clicked */
        display: flex !important;
        flex-direction: column !important; /* Icon on top, Text on bottom */
        align-items: center !important;
        gap: 5px;
        flex: 1;
        font-size: 10px !important;
        font-weight: 600;
        transition: 0.2s ease;
    }

    /* Target the Icons inside the buttons */
    .btn-personal i {
        font-size: 20px !important;
        color: #4DEFFF !important; /* Glowing Cyan Icon */
    }

    .btn-personal:active {
        transform: scale(0.9);
        opacity: 0.7;
    }

    /* Glassmorphism Popup - No change needed here */
    .glass-modal {
        position: fixed; top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(10, 12, 16, 0.92); backdrop-filter: blur(20px);
        z-index: 100000; display: flex; align-items: center; justify-content: center;
    }
}

/* --- DESKTOP VIEW: HIDE EVERYTHING --- */
@media screen and (min-width: 769px) {
    .personal-trigger-container, .glass-modal {
        display: none !important; 
    }
}

/* 1. Base style (Works for everything) */
.top-left-btn {
    position: absolute;
    left: 15px; 
    top: 50%;
    transform: translateY(-50%);
    
    /* Strip Button Looks */
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    
    /* Icon Styling */
    color: #4DEFFF;
    font-size: 24px;
    cursor: pointer;
    z-index: 10005;
    transition: all 0.3s ease;
    
    /* Default Hidden (Mobile) */
    display: none; 
}

/* 2. Desktop Visibility & Hover */
@media screen and (min-width: 769px) {
    #btnBack.top-left-btn, 
    #btnAuditHome.top-left-btn {
        display: flex !important;
        opacity: 1 !important;
    }

    .top-left-btn:hover {
        color: #FFFFFF;
        text-shadow: 0 0 10px #4DEFFF;
        /* Combines the center-align + the slide left */
        transform: translateY(-50%) translateX(-5px) !important;
    }
}

/* =======================================================
   ✅ PERFECT MOBILE SCROLL FIX (NO EMPTY SPACES)
======================================================= */

.mobile-footer {
    display: none; 
}

@media screen and (max-width: 768px) {
    
    /* 1. Make the black analytics bar slim and compact */
    .personal-trigger-container {
        padding: 8px 5px 8px 5px !important; 
    }

    /* 2. Give the Leave button a small, clean 15px gap so it doesn't touch the black bar */
    #requestButtons {
        margin-bottom: 15px !important; 
    }

    /* 3. Center the mobile footer perfectly */
    .mobile-footer {
        display: block !important;
        width: 100% !important;         
        text-align: center !important;  
        margin-top: 20px !important;
        padding-bottom: 0px !important; 
    }

    /* 4. Keep 60px ONLY in the center so the black bar has room to sit without hiding the Leave button */
    .column.center {
        padding-bottom: 60px !important; 
        max-height: none !important;
        overflow: visible !important;
    }

    /* 5. 🚀 THE ULTIMATE FIX: Change the Right Column padding to 10px! 
       This completely deletes the wasted empty space below the Powered By text! */
    .column.right {
        padding-bottom: 10px !important; 
        max-height: none !important;
        overflow: visible !important;
    }
    
    /* Hide the desktop footer on mobile */
    .desktop-footer {
        display: none !important;
    }
}