:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --success: #4caf50;
    --danger: #f44336;
    --warning: #ff9800;
    --info: #2196f3;
    --dark: #1a1a2e;
    --light: #f8f9fa;
    --gray: #6c757d;
}

* {
    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;
}

/* Navigation */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
}

.nav-menu li a {
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-block;
}

.nav-menu li a:hover {
    background: var(--light);
    color: var(--primary);
}

.nav-menu li a.active {
    background: var(--primary);
    color: white;
}

/* Main Container */
.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.card-body {
    padding: 1.5rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--light);
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

tr:hover {
    background: #f5f5f5;
}

/* Badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
}

.badge-danger { background: #fee; color: var(--danger); }
.badge-warning { background: #fff3e0; color: var(--warning); }
.badge-success { background: #e8f5e9; color: var(--success); }
.badge-info { background: #e3f2fd; color: var(--info); }

/* Progress Bar */
.progress {
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    height: 8px;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.login-card h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary);
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.stat-card h3 {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    th, td {
        padding: 0.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
/* Progress bar enhancements */
.progress {
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Animation for stat cards */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.stat-card {
    animation: slideIn 0.5s ease forwards;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

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

/* Enhanced table styling */
.data-table table {
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th:first-child {
    border-top-left-radius: 8px;
}

.data-table th:last-child {
    border-top-right-radius: 8px;
}

/* Badge animations */
.badge {
    transition: transform 0.2s ease;
}

.badge:hover {
    transform: scale(1.05);
}

/* Empty state styling */
.empty-state {
    text-align: center;
    padding: 3rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.empty-state p {
    margin: 0;
    color: #666;
}

.empty-state i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 1rem;
}
/* Priority Badges */
.priority-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.priority-high {
    background: #fee;
    color: #f44336;
}

.priority-medium {
    background: #fff3e0;
    color: #ff9800;
}

.priority-low {
    background: #e8f5e9;
    color: #4caf50;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-pending {
    background: #fff3e0;
    color: #ff9800;
}

.status-completed {
    background: #e8f5e9;
    color: #4caf50;
}

.status-failed {
    background: #fee;
    color: #f44336;
}
/* Enhanced Navigation Bar */
.navbar {
    background: white;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right:10px;
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-brand i {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.8rem;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #667eea;
}

.nav-menu-wrapper {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
    justify-content: space-between;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.nav-menu li a {
    padding: 0.6rem 1.2rem;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.nav-menu li a i {
    font-size: 1.1rem;
}

.nav-menu li a:hover {
    background: #f5f5f5;
    color: #667eea;
    transform: translateY(-2px);
}

.nav-menu li a.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* User Dropdown */
.nav-user {
    margin-left: auto;
}

.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 50px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.user-dropdown-btn:hover {
    background: #e9ecef;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
}

.user-info {
    text-align: left;
}

.user-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.user-role {
    display: block;
    font-size: 0.75rem;
    color: #667eea;
}

.user-role i {
    font-size: 0.7rem;
    margin-right: 3px;
}

.dropdown-icon {
    color: #999;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.user-dropdown-btn:hover .dropdown-icon {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.dropdown-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.dropdown-user-info {
    flex: 1;
}

.dropdown-user-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.dropdown-user-email {
    font-size: 0.8rem;
    color: #666;
}

.dropdown-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 8px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #555;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.dropdown-item i {
    width: 20px;
    font-size: 1.1rem;
}

.dropdown-item:hover {
    background: #f5f5f5;
    color: #667eea;
}

.logout-item {
    color: #f44336;
}

.logout-item:hover {
    background: #fee;
    color: #f44336;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
    
    .nav-menu-wrapper {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        transition: left 0.3s ease;
        padding: 20px;
        overflow-y: auto;
        z-index: 999;
    }
    
    .nav-menu-wrapper.show {
        left: 0;
    }
    
    .nav-menu {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-menu li a {
        justify-content: center;
        padding: 12px;
    }
    
    .nav-user {
        width: 100%;
        margin-top: 20px;
        border-top: 1px solid #e0e0e0;
        padding-top: 20px;
    }
    
    .user-dropdown {
        width: 100%;
    }
    
    .user-dropdown-btn {
        width: 100%;
        justify-content: center;
    }
    
    .dropdown-menu {
        position: static;
        margin-top: 10px;
        box-shadow: none;
        border: 1px solid #e0e0e0;
    }
    
    .container {
        padding: 1rem;
    }
}

/* Profile Modal Styles */
.profile-avatar {
    transition: transform 0.3s ease;
}

.profile-avatar:hover {
    transform: scale(1.05);
}

/* Modal Active State */
.modal.active {
    display: flex !important;
    opacity: 1;
}

/* Animation for dropdown */
@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu.show {
    animation: dropdownFadeIn 0.3s ease;
}
/* Role badges */
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.role-admin {
    background: #fee;
    color: #f44336;
}

.role-user {
    background: #e3f2fd;
    color: #2196f3;
}

/* Button sizes */
.btn-sm {
    padding: 5px 10px;
    font-size: 0.85rem;
}

/* Modal active state */
.modal.active {
    display: flex !important;
    opacity: 1;
}

/* Password hint */
.password-hint {
    display: block;
    margin-top: 5px;
    font-size: 0.75rem;
    color: #999;
}