/* =====================================================
   SIDEBAR COMPONENT
===================================================== */

.sidebar {
    width: 250px;
    height: 100vh;
    background: #012531;
    border-right: 1px solid #0a3a4a;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header {
    height: 76px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #0a3a4a;
}

.sidebar-logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #961652;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-brand { margin-left: 11px; min-width: 0; }

.sidebar-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 17px;
    color: #ffffff;
    white-space: nowrap;
}

.sidebar-subtitle {
    margin-top: 2px;
    font-size: 10px;
    color: #e4bc36;
    line-height: 14px;
    white-space: nowrap;
}

.sidebar-menu {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

/* =====================================================
   MENU ITEM
===================================================== */

.sidebar-menu-item {
    width: 100%;
    height: 44px;
    border: 0;
    background: transparent;
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    cursor: pointer;
    color: #9fb8c4;
    font-family: inherit;
    transition: background .15s ease, color .15s ease;
    margin-bottom: 2px;
}

.sidebar-menu-item:hover { background: #0a3a4a; color: #ffffff; }
.sidebar-menu-item.active { background: #961652; color: #ffffff; }

.sidebar-menu-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-menu-label {
    margin-left: 12px;
    font-size: 13px;
    font-weight: 500;
    flex: 1;
    text-align: left;
}

.sidebar-menu-item.active .sidebar-menu-label { font-weight: 600; }

/* =====================================================
   PARENT ITEM (has submenu)
===================================================== */

.sidebar-menu-item-parent {
    position: relative;
}

.sidebar-menu-item-parent.has-active-child {
    color: #ffffff;
    background: rgba(150, 22, 82, 0.15);
}

.sidebar-menu-item-parent.has-active-child:hover {
    background: rgba(150, 22, 82, 0.25);
}

.sidebar-menu-chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: #7a8a94;
    transition: transform 0.2s ease, color 0.15s ease;
    flex-shrink: 0;
}

.sidebar-menu-item-parent:hover .sidebar-menu-chevron { color: #ffffff; }

.sidebar-menu-group.expanded .sidebar-menu-chevron {
    transform: rotate(180deg);
    color: #e4bc36;
}

/* =====================================================
   SUBMENU
===================================================== */

.sidebar-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    padding-left: 8px;
    margin-left: 12px;
    border-left: 1px solid #0a3a4a;
}

.sidebar-menu-group.expanded .sidebar-submenu {
    max-height: 200px;
    margin-bottom: 4px;
}

.sidebar-submenu-item {
    width: 100%;
    height: 38px;
    border: 0;
    background: transparent;
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    cursor: pointer;
    color: #8aa0b8;
    font-family: inherit;
    transition: background .15s ease, color .15s ease;
    margin-bottom: 2px;
}

.sidebar-submenu-item:hover {
    background: #0a3a4a;
    color: #ffffff;
}

.sidebar-submenu-item.active {
    background: #961652;
    color: #ffffff;
}

.sidebar-submenu-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.85;
}

.sidebar-submenu-icon svg {
    width: 14px;
    height: 14px;
}

.sidebar-submenu-label {
    margin-left: 10px;
    font-size: 12px;
    font-weight: 500;
    flex: 1;
    text-align: left;
}

.sidebar-submenu-item.active .sidebar-submenu-label { font-weight: 600; }

/* =====================================================
   USER FOOTER
===================================================== */

.sidebar-user {
    padding: 14px 16px;
    border-top: 1px solid #0a3a4a;
    background: #012531;
    flex-shrink: 0;
}

.sidebar-user-info { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #961652;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    text-transform: uppercase;
}

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

.sidebar-user-name {
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    color: #e4bc36;
    font-size: 11px;
    line-height: 1.3;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 12px;
    background: transparent;
    color: #9fb8c4;
    border: 1px solid #0a3a4a;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}

.sidebar-logout-btn:hover { background: #961652; border-color: #961652; color: #ffffff; }
.sidebar-logout-btn:active { transform: scale(0.98); }
.sidebar-logout-btn svg { flex-shrink: 0; }

/* =====================================================
   RESPONSIVE — COLLAPSED SIDEBAR
===================================================== */
@media (max-width: 768px) {
    .sidebar { width: 72px; }
    .sidebar-brand { display: none; }
    .sidebar-header { justify-content: center; padding: 0; }
    .sidebar-menu-label { display: none; }
    .sidebar-menu-item { justify-content: center; padding: 0; }
    .sidebar-menu-chevron { display: none; }
    .sidebar-submenu { display: none; }
}