/* VisiGate Industrial Intelligence Design System */

:root {
    /* Industrial Intelligence Color Palette */
    --primary-blue: #0073FF;
    --accent-cyan: #00C4FF;
    --accent-navy: #0066CC;
    --neutral-light: #F5F7FA;
    --neutral-dark: #1A1D23;
    --dark-secondary: #0d1117;
    --success-green: #00D18F;
    --warning-red: #FF3B30;
    --neutral-gray: #6C757D;
    --neutral-light-gray: #ADB5BD;
    
    /* Bootstrap compatibility */
    --bs-primary: var(--primary-blue);
    --bs-success: var(--success-green);
    --bs-danger: var(--warning-red);
    --bs-info: var(--accent-cyan);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    
    /* Spacing */
    --spacing-1: 0.25rem;
    --spacing-2: 0.5rem;
    --spacing-3: 0.75rem;
    --spacing-4: 1rem;
    --spacing-6: 1.5rem;
    --spacing-8: 2rem;
    --spacing-12: 3rem;
    --spacing-16: 4rem;
    
    /* Border Radius */
    --radius-sm: 0.125rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-full: 9999px;
    --border-radius: var(--radius-md);

    /* Sidebar */
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 80px;
    --sidebar-transition: all 0.3s;
}

/* General Styles */
html {
    height: 100%;
    font-size: 16px;
}

body {
    min-height: 100vh;
    font-family: var(--font-sans);
    background: linear-gradient(135deg, var(--neutral-dark) 0%, var(--dark-secondary) 50%, var(--accent-navy) 100%);
    background-attachment: fixed;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    overflow-x: hidden;
    position: relative;
}

/* Animated background particles */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(0, 196, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 115, 255, 0.1) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: #ffffff;
    margin-bottom: var(--spacing-4);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

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

a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-blue);
    text-decoration: none;
}

/* Layout */
.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

#content {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
    margin-left: 0;
    position: relative;
    z-index: 1;
}

/* Default state - sidebar visible, content shifted */
#content {
    width: calc(100% - var(--sidebar-width));
    margin-left: var(--sidebar-width);
}

/* When sidebar is NOT active, content fills the screen */
#sidebar:not(.active) ~ #content {
    width: 100%;
    margin-left: 0;
}

main {
    flex: 1;
    padding: var(--spacing-4) 0;
}

main .container-fluid {
    padding-top: var(--spacing-4);
}

/* Sidebar */
#sidebar {
    width: var(--sidebar-width);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 999;
    background: linear-gradient(180deg, var(--neutral-dark) 0%, var(--dark-secondary) 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    transition: var(--sidebar-transition);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Only hide when active class is NOT present on desktop */
@media (min-width: 769px) {
    #sidebar:not(.active) {
        left: -250px;
        visibility: hidden;
    }
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    #content {
        width: 100%;
        margin-left: 0;
    }
}

#sidebar .sidebar-header {
    padding: var(--spacing-4);
    background: rgba(0, 115, 255, 0.1);
    border-bottom: 1px solid rgba(0, 196, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#sidebar .sidebar-header .logo-container {
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-cyan));
    padding: var(--spacing-2);
    border-radius: 12px;
    width: 100%;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 6px 18px rgba(0, 115, 255, 0.3);
}

#sidebar .sidebar-header button {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#sidebar ul.components {
    padding: var(--spacing-4) 0;
    flex: 1;
    overflow-y: auto;
}

#sidebar ul li {
    position: relative;
}

#sidebar ul li a {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    border-radius: 8px;
    margin: 0 10px;
}

#sidebar ul li a i {
    width: 24px;
    margin-right: var(--spacing-3);
    font-size: 1.1rem;
    text-align: center;
}

#sidebar ul li a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

#sidebar ul li.active > a {
    color: white;
    background: rgba(0, 196, 255, 0.1);
    border-left: 3px solid var(--accent-cyan);
}

#sidebar ul ul a {
    padding-left: 48px;
    background: rgba(0, 115, 255, 0.05);
    border-radius: 6px;
    margin: 4px 10px;
}

#sidebar ul ul li.active a {
    color: white;
    background: rgba(0, 196, 255, 0.15);
}

#sidebar a[aria-expanded="true"] {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

#sidebar .sidebar-footer {
    padding: var(--spacing-4);
    background: rgba(0, 115, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#sidebar .sidebar-footer a {
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: color 0.3s;
}

#sidebar .sidebar-footer a i {
    width: 24px;
    margin-right: var(--spacing-3);
    font-size: 1.1rem;
    text-align: center;
}

#sidebar .sidebar-footer a:hover {
    color: white;
}

#sidebar .user-info {
    display: flex;
    flex-direction: column;
}

#sidebar .user-info ul {
    margin-top: var(--spacing-2);
}

/* Top Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    padding: var(--spacing-3) var(--spacing-4);
}

#sidebarCollapse {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.25rem;
    transition: color 0.3s;
}

#sidebarCollapse:hover {
    color: var(--accent-cyan);
}

.system-time {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.user-dropdown a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.25rem;
}

.user-dropdown a:hover {
    color: var(--accent-cyan);
}

/* Cards - Glassmorphism */
.card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37),
                inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    margin-bottom: var(--spacing-6);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 196, 255, 0.1), transparent);
    transition: left 0.6s;
    pointer-events: none;
}

.card:hover::before {
    left: 100%;
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 196, 255, 0.3);
    box-shadow: 0 12px 40px rgba(0, 115, 255, 0.3);
}

.card-header {
    background: rgba(0, 115, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--spacing-4);
    font-weight: 600;
    color: white;
}

.card-body {
    padding: var(--spacing-4);
    color: rgba(255, 255, 255, 0.9);
}

/* Stats Grid */
.stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 3rem;
    margin-top: 2rem;
    justify-content: flex-start;
}

/* Dashboard Stats Cards */
.stats-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37),
                inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--spacing-6);
    margin-bottom: var(--spacing-6);
    flex: 1;
    min-width: 280px;
    max-width: calc(50% - 0.75rem);
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 196, 255, 0.1), transparent);
    transition: left 0.6s;
    pointer-events: none;
}

.stats-card:hover::before {
    left: 100%;
}

.stats-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 196, 255, 0.3);
    box-shadow: 0 12px 40px rgba(0, 115, 255, 0.3);
}

/* Quick Actions Section */
.quick-actions {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--spacing-6);
    margin-bottom: var(--spacing-8);
}

.quick-actions h5 {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: var(--spacing-4);
    display: flex;
    align-items: center;
}

.quick-actions h5 i {
    margin-right: var(--spacing-2);
    color: var(--accent-cyan);
}

.action-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-2);
    justify-content: space-between;
}

.action-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: var(--spacing-4);
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    font-weight: 500;
    letter-spacing: 0.3px;
    flex: 1;
    min-width: 200px;
    text-align: center;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--accent-cyan);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 196, 255, 0.3);
}

.action-btn i {
    margin-right: var(--spacing-2);
    font-size: 18px;
}


.stats-card .icon,
.stats-card .stats-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-cyan));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-3);
    box-shadow: 0 6px 20px rgba(0, 115, 255, 0.3);
    font-size: 28px;
    color: white;
}

.stats-card .stats-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: var(--spacing-1);
}

.stats-card .stats-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Buttons */
.btn {
    font-weight: 500;
    padding: var(--spacing-2) var(--spacing-4);
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-navy) 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 115, 255, 0.4);
}

.btn-primary::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-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 196, 255, 0.5);
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-cyan) 100%);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.btn-success {
    background: var(--success-green);
    border: none;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 209, 143, 0.4);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 209, 143, 0.5);
}

.btn-warning {
    background: #f59e0b;
    border: none;
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn-danger {
    background: var(--warning-red);
    border: none;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.4);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(255, 59, 48, 0.5);
}

.btn-info {
    background: var(--accent-cyan);
    border: none;
    color: var(--neutral-dark);
    box-shadow: 0 4px 12px rgba(0, 196, 255, 0.4);
}

/* Forms */
.form-control {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: white;
    padding: var(--spacing-2) var(--spacing-3);
    transition: all 0.3s;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(0, 196, 255, 0.15);
    outline: none;
    color: white;
}

.form-label {
    font-weight: 500;
    margin-bottom: var(--spacing-2);
    color: rgba(255, 255, 255, 0.85);
}

.form-select {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    border-radius: 10px;
}

.form-select:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(0, 196, 255, 0.15);
    color: white;
}

/* Tables */
.table {
    color: rgba(255, 255, 255, 0.9);
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    font-weight: 600;
    text-align: left;
    padding: var(--spacing-3) var(--spacing-4);
    background: rgba(0, 115, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

.table td {
    padding: var(--spacing-3) var(--spacing-4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
    color: rgba(255, 255, 255, 0.9);
}

.table-hover tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.table-responsive {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 12px;
    padding: var(--spacing-3) var(--spacing-4);
    margin-bottom: var(--spacing-4);
    backdrop-filter: blur(10px);
}

.alert-success {
    background: rgba(0, 209, 143, 0.15);
    border: 1px solid var(--success-green);
    color: white;
}

.alert-danger {
    background: rgba(255, 59, 48, 0.15);
    border: 1px solid var(--warning-red);
    color: white;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid #f59e0b;
    color: white;
}

.alert-info {
    background: rgba(0, 196, 255, 0.15);
    border: 1px solid var(--accent-cyan);
    color: white;
}

/* Badges */
.badge {
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.85rem;
}

.badge.bg-success {
    background: var(--success-green) !important;
}

.badge.bg-danger {
    background: var(--warning-red) !important;
}

.badge.bg-info {
    background: var(--accent-cyan) !important;
    color: var(--neutral-dark) !important;
}

.badge.bg-warning {
    background: #f59e0b !important;
}

/* Progress Bars */
.progress {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-cyan));
}

.progress-bar.bg-success {
    background: var(--success-green);
}

.progress-bar.bg-danger {
    background: var(--warning-red);
}

.progress-bar.bg-warning {
    background: #f59e0b;
}

.progress-bar.bg-info {
    background: var(--accent-cyan);
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    color: rgba(255, 255, 255, 0.7);
    padding: var(--spacing-3) 0;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    #sidebar {
        margin-left: -250px;
    }

    #sidebar.active {
        margin-left: 0;
    }

    #content {
        width: 100%;
        margin-left: 0;
    }

    .stats-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-3);
    }

    .stats-card {
        max-width: 100%;
        min-width: unset;
        padding: var(--spacing-4);
        margin-bottom: 0;
    }

    .stats-card .stats-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
        margin-bottom: var(--spacing-2);
    }

    .stats-card .stats-value {
        font-size: 1.8rem;
        margin-bottom: var(--spacing-1);
    }

    .stats-card .stats-label {
        font-size: 0.8rem;
    }

    .action-grid {
        flex-direction: column;
        gap: var(--spacing-2);
    }

    .action-btn {
        min-width: unset;
    }
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 997;
    display: none;
}

.sidebar-overlay.active {
    display: block;
}

/* Dropdown menus */
.dropdown-menu {
    background: rgba(26, 29, 35, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.dropdown-item {
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s;
}

.dropdown-item:hover {
    background: rgba(0, 196, 255, 0.1);
    color: white;
}

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

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 196, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 196, 255, 0.5);
}

/* Utility Classes */
.text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

.text-primary {
    color: var(--primary-blue) !important;
}

.text-success {
    color: var(--success-green) !important;
}

.text-danger {
    color: var(--warning-red) !important;
}

.text-warning {
    color: #f59e0b !important;
}

.text-info {
    color: var(--accent-cyan) !important;
}

.bg-primary {
    background-color: var(--primary-blue) !important;
}

.bg-success {
    background-color: var(--success-green) !important;
}

.bg-danger {
    background-color: var(--warning-red) !important;
}

/* Modal Styling - Glassmorphism */
.modal-content {
    background: rgba(26, 29, 35, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37),
                inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.modal-header {
    background: rgba(0, 115, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px 16px 0 0;
    padding: var(--spacing-4);
}

.modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.8;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

.modal-title {
    color: white;
    font-weight: 600;
}

.modal-body {
    background: rgba(26, 29, 35, 0.95);
    color: rgba(255, 255, 255, 0.9);
    padding: var(--spacing-4);
}

.modal-footer {
    background: rgba(26, 29, 35, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 0 16px 16px;
    padding: var(--spacing-4);
}

/* Fix modal overlay z-index issues - Use highest possible values */
.modal-backdrop {
    z-index: 9998;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal {
    z-index: 9999;
}

/* Ensure modal content is above backdrop */
.modal-dialog {
    z-index: 10000;
    position: relative;
}

/* Fix modal backdrop positioning */
.modal-backdrop.show {
    opacity: 1;
}

/* Ensure modal is properly positioned */
.modal.show {
    display: block !important;
}

/* Prevent backdrop from blocking interactions */
.modal-backdrop {
    pointer-events: auto;
}

.modal {
    pointer-events: auto;
}

/* Fix modal content positioning */
.modal-content {
    position: relative;
    z-index: 10001;
    pointer-events: auto;
}

/* Ensure close button is clickable */
.modal-header .btn-close {
    z-index: 10002;
    pointer-events: auto;
    position: relative;
}

/* Fix modal backdrop blocking issues */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
}

/* Ensure modal is above everything */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
}

/* Emergency fix for overlay issues */
.modal-open {
    overflow: hidden;
}

/* Force modal content to be interactive */
.modal-content * {
    pointer-events: auto;
}

/* Add visual indicator for clickable close button */
.modal-header .btn-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Alternative: Completely disable backdrop if needed */
.modal-backdrop.disabled {
    display: none !important;
}

.modal.no-backdrop {
    z-index: 99999;
}

/* Force modal to be on top of everything */
.modal-content {
    z-index: 99999 !important;
    position: relative !important;
}

/* Override any conflicting z-index */
.modal-dialog {
    z-index: 99998 !important;
}

.modal {
    z-index: 99997 !important;
}

/* Ensure modal is always on top */
.modal.show .modal-dialog {
    z-index: 99999 !important;
}

.modal.show .modal-content {
    z-index: 100000 !important;
}

/* Accordion styling for camera discovery */
.accordion-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: var(--spacing-2);
}

.accordion-button {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 12px;
    transition: all 0.3s;
}

.accordion-button:not(.collapsed) {
    background: rgba(0, 115, 255, 0.1);
    color: white;
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: 0 0 0 3px rgba(0, 196, 255, 0.15);
    border-color: var(--accent-cyan);
}

.accordion-button::after {
    filter: invert(1);
}

.accordion-body {
    background: rgba(26, 29, 35, 0.95);
    color: rgba(255, 255, 255, 0.9);
    border-radius: 0 0 12px 12px;
}

.accordion-body .table {
    color: rgba(255, 255, 255, 0.9);
}

.accordion-body .table th {
    background: rgba(0, 115, 255, 0.1);
    color: white;
}

.accordion-body .table td {
    color: rgba(255, 255, 255, 0.9);
}
