:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --dark-bg: #0f172a;
    --dark-card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #ffffff;
    --accent-color: #38bdf8;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

body {
    background-color: var(--dark-bg);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    margin: 0;
    overflow-x: hidden;
}

.premium-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.premium-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

.btn-premium {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-premium:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
}

.form-control-premium {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--glass-border);
    color: white;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
}

.form-control-premium:focus {
    background: rgba(15, 23, 42, 0.8);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.25rem rgba(56, 189, 248, 0.25);
    color: white;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    height: 100vh;
    background: var(--dark-card);
    position: fixed;
    left: 0;
    top: 0;
    padding: 2rem 1rem;
    border-right: 1px solid var(--glass-border);
}

.main-content {
    margin-left: 280px;
    padding: 2rem;
    min-height: 100vh;
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1040;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
        padding-top: 5rem;
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        z-index: 1030;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .premium-card {
        padding: 1.25rem;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
}

.nav-link-premium {
    color: var(--text-muted);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.nav-link-premium:hover,
.nav-link-premium.active {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-color);
}

.brand-logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
    display: block;
    text-align: center;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.text-muted {
    color: #94a3b8 !important;
}

/* Webcam Security Guard & Audit Styles */
.webcam-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 15, 29, 0.94);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.webcam-modal-backdrop.active {
    display: flex;
    animation: fadeIn 0.3s ease forwards;
}

.webcam-modal-box {
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(56, 189, 248, 0.15);
    border-radius: 1.25rem;
    padding: 2.5rem;
    max-width: 520px;
    width: 100%;
    text-align: center;
    color: #f8fafc;
}

.webcam-shield-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.12);
    border: 2px solid rgba(56, 189, 248, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    color: var(--accent-color);
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.3);
    animation: pulseShield 2s infinite ease-in-out;
}

@keyframes pulseShield {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 25px rgba(56, 189, 248, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 35px rgba(56, 189, 248, 0.55);
    }
}

.webcam-modal-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.webcam-lang-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    letter-spacing: 0.5px;
}

.webcam-modal-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #e2e8f0;
    margin-bottom: 0.75rem;
}

.webcam-modal-subdesc {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #94a3b8;
    margin-bottom: 1.25rem;
}

.webcam-error-alert {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    text-align: left;
    margin-bottom: 1rem;
}

/* Webcam Status Indicator Pill */
.webcam-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
}

.webcam-status-pill.online {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.3);
}

.webcam-status-pill.offline {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

.pulse-dot-green {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #22c55e;
    box-shadow: 0 0 8px #22c55e;
    animation: pulseDot 1.5s infinite;
}

.pulse-dot-red {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ef4444;
    box-shadow: 0 0 8px #ef4444;
    animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(1.3);
    }
}

/* Auto-save status styles */
.autosave-pill {
    font-size: 0.8rem;
    padding: 0.4rem 0.85rem;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

/* Audit Logs Table Styling */
.snapshot-thumb {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid rgba(56, 189, 248, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.snapshot-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}

.diff-tag-old {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    padding: 2px 6px;
    border-radius: 4px;
    text-decoration: line-through;
    font-family: monospace;
    font-size: 0.8rem;
}

.diff-tag-new {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    font-family: monospace;
    font-size: 0.8rem;
}
