/* ============================================
   Admin Sidebar - Light Blue Theme
   ============================================ */
.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    z-index: var(--z-sidebar);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
}

.sidebar-header {
    display: flex;
    padding: 0.5rem 1rem 0;
    /* Zero top padding to remove gap */
    align-items: center;
    justify-content: center;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

/* Sidebar Toggle Button */
.sidebar-toggle-btn {
    display: none;
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 44px;
    background: var(--btn-primary-bg);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    align-items: center;
    justify-content: center;
    box-shadow: var(--btn-primary-shadow);
}

.sidebar-toggle-btn:hover {
    transform: translateX(-50%) scale(1.05);
    box-shadow: var(--btn-primary-hover-shadow);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sidebar-scroll-area {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5rem 0.25rem;
    /* Custom Scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--sidebar-border) transparent;
}

.sidebar-scroll-area::-webkit-scrollbar {
    width: 4px;
}

.sidebar-scroll-area::-webkit-scrollbar-thumb {
    background: var(--sidebar-border);
    border-radius: 10px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    color: var(--sidebar-text);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin: 0.125rem 0.75rem;
}

.sidebar-item:hover:not(.active) {
    background: var(--sidebar-item-hover);
    color: var(--admin-text-primary);
}

.sidebar-item.active {
    background: var(--sidebar-item-active);
    color: var(--sidebar-item-active-text);
    box-shadow: 0 4px 12px rgba(40, 150, 205, 0.25);
}

.sidebar-item.active i:not(.submenu-arrow) {
    color: var(--sidebar-item-active-text);
}

.sidebar-item i:not(.submenu-arrow) {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    color: var(--sidebar-text-muted);
    transition: all 0.2s;
    flex-shrink: 0;
}

.sidebar-item:hover:not(.active) i:not(.submenu-arrow) {
    color: var(--primary-500);
}

.sidebar-item.active:hover {
    background: var(--sidebar-item-active);
    color: var(--sidebar-item-active-text);
}

.sidebar-item.active:hover i:not(.submenu-arrow) {
    color: var(--sidebar-item-active-text);
}

/* Sidebar Submenu */
.sidebar-group {
    display: flex;
    flex-direction: column;
}

.sidebar-item.has-submenu {
    position: relative;
}

.sidebar-item span {
    flex: 1;
}

.sidebar-item .submenu-arrow {
    width: auto;
    margin-left: auto;
    font-size: 0.65rem;
    color: var(--sidebar-text-muted);
    transition: transform 0.2s;
}

.sidebar-group.expanded .submenu-arrow {
    transform: rotate(180deg);
}

.sidebar-submenu {
    display: none;
    padding-left: 1rem;
}

.sidebar-group.expanded .sidebar-submenu {
    display: block;
}

.sidebar-subitem {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    padding-left: 2.5rem;
    border-radius: 8px;
    color: var(--sidebar-text);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-subitem:hover:not(.active) {
    background: var(--sidebar-item-hover);
    color: var(--admin-text-primary);
}

.sidebar-subitem.active:hover {
    background: var(--sidebar-item-active);
    color: var(--sidebar-item-active-text);
}

.sidebar-subitem.active {
    background: var(--sidebar-item-active);
    color: var(--sidebar-item-active-text);
}

.sidebar-subitem i {
    width: 18px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--sidebar-text-muted);
}

.sidebar-subitem.active i {
    color: var(--sidebar-item-active-text);
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 85;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Bottom Nav (hidden on desktop) */
.mobile-bottom-nav {
    display: none;
}

/* Sidebar Handle for mobile */
.sidebar-handle {
    width: 40px;
    height: 4px;
    background: var(--gray-300);
    border-radius: 2px;
}

@media (max-width: 1024px) {
    .desktop-only {
        display: none !important;
    }

    @media (max-width: 1024px) {
        .mobile-logo {
            display: flex !important;
            align-items: center;
            justify-content: center;
        }
    }

    .desktop-logo {
        display: none !important;
    }
}

@media (min-width: 1025px) {

    .mobile-nav-overlay,
    .mobile-nav-sheet {
        display: none !important;
    }
}

/* Sidebar Items Divider */
.sidebar-divider {
    height: 1px;
    background: var(--sidebar-border);
    margin: 0.75rem 1rem;
    opacity: 0.6;
}

/* ============================================
   Sidebar Section (Payments - no visible parent label)
   ============================================ */

/* Desktop: Just a section with children, no prominent parent */
.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--sidebar-border);
}

/* Section label - subtle and premium */
.sidebar-section-label {
    padding: 10px 1.5rem 4px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--sidebar-text-muted);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    opacity: 0.8;
    margin-top: 5px;
    pointer-events: none;
    user-select: none;
}

.sidebar-spacer {
    flex: 1;
}

#sidebar-account-container {
    padding: 1rem 0.75rem;
    border-top: 1px solid var(--sidebar-border);
    margin-top: auto;
}

.sidebar-section-label i {
    width: 14px;
    text-align: center;
    font-size: 0.7rem;
}

.sidebar-section.active .sidebar-section-label {
    color: var(--primary-500);
}

.sidebar-section-items {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

/* Child items - slightly indented */
.sidebar-item.sidebar-child {
    padding-left: 1.5rem;
    font-size: 0.875rem;
}

.sidebar-item.sidebar-child i {
    font-size: 0.9rem;
    width: 18px;
}

/* Admin Footer Strip (Main Content) */
.admin-footer-strip {
    margin-top: 4rem;
    padding-top: 1.5rem;
    padding-bottom: 2rem;
    border-top: 1px solid var(--sidebar-border);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.footer-left {
    font-size: 0.75rem;
    color: var(--sidebar-text-muted);
    font-weight: 500;
}

.footer-right {
    display: flex;
    align-items: center;
}

.version-badge {
    font-size: 0.65rem;
    background: var(--primary-100);
    color: var(--primary-600);
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
    font-weight: 600;
    letter-spacing: 0.5px;
}