/* ========================================
   Enterprise HRMS - Responsive Styles
   ======================================== */

/* CSS Variables */
:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #6366f1;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1f2937;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --sidebar-width: 260px;
    --header-height: 70px;
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--gray-100);
    color: var(--gray-700);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========================================
   Sidebar Styles
   ======================================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--gray-900) 0%, var(--gray-800) 100%);
    color: var(--white);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: var(--transition);
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
}

.logo i {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.close-sidebar {
    display: none;
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
}

.close-sidebar:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    display: block;
    padding: 0 20px;
    margin-bottom: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--gray-300);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.2) 0%, transparent 100%);
    color: var(--white);
    border-left-color: var(--primary-color);
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--secondary-color);
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--white);
}

.user-role {
    font-size: 0.75rem;
    color: var(--gray-400);
}

/* ========================================
   Main Content Styles
   ======================================== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
}

/* ========================================
   Header Styles
   ======================================== */
.header {
    background: var(--white);
    padding: 16px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    flex-direction: column;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.page-subtitle {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 14px;
    color: var(--gray-400);
    font-size: 0.9rem;
}

.search-box input {
    padding: 10px 14px 10px 40px;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    font-size: 0.875rem;
    width: 280px;
    transition: var(--transition);
    background: var(--gray-50);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.header-btn {
    width: 42px;
    height: 42px;
    border: none;
    background: var(--gray-50);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    color: var(--gray-600);
}

.header-btn:hover {
    background: var(--gray-100);
    color: var(--primary-color);
}

.notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    background: var(--danger-color);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-profile img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gray-200);
    cursor: pointer;
    transition: var(--transition);
}

.header-profile img:hover {
    border-color: var(--primary-color);
}

/* ========================================
   Dashboard Content
   ======================================== */
.dashboard-content {
    padding: 30px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.employees {
    background: rgba(99, 102, 241, 0.1);
    color: var(--secondary-color);
}

.stat-icon.present {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.stat-icon.leave {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.stat-icon.payroll {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.stat-change {
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-change.positive {
    color: var(--success-color);
}

.stat-change.negative {
    color: var(--danger-color);
}

.stat-change.neutral {
    color: var(--gray-500);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 30px;
}

/* Card Styles */
.card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
}

.view-all {
    font-size: 0.8rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.view-all:hover {
    text-decoration: underline;
}

/* Quick Actions */
.quick-actions {
    grid-column: span 1;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 20px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 16px;
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--gray-700);
}

.action-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.action-btn i {
    font-size: 1.25rem;
}

.action-btn span {
    font-size: 0.8rem;
    font-weight: 500;
}

/* Attendance Chart */
.attendance-chart {
    grid-column: span 1;
}

.chart-filter {
    padding: 6px 12px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--gray-600);
    background: var(--white);
}

.chart-container {
    padding: 20px;
    height: 200px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    width: 100%;
    height: 100%;
    gap: 12px;
}

.chart-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: var(--height);
    flex: 1;
    max-width: 50px;
    background: linear-gradient(180deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    border-radius: 8px 8px 0 0;
    position: relative;
    transition: var(--transition);
    min-height: 40px;
}

.chart-bar:hover {
    opacity: 0.8;
    transform: scaleY(1.02);
}

.bar-value {
    position: absolute;
    top: -24px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-700);
}

.bar-label {
    position: absolute;
    bottom: -24px;
    font-size: 0.7rem;
    color: var(--gray-500);
}

/* Department Chart */
.department-chart {
    grid-column: span 1;
}

.donut-chart {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: conic-gradient(
        #6366f1 0deg 92deg,
        #10b981 92deg 162deg,
        #f59e0b 162deg 214deg,
        #ef4444 214deg 238deg,
        #8b5cf6 238deg 360deg
    );
    margin: 20px auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.donut-center {
    width: 100px;
    height: 100px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.donut-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
}

.donut-label {
    font-size: 0.7rem;
    color: var(--gray-500);
}

.department-legend {
    padding: 0 20px 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-50);
}

.legend-item:last-child {
    border-bottom: none;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-text {
    flex: 1;
    font-size: 0.8rem;
    color: var(--gray-600);
}

.legend-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-900);
}

/* Recent(--gray-900 Employees */
.recent-employees {
    grid-column: span 1;
}

.employee-list {
    padding: 12px 20px;
}

.employee-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-50);
}

.employee-item:last-child {
    border-bottom: none;
}

.employee-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.employee-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.employee-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-900);
}

.employee-role {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.employee-date {
    font-size: 0.7rem;
    color: var(--gray-400);
    background: var(--gray-50);
    padding: 4px 8px;
    border-radius: 6px;
}

/* Leave Requests */
.leave-requests {
    grid-column: span 1;
}

.request-list {
    padding: 12px 20px;
}

.request-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-50);
}

.request-item:last-child {
    border-bottom: none;
}

.request-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.request-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.request-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-900);
}

.request-type {
    font-size: 0.75rem;
    color: var(--primary-color);
}

.request-dates {
    font-size: 0.7rem;
    color: var(--gray-500);
}

.request-actions {
    display: flex;
    gap: 8px;
}

.approve-btn, .reject-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.approve-btn {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.approve-btn:hover {
    background: var(--success-color);
    color: var(--white);
}

.reject-btn {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.reject-btn:hover {
    background: var(--danger-color);
    color: var(--white);
}

/* Upcoming Events */
.upcoming-events {
    grid-column: span 1;
}

.events-list {
    padding: 12px 20px;
}

.event-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-50);
}

.event-item:last-child {
    border-bottom: none;
}

.event-date {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.event-day {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
}

.event-month {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.event-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-900);
}

.event-time {
    font-size: 0.75rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ========================================
   Employee Table Section
   ======================================== */
.employee-section {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.employee-section .card-header {
    flex-wrap: wrap;
    gap: 16px;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.search-filter {
    position: relative;
    display: flex;
    align-items: center;
}

.search-filter i {
    position: absolute;
    left: 12px;
    color: var(--gray-400);
    font-size: 0.8rem;
}

.search-filter input {
    padding: 8px 12px 8px 34px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 0.8rem;
    width: 200px;
    transition: var(--transition);
}

.search-filter input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--gray-600);
    background: var(--white);
    cursor: pointer;
}

.table-responsive {
    overflow-x: auto;
}

.employee-table {
    width: 100%;
    border-collapse: collapse;
}

.employee-table th {
    padding: 16px 20px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-100);
}

.employee-table td {
    padding: 16px 20px;
    font-size: 0.875rem;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-50);
}

.employee-table tr:hover {
    background: var(--gray-50);
}

.employee-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.employee-cell img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.employee-cell .name {
    display: block;
    font-weight: 600;
    color: var(--gray-900);
}

.employee-cell .email {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.status-badge.on-leave {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.status-badge.inactive {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.table-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    background: var(--gray-100);
    color: var(--gray-600);
}

.table-btn.view:hover {
    background: var(--primary-color);
    color: var(--white);
}

.table-btn.edit:hover {
    background: var(--warning-color);
    color: var(--white);
}

.table-btn.delete:hover {
    background: var(--danger-color);
    color: var(--white);
}

.table-pagination {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--gray-100);
}

.pagination-info {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.pagination-buttons {
    display: flex;
    gap: 6px;
}

.pagination-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--gray-200);
    background: var(--white);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--gray-600);
    transition: var(--transition);
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   Mobile Toggle
   ======================================== */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1100;
    width: 44px;
    height: 44px;
    background: var(--primary-color);
    border: none;
    border-radius: 10px;
    color: var(--white);
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.mobile-toggle:hover {
    background: var(--primary-hover);
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 900;
    opacity: 0;
    transition: var(--transition);
}

.overlay.active {
    display: block;
    opacity: 1;
}

/* ========================================
   Responsive Styles - Tablet
   ======================================== */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quick-actions {
        grid-column: span 2;
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .attendance-chart,
    .department-chart,
    .recent-employees,
    .leave-requests,
    .upcoming-events {
        grid-column: span 1;
    }
}

/* ========================================
   Responsive Styles - Tablet Portrait
   ======================================== */
@media (max-width: 992px) {
    :root {
        --sidebar-width: 240px;
    }
    
    .search-box input {
        width: 200px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions,
    .attendance-chart,
    .department-chart,
    .recent-employees,
    .leave-requests,
    .upcoming-events {
        grid-column: span 1;
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .table-actions {
        width: 100%;
    }
    
    .search-filter input {
        width: 160px;
    }
}

/* ========================================
   Responsive Styles - Mobile
   ======================================== */
@media (max-width: 768px) {
    /* Mobile Toggle */
    .mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Sidebar */
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .close-sidebar {
        display: block;
    }
    
    /* Main Content */
    .main-content {
        margin-left: 0;
    }
    
    /* Header */
    .header {
        padding: 12px 16px;
        padding-left: 70px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }
    
    .header-left {
        flex: 1;
        min-width: 0;
    }
    
    .page-title {
        font-size: 1.1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .page-subtitle {
        display: none;
    }
    
    .header-right {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
    }
    
    .search-box {
        display: none;
    }
    
    .header-btn {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
    }
    
    .header-profile img {
        width: 36px;
        height: 36px;
    }
    
    /* Dashboard Content */
    .dashboard-content {
        padding: 16px;
    }
    
    /* Stats Grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    /* Dashboard Grid */
    .dashboard-grid {
        gap: 16px;
    }
    
    .card-header {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .card-header h3 {
        font-size: 0.9rem;
    }
    
    /* Quick Actions */
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 16px;
        gap: 10px;
    }
    
    .action-btn {
        padding: 16px 12px;
    }
    
    .action-btn i {
        font-size: 1.1rem;
    }
    
    .action-btn span {
        font-size: 0.7rem;
    }
    
    /* Chart */
    .chart-container {
        height: 180px;
        padding: 16px;
    }
    
    .chart-bar {
        max-width: 40px;
    }
    
    .bar-value {
        font-size: 0.65rem;
        top: -20px;
    }
    
    .bar-label {
        font-size: 0.6rem;
        bottom: -20px;
    }
    
    /* Department Chart */
    .donut-chart {
        width: 140px;
        height: 140px;
    }
    
    .donut-center {
        width: 80px;
        height: 80px;
    }
    
    .donut-value {
        font-size: 1rem;
    }
    
    .department-legend {
        padding: 0 16px 16px;
    }
    
    /* Employee List */
    .employee-list,
    .request-list,
    .events-list {
        padding: 8px 16px;
    }
    
    .employee-item,
    .request-item,
    .event-item {
        padding: 10px 0;
    }
    
    .employee-item img,
    .request-avatar img {
        width: 36px;
        height: 36px;
    }
    
    .employee-date {
        display: none;
    }
    
    /* Leave Requests */
    .request-actions {
        flex-direction: column;
        gap: 4px;
    }
    
    .approve-btn,
    .reject-btn {
        width: 28px;
        height: 28px;
    }
    
    /* Events */
    .event-date {
        width: 40px;
        height: 40px;
    }
    
    .event-day {
        font-size: 0.9rem;
    }
    
    .event-month {
        font-size: 0.55rem;
    }
    
    /* Employee Table */
    .employee-section .card-header {
        padding: 16px;
    }
    
    .table-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-filter {
        width: 100%;
    }
    
    .search-filter input {
        width: 100%;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .employee-table th,
    .employee-table td {
        padding: 12px;
    }
    
    .employee-cell {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .employee-cell img {
        width: 32px;
        height: 32px;
    }
    
    .status-badge {
        font-size: 0.65rem;
        padding: 3px 8px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 4px;
    }
    
    .table-btn {
        width: 28px;
        height: 28px;
    }
    
    /* Pagination */
    .table-pagination {
        padding: 16px;
        flex-direction: column;
        gap: 12px;
    }
    
    .pagination-info {
        order: 2;
    }
    
    .pagination-buttons {
        order: 1;
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ========================================
   Responsive Styles - Small Mobile
   ======================================== */
@media (max-width: 480px) {
    .header {
        padding: 10px 12px;
        padding-left: 60px;
        gap: 6px;
    }
    
    .mobile-toggle {
        top: 10px;
        left: 10px;
        width: 40px;
        height: 40px;
    }
    
    .page-title {
        font-size: 1rem;
    }
    
    .header-right {
        gap: 4px;
    }
    
    .header-btn {
        width: 32px;
        height: 32px;
    }
    
    .header-btn i {
        font-size: 0.8rem;
    }
    
    .header-profile img {
        width: 32px;
        height: 32px;
    }
    
    .notification-badge {
        width: 14px;
        height: 14px;
        font-size: 0.55rem;
    }
    
    .dashboard-content {
        padding: 12px;
    }
    
    .stat-card {
        flex-direction: row;
        text-align: left;
        align-items: center;
        gap: 12px;
    }
    
    .stat-icon {
        margin: 0;
        width: 40px;
        height: 40px;
        font-size: 1rem;
        flex-shrink: 0;
    }
    
    .stat-info {
        align-items: flex-start;
        min-width: 0;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .stat-change {
        font-size: 0.65rem;
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .chart-container {
        height: 150px;
    }
    
    .chart-bar {
        max-width: 32px;
    }
    
    .donut-chart {
        width: 120px;
        height: 120px;
    }
    
    .donut-center {
        width: 70px;
        height: 70px;
    }
    
    .donut-value {
        font-size: 0.9rem;
    }
    
    .donut-label {
        font-size: 0.6rem;
    }
    
    .legend-item {
        padding: 6px 0;
    }
    
    .legend-text,
    .legend-value {
        font-size: 0.7rem;
    }
    
    .employee-table th:nth-child(2),
    .employee-table td:nth-child(2),
    .employee-table th:nth-child(4),
    .employee-table td:nth-child(4) {
        display: none;
    }
    
    .pagination-btn {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }
}

/* ========================================
   Extra Small Mobile
   ======================================== */
@media (max-width: 360px) {
    .dashboard-content {
        padding: 8px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .card-header {
        padding: 12px;
    }
    
    .quick-actions-grid {
        gap: 8px;
    }
    
    .action-btn {
        padding: 12px 8px;
    }
    
    .action-btn i {
        font-size: 1rem;
    }
    
    .employee-table th,
    .employee-table td {
        padding: 8px;
    }
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card,
.card,
.employee-section {
    animation: fadeIn 0.4s ease-out;
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }

/* ========================================
   Scrollbar Styles
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .sidebar,
    .mobile-toggle,
    .header-right {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .stat-card,
    .card {
        box-shadow: none;
        border: 1px solid var(--gray-200);
    }
}

