/* ============ SIDEBAR.CSS (Floating Nav + Profile Card) ============ */


/* APPLY TO SIDEBAR (No scale, just blur + opacity) */
.sidebar {
    /* Set initial state so it doesn't "flash" on refresh */
    opacity: 0;
    animation: universalSpawn 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important;
    /* Start at the same time or slightly before the main content */
    animation-delay: 0.1s;
    background: rgba(10, 10, 14, 0.6) !important;
    /* Slightly darker glass for hierarchy */
    backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4) !important;
    border-radius: 24px !important;

}

/* --- SIDEBAR NAVIGATION UPGRADE --- */

.sidebar-nav {
    margin-top: 32px !important;
    /* Pushes nav further down from the line */
    margin-bottom: auto !important;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: 12px;

    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    /* Muted by default */

    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    height: 50px;
}

/* THE THEME GLOW (Hover & Active) */
.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.nav-link.active {
    background: rgba(59, 130, 246, 0.1);
    /* Subtle blue wash */
    border-color: rgba(59, 130, 246, 0.3);
}

/* Icon Polish */
.nav-link i {
    width: 20px;
    text-align: center;
    font-size: 15px;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.nav-link.active i {
    color: #60A5FA;
    /* Brighter blue icon for active tab */
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(96, 165, 250, 0.5));
}

.nav-link:hover i {
    transform: scale(1.1);
    opacity: 1;
}

/* --- 2. SIDEBAR CONTAINER --- */
.sidebar {
    position: sticky;
    top: 28px;

    /* Ensure it doesn't exceed viewport to allow internal scrolling */
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    /* Allow independent scrolling */

    /* Hide scrollbars for cleaner look */
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */

    /* CHANGE: Setting a min-height ensures it stretches even with less content */
    min-height: calc(100vh - 60px) !important;
    width: 320px;

    /* ADD: Increased vertical padding and explicit bottom padding to "breath" more */
    padding: 30px 20px 30px 20px !important;

    display: flex;
    flex-direction: column;
    gap: 24px;
    /* Increased gap between major sections */

    background: #0C0C0E;
    border: 1px solid #1F1F22;
    border-radius: 22px;
    align-self: start;
}

.sidebar::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar for Chrome/Safari */
}

/* Prevent internal items from shrinking, forcing the overflow scroll to work */
.sidebar>* {
    flex-shrink: 0;
}

/* Profile Image */
.profile-frame {
    position: relative;
    width: 120px;
    /* Controlled size */
    aspect-ratio: 1 / 1;
    border-radius: 18px;
    overflow: hidden;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.05);
    width: 90%;
    margin: 0 auto;
    margin-top: 10px;

}


/* Update this in sidebar.css */
.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;

    /* THE FIX: Set grayscale to 0% to remove the grey effect */
    filter: grayscale(0%) !important;

    /* Optional: Keep the subtle zoom effect on hover for a premium feel */
    transition: transform 0.3s ease;
}

/* Ensure the hover state doesn't re-apply any grey */
.profile-frame:hover .profile-img {
    filter: grayscale(0%) !important;
    transform: scale(1.03);
}

/* Status Badge */
.status-badge {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 6px #22c55e;
    animation: pulse 2s infinite;
}

/* Content */
.profile-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    /* This makes this container take up all available space */
}



.profile-name {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 4px;
    color: #fff;
    letter-spacing: -0.5px;
}

.profile-role {
    margin: 4px 0 0 0;
    font-size: 13px;
    color: #888899;
    font-weight: 500;
}

/* --- Sidebar Meta Details --- */
.sidebar-meta {
    display: flex;
    flex-wrap: wrap;
    /* Allows wrapping on tiny screens */
    gap: 12px;
    margin-top: 12px;
    margin-bottom: 20px;
    /* Space before social icons */
}

.meta-item {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    /* Muted text */
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.03);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.meta-item i {
    color: rgba(255, 255, 255, 0.3);
    /* Icon is even more subtle */
    font-size: 11px;
}

/* Specific style for the availability badge */
.meta-item.available {
    color: #a7f3d0;
    /* Soft green text */
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.1);
}

.meta-item.available .status-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
    animation: pulse 2s infinite;
}

.simple-line {
    height: 1px;
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    margin: 5px 0 0 0 !important;
    /* Reset bottom margin to 0 */
}

/* Footer */
.profile-footer {
    margin-top: auto !important;
    /* Pushes social row to the bottom of the card */
    padding-top: 15px;
    padding-bottom: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.social-row {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #18181B;
    border: 1px solid #27272A;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    font-size: 16px;
}

.social-btn:hover {
    background: #fff;
    color: #000;
    transform: translateY(-2px);
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* Only show the Close Button on Mobile */
.close-menu {
    display: none;
    /* Default hidden on desktop */
}

.action-divider {
    margin: 10px 0 10px;
}

@media (max-width: 1100px) {

    .app,
    .page {
        display: flex !important;
        flex-direction: column !important;
        /* Stack them vertically */
        padding: 20px;
    }

    .sidebar {
        /* Layout & Position */
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 300px !important;
        /* Slightly wider for better text flow */
        height: 100vh !important;
        padding: 60px 24px 30px 24px !important;
        /* Space for X button at top */

        /* THE GLASS UPGRADE: Matching the 'Senior' Aesthetic */
        background: rgba(10, 10, 14, 0.8) !important;
        /* Deep dark tint */
        backdrop-filter: blur(25px) saturate(160%) !important;
        /* Enhanced blur for mobile legibility */
        -webkit-backdrop-filter: blur(25px) saturate(160%);

        /* CRYSTAL BORDER & SHADOW */
        border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
        border-radius: 0 !important;
        /* Keeps it a sleek drawer edge */
        box-shadow: 40px 0 80px rgba(0, 0, 0, 0.7);

        /* Drawer Behavior */
        transform: translateX(-100%) !important;
        transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
        z-index: 10001 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow-y: auto;
        /* Allow scrolling within sidebar if content is long */
    }

    /* 2. Force the OPEN state to override everything */
    .sidebar.is-open {
        transform: translateX(0) !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .sidebar-nav {
        width: 100%;
    }

    .close-menu {
        display: flex !important;
        position: absolute;
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;

        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        color: #fff;
        font-size: 20px;
        cursor: pointer;
        z-index: 10002;
        transition: all 0.2s ease;
    }

    .close-menu:active {
        background: rgba(255, 255, 255, 0.2);
        transform: scale(0.9);
    }

    .profile-frame {
        width: 100px !important;
        height: 100px !important;
        margin-bottom: -10px !important;
    }

    .profile-content {
        align-items: center;
        text-align: center;
    }

    .sidebar-meta {
        justify-content: center !important;
        margin-bottom: 30px !important;
    }

    .social-row {
        padding-bottom: 20px;
    }

    .profile-footer {
        width: 100%;
        margin-top: auto;
        /* Pushes buttons to bottom of drawer */
    }

    .action-divider {
        padding: 10px 0 10px;
    }

}