/* Modern Admin Styles - Enhanced Design System */

:root {
    /* Primary Color Palette */
    --forge-primary: #667eea;
    --forge-secondary: #764ba2;
    --forge-accent: #f093fb;
    --forge-danger: #e74c3c;
    --forge-success: #27ae60;
    --forge-info: #3498db;
    --forge-warning: #f39c12;
    
    /* Neutral Colors */
    --forge-light: #ecf0f1;
    --forge-dark: #2c3e50;
    --forge-text: #1a202c;
    --forge-text-light: #ffffff;
    --forge-bg: #f8fafc;
    --forge-card-bg: #ffffff;
    --forge-border: #e2e8f0;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    --gradient-success: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    --gradient-danger: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
}

/* Base Styling */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', 'Roboto', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #ffffff;
    color: var(--forge-text);
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 100px; /* Increased padding to account for fixed navbar */
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    contain: layout style;
}

/* Prevent unwanted movement */
* {
    box-sizing: border-box;
}

/* Prevent layout shifts from transforms */
.btn:hover,
.dropdown-item:hover,
.footer-links a:hover,
.card:hover {
    will-change: transform;
    backface-visibility: hidden;
}

/* Fixed container behavior */
.container, .container-fluid {
    position: relative;
    overflow-x: hidden;
}

/* Animated Gradient Background */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Main content spacing */
main, .container-fluid, .container {
    margin-top: 1rem; /* Additional spacing for main content */
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--forge-primary);
    margin-bottom: var(--spacing-md);
}

.display-1, .display-2, .display-3, .display-4 {
    font-weight: 700;
    letter-spacing: -0.025em;
}

/* Enhanced Navbar */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 0;
    z-index: 1030; /* Ensure navbar stays on top */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    animation: navbarGradientShift 8s ease infinite;
}

/* Navbar gradient animation */
@keyframes navbarGradientShift {
    0% {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }
    25% {
        background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    }
    50% {
        background: linear-gradient(135deg, #667eea 50%, #764ba2 50%);
    }
    75% {
        background: linear-gradient(135deg, #764ba2 0%, #667eea 50%, #764ba2 100%);
    }
    100% {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }
}

/* Prevent content shift */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.025em;
    color: var(--forge-text-light) !important;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: none; /* Prevent unwanted transitions */
}

.navbar-brand img {
    height: 32px;
    width: auto;
    transition: none; /* Prevent unwanted transitions */
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95) !important;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transform: translateZ(0); /* Force hardware acceleration */
}

.navbar-nav .nav-link:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px) translateZ(0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.navbar-nav .nav-link.active {
    color: white !important;
    background: rgba(255, 255, 255, 0.25);
    border-bottom: 2px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.navbar-nav .nav-link i {
    font-size: 1.1rem;
    transition: none; /* Prevent icon movement */
}

/* Enhanced Cards with Beautiful Colors */
.card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(226, 232, 240, 0.8);
    margin-bottom: var(--spacing-lg);
    position: relative;
    transform: translateZ(0); /* Force hardware acceleration */
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
    background-size: 200% 100%;
    animation: gradientShift 8s ease infinite;
}

.card:hover {
    transform: translateY(-4px) translateZ(0);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.card:hover::before {
    animation: gradientShift 2s ease infinite;
}

.card-header {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: var(--spacing-lg) var(--spacing-xl);
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.card-header i {
    font-size: 1.2rem;
}

.card-body {
    padding: var(--spacing-xl);
}

.card-footer {
    background: rgba(0, 0, 0, 0.02);
    border-top: 1px solid var(--forge-border);
    padding: var(--spacing-lg) var(--spacing-xl);
}

/* Enhanced Stats Cards with Beautiful Styling */
.stats-card {
    text-align: center;
    padding: var(--spacing-xl);
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
    background-size: 200% 100%;
    animation: gradientShift 8s ease infinite;
}

.stats-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

.stats-card:hover::before {
    animation: gradientShift 4s ease infinite;
}

.stats-card i {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    color: var(--forge-secondary);
    opacity: 0.9;
}

.stats-card .stats-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--forge-primary);
    line-height: 1;
}

.stats-card .stats-label {
    color: #64748b;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* Enhanced Buttons */
.btn {
    border-radius: var(--radius-md);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    cursor: pointer;
    transform: translateZ(0); /* Force hardware acceleration */
}

.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:hover {
    transform: translateY(-2px) translateZ(0);
    box-shadow: var(--shadow-lg);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    border: none;
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(39, 174, 96, 0.3);
}

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

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12 0%, #f1c40f 100%);
    color: var(--forge-text);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
    color: var(--forge-text);
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Enhanced Tables with Beautiful Styling */
.table {
    margin-bottom: 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transform: translateZ(0); /* Force hardware acceleration */
}

.table thead th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: var(--spacing-lg);
    position: sticky;
    top: 0;
    z-index: 10;
}

.table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    transform: translateZ(0); /* Force hardware acceleration */
}

.table tbody tr:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    transform: scale(1.01) translateZ(0);
}

.table tbody tr:last-child {
    border-bottom: none;
}

.table td {
    vertical-align: middle;
    padding: var(--spacing-lg);
    border: none;
}

/* Enhanced Badges with Fixed Colors */
.badge {
    padding: 0.5rem 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

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

.badge-secondary {
    background: var(--forge-secondary);
    color: white;
}

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

.badge-warning {
    background: var(--forge-warning);
    color: var(--forge-text);
}

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

.badge-info {
    background: var(--forge-info);
    color: white;
}

/* Status Badge Colors - Fixed for Visibility */
.badge-pending {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
}

.badge-in-progress {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.badge-solved {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

/* Enhanced Form Controls with Beautiful Styling */
.form-control, .form-select {
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    border: 2px solid rgba(226, 232, 240, 0.8);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    transition: all 0.3s ease;
    font-size: 0.875rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    color: #1a202c; /* Ensure text is visible */
    transform: translateZ(0); /* Force hardware acceleration */
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
    background: #ffffff;
    transform: translateY(-1px) translateZ(0);
    color: #1a202c; /* Ensure text remains visible on focus */
}

/* Textarea specific styling */
textarea.form-control {
    min-height: 120px;
    resize: vertical;
    font-family: 'Inter', 'Roboto', sans-serif;
    line-height: 1.5;
    color: #1a202c;
}

textarea.form-control::placeholder {
    color: #64748b;
    opacity: 0.8;
}

textarea.form-control:focus::placeholder {
    color: #94a3b8;
    opacity: 0.6;
}

/* Input placeholder styling */
.form-control::placeholder {
    color: #64748b;
    opacity: 0.8;
}

.form-control:focus::placeholder {
    color: #94a3b8;
    opacity: 0.6;
}

/* Select option styling */
.form-select option {
    color: #1a202c;
    background: #ffffff;
}

.form-select:focus option {
    color: #1a202c;
    background: #ffffff;
}

.form-label {
    font-weight: 500;
    color: var(--forge-primary);
    margin-bottom: var(--spacing-sm);
}

/* Enhanced Input Group with Beautiful Styling */
.input-group-text {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius-md);
    color: var(--forge-text);
}

/* Enhanced Alerts with Beautiful Styling */
.alert {
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    border: none;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.alert::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.alert-success {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.05) 0%, rgba(46, 204, 113, 0.05) 100%);
    color: var(--forge-success);
    border-color: rgba(39, 174, 96, 0.2);
}

.alert-success::before {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.05) 0%, rgba(192, 57, 43, 0.05) 100%);
    color: var(--forge-danger);
    border-color: rgba(231, 76, 60, 0.2);
}

.alert-danger::before {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(241, 196, 15, 0.05) 0%, rgba(243, 156, 18, 0.05) 100%);
    color: #8e6e10;
    border-color: rgba(241, 196, 15, 0.2);
}

.alert-warning::before {
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
}

.alert-info {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.05) 0%, rgba(52, 73, 94, 0.05) 100%);
    color: var(--forge-info);
    border-color: rgba(52, 152, 219, 0.2);
}

.alert-info::before {
    background: linear-gradient(135deg, #3498db 0%, #34495e 100%);
}

/* Enhanced Dropdown with Beautiful Styling */
.dropdown-menu {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    padding: var(--spacing-sm);
    min-width: 200px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.dropdown-item {
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #1a202c; /* Ensure text is visible */
}

.dropdown-item:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: #667eea;
    transform: translateX(4px);
}

.dropdown-header {
    font-weight: 600;
    color: var(--forge-primary);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Enhanced Pagination with Beautiful Styling */
.pagination {
    gap: var(--spacing-xs);
}

.page-link {
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    color: #667eea;
    transition: all 0.2s ease;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.page-link:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Enhanced Footer with Beautiful Styling */
.footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--forge-text-light);
    padding: var(--spacing-2xl) 0;
    margin-top: var(--spacing-2xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    transform: translateZ(0); /* Force hardware acceleration */
    contain: layout style paint;
    will-change: transform;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
    background-size: 200% 100%;
    animation: gradientShift 8s ease infinite;
}

.footer h5 {
    color: white;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.footer p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--spacing-sm);
}

.footer i {
    color: rgba(255, 255, 255, 0.8);
    margin-right: var(--spacing-xs);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    margin: 0 var(--spacing-md);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.footer-links a:hover {
    color: #1abc9c;
    text-decoration: none;
    transform: translateY(-1px);
    will-change: transform;
}

/* Enhanced Search with Beautiful Styling */
.search-container {
    position: relative;
}

.search-container .bi-search {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: #94a3b8;
    z-index: 10;
}

.search-input {
    padding-left: 2.5rem;
    border-radius: var(--radius-lg);
    border: 2px solid rgba(226, 232, 240, 0.8);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    color: #1a202c; /* Ensure text is visible */
}

.search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: #ffffff;
    transform: translateY(-1px);
    color: #1a202c; /* Ensure text remains visible on focus */
}

/* Enhanced Toggle Switch with Beautiful Styling */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    transition: 0.4s;
    border-radius: 28px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

input:checked + .toggle-slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

/* Enhanced Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.fade-in-card {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.fade-in-card:nth-child(2) {
    animation-delay: 0.1s;
}

.fade-in-card:nth-child(3) {
    animation-delay: 0.2s;
}

.slide-in-right {
    animation: slideInRight 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.pulse {
    animation: pulse 2s infinite;
}

/* Enhanced Notification Badge */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--forge-danger);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    animation: pulse 2s infinite;
}

/* Navbar Notification Badge - Enhanced */
.navbar-notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--forge-danger);
    color: white;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 2px solid white;
    transform: translate(50%, -50%);
    animation: pulse 2s infinite;
    line-height: 1;
    padding: 0;
}

/* Enhanced dropdown styling for notifications */
.dropdown-menu .dropdown-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.dropdown-menu .dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-menu .dropdown-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: translateX(2px);
}

.dropdown-menu .dropdown-item .fw-bold {
    color: var(--forge-text);
    margin-bottom: 0.25rem;
}

.dropdown-menu .dropdown-item small {
    font-size: 0.8rem;
    line-height: 1.2;
}

/* Ensure dropdown doesn't get cut off */
.dropdown-menu-end {
    right: 0;
    left: auto;
    margin-top: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-lg);
}

/* Enhanced dropdown visibility and positioning */
.dropdown-menu {
    z-index: 99999 !important;
    position: fixed !important;
    top: 80px !important;
    right: 20px !important;
    left: auto !important;
    width: 350px !important;
    max-width: 90vw !important;
    margin-top: 0 !important;
    background: white !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
    backdrop-filter: blur(10px) !important;
    animation: dropdownFadeIn 0.3s ease-out !important;
    transform: none !important;
}

/* Dropdown animation */
@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Ensure navbar doesn't interfere with dropdown */
.navbar {
    z-index: 1030 !important;
}

.navbar-nav .nav-item.dropdown {
    position: relative !important;
}

.navbar-nav .nav-link.position-relative {
    position: relative !important;
    overflow: visible !important;
}

/* Enhanced dropdown header */
.dropdown-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: var(--forge-primary);
    font-weight: 600;
    padding: 1rem 1rem 0.5rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 0.5rem;
}

/* Better dropdown item styling */
.dropdown-item {
    padding: 0.75rem 1rem !important;
    border-radius: var(--radius-sm) !important;
    margin: 0.25rem 0.5rem !important;
    transition: all 0.2s ease !important;
    border: none !important;
    background: transparent !important;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
    transform: translateX(3px) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.dropdown-item:active {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e0 100%) !important;
    transform: translateX(1px) !important;
}

/* Enhanced notification badge positioning */
.navbar-notification-badge {
    position: absolute !important;
    top: -5px !important;
    right: -5px !important;
    background: var(--forge-danger) !important;
    color: white !important;
    border-radius: 50% !important;
    min-width: 20px !important;
    height: 20px !important;
    font-size: 0.75rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 600 !important;
    z-index: 1001 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    border: 2px solid white !important;
    transform: translate(50%, -50%) !important;
    animation: pulse 2s infinite !important;
    line-height: 1 !important;
    padding: 0 !important;
}

/* Ensure dropdown is always visible on mobile */
@media (max-width: 768px) {
    .dropdown-menu {
        position: fixed !important;
        top: 80px !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        max-width: none !important;
        min-width: auto !important;
        margin-top: 0 !important;
    }
    
    .navbar-notification-badge {
        top: -3px !important;
        right: -3px !important;
        min-width: 18px !important;
        height: 18px !important;
        font-size: 0.7rem !important;
    }
    
    .dropdown-menu-end {
        right: 10px !important;
        left: auto !important;
    }
}

/* Additional popup styling for better visibility */
.dropdown-menu.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
}

/* Ensure dropdown appears above all other elements */
.dropdown-menu {
    pointer-events: auto !important;
    overflow: visible !important;
}

/* Enhanced Action Buttons */
.action-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    margin: 0 2px;
    transition: all 0.2s ease;
}

.action-btn:hover {
    transform: scale(1.1);
}

/* Enhanced Chart Container with Beautiful Styling */
.chart-container {
    position: relative;
    height: 350px;
    width: 100%;
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: var(--radius-md);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* Enhanced Loader with Beautiful Styling */
.loader {
    border: 3px solid rgba(226, 232, 240, 0.8);
    border-radius: 50%;
    border-top: 3px solid #667eea;
    width: 32px;
    height: 32px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

/* Enhanced Custom Alert with Beautiful Styling */
.custom-alert {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    max-width: 350px;
    animation: slideInRight 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

/* Enhanced Side Panel with Beautiful Styling */
.side-panel {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    height: 100%;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.side-panel-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--forge-border);
    font-weight: 600;
    color: var(--forge-primary);
    background: rgba(0, 0, 0, 0.02);
}

.side-panel-body {
    padding: 0;
}

.side-panel-item {
    padding: var(--spacing-lg);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.side-panel-item:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    transform: translateX(4px);
}

.side-panel-item:last-child {
    border-bottom: none;
}

/* Enhanced Responsive Design */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 var(--spacing-lg);
    }
}

@media (max-width: 992px) {
    .navbar-nav .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .card-body {
        padding: var(--spacing-lg);
    }
    
    .stats-card {
        padding: var(--spacing-lg);
    }
    
    .stats-card i {
        font-size: 2.5rem;
    }
    
    .stats-card .stats-value {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 90px; /* Slightly less padding on mobile but still enough */
    }
    
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .card {
        margin-bottom: var(--spacing-md);
    }
    
    .stats-card i {
        font-size: 2rem;
    }
    
    .stats-card .stats-value {
        font-size: 1.75rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .table-responsive {
        border-radius: var(--radius-md);
        overflow: hidden;
    }
    
    .card-header {
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: 1rem;
    }
    
    .card-body {
        padding: var(--spacing-md);
    }
}

@media (max-width: 576px) {
    body {
        padding-top: 85px; /* Even less padding on very small screens */
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
    
    .navbar-nav .nav-link i {
        font-size: 1rem;
    }
    
    .stats-card {
        padding: var(--spacing-md);
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .table td, .table th {
        padding: var(--spacing-md);
        font-size: 0.875rem;
    }
    
    .badge {
        padding: 0.375rem 0.625rem;
        font-size: 0.7rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --forge-bg: #1a202c;
        --forge-card-bg: #2d3748;
        --forge-text: #e2e8f0;
        --forge-border: #4a5568;
    }
    
    .table {
        background: rgba(45, 55, 72, 0.9);
        color: var(--forge-text);
    }
    
    .form-control, .form-select {
        background: rgba(45, 55, 72, 0.9);
        color: var(--forge-text);
        border-color: var(--forge-border);
    }
}

/* Print styles */
@media print {
    .navbar, .footer, .btn, .action-btn {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        background: white !important;
    }
    
    body {
        background: white !important;
        color: black;
    }
} 

/* Prevent unwanted animations on scroll */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Smooth scrolling for modern browsers */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
} 