/* Specific styling for Left Menu Sidebar */

.app-sidebar {
    width: var(--sidebar-width, 250px);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--neu-bg, #e6ecf5);
    border-right: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 5px 0 15px rgba(197, 208, 224, 0.5);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    padding: 1rem 0 1rem 0.85rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.85rem 1rem 0.25rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid rgba(200, 210, 225, 0.5);
    width: calc(100% - 0.85rem);
}



.sidebar-logo {
    max-width: 155px;
    height: auto;
}

.sidebar-close-btn {
    display: none;
    background: var(--neu-bg, #e6ecf5);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--neu-text-muted, #6c7a89);
    cursor: pointer;
    box-shadow: 2px 2px 5px #c5d0e0, -2px -2px 5px #ffffff;
    transition: all 0.2s ease;
    flex-shrink: 0;
}



.sidebar-close-btn:active {
    box-shadow: inset 2px 2px 4px #c5d0e0, inset -2px -2px 4px #ffffff;
}

/* Sidebar Search Bar */
.sidebar-search-wrapper {
    padding: 0 0.85rem 0.65rem 0;
    flex-shrink: 0;
}

.sidebar-search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--neu-bg, #e6ecf5);
    border-radius: 12px;
    padding: 0.35rem 0.7rem;
    box-shadow: inset 2px 2px 5px #c5d0e0, inset -2px -2px 5px #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.45);
    transition: all 0.2s ease;
}

.sidebar-search-box:focus-within {
    border-color: rgba(0, 94, 133, 0.35);
    box-shadow: inset 2px 2px 6px #bcc7d8, inset -2px -2px 6px #ffffff;
}

.sidebar-search-icon {
    font-size: 1rem;
    color: #6d7d93;
    margin-right: 0.4rem;
    line-height: 1;
    transition: color 0.2s ease;
}

.sidebar-search-box:focus-within .sidebar-search-icon {
    color: #005e85;
}

.sidebar-search-input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 0.75rem;
    font-weight: 600;
    color: #4a5a6c;
    padding: 0;
}

.sidebar-search-input::placeholder {
    color: #8898aa;
    font-weight: 500;
}

.sidebar-search-clear {
    border: none;
    background: transparent;
    padding: 0;
    margin-left: 0.25rem;
    color: #8898aa;
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.sidebar-search-clear:hover {
    color: #005e85;
}

.sidebar-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 0.75rem;
    text-align: center;
    color: #8898aa;
    font-size: 0.75rem;
    font-weight: 500;
    gap: 0.35rem;
}

.sidebar-no-results i {
    font-size: 1.5rem;
    color: #a0aec0;
}

/* Sidebar Notification Dot (Top-Left Corner of Parent Menu Icon) & Counter Badge */
.sidebar-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-ul-dot {
    position: absolute;
    top: 1px;
    left: -3px;
    width: 8px;
    height: 8px;
    background-color: #ef4444;
    border-radius: 50%;
    border: 1.5px solid var(--neu-bg, #e6ecf5);
    box-shadow: 0 0 4px rgba(239, 68, 68, 0.5);
    pointer-events: none;
}

.sidebar-link.active .sidebar-ul-dot {
    border-color: #005e85;
}

.sidebar-counter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background-color: #ef4444;
    color: #ffffff;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1;
    border-radius: 50px;
    box-shadow: 0 2px 5px rgba(239, 68, 68, 0.35);
    margin-left: auto;
    flex-shrink: 0;
}

.sidebar-link.active .sidebar-counter-badge {
    background-color: #ffffff;
    color: #ef4444;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}



/* Category Section Headers */
.sidebar-category {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6d7d93;
    padding: 0.9rem 0.85rem 0.45rem 0.85rem;
    margin-top: 0.15rem;
}

/* Navigation List */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 0.35rem;
    list-style: none;
    padding: 0 0.85rem 0 0;
    margin: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #d1d9e6 transparent;
}

/* Custom Minimal Scrollbar on Right Edge */
.sidebar-nav::-webkit-scrollbar {
    width: 2px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: #d1d9e6;
    border-radius: 2px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: #005e85;
}

.sidebar-item {
    width: 100%;
}


/* Compact Nav Links matching mockup */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.35rem 1rem;
    color: #4a5a6c;
    text-decoration: none;
    font-size: 0.77rem;
    font-weight: 600;
    border-radius: 14px;
    transition: all 0.2s ease;
}

.sidebar-link i {
    font-size: 1.25rem;
    color: #5c6c80;
    transition: color 0.2s ease;
}

.sidebar-link:hover {
    color: #005e85;
    background-color: rgba(255, 255, 255, 0.4);
}

.sidebar-link:hover i {
    color: #005e85;
}

.sidebar-link.active {
    background: #005e85;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(0, 94, 133, 0.3);
}

.sidebar-link.active i {
    color: #ffffff;
}

/* Submenu Arrow Rotation & Sub-item Styling */
.submenu-arrow {
    display: inline-block !important;
    transition: transform 0.25s ease-in-out !important;
}
.sidebar-link[aria-expanded="true"] .submenu-arrow,
.sidebar-link:not(.collapsed) .submenu-arrow {
    transform: rotate(90deg) !important;
}
.sidebar-link[aria-expanded="false"] .submenu-arrow,
.sidebar-link.collapsed .submenu-arrow {
    transform: rotate(0deg) !important;
}



/* Mobile Sidebar Backdrop Overlay */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
    z-index: 1040;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-backdrop.show {
    display: block;
    opacity: 1;
}

/* Responsive Mobile Layout (<= 991.98px) */
@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
    }

    .app-sidebar.show {
        transform: translateX(0);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15);
    }

    .sidebar-brand {
        justify-content: space-between;
    }

    .sidebar-close-btn {
        display: flex;
    }

}

/* Bottom Subscription & Storage Limit Card */
.sidebar-sub-card-wrapper {
    padding: 0.7rem 0.85rem 0 0;
    margin-top: auto;
    flex-shrink: 0;
}

.sidebar-sub-card {
    background: var(--neu-bg, #e6ecf5);
    border-radius: 16px;
    padding: 0.65rem 0.75rem;
    box-shadow: 4px 4px 10px #c5d0e0, -4px -4px 10px #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.55);
    position: relative;
    overflow: hidden;
}

.sidebar-sub-card::after {
    content: '';
    position: absolute;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    right: -25px;
    bottom: -30px;
    background: rgba(0, 94, 133, 0.06);
    pointer-events: none;
}

.sidebar-sub-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.sidebar-sub-col-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.32rem;
    min-width: 0;
}

.sidebar-sub-std-logo {
    height: 17px;
    width: auto;
    max-width: 98px;
    object-fit: contain;
    display: block;
}

.sidebar-sub-plan-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #005e85, #0077a8);
    color: #ffffff;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 0.16rem 0.5rem;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0, 94, 133, 0.25);
    text-transform: uppercase;
    line-height: 1;
}

.sidebar-sub-col-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 0.28rem;
    flex-shrink: 0;
    text-align: right;
}

.sidebar-sub-gauge-row {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.32rem;
}

.sidebar-sub-pct-text {
    font-size: 0.78rem;
    font-weight: 800;
    color: #005e85;
    line-height: 1;
}

.sidebar-sub-circle-wrap {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-sub-circle-svg {
    transform: rotate(-90deg);
    display: block;
}

.sidebar-sub-circle-bg {
    fill: none;
    stroke: #cfd8e6;
    stroke-width: 3;
}

.sidebar-sub-circle-fg {
    fill: none;
    stroke: #005e85;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.4s ease;
}

.sidebar-sub-circle-fg.is-warning {
    stroke: #d97706;
}

.sidebar-sub-circle-fg.is-critical {
    stroke: #dc2626;
}

.sidebar-sub-storage-val {
    font-size: 0.62rem;
    color: #5c6c80;
    font-weight: 600;
    line-height: 1.1;
    white-space: nowrap;
}

.sidebar-sub-storage-val strong {
    color: #005e85;
    font-weight: 800;
}
