:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --primary-light: #4895ef;
    --secondary: #7209b7;
    --accent: #4cc9f0 !important;
    --success: #06d6a0;
    --warning: #ffd166;
    --danger: #ef476f;
    --dark: #1a1a2e;
    --dark-light: #2d3047;
    --light: #f8f9fa;
    --gray: #6c757d;
    --gray-light: #e9ecef;
    --white: #ffffff;
    --card-bg: #ffffff;
    --sidebar-bg: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    --header-bg: #ffffff;
    --shadow-color: rgba(28, 28, 51, 0.1);
    --status-present: #16a34a;   
    --status-inprogress: #2563eb;  
    --status-absent: #dc2626;     
    --status-halfday: #f97316;    
    --status-late: #edd075;     
    --status-pending: #7c3aed; 
    --status-companyholiday: linear-gradient(135deg, #ec9728, #ff7b00);
    --status-onleave: linear-gradient(135deg, #8b5cf6, #6d28d9);
    
    --shadow-sm: 0 2px 4px 0 var(--shadow-color);
    --shadow-md: 0 4px 8px -1px var(--shadow-color), 0 2px 4px -1px var(--shadow-color);
    --shadow-lg: 0 10px 20px -3px var(--shadow-color), 0 4px 6px -2px var(--shadow-color);
    --shadow-xl: 0 20px 25px -5px var(--shadow-color), 0 10px 10px -5px var(--shadow-color);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 50px;
    
    --sidebar-width: 260px;
    --sidebar-width-collapsed: 70px;
    --header-height: 80px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary: #5a6ff0;
    --primary-dark: #4361ee;
    --primary-light: #6a8af9;
    --secondary: #8a2be2;
    --accent: #5dd5fc !important;
    --success: #10e8b5;
    --warning: #ffde7d;
    --danger: #ff6b93;
    --dark: #f1f3f9;
    --dark-light: #d1d5e3;
    --light: #121826;
    --gray: #94a3b8;
    --gray-light: #1e293b;
    --white: #0f172a;
    --card-bg: #1e293b;
    --sidebar-bg: linear-gradient(180deg, #0f172a 0%, #0c1425 100%);
    --header-bg: #1e293b;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --status-present: #16a34a;   
    --status-inprogress: #2563eb;  
    --status-absent: #dc2626;     
    --status-halfday: #f97316;    
    --status-late: #edd075;     
    --status-pending: #7c3aed; 
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    transition: var(--transition);
    overflow-x: hidden;
}

body.modal-open {
    overflow: hidden;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transform: translateX(0);
}

.sidebar.collapsed {
    width: var(--sidebar-width-collapsed);
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .company-name,
.sidebar.collapsed .nav-link span,
.sidebar.collapsed .section-label,
.sidebar.collapsed .sidebar-profile-name,
.sidebar.collapsed .sidebar-profile-role {
    display: none;
}

.sidebar.collapsed .logo-container {
    padding: 1.5rem 1rem;
    justify-content: center;
}

.sidebar.collapsed .nav-link {
    padding: 0.875rem 1rem;
    justify-content: center;
}

.sidebar.collapsed .sidebar-profile-info {
    justify-content: center;
}

.sidebar.collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

.logo-container {
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.03);
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: white;
    width: 100%;
}

.logo-img {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.logo-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-text {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.5px;
    white-space: nowrap;
    transition: opacity 0.3s;
}

.company-name {
    font-size: 0.75rem;
    opacity: 0.8;
    font-weight: 400;
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    transition: opacity 0.3s;
}

.sidebar-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-left: auto;
    transition: var(--transition);
    flex-shrink: 0;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(15deg);
}

.nav-menu {
    padding: 1.5rem 0;
    flex: 1;
}

.nav-section {
    margin-bottom: 1.5rem;
}

.section-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.75rem;
    padding: 0 1.5rem;
    font-weight: 600;
    white-space: nowrap;
    transition: opacity 0.3s;
}

.nav-item {
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    transition: var(--transition);
    font-weight: 500;
    margin: 0.25rem 0;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.nav-link:hover {
    background: linear-gradient(90deg, rgba(67, 97, 238, 0.1) 0%, rgba(67, 97, 238, 0.05) 100%);
    color: white;
    padding-left: 1.75rem;
}

.nav-link.active {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--accent);
    border-radius: 0 4px 4px 0;
}

.nav-icon {
    font-size: 1.125rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-profile {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    margin-top: auto;
}

.sidebar-profile-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
}

.sidebar-profile-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.sidebar-profile-name {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    transition: opacity 0.3s;
}

.sidebar-profile-role {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 2px;
    white-space: nowrap;
    transition: opacity 0.3s;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: var(--transition);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #f5f7ff 0%, #f0f2ff 100%);
    width: calc(100% - var(--sidebar-width));
}

.main-content.sidebar-collapsed {
    margin-left: var(--sidebar-width-collapsed);
    width: calc(100% - var(--sidebar-width-collapsed));
}

[data-theme="dark"] .main-content {
    background: linear-gradient(135deg, #0f172a 0%, #1a233f 100%);
}

/* Top Header */
.top-header {
    background: var(--header-bg);
    height: var(--header-height);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 900;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid rgba(67, 97, 238, 0.1);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .top-header {
    background: rgba(30, 41, 59, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.mobile-menu-toggle:hover {
    background: var(--gray-light);
}

.page-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-title-badge {
    background: linear-gradient(135deg, var(--accent), #22d3ee);
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

/* Check In Button in Header */
.header-checkin-btn {
    display: none;
    background: linear-gradient(135deg, var(--success), #06d6a0);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(6, 214, 160, 0.3);
    font-size: 0.875rem;
}

.header-checkin-btn.checked-in {
    background: linear-gradient(135deg, var(--danger), #ef476f);
    box-shadow: 0 4px 15px rgba(239, 71, 111, 0.3);
}

.header-checkin-btn.checked-in:hover {
    box-shadow: 0 6px 20px rgba(239, 71, 111, 0.4);
}

.header-checkin-btn i {
    font-size: 1rem;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 1.25rem;
}

.theme-toggle:hover {
    background: var(--gray-light);
    color: var(--primary);
}

.header-profile {
    position: relative;
}

.header-profile-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: none;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-full);
    padding: 0.5rem 0.75rem 0.5rem 1rem;
    color: var(--dark);
    cursor: pointer;
    transition: var(--transition);
    background: var(--white);
}

.header-profile-btn:hover {
    background: var(--gray-light);
    border-color: var(--primary);
}

.header-profile-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.header-profile-name {
    font-weight: 500;
    font-size: 0.875rem;
}

.header-profile-arrow {
    font-size: 0.75rem;
    color: var(--gray);
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    min-width: 260px;
    display: none;
    z-index: 1000;
    border: 1px solid var(--gray-light);
    overflow: hidden;
}

.profile-dropdown.show {
    display: block;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.dropdown-user-info h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.dropdown-user-info p {
    font-size: 0.875rem;
    opacity: 0.9;
}

.dropdown-menu {
    padding: 0.75rem;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--dark);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition);
    font-size: 0.875rem;
}

.dropdown-item:hover {
    background: var(--gray-light);
    transform: translateX(5px);
}

.dropdown-divider {
    height: 1px;
    background: var(--gray-light);
    margin: 0.5rem 0;
}

.dropdown-item.logout {
    color: var(--danger);
}

.dropdown-item.logout:hover {
    background: rgba(239, 71, 111, 0.1);
}

/* Content Area */
.content {
    padding: 1rem;
    flex: 1;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

.content-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-section.active {
    display: block;
}

/* Dashboard Grid - RESPONSIVE */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
  
}

/* Date & Time Card */
.datetime-card {
            background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);           
            border-radius: var(--radius-xl);
            padding: 2rem;
            color: white;
            box-shadow: var(--shadow-lg);
            position: relative;
            overflow: hidden;
            border: none;
            width: 100%;
        }

        .datetime-card::before {
            content: '';
            position: absolute;
            top: -50%;
            right: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
            border-radius: 50%;
        }

        .card-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            position: relative;
            z-index: 1;
            margin-bottom: 2rem;
        }

        .date-section {
            flex: 1;
        }

        .date-day {
            font-size: 0.875rem;
            opacity: 0.9;
            margin-bottom: 0.5rem;
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .date-number {
            font-size: 3.5rem;
            font-weight: 800;
            line-height: 1;
            margin-bottom: 0.25rem;
            text-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }

        .date-month-year {
            font-size: 1.125rem;
            opacity: 0.9;
        }

        .time-section {
            text-align: right;
        }

        .time-large {
            font-size: 3.5rem;
            font-weight: 800;
            line-height: 1;
            margin-bottom: 0.25rem;
            text-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }

        .time-period {
            font-size: 1.25rem;
            opacity: 0.9;
            font-weight: 500;
        }

        .check-times {
            font-size: 0.75rem;
            opacity: 0.8;
            margin-top: 0.5rem;
            line-height: 1.6;
        }

        .work-hours-section {
            display: grid;
            grid-template-columns: 3fr 1fr;
            gap: 1.5rem 2rem;
            position: relative;
            z-index: 1;
            /* border-top: 1px solid rgba(255,255,255,0.2);
            padding-top: 1.5rem; */
        }

        .hours-item {
            display: flex;
            flex-direction: column;
        }

        .hours-label {
            font-size: 0.65rem;
            opacity: 0.6;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 0.5rem;
            font-weight: 500;
        }

        .hours-value {
            font-size: 1.5rem;
            font-weight: 700;
            color: rgba(255, 255, 255, 0.9);
        }

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(67, 97, 238, 0.1);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    min-height: 150px;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(67, 97, 238, 0.3);
}

.stat-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

.stat-title {
    font-size: 0.875rem;
    color: var(--gray);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.25rem;
    font-family: 'Poppins', sans-serif;
}

.stat-trend {
    font-size: 0.875rem;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 500;
}

.stat-trend.negative {
    color: var(--danger);
}

/* Calendar Card - FIXED SIZE */
.calendar-card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(67, 97, 238, 0.1);
    position: relative;
    overflow: hidden;
    height: fit-content;
    min-height: 400px;
}

.calendar-card::before {
    content: '';
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.05), transparent);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.calendar-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.calendar-nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.calendar-month-display {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    min-width: 160px;
    text-align: center;
    font-family: 'Poppins', sans-serif;
}

.calendar-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-light);
    background: var(--card-bg);
    color: var(--dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 0.875rem;
}

.calendar-nav-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: scale(1.1);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    padding: 0.25rem;
    position: relative;
    background: rgba(67, 97, 238, 0.05);
}

.calendar-day.header {
    font-weight: 600;
    color: var(--primary);
    cursor: default;
    font-size: 0.7rem;
    text-transform: uppercase;
    border: none;
    background: transparent;
    font-family: 'Poppins', sans-serif;
}

.calendar-day.other-month {
    color: #adb5bd;
    background: rgba(108, 117, 125, 0.05);
}

.calendar-day.today {
    border-color: var(--primary);
    font-weight: 700;
    background: rgba(67, 97, 238, 0.15);
    box-shadow: 0 4px 8px rgba(67, 97, 238, 0.2);
}

.calendar-day.present {
    border-color: #2ecc71;
    background: rgba(46, 204, 113, 0.15);
    color: #1e8449;
    font-weight: 600;
    box-shadow: 0 3px 6px rgba(46, 204, 113, 0.2);
}

.calendar-day.absent {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.15);
    color: #922b21;
    font-weight: 600;
    box-shadow: 0 3px 6px rgba(231, 76, 60, 0.2);
}

.calendar-day.half_day {
    border-color: var(--status-halfday);
    background: #ffcda9;
    color:  #ff7c01;
    font-weight: 600;
    box-shadow: 0 3px 6px rgba(243, 156, 18, 0.2);
}

.calendar-day.late {
    border-color: var(--status-late);
    background: #fff5d5;
    color: var(--status-late);
    font-weight: 600;
    box-shadow: 0 3px 6px rgba(155, 89, 182, 0.2);
}

.calendar-day.status-pending {
    border-color: var(--status-pending);
    background: #d2b8ff;
    color: #7c3aed;
    font-weight: 600;
    box-shadow: 0 3px 6px rgba(155, 89, 182, 0.2);
}

.calendar-day.inprogress {
    background: #c4dbff;
    color: var(--status-inprogress);
    border-color:var(--status-inprogress) ;
    box-shadow: 0 4px 8px rgba(118, 136, 251, 0.2);
}

.calendar-day.current-day {
    background: linear-gradient(135deg, var(--accent), rgba(76, 201, 240, 0.15));
    color: #0c4a6e;
    border-color: rgba(76, 201, 240, 0.3);
    box-shadow: 0 4px 8px rgba(76, 201, 240, 0.2);
    animation: pulse 2s infinite;
}

.calendar-day.companyholiday {
    border: 1px solid transparent;
    background: var(--status-companyholiday);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 3px 6px rgba(236, 151, 40, 0.2);
}

.calendar-day.on_leave {
    border: 1px solid #8b5cf6;
    background: var(--status-onleave);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 3px 6px rgba(109, 40, 217, 0.2);
}

/* 
.calendar-day:hover:not(.header):not(.other-month) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    border-color: var(--primary);
    background: rgba(67, 97, 238, 0.1);
} */

.day-number {
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
}

.day-status {
    font-size: 0.6rem;
    margin-top: 0.125rem;
    opacity: 0.8;
    font-weight: 700;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 8px rgba(76, 201, 240, 0.2);
    }
    50% {
        box-shadow: 0 4px 12px rgba(76, 201, 240, 0.4);
    }
    100% {
        box-shadow: 0 4px 8px rgba(76, 201, 240, 0.2);
    }
}

/* Quick Stats Cards */
.quick-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.quick-stat-card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(67, 97, 238, 0.1);
    height: 100%;
    min-height: 180px;
    display: flex;
    flex-direction: column;
}

/* Leave Request Section */
.leave-requests {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: 1rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(67, 97, 238, 0.1);
    margin-bottom: 0rem;
    position: relative;
    overflow: hidden;
}

.leave-requests::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.leave-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
    flex-direction: row-reverse;
}

.leave-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.new-leave-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

.new-leave-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
}

/* Leave Table */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-lg);
}

.leave-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.leave-table th {
    text-align: left;
    padding: 1rem;
    font-weight: 600;
    color: var(--dark);
    border-bottom: 2px solid var(--gray-light);
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.leave-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-light);
    color: var(--dark);
    font-size: 0.875rem;
}

.leave-status {
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: rgba(255, 209, 102, 0.15);
    color: #b45309;
}

.status-approved {
    background: rgba(6, 214, 160, 0.15);
    color: #065f46;
}

.status-rejected {
    background: rgba(239, 71, 111, 0.15);
    color: #991b1b;
}

/* Employee Management */
.employees-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.employee-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(67, 97, 238, 0.1);
    transition: var(--transition);
    position: relative;
}

.employee-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(67, 97, 238, 0.3);
}

.employee-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.employee-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.5rem;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.employee-info h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.employee-info p {
    font-size: 0.875rem;
    color: var(--gray);
    margin-bottom: 0.25rem;
}

.employee-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-light);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.detail-label {
    color: var(--gray);
    font-weight: 500;
}

.detail-value {
    color: var(--dark);
    font-weight: 600;
}

.employee-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.action-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
    justify-content: center;
}

.action-btn.edit {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary);
    border: 1px solid rgba(67, 97, 238, 0.3);
}

.action-btn.delete {
    background: rgba(239, 71, 111, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 71, 111, 0.3);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.action-btn.edit:hover {
    background: rgba(67, 97, 238, 0.2);
}

.action-btn.delete:hover {
    background: rgba(239, 71, 111, 0.2);
}

/* Add Employee Button */
.add-employee-btn {
    background: linear-gradient(135deg, var(--success), #06d6a0);
    color: white;
    border: none;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(6, 214, 160, 0.3);
    /* margin-bottom: 2rem; */
}

.add-employee-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 214, 160, 0.4);
}

/* Settings Page */
.settings-container {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(67, 97, 238, 0.1);
    position: relative;
    overflow: hidden;
}

.settings-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.settings-section {
    margin-bottom: 2.5rem;
}

.settings-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gray-light);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    background: rgba(67, 97, 238, 0.05);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(67, 97, 238, 0.1);
    transition: var(--transition);
}

.setting-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.setting-info h4 {
    font-size: 0.95rem;
    color: var(--dark);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.setting-info p {
    font-size: 0.75rem;
    color: var(--gray);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-light);
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .toggle-slider {
    background-color: var(--primary);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* ==================== MODAL FIXES ==================== */

/* Modal Base Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(5px);
    overflow: hidden;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
    align-items: center;
}

.modal-content {
    
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    
    overscroll-behavior: contain;
    position: relative;
    animation: slideUp 0.3s ease;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(67, 97, 238, 0.1);
    margin: auto;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideUp {
    from {
        transform: translateY(30px) scale(0.98);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-header {
    flex-shrink: 0; 
    position: sticky;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    padding-right: calc(1.5rem + var(--scrollbar-width, 0px));
    z-index: 10;
}

.modal-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.modal-title i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.modal-title span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.close-modal {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
    margin-left: 0.75rem;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    overflow-y: auto;             /* only the body scrolls */
    padding: 1.5rem;
    flex: 1; 
    
}

/* Compact Modal Variant */
.modal-content.compact {
    max-width: 380px;
    width: 90%;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal-header.compact {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-title.compact {
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-title.compact i {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.close-modal.compact {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    font-size: 0.8rem;
    color: white;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.close-modal.compact:hover {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

.modal-body.compact {
    padding: 1.25rem;
    max-height: calc(80vh - 60px);
    overflow-y: auto;
}

/* Attendance Details Modal */
.attendance-details.compact {
    font-size: 0.9rem;
}

.detail-date {
    margin-bottom: 1rem;
    color: var(--dark);
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(67, 97, 238, 0.1);
}

.attendance-info.compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.info-item.compact {
    padding: 0.75rem;
    background: rgba(67, 97, 238, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(67, 97, 238, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.info-label.compact {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 0.375rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value.compact {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark);
    font-family: 'Poppins', sans-serif;
    line-height: 1.3;
}

.status-container {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(67, 97, 238, 0.1);
}

.status-display {
    padding: 0.875rem;
    background: rgba(67, 97, 238, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(67, 97, 255, 0.1);
    text-align: center;
}

.status-text {
    font-weight: 700;
    color: var(--dark);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Status Colors */
.status-text[data-status="Absent"] {
    color: #dc3545;
}

.status-text[data-status="Present"] {
    color: #28a745;
}

.status-text[data-status="Late"] {
    color: #ffc107;
}

.status-text[data-status="Half Day"] {
    color: #fd7e14;
}

/* Camera Modal */
.camera-container {
    width: 100%;
    height: 280px;
    background: var(--dark);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 1.5rem;
    position: relative;
    border: 2px solid var(--gray-light);
}

#cameraVideo, #cameraCanvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    text-align: center;
    padding: 1rem;
}

.camera-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.camera-placeholder p {
    font-size: 0.9rem;
    opacity: 0.8;
    max-width: 80%;
}

.camera-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.camera-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
    justify-content: center;
    flex: 1;
    max-width: 180px;
}

.camera-btn.capture {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

.camera-btn.confirm {
    background: linear-gradient(135deg, var(--success), #06d6a0);
    color: white;
    box-shadow: 0 4px 15px rgba(6, 214, 160, 0.3);
}

.camera-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* Attendance Details Modal */
.attendance-details {
    padding: 1.5rem;
}

.attendance-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    background: rgba(67, 97, 238, 0.05);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(67, 97, 238, 0.1);
}

.info-label {
    font-size: 0.75rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    font-family: 'Poppins', sans-serif;
}

/* Alert */
.alert {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
    z-index: 2147483647;
    animation: slideInRight 0.3s ease;
    max-width: 400px;
    backdrop-filter: blur(10px);
    border: 1px solid;
    background-color: white;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.alert-success {
    background: linear-gradient(135deg, rgba(6, 214, 160, 0.15), rgba(6, 214, 160, 0.1));
    color: #065f46;
    border-color: rgba(6, 214, 160, 0.3);
    z-index: 9999;
    background-color: #c2ffee;
}

.alert-danger {
    background: linear-gradient(160deg, #ffe6eb, #ffc2d1);
    color: #b0003a;
    border-color: #ff5c8a;
    z-index: 9999;
    background-color: #ffafc5;
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-light);
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-light);

}
.modal-header.sticky-scroll-fix {
    right: 0;
    left: 0;
    width: calc(100% - var(--scrollbar-width, 0px));
}
.modal-body {
    padding-top: 1.5rem;
}
/* For compact modals */
.modal-content.compact .modal-body {
    padding-top: 1.25rem;
} 
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(3px);
}

.sidebar-overlay.active {
    display: block;
}

/* Form Elements */
input, select, textarea {
    width: 90%;
    font-family: 'Inter', sans-serif;
    padding: 0.875rem 1rem;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-md);
    background: var(--card-bg);
    color: var(--dark);
    font-size: 0.875rem;
    transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

/* ==================== RESPONSIVE DESIGN ==================== */

/* Modal Responsive Fixes */
@media (max-width: 768px) {
    .modal {
        padding: 0.5rem;
        align-items: flex-start;
    }
    
    .modal-content {
        max-height: 85vh;
        margin: 1rem auto;
        width: 95%;
        border-radius: 12px;
    }
    
    .modal-content.compact {
        width: 95%;
        max-width: 350px;
        margin: auto;
    }
    
    .modal-header {
        padding: 1rem 1.25rem;
        position: sticky;
        top: 0;
    }
    
    .modal-title {
        font-size: 1.1rem;
    }
    
    .modal-body {
        padding: 1.25rem;
        max-height: calc(85vh - 60px);
    }
    
    .modal-body.compact {
        padding: 1rem;
        max-height: calc(80vh - 50px);
    }
    
    .attendance-info.compact {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .camera-container {
        height: 250px;
    }
    
    .camera-actions {
        flex-direction: column;
    }
    
    .camera-btn {
        width: 100%;
        max-width: 100%;
    }
    
    .info-item.compact {
        padding: 0.625rem;
    }
    
    .info-label.compact {
        font-size: 0.7rem;
    }
    
    .info-value.compact {
        font-size: 0.875rem;
    }
}

@media (max-width: 576px) {
    .modal-content {
        width: 100%;
        margin: 0.5rem;
        max-height: 90vh;
        border-radius: 10px;
    }
    
    .modal-content.compact {
        width: 95%;
        max-width: 320px;
    }
    
    .modal-header {
        padding: 0.875rem 1rem;
    }
    
    .modal-title {
        font-size: 1rem;
        gap: 0.5rem;
    }
    
    .modal-title i {
        font-size: 0.9rem;
    }
    
    .modal-body {
        padding: 1rem;
        max-height: calc(90vh - 55px);
    }
    
    .modal-body.compact {
        padding: 0.875rem;
    }
    
    .attendance-info.compact {
        grid-template-columns: 1fr;
        gap: 0.625rem;
    }
    
    .camera-container {
        height: 220px;
    }
    
    .camera-placeholder i {
        font-size: 2.5rem;
    }
    
    .camera-placeholder p {
        font-size: 0.8rem;
    }
    
    .detail-date {
        font-size: 0.95rem;
        margin-bottom: 0.875rem;
    }
    
    .status-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .modal {
        padding: 0.25rem;
    }
    
    .modal-content {
        margin: 0.25rem;
        border-radius: 8px;
    }
    
    .modal-content.compact {
        width: 98%;
        max-width: 300px;
    }
    
    .modal-header {
        padding: 0.75rem 1rem;
    }
    
    .modal-title {
        font-size: 0.95rem;
    }
    
    .close-modal {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .modal-body {
        padding: 0.875rem;
    }
    
    .camera-container {
        height: 200px;
    }
    
    .camera-btn {
        padding: 0.625rem 1rem;
        font-size: 0.8rem;
        min-width: auto;
    }
    
    .info-item.compact {
        padding: 0.5rem;
    }
}

/* Landscape Mode for Modals */
@media (max-height: 600px) and (orientation: landscape) {
    .modal {
        align-items: flex-start;
        padding-top: 1rem;
    }
    
    .modal-content {
        max-height: 85vh;
        margin-top: 1rem;
    }
    
    .modal-body {
        max-height: 60vh;
    }
    
    .camera-container {
        height: 180px;
    }
}

/* Large Screens */
@media (min-width: 1200px) {
    .modal-content {
        max-width: 550px;
    }
    
    .modal-content.compact {
        max-width: 420px;
    }
    
    .camera-container {
        height: 320px;
    }
}

/* Laptop (1024px - 1440px) */
@media (max-width: 1440px) {
    .content {
        padding: 1rem;
    }
    
    .dashboard-grid {
        gap: 1.25rem;
    }
    
    .datetime-card {
        padding: 1.75rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
}

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        z-index: 1001;
    }
    
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 30px rgba(0, 0, 0, 0.3);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .main-content.sidebar-collapsed {
        margin-left: 0;
        width: 100%;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .top-header {
        padding: 0 1.5rem;
    }
    
    .content {
        padding: 1.25rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .calendar-card {
        min-height: 380px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .employees-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quick-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .header-right {
        gap: 1rem;
    }
    
    .header-checkin-btn span {
        display: inline;
    }
}

/* Large Mobile (576px - 768px) */
@media (max-width: 768px) {
    .top-header {
        height: 70px;
        padding: 0 1rem;
    }
    
    .header-left {
        gap: 1rem;
    }
    
    .header-right {
        gap: 0.75rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .header-checkin-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.8125rem;
    }
    
    .theme-toggle {
        width: 36px;
        height: 36px;
    }
    
    .header-profile-btn {
        padding: 0.5rem;
    }
    
    .header-profile-name {
        display: none;
    }
    
    .content {
        padding: 1rem;
    }
    
    .datetime-card {
        padding: 1.5rem;
        min-height: 280px;
    }
    
    .date-number {
        font-size: 3rem;
    }
    
    .time-large {
        font-size: 2.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.25rem;
        min-height: 140px;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .calendar-card {
        padding: 1.25rem;
        min-height: 360px;
    }
    
    .calendar-grid {
        gap: 0.375rem;
    }
    
    .calendar-day {
        font-size: 0.7rem;
        padding: 0.125rem;
    }
    
    .day-number {
        font-size: 0.875rem;
    }
    
    .leave-requests {
        padding: 1rem;
    }
    
    .leave-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .leave-title {
        font-size: 1.25rem;
    }
    
    .employees-grid {
        grid-template-columns: 1fr;
    }
    
    .employee-card {
        padding: 1.25rem;
    }
    
    .employee-actions {
        flex-direction: row;
    }
    
    .action-btn {
        font-size: 0.7rem;
        padding: 0.5rem 0.75rem;
    }
    
    .settings-container {
        padding: 1.5rem;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .setting-item {
        padding: 1rem;
    }
}

/* Small Mobile (up to 576px) */
@media (max-width: 576px) {
    .top-header {
        padding: 0 0.75rem;
    }
    
    .page-title {
        font-size: 1.25rem;
    }
    
    .page-title-badge {
        font-size: 0.625rem;
        padding: 0.125rem 0.5rem;
    }
    
    .header-checkin-btn {
        padding: 0.625rem 1rem;
    }
    
    .header-checkin-btn span {
        display: none;
    }
    
    .datetime-card {
        padding: 1.25rem;
        min-height: 260px;
    }
    
    .date-number {
        font-size: 2.5rem;
    }
    
    .date-month-year {
        font-size: 1rem;
    }
    
    .time-large {
        font-size: 2rem;
    }
    
    .time-period {
        font-size: 1rem;
    }
    
    .calendar-card {
        padding: 1rem;
        min-height: 340px;
    }
    
    .calendar-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .calendar-nav {
        align-self: flex-start;
    }
    
    .calendar-grid {
        gap: 0.25rem;
    }
    
    .calendar-day {
        font-size: 0.65rem;
        padding: 0.125rem;
    }
    
    .day-number {
        font-size: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .stat-value {
        font-size: 1.75rem;
    }
    
    .leave-requests {
        padding: 1.25rem;
    }
    
    .leave-title {
        font-size: 1.125rem;
    }
    
    .new-leave-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.8125rem;
    }
    
    .add-employee-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.8125rem;
    }
    
    .employee-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .employee-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .employee-details {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
    }
    
    .employee-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .action-btn {
        width: 100%;
    }
    
    .settings-container {
        padding: 1rem;
    }
    
    .settings-title {
        font-size: 1.125rem;
    }
    
    .logo-container {
        padding: 1.25rem 1rem;
    }
    
    .sidebar-profile {
        padding: 1.25rem 1rem;
    }
}

/* Extra Small Mobile (up to 400px) */
@media (max-width: 400px) {
    .header-checkin-btn {
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
    
    .header-checkin-btn i {
        margin: 0;
    }
    
    .header-profile-btn {
        padding: 0.375rem;
    }
    
    .header-profile-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .theme-toggle {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .date-number {
        font-size: 2.25rem;
    }
    
    .time-large {
        font-size: 1.75rem;
    }
    
    .calendar-day {
        font-size: 0.6rem;
    }
    
    .day-number {
        font-size: 0.7rem;
    }
    
    .stat-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .stat-icon {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }
}

/* Monitor (1440px and above) */
@media (min-width: 1440px) {
    .content {
        padding: 1rem;
        max-width: 1800px;
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .employees-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .quick-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .datetime-card {
        min-height: 320px;
    }
    
    .calendar-card {
        min-height: 420px;
    }
}

/* Animation for check-in button */
@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(6, 214, 160, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(6, 214, 160, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(6, 214, 160, 0);
    }
}

.header-checkin-btn.pulse {
    animation: pulse-green 2s infinite;
}

   @media (max-width: 600px) {
            .datetime-card {
                padding: 1.5rem;
            }

            .date-number,
            .time-large {
                font-size: 2.5rem;
            }

            .work-hours-section {
                grid-template-columns: 1fr;
                gap: 1rem;
            }
        }