/* Custom CSS for FlexiCon */
    @import "tailwind.css";
   /* Modern Space Theme Styles */
        @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
        
        * {
            font-family: 'Inter', sans-serif;
        }
        
        .space-bg {
            background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 25%, #16213e 50%, #0f0f23 100%);
            position: relative;
            overflow: hidden;
        }
        
        .space-bg::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-image: 
                radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.3), transparent),
                radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.2), transparent),
                radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.4), transparent),
                radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.3), transparent),
                radial-gradient(2px 2px at 160px 30px, rgba(255,255,255,0.2), transparent);
            background-repeat: repeat;
            background-size: 200px 100px;
            animation: starMove 20s linear infinite;
        }
        
        @keyframes starMove {
            from { transform: translateY(0px); }
            to { transform: translateY(-100px); }
        }
        
        .glow-card {
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(10px);
            transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
        }
        
        .glow-card:hover {
            background: rgba(255, 255, 255, 0.08);
            box-shadow: 0 20px 40px rgba(99, 102, 241, 0.1);
            transform: translateY(-5px);
        }
        
        .floating {
            animation: float 6s ease-in-out infinite;
        }
        
        @keyframes float {
            0%, 100% { transform: translateY(0px); }
            50% { transform: translateY(-20px); }
        }
        
        .fade-in-up {
            opacity: 0;
            transform: translateY(30px);
            animation: fadeInUp 1s ease-out forwards;
        }
        
        @keyframes fadeInUp {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .text-gradient {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        .text-gradient-space {
            background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 50%, #8b5cf6 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        .btn-glow {
            box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
            transition: all 0.4s ease;
        }
        
        .btn-glow:hover {
            box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6);
            transform: translateY(-2px);
        }
        
        .pulse-gentle {
            animation: pulseGentle 4s ease-in-out infinite;
        }
        
        @keyframes pulseGentle {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.7; }
        }
        
        .nav-glass {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(20px);
            border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        }
        
        .feature-glow {
            background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
            backdrop-filter: blur(15px);
            border: 1px solid rgba(255,255,255,0.1);
            transition: all 0.5s ease;
        }
        
        .feature-glow:hover {
            background: linear-gradient(135deg, rgba(99,102,241,0.1) 0%, rgba(139,92,246,0.1) 100%);
            border-color: rgba(99,102,241,0.3);
            box-shadow: 0 15px 35px rgba(99,102,241,0.1);
        }
        
        .scroll-reveal {
            opacity: 0;
            transform: translateY(50px);
            transition: all 0.8s ease-out;
        }
        
        .scroll-reveal.visible {
            opacity: 1;
            transform: translateY(0);
        }
/* CSS Variables for Light and Dark Mode */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --border-color: #e5e7eb;
    --shadow: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-primary: #1f2937;
    --bg-secondary: #111827;
    --bg-tertiary: #374151;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-tertiary: #9ca3af;
    --border-color: #4b5563;
    --shadow: rgba(0, 0, 0, 0.3);
}

/* Dark mode toggle button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px var(--shadow);
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--shadow);
}

/* Apply dark mode styles */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.app-loading .top-nav-bar,
body.app-loading .sidebar-section {
    display: none !important;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Apply animations to elements */
.animate-fade-in {
    animation: fadeInUp 0.8s ease-out;
}

.animate-slide-in {
    animation: slideInLeft 0.8s ease-out;
}

.animate-bounce-hover:hover {
    animation: bounce 1s;
}

/* Custom gradient backgrounds */
.gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.gradient-success {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Custom button styles */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(240, 147, 251, 0.6);
}

/* Custom card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Code block styling */
.code-block {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 20px;
    color: #fff;
    font-family: 'Fira Code', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
    white-space: pre-wrap;
}

/* Syntax highlighting */
.code-block .keyword {
    color: #569cd6;
}

.code-block .string {
    color: #ce9178;
}

.code-block .comment {
    color: #6a9955;
    font-style: italic;
}

.code-block .number {
    color: #b5cea8;
}

.code-block .function {
    color: #dcdcaa;
}

/* Navigation improvements */
.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

/* Toast Notification Styles - DarkFoodTheme */
.toast {
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    animation: toastSlideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast-success {
    background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
    color: #FFFFFF;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.toast-danger,
.toast-error {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: #FFFFFF;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.toast-warning {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: #FFFFFF;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.toast-info {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: #FFFFFF;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom scrollbar - DarkFoodTheme */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #0F1412;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #2DD4BF 0%, #22C55E 100%);
    border-radius: 10px;
    border: 2px solid #0F1412;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #22C55E 0%, #2DD4BF 100%);
    box-shadow: 0 0 10px rgba(45, 212, 191, 0.5);
}

::-webkit-scrollbar-corner {
    background: #0F1412;
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #2DD4BF #0F1412;
}

/* Mobile menu animation */
.mobile-menu {
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.open {
    transform: translateX(0);
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s ease-in-out;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.notification.error {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
}

.notification.warning {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
}

.notification.info {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
}

/* Form improvements */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input.error {
    border-color: #ef4444;
}

.form-input.success {
    border-color: #10b981;
}

.form-error {
    color: #ef4444;
    font-size: 14px;
    margin-top: 4px;
}

.form-success {
    color: #10b981;
    font-size: 14px;
    margin-top: 4px;
}

/* Dashboard specific styles */
.dashboard-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

/* Restaurant menu management */
.restaurant-menu .tab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1.2;
}

.restaurant-menu nav[aria-label="Tabs"] {
    flex-wrap: wrap;
    gap: 0 24px;
}

.restaurant-menu-card {
    height: 100%;
}

.restaurant-menu-table th,
.restaurant-menu-table td {
    vertical-align: middle;
}

.restaurant-menu-table th {
    white-space: nowrap;
}

.restaurant-menu .line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 768px) {
    .restaurant-menu nav[aria-label="Tabs"] {
        gap: 0 12px;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .restaurant-menu .tab-btn {
        flex: 1 1 auto;
    }
}

.dashboard-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.metric-card {
    text-align: center;
    padding: 32px 24px;
}

.metric-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
}

.metric-label {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-change {
    font-size: 14px;
    font-weight: 500;
    margin-top: 8px;
}

.metric-change.positive {
    color: #10b981;
}

.metric-change.negative {
    color: #ef4444;
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-active {
    background: #10b981;
}

.status-inactive {
    background: #ef4444;
}

.status-pending {
    background: #f59e0b;
}

/* Progress bars */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table tr:hover {
    background: #f9fafb;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background: #dbeafe;
    color: #1e40af;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-error {
    background: #fee2e2;
    color: #991b1b;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .mobile-hidden {
        display: none !important;
    }
    
    .mobile-full {
        width: 100% !important;
    }
    
    .mobile-text-center {
        text-align: center !important;
    }
    
    .mobile-padding {
        padding: 16px !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .dark-mode-support {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .dark-mode-support .dashboard-card {
        background: #374151;
        border-color: #4b5563;
    }
    
    .dark-mode-support .form-input {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .dark-mode-support .table th {
        background: #374151;
        color: #f9fafb;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .dashboard-card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .btn-primary,
    .btn-secondary {
        background: #000 !important;
        color: #fff !important;
        border: 2px solid #fff !important;
    }
    
    .form-input {
        border: 2px solid #000 !important;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Top Navigation Bar */
.top-nav-bar {
    position: fixed;
    top: 0;
    left: 280px;
    right: 0;
    height: 70px;
    background: #1A1D1C;
    border-bottom: 1px solid rgba(45, 212, 191, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    /* Above all page content (page dropdowns max out at z-index 3000) but below
       modal overlays (9999+) so the notification panel and user popover remain
       visible over the routed page while modals still cover the nav. */
    z-index: 8000;
    transition: left 0.3s ease;
}

.top-nav-left {
    flex: 1;
}

.top-nav-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Notification Icon */
.nav-icon {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(45, 212, 191, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-icon:hover {
    background: rgba(45, 212, 191, 0.2);
    box-shadow: 0 0 15px rgba(45, 212, 191, 0.2);
}

.nav-icon i {
    color: #2DD4BF;
    font-size: 18px;
}

.notification-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #1A1D1C;
}

/* User Profile Dropdown */
.user-profile-dropdown {
    position: relative;
}

.user-profile-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: rgba(45, 212, 191, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-profile-trigger:hover {
    background: rgba(45, 212, 191, 0.2);
    box-shadow: 0 0 15px rgba(45, 212, 191, 0.2);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #2DD4BF;
    object-fit: cover;
}

.user-name {
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 600;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-profile-trigger i {
    color: #2DD4BF;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.user-profile-dropdown:hover .user-profile-trigger i {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 220px;
    background: #252927;
    border: 1px solid rgba(45, 212, 191, 0.2);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    padding: 8px;
    z-index: 9998;
}

.user-profile-dropdown:hover .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.dropdown-item:hover {
    background: rgba(45, 212, 191, 0.1);
}

.dropdown-item i {
    color: #2DD4BF;
    font-size: 16px;
    width: 20px;
}

.dropdown-item.logout {
    color: #EF4444;
}

.dropdown-item.logout i {
    color: #EF4444;
}

.dropdown-item.logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

.dropdown-divider {
    height: 1px;
    background: rgba(45, 212, 191, 0.1);
    margin: 8px 0;
}

/* App Container Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    padding-top: 70px;
}

/* Hide sidebar and top nav on public pages */
body.public-page .top-nav-bar,
body.public-page .sidebar-section {
    display: none !important;
}

body.public-page .app-container {
    padding-top: 0 !important;
}

body.public-page .app-section {
    margin-left: 0 !important;
}

.sidebar-section {
    width: 280px;
    min-width: 280px;
    background: #1A1D1C;
    border-right: 1px solid rgba(45, 212, 191, 0.1);
    overflow-y: auto;
    overflow-x: hidden;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.app-section {
    flex: 1;
    margin-left: 280px;
    background: #0F1412;
    min-height: calc(100vh - 70px);
    overflow-x: hidden;
    transition: margin-left 0.3s ease;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .top-nav-bar {
        left: 0;
    }
    
    .user-name {
        display: none;
    }
    
    .sidebar-section {
        transform: translateX(-100%);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    }
    
    .sidebar-section.mobile-open {
        transform: translateX(0);
    }
    
    .app-section {
        margin-left: 0;
    }
}

/* Sidebar toggle button for mobile */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 101;
    background: #1A1D1C;
    border: 1px solid rgba(45, 212, 191, 0.3);
    border-radius: 8px;
    padding: 10px 15px;
    color: #2DD4BF;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: rgba(45, 212, 191, 0.1);
    box-shadow: 0 0 15px rgba(45, 212, 191, 0.2);
}

@media (max-width: 768px) {
    .sidebar-toggle {
        display: block;
    }
}

/* Modal Styles - DarkFoodTheme */
[modal-manager] {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
}

[modal-manager] > * {
    pointer-events: auto;
}

/* PageLess Modal Container - CRITICAL Z-INDEX */
.custom-modal-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(8px) !important;
    z-index: 99999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    animation: fadeIn 0.3s ease !important;
}

/* Modal Close Animations */
.custom-modal-container.closing {
    animation: customModalContainerFadeOut 0.25s ease forwards !important;
}

.custom-modal-close {
    animation: customModalFadeOut 0.25s ease forwards !important;
}

@keyframes customModalContainerFadeOut {
    from { opacity: 1; }
    to { opacity: 0; pointer-events: none; }
}

@keyframes customModalFadeOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.95); pointer-events: none; }
}

/* PageLess Modal Content */
.custom-modal {
    position: relative !important;
    background: #1A1D1C !important;
    border: 1px solid rgba(45, 212, 191, 0.3) !important;
    border-radius: 20px !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(45, 212, 191, 0.1) !important;
    max-width: 550px !important;
    width: 100% !important;
    max-height: 85vh !important;
    overflow: hidden !important;
    z-index: 100000 !important;
    animation: modalSlideUp 0.3s ease !important;
}

/* Modal Overlay */
.modal-overlay,
[class*="modal-overlay"] {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal Container */
.modal,
.modal-container,
[class*="modal-"] .modal-content {
    background: #1A1D1C;
    border: 1px solid rgba(45, 212, 191, 0.2);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 10000;
    animation: modalSlideUp 0.3s ease;
    position: relative;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal Header */
.modal-header,
.custom-modal-header,
.modal-header-container {
    padding: 24px 28px;
    border-bottom: 1px solid rgba(45, 212, 191, 0.15);
    position: relative;
    background: linear-gradient(180deg, rgba(45, 212, 191, 0.03) 0%, transparent 100%);
}

.custom-modal-header .h5,
.custom-modal-header .h6 {
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-modal-header .title {
    color: #FFFFFF;
    font-weight: 600;
}

.custom-modal-header .fal,
.custom-modal-header .fa {
    color: #2DD4BF;
    font-size: 20px;
}

.modal-title {
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-icon {
    font-size: 20px;
}

.modal-description {
    color: #9CA3AF;
    font-size: 13px;
    margin: 8px 0 0 0;
}

/* Modal Close Button in Header */
.modal-close,
.custom-modal-close-button {
    position: absolute !important;
    top: 20px !important;
    right: 24px !important;
    background: rgba(239, 68, 68, 0.1) !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
    border-radius: 8px !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    color: #EF4444 !important;
    font-size: 18px !important;
    padding: 0 !important;
    z-index: 10 !important;
}

.modal-close:hover,
.custom-modal-close-button:hover {
    background: rgba(239, 68, 68, 0.2) !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4) !important;
    transform: rotate(90deg) !important;
}

.custom-modal-close-button.d-none {
    display: none !important;
}

/* Modal Body */
.modal-body,
.custom-modal-body {
    padding: 20px 28px;
    max-height: calc(85vh - 160px);
    overflow-y: auto;
}

/* Modal Form Inputs */
.custom-modal-body input[type="text"],
.custom-modal-body input[type="email"],
.custom-modal-body input[type="number"],
.custom-modal-body input[type="password"],
.custom-modal-body input[type="url"],
.custom-modal-body textarea,
.custom-modal-body select,
.modal-body input[type="text"],
.modal-body input[type="email"],
.modal-body input[type="number"],
.modal-body input[type="password"],
.modal-body input[type="url"],
.modal-body textarea,
.modal-body select {
    width: 100% !important;
    padding: 11px 14px !important;
    background: #252927 !important;
    border: 1px solid rgba(45, 212, 191, 0.15) !important;
    border-radius: 10px !important;
    color: #FFFFFF !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    margin-bottom: 16px !important;
}

.custom-modal-body input:focus,
.custom-modal-body textarea:focus,
.custom-modal-body select:focus,
.modal-body input:focus,
.modal-body textarea:focus,
.modal-body select:focus {
    outline: none !important;
    border-color: #2DD4BF !important;
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.1) !important;
    background: #2A2F2D !important;
}

.custom-modal-body label,
.modal-body label {
    color: #FFFFFF !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    display: block !important;
    margin-bottom: 6px !important;
    letter-spacing: 0.3px !important;
}

.custom-modal-body textarea {
    min-height: 100px !important;
    resize: vertical !important;
}

/* Modal Footer */
.modal-footer,
.custom-modal .row.no-gutters {
    padding: 20px 28px !important;
    border-top: 1px solid rgba(45, 212, 191, 0.15) !important;
    display: flex !important;
    gap: 12px !important;
    justify-content: flex-end !important;
    background: linear-gradient(0deg, rgba(45, 212, 191, 0.02) 0%, transparent 100%) !important;
}

/* Modal Buttons - Base Styles */
.custom-modal button,
.modal-footer button,
.modal-button {
    padding: 11px 24px !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    letter-spacing: 0.2px !important;
    min-width: 110px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Submit/Primary Button - Create Category */
.custom-modal button[type="submit"],
.custom-modal progress-button,
.custom-modal progress-button button,
.modal-button-primary,
.modal-footer button[type="submit"],
button[class*="submit"] {
    background: linear-gradient(135deg, #2DD4BF 0%, #22C55E 100%) !important;
    color: #FFFFFF !important;
    box-shadow: 0px 4px 14px rgba(34, 197, 94, 0.35) !important;
    border: none !important;
}

.custom-modal button[type="submit"]:hover,
.custom-modal progress-button:hover,
.custom-modal progress-button button:hover,
.modal-button-primary:hover,
.modal-footer button[type="submit"]:hover {
    box-shadow: 0px 6px 18px rgba(34, 197, 94, 0.45) !important;
    transform: translateY(-2px) !important;
    background: linear-gradient(135deg, #22C55E 0%, #2DD4BF 100%) !important;
}

.custom-modal button[type="submit"]:active,
.custom-modal progress-button:active {
    transform: translateY(0px) !important;
    box-shadow: 0px 2px 8px rgba(34, 197, 94, 0.3) !important;
}

/* Secondary/Close Button */
.custom-modal button.close-modal,
.custom-modal button.switch-mode,
.modal-button-secondary,
.modal-footer button[type="button"],
button[class*="cancel"] {
    background: rgba(45, 212, 191, 0.05) !important;
    color: #FFFFFF !important;
    border: 1px solid rgba(45, 212, 191, 0.2) !important;
}

.custom-modal button.close-modal:hover,
.custom-modal button.switch-mode:hover,
.modal-button-secondary:hover {
    background: rgba(45, 212, 191, 0.1) !important;
    border-color: rgba(45, 212, 191, 0.4) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0px 4px 12px rgba(45, 212, 191, 0.2) !important;
}

.custom-modal button.close-modal:active,
.custom-modal button.switch-mode:active {
    transform: translateY(0px) !important;
}

/* Confirmation Modal */
.confirmation-modal .modal-body {
    text-align: center;
    padding: 32px;
}

.confirmation-modal .modal-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.confirmation-modal .modal-message {
    color: #FFFFFF;
    font-size: 16px;
    line-height: 1.6;
}

/* Modal Loading State */
.modal-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 29, 28, 0.95);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.modal-loading .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(45, 212, 191, 0.2);
    border-top-color: #2DD4BF;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Modal Responsive */
@media (max-width: 768px) {
    .modal,
    .modal-container,
    .custom-modal {
        max-width: 95% !important;
        margin: 10px !important;
        border-radius: 16px !important;
    }
    
    .modal-header,
    .custom-modal-header,
    .modal-header-container {
        padding: 20px !important;
    }
    
    .modal-body,
    .custom-modal-body {
        padding: 16px 20px !important;
    }
    
    .modal-footer,
    .custom-modal .row.no-gutters {
        padding: 16px 20px !important;
        flex-direction: column-reverse !important;
    }
    
    .modal-footer button,
    .custom-modal button {
        width: 100% !important;
    }
}

/* Scrollbar for Modal */
.modal::-webkit-scrollbar,
.modal-container::-webkit-scrollbar,
.custom-modal::-webkit-scrollbar {
    width: 8px;
}

.modal::-webkit-scrollbar-track,
.modal-container::-webkit-scrollbar-track,
.custom-modal::-webkit-scrollbar-track {
    background: #252927;
    border-radius: 0 24px 24px 0;
}

.modal::-webkit-scrollbar-thumb,
.modal-container::-webkit-scrollbar-thumb,
.custom-modal::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #2DD4BF 0%, #22C55E 100%);
    border-radius: 4px;
}

.modal::-webkit-scrollbar-thumb:hover,
.modal-container::-webkit-scrollbar-thumb:hover,
.custom-modal::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #22C55E 0%, #2DD4BF 100%);
}
