 /* ===== Modernized Left Sidebar ===================================================
       Design goals:
         - Light neutral background (#f8f9fb) — calm, professional, not dominant
         - Red (#dc2626) used as accent only: active item bg tint + icon/text color
         - 280px width, 44px item height, 8px rounded corners
         - Compact profile header (replaces the old tall toolbar)
         - Small-caps section labels instead of bold md-subheader
         - Smooth hover / active transitions
    ================================================================================ */

/* Sidebar shell */
.sidenav-modern {
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
    background-color: #f8f9fb;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 2px 0 8px rgba(0,0,0,0.06) !important;
}

/* ------------------------------------------------------------------
    Profile header — replaces the old md-tall toolbar
    Clean white strip: avatar · name/email · version info icon
------------------------------------------------------------------ */
.sidenav-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 10px 14px 16px;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
    min-height: 64px;
    box-sizing: border-box;
}

/* Initials avatar — smaller (36px) but same color-coded logic */
.sidenav-header__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    line-height: 36px;
    text-align: center;
    color: #fff;
    flex-shrink: 0;
    letter-spacing: 0;
}

.sidenav-header__info {
    flex: 1;
    min-width: 0; /* allow ellipsis */
}

.sidenav-header__name {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.45;
}

.sidenav-header__email {
    font-size: 11px;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.45;
}

/* Version/legal — icon button, subtle */
.sidenav-header__meta {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    line-height: 28px !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-shrink: 0;
}

.sidenav-header__meta md-icon {
    font-size: 18px !important;
    width: 18px !important;
    height: 18px !important;
    color: #d1d5db !important;
    transition: color 0.15s ease;
}

.sidenav-header__meta:hover md-icon {
    color: #9ca3af !important;
}

/* ------------------------------------------------------------------
    Scrollable nav area
------------------------------------------------------------------ */
.sidenav-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px;
    background-color: #f8f9fb !important; /* override md-default-theme gray */
}

/* ------------------------------------------------------------------
    Section labels — replaces md-subheader
    Small-caps, generous top spacing to separate groups visually
------------------------------------------------------------------ */
.sidenav-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #9ca3af;
    padding: 16px 10px 4px;
    line-height: 1;
    user-select: none;
}

/* ------------------------------------------------------------------
    Menu item row
    Height: 44px, rounded: 8px, icon + label inline
------------------------------------------------------------------ */
.sidenav-item {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
    height: 44px;
    border-radius: 8px;
    cursor: pointer;
    color: #374151;
    margin-bottom: 2px;
    user-select: none;
    transition: background-color 0.15s ease, color 0.15s ease;
    /* reset any md-list-item inherited styles */
    min-height: 0 !important;
    text-decoration: none;
    position: relative;
}

/* Hover state: very subtle darkening */
.sidenav-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #111827;
}

.sidenav-item:hover .sidenav-item__icon {
    color: #374151;
}

/* Active state: primary-tinted background + primary icon and label */
.sidenav-item--active {
    background-color: rgba(47, 111, 237, 0.09) !important;
    color: #2f6fed !important;
}

.sidenav-item--active .sidenav-item__icon {
    color: #2f6fed !important;
}

.sidenav-item--active .sidenav-item__label {
    font-weight: 600;
}

/* Icon — 20px, muted gray by default */
.sidenav-item__icon {
    font-size: 22px !important;
    width: 22px !important;
    height: 22px !important;
    line-height: 22px !important;
    color: #6b7280;
    flex-shrink: 0;
    transition: color 0.15s ease;
    /* keep Angular Material from adding extra margins */
    margin: 0 !important;
}

/* Image-based icon (logo alternative) */
.sidenav-item__img {
    width: 22px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
    opacity: 0.65;
    transition: opacity 0.15s ease;
}

.sidenav-item:hover .sidenav-item__img,
.sidenav-item--active .sidenav-item__img {
    opacity: 1;
}

/* Label text */
.sidenav-item__label {
    font-size: 16px;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* Section divider — replaces md-divider */
.sidenav-divider {
    height: 1px;
    background-color: #e5e7eb;
    margin: 6px 8px;
}