/* assets/css/modern.css - Unified modern UI for all employee files */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-start: #667eea;
    --primary-end: #764ba2;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --dark: #1f2937;
    --light: #f9fafb;
    --gray: #6c757d;
    --border: #e5e7eb;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
    --radius: 24px;
    --radius-sm: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--dark);
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.header h2 {
    color: white;
    font-size: 20px;
    font-weight: 600;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 60px;
    padding: 4px;
}

.nav-menu li a {
    display: block;
    padding: 10px 20px;
    color: white;
    text-decoration: none;
    border-radius: 60px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background: white;
    color: var(--primary-start);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Cards */
.card {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    background: var(--primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--gray);
    font-weight: 500;
}

.stat-sub {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 60px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--dark);
}

.btn-outline:hover {
    border-color: var(--primary-start);
    color: var(--primary-start);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-start);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    padding: 16px;
    text-align: left;
    background: var(--light);
    font-weight: 600;
    font-size: 13px;
    color: var(--gray);
    border-bottom: 1px solid var(--border);
}

td {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

tr:hover {
    background: var(--light);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-approved,
.badge-active {
    background: #d1fae5;
    color: #065f46;
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.badge-rejected,
.badge-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.badge-verified {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fed7aa;
    color: #9b2c1d;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: #fed7aa;
    color: #9b2c1d;
    border-left: 4px solid var(--warning);
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid var(--info);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 32px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: white;
    border-radius: 32px 32px 0 0;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.loading-content {
    text-align: center;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeIn 0.5s ease-out;
}

/* Map Preview */
.map-preview {
    height: 250px;
    background: #f0f0f0;
    border-radius: 16px;
    margin: 16px 0;
    overflow: hidden;
}

/* Location Status */
.location-status {
    padding: 16px;
    border-radius: 16px;
    margin: 15px 0;
    transition: all 0.3s ease;
}

.status-allowed {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    border: 2px solid var(--success);
    color: #065f46;
}

.status-warning {
    background: linear-gradient(135deg, #fed7aa, #fdba74);
    border: 2px solid var(--warning);
    color: #9b2c1d;
}

.status-denied {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border: 2px solid var(--danger);
    color: #991b1b;
}

.status-checking {
    background: #f3f4f6;
    border: 2px solid #9ca3af;
    color: #4b5563;
}

/* Clock Display */
.clock-display {
    font-size: 64px;
    font-weight: 700;
    font-family: 'Inter', monospace;
    text-align: center;
    margin: 20px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background: rgba(255, 255, 255, 0.95);
        border-radius: 12px;
        padding: 12px;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li a {
        color: var(--dark);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .clock-display {
        font-size: 48px;
    }
    
    .container {
        padding: 16px;
    }
    
    .card {
        padding: 16px;
    }
    
    th, td {
        padding: 10px;
        font-size: 12px;
    }
}

/* Add any missing styles to modern.css */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 150px;
}

.filter-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray);
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all 0.2s;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary-start);
}

/* System info styling */
.system-info-grid {
    background: var(--light);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}


/* Mobile Navigation Styles - Critical for toggle to work */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s;
    z-index: 1001;
}

.nav-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-toggle:active {
    transform: scale(0.95);
}

/* Mobile overlay */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.nav-overlay.active {
    display: block;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .nav-toggle {
        display: block !important;
    }
    
    .nav-menu {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        width: 280px !important;
        height: 100vh !important;
        background: white !important;
        flex-direction: column !important;
        padding: 80px 20px 20px !important;
        margin: 0 !important;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1) !important;
        transition: left 0.3s ease !important;
        z-index: 999 !important;
        overflow-y: auto !important;
        display: flex !important;
    }
    
    .nav-menu.active {
        left: 0 !important;
    }
    
    .nav-menu li {
        width: 100% !important;
        margin: 0 !important;
    }
    
    .nav-menu li a {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        padding: 14px 16px !important;
        color: #333 !important;
        font-size: 16px !important;
        border-radius: 12px !important;
        transition: background 0.2s !important;
    }
    
    .nav-menu li a:hover {
        background: #f3f4f6 !important;
    }
    
    .nav-menu li a.active {
        background: linear-gradient(135deg, #667eea, #764ba2) !important;
        color: white !important;
    }
    
    .nav-menu li a .icon {
        font-size: 20px !important;
        min-width: 24px !important;
    }
    
    /* User menu on mobile */
    .user-menu {
        margin-top: 20px !important;
        border-top: 1px solid #e5e7eb !important;
        padding-top: 20px !important;
    }
    
    .user-dropdown {
        position: static !important;
        display: block !important;
        box-shadow: none !important;
        background: transparent !important;
        margin-top: 8px !important;
    }
    
    .user-dropdown a {
        padding: 10px 16px !important;
        color: #666 !important;
    }
    
    .user-dropdown a:hover {
        background: #f3f4f6 !important;
    }
    
    .user-menu > a {
        cursor: default !important;
    }
    
    .user-menu > a .dropdown-arrow {
        display: none !important;
    }
}

/* Animation for alerts */
@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.alert {
    animation: slideDown 0.3s ease;
}