/* Enhanced Attendance Management System - Professional CSS */

:root {
    /* Primary Colors */
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --secondary-color: #64748b;
    --accent-color: #8b5cf6;
    
    /* Status Colors */
    --success-color: #10b981;
    --success-light: #34d399;
    --warning-color: #f59e0b;
    --warning-light: #fbbf24;
    --danger-color: #ef4444;
    --danger-light: #f87171;
    --info-color: #06b6d4;
    --info-light: #22d3ee;
    
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-dark: #1e293b;
    --bg-darker: #0f172a;
    
    /* Text Colors */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-light: #cbd5e1;
    --text-white: #ffffff;
    
    /* Border & Layout */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --border-radius-xl: 24px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Layout Dimensions */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --header-height: 70px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity var(--transition-slow);
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1.5rem;
}

.loading-screen p {
    color: white;
    font-size: 1.2rem;
    font-weight: var(--font-weight-medium);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Login Screen */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header .logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
    box-shadow: var(--shadow-lg);
}

.login-header h1 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 2rem;
    font-weight: var(--font-weight-bold);
}

.login-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: all var(--transition-normal);
    background: white;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.password-input {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: color var(--transition-fast);
}

.password-toggle:hover {
    color: var(--text-secondary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Enhanced Buttons */
.btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    font-family: inherit;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--border-color);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-login {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: all var(--transition-fast);
}

.btn-link:hover {
    background: rgba(59, 130, 246, 0.1);
}

/* Error Messages */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    padding: 0.875rem 1rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(239, 68, 68, 0.2);
    margin-top: 1rem;
    font-weight: var(--font-weight-medium);
}

/* App Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    background: var(--bg-secondary);
}

/* Modern Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--bg-dark) 0%, #334155 100%);
    transition: all var(--transition-normal);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
}

.brand i {
    font-size: 1.5rem;
    color: var(--primary-light);
}

.brand h3 {
    font-size: 1.25rem;
    font-weight: var(--font-weight-bold);
}

.sidebar-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    transition: all var(--transition-normal);
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.sidebar-menu {
    list-style: none;
    padding: 1.5rem 0;
}

.sidebar-menu li {
    margin-bottom: 0.5rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all var(--transition-normal);
    border-radius: 0 25px 25px 0;
    margin-right: 1rem;
    position: relative;
    font-weight: var(--font-weight-medium);
}

.sidebar-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: width var(--transition-normal);
    border-radius: 0 25px 25px 0;
}

.sidebar-menu a:hover::before {
    width: 100%;
}

.sidebar-menu a:hover {
    color: white;
    transform: translateX(5px);
}

.sidebar-menu a.active {
    background: rgba(59, 130, 246, 0.2);
    color: white;
    border-left: 4px solid var(--primary-color);
}

.sidebar-menu a i {
    width: 24px;
    text-align: center;
    font-size: 1.1rem;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left var(--transition-normal);
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
}

.sidebar.collapsed + .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* Header */
.header {
    height: var(--header-height);
    background: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-left h1 {
    font-size: 1.75rem;
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.breadcrumb-item.active {
    color: var(--primary-color);
    font-weight: var(--font-weight-medium);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-bold);
}

.user-menu {
    position: relative;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: background-color var(--transition-fast);
}

.user-info:hover {
    background: var(--bg-secondary);
}

.user-details {
    text-align: right;
}

.user-name {
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    display: block;
    font-size: 0.95rem;
}

.user-role {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: capitalize;
}

.user-avatar {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-md);
}

.dropdown-arrow {
    color: var(--text-muted);
    transition: transform var(--transition-fast);
    font-size: 0.8rem;
}

.dropdown-arrow.rotated {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    padding: 0.5rem 0;
    z-index: 1000;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: background-color var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--bg-secondary);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

/* Content */
.content {
    flex: 1;
    padding: 2.5rem;
    overflow-y: auto;
}

.view-content {
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dashboard */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.action-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 1px solid transparent;
}

.action-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.action-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
}

.action-content h3 {
    font-size: 1.1rem;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.action-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
}

.stat-icon.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.stat-icon.success {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
}

.stat-icon.warning {
    background: linear-gradient(135deg, var(--warning-color), #d97706);
    color: white;
}

.stat-icon.danger {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: white;
}

.stat-icon.info {
    background: linear-gradient(135deg, var(--info-color), #0891b2);
    color: white;
}

.stat-content {
    flex: 1;
}

.stat-content h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: var(--font-weight-bold);
}

.stat-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: var(--font-weight-medium);
    margin-bottom: 0.5rem;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.recent-activity,
.attendance-chart {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
    font-size: 1.25rem;
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    transition: background-color var(--transition-fast);
}

.activity-item:hover {
    background: var(--bg-tertiary);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.activity-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.activity-icon.info {
    background: rgba(6, 182, 212, 0.1);
    color: var(--info-color);
}

.activity-content {
    flex: 1;
}

.activity-content p {
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    font-weight: var(--font-weight-medium);
}

.activity-time {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.no-activity {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.no-activity i {
    font-size: 3rem;
    opacity: 0.5;
}

/* Attendance View */
.status-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border-left: 6px solid var(--border-color);
    transition: all var(--transition-normal);
}

.status-card.checked-in {
    border-left-color: var(--success-color);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), white);
}

.status-card.checked-out {
    border-left-color: var(--warning-color);
}

.status-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.status-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
    box-shadow: var(--shadow-md);
}

.status-info h3 {
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.status-info p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.status-actions {
    display: flex;
    gap: 1rem;
}

.location-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.location-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.location-header h3 {
    font-size: 1.1rem;
    font-weight: var(--font-weight-semibold);
}

.location-info p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.location-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-weight: var(--font-weight-medium);
    margin-top: 1rem;
}

.location-status.in-range {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.location-status.out-of-range {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

/* Tables */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.table-container {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: linear-gradient(135deg, var(--bg-tertiary), #e2e8f0);
    padding: 1.5rem 1rem;
    text-align: left;
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.data-table td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background-color var(--transition-fast);
    vertical-align: top;
}

.data-table tbody tr:hover {
    background: var(--bg-secondary);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.time-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Continuing from previous CSS file... */

.late-indicator {
    color: var(--warning-color);
    font-weight: var(--font-weight-medium);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Status Badges */
.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.status-badge.present {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge.late {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-badge.absent {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-badge.pending {
    background: rgba(6, 182, 212, 0.1);
    color: var(--info-color);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.status-badge.approved {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge.rejected {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-badge.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge.inactive {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.role-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

/* Leave Management */
.leave-balance {
    margin-bottom: 2rem;
}

.leave-balance h2 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-weight: var(--font-weight-bold);
}

.balance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.balance-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    text-align: center;
    border-top: 4px solid var(--primary-color);
    transition: all var(--transition-normal);
}

.balance-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.balance-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: var(--font-weight-bold);
    font-size: 1.1rem;
}

.balance-card p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
}

.balance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.balance-item:last-child {
    border-bottom: none;
}

/* Notices */
.notices-view .view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.notices-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.no-notices {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
}

.notice-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    border-left: 6px solid var(--primary-color);
    transition: all var(--transition-normal);
}

.notice-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.notice-card.important {
    border-left-color: var(--danger-color);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.02), white);
}

.notice-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 1rem;
}

.notice-header h3 {
    color: var(--text-primary);
    font-weight: var(--font-weight-bold);
    font-size: 1.25rem;
    flex: 1;
}

.notice-date {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
    flex-shrink: 0;
}

.notice-content {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: 1rem;
}

.notice-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.875rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.notice-author {
    font-weight: var(--font-weight-medium);
}

.notice-attachments {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
}

/* Employee/Office Management */
.employees-view,
.offices-view {
    animation: fadeInUp 0.3s ease-out;
}

.view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.view-header h2 {
    color: var(--text-primary);
    font-weight: var(--font-weight-bold);
    font-size: 1.75rem;
}

.offices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.office-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all var(--transition-normal);
    border: 1px solid var(--border-color);
}

.office-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.office-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.office-header h3 {
    color: var(--text-primary);
    font-weight: var(--font-weight-bold);
    font-size: 1.25rem;
}

.office-actions {
    display: flex;
    gap: 0.5rem;
}

.office-details p {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: var(--font-weight-medium);
}

.office-details i {
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

/* Reports */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.report-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--primary-color);
    transition: all var(--transition-normal);
}

.report-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.report-card h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-weight: var(--font-weight-bold);
    font-size: 1.25rem;
}

.report-stats,
.leave-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
}

.stat {
    text-align: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Professional Reports Styles */
.report-filters {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.filter-group select,
.filter-group input {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    transition: all var(--transition-normal);
    background: white;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.professional-reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.professional-report-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.professional-report-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

.professional-report-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.professional-report-card .report-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.professional-report-card .report-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.professional-report-card .report-info {
    flex: 1;
}

.professional-report-card .report-info h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: 0.5rem;
}

.professional-report-card .report-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}

.professional-report-card .report-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.employee-selector {
    margin-bottom: 0.5rem;
}

.employee-selector select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    background: white;
    transition: all var(--transition-normal);
}

.employee-selector select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.professional-report-card .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: var(--font-weight-semibold);
    font-size: 0.875rem;
    transition: all var(--transition-normal);
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.professional-report-card .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.professional-report-card .btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.professional-report-card .btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.professional-report-card .btn-secondary:hover:not(:disabled) {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
}

.professional-report-card .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.quick-stats-section {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.quick-stats-section h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: 1.5rem;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: all var(--transition-normal);
    border: 1px solid var(--border-light);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.25rem;
}

.stat-card .stat-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: var(--font-weight-bold);
    color: var(--primary-color);
    line-height: 1;
}

.stat-card .stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
    text-transform: none;
    letter-spacing: normal;
}

/* Profile View */
.profile-view {
    max-width: 800px;
}

.profile-header {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    box-shadow: var(--shadow-lg);
    flex-shrink: 0;
}

.profile-info h2 {
    font-size: 2rem;
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.profile-info p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.profile-details {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.detail-group {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.detail-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.detail-group h3 {
    font-size: 1.25rem;
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item label {
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}

.detail-item span {
    color: var(--text-secondary);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 2rem;
    backdrop-filter: blur(5px);
}

.modal {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 2rem 2rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    color: var(--text-primary);
    font-weight: var(--font-weight-bold);
    font-size: 1.5rem;
}

.modal-close {
    background: var(--bg-tertiary);
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 50%;
    transition: all var(--transition-fast);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--danger-color);
    color: white;
    transform: scale(1.1);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 0 2rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Notifications */
.notification-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
}

.notification {
    background: white;
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary-color);
    animation: slideInRight 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.notification::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--primary-color);
    animation: notificationProgress 3s linear;
}

.notification.success {
    border-left-color: var(--success-color);
}

.notification.success::before {
    background: var(--success-color);
}

.notification.error {
    border-left-color: var(--danger-color);
}

.notification.error::before {
    background: var(--danger-color);
}

.notification.warning {
    border-left-color: var(--warning-color);
}

.notification.warning::before {
    background: var(--warning-color);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes notificationProgress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Chart Container */
.chart-container {
    height: 300px;
    position: relative;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .offices-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .reports-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 100%;
        --sidebar-collapsed-width: 0;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-normal);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar.collapsed {
        transform: translateX(-100%);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .header {
        padding: 0 1rem;
    }
    
    .content {
        padding: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .status-actions {
        flex-direction: column;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .data-table {
        min-width: 700px;
    }
    
    .offices-grid {
        grid-template-columns: 1fr;
    }
    
    .reports-grid {
        grid-template-columns: 1fr;
    }
    
    .balance-grid {
        grid-template-columns: 1fr;
    }
    
    .view-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .filter-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .modal {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    .notification-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
    
    .user-info {
        padding: 0.25rem;
    }
    
    .user-details {
        display: none;
    }
    
    .dropdown-menu {
        right: auto;
        left: 0;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 2rem;
        margin: 1rem;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .action-card {
        flex-direction: column;
        text-align: center;
    }
    
    .office-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .status-header {
        flex-direction: column;
        text-align: center;
    }
    
    .notice-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .notice-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1e293b;
        --bg-secondary: #0f172a;
        --bg-tertiary: #334155;
        --text-primary: #f1f5f9;
        --text-secondary: #cbd5e1;
        --text-muted: #64748b;
        --border-color: #334155;
        --border-light: #475569;
    }
    
    .login-card {
        background: rgba(30, 41, 59, 0.95);
        color: var(--text-primary);
    }
    
    .login-header h1 {
        color: var(--text-primary);
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        background: var(--bg-tertiary);
        border-color: var(--border-color);
        color: var(--text-primary);
    }
    
    .stat-card,
    .action-card,
    .office-card,
    .report-card,
    .balance-card,
    .notice-card,
    .recent-activity,
    .attendance-chart,
    .table-container,
    .status-card,
    .location-card,
    .profile-header,
    .profile-details,
    .modal {
        background: var(--bg-primary);
        border-color: var(--border-color);
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.font-bold { font-weight: var(--font-weight-bold); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-medium { font-weight: var(--font-weight-medium); }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success-color); }
.text-warning { color: var(--warning-color); }
.text-danger { color: var(--danger-color); }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.rounded { border-radius: var(--border-radius); }
.rounded-lg { border-radius: var(--border-radius-lg); }
.rounded-xl { border-radius: var(--border-radius-xl); }

.shadow { box-shadow: var(--shadow); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
    transition: background var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Print Styles */
@media print {
    .sidebar,
    .header,
    .btn,
    .modal-overlay {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .content {
        padding: 0;
    }
    
    .stat-card,
    .table-container {
        box-shadow: none;
        border: 1px solid var(--border-color);
    }
}

/* Selfie Capture Modal Styles */
.selfie-modal {
    max-width: 600px;
    width: 90vw;
}

.selfie-capture-container {
    text-align: center;
}

.camera-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: #000;
}

.camera-container video {
    width: 100%;
    height: auto;
    display: block;
    transform: scaleX(-1); /* Mirror effect for selfie */
}

.camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.face-guide {
    width: 200px;
    height: 250px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.1);
}

.preview-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.preview-container img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    transform: scaleX(-1); /* Mirror effect */
}

.capture-instructions {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Selfie Viewing Modal Styles */
.selfie-view-modal {
    max-width: 800px;
    width: 90vw;
}

.selfie-details {
    text-align: center;
}

.record-info {
    margin-bottom: 2rem;
}

.record-info h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.selfies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.selfie-item {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 1rem;
}

.selfie-item h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.selfie-image {
    width: 100%;
    margin-bottom: 1rem;
}

.selfie-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.selfie-time {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Attendance History Styles */
.attendance-history-view {
    animation: fadeInUp 0.3s ease-out;
}

.filters-section {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.employee-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.employee-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.status-badge.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.status-badge.danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.status-badge.info {
    background: rgba(6, 182, 212, 0.1);
    color: var(--info-color);
}

.status-badge.primary {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}

.status-badge.secondary {
    background: rgba(100, 116, 139, 0.1);
    color: var(--secondary-color);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.table-container {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: var(--bg-tertiary);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.data-table tr:hover {
    background: var(--bg-secondary);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.mb-4 {
    margin-bottom: 2rem;
}

/* Responsive Design for Selfie Components */
@media (max-width: 768px) {
    .selfie-modal,
    .selfie-view-modal {
        width: 95vw;
        max-width: none;
    }
    
    .camera-container {
        max-width: 100%;
    }
    
    .face-guide {
        width: 150px;
        height: 200px;
    }
    
    .selfies-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .data-table {
        min-width: 800px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.25rem;
    }
}

/* Holiday Management Styles */
.holidays-view {
    padding: 0;
}

.holidays-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin-top: 2rem;
}

.holidays-month {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.holidays-month h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

.holidays-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.holiday-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: flex;
    gap: 1.25rem;
    position: relative;
    overflow: hidden;
}

.holiday-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.holiday-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--primary-light);
}

.holiday-card:hover::before {
    width: 6px;
}

.holiday-card.recurring {
    border-color: var(--accent-color);
}

.holiday-card.recurring::before {
    background: linear-gradient(180deg, var(--accent-color), var(--primary-color));
}

.holiday-date {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow);
}

.holiday-date .day {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.holiday-date .month-abbr {
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.holiday-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.holiday-info h5 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

.holiday-info p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.holiday-meta {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.recurring-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1));
    color: var(--accent-color);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.recurring-badge i {
    font-size: 0.7rem;
    animation: spin 3s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.holiday-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-left: auto;
}

.holiday-actions .btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.holiday-actions .btn-icon:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.holiday-actions .btn-icon.btn-danger:hover {
    background: var(--danger-color);
    border-color: var(--danger-color);
    color: white;
}

.no-holidays {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 2px dashed var(--border-color);
}

.no-holidays i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.4;
    color: var(--primary-color);
}

.no-holidays p {
    font-size: 1.125rem;
    margin: 0;
}

/* Weekly Offs Management Styles */
.weekly-offs-view {
    padding: 0;
}

.weekly-offs-list {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

.employee-weekly-off-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.employee-weekly-off-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.employee-info h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.employee-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.weekly-off-days {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
}

.day-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.no-days {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.9rem;
}

.employee-actions {
    display: flex;
    gap: 0.5rem;
}

.no-employees {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.no-employees i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.weekly-off-days-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.day-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.day-checkbox {
    display: none;
}

.day-label {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
    background: var(--bg-primary);
    color: var(--text-primary);
    width: 100%;
    display: block;
}

.day-label:hover {
    border-color: var(--primary-color);
    background-color: var(--bg-secondary);
}

.day-checkbox:checked + .day-label {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Responsive Design for Holidays */
@media (max-width: 768px) {
    .holidays-grid {
        grid-template-columns: 1fr;
    }
    
    .holiday-card {
        padding: 1.25rem;
    }
    
    .holiday-date {
        width: 70px;
        height: 70px;
    }
    
    .holiday-date .day {
        font-size: 1.75rem;
    }
    
    .holiday-date .month-abbr {
        font-size: 0.75rem;
    }
    
    .holiday-info h5 {
        font-size: 1rem;
    }
    
    .holiday-actions {
        flex-direction: row;
        margin-left: 0;
        margin-top: 1rem;
        width: 100%;
        justify-content: flex-end;
    }
    
    .holidays-month h4 {
        font-size: 1.125rem;
    }
}

/* Responsive Design for Weekly Offs */
@media (max-width: 768px) {
    .employee-weekly-off-card {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .weekly-off-days {
        justify-content: center;
        margin: 1rem 0;
    }
    
    .weekly-off-days-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}