﻿/* Professional Light Glass Theme */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Palette - Light & Professional */
    --bg-light: #f3f4f6;
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.4);

    --brand-blue: #2563eb;
    /* Corporate Blue */
    --brand-indigo: #4f46e5;
    /* Professional Indigo */

    --text-main: #1f2937;
    /* Dark Gray for readability */
    --text-muted: #4b5563;
    /* Medium Gray */
    --text-light: #ffffff;
    /* White for contrast on dark buttons */

    /* Bootstrap overrides */
    --bs-body-font-family: 'Outfit', sans-serif;
    --bs-body-bg: transparent;
    --bs-body-color: var(--text-main);
    --bs-primary: var(--brand-blue);
    --bs-primary-rgb: 37, 99, 235;
    --bs-link-color: var(--brand-blue);
    --bs-link-hover-color: var(--brand-indigo);
}

body {
    min-height: 100vh;
    background: var(--bg-light);
    position: relative;
    overflow-x: hidden;
    color: var(--text-main);
}

/* Background Mesh/Gradient */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-gradient);
    z-index: -2;
}

/* Subtle Floating Blobs (Corporate friendly) */
body::after {
    content: '';
    position: fixed;
    top: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.1) 0%, transparent 70%);
    opacity: 0.8;
    z-index: -1;
    filter: blur(80px);
    pointer-events: none;
}

/* Glass Cards */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    /* Gentle shadow */
    color: var(--text-main);
    border-radius: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.2);
}

.card-header,
.card-footer {
    background: rgba(255, 255, 255, 0.5);
    border-color: var(--glass-border);
    color: var(--text-main);
    font-weight: 600;
}

.card-title {
    font-weight: 700;
    color: var(--brand-indigo);
    letter-spacing: -0.5px;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border) !important;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    background: linear-gradient(45deg, var(--brand-blue), var(--brand-indigo));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--brand-blue) !important;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-indigo));
    border: none;
    color: var(--text-light);
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
    transition: all 0.3s;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--brand-indigo), var(--brand-blue));
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.3);
    color: var(--text-light);
    transform: scale(1.01);
}

.btn-outline-primary {
    color: var(--brand-blue);
    border-color: var(--brand-blue);
    background: transparent;
    font-weight: 600;
}

.btn-outline-primary:hover {
    background: var(--brand-blue);
    color: var(--text-light);
}

/* Inputs */
.form-control {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #e5e7eb;
    color: var(--text-main);
    font-weight: 500;
}

.form-control:focus {
    background: #ffffff;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.15);
    color: var(--text-main);
}

/* Modals */
.modal-content {
    background: #ffffff;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    color: var(--text-main);
    border-radius: 1rem;
}

.modal-header {
    border-bottom: 1px solid #f3f4f6;
}

.modal-footer {
    border-top: 1px solid #f3f4f6;
}

.btn-close {
    filter: none;
    /* Default dark cross */
}

/* Video Grid */
#video-grid .video-tile {
    background: #000;
    /* Video remains dark for contrast */
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

#video-grid .nameplate {
    background: rgba(255, 255, 255, 0.9);
    border-top-right-radius: 0.5rem;
    color: var(--text-main);
    font-weight: 600;
    padding: 4px 8px;
}

/* Badges */
.badge {
    font-weight: 600;
}

/* Badges - Bootstrap defaults will handle bg colors + opacity correctly via CSS variables */

/* ========== Advanced Layout & Sidebar ========== */
.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
    min-height: 100vh;
}

.sidebar {
    min-width: 280px;
    max-width: 280px;
    min-height: 100vh;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    color: var(--text-main);
}

@media (max-width: 768px) {
    .sidebar {
        margin-left: -280px;
        position: fixed;
        z-index: 999;
    }

    .sidebar.active {
        margin-left: 0;
    }
}

.glass-sidebar {
    /* Kept for structure, bg handled by sidebar class */
}

/* Nav Links & Active States */
.sidebar .nav-link {
    color: var(--text-muted);
    border-radius: 0.5rem;
    margin-bottom: 0.25rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.sidebar .nav-link:hover {
    background: rgba(37, 99, 235, 0.05);
    /* Light blue tint */
    color: var(--brand-blue) !important;
    transform: translateX(4px);
}

.sidebar .nav-link.active-neon {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.1), transparent);
    border-left: 3px solid var(--brand-blue);
    color: var(--brand-blue) !important;
    font-weight: 600;
    box-shadow: none;
    /* Removed neon glow */
}

.text-neon {
    color: var(--brand-blue);
    /* Replaced neon */
}

.brand-logo {
    color: var(--brand-indigo) !important;
}

.border-neon {
    border-color: rgba(0, 0, 0, 0.1) !important;
}

/* Avatar Config */
.avatar-circle {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-indigo));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.glass-dropdown {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    color: var(--text-main);
}

.dropdown-menu-dark .dropdown-item {
    color: var(--text-main);
    /* Override dark menu */
}

.dropdown-menu-dark .dropdown-item:hover {
    background-color: #f3f4f6;
    color: var(--brand-blue);
}

.dropdown-menu-dark {
    /* Actually making it light now */
    background-color: #ffffff;
    border-color: #e5e7eb;
}

/* Main Content Area */
.main-content {
    width: 100%;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f3f4f6;
}

::-webkit-scrollbar-thumb {
    background: #c3cfe2;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--brand-blue);
}

/* Dashboard Specifics */
.card-stat {
    background: rgba(255, 255, 255, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-stat:hover {
    transform: translateY(-5px);
    background: #ffffff !important;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.15);
    border-color: var(--brand-blue) !important;
}

.border-glass {
    border-color: rgba(0, 0, 0, 0.05) !important;
}

/* Fixed Footer */
.glass-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.85);
    /* Slightly more opaque for readability over content */
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.05) !important;
    z-index: 1030;
    /* Above sidebar (standard bootstrap z-index for sticky-footer) */
}

/* Ensure content is not hidden behind fixed footer (approx 60px height) */
body {
    padding-bottom: 60px;
}

/* Dashboard Text Overrides for Light Mode */
.text-white {
    color: var(--text-main) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.empty-state-icon {
    font-size: 4rem;
    background: linear-gradient(135deg, #9ca3af, #d1d5db);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.8;
}

/* FIX: Disable animation/transform on containers causing modal z-index issues */
.animate__animated.animate__fadeIn {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
}