/* MCP Mobile Sidebar Replica */
#mcp-mobile-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    /* Slightly wider than 64 (16rem = 256px) for safety */
    height: 100dvh;
    background-color: #ffffff;
    z-index: 2147483647;
    /* Top of everything */
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', sans-serif;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

#mcp-mobile-sidebar.active {
    transform: translateX(0);
}

#mcp-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999998;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#mcp-mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* Header / Logo */
.mcp-sidebar-header {
    height: 128px !important;
    /* h-32 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #f8fafc;
    /* slate-50 */
    padding: 1rem 0 !important;
    flex-shrink: 0;
    position: relative;
    box-sizing: border-box;
}

.mcp-sidebar-logo {
    height: 80px !important;
    /* h-20 */
    width: auto !important;
    object-fit: contain;
    margin-bottom: 0.5rem;
    display: block;
}

.mcp-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #94a3b8;
    /* slate-400 */
    cursor: pointer;
    padding: 5px;
}

/* Navigation */
.mcp-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mcp-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.75rem;
    /* rounded-xl */
    text-decoration: none;
    color: #64748b;
    /* slate-500 */
    font-size: 0.875rem;
    /* text-sm */
    font-weight: 500;
    transition: all 0.2s;
}

.mcp-nav-item:hover {
    background-color: #f8fafc;
    /* bg-slate-50 */
    color: #0f172a;
    /* text-slate-900 */
}

.mcp-nav-item.active,
.mcp-nav-item.current-menu-item {
    background-color: #f3e8f5;
    /* primary/10 approx */
    color: #58086f;
    /* primary */
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.mcp-nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Footer / User Profile */
.mcp-sidebar-footer {
    padding: 1rem;
    border-top: 1px solid #f8fafc;
    margin-top: auto;
    background-color: #ffffff;
    flex-shrink: 0;
}

.mcp-user-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 0.75rem;
    background-color: #f8fafc;
    /* bg-slate-50 */
    border: 1px solid #f1f5f9;
    /* border-slate-100 */
}

.mcp-user-avatar {
    width: 36px;
    /* 2.25rem = w-9 */
    height: 36px;
    border-radius: 50%;
    background-color: #e2e8f0;
    overflow: hidden;
    flex-shrink: 0;
}

.mcp-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mcp-user-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.mcp-user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.mcp-user-email {
    font-size: 0.75rem;
    /* text-xs */
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    margin: 0;
}

.mcp-user-email:hover {
    text-decoration: underline;
    color: #58086f;
    /* primary */
}

.mcp-logout-btn {
    color: #94a3b8;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
}

.mcp-logout-btn:hover {
    color: #ef4444;
    /* red-500 */
}

/* Hide Desktop if needed, though this only shows on mobile via JS trigger */
@media (min-width: 992px) {

    #mcp-mobile-sidebar,
    #mcp-mobile-overlay {
        display: none !important;
    }
}