/* =============================================================================
   VCO Hub - Sidebar Navigation Styles
   Modern, professional design for Vehicle Control Operations
   ============================================================================= */

:root {
    /* Color Palette - Military/Professional */
    --vco-sidebar-bg: #1a1f2e;
    --vco-sidebar-hover: #252b3d;
    --vco-sidebar-active: #2d3548;
    --vco-accent: #3b82f6;
    --vco-accent-hover: #60a5fa;
    --vco-text-primary: #e2e8f0;
    --vco-text-muted: #94a3b8;
    --vco-text-heading: #64748b;
    --vco-topbar-bg: #0f172a;
    --vco-border: #334155;
    --vco-success: #10b981;
    --vco-warning: #f59e0b;
    
    /* Sidebar dimensions */
    --sidebar-width: 250px;
    --topbar-height: 56px;
}

/* =============================================================================
   Layout Structure
   ============================================================================= */

.vco-layout {
    display: flex;
    min-height: 100vh;
    background: #f1f5f9;
}

/* =============================================================================
   Sidebar
   ============================================================================= */

.vco-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--vco-sidebar-bg);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
}

/* Logo/Brand Area */
.vco-sidebar-brand {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    border-bottom: 1px solid var(--vco-border);
    background: var(--vco-topbar-bg);
}

.vco-sidebar-brand .brand-image {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.vco-sidebar-brand .brand-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--vco-text-primary);
    letter-spacing: 0.5px;
}

.vco-sidebar-brand .brand-text span {
    display: block;
    font-size: 0.6rem;
    color: var(--vco-text-muted);
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Search Input in Sidebar */
.vco-sidebar-search {
    padding: 0.75rem 1rem;
}

.vco-sidebar-search .search-input {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: var(--vco-sidebar-hover);
    border: 1px solid var(--vco-border);
    border-radius: 6px;
    color: var(--vco-text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.vco-sidebar-search .search-input:hover {
    background: var(--vco-sidebar-active);
    border-color: var(--vco-accent);
    color: var(--vco-text-primary);
}

.vco-sidebar-search .search-input i {
    margin-right: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.7;
}

.vco-sidebar-search .search-input span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Navigation Container */
.vco-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
}

/* Section Headers */
.vco-nav-section {
    padding: 0.75rem 1rem 0.25rem;
    margin-top: 0.25rem;
}

.vco-nav-section:first-child {
    margin-top: 0;
}

.vco-nav-section-title {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--vco-text-heading);
    margin-bottom: 0.25rem;
}

/* Navigation Items */
.vco-nav-item {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    color: var(--vco-text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    margin: 1px 0;
}

.vco-nav-item:hover {
    background: var(--vco-sidebar-hover);
    color: var(--vco-text-primary);
    text-decoration: none;
}

.vco-nav-item.active {
    background: var(--vco-sidebar-active);
    color: var(--vco-accent);
    border-left-color: var(--vco-accent);
}

.vco-nav-item i {
    width: 20px;
    margin-right: 0.7rem;
    font-size: 0.9rem;
    text-align: center;
}

.vco-nav-item .nav-text {
    font-size: 0.875rem;
    font-weight: 500;
}

.vco-nav-item .nav-badge {
    margin-left: auto;
    background: var(--vco-accent);
    color: white;
    font-size: 0.65rem;
    padding: 0.15rem 0.45rem;
    border-radius: 10px;
    font-weight: 600;
}

/* Sidebar Footer */
.vco-sidebar-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--vco-border);
    background: var(--vco-topbar-bg);
}

.vco-sidebar-footer .user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vco-sidebar-footer .user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.vco-sidebar-footer .user-details {
    flex: 1;
    min-width: 0;
}

.vco-sidebar-footer .user-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--vco-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vco-sidebar-footer .user-role {
    font-size: 0.6rem;
    color: var(--vco-text-muted);
}

.vco-sidebar-footer .logout-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.7rem;
    font-weight: 500;
}

.vco-sidebar-footer .logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ef4444;
}

.vco-sidebar-footer .logout-btn i {
    font-size: 0.75rem;
}

.vco-sidebar-footer .login-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--vco-accent);
    border-radius: 6px;
    color: white;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
}

.vco-sidebar-footer .login-btn:hover {
    background: var(--vco-accent-hover);
}

/* =============================================================================
   Main Content Area
   ============================================================================= */

.vco-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
}

/* Top Bar */
.vco-topbar {
    height: var(--topbar-height);
    background: white;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Mobile Menu Toggle Button - Professional hamburger design */
.vco-topbar-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
    border: 1px solid #334155;
    color: #e2e8f0;
    padding: 0.5rem 0.85rem;
    margin-right: 1rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    font-family: inherit;
}

.vco-topbar-toggle:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a5f 100%);
    border-color: #3b82f6;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.vco-topbar-toggle:active {
    transform: scale(0.97);
}

.vco-topbar-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Hamburger icon styling */
.vco-topbar-toggle i {
    font-size: 1rem;
    width: 18px;
    text-align: center;
    line-height: 1;
}

/* CSS fallback hamburger if Font Awesome fails to load */
.vco-topbar-toggle i:empty::before,
.vco-topbar-toggle i.fa-bars:empty::before {
    content: "☰";
    font-family: inherit;
    font-style: normal;
}

/* Menu label always visible for clarity */
.vco-topbar-toggle .toggle-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* Breadcrumb Navigation */
.vco-topbar-breadcrumb {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #64748b;
}

.vco-topbar-breadcrumb a {
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.vco-topbar-breadcrumb a:hover {
    color: var(--vco-accent);
}

.vco-topbar-breadcrumb .separator {
    margin: 0 0.5rem;
    color: #cbd5e1;
}

.vco-topbar-breadcrumb .current {
    color: #1e293b;
    font-weight: 500;
}

/* Hide breadcrumb on very small screens when toggle is shown */
@media (max-width: 575.98px) {
    .vco-topbar-breadcrumb {
        display: none;
    }
}

.vco-topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vco-topbar-actions .btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.vco-topbar-actions .btn-icon:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

/* Content Area */
.vco-content {
    flex: 1;
    padding: 1.5rem;
}

/* =============================================================================
   Mobile Responsive
   ============================================================================= */

.vco-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@media (max-width: 991.98px) {
    .vco-sidebar {
        transform: translateX(-100%);
    }
    
    .vco-sidebar.show {
        transform: translateX(0);
    }
    
    .vco-main {
        margin-left: 0;
    }
    
    .vco-topbar-toggle {
        display: flex;
    }
    
    .vco-overlay.show {
        display: block;
        opacity: 1;
    }
    
    /* Improve topbar on mobile */
    .vco-topbar {
        padding: 0 1rem;
    }
}

/* =============================================================================
   Mobile Brand Badge
   ============================================================================= */

.vco-mobile-brand {
    display: none;
}

.vco-mobile-brand .brand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
    color: #e2e8f0;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    border: 1px solid #334155;
}

@media (max-width: 575.98px) {
    .vco-mobile-brand {
        display: block;
    }
}

/* =============================================================================
   Page Header Styles
   ============================================================================= */

.vco-page-header {
    margin-bottom: 1.5rem;
}

.vco-page-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.vco-page-header p {
    color: #64748b;
    margin-bottom: 0;
}
