/* Layout3.css - Modern Sidebar Layout */

/* Global Reset & Base Styles */
body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif; /* More modern font stack */
    margin: 0;
    padding: 0;
    background-color: #f8f9fa; /* Slightly lighter, cleaner background */
    color: #495057; /* Softer text color */
    line-height: 1.5; /* Improved readability */
}

/* Dashboard Container */
.dashboard-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Top Navbar */
.top-navbar {
    background-color: #ffffff;
    height: 64px; /* Slightly taller for better touch targets */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px; /* More breathing room */
    box-shadow: 0 1px 3px rgba(0,0,0,0.08); /* Softer shadow */
    z-index: 1001;
    border-bottom: 1px solid #eaedf2;
}

.navbar-left {
    display: flex;
    align-items: center;
}

.hamburger-btn {
    display: none; /* Hidden by default on Desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-right: 16px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.hamburger-btn:hover {
    background-color: #f1f3f5;
}

.hamburger-btn span {
    display: block;
    width: 22px;
    height: 2px; /* Thinner lines */
    background-color: #495057;
    margin: 5px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.brand-logo {
    font-weight: 600;
    font-size: 1.25rem;
    color: #343a40;
    letter-spacing: -0.5px;
}

.navbar-right .toolbar-tools {
    display: flex;
    align-items: center;
    gap: 20px;
}

.tool-item {
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 0.9rem;
    color: #495057;
}

.tool-item:hover {
    background-color: #f1f3f5;
    color: #212529;
}

.tool-item.login-btn {
    background-color: #e9ecef;
    color: #495057;
}

.tool-item.login-btn:hover {
    background-color: #dee2e6;
}


/* Main Body Layout */
.main-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* Sidebar Styling */
.sidebar {
    width: 280px; /* Wider sidebar */
    background-color: #212529; /* Darker, more premium grey/black */
    color: #adb5bd;
    overflow-y: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Smoother animation */
    z-index: 1000;
    flex-shrink: 0;
    box-shadow: 4px 0 10px rgba(0,0,0,0.05);
}

/* Sidebar Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}
.sidebar::-webkit-scrollbar-thumb {
    background-color: #495057;
    border-radius: 3px;
}
.sidebar::-webkit-scrollbar-track {
    background-color: transparent;
}


/* Content Area */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 32px; /* More padding */
    background-color: #f8f9fa;
}

.content-wrapper {
    background-color: #ffffff;
    border-radius: 12px; /* Softer corners */
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04); /* Elevate content */
    min-height: calc(100% - 64px);
    border: 1px solid #eaedf2;
}

/* Responsive Behavior (Mobile) */
@media (max-width: 992px) { /* Switch earlier (Tablet) */
    .hamburger-btn {
        display: block;
    }

    .sidebar {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        transform: translateX(-100%);
        box-shadow: 5px 0 15px rgba(0,0,0,0.2); /* Stronger shadow when overlaying */
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .content-area {
        padding: 16px;
    }
    
    .content-wrapper {
        padding: 20px;
        border-radius: 8px;
    }
}

/* Styles for Ported LeftPane Content (overriding table styles) */
/* This is tricky because we are forcing table-based content to look like a list */

.LeftMenuTable {
    width: 100% !important;
    border-collapse: collapse;
}

.LeftMenuTableCell {
    background: transparent !important;
    width: 100% !important;
    border: none !important;
    padding: 16px 0 !important;
}

.LeftMenuContent {
    padding: 0 !important;
}

.MenuItem, .MenuItemHeader {
    padding: 14px 24px;
    color: #ced4da; /* Better contrast */
    display: flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    font-size: 0.95rem;
    border-left: 3px solid transparent; /* Indicator bar */
    margin-bottom: 2px;
    transition: all 0.2s;
}

.MenuItemHeader {
    background-color: transparent; /* Remove blocky background */
    color: #6c757d; /* Muted text for headers */
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1.2px;
    margin-top: 20px;
    padding-bottom: 8px;
    pointer-events: auto; /* Headers are typically interactive in this app (accordion) */
}

.MenuItemHeader:hover {
    color: #fff;
}

.MenuItem:hover {
    background-color: #343a40;
    color: #ffffff;
    border-left-color: #343a40; /* Subtle indication */
}

/* Active/Selected State (Simulated) */
.MenuItem.active, .MenuItem:active {
    background-color: #343a40;
    color: #fff;
    border-left-color: #4dabf7; /* Accent color */
}

/* Sub-menu Items */
.LeftPanelWebPagesItems {
    background-color: #1a1d20; /* Slightly darker recess */
    padding: 5px 0;
}

.LeftPanelWebPagesItems .MenuItem {
    padding-left: 48px; /* Deep indent */
    font-size: 0.9rem;
    color: #adb5bd;
    border-left: none;
}

.LeftPanelWebPagesItems .MenuItem:hover {
    background-color: #25292d;
    color: #fff;
}

/* Icons in menu (if any exist in the HTML) */
.MenuItem img {
    margin-right: 12px;
    opacity: 0.7;
}

/* Utility for Ported Elements */
#balloonLogin {
    z-index: 9999 !important;
    position: fixed; /* Fixed ensures it stays centered on scroll */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2); /* Deep shadow */
    border: none !important;
    border-radius: 12px !important;
    overflow: hidden;
}

/* Fix the table inside balloonLogin */
#balloonLogin table {
    background-color: #fff !important;
    font-family: inherit !important;
}

#balloonLogin td {
    padding: 12px !important;
}

#balloonLogin input[type="text"], 
#balloonLogin input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    box-sizing: border-box;
}

#balloonLogin input:focus {
    border-color: #4dabf7;
    outline: none;
    box-shadow: 0 0 0 3px rgba(77, 171, 247, 0.25);
}

/* Mobile Menu Button (Old Menu) - Hide it */
/* Since we have a new hamburger button in the navbar */
#cToggleMobileStandardMenu1, #cToggleMobileStandardMenu2 {
    display: none !important;
}
