/* Vertical Sidebar Navigation - Collapsible */

:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --header-height: 60px;
    --primary-color: #0066cc;
    --sidebar-bg: #1e293b;
    --sidebar-text: #e2e8f0;
    --sidebar-hover: #334155;
    --sidebar-active: #0066cc;
}

/* Layout Container */
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Top Header Bar */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: linear-gradient(135deg, var(--primary-color), #0052a3);
    color: white;
    z-index: 1001;
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    width: 36px;
    height: 36px;
    border-radius: 4px;
}

.header-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info span {
    font-size: 0.9rem;
}

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    left: 0;
    top: var(--header-height);
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    transition: width 0.3s ease;
    z-index: 1000;
    overflow-x: hidden;
    overflow-y: auto;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--sidebar-hover);
    border: none;
    color: var(--sidebar-text);
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: var(--sidebar-active);
}

.sidebar.collapsed .sidebar-toggle {
    right: 50%;
    transform: translateX(50%);
}

/* Sidebar Menu */
.sidebar-menu {
    padding: 50px 0 20px;
    list-style: none;
    margin: 0;
}

.sidebar-menu li {
    margin: 4px 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all 0.3s ease;
    gap: 12px;
    white-space: nowrap;
}

.sidebar-link:hover {
    background: var(--sidebar-hover);
}

.sidebar-link.active {
    background: var(--sidebar-active);
    border-left: 4px solid white;
    padding-left: 16px;
}

.sidebar-link svg {
    width: 24px;
    height: 24px;
    min-width: 24px;
    flex-shrink: 0;
}

.sidebar-link span {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .sidebar-link span {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-link {
    justify-content: center;
    padding: 12px;
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 20px;
    transition: margin-left 0.3s ease;
    min-height: calc(100vh - var(--header-height));
}

.sidebar.collapsed~.main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-toggle {
        display: block;
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: var(--primary-color);
        color: white;
        border: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        z-index: 999;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .sidebar.mobile-open~.sidebar-overlay {
        display: block;
    }
}

@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none;
    }
}

/* Button Styles */
.btn {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* Scrollbar Styling for Sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--sidebar-hover);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--sidebar-active);
}