/* Layout Container */
.layout-container {
    display: flex;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* AppBar Styles - Tinted Glass Effect */
.navbar-appbar.e-appbar {
    /* Tinted glass with Microsoft blue accent */
    background: rgba(0, 120, 212, 0.88);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    height: 48px;
    /* Glassy bottom edge with light reflection */
    border-bottom: none;
    box-shadow:
        0 4px 20px rgba(0, 120, 212, 0.3),
        0 1px 3px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

/* Glass bottom edge highlight */
.navbar-appbar.e-appbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.25) 20%,
        rgba(255, 255, 255, 0.35) 50%,
        rgba(255, 255, 255, 0.25) 80%,
        transparent);
}

.navbar-appbar .app-title {
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.navbar-appbar .menu-icon {
    color: white;
}

.navbar-appbar .user-email {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-right: 12px;
}

/* Theme Toggle Button */
.navbar-appbar .theme-toggle.e-btn {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    margin-right: 8px;
    transition: all 0.2s ease;
}

.navbar-appbar .theme-toggle.e-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.navbar-appbar .theme-toggle.e-btn:active {
    transform: scale(0.95);
}

.navbar-appbar .theme-toggle.e-btn .e-btn-icon {
    font-size: 18px;
    color: white;
}

/* =============================================================================
   Sidebar Styles - Ultra Glass Effect
   Light/Dark mode responsive with glassmorphism
============================================================================= */

/* Sidebar CSS Variables - Light Mode */
:root {
    --sidebar-bg: rgba(255, 255, 255, 0.7);
    --sidebar-bg-blur: 20px;
    --sidebar-border: rgba(255, 255, 255, 0.5);
    --sidebar-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    --sidebar-header-border: rgba(0, 0, 0, 0.08);
    --sidebar-text: #1a1a1a;
    --sidebar-text-muted: #555555;
    --sidebar-hover-bg: rgba(0, 120, 212, 0.08);
    --sidebar-active-bg: rgba(0, 120, 212, 0.15);
    --sidebar-icon-color: #0078d4;
    --sidebar-shine: rgba(255, 255, 255, 0.8);
}

/* Sidebar CSS Variables - Dark Mode */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --sidebar-bg: rgba(30, 30, 35, 0.75);
        --sidebar-border: rgba(255, 255, 255, 0.1);
        --sidebar-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        --sidebar-header-border: rgba(255, 255, 255, 0.08);
        --sidebar-text: #f3f2f1;
        --sidebar-text-muted: #b3b3b3;
        --sidebar-hover-bg: rgba(255, 255, 255, 0.08);
        --sidebar-active-bg: rgba(0, 120, 212, 0.35);
        --sidebar-icon-color: #60a5fa;
        --sidebar-shine: rgba(255, 255, 255, 0.15);
    }
}

[data-theme="dark"] {
    --sidebar-bg: rgba(30, 30, 35, 0.75);
    --sidebar-border: rgba(255, 255, 255, 0.1);
    --sidebar-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --sidebar-header-border: rgba(255, 255, 255, 0.08);
    --sidebar-text: #f3f2f1;
    --sidebar-text-muted: #b3b3b3;
    --sidebar-hover-bg: rgba(255, 255, 255, 0.08);
    --sidebar-active-bg: rgba(0, 120, 212, 0.35);
    --sidebar-icon-color: #60a5fa;
    --sidebar-shine: rgba(255, 255, 255, 0.15);
}

/* Sidebar - Fixed overlay positioning */
.e-sidebar {
    background: var(--sidebar-bg) !important;
    backdrop-filter: blur(var(--sidebar-bg-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--sidebar-bg-blur)) saturate(180%);
    color: var(--sidebar-text);
    position: fixed !important;
    top: 48px !important;
    left: 0;
    height: calc(100vh - 48px) !important;
    min-height: calc(100vh - 48px) !important;
    max-height: calc(100vh - 48px) !important;
    z-index: 1000 !important;
    border-right: 1px solid var(--sidebar-border);
    box-shadow: var(--sidebar-shadow), 4px 0 24px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

/* Ensure sidebar content fills height */
.e-sidebar .e-sidebar-content {
    height: 100% !important;
    overflow: hidden;
}

/* Glass shine effect on right edge */
.e-sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(180deg,
        transparent,
        var(--sidebar-shine) 20%,
        var(--sidebar-shine) 80%,
        transparent);
    pointer-events: none;
}

.sidebar-wrapper {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Syncfusion sidebar backdrop overlay */
.e-sidebar-overlay {
    position: fixed !important;
    top: 48px !important;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 999 !important;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 16px;
    border-bottom: 1px solid var(--sidebar-header-border);
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 100%);
}

.app-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0078d4 0%, #106ebe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    box-shadow:
        0 4px 12px rgba(0, 120, 212, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.app-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--sidebar-text);
}

/* Sidebar Menu */
.sidebar-menu {
    padding: 12px 8px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0; /* Important for flex overflow */
}

.sidebar-menu .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin: 4px 0;
    border-radius: 10px;
    color: var(--sidebar-text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    border: 1px solid transparent;
}

.sidebar-menu .nav-link:hover {
    background: var(--sidebar-hover-bg);
    color: var(--sidebar-text);
    border-color: var(--sidebar-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sidebar-menu .nav-link.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-text);
    border-color: rgba(0, 120, 212, 0.3);
    box-shadow:
        0 2px 12px rgba(0, 120, 212, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Active indicator bar */
.sidebar-menu .nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: linear-gradient(180deg, #0078d4, #106ebe);
    border-radius: 0 3px 3px 0;
}

.sidebar-menu .nav-icon {
    font-size: 20px;
    min-width: 24px;
    text-align: center;
    color: var(--sidebar-icon-color);
    transition: transform 0.2s ease;
}

.sidebar-menu .nav-link:hover .nav-icon {
    transform: scale(1.1);
}

.sidebar-menu .nav-text {
    font-size: 14px;
    font-weight: 500;
}

/* Right Pane */
.right-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-top: 48px;
    overflow: auto;
}

.content-wrapper {
    flex: 1;
    padding: 20px;
    background: transparent;
}

/* Hide custom overlay - using Syncfusion's built-in overlay */
.sidebar-overlay {
    display: none !important;
}
